Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
05b2b09395 | |||
4dbd4f84c1 | |||
bb0ca2f19d | |||
55175f9ac7 | |||
0be0f9fa34 | |||
7baab5d7ea | |||
c3bdec176b | |||
2a84e2c270 | |||
c86f7d466c | |||
9a6db7d882 | |||
b69b1179a1 | |||
0df9fe750c | |||
0d05bfa5ff | |||
4dc9e04c2e | |||
5341a0d6b6 | |||
615bea9fc4 | |||
e518bc6976 | |||
076f8c7a91 | |||
b016b959cf | |||
eca68e28a2 | |||
68a164aac2 | |||
9b5448e096 |
10412
package-lock.json
generated
10412
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.92",
|
"version": "1.0.103",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "website for lossless.com",
|
"description": "website for lossless.com",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
@ -14,22 +14,24 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.22",
|
"@designestate/dees-domtools": "^2.0.23",
|
||||||
"@designestate/dees-element": "^2.0.15",
|
"@designestate/dees-element": "^2.0.16",
|
||||||
"@designestate/dees-wcctools": "^1.0.74",
|
"@designestate/dees-wcctools": "^1.0.74",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.1.1",
|
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||||
"pdfjs-dist": "^2.14.305"
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
|
"@tsclass/tsclass": "^4.0.28",
|
||||||
|
"pdfjs-dist": "^2.15.349"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.61",
|
"@gitzone/tsbuild": "^2.1.65",
|
||||||
"@gitzone/tsbundle": "^2.0.3",
|
"@gitzone/tsbundle": "^2.0.7",
|
||||||
"@gitzone/tstest": "^1.0.71",
|
"@gitzone/tstest": "^1.0.74",
|
||||||
"@gitzone/tswatch": "^2.0.1",
|
"@gitzone/tswatch": "^2.0.5",
|
||||||
"@pushrocks/projectinfo": "^5.0.1",
|
"@pushrocks/projectinfo": "^5.0.1",
|
||||||
"@pushrocks/tapbundle": "^5.0.3"
|
"@pushrocks/tapbundle": "^5.0.4"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
4440
pnpm-lock.yaml
generated
Normal file
4440
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.92',
|
version: '1.0.103',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,9 @@ import {
|
|||||||
faMedium,
|
faMedium,
|
||||||
faSlackHash,
|
faSlackHash,
|
||||||
faTwitter,
|
faTwitter,
|
||||||
|
faInstagram,
|
||||||
|
faTiktok,
|
||||||
|
|
||||||
} from '@fortawesome/free-brands-svg-icons';
|
} from '@fortawesome/free-brands-svg-icons';
|
||||||
|
|
||||||
import {} from '@fortawesome/free-regular-svg-icons';
|
import {} from '@fortawesome/free-regular-svg-icons';
|
||||||
@ -22,10 +25,12 @@ type TFontAwesomeIcon =
|
|||||||
// brands
|
// brands
|
||||||
| 'facebook'
|
| 'facebook'
|
||||||
| 'google'
|
| 'google'
|
||||||
| 'twitter'
|
|
||||||
| 'linkedin'
|
| 'linkedin'
|
||||||
|
| 'instagram'
|
||||||
| 'medium'
|
| 'medium'
|
||||||
| 'slack'
|
| 'slack'
|
||||||
|
| 'tiktok'
|
||||||
|
| 'twitter'
|
||||||
| 'users';
|
| 'users';
|
||||||
const faIcons: { [key: string]: IconDefinition } = {
|
const faIcons: { [key: string]: IconDefinition } = {
|
||||||
// normal
|
// normal
|
||||||
@ -34,9 +39,11 @@ const faIcons: { [key: string]: IconDefinition } = {
|
|||||||
// brands
|
// brands
|
||||||
facebook: faFacebook,
|
facebook: faFacebook,
|
||||||
google: faGoogle,
|
google: faGoogle,
|
||||||
|
instagram: faInstagram,
|
||||||
linkedin: faLinkedin,
|
linkedin: faLinkedin,
|
||||||
medium: faMedium,
|
medium: faMedium,
|
||||||
slack: faSlackHash,
|
slack: faSlackHash,
|
||||||
|
tiktok: faTiktok,
|
||||||
twitter: faTwitter,
|
twitter: faTwitter,
|
||||||
users: faUsers,
|
users: faUsers,
|
||||||
};
|
};
|
||||||
@ -79,6 +86,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
#iconContainer svg {
|
#iconContainer svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -19,7 +19,7 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-input-fileupload')
|
@customElement('dees-input-fileupload')
|
||||||
export class DeesInputFileupload extends DeesElement {
|
export class DeesInputFileupload extends DeesElement {
|
||||||
public static demo = () => html`<dees-input-fileupload></dees-input-fileupload>`;
|
public static demo = () => html`<dees-input-fileupload .label=${'Attachments'}></dees-input-fileupload>`;
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
@ -48,12 +48,17 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
public required: boolean = false;
|
public required: boolean = false;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean
|
type: Boolean,
|
||||||
})
|
})
|
||||||
public disabled: boolean = false;
|
public disabled: boolean = false;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: String,
|
||||||
|
})
|
||||||
|
public buttonText: string = 'Upload File...';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
@ -68,6 +73,7 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
color: ${cssManager.bdTheme('#333', '#ccc')};
|
color: ${cssManager.bdTheme('#333', '#ccc')};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -78,27 +84,50 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
.uploadButton {
|
.uploadButton {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 20px 20px;
|
padding: 8px;
|
||||||
max-width: 200px;
|
max-width: 600px;
|
||||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uploadButton:hover {
|
||||||
|
color: #fff;
|
||||||
|
background: rgb(3, 155, 229);
|
||||||
|
}
|
||||||
|
|
||||||
.uploadButton::after {
|
.uploadButton::after {
|
||||||
top: 7px;
|
top: 2px;
|
||||||
right: 7px;
|
right: 2px;
|
||||||
left: 7px;
|
left: 2px;
|
||||||
bottom: 7px;
|
bottom: 2px;
|
||||||
transform: scale3d(0.9, 0.9, 1);
|
transform: scale3d(0.98, 0.9, 1);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
border: 4px dashed rgba(255, 255, 255, 0);
|
border: 2px dashed rgba(255, 255, 255, 0);
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
.uploadButton.dragOver::after {
|
.uploadButton.dragOver::after {
|
||||||
transform: scale3d(1, 1, 1);
|
transform: scale3d(1, 1, 1);
|
||||||
border: 4px dashed rgba(255, 255, 255, 0.3);
|
border: 2px dashed rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadCandidate {
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px dashed #444;
|
||||||
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||||
|
padding: 8px;
|
||||||
|
font-family: 'Roboto Mono';
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadButton:hover .uploadCandidate {
|
||||||
|
color: ${cssManager.bdTheme('#fff', '#fff')};
|
||||||
|
border-bottom: 1px dashed #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadCandidate:last-child {
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
@ -107,7 +136,10 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
||||||
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}">Upload File! (Drag/Drop enabled)</div>
|
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}">
|
||||||
|
${this.value.map((fileArg) => html` <div class="uploadCandidate">${fileArg.name} | ${fileArg.size}</div> `)}
|
||||||
|
${this.buttonText}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -122,18 +154,24 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
const dropArea = this.shadowRoot.querySelector('.uploadButton');
|
const dropArea = this.shadowRoot.querySelector('.uploadButton');
|
||||||
const handlerFunction = (eventArg: DragEvent) => {
|
const handlerFunction = (eventArg: DragEvent) => {
|
||||||
eventArg.preventDefault();
|
eventArg.preventDefault();
|
||||||
switch(eventArg.type) {
|
switch (eventArg.type) {
|
||||||
case 'dragover':
|
case 'dragover':
|
||||||
this.state = 'dragOver';
|
this.state = 'dragOver';
|
||||||
|
this.buttonText = 'release to upload file...';
|
||||||
break;
|
break;
|
||||||
case 'dragleave':
|
case 'dragleave':
|
||||||
this.state = 'idle';
|
this.state = 'idle';
|
||||||
|
this.buttonText = 'Upload File...';
|
||||||
break;
|
break;
|
||||||
|
case 'drop':
|
||||||
|
this.state = 'idle';
|
||||||
|
this.buttonText = 'Upload more files...';
|
||||||
}
|
}
|
||||||
console.log(eventArg);
|
console.log(eventArg);
|
||||||
for (const file of Array.from(eventArg.dataTransfer.files)) {
|
for (const file of Array.from(eventArg.dataTransfer.files)) {
|
||||||
this.value.push(file);
|
this.value.push(file);
|
||||||
};
|
this.requestUpdate();
|
||||||
|
}
|
||||||
console.log(`Got ${this.value.length} files!`);
|
console.log(`Got ${this.value.length} files!`);
|
||||||
};
|
};
|
||||||
dropArea.addEventListener('dragenter', handlerFunction, false);
|
dropArea.addEventListener('dragenter', handlerFunction, false);
|
||||||
|
188
ts_web/elements/dees-mobilenavigation.ts
Normal file
188
ts_web/elements/dees-mobilenavigation.ts
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
import * as plugins from './plugins.js';
|
||||||
|
import {
|
||||||
|
cssManager,
|
||||||
|
css,
|
||||||
|
customElement,
|
||||||
|
DeesElement,
|
||||||
|
domtools,
|
||||||
|
html,
|
||||||
|
property,
|
||||||
|
} from '@designestate/dees-element';
|
||||||
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
|
@customElement('dees-mobilenavigation')
|
||||||
|
export class DeesMobilenavigation extends DeesElement {
|
||||||
|
// STATIC
|
||||||
|
public static demo = () => html`
|
||||||
|
<dees-mobilenavigation
|
||||||
|
.menuItems="${[
|
||||||
|
{
|
||||||
|
name: 'hello1',
|
||||||
|
action: async () => {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'hello2',
|
||||||
|
action: async () => {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'hello3',
|
||||||
|
action: async () => {},
|
||||||
|
},
|
||||||
|
]}"
|
||||||
|
></dees-mobilenavigation>
|
||||||
|
`;
|
||||||
|
|
||||||
|
private static singletonRef: DeesMobilenavigation;
|
||||||
|
public static async createAndInit(menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
|
||||||
|
if (!this.singletonRef) {
|
||||||
|
this.singletonRef = new DeesMobilenavigation();
|
||||||
|
document.body.append(this.singletonRef);
|
||||||
|
await this.singletonRef.init();
|
||||||
|
}
|
||||||
|
this.singletonRef.menuItems = menuItemsArg;
|
||||||
|
await this.singletonRef.readyDeferred.promise;
|
||||||
|
this.singletonRef.show();
|
||||||
|
return this.singletonRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
// INSTANCE
|
||||||
|
@property({
|
||||||
|
type: Array,
|
||||||
|
})
|
||||||
|
public heading: string = `MENU`;
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Array,
|
||||||
|
})
|
||||||
|
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||||
|
|
||||||
|
readyDeferred = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
/* this.init().then(() => {
|
||||||
|
this.show();
|
||||||
|
}); */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inits the mobile navigation
|
||||||
|
*/
|
||||||
|
public async init() {
|
||||||
|
await this.updateComplete;
|
||||||
|
this.readyDeferred.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
||||||
|
will-change: transform;
|
||||||
|
position: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
min-width: 280px;
|
||||||
|
transform: translateX(200px);
|
||||||
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
|
z-index: 250;
|
||||||
|
opacity: 0;
|
||||||
|
padding: 16px 32px;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
background: ${cssManager.bdTheme('#eeeeeb', '#000')};;
|
||||||
|
border-left: 1px dashed #444;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main.show {
|
||||||
|
pointer-events: all;
|
||||||
|
transform: translateX(0px);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuItem {
|
||||||
|
text-align: left;
|
||||||
|
padding: 8px;
|
||||||
|
margin-left: -8px;
|
||||||
|
margin-right: -8px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.menuItem:hover {
|
||||||
|
background: ${cssManager.bdTheme('#CCC', '#333')};;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 24px;
|
||||||
|
padding: 8px 0px;
|
||||||
|
font-family: 'Roboto';
|
||||||
|
font-weight: 300;
|
||||||
|
border-bottom: 1px dashed #444;
|
||||||
|
margin-top: 16px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
public render() {
|
||||||
|
return html`
|
||||||
|
<div class="main">
|
||||||
|
<div class="heading">${this.heading}</div>
|
||||||
|
${this.menuItems.map((menuItem) => {
|
||||||
|
return html`
|
||||||
|
<div
|
||||||
|
class="menuItem"
|
||||||
|
@click="${() => {
|
||||||
|
this.hide();
|
||||||
|
menuItem.action();
|
||||||
|
}}"
|
||||||
|
>
|
||||||
|
${menuItem.name}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
private windowLayer: DeesWindowLayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inits the show
|
||||||
|
*/
|
||||||
|
public async show() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
const main = this.shadowRoot.querySelector('.main');
|
||||||
|
if (!this.windowLayer) {
|
||||||
|
this.windowLayer = new DeesWindowLayer();
|
||||||
|
this.windowLayer.addEventListener('click', () => {
|
||||||
|
this.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
document.body.append(this.windowLayer);
|
||||||
|
await domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
this.windowLayer.show();
|
||||||
|
|
||||||
|
await domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
main.classList.add('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inits the hide function
|
||||||
|
*/
|
||||||
|
public async hide() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
const main = this.shadowRoot.querySelector('.main');
|
||||||
|
main.classList.remove('show');
|
||||||
|
this.windowLayer.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
async disconnectedCallback() {
|
||||||
|
document.body.removeChild(this.windowLayer);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
import { DeesElement, property, html, customElement, domtools } from '@designestate/dees-element';
|
import { DeesElement, property, html, customElement, domtools, TemplateResult } from '@designestate/dees-element';
|
||||||
import { TemplateResult } from 'lit-html';
|
|
||||||
|
|
||||||
import { Deferred } from '@pushrocks/smartpromise';
|
import { Deferred } from '@pushrocks/smartpromise';
|
||||||
|
|
||||||
|
0
ts_web/elements/dees-preview.ts
Normal file
0
ts_web/elements/dees-preview.ts
Normal file
@ -17,6 +17,13 @@ declare global {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IDataAction<T = any> {
|
||||||
|
name: string;
|
||||||
|
iconName: string;
|
||||||
|
useTableBehaviour?: 'upload' | 'cancelUpload' | 'none';
|
||||||
|
actionFunc: (itemArg: T) => Promise<any>;
|
||||||
|
}
|
||||||
|
|
||||||
@customElement('dees-table')
|
@customElement('dees-table')
|
||||||
export class DeesTable<T> extends DeesElement {
|
export class DeesTable<T> extends DeesElement {
|
||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
@ -61,8 +68,15 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
description: 'Office-Supplies - STAPLES BREMEN',
|
description: 'Office-Supplies - STAPLES BREMEN',
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>This is a slotted Text</dees-table
|
.dataActions="${[{
|
||||||
>
|
name: 'upload',
|
||||||
|
iconName: 'upload',
|
||||||
|
useTableBehaviour: 'upload',
|
||||||
|
actionFunc: async (itemArg: any) => {
|
||||||
|
|
||||||
|
},
|
||||||
|
}] as IDataAction[]}"
|
||||||
|
>This is a slotted Text</dees-table>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -81,6 +95,11 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
})
|
})
|
||||||
public data: T[] = [];
|
public data: T[] = [];
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: Array,
|
||||||
|
})
|
||||||
|
public dataActions: IDataAction[] = [];
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Object,
|
type: Object,
|
||||||
})
|
})
|
||||||
@ -113,7 +132,8 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: 0px 0px 5px rgba(0,0,0,0.3);
|
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
||||||
|
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
.headingSeparation {
|
.headingSeparation {
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
@ -177,6 +197,21 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action {
|
||||||
|
margin: -8px 0px;
|
||||||
|
padding: 8px;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action:first-child {
|
||||||
|
margin-left: -8px;
|
||||||
|
width: min-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action:hover {
|
||||||
|
background: ${cssManager.bdTheme('#CCC', '#111')};
|
||||||
|
}
|
||||||
|
|
||||||
.tableStatistics {
|
.tableStatistics {
|
||||||
padding: 4px 16px;
|
padding: 4px 16px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -212,6 +247,15 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
</th>
|
</th>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
|
${(() => {
|
||||||
|
if (this.dataActions) {
|
||||||
|
return html`
|
||||||
|
<th>
|
||||||
|
<div class="innerCellContainer">Actions</div>
|
||||||
|
</th>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
})()}
|
||||||
</tr>
|
</tr>
|
||||||
${this.data.map(
|
${this.data.map(
|
||||||
(itemArg) => html`
|
(itemArg) => html`
|
||||||
@ -219,6 +263,21 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
@click=${() => {
|
@click=${() => {
|
||||||
this.selectedDataRow = itemArg;
|
this.selectedDataRow = itemArg;
|
||||||
}}
|
}}
|
||||||
|
@dragenter=${async (eventArg) => {
|
||||||
|
console.log('hey');
|
||||||
|
eventArg.preventDefault();
|
||||||
|
eventArg.stopPropagation();
|
||||||
|
}}
|
||||||
|
@dragover=${async (eventArg) => {
|
||||||
|
console.log('hey');
|
||||||
|
eventArg.preventDefault();
|
||||||
|
eventArg.stopPropagation();
|
||||||
|
}}
|
||||||
|
@drop=${async (eventArg) => {
|
||||||
|
console.log('hey');
|
||||||
|
eventArg.preventDefault();
|
||||||
|
eventArg.stopPropagation();
|
||||||
|
}}
|
||||||
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
|
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
|
||||||
>
|
>
|
||||||
${headings.map(
|
${headings.map(
|
||||||
@ -228,6 +287,25 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
</td>
|
</td>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
|
${(() => {
|
||||||
|
if (this.dataActions) {
|
||||||
|
return html`
|
||||||
|
<td>
|
||||||
|
<div class="innerCellContainer">
|
||||||
|
${(() => {
|
||||||
|
const actions: TemplateResult[] = [];
|
||||||
|
for (const action of this.dataActions) {
|
||||||
|
actions.push(html`<div class="action">${action.iconName ? html`
|
||||||
|
<dees-icon .iconName=${'upload_file'}></dees-icon>
|
||||||
|
` : action.name}</div>`)
|
||||||
|
}
|
||||||
|
return actions;
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
})()}
|
||||||
</tr>
|
</tr>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
@ -237,7 +315,9 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
: html` <div class="noDataSet">No data set!</div> `}
|
: html` <div class="noDataSet">No data set!</div> `}
|
||||||
<div class="tableStatistics">
|
<div class="tableStatistics">
|
||||||
${this.data.length} data rows (total) |
|
${this.data.length} data rows (total) |
|
||||||
${this.selectedDataRow ? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected` : html`No row selected`}
|
${this.selectedDataRow
|
||||||
|
? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected`
|
||||||
|
: html`No row selected`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -42,6 +42,7 @@ export class DeesWindowLayer extends DeesElement {
|
|||||||
background: rgba(0, 0, 0, 0.0);
|
background: rgba(0, 0, 0, 0.0);
|
||||||
backdrop-filter: brightness(1);
|
backdrop-filter: brightness(1);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
z-index: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
.visible {
|
.visible {
|
||||||
@ -63,10 +64,22 @@ export class DeesWindowLayer extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dispatchClicked() {
|
dispatchClicked() {
|
||||||
this.dispatchEvent(new CustomEvent('clicked'))
|
this.dispatchEvent(new CustomEvent('clicked'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleVisibility () {
|
public toggleVisibility () {
|
||||||
this.visible = !this.visible;
|
this.visible = !this.visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async show() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
await domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
this.visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async hide() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
await domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ export * from './dees-input-fileupload.js';
|
|||||||
export * from './dees-input-quantityselector.js';
|
export * from './dees-input-quantityselector.js';
|
||||||
export * from './dees-input-radio.js';
|
export * from './dees-input-radio.js';
|
||||||
export * from './dees-input-text.js';
|
export * from './dees-input-text.js';
|
||||||
|
export * from './dees-mobilenavigation.js';
|
||||||
export * from './dees-pdf.js';
|
export * from './dees-pdf.js';
|
||||||
export * from './dees-speechbubble.js';
|
export * from './dees-speechbubble.js';
|
||||||
export * from './dees-spinner.js';
|
export * from './dees-spinner.js';
|
||||||
|
5
ts_web/elements/plugins.ts
Normal file
5
ts_web/elements/plugins.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
|
export {
|
||||||
|
tsclass
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"target": "ES2020",
|
"useDefineForClassFields": false,
|
||||||
"module": "ES2020",
|
"target": "ES2022",
|
||||||
"moduleResolution": "Node12"
|
"module": "ES2022",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"esModuleInterop": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
|
Reference in New Issue
Block a user