fix(core): update

This commit is contained in:
Philipp Kunz 2022-12-07 02:28:31 +01:00
parent 05b2b09395
commit cae421e140
5 changed files with 42 additions and 10 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@designestate/dees-catalog', name: '@designestate/dees-catalog',
version: '1.0.103', version: '1.0.104',
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

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

@ -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';
@ -74,12 +75,20 @@ export class DeesTable<T> extends DeesElement {
useTableBehaviour: 'upload', useTableBehaviour: 'upload',
actionFunc: async (itemArg: any) => { actionFunc: async (itemArg: any) => {
},
},{
name: 'visibility',
iconName: 'visibility',
useTableBehaviour: 'preview',
actionFunc: async (itemArg: any) => {
}, },
}] as IDataAction[]}" }] as IDataAction[]}"
>This is a slotted Text</dees-table> >This is a slotted Text</dees-table>
</div> </div>
`; `;
// INSTANCE
@property({ @property({
type: String, type: String,
}) })
@ -115,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();
} }
@ -201,6 +213,7 @@ export class DeesTable<T> extends DeesElement {
margin: -8px 0px; margin: -8px 0px;
padding: 8px; padding: 8px;
line-height: 16px; line-height: 16px;
display: inline-block;
} }
.action:first-child { .action:first-child {
@ -263,20 +276,37 @@ export class DeesTable<T> extends DeesElement {
@click=${() => { @click=${() => {
this.selectedDataRow = itemArg; this.selectedDataRow = itemArg;
}} }}
@dragenter=${async (eventArg) => { @dragenter=${async (eventArg: DragEvent) => {
console.log('hey'); console.log((eventArg.target as HTMLElement).tagName)
console.log('dragenter');
eventArg.preventDefault(); eventArg.preventDefault();
eventArg.stopPropagation(); eventArg.stopPropagation();
(eventArg.target as HTMLElement).parentElement.style.background = '#800000';
}} }}
@dragover=${async (eventArg) => { @dragleave=${async (eventArg: DragEvent) => {
console.log('hey'); console.log((eventArg.target as HTMLElement).tagName)
console.log('dragleave');
eventArg.preventDefault(); eventArg.preventDefault();
eventArg.stopPropagation(); eventArg.stopPropagation();
(eventArg.target as HTMLElement).parentElement.style.background = 'none';
}} }}
@drop=${async (eventArg) => { @dragover=${async (eventArg: DragEvent) => {
console.log('hey');
eventArg.preventDefault(); eventArg.preventDefault();
eventArg.stopPropagation(); }}
@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' : ''}"
> >