Compare commits

...

16 Commits

Author SHA1 Message Date
5f1b29f742 1.0.106 2022-12-11 17:24:13 +01:00
e7978a22e4 fix(core): update 2022-12-11 17:24:12 +01:00
15de86774b 1.0.105 2022-12-07 14:54:41 +01:00
8f57647c85 fix(core): update 2022-12-07 14:54:40 +01:00
59c5bcabd5 1.0.104 2022-12-07 02:28:31 +01:00
cae421e140 fix(core): update 2022-12-07 02:28:31 +01:00
05b2b09395 1.0.103 2022-12-06 14:07:12 +01:00
4dbd4f84c1 fix(core): update 2022-12-06 14:07:12 +01:00
bb0ca2f19d 1.0.102 2022-12-06 13:32:01 +01:00
55175f9ac7 fix(core): update 2022-12-06 13:32:00 +01:00
0be0f9fa34 1.0.101 2022-12-06 13:11:06 +01:00
7baab5d7ea fix(core): update 2022-12-06 13:11:06 +01:00
c3bdec176b 1.0.100 2022-08-18 02:15:41 +02:00
2a84e2c270 fix(core): update 2022-08-18 02:15:41 +02:00
c86f7d466c 1.0.99 2022-08-18 02:11:36 +02:00
9a6db7d882 fix(core): update 2022-08-18 02:11:35 +02:00
14 changed files with 4692 additions and 14847 deletions

14805
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-catalog", "name": "@designestate/dees-catalog",
"version": "1.0.98", "version": "1.0.106",
"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",
@ -17,17 +17,18 @@
"@designestate/dees-domtools": "^2.0.23", "@designestate/dees-domtools": "^2.0.23",
"@designestate/dees-element": "^2.0.16", "@designestate/dees-element": "^2.0.16",
"@designestate/dees-wcctools": "^1.0.74", "@designestate/dees-wcctools": "^1.0.74",
"@fortawesome/fontawesome-svg-core": "^6.1.2", "@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.1.2", "@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-regular-svg-icons": "^6.1.2", "@fortawesome/free-regular-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.1.2", "@fortawesome/free-solid-svg-icons": "^6.2.1",
"@tsclass/tsclass": "^4.0.19", "@pushrocks/smartpromise": "^3.1.7",
"@tsclass/tsclass": "^4.0.28",
"pdfjs-dist": "^2.15.349" "pdfjs-dist": "^2.15.349"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.65", "@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7", "@gitzone/tsbundle": "^2.0.7",
"@gitzone/tstest": "^1.0.73", "@gitzone/tstest": "^1.0.74",
"@gitzone/tswatch": "^2.0.5", "@gitzone/tswatch": "^2.0.5",
"@pushrocks/projectinfo": "^5.0.1", "@pushrocks/projectinfo": "^5.0.1",
"@pushrocks/tapbundle": "^5.0.4" "@pushrocks/tapbundle": "^5.0.4"

4440
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@designestate/dees-catalog', name: '@designestate/dees-catalog',
version: '1.0.98', version: '1.0.106',
description: 'website for lossless.com' description: 'website for lossless.com'
} }

View File

@ -84,7 +84,7 @@ export class DeesButton extends DeesElement {
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')}; box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')};
border: 1px solid ${cssManager.bdTheme('#eee', '#333')}; border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')}; border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
border-radius: 2px; border-radius: 4px;
line-height: 40px; line-height: 40px;
padding: 0px 8px; padding: 0px 8px;
min-width: 100px; min-width: 100px;

View File

@ -86,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;

View File

@ -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 = [
@ -66,8 +71,13 @@ export class DeesInputFileupload extends DeesElement {
margin-bottom: 24px; margin-bottom: 24px;
} }
.hidden {
display: none;
}
.maincontainer { .maincontainer {
color: ${cssManager.bdTheme('#333', '#ccc')}; color: ${cssManager.bdTheme('#333', '#ccc')};
} }
.label { .label {
@ -78,40 +88,74 @@ 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;
} }
`, `,
]; ];
public render(): TemplateResult { public render(): TemplateResult {
return html` return html`
<div class="hidden">
<input type="file"></div>
</div>
<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> ${this.value.map((fileArg) => html` <div class="uploadCandidate">${fileArg.name} | ${fileArg.size}</div> `)}
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}" @click=${this.openFileSelector}>
${this.buttonText}
</div>
</div> </div>
`; `;
} }
public async openFileSelector() {
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
inputFile.click();
}
public async updateValue(eventArg: Event) { public async updateValue(eventArg: Event) {
const target: any = eventArg.target; const target: any = eventArg.target;
this.value = target.value; this.value = target.value;
@ -125,15 +169,21 @@ export class DeesInputFileupload extends DeesElement {
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);

View File

@ -57,6 +57,7 @@ export class DeesInputQuantitySelector extends DeesElement {
min-width: 100px; min-width: 100px;
color: ${this.goBright ? '#666' : '#CCC'}; color: ${this.goBright ? '#666' : '#CCC'};
border: ${this.goBright ? '1px solid #333' : '1px solid #CCC'}; border: ${this.goBright ? '1px solid #333' : '1px solid #CCC'};
border-radius: 4px;
} }
.mainContainer:hover { .mainContainer:hover {

View File

@ -12,6 +12,26 @@ import { DeesWindowLayer } from './dees-windowlayer.js';
@customElement('dees-mobilenavigation') @customElement('dees-mobilenavigation')
export class DeesMobilenavigation extends DeesElement { 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; private static singletonRef: DeesMobilenavigation;
public static async createAndInit(menuItemsArg: plugins.tsclass.website.IMenuItem[]) { public static async createAndInit(menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
if (!this.singletonRef) { if (!this.singletonRef) {
@ -27,12 +47,24 @@ export class DeesMobilenavigation extends DeesElement {
// INSTANCE // INSTANCE
@property({ @property({
type: Object, type: Array,
})
public heading: string = `MENU`;
@property({
type: Array,
}) })
public menuItems: plugins.tsclass.website.IMenuItem[] = []; public menuItems: plugins.tsclass.website.IMenuItem[] = [];
readyDeferred = domtools.plugins.smartpromise.defer(); readyDeferred = domtools.plugins.smartpromise.defer();
constructor() {
super();
/* this.init().then(() => {
this.show();
}); */
}
/** /**
* inits the mobile navigation * inits the mobile navigation
*/ */
@ -52,16 +84,16 @@ export class DeesMobilenavigation extends DeesElement {
will-change: transform; will-change: transform;
position: fixed; position: fixed;
height: 100vh; height: 100vh;
min-width: 370px; min-width: 280px;
transform: translateX(200px); transform: translateX(200px);
color: #fff; color: ${cssManager.bdTheme('#333', '#fff')};
z-index: 250; z-index: 250;
opacity: 0; opacity: 0;
padding: 16px; padding: 16px 32px;
right: 0px; right: 0px;
top: 0px; top: 0px;
bottom: 0px; bottom: 0px;
background: #000; background: ${cssManager.bdTheme('#eeeeeb', '#000')};;
border-left: 1px dashed #444; border-left: 1px dashed #444;
pointer-events: none; pointer-events: none;
} }
@ -73,13 +105,26 @@ export class DeesMobilenavigation extends DeesElement {
} }
.menuItem { .menuItem {
text-align: center; text-align: left;
padding: 8px; padding: 8px;
margin-left: -8px;
margin-right: -8px;
cursor: pointer; cursor: pointer;
border-radius: 3px; border-radius: 3px;
} }
.menuItem:hover { .menuItem:hover {
background: #333; 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;
} }
`, `,
]; ];
@ -87,6 +132,7 @@ export class DeesMobilenavigation extends DeesElement {
public render() { public render() {
return html` return html`
<div class="main"> <div class="main">
<div class="heading">${this.heading}</div>
${this.menuItems.map((menuItem) => { ${this.menuItems.map((menuItem) => {
return html` return html`
<div <div

View File

@ -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';

View File

View File

@ -134,7 +134,7 @@ export class DeesSpeechbubble extends DeesElement {
return html` return html`
<div class="maincontainer" @click=${this.handleClick}> <div class="maincontainer" @click=${this.handleClick}>
<div class="arrow"></div> <div class="arrow"></div>
<div class="speechbubble"><span class="wave">👋</span> Hey! We are consulting.</div> <div class="speechbubble"><span class="wave">👋</span> Hey! We are API-driven.</div>
</div> </div>
`; `;
} }
@ -144,7 +144,7 @@ export class DeesSpeechbubble extends DeesElement {
return; return;
} }
globalThis.location.href = "https://lossless.consulting" globalThis.location.href = "https://api.global"
} }
public async firstUpdated() { public async firstUpdated() {

View File

@ -229,7 +229,8 @@ export class DeesStepper extends DeesElement {
{ {
vertical: true, vertical: true,
horizontal: false, horizontal: false,
easing: 'easeInOutQuint', easing: 'easeInOutExpo',
duration: 700,
}, },
stepperContainer stepperContainer
); );

View File

@ -7,6 +7,7 @@ import {
cssManager, cssManager,
css, css,
unsafeCSS, unsafeCSS,
state,
} from '@designestate/dees-element'; } from '@designestate/dees-element';
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';
@ -17,6 +18,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,11 +69,26 @@ 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) => {
},
},{
name: 'visibility',
iconName: 'visibility',
useTableBehaviour: 'preview',
actionFunc: async (itemArg: any) => {
},
}] as IDataAction[]}"
>This is a slotted Text</dees-table>
</div> </div>
`; `;
// INSTANCE
@property({ @property({
type: String, type: String,
}) })
@ -81,6 +104,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,
}) })
@ -96,6 +124,9 @@ export class DeesTable<T> extends DeesElement {
}) })
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal'; public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
public files: File[] = [];
public fileWeakMap = new WeakMap();
constructor() { constructor() {
super(); super();
} }
@ -178,6 +209,22 @@ export class DeesTable<T> extends DeesElement {
border-right: none; border-right: none;
} }
.action {
margin: -8px 0px;
padding: 8px;
line-height: 16px;
display: inline-block;
}
.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;
@ -213,6 +260,15 @@ export class DeesTable<T> extends DeesElement {
</th> </th>
` `
)} )}
${(() => {
if (this.dataActions && this.dataActions.length > 0) {
return html`
<th>
<div class="innerCellContainer">Actions</div>
</th>
`;
}
})()}
</tr> </tr>
${this.data.map( ${this.data.map(
(itemArg) => html` (itemArg) => html`
@ -220,6 +276,38 @@ export class DeesTable<T> extends DeesElement {
@click=${() => { @click=${() => {
this.selectedDataRow = itemArg; this.selectedDataRow = itemArg;
}} }}
@dragenter=${async (eventArg: DragEvent) => {
console.log((eventArg.target as HTMLElement).tagName)
console.log('dragenter');
eventArg.preventDefault();
eventArg.stopPropagation();
(eventArg.target as HTMLElement).parentElement.style.background = '#800000';
}}
@dragleave=${async (eventArg: DragEvent) => {
console.log((eventArg.target as HTMLElement).tagName)
console.log('dragleave');
eventArg.preventDefault();
eventArg.stopPropagation();
(eventArg.target as HTMLElement).parentElement.style.background = 'none';
}}
@dragover=${async (eventArg: DragEvent) => {
eventArg.preventDefault();
}}
@drop=${async (eventArg: DragEvent) => {
eventArg.preventDefault();
const newFiles = []
for (const file of Array.from(eventArg.dataTransfer.files)) {
this.files.push(file);
newFiles.push(file);
this.requestUpdate();
}
const result: File[] = this.fileWeakMap.get(itemArg as object);
if (!result) {
this.fileWeakMap.set(itemArg as object, newFiles)
} else {
result.push(...newFiles);
}
}}
class="${itemArg === this.selectedDataRow ? 'selected' : ''}" class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
> >
${headings.map( ${headings.map(
@ -229,6 +317,25 @@ export class DeesTable<T> extends DeesElement {
</td> </td>
` `
)} )}
${(() => {
if (this.dataActions && this.dataActions.length > 0) {
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>
` `
)} )}
@ -238,7 +345,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>
`; `;