@design.estate/dees-catalog 1.0.201 → 1.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +3 -3
- package/dist_bundle/bundle.js.map +3 -3
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/dees-table.d.ts +1 -1
- package/dist_ts_web/elements/dees-table.demo.js +10 -1
- package/dist_ts_web/elements/dees-table.js +7 -2
- package/dist_watch/bundle.js +23 -2
- package/dist_watch/bundle.js.map +2 -2
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-table.demo.ts +9 -0
- package/ts_web/elements/dees-table.ts +6 -2
package/package.json
CHANGED
|
@@ -106,6 +106,15 @@ export const demoFunc = () => html`
|
|
|
106
106
|
return null;
|
|
107
107
|
},
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
name: 'preview',
|
|
111
|
+
type: ['doubleClick', 'contextmenu'],
|
|
112
|
+
iconName: 'eye',
|
|
113
|
+
actionFunc: async (itemArg) => {
|
|
114
|
+
alert(itemArg.amount);
|
|
115
|
+
return null;
|
|
116
|
+
},
|
|
117
|
+
}
|
|
109
118
|
] as (ITableAction<ITableDemoData>)[] as any}"
|
|
110
119
|
.displayFunction=${(itemArg) => {
|
|
111
120
|
return {
|
|
@@ -37,7 +37,7 @@ export interface ITableAction<T = any> {
|
|
|
37
37
|
/**
|
|
38
38
|
* the type of the action
|
|
39
39
|
*/
|
|
40
|
-
type: ('inRow' | 'contextmenu' | 'footer' | 'header' | 'preview' | 'keyCombination')[];
|
|
40
|
+
type: ('inRow' | 'contextmenu' | 'doubleClick' | 'footer' | 'header' | 'preview' | 'keyCombination')[];
|
|
41
41
|
/**
|
|
42
42
|
* allows to check if the action is relevant for the given item
|
|
43
43
|
* @param itemArg
|
|
@@ -399,7 +399,11 @@ export class DeesTable<T> extends DeesElement {
|
|
|
399
399
|
>
|
|
400
400
|
${headings.map(
|
|
401
401
|
(headingArg) => html`
|
|
402
|
-
<td
|
|
402
|
+
<td @dblclick=${() => {
|
|
403
|
+
const wantedAction = this.dataActions.find((actionArg) => actionArg.type.includes('doubleClick'));
|
|
404
|
+
if (!wantedAction) return;
|
|
405
|
+
wantedAction.actionFunc(itemArg);
|
|
406
|
+
}}>
|
|
403
407
|
<div class="innerCellContainer">${transformedItem[headingArg]}</div>
|
|
404
408
|
</td>
|
|
405
409
|
`
|