Compare commits

...

6 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
5 changed files with 21 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@design.estate/dees-catalog",
"version": "1.0.199",
"version": "1.0.202",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

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

View File

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

View File

@ -106,6 +106,15 @@ export const demoFunc = () => html`
return null;
},
},
{
name: 'preview',
type: ['doubleClick', 'contextmenu'],
iconName: 'eye',
actionFunc: async (itemArg) => {
alert(itemArg.amount);
return null;
},
}
] as (ITableAction<ITableDemoData>)[] as any}"
.displayFunction=${(itemArg) => {
return {

View File

@ -37,7 +37,7 @@ export interface ITableAction<T = any> {
/**
* 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
* @param itemArg
@ -399,7 +399,11 @@ export class DeesTable<T> extends DeesElement {
>
${headings.map(
(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>
</td>
`