@sme.up/ketchup 6.1.0-SNAPSHOT → 6.3.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 (223) hide show
  1. package/dist/cjs/{f-button-ac179257.js → f-button-94cb5f35.js} +4 -4
  2. package/dist/cjs/f-cell-76830a0d.js +416 -0
  3. package/dist/cjs/f-checkbox-cd977193.js +29 -0
  4. package/dist/cjs/{f-chip-b00897d7.js → f-chip-68d45fd3.js} +3 -3
  5. package/dist/cjs/{f-image-89f25556.js → f-image-0e71df7e.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-46689c0a.js} +80 -403
  7. package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-b4229cef.js} +11 -3
  8. package/dist/cjs/{index-eb556444.js → index-31125378.js} +15 -8
  9. package/dist/cjs/ketchup.cjs.js +3 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
  11. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +331 -299
  12. package/dist/cjs/kup-box.cjs.entry.js +1304 -0
  13. package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
  14. package/dist/cjs/kup-cell.cjs.entry.js +10 -11
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +5 -9
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +438 -0
  18. package/dist/cjs/kup-drawer.cjs.entry.js +5 -6
  19. package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +66 -1353
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +486 -0
  21. package/dist/cjs/kup-form.cjs.entry.js +478 -0
  22. package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
  23. package/dist/cjs/kup-image-list.cjs.entry.js +73 -13
  24. package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
  26. package/dist/cjs/{kup-manager-7a941909.js → kup-manager-7c514a30.js} +1787 -356
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +6 -7
  30. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +6 -7
  33. package/dist/cjs/loader.cjs.js +3 -3
  34. package/dist/collection/assets/dashboard.js +161 -0
  35. package/dist/collection/assets/data-table.js +59 -0
  36. package/dist/collection/assets/family-tree.js +2654 -0
  37. package/dist/collection/assets/form.js +433 -0
  38. package/dist/collection/assets/grid.js +17 -0
  39. package/dist/collection/assets/index.js +18 -6
  40. package/dist/collection/assets/kupinteract.js +68 -0
  41. package/dist/collection/collection-manifest.json +8 -7
  42. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
  43. package/dist/collection/components/kup-box/kup-box.js +13 -2
  44. package/dist/collection/components/kup-button/kup-button.js +1 -0
  45. package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
  46. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
  47. package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +14 -6
  48. package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +211 -152
  49. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
  50. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  51. package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
  52. package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
  53. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
  54. package/dist/collection/components/kup-echart/kup-echart.js +9 -9
  55. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +14 -0
  56. package/dist/collection/components/kup-family-tree/kup-family-tree.css +171 -0
  57. package/dist/collection/components/kup-family-tree/kup-family-tree.js +854 -0
  58. package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
  59. package/dist/collection/components/kup-form/kup-form.css +99 -0
  60. package/dist/collection/components/kup-form/kup-form.js +647 -0
  61. package/dist/collection/components/kup-grid/kup-grid.js +1 -4
  62. package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
  63. package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
  64. package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
  65. package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
  66. package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
  67. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
  68. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  69. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +4 -0
  70. package/dist/collection/components/kup-text-field/kup-text-field.js +54 -0
  71. package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
  72. package/dist/collection/components/kup-tree/kup-tree.js +26 -9
  73. package/dist/collection/f-components/f-button/f-button.js +2 -2
  74. package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
  75. package/dist/collection/f-components/f-cell/f-cell.js +34 -114
  76. package/dist/collection/f-components/f-text-field/f-text-field.js +9 -1
  77. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
  78. package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
  79. package/dist/collection/managers/kup-data/kup-data.js +114 -6
  80. package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
  81. package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
  82. package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
  83. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
  84. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
  85. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
  86. package/dist/collection/types/GenericTypes.js +3 -2
  87. package/dist/collection/utils/filters/filters-rows.js +4 -23
  88. package/dist/collection/utils/filters/filters-tree-items.js +2 -1
  89. package/dist/esm/{f-button-871a544b.js → f-button-cd948e50.js} +4 -4
  90. package/dist/esm/{f-cell-521ef17a.js → f-cell-474dd282.js} +46 -283
  91. package/dist/esm/f-checkbox-e06cf07b.js +27 -0
  92. package/dist/esm/{f-chip-1dda722f.js → f-chip-d6f2eb94.js} +3 -3
  93. package/dist/esm/{f-image-c468d8ae.js → f-image-914a03ef.js} +2 -2
  94. package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-a4a52732.js} +44 -366
  95. package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-76341fe3.js} +11 -3
  96. package/dist/esm/{index-baeab1ac.js → index-e41330a5.js} +15 -8
  97. package/dist/esm/ketchup.js +3 -3
  98. package/dist/esm/kup-accordion.entry.js +3 -4
  99. package/dist/esm/kup-autocomplete_25.entry.js +222 -190
  100. package/dist/esm/kup-box.entry.js +1300 -0
  101. package/dist/esm/kup-calendar.entry.js +5 -7
  102. package/dist/esm/kup-cell.entry.js +7 -8
  103. package/dist/esm/kup-dash-list.entry.js +2 -4
  104. package/dist/esm/kup-dash_2.entry.js +3 -7
  105. package/dist/esm/kup-dashboard.entry.js +434 -0
  106. package/dist/esm/kup-drawer.entry.js +3 -4
  107. package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +61 -1347
  108. package/dist/esm/kup-family-tree.entry.js +482 -0
  109. package/dist/esm/kup-form.entry.js +474 -0
  110. package/dist/esm/kup-iframe.entry.js +2 -3
  111. package/dist/esm/kup-image-list.entry.js +70 -10
  112. package/dist/esm/kup-lazy.entry.js +3 -4
  113. package/dist/esm/kup-magic-box.entry.js +3 -4
  114. package/dist/esm/{kup-manager-58b075b4.js → kup-manager-86f440c7.js} +1762 -357
  115. package/dist/esm/kup-nav-bar.entry.js +2 -3
  116. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  117. package/dist/esm/kup-photo-frame.entry.js +4 -5
  118. package/dist/esm/kup-probe.entry.js +2 -2
  119. package/dist/esm/kup-qlik.entry.js +2 -2
  120. package/dist/esm/kup-snackbar.entry.js +4 -5
  121. package/dist/esm/loader.js +3 -3
  122. package/dist/ketchup/ketchup.esm.js +1 -1
  123. package/dist/ketchup/p-00e1133d.entry.js +9 -0
  124. package/dist/ketchup/p-066f344a.entry.js +1 -0
  125. package/dist/ketchup/p-0c6e0647.entry.js +1 -0
  126. package/dist/ketchup/p-151f7c17.entry.js +27 -0
  127. package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
  128. package/dist/ketchup/p-21ea11cb.js +30 -0
  129. package/dist/ketchup/{p-fac1a08b.entry.js → p-2f4e6c50.entry.js} +1 -1
  130. package/dist/ketchup/p-3586f59c.js +1 -0
  131. package/dist/ketchup/p-359fd90d.entry.js +1 -0
  132. package/dist/ketchup/p-389fd0bf.js +1 -0
  133. package/dist/ketchup/p-5552f156.js +1 -0
  134. package/dist/ketchup/{p-f09f2f98.entry.js → p-77aff9c1.entry.js} +1 -1
  135. package/dist/ketchup/p-7cfdf53c.entry.js +39 -0
  136. package/dist/ketchup/p-853a5178.entry.js +1 -0
  137. package/dist/ketchup/{p-44ec4f03.js → p-8673bd4e.js} +1 -1
  138. package/dist/ketchup/p-8b55b786.entry.js +1 -0
  139. package/dist/ketchup/p-95f5834b.entry.js +1 -0
  140. package/dist/ketchup/p-a2c595c4.js +1 -0
  141. package/dist/ketchup/p-ae91f27e.entry.js +1 -0
  142. package/dist/ketchup/p-af664379.js +1 -0
  143. package/dist/ketchup/p-b0b3989b.js +2 -0
  144. package/dist/ketchup/p-b3b65a61.entry.js +1 -0
  145. package/dist/ketchup/p-bc306a53.entry.js +1 -0
  146. package/dist/ketchup/{p-f71a1675.entry.js → p-c3783b77.entry.js} +1 -1
  147. package/dist/ketchup/{p-7eff4eee.js → p-cd4fc3fb.js} +1 -1
  148. package/dist/ketchup/p-cee76b14.entry.js +1 -0
  149. package/dist/ketchup/p-cfaea29b.entry.js +1 -0
  150. package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
  151. package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
  152. package/dist/ketchup/p-e60a1170.entry.js +1 -0
  153. package/dist/ketchup/p-e9a1ba04.entry.js +1 -0
  154. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
  155. package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
  156. package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +17 -9
  157. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  158. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +37 -0
  159. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -0
  160. package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
  161. package/dist/types/components/kup-form/kup-form.d.ts +63 -0
  162. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
  163. package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
  164. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +4 -0
  165. package/dist/types/components/kup-text-field/kup-text-field.d.ts +10 -0
  166. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
  167. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
  168. package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
  169. package/dist/types/components.d.ts +492 -231
  170. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
  171. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +2 -0
  172. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
  173. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
  174. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
  175. package/dist/types/managers/kup-data/kup-data.d.ts +9 -2
  176. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
  177. package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
  178. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
  179. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
  180. package/dist/types/types/GenericTypes.d.ts +3 -2
  181. package/dist/types/utils/filters/filters-rows.d.ts +0 -2
  182. package/package.json +2 -2
  183. package/dist/cjs/cell-utils-a78d6fac.js +0 -168
  184. package/dist/cjs/f-cell-69294bca.js +0 -653
  185. package/dist/cjs/kup-field.cjs.entry.js +0 -241
  186. package/dist/cjs/kup-form-editor.cjs.entry.js +0 -404
  187. package/dist/cjs/utils-6287d878.js +0 -447
  188. package/dist/collection/assets/form-editor.js +0 -338
  189. package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
  190. package/dist/collection/components/kup-field/kup-field.css +0 -48
  191. package/dist/collection/components/kup-field/kup-field.js +0 -514
  192. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
  193. package/dist/esm/cell-utils-964da6b5.js +0 -160
  194. package/dist/esm/kup-field.entry.js +0 -237
  195. package/dist/esm/kup-form-editor.entry.js +0 -400
  196. package/dist/esm/utils-d7e4b3c2.js +0 -428
  197. package/dist/ketchup/p-1ae66cc5.js +0 -1
  198. package/dist/ketchup/p-34b74425.js +0 -1
  199. package/dist/ketchup/p-3c11e615.entry.js +0 -1
  200. package/dist/ketchup/p-4ffbc3ff.js +0 -1
  201. package/dist/ketchup/p-5264a3e6.entry.js +0 -1
  202. package/dist/ketchup/p-65974e48.entry.js +0 -1
  203. package/dist/ketchup/p-65b46587.entry.js +0 -40
  204. package/dist/ketchup/p-6dff70f8.entry.js +0 -1
  205. package/dist/ketchup/p-7454cb92.js +0 -1
  206. package/dist/ketchup/p-80968627.entry.js +0 -1
  207. package/dist/ketchup/p-8cdf61a4.js +0 -1
  208. package/dist/ketchup/p-954cc340.entry.js +0 -1
  209. package/dist/ketchup/p-976244f9.entry.js +0 -9
  210. package/dist/ketchup/p-99e0d768.entry.js +0 -1
  211. package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
  212. package/dist/ketchup/p-a615a92b.entry.js +0 -1
  213. package/dist/ketchup/p-aca0e54b.js +0 -30
  214. package/dist/ketchup/p-b8939a8b.entry.js +0 -1
  215. package/dist/ketchup/p-bfc3bac7.js +0 -1
  216. package/dist/ketchup/p-c5ce8951.entry.js +0 -1
  217. package/dist/ketchup/p-d2ee56dd.entry.js +0 -1
  218. package/dist/ketchup/p-db71436b.entry.js +0 -27
  219. package/dist/ketchup/p-e0035c58.js +0 -1
  220. package/dist/ketchup/p-e1039cf2.entry.js +0 -1
  221. package/dist/ketchup/p-ea10176c.entry.js +0 -1
  222. package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
  223. package/dist/types/components/kup-field/kup-field.d.ts +0 -90
@@ -1,428 +0,0 @@
1
- import { r as KupDatesNormalize, d as KupDatesFormats } from './kup-manager-58b075b4.js';
2
-
3
- const dom = document.documentElement;
4
- var DateTimeFormatOptionsMonth;
5
- (function (DateTimeFormatOptionsMonth) {
6
- DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
7
- DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
8
- DateTimeFormatOptionsMonth["LONG"] = "long";
9
- DateTimeFormatOptionsMonth["SHORT"] = "short";
10
- DateTimeFormatOptionsMonth["NARROW"] = "narrow";
11
- })(DateTimeFormatOptionsMonth || (DateTimeFormatOptionsMonth = {}));
12
- function identify(array) {
13
- if (array) {
14
- for (let i = 0; i < array.length; i++) {
15
- array[i].id = i.toString();
16
- }
17
- }
18
- }
19
- function getSeparator(locale, separatorType) {
20
- const numberWithGroupAndDecimalSeparator = 1000.1;
21
- return Intl.NumberFormat(locale)
22
- .formatToParts(numberWithGroupAndDecimalSeparator)
23
- .find((part) => part.type === separatorType).value;
24
- }
25
- function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
26
- const options = {
27
- hour: '2-digit',
28
- minute: '2-digit',
29
- hour12: false,
30
- };
31
- if (manageSeconds == true) {
32
- options.second = '2-digit';
33
- }
34
- const formatObj = new Intl.DateTimeFormat(dom.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
35
- let timeFormat = formatObj
36
- .map((obj) => {
37
- switch (obj.type) {
38
- case 'hour':
39
- return 'HH';
40
- case 'minute':
41
- return 'mm';
42
- case 'second':
43
- return 'ss';
44
- default:
45
- return obj.value;
46
- }
47
- })
48
- .join('');
49
- return timeFormat;
50
- }
51
- /**
52
- * @param value number as string, formatted by actual browser locale
53
- * @param type - type of number for calculate suffix
54
- * @returns true if number string in input is a valid number
55
- */
56
- function isValidFormattedStringNumber(value, type) {
57
- if (value == null || value.trim() == '') {
58
- return false;
59
- }
60
- let tmpStr = formattedStringToUnformattedStringNumber(value, type);
61
- if (isNumber(tmpStr)) {
62
- return true;
63
- }
64
- return false;
65
- }
66
- function isNumber(value) {
67
- //return typeof value === 'number';
68
- return !isNaN(value);
69
- }
70
- /**
71
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
72
- * @returns number
73
- **/
74
- function stringToNumber(input) {
75
- if (!input || input == null || input.trim() == '') {
76
- input = '0';
77
- }
78
- return dom.ketchup.math.numberify(input);
79
- }
80
- /**
81
- * @param input number
82
- * @param decimals number of significant decimal digits for output
83
- * @returns number as string, formatted by actual browser locale
84
- **/
85
- function numberToString(input, decimals) {
86
- if (input == null) {
87
- return '';
88
- }
89
- return _numberToString(input, decimals, dom.ketchup.dates.getLocale(), true);
90
- }
91
- /**
92
- * @param type - type of number for calculate suffix
93
- * @returns suffix for number, by type
94
- **/
95
- function getNumericValueSuffixByType(type) {
96
- type = type.toUpperCase();
97
- let nstr = '';
98
- if (type == 'P') {
99
- nstr = ' %';
100
- }
101
- else if (type == 'VE') {
102
- nstr = ' €';
103
- }
104
- else if (type == 'VL') {
105
- nstr = ' £';
106
- }
107
- else if (type == 'VV') {
108
- nstr = ' $';
109
- }
110
- return nstr;
111
- }
112
- /**
113
- * @param input number
114
- * @param decimals number of significant decimal digits for output
115
- * @param type - type of number for calculate suffix
116
- * @returns number as string, formatted by actual browser locale, with suffix by type
117
- **/
118
- function numberToFormattedStringNumber(input, decimals, type) {
119
- if (input == null || isNaN(input)) {
120
- return '';
121
- }
122
- let nstr = numberToString(input, decimals);
123
- nstr = nstr + getNumericValueSuffixByType(type);
124
- return nstr;
125
- }
126
- /**
127
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
128
- * @param decimals number of significant decimal digits for output
129
- * @param type - type of number for calculate suffix
130
- * @returns number as string, formatted by actual browser locale, with suffix by type
131
- **/
132
- function unformattedStringToFormattedStringNumber(input, decimals, type) {
133
- return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
134
- }
135
- /**
136
- * @param input number as string, formatted by actual browser locale
137
- * @param type - type of number for calculate suffix
138
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
139
- **/
140
- function formattedStringToUnformattedStringNumber(input, type) {
141
- return numberStringToNumberString(input, type, getDecimalSeparator(dom.ketchup.dates.getLocale()));
142
- }
143
- /**
144
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
145
- * @param type - type of number for calculate suffix
146
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
147
- **/
148
- function unformattedStringNumberToNumber(input, type) {
149
- return numberStringToNumberString(input, type, '.');
150
- }
151
- function numberStringToNumberString(input, type, decFmt) {
152
- if (input == null || input.trim() == '') {
153
- return '';
154
- }
155
- let originalInputValue = input;
156
- let suffix = getNumericValueSuffixByType(type);
157
- if (suffix != '') {
158
- input = input.replace(suffix, '');
159
- }
160
- let regExpr = null;
161
- if (decFmt == '.') {
162
- regExpr = /,/g;
163
- }
164
- else {
165
- regExpr = /\./g;
166
- }
167
- input = input.replace(regExpr, '');
168
- if (decFmt != '.') {
169
- input = input.replace(/,/g, '.');
170
- }
171
- if (dom.ketchup.math.numberify(input) == null ||
172
- isNaN(dom.ketchup.math.numberify(input))) {
173
- return originalInputValue;
174
- }
175
- let unf = stringToNumber(input);
176
- return _numberToString(unf, -1, 'en-US', false);
177
- }
178
- function getDecimalSeparator(locale) {
179
- return getSeparator(locale, 'decimal');
180
- }
181
- function countDecimals(value) {
182
- if (Math.floor(value) === value)
183
- return 0;
184
- let stringValue = value.toString().split('.')[1];
185
- if (stringValue) {
186
- return stringValue.length ? stringValue.length : 0;
187
- }
188
- else {
189
- return 0;
190
- }
191
- }
192
- function _numberToString(input, decimals, locale, useGrouping) {
193
- if (input == null) {
194
- input = 0;
195
- }
196
- if (decimals == null || decimals == -1) {
197
- decimals = countDecimals(input);
198
- }
199
- let n = Number(input);
200
- let f = decimals > -1
201
- ? {
202
- minimumFractionDigits: decimals,
203
- maximumFractionDigits: decimals,
204
- useGrouping: useGrouping,
205
- }
206
- : { useGrouping: useGrouping };
207
- return n.toLocaleString(locale, f);
208
- }
209
- /**
210
- * @param time time as Date object
211
- * @param manageSeconds flag to set seconds managing
212
- * @return time as string, formatted
213
- **/
214
- function formatTime(time, manageSeconds) {
215
- const options = {
216
- hour: '2-digit',
217
- minute: '2-digit',
218
- hour12: false,
219
- };
220
- if (manageSeconds == true) {
221
- options.second = '2-digit';
222
- }
223
- return time.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
224
- }
225
- /**
226
- * @param value time string, formatted by actual browser locale
227
- * @returns true if time string in input is a valid time
228
- */
229
- function isValidFormattedStringTime(value, manageSeconds) {
230
- let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
231
- return dom.ketchup.dates.isValid(value, format, true);
232
- }
233
- /**
234
- * @param value date/time as string, formatted by actual browser locale
235
- * @returns date/time as string, formatted ISO
236
- **/
237
- function formattedStringToDefaultUnformattedStringTimestamp(value) {
238
- return formattedStringToCustomUnformattedStringTime(value, KupDatesFormats.ISO_DATE_TIME, true);
239
- }
240
- /**
241
- * @param value time as string, formatted by actual browser locale
242
- * @param outputFormat time format to return
243
- * @param manageSeconds flag to set seconds managing
244
- * @returns time as string, formatted
245
- **/
246
- function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
247
- let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
248
- if (dom.ketchup.dates.isValid(value, inputFormat)) {
249
- return dom.ketchup.dates.format(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIME), outputFormat);
250
- }
251
- else {
252
- return '';
253
- }
254
- }
255
- /**
256
- * @param value time as string, formatted ISO
257
- * @param manageSeconds flag to set seconds managing
258
- * @param valueTimeFormat time format (default ISO)
259
- * @param customedFormat time format from smeupObject
260
- * @returns time as string, formatted by actual browser locale
261
- **/
262
- function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
263
- const options = {
264
- hour: '2-digit',
265
- minute: '2-digit',
266
- hour12: false,
267
- };
268
- if (manageSeconds == true) {
269
- options.second = '2-digit';
270
- }
271
- let date = dom.ketchup.dates.toDate(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIME));
272
- return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
273
- }
274
- function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
275
- if (customedFormat == null) {
276
- return date.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
277
- }
278
- switch (customedFormat) {
279
- case 'I13': {
280
- //hh:mm
281
- break;
282
- }
283
- case 'I12': {
284
- //hh:mm:ss
285
- break;
286
- }
287
- case 'I11': {
288
- //???
289
- //hh:dddd
290
- //return moment(date).format('HH:DDDD');
291
- return valueStr;
292
- }
293
- case 'I14': {
294
- //???
295
- //sssss
296
- //return moment(date).format('SSSSS');
297
- return valueStr;
298
- }
299
- case 'I1H': {
300
- //???
301
- //Ora,Cen/Min HH,xx
302
- return valueStr;
303
- }
304
- case 'I1M': {
305
- //???
306
- //Min,Cen/Sec MMMM,xx
307
- return valueStr;
308
- }
309
- case 'I21': {
310
- //???
311
- //Giorni,(4 decim)
312
- return valueStr;
313
- }
314
- case 'I22': {
315
- //???
316
- //Ore,(4 decim)
317
- return valueStr;
318
- }
319
- case 'I23': {
320
- //???
321
- //Minuti,(4 decim)
322
- return valueStr;
323
- }
324
- case 'I24': {
325
- //???
326
- //Secondi
327
- return valueStr;
328
- }
329
- case 'I2H': {
330
- //???
331
- //Ora,Cen/Min HHHH,xx
332
- return valueStr;
333
- }
334
- case 'I2D': {
335
- //???
336
- //Ore Minuti Secondi HHMMS
337
- return valueStr;
338
- }
339
- case 'I2M': {
340
- //???
341
- //Min,Cen/Sec MMMM,xx
342
- return valueStr;
343
- }
344
- }
345
- return date.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
346
- }
347
- /**
348
- * @param value date/time as string, formatted ISO
349
- * @param valueDateFormat date/time format (default ISO)
350
- * @returns date/time as string, formatted by actual browser locale
351
- **/
352
- function unformattedStringToFormattedStringTimestamp(value) {
353
- const options = {
354
- day: '2-digit',
355
- month: '2-digit',
356
- year: 'numeric',
357
- hour: '2-digit',
358
- minute: '2-digit',
359
- second: '2-digit',
360
- hour12: false,
361
- };
362
- let date = dom.ketchup.dates.toDate(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIMESTAMP));
363
- return date.toLocaleString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
364
- }
365
- function getMonthAsStringByLocale(month, format) {
366
- if (month == null) {
367
- return '';
368
- }
369
- const dateTmp = new Date();
370
- dateTmp.setDate(1);
371
- dateTmp.setMonth(month - 1);
372
- const options = {
373
- month: format,
374
- };
375
- const dateTimeFormat = new Intl.DateTimeFormat(dom.ketchup.dates.getLocale(), options);
376
- return dateTimeFormat.format(dateTmp);
377
- }
378
- function getMonthsAsStringByLocale(format) {
379
- if (format == null || format.trim() == '') {
380
- format = DateTimeFormatOptionsMonth.LONG;
381
- }
382
- var months = [];
383
- for (var i = 0; i < 12; i++) {
384
- months[i] = getMonthAsStringByLocale(i + 1, format);
385
- }
386
- return months;
387
- }
388
- /**
389
- * Used to retrieve component's props values.
390
- * @param {any} comp - Component calling this function.
391
- * @param {GenericObject} list - Prop list, specific for each component.
392
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
393
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
394
- */
395
- function getProps(comp, list, descriptions) {
396
- let props = {};
397
- if (descriptions) {
398
- props = list;
399
- }
400
- else {
401
- for (const key in list) {
402
- if (Object.prototype.hasOwnProperty.call(list, key)) {
403
- props[key] = comp[key];
404
- }
405
- }
406
- }
407
- return props;
408
- }
409
- /**
410
- * Sets the props to the component.
411
- * @param {any} comp - Component calling this function.
412
- * @param {GenericObject} list - Prop list, specific for each component.
413
- * @param {GenericObject} props - Prop to be set.
414
- */
415
- function setProps(comp, list, props) {
416
- for (const key in props) {
417
- // If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
418
- if (list[key]) {
419
- comp[key] = props[key];
420
- }
421
- else {
422
- // Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
423
- comp.rootElement[key] = props[key];
424
- }
425
- }
426
- }
427
-
428
- export { DateTimeFormatOptionsMonth as D, getMonthsAsStringByLocale as a, isValidFormattedStringTime as b, formatTime as c, unformattedStringToFormattedStringTime as d, unformattedStringToFormattedStringTimestamp as e, formattedStringToCustomUnformattedStringTime as f, getProps as g, stringToNumber as h, identify as i, formattedStringToDefaultUnformattedStringTimestamp as j, isValidFormattedStringNumber as k, formattedStringToUnformattedStringNumber as l, unformattedStringNumberToNumber as m, numberToFormattedStringNumber as n, isNumber as o, getDecimalSeparator as p, setProps as s, unformattedStringToFormattedStringNumber as u };
@@ -1 +0,0 @@
1
- import{h as n}from"./p-34b74425.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-bfc3bac7.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},type:"button",value:t.checked?"on":"off"},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const p={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},type:"button"},e.trailingIcon?[n("span",{class:p},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:p},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
@@ -1 +0,0 @@
1
- let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),r=u(t,s),c=p(n);i.ael(o,l,r,c),(t.o=t.o||[]).push((()=>i.rel(o,l,r,c)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){le(e)}},f=(e,t)=>4&t?o:e,p=e=>0!=(2&e),d="http://www.w3.org/1999/xlink",h=new WeakMap,m=e=>"sc-"+e.p,y={},$=e=>"object"==(e=typeof e)||"function"===e,w=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&i?r[r.length-1].h+=l:r.push(o?b(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,v);const a=b(e,null);return a.m=t,r.length>0&&(a.$=r),a.g=s,a},b=(e,t)=>({t:0,v:e,h:t,j:null,$:null,m:null,g:null}),g={},v={forEach:(e,t)=>e.map(j).forEach(t),map:(e,t)=>e.map(j).map(t).map(k)},j=e=>({vattrs:e.m,vchildren:e.$,vkey:e.g,vname:e.k,vtag:e.v,vtext:e.h}),k=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),w(e.vtag,t,...e.vchildren||[])}const t=b(e.vtag,e.vtext);return t.m=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.k=e.vname,t},S=(e,t,n,l,o,r)=>{if(n!==l){let c=ne(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=$(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(d,t):e.removeAttribute(t)):(!c||4&r||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(d,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ne(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||y,i=t.m||y;for(l in o)l in i||S(s,l,o[l],void 0,n,t.t);for(l in i)S(s,l,o[l],i[l],n,t.t)},C=(t,l,s)=>{let i,r,c=l.$[s],a=0;if(null!==c.h)i=c.j=o.createTextNode(c.h);else{if(n||(n="svg"===c.v),i=c.j=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.v),n&&"foreignObject"===c.v&&(n=!1),x(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.$)for(a=0;a<c.$.length;++a)r=C(t,c,a),r&&i.appendChild(r);"svg"===c.v?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},L=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=C(null,l,o),r&&(s[o].j=r,c.insertBefore(r,n)))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.j,W(l),s.remove())},R=(e,t)=>e.v===t.v&&e.g===t.g,U=(e,t)=>{const l=t.j=e.j,s=e.$,o=t.$,i=t.v,r=t.h;null===r?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||x(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,a=0,u=t.length-1,f=t[0],p=t[u],d=l.length-1,h=l[0],m=l[d];for(;i<=u&&r<=d;)if(null==f)f=t[++i];else if(null==p)p=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--d];else if(R(f,h))U(f,h),f=t[++i],h=l[++r];else if(R(p,m))U(p,m),p=t[--u],m=l[--d];else if(R(f,m))U(f,m),e.insertBefore(f.j,p.j.nextSibling),f=t[++i],m=l[--d];else if(R(p,h))U(p,h),e.insertBefore(p.j,f.j),p=t[--u],h=l[++r];else{for(c=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===h.g){c=a;break}c>=0?(o=t[c],o.v!==h.v?s=C(t&&t[r],n,c):(U(o,h),t[c]=void 0,s=o.j),h=l[++r]):(s=C(t&&t[r],n,r),h=l[++r]),s&&f.j.parentNode.insertBefore(s,f.j)}i>u?L(e,null==l[d+1]?null:l[d+1].j,n,l,r,d):r>d&&P(t,i,u)})(l,s,t,o):null!==o?(null!==e.h&&(l.textContent=""),L(l,null,t,o,0,o.length-1)):null!==s&&P(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.h!==r&&(l.data=r)},W=e=>{e.m&&e.m.ref&&e.m.ref(null),e.$&&e.$.map(W)},E=e=>Z(e).S,D=(e,t,n)=>{const l=E(e);return{emit:e=>N(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},N=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},T=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return T(e,e.M),de((()=>F(e,t)));e.t|=512},F=(e,t)=>{const n=e.i;let l;return t?(e.t|=256,e.u&&(e.u.map((([e,t])=>B(n,e,t))),e.u=null),l=B(n,"componentWillLoad")):l=B(n,"componentWillUpdate"),l=G(l,(()=>B(n,"componentWillRender"))),G(l,(()=>H(e,n,t)))},H=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.S,l=t.t,s=((e,t)=>{let n=m(t),l=ie.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);q(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>V(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},q=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.C,i=n.L||b(null,null),r=(e=>e&&e.v===g)(l)?l:w(null,null,l);t=s.tagName,o.P&&(r.m=r.m||{},o.P.map((([e,t])=>r.m[t]=s[e]))),r.v=null,r.t|=4,n.L=r,r.j=i.j=s.shadowRoot||s,e=s["s-sc"],U(i,r)})(n,l)}catch(e){le(e,n.S)}return null},V=e=>{const t=e.S,n=e.i,l=e.M;B(n,"componentDidRender"),64&e.t?B(n,"componentDidUpdate"):(e.t|=64,I(t),B(n,"componentDidLoad"),e.R(t),l||z()),e.U(t),e.O&&(e.O(),e.O=void 0),512&e.t&&pe((()=>A(e,!1))),e.t&=-517},_=e=>{{const t=Z(e),n=t.S.isConnected;return n&&2==(18&t.t)&&A(t,!1),n}},z=()=>{I(o.documentElement),pe((()=>N(s,"appload",{detail:{namespace:"ketchup"}})))},B=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){le(e)}},G=(e,t)=>e&&e.then?e.then(t):t(),I=e=>e.classList.add("hydrated"),J=(e,t,n)=>{if(t.W){e.watchers&&(t.D=e.watchers);const l=Object.entries(t.W),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>Z(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=Z(e),o=s.S,i=s.N.get(t),r=s.t,c=s.i;if(n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.N.set(t,n),c)){if(l.D&&128&r){const e=l.D[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){le(e,o)}}))}2==(18&r)&&A(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=Z(this);return n.T.then((()=>n.i[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},K=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),p=o.createElement("style"),d=[];let h,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],p:t[1],W:t[2],A:t[3]};s.W=t[2],s.A=t[3],s.P=[],s.D={};const o=s.p,u=class extends HTMLElement{constructor(e){super(e),te(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?d.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=Z(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.A);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){T(t,t.M=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=oe(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.D=s.watchers,J(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){le(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=m(n);if(!ie.has(t)){const l=()=>{};((e,t,n)=>{let l=ie.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ie.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>A(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=Z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),B(t,"disconnectedCallback")}})()))}componentOnReady(){return Z(this).F}};s.H=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,J(u,s,1)))}))})),p.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",p.setAttribute("data-styles",""),u.insertBefore(p,f?f.nextSibling:u.firstChild),y=!1,d.length?d.map((e=>e.connectedCallback())):i.jmp((()=>h=setTimeout(z,30)))},Q=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},X=e=>i.l=e,Y=new WeakMap,Z=e=>Y.get(e),ee=(e,t)=>Y.set(t.i=e,t),te=(e,t)=>{const n={t:0,S:e,C:t,N:new Map};return n.T=new Promise((e=>n.U=e)),n.F=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.A),Y.set(e,n)},ne=(e,t)=>t in e,le=(e,t)=>(0,console.error)(e,t),se=new Map,oe=e=>{const t=e.p.replace(/-/g,"_"),n=e.H,l=se.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(se.set(n,e),e[t])),le)},ie=new Map,re=[],ce=[],ae=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?pe(fe):i.raf(fe))},ue=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){le(e)}e.length=0},fe=()=>{ue(re),ue(ce),(l=re.length>0)&&i.raf(fe)},pe=e=>r().then(e),de=ae(ce,!0);export{g as H,Q as a,K as b,D as c,_ as f,E as g,w as h,r as p,ee as r,X as s}
@@ -1 +0,0 @@
1
- import{r as o,c as r,f as c,h as i,H as a,g as n}from"./p-34b74425.js";import{k as t,b as e,a as d}from"./p-aca0e54b.js";import{g as p,s}from"./p-e0035c58.js";import{F as l}from"./p-bfc3bac7.js";import{c as u}from"./p-97e8ea42.js";import{M as _}from"./p-81605f08.js";import"./p-79b0730b.js";var k;!function(o){o.customStyle="Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",o.data="Data of the accordion.",o.ripple="When enabled displays Material's ripple effect on item headers."}(k||(k={}));const h=class{constructor(c){o(this,c),this.kupAccordionItemSelected=r(this,"kup-accordion-itemselected",6),this.selectedItems=[],this.customStyle="",this.data=null,this.ripple=!0,this.kupManager=t(),this.slotsNames=[]}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const r=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(r)for(let o=0;o<r.length;o++)_.attachTo(r[o])}}async collapseAll(){const o=[];for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r].name;!this.isItemExpandible(c)&&this.isItemSelected(c)&&o.push(c)}this.selectedItems=o}async expandAll(){const o=[];for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r].name;this.isItemExpandible(c)&&o.push(c)}this.selectedItems=o}async getProps(o){return p(this,k,o)}async refresh(){c(this)}async setProps(o){s(this,k,o)}async toggleItem(o){const r=this.isItemExpandible(o),c=[...this.selectedItems];c.includes(o)?c.splice(c.indexOf(o),1):c.push(o),this.selectedItems=c,r||this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[],r=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<r.length;o++)this.slotsNames.push(r[o].slot);for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r],a=c.name,n=this.isItemSelected(a),t=this.isItemExpandible(a),p={"accordion-item__content":!0,"accordion-item__content--selected":!!n};o.push(i("div",{class:"accordion-item"},i("div",{title:c.title,class:{"accordion-item__header":!0,"accordion-item__header--selected":!(t||!n),"accordion-item__header--expanded":!(!t||!n),"mdc-ripple-surface":!!this.ripple},onClick:()=>this.toggleItem(a)},c.icon?i(l,{color:`var(${e.ICON})`,resource:c.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,i("span",{class:"accordion-item__text"},c.title),t?i("span",{class:`accordion-item__dropdown kup-icon ${d.DROPDOWN.replace("--","")}`}):null),i("div",{class:p},i("slot",{name:c.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple(),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const r=o.querySelectorAll(".mdc-ripple-surface");if(r)for(let o=0;o<r.length;o++)_.attachTo(r[o])}this.kupManager.debug.logRender(this,!0)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return i(a,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:u},i("div",{class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{ripple:["applyRipple"]}}};h.style=":host{--kup_accordion_background_color:var(\n --kup-accordion-background-color,\n var(--kup-background-color)\n );--kup_accordion_border:var(\n --kup-accordion-border,\n 1px solid var(--kup-border-color)\n );--kup_accordion_border_radius:var(--kup-accordion-border-radius, 4px);--kup-accordion_dropdown_icon_color:var(\n --kup-accordion-dropdown-icon-color,\n var(--kup-icon-color)\n );--kup_accordion_font_family:var(\n --kup-accordion-font-family,\n var(--kup-font-family)\n );--kup_accordion_font_size:var(\n --kup-accordion-font-size,\n var(--kup-font-size)\n );--kup_accordion_hover_background_color:var(\n --kup-accordion-hover-background-color,\n var(--kup-hover-background-color)\n );--kup_accordion_hover_color:var(\n --kup-accordion-hover-color,\n var(--kup-hover-color)\n );--kup_accordion_padding:var(--kup-accordion-padding, 1em 1.5em);--kup_accordion_primary_color:var(\n --kup-accordion-primary-color,\n var(--kup-primary-color)\n );--kup_accordion_primary_color_rgb:var(\n --kup-accordion-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_accordion_text_color:var(\n --kup-accordion-text-color,\n var(--kup-text-color)\n );--kup_accordion_text_on_primary_color:var(\n --kup-accordion-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{background-color:var(--kup_accordion_background_color);border-bottom:var(--kup_accordion_border);border-radius:var(--kup_accordion_border_radius);border-top:var(--kup_accordion_border);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-left:var(--kup_accordion_border);border-right:var(--kup_accordion_border);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:not(:first-of-type){border-top:var(--kup_accordion_border)}.accordion-item__header{align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%}.accordion-item__header:hover:not(.accordion-item__header--selected){color:var(--kup_accordion_hover_color);background-color:var(--kup_accordion_hover_background_color)}.accordion-item__header--expanded{color:var(--kup_accordion_hover_color);background-color:var(--kup_accordion_hover_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header--selected{background-color:rgba(var(--kup_accordion_primary_color_rgb), 0.175)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup-accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{animation:fade-in 0.25s ease-out;display:none}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color);--kup-accordion-primary-color-rgb:var(--kup-danger-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color);--kup-accordion-primary-color-rgb:var(--kup-success-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color);--kup-accordion-primary-color-rgb:var(--kup-warning-color-rgb);--kup-accordion-text-on-primary-color:white}";export{h as kup_accordion}
@@ -1 +0,0 @@
1
- import{V as e,b as c}from"./p-aca0e54b.js";import{h as t}from"./p-34b74425.js";import{c as n}from"./p-7454cb92.js";import{F as r}from"./p-44ec4f03.js";import{h as a}from"./p-e0035c58.js";import{F as s}from"./p-bfc3bac7.js";import{a as o}from"./p-7eff4eee.js";const i=e=>{const c={"data-indeterminate":!!e.indeterminate},n={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return t("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),t("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},t("div",{class:n},t("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},c,{value:e.checked?"on":"off"})),t("div",{class:"checkbox__background",onClick:e.onChange},t("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},t("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),t("div",{class:"checkbox__mixedmark"}))),e.label?t("label",null,e.label):void 0))},u=[e.DATA_TABLE,e.TREE];var l,p,b,k,d;!function(e){e.CLICK="kup-cell-click",e.ICON_CLICK="kup-cell-iconclick",e.INPUT="kup-cell-input",e.UPDATE="kup-cell-update"}(l||(l={})),function(e){e.DENSE="dense",e.MEDIUM="medium",e.NONE="",e.WIDE="wide"}(p||(p={})),function(e){e.BG_DANGER="danger-bg",e.BG_GREEN="green-bg",e.BG_GREY="grey-bg",e.BG_ORANGE="orange-bg",e.BG_PURPLE="purple-bg",e.BG_SUCCESS="success-bg",e.BG_TEAL="teal-bg",e.BG_WARNING="warning-bg",e.C_BG_DANGER="c-danger-bg",e.C_BG_GREEN="c-green-bg",e.C_BG_GREY="c-grey-bg",e.C_BG_ORANGE="c-orange-bg",e.C_BG_PURPLE="c-purple-bg",e.C_BG_SUCCESS="c-success-bg",e.C_BG_TEAL="c-teal-bg",e.C_BG_WARNING="c-warning-bg",e.C_CENTERED="c-centered",e.C_FITTED="c-fitted",e.C_PADDED="c-padded",e.C_PADDED_HOR="c-padded-hor",e.C_PADDED_VER="c-padded-ver",e.C_ROUND="c-round",e.C_RIGHT_ALIGNED="c-right-aligned",e.C_SHAPED="c-shaped",e.C_TEXT_VERTICAL="c-vertical-text",e.CLICKABLE="clickable",e.HOVER_DISPLAY="display-on-hover",e.HOVER_EXPAND="expand-on-hover",e.HOVER_REDUCE="reduce-on-hover",e.INDICATOR_TOPRIGHT="top-right-indicator",e.LINK="link",e.MONOSPACE="monospace",e.OBJ="obj",e.SHAPED="shaped",e.TEXT_DANGER="danger-text",e.TEXT_INFO="info-text",e.TEXT_PRIMARY="primary-text",e.TEXT_PURPLE="purple-text",e.TEXT_SECONDARY="secondary-text",e.TEXT_STRONG="strong-text",e.TEXT_SUCCESS="success-text",e.TEXT_WARNING="warning-text",e.UNDERLINED="underlined"}(b||(b={})),function(e){e.AUTOCOMPLETE="ACP",e.BUTTON_LIST="BTN",e.CHART="GRA",e.CHECKBOX="CHK",e.CHIP="CHI",e.COLOR_PICKER="CLP",e.COMBOBOX="CMB",e.EDITOR="EDT",e.GAUGE="GAU",e.IMAGE="IMG",e.KNOB="KNB",e.PROGRESS_BAR="PGB",e.RADIO="RAD",e.RATING="RTG",e.TEXT_FIELD="ITX"}(k||(k={})),function(e){e.AUTOCOMPLETE="autocomplete",e.BAR="bar",e.BUTTON="button",e.BUTTON_LIST="button-list",e.CHART="chart",e.CHECKBOX="checkbox",e.CHIP="chips",e.COLOR_PICKER="color-picker",e.COMBOBOX="combobox",e.DATE="date",e.DATETIME="datetime",e.EDITOR="editor",e.GAUGE="gauge",e.ICON="icon",e.IMAGE="image",e.KNOB="knob",e.LINK="link",e.NUMBER="number",e.PROGRESS_BAR="progress-bar",e.RADIO="radio",e.RATING="rating",e.STRING="string",e.TIME="time"}(d||(d={}));const g=[d.AUTOCOMPLETE,d.CHECKBOX,d.COLOR_PICKER,d.COMBOBOX,d.DATE,d.NUMBER,d.RATING,d.STRING,d.TIME],h=[d.BAR,d.BUTTON,d.BUTTON_LIST,d.CHART,d.CHIP,d.COLOR_PICKER,d.GAUGE,d.KNOB,d.PROGRESS_BAR,d.RADIO,d.RATING],m=document.documentElement,f=(p,f)=>{const j=p.cell,v=p.column,w=p.row,O=p.shape?p.shape:j.shape?j.shape:v.shape?v.shape:null,_=!m.ketchup.objects.isEmptyKupObj(j.obj),y=!(!j.isEditable||!p.editable),C=p.previousValue!==j.value?j.value:"",$=function(e,c){const t=e.obj;if(c)switch(c.toUpperCase()){case k.AUTOCOMPLETE:return d.AUTOCOMPLETE;case k.BUTTON_LIST:return d.BUTTON_LIST;case k.CHART:return d.CHART;case k.CHECKBOX:return d.CHECKBOX;case k.CHIP:return d.CHIP;case k.COLOR_PICKER:return d.COLOR_PICKER;case k.COMBOBOX:return d.COMBOBOX;case k.EDITOR:return d.EDITOR;case k.GAUGE:return d.GAUGE;case k.IMAGE:return d.IMAGE;case k.KNOB:return d.KNOB;case k.PROGRESS_BAR:return d.PROGRESS_BAR;case k.RADIO:return d.RADIO;case k.RATING:return d.RATING;case k.TEXT_FIELD:return d.STRING}return m.ketchup.objects.isBar(t)?d.BAR:m.ketchup.objects.isButton(t)?d.BUTTON:m.ketchup.objects.isChart(t)?d.CHART:m.ketchup.objects.isCheckbox(t)?d.CHECKBOX:m.ketchup.objects.isColor(t)?d.COLOR_PICKER:m.ketchup.objects.isIcon(t)?d.ICON:m.ketchup.objects.isImage(t)?d.IMAGE:m.ketchup.objects.isLink(t)?d.LINK:m.ketchup.objects.isProgressBar(t)?d.PROGRESS_BAR:m.ketchup.objects.isRadio(t)?d.RADIO:m.ketchup.objects.isKupObjList(t)?d.CHIP:m.ketchup.objects.isNumber(t)?d.NUMBER:m.ketchup.objects.isDate(t)?d.DATE:m.ketchup.objects.isTimestamp(t)?d.DATETIME:m.ketchup.objects.isTime(t)?d.TIME:m.ketchup.objects.isVoCodver(t)?d.ICON:d.STRING}(j,O),T=Object.assign({},j.data);let z=j.cssClass?j.cssClass:v.cssClass?v.cssClass:"";const B={"f-cell":!0,[b.OBJ]:!!_,[$+"-cell"]:!0,[p.wrapperClass]:!!p.wrapperClass,[p.density]:!(!p.density||$===d.BAR),[z]:!!z};let H=C;y&&g.includes($)?H=function(e,c,n,s,o){switch(e){case d.AUTOCOMPLETE:return t("kup-autocomplete",Object.assign({},n.data,{class:"kup-full-width","onkup-autocomplete-change":c=>x(c,o,e,l.UPDATE),"onkup-autocomplete-input":c=>x(c,o,e,l.INPUT),"onkup-autocomplete-iconclick":c=>x(c,o,e,l.ICON_CLICK)}));case d.CHECKBOX:return u.includes(o.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t(i,Object.assign({},n.data,{onChange:c=>x(c,o,e,l.UPDATE)}));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n.data,{class:"kup-full-width",disabled:!1,"onkup-colorpicker-change":c=>x(c,o,e,l.UPDATE)}));case d.COMBOBOX:return t("kup-combobox",Object.assign({},n.data,{class:"kup-full-width","onkup-combobox-change":c=>x(c,o,e,l.UPDATE),"onkup-combobox-input":c=>x(c,o,e,l.INPUT),"onkup-combobox-iconclick":c=>x(c,o,e,l.ICON_CLICK)}));case d.DATE:return t("kup-date-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-datepicker-change":c=>x(c,o,e,l.UPDATE),"onkup-datepicker-input":c=>x(c,o,e,l.INPUT)}));case d.RATING:return t("kup-rating",Object.assign({},n.data,{disabled:!1,"onkup-rating-click":c=>x(c,o,e,l.UPDATE)}));case d.TIME:return t("kup-time-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-timepicker-change":c=>x(c,o,e,l.UPDATE),"onkup-timepicker-input":c=>x(c,o,e,l.INPUT)}));case d.NUMBER:c[b.C_RIGHT_ALIGNED]=!0;case d.STRING:return t(r,Object.assign({},n.data,{icon:n.icon?n.icon:s.icon?s.icon:null,fullWidth:!0,inputType:e===d.NUMBER?"number":null,value:e===d.NUMBER?a(n.value).toString():n.value,onChange:c=>x(c,o,e,l.UPDATE),onInput:c=>x(c,o,e,l.INPUT),onIconClick:c=>x(c,o,e,l.ICON_CLICK)}))}}($,B,j,v,p):j.data&&h.includes($)?(p.setSizes&&function(e,c,t){switch(e){case d.BAR:c.sizeY||(c.sizeY="26px");break;case d.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case d.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case d.CHIP:case d.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}($,T,j),H=p.renderKup?function(e,c,n,r,i,p,k){switch(e){case d.BAR:return n.data?t("div",{style:{height:n.sizeY,width:"100%"}},t(s,Object.assign({},n))):t("kup-image",Object.assign({},n));case d.BUTTON:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t("kup-button",Object.assign({},n,{"onkup-button-click":c=>x(c,k,e,l.CLICK)}));case d.BUTTON_LIST:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),n["data-storage"]={cell:r,row:i,column:p},t("kup-button-list",Object.assign({},n));case d.CHART:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t("kup-chart",Object.assign({},n));case d.CHIP:return t(o,Object.assign({},n));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n,{class:"kup-full-width",disabled:!0}));case d.GAUGE:return t("kup-gauge",Object.assign({value:a(r.value),"width-component":"280px"},n));case d.KNOB:case d.PROGRESS_BAR:return t("kup-progress-bar",Object.assign({},n));case d.RADIO:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),n.disabled=i.readOnly,t("kup-radio",Object.assign({},n));case d.RATING:return t("kup-rating",Object.assign({},n,{disabled:!0}))}}($,B,T,j,w,v,p):t("span",{class:"cell-"+$+" placeholder"})):(p.setSizes&&function(c,t,n,r){switch(c){case d.CHECKBOX:case d.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),n.style?n.style.height||(n.style.minHeight=t.sizeY):n.style={minHeight:t.sizeY};break;case d.IMAGE:r.component.rootElement.tagName===e.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}($,T,j,p),H=function(e,c,r,o,i,l,p){switch(e){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.DATETIME:case d.TIME:if(r&&""!=r){const e=n(l,i);return t("div",{class:"f-cell__text"},e)}return r;case d.CHECKBOX:return u.includes(p.component.rootElement.tagName)&&(o[b.C_CENTERED]=!0),t(s,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case d.EDITOR:return t("div",{innerHTML:i.value});case d.ICON:case d.IMAGE:return u.includes(p.component.rootElement.tagName)&&(o[b.C_CENTERED]=!0),c.badgeData&&(o[b.C_PADDED]=!0),t(s,Object.assign({},c));case d.LINK:return t("a",{href:r,target:"_blank"},i.value);case d.NUMBER:if(r&&""!=r){const e=a(i.value),c=n(l,i);return e<0&&(o[b.TEXT_DANGER]=!0),u.includes(p.component.rootElement.tagName)&&(o[b.C_RIGHT_ALIGNED]=!0),t("div",{class:"f-cell__text"},c)}return t("div",{class:"f-cell__text"},r);default:return t("div",{class:"f-cell__text"},r)}}($,T,H,B,j,v,p));let I=null;!y&&(v.icon||j.icon)&&H&&(I=t(s,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:j.icon?j.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let G=null;m.ketchup.debug.isDebug()&&_?G=j.obj.t+"; "+j.obj.p+"; "+j.obj.k+";":null!=j.title&&""!=j.title.trim()&&(G=j.title);let A=null;if(j.info){const e=Object.assign({},j.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),A=t(s,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return t("div",{class:B,"kup-get-cell-props":()=>p,style:j.style},t("div",{class:"f-cell__content",style:j.styleContent,title:G},f&&f.length>0?f:[p.indents,A,I,H]))};function x(e,c,t,r){const a=c.cell,s=c.column,o=c.component,i=c.row;let u="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(r===l.UPDATE){switch(t){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.TIME:a.data&&(a.data.initialValue=u);break;case d.CHECKBOX:u="on"===u?"0":"1",a.data&&(a.data.checked="0"!==u)}a.obj&&(a.obj.k=u.toString()),a.value=u.toString(),a.displayedValue=null,a.displayedValue=n(s,a)}if(o&&o.rootElement){const c=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:o,id:o.rootElement.id,cell:a,column:s,event:e,row:i,type:t}});o.rootElement.dispatchEvent(c);try{o.refresh()}catch(e){}}}export{i as F,p as a,f as b}
@@ -1 +0,0 @@
1
- import{r as i,c as t,f as a,h as e,H as r,g as s}from"./p-34b74425.js";import{k as o,h as n}from"./p-aca0e54b.js";import{g as l,s as p}from"./p-e0035c58.js";import{c as m}from"./p-97e8ea42.js";import{F as c}from"./p-bfc3bac7.js";import{F as g}from"./p-1ae66cc5.js";import{F as _}from"./p-6c77a36c.js";import{a as h,b as u}from"./p-4ffbc3ff.js";import{M as d}from"./p-81605f08.js";import"./p-7454cb92.js";import"./p-44ec4f03.js";import"./p-7eff4eee.js";import"./p-79b0730b.js";var f;!function(i){i.customStyle="Custom style of the component.",i.data="Actual data of the component",i.ripple="When enabled displays Material's ripple effect on clicked items."}(f||(f={}));var b,k,v,w,y,x,j,C=function(i,t,a,e){if("a"===a&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?i!==t||!e:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?e:"a"===a?e.call(i):e?e.value:t.get(i)};const M=class{constructor(a){i(this,a),this.kupClick=t(this,"kup-imagelist-click",6),this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6),this.kupDblClick=t(this,"kup-imagelist-dblclick",6),b.add(this),this.currentNode=null,this.navigationBarToggled=!1,this.customStyle="",this.data=[],this.ripple=!0,k.set(this,[]),v.set(this,o()),w.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=C(this,v,"f").data.node.getParent(this.data,this.currentNode),this.currentNode||(this.navigationBarToggled=!1)},styling:_.FLAT,wrapperClass:"navigation-bar__back"}),y.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null,this.navigationBarToggled=!1},styling:_.FLAT,wrapperClass:"navigation-bar__top"})}onKupClick(i){i.children&&i.children.length>0&&(this.currentNode=i),this.kupClick.emit({comp:this,id:this.rootElement.id,node:i})}onKupContextMenu(i,t){i.preventDefault(),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,node:t})}onKupDblClick(i){for(let i=0;i<C(this,k,"f").length;i++)clearTimeout(C(this,k,"f")[i]);(function(i,t,a,e,r){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?i!==t||!r:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===e?r.call(i,a):r?r.value=a:t.set(i,a)})(this,k,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,node:i})}async getProps(i){return l(this,f,i)}async refresh(){a(this)}async setProps(i){p(this,f,i)}componentWillLoad(){C(this,v,"f").debug.logLoad(this,!1),C(this,v,"f").language.register(this),C(this,v,"f").theme.register(this)}componentDidLoad(){C(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){C(this,v,"f").debug.logRender(this,!1)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t)for(let i=0;i<t.length;i++)d.attachTo(t[i])}C(this,v,"f").debug.logRender(this,!0)}render(){const i=!!this.currentNode;return e(r,null,e("style",null,C(this,v,"f").theme.setKupStyle(this.rootElement)),e("div",{id:m},e("div",{class:"navigation-bar"},i?e("div",{class:"navigation-bar__wrapper "+(this.navigationBarToggled?"navigation-bar__wrapper--active":"")},e("div",{class:"navigation-bar__title",onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},e(c,{fit:!0,resource:this.currentNode.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),e("div",{class:"navigation-bar__title__label"},this.currentNode.value)),e(g,Object.assign({},C(this,w,"f"),{label:C(this,v,"f").language.translate(n.BACK)})),e(g,Object.assign({},C(this,y,"f"),{label:C(this,v,"f").language.translate(n.TOP)}))):null),e("div",{class:"image-list"},...C(this,b,"m",j).call(this))))}disconnectedCallback(){C(this,v,"f").language.unregister(this),C(this,v,"f").theme.unregister(this)}get rootElement(){return s(this)}};k=new WeakMap,v=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakSet,x=function(i){const t=e(c,Object.assign({},{fit:!0,resource:i.icon,title:i.title,wrapperClass:"image-list__image"})),a=e("div",{class:"image-list__label"},i.value);return e(u,{cell:{value:i.value,icon:i.icon,obj:i.obj},column:{name:"IMAGE",title:"Image"},density:h.NONE,row:Object.assign({},i)},e("div",{class:"image-list__wrapper"},t,a))},j=function(){const i=[],t=this.currentNode?this.currentNode.children:this.data;for(let a=0;t&&a<t.length;a++){const r=t[a],s=e("div",{onClick:()=>{C(this,k,"f").push(setTimeout((()=>this.onKupClick(r)),300))},onContextMenu:i=>this.onKupContextMenu(i,r),onDblClick:()=>this.onKupDblClick(r),class:{"image-list__item":!0,"mdc-ripple-surface":!!this.ripple}},C(this,b,"m",x).call(this,r));i.push(s)}return i},M.style=":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}";export{M as kup_image_list}
@@ -1 +0,0 @@
1
- import{r as t,c as e,f as s,h as i,H as h,g as a}from"./p-34b74425.js";import{k as o}from"./p-aca0e54b.js";import{g as n,s as l}from"./p-e0035c58.js";import{c as r}from"./p-97e8ea42.js";var p,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(p||(p={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const v=class{constructor(s){t(this,s),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,p,t)}async getComponent(){return this.lazyComponent}async refresh(){s(this)}async setProps(t){l(this,p,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,s=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),s+=" kup-loaded"):this.showPlaceholder&&(t=e,s+=" kup-to-be-loaded"),i(h,{class:s},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:r},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};v.style=":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}";export{v as kup_lazy}