Compare commits

..

14 Commits

Author SHA1 Message Date
462df2b648 1.0.202 2023-09-15 17:27:36 +02:00
f64da93cf9 fix(core): update 2023-09-15 17:27:35 +02:00
a55db621ef 1.0.201 2023-09-14 19:46:10 +02:00
c033bdfc3b fix(core): update 2023-09-14 19:46:09 +02:00
2610e56ec1 1.0.200 2023-09-14 19:43:27 +02:00
08aa9e3fe4 fix(core): update 2023-09-14 19:43:26 +02:00
411ae7ee07 1.0.199 2023-09-13 21:14:06 +02:00
41700c1eb1 fix(core): update 2023-09-13 21:14:05 +02:00
8d7bac9793 1.0.198 2023-09-13 21:13:48 +02:00
0229eefa4d fix(core): update 2023-09-13 21:13:47 +02:00
61f646743a 1.0.197 2023-09-13 19:15:54 +02:00
e3babde7e8 fix(core): update 2023-09-13 19:15:53 +02:00
c389e43e93 1.0.196 2023-09-13 18:12:02 +02:00
1511db4eea fix(core): update 2023-09-13 18:12:01 +02:00
6 changed files with 39 additions and 11 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@design.estate/dees-catalog", "name": "@design.estate/dees-catalog",
"version": "1.0.195", "version": "1.0.202",
"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",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@design.estate/dees-catalog', name: '@design.estate/dees-catalog',
version: '1.0.195', version: '1.0.202',
description: 'website for lossless.com' description: 'website for lossless.com'
} }

View File

@ -42,6 +42,7 @@ import {
faCircleInfo as faCircleInfoSolid, faCircleInfo as faCircleInfoSolid,
faCircleCheck as faCircleCheckSolid, faCircleCheck as faCircleCheckSolid,
faCircleXmark as faCircleXmarkSolid, faCircleXmark as faCircleXmarkSolid,
faClockRotateLeft as faClockRotateLeftSolid,
faCopy as faCopySolid, faCopy as faCopySolid,
faDesktop as faDesktopSolid, faDesktop as faDesktopSolid,
faEye as faEyeSolid, faEye as faEyeSolid,
@ -82,6 +83,8 @@ export const faIcons = {
circleCheckSolid: faCircleCheckSolid, circleCheckSolid: faCircleCheckSolid,
circleXmark: faCircleXmarkRegular, circleXmark: faCircleXmarkRegular,
circleXmarkSolid: faCircleXmarkSolid, circleXmarkSolid: faCircleXmarkSolid,
clockRotateLeft: faClockRotateLeftSolid,
clockRotateLeftSolid: faClockRotateLeftSolid,
copy: faCopyRegular, copy: faCopyRegular,
copySolid: faCopySolid, copySolid: faCopySolid,
desktop: faDesktopSolid, desktop: faDesktopSolid,
@ -95,7 +98,7 @@ export const faIcons = {
message: faMessageRegular, message: faMessageRegular,
messageSolid: faMessageSolid, messageSolid: faMessageSolid,
mugHot: faMugHotSolid, mugHot: faMugHotSolid,
faMugHotSolid: faMugHotSolid, mugHotSolid: faMugHotSolid,
minus: faMinusSolid, minus: faMinusSolid,
minusSolid: faMinusSolid, minusSolid: faMinusSolid,
paste: faPasteRegular, paste: faPasteRegular,

View File

@ -86,7 +86,7 @@ export class DeesModal extends DeesElement {
} }
.modal { .modal {
will-change: transform; will-change: transform;
transform: translateY(10px); transform: translateY(0px) scale(0.95);
opacity: 0; opacity: 0;
width: 480px; width: 480px;
min-height: 120px; min-height: 120px;
@ -95,11 +95,17 @@ export class DeesModal extends DeesElement {
border: 1px solid #222; border: 1px solid #222;
transition: all 0.2s; transition: all 0.2s;
overflow: hidden; overflow: hidden;
box-shadow: 0px 2px 5px #00000080;
} }
.modal.show { .modal.show {
opacity: 1; opacity: 1;
transform: translateY(0px); transform: translateY(0px) scale(1);
}
.modal.show.predestroy {
opacity: 0;
transform: translateY(10px) scale(1);
} }
.modal .heading { .modal .heading {
@ -182,7 +188,7 @@ export class DeesModal extends DeesElement {
public async destroy() { public async destroy() {
const domtools = await this.domtoolsPromise; const domtools = await this.domtoolsPromise;
const modal = this.shadowRoot.querySelector('.modal'); const modal = this.shadowRoot.querySelector('.modal');
modal.classList.remove('show'); modal.classList.add('predestroy');
await domtools.convenience.smartdelay.delayFor(200); await domtools.convenience.smartdelay.delayFor(200);
document.body.removeChild(this); document.body.removeChild(this);
await this.windowLayer.destroy(); await this.windowLayer.destroy();

View File

@ -2,6 +2,12 @@ import { type ITableAction } from './dees-table.js';
import * as plugins from './plugins.js'; import * as plugins from './plugins.js';
import { html } from '@design.estate/dees-element'; import { html } from '@design.estate/dees-element';
interface ITableDemoData {
date: string;
amount: string;
description: string;
}
export const demoFunc = () => html` export const demoFunc = () => html`
<style> <style>
.demoWrapper { .demoWrapper {
@ -51,7 +57,7 @@ export const demoFunc = () => html`
iconName: 'bell', iconName: 'bell',
useTableBehaviour: 'upload', useTableBehaviour: 'upload',
type: ['inRow'], type: ['inRow'],
actionFunc: async (itemArg: any) => { actionFunc: async (itemArg) => {
alert(itemArg.amount); alert(itemArg.amount);
}, },
}, },
@ -100,7 +106,16 @@ export const demoFunc = () => html`
return null; return null;
}, },
}, },
] as ITableAction[]}" {
name: 'preview',
type: ['doubleClick', 'contextmenu'],
iconName: 'eye',
actionFunc: async (itemArg) => {
alert(itemArg.amount);
return null;
},
}
] as (ITableAction<ITableDemoData>)[] as any}"
.displayFunction=${(itemArg) => { .displayFunction=${(itemArg) => {
return { return {
...itemArg, ...itemArg,

View File

@ -37,7 +37,7 @@ export interface ITableAction<T = any> {
/** /**
* the type of the action * the type of the action
*/ */
type: ('inRow' | 'contextmenu' | 'footer' | 'header' | 'preview' | 'keyCombination')[]; type: ('inRow' | 'contextmenu' | 'doubleClick' | 'footer' | 'header' | 'preview' | 'keyCombination')[];
/** /**
* allows to check if the action is relevant for the given item * allows to check if the action is relevant for the given item
* @param itemArg * @param itemArg
@ -84,7 +84,7 @@ export class DeesTable<T> extends DeesElement {
@property({ @property({
type: Array, type: Array,
}) })
public dataActions: ITableAction[] = []; public dataActions: ITableAction<T>[] = [];
@property({ @property({
attribute: false, attribute: false,
@ -399,7 +399,11 @@ export class DeesTable<T> extends DeesElement {
> >
${headings.map( ${headings.map(
(headingArg) => html` (headingArg) => html`
<td> <td @dblclick=${() => {
const wantedAction = this.dataActions.find((actionArg) => actionArg.type.includes('doubleClick'));
if (!wantedAction) return;
wantedAction.actionFunc(itemArg);
}}>
<div class="innerCellContainer">${transformedItem[headingArg]}</div> <div class="innerCellContainer">${transformedItem[headingArg]}</div>
</td> </td>
` `