@sme.up/ketchup 5.2.1-SNAPSHOT → 6.1.0-SNAPSHOT

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.
Files changed (195) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/{cell-utils-d96b2993.js → cell-utils-a78d6fac.js} +2 -2
  3. package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
  4. package/dist/cjs/{f-button-2b9b99b1.js → f-button-ac179257.js} +1 -1
  5. package/dist/cjs/{f-cell-8351cb84.js → f-cell-69294bca.js} +37 -37
  6. package/dist/cjs/{f-chip-df59e1b0.js → f-chip-b00897d7.js} +4 -3
  7. package/dist/cjs/{f-image-12bab3b5.js → f-image-89f25556.js} +1 -1
  8. package/dist/cjs/f-paginator-utils-8fa501b3.js +1898 -0
  9. package/dist/cjs/{f-text-field-e7c35b5b.js → f-text-field-e1e45ade.js} +1 -1
  10. package/dist/cjs/{f-text-field-mdc-a67f5dfe.js → f-text-field-mdc-85997738.js} +23 -305
  11. package/dist/cjs/ketchup.cjs.js +2 -2
  12. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  13. package/dist/cjs/{kup-autocomplete_27.cjs.entry.js → kup-autocomplete_25.cjs.entry.js} +1493 -5418
  14. package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17101 -14787
  15. package/dist/cjs/kup-calendar.cjs.entry.js +41 -33
  16. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  17. package/dist/cjs/kup-dash-list.cjs.entry.js +3 -3
  18. package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-drawer.cjs.entry.js +11 -4
  20. package/dist/cjs/kup-field.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
  22. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-image-list.cjs.entry.js +228 -0
  24. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  26. package/dist/cjs/kup-manager-7a941909.js +16703 -0
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +4 -4
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -4
  30. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  33. package/dist/cjs/loader.cjs.js +2 -2
  34. package/dist/cjs/{utils-e99921c1.js → utils-6287d878.js} +1 -1
  35. package/dist/collection/assets/card.js +4 -5
  36. package/dist/collection/assets/data-table.js +0 -79
  37. package/dist/collection/assets/form-editor.js +338 -0
  38. package/dist/collection/assets/image-list.js +624 -0
  39. package/dist/collection/assets/index.js +8 -0
  40. package/dist/collection/assets/kupdata.js +0 -3
  41. package/dist/collection/assets/kuptooltip.js +53 -7
  42. package/dist/collection/assets/tree.js +0 -128
  43. package/dist/collection/collection-manifest.json +7 -6
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  45. package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
  46. package/dist/collection/components/kup-box/kup-box.js +7 -135
  47. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
  48. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
  49. package/dist/collection/components/kup-card/kup-card.css +26 -8
  50. package/dist/collection/components/kup-card/kup-card.js +1 -2
  51. package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
  52. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
  53. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
  54. package/dist/collection/components/kup-data-table/kup-data-table.js +19 -136
  55. package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
  56. package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
  57. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
  58. package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
  59. package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
  60. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -0
  61. package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
  62. package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
  63. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +3 -13
  64. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  65. package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
  66. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
  67. package/dist/collection/components/kup-time-picker/kup-time-picker.js +2 -2
  68. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
  69. package/dist/collection/components/kup-tree/kup-tree.css +10 -3
  70. package/dist/collection/components/kup-tree/kup-tree.js +65 -140
  71. package/dist/collection/f-components/f-cell/f-cell.js +7 -7
  72. package/dist/collection/f-components/f-chip/f-chip.js +2 -1
  73. package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
  74. package/dist/collection/managers/kup-data/kup-data.js +4 -1
  75. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
  76. package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
  77. package/dist/collection/managers/kup-language/kup-language-declarations.js +2 -0
  78. package/dist/collection/managers/kup-manager/kup-manager.js +21 -2
  79. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +5 -0
  80. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +53 -20
  81. package/dist/collection/types/GenericTypes.js +2 -0
  82. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +7 -11
  83. package/dist/esm/{cell-utils-f4bdbbc8.js → cell-utils-964da6b5.js} +3 -3
  84. package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
  85. package/dist/esm/{f-button-54a49fd8.js → f-button-871a544b.js} +1 -1
  86. package/dist/esm/{f-cell-d5dac50b.js → f-cell-521ef17a.js} +38 -38
  87. package/dist/esm/{f-chip-a3035b4b.js → f-chip-1dda722f.js} +5 -4
  88. package/dist/esm/{f-image-d32465e3.js → f-image-c468d8ae.js} +1 -1
  89. package/dist/esm/f-paginator-utils-7dff8ff0.js +1884 -0
  90. package/dist/esm/{f-text-field-c25cc63f.js → f-text-field-d6c61c73.js} +1 -1
  91. package/dist/esm/{f-text-field-mdc-9fbbefc3.js → f-text-field-mdc-d42d3f9e.js} +2 -284
  92. package/dist/esm/ketchup.js +2 -2
  93. package/dist/esm/kup-accordion.entry.js +5 -5
  94. package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1445 -5368
  95. package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17101 -14788
  96. package/dist/esm/kup-calendar.entry.js +42 -34
  97. package/dist/esm/kup-cell.entry.js +7 -7
  98. package/dist/esm/kup-dash-list.entry.js +3 -3
  99. package/dist/esm/kup-dash_2.entry.js +2 -2
  100. package/dist/esm/kup-drawer.entry.js +11 -4
  101. package/dist/esm/kup-field.entry.js +1 -1
  102. package/dist/esm/kup-form-editor.entry.js +400 -0
  103. package/dist/esm/kup-iframe.entry.js +2 -2
  104. package/dist/esm/kup-image-list.entry.js +224 -0
  105. package/dist/esm/kup-lazy.entry.js +2 -2
  106. package/dist/esm/kup-magic-box.entry.js +3 -3
  107. package/dist/esm/kup-manager-58b075b4.js +16686 -0
  108. package/dist/esm/kup-nav-bar.entry.js +2 -2
  109. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  110. package/dist/esm/kup-photo-frame.entry.js +4 -4
  111. package/dist/esm/kup-probe.entry.js +1 -1
  112. package/dist/esm/kup-qlik.entry.js +1 -1
  113. package/dist/esm/kup-snackbar.entry.js +5 -5
  114. package/dist/esm/loader.js +2 -2
  115. package/dist/esm/polyfills/css-shim.js +1 -1
  116. package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
  117. package/dist/esm/{utils-f24319a0.js → utils-d7e4b3c2.js} +2 -2
  118. package/dist/ketchup/ketchup.esm.js +1 -1
  119. package/dist/ketchup/{p-7a74ad17.js → p-1ae66cc5.js} +1 -1
  120. package/dist/ketchup/{p-e6709c26.entry.js → p-3c11e615.entry.js} +1 -1
  121. package/dist/ketchup/{p-669bde31.js → p-44ec4f03.js} +1 -1
  122. package/dist/ketchup/p-4ffbc3ff.js +1 -0
  123. package/dist/ketchup/p-5264a3e6.entry.js +1 -0
  124. package/dist/ketchup/{p-e8e3c9da.entry.js → p-65974e48.entry.js} +1 -1
  125. package/dist/ketchup/p-65b46587.entry.js +40 -0
  126. package/dist/ketchup/{p-09d708c4.entry.js → p-6dff70f8.entry.js} +1 -1
  127. package/dist/ketchup/{p-34748c91.js → p-7454cb92.js} +1 -1
  128. package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
  129. package/dist/ketchup/p-7eff4eee.js +1 -0
  130. package/dist/ketchup/p-80968627.entry.js +1 -0
  131. package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
  132. package/dist/ketchup/p-8cdf61a4.js +1 -0
  133. package/dist/ketchup/{p-8418e8fa.entry.js → p-954cc340.entry.js} +1 -1
  134. package/dist/ketchup/p-976244f9.entry.js +9 -0
  135. package/dist/ketchup/{p-4173422f.entry.js → p-99e0d768.entry.js} +1 -1
  136. package/dist/ketchup/{p-41741c28.entry.js → p-a0f6e25c.entry.js} +1 -1
  137. package/dist/ketchup/p-a203f78b.js +45 -0
  138. package/dist/ketchup/{p-9a61d8dc.entry.js → p-a615a92b.entry.js} +1 -1
  139. package/dist/ketchup/p-aca0e54b.js +30 -0
  140. package/dist/ketchup/p-b8939a8b.entry.js +1 -0
  141. package/dist/ketchup/p-bfc3bac7.js +1 -0
  142. package/dist/ketchup/p-c5ce8951.entry.js +1 -0
  143. package/dist/ketchup/{p-bb8844bf.entry.js → p-d2ee56dd.entry.js} +1 -1
  144. package/dist/ketchup/p-db71436b.entry.js +27 -0
  145. package/dist/ketchup/{p-40f97429.js → p-e0035c58.js} +1 -1
  146. package/dist/ketchup/p-e1039cf2.entry.js +1 -0
  147. package/dist/ketchup/{p-44192f30.entry.js → p-ea10176c.entry.js} +1 -1
  148. package/dist/ketchup/{p-67842f1e.entry.js → p-f09f2f98.entry.js} +1 -1
  149. package/dist/ketchup/{p-203d6295.entry.js → p-f71a1675.entry.js} +1 -1
  150. package/dist/ketchup/{p-11e72a8c.entry.js → p-fac1a08b.entry.js} +1 -1
  151. package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -5
  152. package/dist/types/components/kup-box/kup-box.d.ts +0 -22
  153. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -4
  154. package/dist/types/components/kup-data-table/kup-data-table.d.ts +1 -19
  155. package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
  156. package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
  157. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -0
  158. package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
  159. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
  160. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
  161. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -5
  162. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -24
  163. package/dist/types/components.d.ts +121 -231
  164. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
  165. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
  166. package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
  167. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +2 -0
  168. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +4 -0
  169. package/dist/types/managers/kup-manager/kup-manager.d.ts +12 -0
  170. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +3 -3
  171. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +17 -6
  172. package/dist/types/types/GenericTypes.d.ts +2 -0
  173. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
  174. package/package.json +15 -14
  175. package/dist/cjs/kup-manager-5c03da64.js +0 -8795
  176. package/dist/collection/assets/tooltip.js +0 -73
  177. package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
  178. package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
  179. package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
  180. package/dist/collection/utils/helpers.js +0 -38
  181. package/dist/esm/kup-manager-9316a184.js +0 -8778
  182. package/dist/ketchup/p-12773ca8.js +0 -9
  183. package/dist/ketchup/p-44f8da2a.js +0 -1
  184. package/dist/ketchup/p-4f56932b.js +0 -1
  185. package/dist/ketchup/p-7ba8fa4a.entry.js +0 -39
  186. package/dist/ketchup/p-7de0d7e1.js +0 -1
  187. package/dist/ketchup/p-96bf19aa.entry.js +0 -1
  188. package/dist/ketchup/p-b0ddcce9.entry.js +0 -9
  189. package/dist/ketchup/p-b6c21223.entry.js +0 -27
  190. package/dist/ketchup/p-c58a2a81.entry.js +0 -1
  191. package/dist/ketchup/p-ca3d585b.entry.js +0 -1
  192. package/dist/ketchup/p-ecb7069b.js +0 -135
  193. package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
  194. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
  195. package/dist/types/utils/helpers.d.ts +0 -4
@@ -0,0 +1,404 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-eb556444.js');
6
+ const fButton = require('./f-button-ac179257.js');
7
+ const kupManager = require('./kup-manager-7a941909.js');
8
+ const utils = require('./utils-6287d878.js');
9
+ const GenericVariables = require('./GenericVariables-a9ed17ee.js');
10
+ require('./f-button-declarations-b611587f.js');
11
+ require('./f-image-89f25556.js');
12
+
13
+ /**
14
+ * Props of the kup-form-editor component.
15
+ * Used to export every prop in an object.
16
+ */
17
+ var KupFormEditorProps;
18
+ (function (KupFormEditorProps) {
19
+ KupFormEditorProps["customStyle"] = "Custom style of the component.";
20
+ KupFormEditorProps["data"] = "The data of the component.";
21
+ })(KupFormEditorProps || (KupFormEditorProps = {}));
22
+ var KupFormEditorDragTypes;
23
+ (function (KupFormEditorDragTypes) {
24
+ KupFormEditorDragTypes["Components"] = "1";
25
+ KupFormEditorDragTypes["Sections"] = "2";
26
+ })(KupFormEditorDragTypes || (KupFormEditorDragTypes = {}));
27
+ var KupFormEditorLabels;
28
+ (function (KupFormEditorLabels) {
29
+ KupFormEditorLabels["Loaded"] = "Loaded";
30
+ KupFormEditorLabels["Reset"] = "Reset";
31
+ KupFormEditorLabels["Save"] = "Save";
32
+ KupFormEditorLabels["Components"] = "Components";
33
+ KupFormEditorLabels["Sections"] = "Sections";
34
+ KupFormEditorLabels["Column"] = "Column";
35
+ })(KupFormEditorLabels || (KupFormEditorLabels = {}));
36
+
37
+ const kupFormEditorCss = ":host{width:100%;height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;grid-gap:0.5em}.form-dropzone{padding:1em;border:1px solid var(--kup-primary-color)}.section{display:flex;flex-direction:column}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color);min-height:100px}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.component{height:fit-content;padding:1em;margin:0.5em}.component-draggable{border:1px solid var(--kup-secondary-color)}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";
38
+
39
+ const KupFormEditor = class {
40
+ constructor(hostRef) {
41
+ index.registerInstance(this, hostRef);
42
+ this.kupSave = index.createEvent(this, "kup-formeditor-save", 6);
43
+ /*-------------------------------------------------*/
44
+ /* S t a t e s */
45
+ /*-------------------------------------------------*/
46
+ /**
47
+ * Force render component by internal event.
48
+ */
49
+ this.resetInternalData = false;
50
+ /*-------------------------------------------------*/
51
+ /* P r o p s */
52
+ /*-------------------------------------------------*/
53
+ /**
54
+ * Custom style of the component.
55
+ * @default ""
56
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
57
+ */
58
+ this.customStyle = '';
59
+ /**
60
+ * The data of the component.
61
+ * @default false
62
+ */
63
+ this.data = null;
64
+ /*-------------------------------------------------*/
65
+ /* I n t e r n a l V a r i a b l e s */
66
+ /*-------------------------------------------------*/
67
+ /**
68
+ * Instance of the KupManager class.
69
+ */
70
+ this.kupManager = kupManager.kupManagerInstance();
71
+ /**
72
+ * Draggable type of Form (Components or Sections).
73
+ */
74
+ this.dragType = KupFormEditorDragTypes.Components;
75
+ /**
76
+ * Internal data of the component.
77
+ */
78
+ this.internalData = null;
79
+ /**
80
+ * Internal data backup of the component for refresh when changed content by drag&drop.
81
+ */
82
+ this.internalDataBackup = null;
83
+ }
84
+ onKupSave() {
85
+ this.kupSave.emit({
86
+ comp: this,
87
+ id: this.rootElement.id,
88
+ data: this.internalData,
89
+ });
90
+ }
91
+ /*-------------------------------------------------*/
92
+ /* W a t c h e r s */
93
+ /*-------------------------------------------------*/
94
+ dataChanged() {
95
+ this.resetData();
96
+ }
97
+ /*-------------------------------------------------*/
98
+ /* P u b l i c M e t h o d s */
99
+ /*-------------------------------------------------*/
100
+ /**
101
+ * Used to retrieve component's props values.
102
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
103
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
104
+ */
105
+ async getProps(descriptions) {
106
+ return utils.getProps(this, KupFormEditorProps, descriptions);
107
+ }
108
+ /**
109
+ * This method is used to trigger a new render of the component.
110
+ */
111
+ async refresh() {
112
+ index.forceUpdate(this);
113
+ }
114
+ /**
115
+ * Sets the props to the component.
116
+ * @param {GenericObject} props - Object containing props that will be set to the component.
117
+ */
118
+ async setProps(props) {
119
+ utils.setProps(this, KupFormEditorProps, props);
120
+ }
121
+ /*-------------------------------------------------*/
122
+ /* P r i v a t e M e t h o d s */
123
+ /*-------------------------------------------------*/
124
+ buildHeader() {
125
+ const clearButtonProp = {
126
+ icon: 'cancel',
127
+ label: KupFormEditorLabels.Reset,
128
+ secondary: true,
129
+ onClick: () => {
130
+ this.resetData();
131
+ },
132
+ };
133
+ const saveButtonProp = {
134
+ icon: 'save',
135
+ label: KupFormEditorLabels.Save,
136
+ onClick: () => this.onKupSave(),
137
+ };
138
+ const selRadioProp = [
139
+ {
140
+ label: KupFormEditorLabels.Components,
141
+ value: KupFormEditorDragTypes.Components,
142
+ checked: this.dragType == KupFormEditorDragTypes.Components,
143
+ },
144
+ {
145
+ label: KupFormEditorLabels.Sections,
146
+ value: KupFormEditorDragTypes.Sections,
147
+ checked: this.dragType == KupFormEditorDragTypes.Sections,
148
+ },
149
+ ];
150
+ return (index.h("div", { class: "header" }, index.h("kup-radio", { data: selRadioProp, "onKup-radio-change": (ev) => {
151
+ this.dragType = ev.detail
152
+ .value;
153
+ this.resetData(this.internalData);
154
+ } }), index.h(fButton.FButton, Object.assign({}, clearButtonProp)), index.h(fButton.FButton, Object.assign({}, saveButtonProp))));
155
+ }
156
+ buildForm(form, parent) {
157
+ const classes = {
158
+ form: true,
159
+ 'layout-column': form && form.layout == 'column',
160
+ 'layout-row': form && form.layout == 'row',
161
+ 'form-dropzone': form &&
162
+ this.dragType == KupFormEditorDragTypes.Sections &&
163
+ form.sections != null &&
164
+ form.sections.length > 0,
165
+ };
166
+ return form ? (index.h("div", { class: classes, ref: (el) => {
167
+ if (!el)
168
+ return;
169
+ const kel = el;
170
+ kel.kupData = { parent: parent, form: form };
171
+ } }, form.sections.map((section) => this.buildSection(section, form)))) : (index.h("div", null, this.kupManager.language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA)));
172
+ }
173
+ buildSectionHeader(section, parent) {
174
+ const addButtonProp = {
175
+ icon: 'add',
176
+ slim: true,
177
+ onClick: () => {
178
+ if (!section.sections) {
179
+ section.sections = [];
180
+ }
181
+ const newSec = {
182
+ id: section.id + (section.sections.length + 1),
183
+ loaded: section.loaded,
184
+ layout: section.layout,
185
+ components: [],
186
+ };
187
+ if (section.components) {
188
+ section.components.forEach((x) => newSec.components.push(x));
189
+ section.components.splice(0);
190
+ }
191
+ section.sections.push(newSec);
192
+ this.resetData(this.internalData);
193
+ },
194
+ };
195
+ const removeButtonProp = {
196
+ icon: 'remove',
197
+ slim: true,
198
+ secondary: true,
199
+ onClick: () => {
200
+ const idx = parent.sections.indexOf(section);
201
+ parent.sections.splice(idx, 1);
202
+ this.resetData(this.internalData);
203
+ },
204
+ };
205
+ return (index.h("div", { class: "section-header" }, index.h("div", null, section.id, ' ', section.dim ? '(' + section.dim + ')' : undefined, " -", ' ', section.layout), index.h("div", null, index.h("div", { class: "section-header-actions" }, index.h("kup-switch", { checked: section.loaded, label: KupFormEditorLabels.Loaded, "onKup-switch-change": (ev) => {
206
+ section.loaded = ev.detail.value == 'on';
207
+ } }), index.h("kup-switch", { checked: section.layout == 'column', label: KupFormEditorLabels.Column, "onKup-switch-change": (ev) => {
208
+ section.layout =
209
+ ev.detail.value == 'on' ? 'column' : 'row';
210
+ this.resetData(this.internalData);
211
+ } }), index.h(fButton.FButton, Object.assign({}, addButtonProp)), index.h(fButton.FButton, Object.assign({}, removeButtonProp)), section.components && section.components.length > 0 ? (index.h("kup-image", { resource: "widgets", sizeX: "24px", sizeY: "24px" })) : undefined))));
212
+ }
213
+ buildSection(section, parent) {
214
+ const classes = {
215
+ section: true,
216
+ 'section-draggable': this.dragType == KupFormEditorDragTypes.Sections,
217
+ 'section-dropzone': !section.sections ||
218
+ section.sections.length == 0 ||
219
+ this.dragType == KupFormEditorDragTypes.Sections,
220
+ };
221
+ const bodyClasses = {
222
+ 'section-body': true,
223
+ 'layout-column': section && section.layout == 'column',
224
+ 'layout-row': section && section.layout == 'row',
225
+ };
226
+ let bodyStyles = {};
227
+ if (section.sections) {
228
+ let gridTemplate = '';
229
+ section.sections.forEach((childSection) => {
230
+ if (!childSection.dim)
231
+ gridTemplate += ' 1fr';
232
+ else
233
+ gridTemplate +=
234
+ childSection.dim.indexOf('%') < 0
235
+ ? ' ' + childSection.dim + 'px'
236
+ : ' ' + childSection.dim;
237
+ });
238
+ if (section.layout == 'column')
239
+ bodyStyles['gridTemplateRows'] = gridTemplate;
240
+ if (section.layout == 'row')
241
+ bodyStyles['gridTemplateColumns'] = gridTemplate;
242
+ }
243
+ return (index.h("div", { class: classes, ref: (el) => {
244
+ if (!el)
245
+ return;
246
+ const kel = el;
247
+ kel.kupData = { parent: parent, section: section };
248
+ } }, this.dragType == KupFormEditorDragTypes.Sections
249
+ ? this.buildSectionHeader(section, parent)
250
+ : undefined, index.h("div", { class: bodyClasses, style: bodyStyles }, this.dragType == KupFormEditorDragTypes.Components &&
251
+ section.components
252
+ ? section.components.map((component) => component.type == 'SCH' ? (this.buildForm(component, section)) : (index.h("div", { class: "component component-draggable", ref: (el) => {
253
+ if (!el)
254
+ return;
255
+ const kel = el;
256
+ kel.kupData = {
257
+ section: section,
258
+ componnent: component,
259
+ };
260
+ } }, component.id, " - ", component.type, index.h("kup-switch", { checked: component.loaded, label: KupFormEditorLabels.Loaded, "onKup-switch-change": (ev) => {
261
+ component.loaded =
262
+ ev.detail.value == 'on';
263
+ } }))))
264
+ : undefined, section.sections
265
+ ? section.sections.map((childSection) => this.buildSection(childSection, section))
266
+ : undefined)));
267
+ }
268
+ didRenderInteractables() {
269
+ try {
270
+ const items = [];
271
+ this.rootElement.shadowRoot
272
+ .querySelectorAll('.component-draggable')
273
+ .forEach((x) => items.push(x));
274
+ this.rootElement.shadowRoot
275
+ .querySelectorAll('.section-draggable')
276
+ .forEach((x) => items.push(x));
277
+ items.forEach((item) => {
278
+ this.kupManager.interact.draggable(item, null, null, kupManager.KupDragEffect.CLONE);
279
+ });
280
+ }
281
+ catch (error) {
282
+ this.kupManager.debug.logMessage(this, error, kupManager.KupDebugCategory.ERROR);
283
+ }
284
+ try {
285
+ const items = [];
286
+ this.rootElement.shadowRoot
287
+ .querySelectorAll('.section-dropzone')
288
+ .forEach((x) => items.push(x));
289
+ this.rootElement.shadowRoot
290
+ .querySelectorAll('.form-dropzone')
291
+ .forEach((x) => items.push(x));
292
+ items.forEach((item) => {
293
+ this.kupManager.interact.dropzone(item, null, null, {
294
+ drop: (ev) => {
295
+ ev.currentTarget.appendChild(ev.relatedTarget);
296
+ this.dropped(ev.currentTarget, ev.relatedTarget);
297
+ },
298
+ });
299
+ });
300
+ }
301
+ catch (error) {
302
+ this.kupManager.debug.logMessage(this, error, kupManager.KupDebugCategory.ERROR);
303
+ }
304
+ }
305
+ dropped(parent, child) {
306
+ if (this.dragType == KupFormEditorDragTypes.Components) {
307
+ const idx = child.kupData.section.components.indexOf(child.kupData.componnent);
308
+ child.kupData.section.components.splice(idx, 1);
309
+ parent.kupData.section.components.push(child.kupData.componnent);
310
+ child.kupData.section = parent.kupData.section;
311
+ }
312
+ else if (this.dragType == KupFormEditorDragTypes.Sections) {
313
+ const idx = child.kupData.parent.sections.indexOf(child.kupData.section);
314
+ child.kupData.parent.sections.splice(idx, 1);
315
+ if (parent.kupData.form) {
316
+ // il nuovo target è la form.
317
+ if (!parent.kupData.form.sections)
318
+ parent.kupData.form.sections = [];
319
+ parent.kupData.form.sections.push(child.kupData.section);
320
+ child.kupData.parent = parent.kupData.form;
321
+ }
322
+ else if (parent.kupData.section) {
323
+ // il nuovo target è la section.
324
+ if (!parent.kupData.section.sections)
325
+ parent.kupData.section.sections = [];
326
+ if (parent.kupData.section.components &&
327
+ parent.kupData.section.components.length > 0) {
328
+ // devo creare una section contenitore e sposare i components
329
+ const newSec = {
330
+ id: parent.kupData.section.id + '1',
331
+ loaded: parent.kupData.section.loaded,
332
+ layout: parent.kupData.section.layout,
333
+ components: [],
334
+ };
335
+ parent.kupData.section.components.forEach((x) => newSec.components.push(x));
336
+ parent.kupData.section.components.splice(0);
337
+ parent.kupData.section.sections.push(newSec);
338
+ }
339
+ parent.kupData.section.sections.push(child.kupData.section);
340
+ child.kupData.parent = parent.kupData.section;
341
+ }
342
+ this.resetData(this.internalData);
343
+ }
344
+ }
345
+ resetData(form = null) {
346
+ if (form)
347
+ this.internalDataBackup = form;
348
+ this.resetInternalData = true;
349
+ setTimeout(() => {
350
+ if (this.internalDataBackup) {
351
+ this.internalData = this.internalDataBackup;
352
+ this.internalDataBackup = null;
353
+ }
354
+ this.resetInternalData = false;
355
+ }, 250);
356
+ }
357
+ unregisterInteractables() {
358
+ this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.component-draggable')));
359
+ this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.section-dropzone')));
360
+ this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.section-draggable')));
361
+ this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll('.form-dropzone')));
362
+ }
363
+ /*-------------------------------------------------*/
364
+ /* L i f e c y c l e H o o k s */
365
+ /*-------------------------------------------------*/
366
+ componentWillLoad() {
367
+ this.kupManager.dates.register(this);
368
+ this.kupManager.debug.logLoad(this, false);
369
+ this.kupManager.language.register(this);
370
+ this.kupManager.theme.register(this);
371
+ }
372
+ componentDidLoad() {
373
+ this.kupManager.debug.logLoad(this, true);
374
+ }
375
+ componentWillRender() {
376
+ this.kupManager.debug.logRender(this, false);
377
+ if (this.resetInternalData) {
378
+ this.internalData = null;
379
+ this.unregisterInteractables();
380
+ }
381
+ else if (!this.internalData)
382
+ this.internalData = JSON.parse(JSON.stringify(this.data));
383
+ }
384
+ componentDidRender() {
385
+ this.kupManager.debug.logRender(this, true);
386
+ this.didRenderInteractables();
387
+ }
388
+ render() {
389
+ return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, this.buildHeader(), this.buildForm(this.internalData, null))));
390
+ }
391
+ disconnectedCallback() {
392
+ this.unregisterInteractables();
393
+ this.kupManager.dates.unregister(this);
394
+ this.kupManager.language.unregister(this);
395
+ this.kupManager.theme.unregister(this);
396
+ }
397
+ get rootElement() { return index.getElement(this); }
398
+ static get watchers() { return {
399
+ "data": ["dataChanged"]
400
+ }; }
401
+ };
402
+ KupFormEditor.style = kupFormEditorCss;
403
+
404
+ exports.kup_form_editor = KupFormEditor;
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-eb556444.js');
6
- const kupManager = require('./kup-manager-5c03da64.js');
7
- const utils = require('./utils-e99921c1.js');
6
+ const kupManager = require('./kup-manager-7a941909.js');
7
+ const utils = require('./utils-6287d878.js');
8
8
 
9
9
  /**
10
10
  * Props of the kup-iframe component.
@@ -0,0 +1,228 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-eb556444.js');
6
+ const kupManager = require('./kup-manager-7a941909.js');
7
+ const utils = require('./utils-6287d878.js');
8
+ const GenericVariables = require('./GenericVariables-a9ed17ee.js');
9
+ const fImage = require('./f-image-89f25556.js');
10
+ const fButton = require('./f-button-ac179257.js');
11
+ const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
12
+ const fCell = require('./f-cell-69294bca.js');
13
+ const component = require('./component-72a5b626.js');
14
+ require('./cell-utils-a78d6fac.js');
15
+ require('./f-text-field-e1e45ade.js');
16
+ require('./f-chip-b00897d7.js');
17
+ require('./tslib.es6-0ee02c67.js');
18
+
19
+ /**
20
+ * Props of the kup-image-list component.
21
+ * Used to export every prop in an object.
22
+ */
23
+ var KupImageListProps;
24
+ (function (KupImageListProps) {
25
+ KupImageListProps["customStyle"] = "Custom style of the component.";
26
+ KupImageListProps["data"] = "Actual data of the component";
27
+ KupImageListProps["ripple"] = "When enabled displays Material's ripple effect on clicked items.";
28
+ })(KupImageListProps || (KupImageListProps = {}));
29
+
30
+ const kupImageListCss = ":host{--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, 0.5em);--kup_imagelist_image_margin:var(--kup-imagelist-image-margin, 1em auto);--kup_imagelist_image_min_height:var(--kup-imagelist-image-min-height, 64px);--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n 8px\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-color)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__wrapper--active .navigation-bar__back,.navigation-bar__wrapper--active .navigation-bar__top{display:block}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0;animation:fade-in 0.375s ease-in;display:none}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{font-size:1.2em;font-weight:bold;letter-spacing:0.12em;overflow:hidden;padding:0 0.5em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup_imagelist_columns, 4), minmax(0px, 1fr));margin-top:1em;width:100%}.image-list .f-cell{height:100%;width:100%}.image-list__item{border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__image.f-image{margin:var(--kup_imagelist_image_margin)}.image-list__image.f-image .f-image__icon{min-height:var(--kup_imagelist_image_min_height)}.image-list__label{color:var(--kup_imagelist_text_color);letter-spacing:0.12em;margin:var(--kup_imagelist_label_margin);overflow:hidden;text-align:center;text-overflow:ellipsis}.image-list .mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.image-list .mdc-ripple-surface:before,.image-list .mdc-ripple-surface:after{background-color:var(--kup_imagelist_primary_color)}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";
31
+
32
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
33
+ if (kind === "a" && !f)
34
+ throw new TypeError("Private accessor was defined without a getter");
35
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
36
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
37
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
38
+ };
39
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
40
+ if (kind === "m")
41
+ throw new TypeError("Private method is not writable");
42
+ if (kind === "a" && !f)
43
+ throw new TypeError("Private accessor was defined without a setter");
44
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
45
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
46
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
47
+ };
48
+ var _KupImageList_instances, _KupImageList_clickTimeout, _KupImageList_kupManager, _KupImageList_backProps, _KupImageList_topProps, _KupImageList_createItem, _KupImageList_createList;
49
+ const KupImageList = class {
50
+ constructor(hostRef) {
51
+ index.registerInstance(this, hostRef);
52
+ this.kupClick = index.createEvent(this, "kup-imagelist-click", 6);
53
+ this.kupContextMenu = index.createEvent(this, "kup-imagelist-contextmenu", 6);
54
+ this.kupDblClick = index.createEvent(this, "kup-imagelist-dblclick", 6);
55
+ _KupImageList_instances.add(this);
56
+ /*-------------------------------------------------*/
57
+ /* S t a t e s */
58
+ /*-------------------------------------------------*/
59
+ this.currentNode = null;
60
+ this.navigationBarToggled = false;
61
+ /*-------------------------------------------------*/
62
+ /* P r o p s */
63
+ /*-------------------------------------------------*/
64
+ /**
65
+ * Custom style of the component.
66
+ * @default ""
67
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
68
+ */
69
+ this.customStyle = '';
70
+ /**
71
+ * Actual data of the component.
72
+ * @default []
73
+ */
74
+ this.data = [];
75
+ /**
76
+ * When enabled displays Material's ripple effect on clicked items.
77
+ * @default true
78
+ */
79
+ this.ripple = true;
80
+ /*-------------------------------------------------*/
81
+ /* I n t e r n a l V a r i a b l e s */
82
+ /*-------------------------------------------------*/
83
+ _KupImageList_clickTimeout.set(this, []);
84
+ _KupImageList_kupManager.set(this, kupManager.kupManagerInstance());
85
+ _KupImageList_backProps.set(this, {
86
+ icon: 'arrow_back',
87
+ onClick: () => {
88
+ this.currentNode = __classPrivateFieldGet(this, _KupImageList_kupManager, "f").data.node.getParent(this.data, this.currentNode);
89
+ if (!this.currentNode) {
90
+ this.navigationBarToggled = false;
91
+ }
92
+ },
93
+ styling: fButtonDeclarations.FButtonStyling.FLAT,
94
+ wrapperClass: 'navigation-bar__back',
95
+ });
96
+ _KupImageList_topProps.set(this, {
97
+ icon: 'arrow_upward',
98
+ onClick: () => {
99
+ this.currentNode = null;
100
+ this.navigationBarToggled = false;
101
+ },
102
+ styling: fButtonDeclarations.FButtonStyling.FLAT,
103
+ wrapperClass: 'navigation-bar__top',
104
+ });
105
+ }
106
+ onKupClick(node) {
107
+ if (node.children && node.children.length > 0) {
108
+ this.currentNode = node;
109
+ }
110
+ this.kupClick.emit({
111
+ comp: this,
112
+ id: this.rootElement.id,
113
+ node: node,
114
+ });
115
+ }
116
+ onKupContextMenu(e, node) {
117
+ e.preventDefault();
118
+ this.kupContextMenu.emit({
119
+ comp: this,
120
+ id: this.rootElement.id,
121
+ node: node,
122
+ });
123
+ }
124
+ onKupDblClick(node) {
125
+ for (let index = 0; index < __classPrivateFieldGet(this, _KupImageList_clickTimeout, "f").length; index++) {
126
+ clearTimeout(__classPrivateFieldGet(this, _KupImageList_clickTimeout, "f")[index]);
127
+ }
128
+ __classPrivateFieldSet(this, _KupImageList_clickTimeout, [], "f");
129
+ this.kupDblClick.emit({
130
+ comp: this,
131
+ id: this.rootElement.id,
132
+ node: node,
133
+ });
134
+ }
135
+ /*-------------------------------------------------*/
136
+ /* P u b l i c M e t h o d s */
137
+ /*-------------------------------------------------*/
138
+ /**
139
+ * Used to retrieve component's props values.
140
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
141
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
142
+ */
143
+ async getProps(descriptions) {
144
+ return utils.getProps(this, KupImageListProps, descriptions);
145
+ }
146
+ /**
147
+ * This method is used to trigger a new render of the component.
148
+ */
149
+ async refresh() {
150
+ index.forceUpdate(this);
151
+ }
152
+ /**
153
+ * Sets the props to the component.
154
+ * @param {GenericObject} props - Object containing props that will be set to the component.
155
+ */
156
+ async setProps(props) {
157
+ utils.setProps(this, KupImageListProps, props);
158
+ }
159
+ /*-------------------------------------------------*/
160
+ /* L i f e c y c l e H o o k s */
161
+ /*-------------------------------------------------*/
162
+ componentWillLoad() {
163
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logLoad(this, false);
164
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.register(this);
165
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").theme.register(this);
166
+ }
167
+ componentDidLoad() {
168
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logLoad(this, true);
169
+ }
170
+ componentWillRender() {
171
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logRender(this, false);
172
+ }
173
+ componentDidRender() {
174
+ const root = this.rootElement.shadowRoot;
175
+ if (root && this.ripple) {
176
+ const rippleCells = root.querySelectorAll('.mdc-ripple-surface:not(.mdc-ripple-upgraded)');
177
+ if (rippleCells) {
178
+ for (let i = 0; i < rippleCells.length; i++) {
179
+ component.MDCRipple.attachTo(rippleCells[i]);
180
+ }
181
+ }
182
+ }
183
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logRender(this, true);
184
+ }
185
+ render() {
186
+ const hasNavigation = !!this.currentNode;
187
+ return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet(this, _KupImageList_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h("div", { class: "navigation-bar" }, hasNavigation ? (index.h("div", { class: `navigation-bar__wrapper ${this.navigationBarToggled
188
+ ? 'navigation-bar__wrapper--active'
189
+ : ''}` }, index.h("div", { class: `navigation-bar__title`, onClick: () => {
190
+ this.navigationBarToggled =
191
+ !this.navigationBarToggled;
192
+ } }, index.h(fImage.FImage, { fit: true, resource: this.currentNode.icon, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: "navigation-bar__title__image" }), index.h("div", { class: "navigation-bar__title__label" }, this.currentNode.value)), index.h(fButton.FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_backProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.BACK) })), index.h(fButton.FButton, Object.assign({}, __classPrivateFieldGet(this, _KupImageList_topProps, "f"), { label: __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.TOP) })))) : null), index.h("div", { class: "image-list" }, ...__classPrivateFieldGet(this, _KupImageList_instances, "m", _KupImageList_createList).call(this)))));
193
+ }
194
+ disconnectedCallback() {
195
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").language.unregister(this);
196
+ __classPrivateFieldGet(this, _KupImageList_kupManager, "f").theme.unregister(this);
197
+ }
198
+ get rootElement() { return index.getElement(this); }
199
+ };
200
+ _KupImageList_clickTimeout = new WeakMap(), _KupImageList_kupManager = new WeakMap(), _KupImageList_backProps = new WeakMap(), _KupImageList_topProps = new WeakMap(), _KupImageList_instances = new WeakSet(), _KupImageList_createItem = function _KupImageList_createItem(node) {
201
+ const props = {
202
+ fit: true,
203
+ resource: node.icon,
204
+ title: node.title,
205
+ wrapperClass: 'image-list__image',
206
+ };
207
+ const image = index.h(fImage.FImage, Object.assign({}, props));
208
+ const label = index.h("div", { class: "image-list__label" }, node.value);
209
+ return (index.h(fCell.FCell, { cell: { value: node.value, icon: node.icon, obj: node.obj }, column: { name: 'IMAGE', title: 'Image' }, density: fCell.FCellPadding.NONE, row: Object.assign({}, node) }, index.h("div", { class: "image-list__wrapper" }, image, label)));
210
+ }, _KupImageList_createList = function _KupImageList_createList() {
211
+ const nodes = [];
212
+ const items = this.currentNode ? this.currentNode.children : this.data;
213
+ for (let index$1 = 0; items && index$1 < items.length; index$1++) {
214
+ const node = items[index$1];
215
+ const classObj = {
216
+ 'image-list__item': true,
217
+ 'mdc-ripple-surface': this.ripple ? true : false,
218
+ };
219
+ const item = (index.h("div", { onClick: () => {
220
+ __classPrivateFieldGet(this, _KupImageList_clickTimeout, "f").push(setTimeout(() => this.onKupClick(node), 300));
221
+ }, onContextMenu: (e) => this.onKupContextMenu(e, node), onDblClick: () => this.onKupDblClick(node), class: classObj }, __classPrivateFieldGet(this, _KupImageList_instances, "m", _KupImageList_createItem).call(this, node)));
222
+ nodes.push(item);
223
+ }
224
+ return nodes;
225
+ };
226
+ KupImageList.style = kupImageListCss;
227
+
228
+ exports.kup_image_list = KupImageList;
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-eb556444.js');
6
- const kupManager = require('./kup-manager-5c03da64.js');
7
- const utils = require('./utils-e99921c1.js');
6
+ const kupManager = require('./kup-manager-7a941909.js');
7
+ const utils = require('./utils-6287d878.js');
8
8
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
9
9
 
10
10
  /**
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-eb556444.js');
6
- const kupManager = require('./kup-manager-5c03da64.js');
6
+ const kupManager = require('./kup-manager-7a941909.js');
7
7
  const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
8
- const fImage = require('./f-image-12bab3b5.js');
9
- const utils = require('./utils-e99921c1.js');
8
+ const fImage = require('./f-image-89f25556.js');
9
+ const utils = require('./utils-6287d878.js');
10
10
  const GenericVariables = require('./GenericVariables-a9ed17ee.js');
11
11
 
12
12
  /**