@design.estate/dees-catalog 1.0.200 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.200",
3
+ "version": "1.0.202",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.200',
6
+ version: '1.0.202',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -98,7 +98,7 @@ export const faIcons = {
98
98
  message: faMessageRegular,
99
99
  messageSolid: faMessageSolid,
100
100
  mugHot: faMugHotSolid,
101
- faMugHotSolid: faMugHotSolid,
101
+ mugHotSolid: faMugHotSolid,
102
102
  minus: faMinusSolid,
103
103
  minusSolid: faMinusSolid,
104
104
  paste: faPasteRegular,
@@ -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
  `