@sme.up/ketchup 6.0.0 → 6.2.0

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 (198) hide show
  1. package/dist/cjs/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
  2. package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
  3. package/dist/cjs/f-cell-3a740c48.js +418 -0
  4. package/dist/cjs/f-checkbox-57443ca3.js +29 -0
  5. package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
  6. package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
  7. package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
  8. package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
  9. package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
  10. package/dist/cjs/ketchup.cjs.js +3 -3
  11. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
  13. package/dist/cjs/kup-box.cjs.entry.js +1306 -0
  14. package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
  15. package/dist/cjs/kup-cell.cjs.entry.js +10 -9
  16. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  17. package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
  18. package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
  19. package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
  20. package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
  22. package/dist/cjs/kup-form.cjs.entry.js +480 -0
  23. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  24. package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
  25. package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  27. package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  30. package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
  31. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  34. package/dist/cjs/loader.cjs.js +3 -3
  35. package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
  36. package/dist/collection/assets/dashboard.js +113 -0
  37. package/dist/collection/assets/data-table.js +15 -0
  38. package/dist/collection/assets/family-tree.js +2437 -0
  39. package/dist/collection/assets/form.js +433 -0
  40. package/dist/collection/assets/grid.js +17 -0
  41. package/dist/collection/assets/index.js +14 -6
  42. package/dist/collection/collection-manifest.json +4 -3
  43. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
  44. package/dist/collection/components/kup-box/kup-box.js +13 -2
  45. package/dist/collection/components/kup-button/kup-button.js +1 -0
  46. package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
  47. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
  48. package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
  49. package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
  50. package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
  51. package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
  52. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
  53. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
  54. package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
  55. package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
  56. package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
  57. package/dist/collection/components/kup-form/kup-form.css +99 -0
  58. package/dist/collection/components/kup-form/kup-form.js +647 -0
  59. package/dist/collection/components/kup-grid/kup-grid.js +1 -4
  60. package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
  61. package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
  62. package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
  63. package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
  64. package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
  65. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
  66. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  67. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
  68. package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
  69. package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
  70. package/dist/collection/components/kup-tree/kup-tree.js +10 -4
  71. package/dist/collection/f-components/f-button/f-button.js +2 -2
  72. package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
  73. package/dist/collection/f-components/f-cell/f-cell.js +34 -114
  74. package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
  75. package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
  76. package/dist/collection/managers/kup-data/kup-data.js +109 -1
  77. package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
  78. package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
  79. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
  80. package/dist/collection/types/GenericTypes.js +3 -2
  81. package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
  82. package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
  83. package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
  84. package/dist/esm/f-checkbox-c51c4a75.js +27 -0
  85. package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
  86. package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
  87. package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
  88. package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
  89. package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
  90. package/dist/esm/ketchup.js +3 -3
  91. package/dist/esm/kup-accordion.entry.js +4 -4
  92. package/dist/esm/kup-autocomplete_25.entry.js +199 -183
  93. package/dist/esm/kup-box.entry.js +1302 -0
  94. package/dist/esm/kup-calendar.entry.js +7 -7
  95. package/dist/esm/kup-cell.entry.js +9 -8
  96. package/dist/esm/kup-dash-list.entry.js +4 -4
  97. package/dist/esm/kup-dash_2.entry.js +4 -7
  98. package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
  99. package/dist/esm/kup-drawer.entry.js +4 -4
  100. package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
  101. package/dist/esm/kup-family-tree.entry.js +406 -0
  102. package/dist/esm/kup-form.entry.js +476 -0
  103. package/dist/esm/kup-iframe.entry.js +3 -3
  104. package/dist/esm/kup-image-list.entry.js +72 -10
  105. package/dist/esm/kup-lazy.entry.js +4 -4
  106. package/dist/esm/kup-magic-box.entry.js +4 -4
  107. package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
  108. package/dist/esm/kup-nav-bar.entry.js +3 -3
  109. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  110. package/dist/esm/kup-photo-frame.entry.js +5 -5
  111. package/dist/esm/kup-probe.entry.js +2 -2
  112. package/dist/esm/kup-qlik.entry.js +2 -2
  113. package/dist/esm/kup-snackbar.entry.js +5 -5
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
  116. package/dist/ketchup/ketchup.esm.js +1 -1
  117. package/dist/ketchup/p-06c6cc68.js +1 -0
  118. package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
  119. package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
  120. package/dist/ketchup/p-1c44dc62.entry.js +1 -0
  121. package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
  122. package/dist/ketchup/p-38d7584e.js +1 -0
  123. package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
  124. package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
  125. package/dist/ketchup/p-578583db.entry.js +1 -0
  126. package/dist/ketchup/p-5866d507.entry.js +1 -0
  127. package/dist/ketchup/p-61059e9d.entry.js +9 -0
  128. package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
  129. package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
  130. package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
  131. package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
  132. package/dist/ketchup/p-7230ab97.entry.js +1 -0
  133. package/dist/ketchup/p-752b4cef.entry.js +1 -0
  134. package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
  135. package/dist/ketchup/p-928c5c36.js +1 -0
  136. package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
  137. package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
  138. package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
  139. package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
  140. package/dist/ketchup/p-cd5cfa7c.js +1 -0
  141. package/dist/ketchup/p-d154b3a0.entry.js +1 -0
  142. package/dist/ketchup/p-d2affb6f.entry.js +27 -0
  143. package/dist/ketchup/p-d3b542b3.js +2 -0
  144. package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
  145. package/dist/ketchup/p-da0eab60.entry.js +1 -0
  146. package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
  147. package/dist/ketchup/p-e9366aaf.entry.js +39 -0
  148. package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
  149. package/dist/ketchup/p-fc2b1229.js +30 -0
  150. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
  151. package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
  152. package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
  153. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
  154. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
  155. package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
  156. package/dist/types/components/kup-form/kup-form.d.ts +63 -0
  157. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
  158. package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
  159. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
  160. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  161. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
  162. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
  163. package/dist/types/components.d.ts +460 -241
  164. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
  165. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  166. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
  167. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
  168. package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
  169. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
  170. package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
  171. package/dist/types/types/GenericTypes.d.ts +3 -2
  172. package/package.json +2 -2
  173. package/dist/cjs/f-cell-69294bca.js +0 -653
  174. package/dist/cjs/kup-field.cjs.entry.js +0 -241
  175. package/dist/collection/assets/form-editor.js +0 -338
  176. package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
  177. package/dist/collection/components/kup-field/kup-field.css +0 -48
  178. package/dist/collection/components/kup-field/kup-field.js +0 -514
  179. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
  180. package/dist/esm/kup-field.entry.js +0 -237
  181. package/dist/ketchup/p-1ae66cc5.js +0 -1
  182. package/dist/ketchup/p-34b74425.js +0 -1
  183. package/dist/ketchup/p-4ffbc3ff.js +0 -1
  184. package/dist/ketchup/p-5264a3e6.entry.js +0 -1
  185. package/dist/ketchup/p-65974e48.entry.js +0 -1
  186. package/dist/ketchup/p-65b46587.entry.js +0 -40
  187. package/dist/ketchup/p-80968627.entry.js +0 -1
  188. package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
  189. package/dist/ketchup/p-aca0e54b.js +0 -30
  190. package/dist/ketchup/p-b8939a8b.entry.js +0 -1
  191. package/dist/ketchup/p-bfc3bac7.js +0 -1
  192. package/dist/ketchup/p-c5ce8951.entry.js +0 -1
  193. package/dist/ketchup/p-cad1e097.entry.js +0 -9
  194. package/dist/ketchup/p-db71436b.entry.js +0 -27
  195. package/dist/ketchup/p-e1039cf2.entry.js +0 -1
  196. package/dist/ketchup/p-ea10176c.entry.js +0 -1
  197. package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
  198. package/dist/types/components/kup-field/kup-field.d.ts +0 -90
@@ -0,0 +1,476 @@
1
+ import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-ad6ab214.js';
2
+ import { k as kupManagerInstance, _ as FCellTypes, h as KupLanguageGeneric } from './kup-manager-22a475e6.js';
3
+ import { i as identify, g as getProps, s as setProps } from './utils-2c1f4122.js';
4
+ import { c as componentWrapperId } from './GenericVariables-665de00a.js';
5
+ import { F as FCell } from './f-cell-7b159a22.js';
6
+ import { F as FTextFieldMDC } from './f-text-field-mdc-d42d3f9e.js';
7
+ import './cell-utils-cb5d4149.js';
8
+ import './f-checkbox-c51c4a75.js';
9
+ import './f-text-field-41c575eb.js';
10
+ import './f-image-2ab4b9aa.js';
11
+ import './f-chip-c2e4c522.js';
12
+ import './tslib.es6-3eea2234.js';
13
+ import './component-b1bedf1d.js';
14
+
15
+ /**
16
+ * Props of the kup-form component.
17
+ * Used to export every prop in an object.
18
+ */
19
+ var KupFormProps;
20
+ (function (KupFormProps) {
21
+ KupFormProps["customStyle"] = "Custom style of the component.";
22
+ KupFormProps["data"] = "Actual data of the form.";
23
+ KupFormProps["layout"] = "How the form will arrange its content.";
24
+ })(KupFormProps || (KupFormProps = {}));
25
+ var KupFormLabelAlignment;
26
+ (function (KupFormLabelAlignment) {
27
+ KupFormLabelAlignment["CENTER"] = "center";
28
+ KupFormLabelAlignment["LEFT"] = "left";
29
+ KupFormLabelAlignment["RIGHT"] = "right";
30
+ })(KupFormLabelAlignment || (KupFormLabelAlignment = {}));
31
+ var KupFormLabelPlacement;
32
+ (function (KupFormLabelPlacement) {
33
+ KupFormLabelPlacement["BOTTOM"] = "bottom";
34
+ KupFormLabelPlacement["LEFT"] = "left";
35
+ KupFormLabelPlacement["HIDDEN"] = "hidden";
36
+ KupFormLabelPlacement["PLACEHOLDER"] = "placeholder";
37
+ KupFormLabelPlacement["RIGHT"] = "right";
38
+ KupFormLabelPlacement["TOP"] = "top";
39
+ })(KupFormLabelPlacement || (KupFormLabelPlacement = {}));
40
+
41
+ const kupFormCss = ":host{--kup_form_background_color:var(\n --kup-form-background-color,\n var(--kup-background-color)\n );--kup_form_color:var(--kup-form-color, var(--kup-text-color));--kup_form_font_family:var(--kup-form-font-family, var(--kup-font-family));--kup_form_font_size:var(--kup-form-font-size, var(--kup-font-size));--kup_form_label_alignment:var(--kup-form-label-alignment);--kup_form_label_width:var(--kup-form-label-width);display:block;font-family:var(--kup_form_font_family);font-size:var(--kup_form_font_size)}.form{background:var(--kup_form_background_color);color:var(--kup_form_color);display:flex;flex-grow:1;overflow:auto;position:relative}.form--column{flex-direction:column}.form__section{display:flex;flex:1 1 1%;flex-direction:row;flex-wrap:wrap}.form__section--column{flex-direction:column;flex-wrap:unset}.form__section--column>.form__section{flex:0 0 auto}.form__section--grid{display:grid}.form__section--titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}.form__section--titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}.form__section--left .form__label{width:var(--kup_form_label_width, 0)}.form__section--right .form__field{min-width:200px;width:0}.form__label{-webkit-font-smoothing:antialiased;box-sizing:border-box;font-size:0.875em;letter-spacing:0.0178571429em;white-space:nowrap;width:var(--kup_form_label_width)}.form__label--center{text-align:var(--kup_form_label_alignment, center)}.form__label--left{text-align:var(--kup_form_label_alignment, left)}.form__label--right{text-align:var(--kup_form_label_alignment, right)}.form__field{min-height:16px}.form__field img{height:auto}.form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-start}";
42
+
43
+ const dom = document.documentElement;
44
+ const KupForm = class {
45
+ constructor(hostRef) {
46
+ registerInstance(this, hostRef);
47
+ /*-------------------------------------------------*/
48
+ /* P r o p s */
49
+ /*-------------------------------------------------*/
50
+ /**
51
+ * Custom style of the component.
52
+ * @default ""
53
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
54
+ */
55
+ this.customStyle = '';
56
+ /**
57
+ * Actual data of the form.
58
+ * @default null
59
+ */
60
+ this.data = null;
61
+ /**
62
+ * How the form will arrange its content.
63
+ * @default null
64
+ */
65
+ this.layout = null;
66
+ /*-------------------------------------------------*/
67
+ /* I n t e r n a l V a r i a b l e s */
68
+ /*-------------------------------------------------*/
69
+ this.kupManager = kupManagerInstance();
70
+ this.visibleColumns = [];
71
+ }
72
+ /*-------------------------------------------------*/
73
+ /* W a t c h e r s */
74
+ /*-------------------------------------------------*/
75
+ onDataChanged() {
76
+ identify(this.getRows());
77
+ this.initVisibleColumns();
78
+ this.checkLayout();
79
+ }
80
+ onLayoutChanged() {
81
+ this.checkLayout();
82
+ }
83
+ /*-------------------------------------------------*/
84
+ /* P u b l i c M e t h o d s */
85
+ /*-------------------------------------------------*/
86
+ /**
87
+ * Used to retrieve component's props values.
88
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
89
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
90
+ */
91
+ async getProps(descriptions) {
92
+ return getProps(this, KupFormProps, descriptions);
93
+ }
94
+ /**
95
+ * This method is used to trigger a new render of the component.
96
+ */
97
+ async refresh() {
98
+ forceUpdate(this);
99
+ }
100
+ /**
101
+ * Sets the focus on an editable table cell.
102
+ * @param {string} column - Name of the column.
103
+ * @param {string} rowId - Id of the row.
104
+ */
105
+ async setFocus(column, rowId) {
106
+ const cells = this.rootElement.shadowRoot.querySelectorAll('td[data-column="' + column + '"]');
107
+ for (let index = 0; cells && index < cells.length; index++) {
108
+ const cell = cells[index];
109
+ if (cell['data-row'] && cell['data-row'].id == rowId) {
110
+ const input = cell.querySelector('input');
111
+ if (input) {
112
+ input.focus();
113
+ }
114
+ else {
115
+ const kupInput = cell.querySelector('.hydrated');
116
+ if (kupInput) {
117
+ try {
118
+ kupInput.setFocus();
119
+ }
120
+ catch (error) { }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ /**
127
+ * Sets the props to the component.
128
+ * @param {GenericObject} props - Object containing props that will be set to the component.
129
+ */
130
+ async setProps(props) {
131
+ setProps(this, KupFormProps, props);
132
+ }
133
+ /*-------------------------------------------------*/
134
+ /* P r i v a t e M e t h o d s */
135
+ /*-------------------------------------------------*/
136
+ getColumns() {
137
+ return this.data && this.data.columns
138
+ ? this.data.columns
139
+ : [{ title: '', name: '', size: undefined }];
140
+ }
141
+ initVisibleColumns() {
142
+ this.visibleColumns = this.getColumns().filter((column) => {
143
+ if (column.hasOwnProperty('visible')) {
144
+ return column.visible;
145
+ }
146
+ return true;
147
+ });
148
+ }
149
+ getRows() {
150
+ return this.data && this.data.rows ? this.data.rows : [];
151
+ }
152
+ checkLayout() {
153
+ if (this.layout) {
154
+ this.formLayout = this.layout;
155
+ return;
156
+ }
157
+ const section = {
158
+ horizontal: false,
159
+ sections: [],
160
+ };
161
+ const visibleColumns = this.visibleColumns;
162
+ let size = visibleColumns.length;
163
+ const content = [];
164
+ let cnt = 0;
165
+ while (size-- > 0) {
166
+ content.push({
167
+ column: visibleColumns[cnt++].name,
168
+ });
169
+ }
170
+ section.content = content;
171
+ this.formLayout = {
172
+ sections: [section],
173
+ };
174
+ }
175
+ renderRow(row) {
176
+ const visibleColumns = [...this.visibleColumns];
177
+ let formContent = null;
178
+ let rowLayout = row.layout;
179
+ if (!rowLayout) {
180
+ rowLayout = this.formLayout;
181
+ }
182
+ let horizontal = false;
183
+ if (rowLayout) {
184
+ if (rowLayout.horizontal) {
185
+ horizontal = true;
186
+ }
187
+ const sections = rowLayout.sections;
188
+ let size = sections.length;
189
+ let cnt = 0;
190
+ if (size > 0) {
191
+ formContent = [];
192
+ }
193
+ const parent = {
194
+ horizontal: horizontal,
195
+ };
196
+ while (size-- > 0) {
197
+ formContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
198
+ }
199
+ }
200
+ const classObj = {
201
+ form: true,
202
+ 'form--column': !horizontal,
203
+ };
204
+ return h("form", { class: classObj }, formContent);
205
+ }
206
+ renderSection(section, parent, row, visibleColumns) {
207
+ var _a;
208
+ let sectionContent = null;
209
+ if (section.sections && section.sections.length > 0) {
210
+ const sections = section.sections;
211
+ let size = sections.length;
212
+ let cnt = 0;
213
+ if (size > 0) {
214
+ sectionContent = [];
215
+ }
216
+ while (size-- > 0) {
217
+ sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
218
+ }
219
+ }
220
+ else if (section.content) {
221
+ const content = section.content;
222
+ let size = content.length;
223
+ let cnt = 0;
224
+ if (size > 0) {
225
+ sectionContent = [];
226
+ }
227
+ while (size-- > 0) {
228
+ const formField = this.renderFormField({
229
+ formField: content[cnt++],
230
+ row,
231
+ visibleColumns,
232
+ }, section);
233
+ let field = formField;
234
+ if (!section.horizontal) {
235
+ field = h("tr", null, formField);
236
+ }
237
+ sectionContent.push(field);
238
+ }
239
+ }
240
+ else if (visibleColumns.length > 0) {
241
+ const column = visibleColumns[0];
242
+ sectionContent = this.renderFormField({
243
+ formField: { column: column.name },
244
+ row,
245
+ visibleColumns,
246
+ });
247
+ }
248
+ const isGrid = !!section.columns;
249
+ const labelPlacement = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.placement) || KupFormLabelPlacement.LEFT;
250
+ const sectionClass = {
251
+ form__section: true,
252
+ 'form__section--column': !isGrid && !section.horizontal,
253
+ 'form__section--grid': isGrid,
254
+ 'form__section--titled': !!section.title,
255
+ 'form__section--last': !section.sections || section.sections.length === 0,
256
+ [`form__section--${labelPlacement}`]: true,
257
+ };
258
+ const sectionStyle = section.style || {};
259
+ if (section.dim && parent) {
260
+ sectionStyle.flex = `0 0 ${section.dim}`;
261
+ if (parent.horizontal) {
262
+ sectionStyle.maxWidth = section.dim;
263
+ }
264
+ else {
265
+ sectionStyle.maxHeight = section.dim;
266
+ }
267
+ }
268
+ if (isGrid) {
269
+ sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
270
+ }
271
+ return (h("div", { class: sectionClass, style: sectionStyle }, section.title ? h("h3", null, section.title) : null, h("table", null, h("tbody", null, section.horizontal ? (h("tr", null, sectionContent)) : (sectionContent)))));
272
+ }
273
+ renderFormField({ formField, row, visibleColumns, }, section) {
274
+ var _a;
275
+ const classObj = {
276
+ form__field: true,
277
+ };
278
+ const styleObj = {};
279
+ let column = null;
280
+ let index = -1;
281
+ for (let i = 0; i < visibleColumns.length; i++) {
282
+ const c = visibleColumns[i];
283
+ if (c.name === formField.column) {
284
+ index = i;
285
+ break;
286
+ }
287
+ }
288
+ if (index >= 0) {
289
+ column = visibleColumns[index];
290
+ visibleColumns.splice(index, 1);
291
+ }
292
+ else if (section) {
293
+ column = this.data.columns.find((x) => x.name === formField.column);
294
+ }
295
+ const cell = row.cells[formField.column];
296
+ let title = undefined;
297
+ if (cell) {
298
+ cell.isEditable = true;
299
+ if (!this.kupManager.objects.isEmptyKupObj(cell.obj)) {
300
+ if (this.kupManager.debug.isDebug()) {
301
+ title =
302
+ cell.obj.t +
303
+ '; ' +
304
+ cell.obj.p +
305
+ '; ' +
306
+ cell.obj.k +
307
+ ';';
308
+ }
309
+ }
310
+ }
311
+ else {
312
+ return null;
313
+ }
314
+ const cellProps = {
315
+ cell: formField.data ? Object.assign(Object.assign({}, cell), { data: formField.data }) : cell,
316
+ column: column,
317
+ component: this,
318
+ editable: true,
319
+ renderKup: true,
320
+ row: row,
321
+ setSizes: true,
322
+ shape: formField.shape,
323
+ };
324
+ const label = formField.label || column.title;
325
+ resetLabel();
326
+ switch ((_a = section.label) === null || _a === void 0 ? void 0 : _a.placement) {
327
+ case KupFormLabelPlacement.BOTTOM:
328
+ return [h("tr", null, fieldCell()), h("tr", null, labelCell(label))];
329
+ case KupFormLabelPlacement.PLACEHOLDER:
330
+ setPlaceholderLabel();
331
+ case KupFormLabelPlacement.HIDDEN: {
332
+ if (section) {
333
+ return [fieldCell()];
334
+ }
335
+ else {
336
+ return [h("tr", null, fieldCell())];
337
+ }
338
+ }
339
+ case KupFormLabelPlacement.RIGHT: {
340
+ if (section) {
341
+ return [fieldCell(), labelCell(label)];
342
+ }
343
+ else {
344
+ return [
345
+ h("tr", null, fieldCell(), labelCell(label)),
346
+ ];
347
+ }
348
+ }
349
+ case KupFormLabelPlacement.TOP:
350
+ return [h("tr", null, labelCell(label)), h("tr", null, fieldCell())];
351
+ default: {
352
+ if (section) {
353
+ return [labelCell(label), fieldCell()];
354
+ }
355
+ else {
356
+ return [
357
+ h("tr", null, labelCell(label), fieldCell()),
358
+ ];
359
+ }
360
+ }
361
+ }
362
+ function fieldCell() {
363
+ return (h("td", { "data-cell": cell, "data-row": row, "data-column": formField.column, class: classObj, style: styleObj, title: title }, cell && column ? (h(FCell, Object.assign({}, cellProps))) : (h("span", null, formField.value))));
364
+ }
365
+ function labelCell(label) {
366
+ var _a, _b, _c;
367
+ const alignment = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.alignment) || KupFormLabelAlignment.LEFT;
368
+ const style = {
369
+ width: ((_b = section === null || section === void 0 ? void 0 : section.label) === null || _b === void 0 ? void 0 : _b.width) ? (_c = section === null || section === void 0 ? void 0 : section.label) === null || _c === void 0 ? void 0 : _c.width : '',
370
+ };
371
+ return (h("td", { class: `form__label form__label--${alignment}`, style: style }, h("span", null, label)));
372
+ }
373
+ function resetLabel() {
374
+ if (!cell.data) {
375
+ cell.data = {};
376
+ }
377
+ try {
378
+ delete cell.data.label;
379
+ }
380
+ catch (_a) { }
381
+ try {
382
+ delete cell.data.data['kup-text-field'].label;
383
+ }
384
+ catch (_b) { }
385
+ }
386
+ function setPlaceholderLabel() {
387
+ switch (dom.ketchup.data.cell.getType(cell, cell.shape || column.shape || null)) {
388
+ case FCellTypes.AUTOCOMPLETE:
389
+ case FCellTypes.COLOR_PICKER:
390
+ case FCellTypes.COMBOBOX:
391
+ case FCellTypes.DATE:
392
+ case FCellTypes.DATETIME:
393
+ case FCellTypes.TIME:
394
+ if (cell.data.data) {
395
+ if (cell.data.data['kup-text-field']) {
396
+ cell.data.data['kup-text-field'].label =
397
+ column.title;
398
+ }
399
+ else {
400
+ cell.data.data = {
401
+ 'kup-text-field': {
402
+ label: column.title,
403
+ },
404
+ };
405
+ }
406
+ }
407
+ else {
408
+ cell.data.data = {
409
+ 'kup-text-field': {
410
+ label: column.title,
411
+ },
412
+ };
413
+ }
414
+ break;
415
+ case FCellTypes.CHECKBOX:
416
+ case FCellTypes.NUMBER:
417
+ case FCellTypes.STRING:
418
+ case FCellTypes.SWITCH:
419
+ cell.data.label = column.title;
420
+ }
421
+ }
422
+ }
423
+ /*-------------------------------------------------*/
424
+ /* L i f e c y c l e H o o k s */
425
+ /*-------------------------------------------------*/
426
+ componentWillLoad() {
427
+ this.kupManager.debug.logLoad(this, false);
428
+ this.kupManager.language.register(this);
429
+ this.kupManager.theme.register(this);
430
+ this.onDataChanged();
431
+ }
432
+ componentDidLoad() {
433
+ this.kupManager.debug.logLoad(this, true);
434
+ }
435
+ componentWillRender() {
436
+ this.kupManager.debug.logRender(this, false);
437
+ }
438
+ componentDidRender() {
439
+ const root = this.rootElement.shadowRoot;
440
+ if (root) {
441
+ const fs = root.querySelectorAll('.f-text-field');
442
+ for (let index = 0; index < fs.length; index++) {
443
+ FTextFieldMDC(fs[index]);
444
+ }
445
+ }
446
+ this.kupManager.debug.logRender(this, true);
447
+ }
448
+ render() {
449
+ let formContent = null;
450
+ if (this.data.rows.length === 0) {
451
+ formContent = (h("p", null, this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA)));
452
+ }
453
+ else {
454
+ const rows = this.data.rows;
455
+ let size = rows.length;
456
+ let cnt = 0;
457
+ formContent = [];
458
+ while (size-- > 0) {
459
+ formContent.push(this.renderRow(rows[cnt++]));
460
+ }
461
+ }
462
+ return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, formContent)));
463
+ }
464
+ disconnectedCallback() {
465
+ this.kupManager.language.unregister(this);
466
+ this.kupManager.theme.unregister(this);
467
+ }
468
+ get rootElement() { return getElement(this); }
469
+ static get watchers() { return {
470
+ "data": ["onDataChanged"],
471
+ "layout": ["onLayoutChanged"]
472
+ }; }
473
+ };
474
+ KupForm.style = kupFormCss;
475
+
476
+ export { KupForm as kup_form };
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-baeab1ac.js';
2
- import { k as kupManagerInstance, c as KupDebugCategory } from './kup-manager-58b075b4.js';
3
- import { g as getProps, s as setProps } from './utils-d7e4b3c2.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-ad6ab214.js';
2
+ import { k as kupManagerInstance, c as KupDebugCategory } from './kup-manager-22a475e6.js';
3
+ import { g as getProps, s as setProps } from './utils-2c1f4122.js';
4
4
 
5
5
  /**
6
6
  * Props of the kup-iframe component.
@@ -1,15 +1,16 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-baeab1ac.js';
2
- import { k as kupManagerInstance, h as KupLanguageGeneric } from './kup-manager-58b075b4.js';
3
- import { g as getProps, s as setProps } from './utils-d7e4b3c2.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-ad6ab214.js';
2
+ import { k as kupManagerInstance, h as KupLanguageGeneric, F as FCellPadding } from './kup-manager-22a475e6.js';
3
+ import { g as getProps, s as setProps } from './utils-2c1f4122.js';
4
4
  import { c as componentWrapperId } from './GenericVariables-665de00a.js';
5
- import { F as FImage } from './f-image-c468d8ae.js';
6
- import { F as FButton } from './f-button-871a544b.js';
5
+ import { F as FImage } from './f-image-2ab4b9aa.js';
6
+ import { F as FButton } from './f-button-fd44ef70.js';
7
7
  import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
8
- import { a as FCellPadding, b as FCell } from './f-cell-521ef17a.js';
8
+ import { F as FCell } from './f-cell-7b159a22.js';
9
9
  import { M as MDCRipple } from './component-b1bedf1d.js';
10
- import './cell-utils-964da6b5.js';
11
- import './f-text-field-d6c61c73.js';
12
- import './f-chip-1dda722f.js';
10
+ import './cell-utils-cb5d4149.js';
11
+ import './f-checkbox-c51c4a75.js';
12
+ import './f-text-field-41c575eb.js';
13
+ import './f-chip-c2e4c522.js';
13
14
  import './tslib.es6-3eea2234.js';
14
15
 
15
16
  /**
@@ -23,7 +24,17 @@ var KupImageListProps;
23
24
  KupImageListProps["ripple"] = "When enabled displays Material's ripple effect on clicked items.";
24
25
  })(KupImageListProps || (KupImageListProps = {}));
25
26
 
26
- 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}";
27
+ class KupImageListState {
28
+ constructor() {
29
+ this.load = false;
30
+ }
31
+ toDebugString() {
32
+ // TODO
33
+ return 'image-list state';
34
+ }
35
+ }
36
+
37
+ 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__back,.navigation-bar__top{--kup-button-primary-color-rgb:0}.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}";
27
38
 
28
39
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
29
40
  if (kind === "a" && !f)
@@ -52,6 +63,7 @@ const KupImageList = class {
52
63
  /*-------------------------------------------------*/
53
64
  /* S t a t e s */
54
65
  /*-------------------------------------------------*/
66
+ this.state = new KupImageListState();
55
67
  this.currentNode = null;
56
68
  this.navigationBarToggled = false;
57
69
  /*-------------------------------------------------*/
@@ -73,9 +85,18 @@ const KupImageList = class {
73
85
  * @default true
74
86
  */
75
87
  this.ripple = true;
88
+ /**
89
+ * An array of integers containing the path to a selected child.\
90
+ */
91
+ this.selectedNode = [];
92
+ this.stateId = '';
76
93
  /*-------------------------------------------------*/
77
94
  /* I n t e r n a l V a r i a b l e s */
78
95
  /*-------------------------------------------------*/
96
+ /**
97
+ * Instance of the KupManager class.
98
+ */
99
+ this.kupManager = kupManagerInstance();
79
100
  _KupImageList_clickTimeout.set(this, []);
80
101
  _KupImageList_kupManager.set(this, kupManagerInstance());
81
102
  _KupImageList_backProps.set(this, {
@@ -99,6 +120,32 @@ const KupImageList = class {
99
120
  wrapperClass: 'navigation-bar__top',
100
121
  });
101
122
  }
123
+ initWithPersistedState() {
124
+ if (this.store && this.stateId) {
125
+ const state = this.store.getState(this.stateId);
126
+ if (state != null) {
127
+ this.currentNode =
128
+ this.kupManager.data.node.findByStrTreeNodePath(this.data, state.selectedTreeNodePath);
129
+ }
130
+ }
131
+ }
132
+ persistState() {
133
+ if (this.store && this.stateId) {
134
+ let somethingChanged = false;
135
+ let cNodeRowId = this.currentNode ? this.currentNode.id : '';
136
+ if (!this.kupManager.objects.deepEqual(this.state.selectedTreeNodePath, cNodeRowId)) {
137
+ this.state.selectedTreeNodePath = cNodeRowId;
138
+ somethingChanged = true;
139
+ }
140
+ if (!this.state.load) {
141
+ this.state.load = true;
142
+ return;
143
+ }
144
+ if (somethingChanged) {
145
+ this.store.persistState(this.stateId, this.state);
146
+ }
147
+ }
148
+ }
102
149
  onKupClick(node) {
103
150
  if (node.children && node.children.length > 0) {
104
151
  this.currentNode = node;
@@ -129,6 +176,15 @@ const KupImageList = class {
129
176
  });
130
177
  }
131
178
  /*-------------------------------------------------*/
179
+ /* W a t c h e r s */
180
+ /*-------------------------------------------------*/
181
+ selectNode(newData) {
182
+ if (!newData || newData.length == 0) {
183
+ return;
184
+ }
185
+ this.currentNode = this.kupManager.data.node.find(this.data, newData);
186
+ }
187
+ /*-------------------------------------------------*/
132
188
  /* P u b l i c M e t h o d s */
133
189
  /*-------------------------------------------------*/
134
190
  /**
@@ -176,6 +232,9 @@ const KupImageList = class {
176
232
  }
177
233
  }
178
234
  }
235
+ // *** Store
236
+ this.persistState();
237
+ // ***
179
238
  __classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logRender(this, true);
180
239
  }
181
240
  render() {
@@ -192,6 +251,9 @@ const KupImageList = class {
192
251
  __classPrivateFieldGet(this, _KupImageList_kupManager, "f").theme.unregister(this);
193
252
  }
194
253
  get rootElement() { return getElement(this); }
254
+ static get watchers() { return {
255
+ "selectedNode": ["selectNode"]
256
+ }; }
195
257
  };
196
258
  _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) {
197
259
  const props = {
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-baeab1ac.js';
2
- import { k as kupManagerInstance } from './kup-manager-58b075b4.js';
3
- import { g as getProps, s as setProps } from './utils-d7e4b3c2.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-ad6ab214.js';
2
+ import { k as kupManagerInstance } from './kup-manager-22a475e6.js';
3
+ import { g as getProps, s as setProps } from './utils-2c1f4122.js';
4
4
  import { c as componentWrapperId } from './GenericVariables-665de00a.js';
5
5
 
6
6
  /**
@@ -24,7 +24,7 @@ var KupLazyRender;
24
24
  KupLazyRender["BOTH"] = "both";
25
25
  })(KupLazyRender || (KupLazyRender = {}));
26
26
 
27
- const kupLazyCss = ":host{--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );display:block;height:100%;width:100%;position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:100%;width:100%}#kup-component kup-data-table{min-width:100%}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";
27
+ const kupLazyCss = ":host{--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:100%;width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:100%;width:var(--kup_lazy_width)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";
28
28
 
29
29
  const KupLazy = class {
30
30
  constructor(hostRef) {
@@ -1,8 +1,8 @@
1
- import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-baeab1ac.js';
2
- import { k as kupManagerInstance, h as KupLanguageGeneric, c as KupDebugCategory, _ as kupDropEvent, z as kupDraggableColumnAttr, $ as kupDraggableRowAttr, D as KupDropEventTypes, b as KupThemeColorValues } from './kup-manager-58b075b4.js';
1
+ import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement } from './index-ad6ab214.js';
2
+ import { k as kupManagerInstance, h as KupLanguageGeneric, c as KupDebugCategory, a7 as kupDropEvent, z as kupDraggableColumnAttr, a8 as kupDraggableRowAttr, D as KupDropEventTypes, b as KupThemeColorValues } from './kup-manager-22a475e6.js';
3
3
  import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
4
- import { F as FImage } from './f-image-c468d8ae.js';
5
- import { g as getProps, s as setProps } from './utils-d7e4b3c2.js';
4
+ import { F as FImage } from './f-image-2ab4b9aa.js';
5
+ import { g as getProps, s as setProps } from './utils-2c1f4122.js';
6
6
  import { c as componentWrapperId } from './GenericVariables-665de00a.js';
7
7
 
8
8
  /**