Compare commits

...

10 Commits

Author SHA1 Message Date
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
b69b1179a1 1.0.98 2022-08-17 19:56:22 +02:00
0df9fe750c fix(core): update 2022-08-17 19:56:22 +02:00
0d05bfa5ff 1.0.97 2022-08-17 19:28:12 +02:00
4dc9e04c2e fix(core): update 2022-08-17 19:28:11 +02:00
9 changed files with 4631 additions and 14846 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",
"version": "1.0.96",
"version": "1.0.101",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",
@ -17,17 +17,18 @@
"@designestate/dees-domtools": "^2.0.23",
"@designestate/dees-element": "^2.0.16",
"@designestate/dees-wcctools": "^1.0.74",
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-brands-svg-icons": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
"@tsclass/tsclass": "^4.0.19",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-regular-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@pushrocks/smartpromise": "^3.1.7",
"@tsclass/tsclass": "^4.0.28",
"pdfjs-dist": "^2.15.349"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7",
"@gitzone/tstest": "^1.0.73",
"@gitzone/tstest": "^1.0.74",
"@gitzone/tswatch": "^2.0.5",
"@pushrocks/projectinfo": "^5.0.1",
"@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 = {
name: '@designestate/dees-catalog',
version: '1.0.96',
version: '1.0.101',
description: 'website for lossless.com'
}

View File

@ -48,12 +48,17 @@ export class DeesInputFileupload extends DeesElement {
public required: boolean = false;
@property({
type: Boolean
type: Boolean,
})
public disabled: boolean = false;
@property({
type: String,
})
public buttonText: string = 'Upload File...';
constructor() {
super()
super();
}
public static styles = [
@ -78,27 +83,38 @@ export class DeesInputFileupload extends DeesElement {
.uploadButton {
position: relative;
cursor: pointer;
padding: 20px 20px;
max-width: 200px;
padding: 8px;
max-width: 600px;
background: ${cssManager.bdTheme('#fafafa', '#333333')};
border-radius: 3px;
text-align: center;
}
.uploadButton::after {
top: 7px;
right: 7px;
left: 7px;
bottom: 7px;
transform: scale3d(0.9, 0.9, 1);
top: 2px;
right: 2px;
left: 2px;
bottom: 2px;
transform: scale3d(0.98, 0.9, 1);
position: absolute;
content: '';
display: block;
border: 4px dashed rgba(255, 255, 255, 0);
border: 2px dashed rgba(255, 255, 255, 0);
transition: all 0.2s;
}
.uploadButton.dragOver::after {
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: #fff;
padding: 8px;
font-family: 'Roboto Mono';
}
.uploadCandidate:last-child {
margin-bottom: 8px;
}
`,
];
@ -107,7 +123,10 @@ export class DeesInputFileupload extends DeesElement {
return html`
<div class="maincontainer">
${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>
`;
}
@ -122,18 +141,24 @@ export class DeesInputFileupload extends DeesElement {
const dropArea = this.shadowRoot.querySelector('.uploadButton');
const handlerFunction = (eventArg: DragEvent) => {
eventArg.preventDefault();
switch(eventArg.type) {
switch (eventArg.type) {
case 'dragover':
this.state = 'dragOver';
this.buttonText = 'release to upload file...';
break;
case 'dragleave':
this.state = 'idle';
this.buttonText = 'Upload File...';
break;
case 'drop':
this.state = 'idle';
this.buttonText = 'Upload more files...';
}
console.log(eventArg);
for (const file of Array.from(eventArg.dataTransfer.files)) {
this.value.push(file);
};
this.requestUpdate();
}
console.log(`Got ${this.value.length} files!`);
};
dropArea.addEventListener('dragenter', handlerFunction, false);

View File

@ -10,12 +10,32 @@ import {
} from '@designestate/dees-element';
import { DeesWindowLayer } from './dees-windowlayer.js';
@customElement('lele-mobilenavigation')
export class LeleMobilenavigation extends DeesElement {
private static singletonRef: LeleMobilenavigation;
@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 LeleMobilenavigation();
this.singletonRef = new DeesMobilenavigation();
document.body.append(this.singletonRef);
await this.singletonRef.init();
}
@ -27,12 +47,24 @@ export class LeleMobilenavigation extends DeesElement {
// INSTANCE
@property({
type: Object,
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
*/
@ -52,14 +84,16 @@ export class LeleMobilenavigation extends DeesElement {
will-change: transform;
position: fixed;
height: 100vh;
min-width: 370px;
min-width: 280px;
transform: translateX(200px);
color: #fff;
z-index: 100;
color: ${cssManager.bdTheme('#333', '#fff')};
z-index: 250;
opacity: 0;
padding: 16px;
padding: 16px 32px;
right: 0px;
background: #000;
top: 0px;
bottom: 0px;
background: ${cssManager.bdTheme('#eeeeeb', '#000')};;
border-left: 1px dashed #444;
pointer-events: none;
}
@ -71,13 +105,26 @@ export class LeleMobilenavigation extends DeesElement {
}
.menuItem {
text-align: center;
text-align: left;
padding: 8px;
margin-left: -8px;
margin-right: -8px;
cursor: pointer;
border-radius: 3px;
}
.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;
}
`,
];
@ -85,6 +132,7 @@ export class LeleMobilenavigation extends DeesElement {
public render() {
return html`
<div class="main">
<div class="heading">${this.heading}</div>
${this.menuItems.map((menuItem) => {
return html`
<div
@ -134,7 +182,7 @@ export class LeleMobilenavigation extends DeesElement {
this.windowLayer.hide();
}
async disconnectedCallback () {
async disconnectedCallback() {
document.body.removeChild(this.windowLayer);
}
}

View File

@ -1,5 +1,4 @@
import { DeesElement, property, html, customElement, domtools } from '@designestate/dees-element';
import { TemplateResult } from 'lit-html';
import { DeesElement, property, html, customElement, domtools, TemplateResult } from '@designestate/dees-element';
import { Deferred } from '@pushrocks/smartpromise';

View File

@ -17,6 +17,13 @@ declare global {
}
}
export interface IDataAction<T = any> {
name: string;
icon: string;
useTableBehaviour?: 'upload' | 'cancelUpload' | 'none';
actionFunc: (itemArg: T) => Promise<any>;
}
@customElement('dees-table')
export class DeesTable<T> extends DeesElement {
public static demo = () => html`
@ -61,8 +68,15 @@ export class DeesTable<T> extends DeesElement {
description: 'Office-Supplies - STAPLES BREMEN',
},
]}
>This is a slotted Text</dees-table
>
.dataActions="${[{
name: 'upload',
icon: 'upload',
useTableBehaviour: 'upload',
actionFunc: async (itemArg: any) => {
},
}] as IDataAction[]}"
>This is a slotted Text</dees-table>
</div>
`;
@ -81,6 +95,11 @@ export class DeesTable<T> extends DeesElement {
})
public data: T[] = [];
@property({
type: Array,
})
public dataActions: IDataAction[] = [];
@property({
type: Object,
})
@ -114,7 +133,7 @@ export class DeesTable<T> extends DeesElement {
background: ${cssManager.bdTheme('#fafafa', '#333333')};
border-radius: 3px;
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
box-shadow: 0px 0px 5px rgba(0,0,0,0.3);
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
}
.headingSeparation {
margin-top: 7px;
@ -178,6 +197,20 @@ export class DeesTable<T> extends DeesElement {
border-right: none;
}
.action {
margin: -8px 0px;
padding: 8px;
}
.action:first-child {
margin-left: -8px;
width: min-content;
}
.action:hover {
background: #111;
}
.tableStatistics {
padding: 4px 16px;
font-size: 12px;
@ -213,6 +246,15 @@ export class DeesTable<T> extends DeesElement {
</th>
`
)}
${(() => {
if (this.dataActions) {
return html`
<th>
<div class="innerCellContainer">Actions</div>
</th>
`;
}
})()}
</tr>
${this.data.map(
(itemArg) => html`
@ -220,6 +262,21 @@ export class DeesTable<T> extends DeesElement {
@click=${() => {
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' : ''}"
>
${headings.map(
@ -229,6 +286,23 @@ export class DeesTable<T> extends DeesElement {
</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.name}</div>`)
}
return actions;
})()}
</div>
</td>
`;
}
})()}
</tr>
`
)}
@ -238,7 +312,9 @@ export class DeesTable<T> extends DeesElement {
: html` <div class="noDataSet">No data set!</div> `}
<div class="tableStatistics">
${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>
`;

View File

@ -42,6 +42,7 @@ export class DeesWindowLayer extends DeesElement {
background: rgba(0, 0, 0, 0.0);
backdrop-filter: brightness(1);
pointer-events: none;
z-index: 200;
}
.visible {