@sme.up/ketchup 4.0.0 → 4.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 (303) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/cell-utils-dc0884a3.js +168 -0
  3. package/dist/cjs/f-button-2ba74fb5.js +105 -0
  4. package/dist/cjs/f-cell-fe60a08d.js +731 -0
  5. package/dist/cjs/f-chip-90d95d22.js +141 -0
  6. package/dist/cjs/{f-image-5f4f29ca.js → f-image-d3bd4e08.js} +4 -5
  7. package/dist/cjs/{index-3c471303.js → index-0416afab.js} +73 -64
  8. package/dist/cjs/ketchup.cjs.js +3 -3
  9. package/dist/cjs/kup-accordion.cjs.entry.js +6 -8
  10. package/dist/cjs/{kup-autocomplete_29.cjs.entry.js → kup-autocomplete_28.cjs.entry.js} +2580 -3060
  11. package/dist/cjs/kup-calendar.cjs.entry.js +30 -30
  12. package/dist/cjs/kup-cell.cjs.entry.js +201 -0
  13. package/dist/cjs/kup-dash-list.cjs.entry.js +15 -7
  14. package/dist/cjs/kup-dash_2.cjs.entry.js +104 -62
  15. package/dist/cjs/kup-drawer.cjs.entry.js +4 -6
  16. package/dist/cjs/kup-field.cjs.entry.js +3 -5
  17. package/dist/cjs/kup-iframe.cjs.entry.js +3 -4
  18. package/dist/cjs/kup-lazy.cjs.entry.js +4 -6
  19. package/dist/cjs/kup-magic-box.cjs.entry.js +21 -31
  20. package/dist/cjs/kup-manager-1a2688ca.js +5813 -0
  21. package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -6
  22. package/dist/cjs/kup-probe.cjs.entry.js +3 -4
  23. package/dist/cjs/kup-qlik.cjs.entry.js +2 -3
  24. package/dist/cjs/kup-snackbar.cjs.entry.js +152 -0
  25. package/dist/cjs/loader.cjs.js +3 -3
  26. package/dist/cjs/{utils-2af73538.js → utils-0cc466b9.js} +17 -83
  27. package/dist/collection/assets/cell.js +51 -0
  28. package/dist/collection/assets/data-table.js +518 -1
  29. package/dist/collection/assets/index.js +8 -0
  30. package/dist/collection/assets/snackbar.js +32 -0
  31. package/dist/collection/collection-manifest.json +6 -6
  32. package/dist/collection/components/kup-accordion/kup-accordion.css +0 -213
  33. package/dist/collection/components/kup-accordion/kup-accordion.js +15 -16
  34. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -2
  35. package/dist/collection/components/kup-autocomplete/kup-autocomplete.css +5 -2381
  36. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +83 -111
  37. package/dist/collection/components/kup-badge/kup-badge.css +1 -35
  38. package/dist/collection/components/kup-badge/kup-badge.js +13 -14
  39. package/dist/collection/components/kup-box/kup-box.css +47 -780
  40. package/dist/collection/components/kup-box/kup-box.js +240 -366
  41. package/dist/collection/components/kup-button/kup-button.css +0 -333
  42. package/dist/collection/components/kup-button/kup-button.js +27 -28
  43. package/dist/collection/components/kup-button-list/kup-button-list.css +0 -332
  44. package/dist/collection/components/kup-button-list/kup-button-list.js +19 -20
  45. package/dist/collection/components/kup-calendar/kup-calendar.css +0 -517
  46. package/dist/collection/components/kup-calendar/kup-calendar.js +47 -45
  47. package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +20 -0
  48. package/dist/collection/components/kup-card/builtin/kup-card-calendar.js +458 -0
  49. package/dist/collection/components/kup-card/builtin/kup-card-clock.js +321 -0
  50. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +18 -0
  51. package/dist/collection/components/kup-card/free/kup-card-free.js +13 -0
  52. package/dist/collection/components/kup-card/kup-card-declarations.js +19 -0
  53. package/dist/collection/components/kup-card/kup-card-helper.js +19 -1
  54. package/dist/collection/components/kup-card/kup-card.css +615 -185
  55. package/dist/collection/components/kup-card/kup-card.js +94 -34
  56. package/dist/collection/components/kup-card/standard/kup-card-standard.js +75 -0
  57. package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -0
  58. package/dist/collection/components/kup-cell/kup-cell.css +20 -0
  59. package/dist/collection/components/kup-cell/kup-cell.js +413 -0
  60. package/dist/collection/components/kup-chart/kup-chart.js +41 -42
  61. package/dist/collection/components/kup-checkbox/kup-checkbox.css +0 -214
  62. package/dist/collection/components/kup-checkbox/kup-checkbox.js +19 -20
  63. package/dist/collection/components/kup-chip/kup-chip.css +0 -217
  64. package/dist/collection/components/kup-chip/kup-chip.js +15 -16
  65. package/dist/collection/components/kup-color-picker/kup-color-picker.css +7 -2380
  66. package/dist/collection/components/kup-color-picker/kup-color-picker.js +41 -41
  67. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
  68. package/dist/collection/components/kup-combobox/kup-combobox.css +5 -2381
  69. package/dist/collection/components/kup-combobox/kup-combobox.js +68 -28
  70. package/dist/collection/components/kup-dash-list/kup-dash-list.js +13 -4
  71. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +2 -0
  72. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +61 -102
  73. package/dist/collection/components/kup-data-table/kup-data-table.css +118 -3232
  74. package/dist/collection/components/kup-data-table/kup-data-table.js +589 -1089
  75. package/dist/collection/components/kup-date-picker/kup-date-picker.css +1 -85
  76. package/dist/collection/components/kup-date-picker/kup-date-picker.js +92 -395
  77. package/dist/collection/components/kup-drawer/kup-drawer.js +9 -10
  78. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +12 -340
  79. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +56 -45
  80. package/dist/collection/components/kup-field/kup-field.js +21 -22
  81. package/dist/collection/components/kup-gauge/kup-gauge.js +17 -18
  82. package/dist/collection/components/kup-grid/kup-grid.css +2 -1
  83. package/dist/collection/components/kup-grid/kup-grid.js +13 -14
  84. package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
  85. package/dist/collection/components/kup-image/assets/svg/ketchup.svg +74 -0
  86. package/dist/collection/components/kup-image/assets/svg/smeup.svg +59 -0
  87. package/dist/collection/components/kup-image/kup-image.css +0 -32
  88. package/dist/collection/components/kup-image/kup-image.js +25 -26
  89. package/dist/collection/components/kup-lazy/kup-lazy.js +17 -18
  90. package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
  91. package/dist/collection/components/kup-list/kup-list.css +4 -260
  92. package/dist/collection/components/kup-list/kup-list.js +39 -49
  93. package/dist/collection/components/kup-magic-box/kup-magic-box.css +13 -39
  94. package/dist/collection/components/kup-magic-box/kup-magic-box.js +29 -38
  95. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +11 -12
  96. package/dist/collection/components/kup-paginator/kup-paginator.css +0 -332
  97. package/dist/collection/components/kup-paginator/kup-paginator.js +44 -12
  98. package/dist/collection/components/kup-probe/kup-probe.js +9 -9
  99. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +21 -22
  100. package/dist/collection/components/kup-radio/kup-radio.js +17 -18
  101. package/dist/collection/components/kup-rating/kup-rating.js +15 -16
  102. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -0
  103. package/dist/collection/components/kup-snackbar/kup-snackbar.css +75 -0
  104. package/dist/collection/components/kup-snackbar/kup-snackbar.js +390 -0
  105. package/dist/collection/components/kup-spinner/kup-spinner.js +23 -24
  106. package/dist/collection/components/kup-switch/kup-switch.css +0 -156
  107. package/dist/collection/components/kup-switch/kup-switch.js +17 -18
  108. package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +0 -199
  109. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +13 -14
  110. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
  111. package/dist/collection/components/kup-text-field/kup-text-field.css +4 -2371
  112. package/dist/collection/components/kup-text-field/kup-text-field.js +77 -51
  113. package/dist/collection/components/kup-time-picker/kup-time-picker.css +7 -0
  114. package/dist/collection/components/kup-time-picker/kup-time-picker.js +97 -317
  115. package/dist/collection/components/kup-tooltip/kup-tooltip.js +24 -14
  116. package/dist/collection/components/kup-tree/kup-tree.css +27 -371
  117. package/dist/collection/components/kup-tree/kup-tree.js +163 -383
  118. package/dist/collection/f-components/f-button/f-button.js +4 -2
  119. package/dist/collection/f-components/f-cell/f-cell-declarations.js +143 -0
  120. package/dist/collection/f-components/f-cell/f-cell.js +471 -0
  121. package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
  122. package/dist/collection/f-components/f-chip/f-chip.js +2 -2
  123. package/dist/collection/f-components/f-image/f-image.js +2 -3
  124. package/dist/collection/f-components/f-switch/f-switch.js +1 -1
  125. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +1 -1
  126. package/dist/collection/f-components/f-text-field/f-text-field.js +25 -21
  127. package/dist/collection/utils/cell-utils.js +18 -222
  128. package/dist/collection/utils/filters/filters.js +31 -37
  129. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +15 -3
  130. package/dist/collection/utils/kup-dates/kup-dates.js +14 -2
  131. package/dist/collection/utils/kup-debug/kup-debug-browser-utils.js +3 -3
  132. package/dist/collection/utils/kup-debug/kup-debug.js +57 -29
  133. package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +5 -7
  134. package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
  135. package/dist/collection/utils/kup-interact/kup-interact.js +379 -0
  136. package/dist/collection/utils/kup-language/kup-language-declarations.js +2 -0
  137. package/dist/collection/utils/kup-language/kup-language.js +1 -1
  138. package/dist/collection/utils/kup-manager/kup-manager.js +47 -10
  139. package/dist/collection/utils/kup-objects/kup-objects.js +9 -33
  140. package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
  141. package/dist/collection/utils/kup-search/kup-search-declarations.js +1 -0
  142. package/dist/collection/utils/kup-search/kup-search.js +75 -0
  143. package/dist/collection/utils/kup-theme/kup-theme-declarations.js +1 -0
  144. package/dist/collection/utils/kup-theme/kup-theme.js +4 -3
  145. package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
  146. package/dist/collection/utils/utils.js +15 -23
  147. package/dist/esm/cell-utils-8f512ea9.js +160 -0
  148. package/dist/esm/f-button-30dbcaa9.js +103 -0
  149. package/dist/esm/f-cell-95c186c6.js +727 -0
  150. package/dist/esm/f-chip-c0e9c0ff.js +139 -0
  151. package/dist/esm/{f-image-68b34fab.js → f-image-3bc8b24f.js} +4 -5
  152. package/dist/esm/{index-bf2824a6.js → index-e0e67c23.js} +74 -65
  153. package/dist/esm/ketchup.js +3 -3
  154. package/dist/esm/kup-accordion.entry.js +6 -8
  155. package/dist/esm/{kup-autocomplete_29.entry.js → kup-autocomplete_28.entry.js} +2379 -2858
  156. package/dist/esm/kup-calendar.entry.js +10 -10
  157. package/dist/esm/kup-cell.entry.js +197 -0
  158. package/dist/esm/kup-dash-list.entry.js +15 -7
  159. package/dist/esm/kup-dash_2.entry.js +104 -62
  160. package/dist/esm/kup-drawer.entry.js +4 -6
  161. package/dist/esm/kup-field.entry.js +3 -5
  162. package/dist/esm/kup-iframe.entry.js +3 -4
  163. package/dist/esm/kup-lazy.entry.js +4 -6
  164. package/dist/esm/kup-magic-box.entry.js +21 -31
  165. package/dist/esm/kup-manager-7fc234da.js +5800 -0
  166. package/dist/esm/kup-nav-bar.entry.js +4 -6
  167. package/dist/esm/kup-probe.entry.js +3 -4
  168. package/dist/esm/kup-qlik.entry.js +2 -3
  169. package/dist/esm/kup-snackbar.entry.js +148 -0
  170. package/dist/esm/loader.js +3 -3
  171. package/dist/esm/{utils-13dd007a.js → utils-6c73709d.js} +15 -78
  172. package/dist/ketchup/assets/svg/ketchup.svg +74 -0
  173. package/dist/ketchup/assets/svg/smeup.svg +59 -0
  174. package/dist/ketchup/ketchup.esm.js +1 -1
  175. package/dist/ketchup/p-15321eae.js +1 -0
  176. package/dist/ketchup/p-1baf1205.entry.js +1 -0
  177. package/dist/ketchup/p-1c6178e4.entry.js +1 -0
  178. package/dist/ketchup/p-44375e49.js +1 -0
  179. package/dist/ketchup/p-4dcdbd31.entry.js +45 -0
  180. package/dist/ketchup/p-5a5f2a53.js +1 -0
  181. package/dist/ketchup/{p-c7ee1fbc.js → p-61faaa38.js} +2 -2
  182. package/dist/ketchup/p-62816d0b.entry.js +1 -0
  183. package/dist/ketchup/p-65adc15b.entry.js +1 -0
  184. package/dist/ketchup/p-7e23ea7c.entry.js +1 -0
  185. package/dist/ketchup/p-a378ba56.entry.js +1 -0
  186. package/dist/ketchup/p-a878016f.entry.js +1 -0
  187. package/dist/ketchup/p-a96e6e32.entry.js +1 -0
  188. package/dist/ketchup/p-ad32821e.entry.js +1 -0
  189. package/dist/ketchup/p-af4a6191.entry.js +1 -0
  190. package/dist/ketchup/p-c18c7bb0.entry.js +27 -0
  191. package/dist/ketchup/p-ca0ca27f.entry.js +1 -0
  192. package/dist/ketchup/p-cb5f4994.js +1 -0
  193. package/dist/ketchup/p-ccda584a.entry.js +1 -0
  194. package/dist/ketchup/p-d4aa4922.js +1 -0
  195. package/dist/ketchup/p-dbb6998b.entry.js +1 -0
  196. package/dist/ketchup/p-de83f2f6.js +1 -0
  197. package/dist/ketchup/p-ec3a3db9.js +1 -0
  198. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -6
  199. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +7 -13
  200. package/dist/types/components/kup-box/kup-box-declarations.d.ts +13 -4
  201. package/dist/types/components/kup-box/kup-box.d.ts +13 -6
  202. package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +14 -0
  203. package/dist/types/components/kup-card/builtin/kup-card-calendar.d.ts +2 -0
  204. package/dist/types/components/kup-card/builtin/kup-card-clock.d.ts +2 -0
  205. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
  206. package/dist/types/components/kup-card/free/kup-card-free.d.ts +8 -0
  207. package/dist/types/components/kup-card/kup-card-declarations.d.ts +74 -0
  208. package/dist/types/components/kup-card/kup-card.d.ts +12 -3
  209. package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
  210. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -0
  211. package/dist/types/components/kup-cell/kup-cell.d.ts +67 -0
  212. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +1 -1
  213. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -2
  214. package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
  215. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +4 -0
  216. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +20 -36
  217. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +1 -15
  218. package/dist/types/components/kup-data-table/kup-data-table.d.ts +33 -83
  219. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +11 -23
  220. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -4
  221. package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
  222. package/dist/types/components/kup-list/kup-list.d.ts +2 -3
  223. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
  224. package/dist/types/components/kup-paginator/kup-paginator.d.ts +6 -0
  225. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -0
  226. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +79 -0
  227. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +2 -1
  228. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  229. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +10 -20
  230. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +1 -0
  231. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
  232. package/dist/types/components/kup-tree/kup-tree.d.ts +12 -23
  233. package/dist/types/components.d.ts +348 -176
  234. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +153 -0
  235. package/dist/types/f-components/f-cell/f-cell.d.ts +3 -0
  236. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  237. package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +1 -1
  238. package/dist/types/utils/cell-utils.d.ts +0 -19
  239. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -0
  240. package/dist/types/utils/kup-dates/kup-dates.d.ts +9 -4
  241. package/dist/types/utils/kup-debug/kup-debug.d.ts +1 -1
  242. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
  243. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
  244. package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
  245. package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
  246. package/dist/types/utils/kup-language/kup-language-declarations.d.ts +2 -0
  247. package/dist/types/utils/kup-language/kup-language.d.ts +1 -1
  248. package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +28 -8
  249. package/dist/types/utils/kup-manager/kup-manager.d.ts +18 -5
  250. package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
  251. package/dist/types/utils/kup-search/kup-search-declarations.d.ts +7 -0
  252. package/dist/types/utils/kup-search/kup-search.d.ts +20 -0
  253. package/dist/types/utils/kup-theme/kup-theme-declarations.d.ts +2 -0
  254. package/dist/types/utils/kup-theme/kup-theme.d.ts +2 -2
  255. package/dist/types/utils/utils.d.ts +0 -1
  256. package/package.json +4 -6
  257. package/dist/cjs/cell-utils-1f89a299.js +0 -1527
  258. package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
  259. package/dist/cjs/f-chip-2d58c8f7.js +0 -239
  260. package/dist/cjs/kup-grid.cjs.entry.js +0 -130
  261. package/dist/cjs/kup-manager-59ad8bdc.js +0 -4845
  262. package/dist/cjs/kup-objects-59ea949c.js +0 -717
  263. package/dist/collection/assets/images/drag-multiple.js +0 -1
  264. package/dist/collection/components/kup-editor/kup-editor.css +0 -5
  265. package/dist/collection/components/kup-editor/kup-editor.js +0 -59
  266. package/dist/collection/components/kup-layout/kup-layout.css +0 -53
  267. package/dist/collection/components/kup-layout/kup-layout.js +0 -156
  268. package/dist/collection/utils/drag-and-drop.js +0 -109
  269. package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
  270. package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
  271. package/dist/esm/cell-utils-cb612463.js +0 -1510
  272. package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
  273. package/dist/esm/f-chip-125d5dd6.js +0 -236
  274. package/dist/esm/kup-grid.entry.js +0 -126
  275. package/dist/esm/kup-manager-e7d7b353.js +0 -4842
  276. package/dist/esm/kup-objects-d38d2fa2.js +0 -711
  277. package/dist/ketchup/p-00fe1e3e.js +0 -1
  278. package/dist/ketchup/p-0320e24e.entry.js +0 -1
  279. package/dist/ketchup/p-08c7a092.js +0 -1
  280. package/dist/ketchup/p-1165f4ea.entry.js +0 -1
  281. package/dist/ketchup/p-170d3cba.js +0 -1
  282. package/dist/ketchup/p-18cb3ba3.js +0 -1
  283. package/dist/ketchup/p-23541a97.entry.js +0 -45
  284. package/dist/ketchup/p-64ea7e37.entry.js +0 -1
  285. package/dist/ketchup/p-7896031c.entry.js +0 -1
  286. package/dist/ketchup/p-876da4c2.entry.js +0 -1
  287. package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
  288. package/dist/ketchup/p-940ab57a.entry.js +0 -1
  289. package/dist/ketchup/p-9c858a38.entry.js +0 -1
  290. package/dist/ketchup/p-a12a5690.entry.js +0 -1
  291. package/dist/ketchup/p-a5424073.js +0 -1
  292. package/dist/ketchup/p-b0724035.entry.js +0 -1
  293. package/dist/ketchup/p-b14e77f0.js +0 -1
  294. package/dist/ketchup/p-d24cfdea.entry.js +0 -1
  295. package/dist/ketchup/p-ee89966f.entry.js +0 -27
  296. package/dist/ketchup/p-fcd2fd8f.js +0 -1
  297. package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
  298. package/dist/types/assets/images/drag-multiple.d.ts +0 -1
  299. package/dist/types/components/kup-editor/kup-editor.d.ts +0 -16
  300. package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
  301. package/dist/types/utils/drag-and-drop.d.ts +0 -53
  302. package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
  303. package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
@@ -0,0 +1,727 @@
1
+ import { h, a as getAssetPath } from './index-e0e67c23.js';
2
+ import { b as getCellValueForDisplay } from './cell-utils-8f512ea9.js';
3
+ import { a as KupThemeIconValues, b as KupThemeColorValues } from './kup-manager-7fc234da.js';
4
+ import { d as stringToNumber } from './utils-6c73709d.js';
5
+ import { F as FImage } from './f-image-3bc8b24f.js';
6
+ import { F as FChip } from './f-chip-c0e9c0ff.js';
7
+
8
+ /*-------------------------------------------------*/
9
+ /* C o m p o n e n t */
10
+ /*-------------------------------------------------*/
11
+ const FTextField = (props, children) => {
12
+ return (h("div", Object.assign({ class: `f-text-field ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
13
+ props.leadingLabel || props.trailingLabel ? (h("div", { class: `mdc-form-field ${props.leadingLabel ? 'mdc-form-field--align-end' : ''}` }, [
14
+ setContent(props),
15
+ setHelper(props),
16
+ h("label", null, props.label),
17
+ ])) : ([setContent(props), setHelper(props)]),
18
+ children));
19
+ };
20
+ /*-------------------------------------------------*/
21
+ /* M e t h o d s */
22
+ /*-------------------------------------------------*/
23
+ function setContent(props) {
24
+ const isOutlined = props.textArea || props.outlined;
25
+ let labelEl;
26
+ let iconEl;
27
+ if (props.label && !props.leadingLabel && !props.trailingLabel) {
28
+ labelEl = (h("label", { class: "mdc-floating-label", htmlFor: "kup-input" }, props.label));
29
+ }
30
+ if (props.icon) {
31
+ let iconStyle;
32
+ let iconClass = '';
33
+ if (Object.values(KupThemeIconValues).indexOf(props.icon) > -1) {
34
+ iconClass = props.icon.replace('--', '');
35
+ }
36
+ else {
37
+ let svg = `url('${getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
38
+ iconStyle = {
39
+ mask: svg,
40
+ webkitMask: svg,
41
+ };
42
+ }
43
+ iconEl = (h("span", { tabindex: "0", style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
44
+ }
45
+ const classObj = {
46
+ 'is-clearable': props.isClearable,
47
+ 'mdc-text-field': true,
48
+ 'mdc-text-field--disabled': props.disabled,
49
+ 'mdc-text-field--filled': !props.fullWidth && !isOutlined,
50
+ 'mdc-text-field--no-label': !props.label,
51
+ 'mdc-text-field--fullwidth': props.fullWidth,
52
+ 'mdc-text-field--outlined': isOutlined,
53
+ 'mdc-text-field--textarea': props.textArea,
54
+ 'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
55
+ 'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
56
+ };
57
+ return (h("div", { class: classObj },
58
+ props.textArea && props.maxLength ? (h("div", { class: "mdc-text-field-character-counter" },
59
+ "'0 / ' + ",
60
+ props.maxLength)) : undefined,
61
+ !props.trailingIcon ? iconEl : undefined,
62
+ props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
63
+ h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
64
+ props.isClearable ? (h("span", { tabindex: "1", class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
65
+ props.trailingIcon ? iconEl : undefined,
66
+ !props.fullWidth && !isOutlined ? labelEl : undefined,
67
+ isOutlined ? (h("div", { class: "mdc-notched-outline" },
68
+ h("div", { class: "mdc-notched-outline__leading" }),
69
+ h("div", { class: "mdc-notched-outline__notch" }, labelEl),
70
+ h("div", { class: "mdc-notched-outline__trailing" }))) : (h("span", { class: "mdc-line-ripple" }))));
71
+ }
72
+ function setHelper(props) {
73
+ if (props.helperEnabled) {
74
+ if (props.helper) {
75
+ const classObj = {
76
+ 'mdc-text-field-helper-text': true,
77
+ 'mdc-text-field-helper-text--persistent': !props.helperWhenFocused,
78
+ };
79
+ return (h("div", { class: "mdc-text-field-helper-line" },
80
+ h("div", { class: classObj }, props.helper),
81
+ props.maxLength && !props.textArea ? (h("div", { class: "mdc-text-field-character-counter" },
82
+ "'0 / ' + ",
83
+ props.maxLength.toString())) : undefined));
84
+ }
85
+ else {
86
+ if (props.maxLength && !props.textArea) {
87
+ return (h("div", { class: "mdc-text-field-helper-line" },
88
+ h("div", { class: "mdc-text-field-character-counter" },
89
+ "'0 / ' + ",
90
+ props.maxLength)));
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ const autoAlignComps = ['KUP-DATA-TABLE', 'KUP-TREE'];
97
+ /**
98
+ * Supported cell events.
99
+ */
100
+ var FCellEvents;
101
+ (function (FCellEvents) {
102
+ FCellEvents["CLICK"] = "kup-cell-click";
103
+ FCellEvents["INPUT"] = "kup-cell-input";
104
+ FCellEvents["UPDATE"] = "kup-cell-update";
105
+ })(FCellEvents || (FCellEvents = {}));
106
+ /**
107
+ * Supported cell padding.
108
+ */
109
+ var FCellPadding;
110
+ (function (FCellPadding) {
111
+ FCellPadding["DENSE"] = "dense";
112
+ FCellPadding["MEDIUM"] = "medium";
113
+ FCellPadding["NONE"] = "";
114
+ FCellPadding["WIDE"] = "wide";
115
+ })(FCellPadding || (FCellPadding = {}));
116
+ /**
117
+ * Supported cell CSS classes.
118
+ */
119
+ var FCellClasses;
120
+ (function (FCellClasses) {
121
+ FCellClasses["BG_DANGER"] = "danger-bg";
122
+ FCellClasses["BG_GREEN"] = "green-bg";
123
+ FCellClasses["BG_GREY"] = "grey-bg";
124
+ FCellClasses["BG_ORANGE"] = "orange-bg";
125
+ FCellClasses["BG_PURPLE"] = "purple-bg";
126
+ FCellClasses["BG_SUCCESS"] = "success-bg";
127
+ FCellClasses["BG_TEAL"] = "teal-bg";
128
+ FCellClasses["BG_WARNING"] = "warning-bg";
129
+ FCellClasses["C_BG_DANGER"] = "c-danger-bg";
130
+ FCellClasses["C_BG_GREEN"] = "c-green-bg";
131
+ FCellClasses["C_BG_GREY"] = "c-grey-bg";
132
+ FCellClasses["C_BG_ORANGE"] = "c-orange-bg";
133
+ FCellClasses["C_BG_PURPLE"] = "c-purple-bg";
134
+ FCellClasses["C_BG_SUCCESS"] = "c-success-bg";
135
+ FCellClasses["C_BG_TEAL"] = "c-teal-bg";
136
+ FCellClasses["C_BG_WARNING"] = "c-warning-bg";
137
+ FCellClasses["C_CENTERED"] = "c-centered";
138
+ FCellClasses["C_FITTED"] = "c-fitted";
139
+ FCellClasses["C_PADDED"] = "c-padded";
140
+ FCellClasses["C_PADDED_HOR"] = "c-padded-hor";
141
+ FCellClasses["C_PADDED_VER"] = "c-padded-ver";
142
+ FCellClasses["C_ROUND"] = "c-round";
143
+ FCellClasses["C_RIGHT_ALIGNED"] = "c-right-aligned";
144
+ FCellClasses["C_SHAPED"] = "c-shaped";
145
+ FCellClasses["C_TEXT_VERTICAL"] = "c-vertical-text";
146
+ FCellClasses["CLICKABLE"] = "clickable";
147
+ FCellClasses["HOVER_DISPLAY"] = "display-on-hover";
148
+ FCellClasses["HOVER_EXPAND"] = "expand-on-hover";
149
+ FCellClasses["HOVER_REDUCE"] = "reduce-on-hover";
150
+ FCellClasses["INDICATOR_TOPRIGHT"] = "top-right-indicator";
151
+ FCellClasses["LINK"] = "link";
152
+ FCellClasses["MONOSPACE"] = "monospace";
153
+ FCellClasses["OBJ"] = "obj";
154
+ FCellClasses["SHAPED"] = "shaped";
155
+ FCellClasses["TEXT_DANGER"] = "danger-text";
156
+ FCellClasses["TEXT_INFO"] = "info-text";
157
+ FCellClasses["TEXT_PRIMARY"] = "primary-text";
158
+ FCellClasses["TEXT_PURPLE"] = "purple-text";
159
+ FCellClasses["TEXT_SECONDARY"] = "secondary-text";
160
+ FCellClasses["TEXT_STRONG"] = "strong-text";
161
+ FCellClasses["TEXT_SUCCESS"] = "success-text";
162
+ FCellClasses["TEXT_WARNING"] = "warning-text";
163
+ FCellClasses["UNDERLINED"] = "underlined";
164
+ })(FCellClasses || (FCellClasses = {}));
165
+ /**
166
+ * Supported cell shapes.
167
+ */
168
+ var FCellShapes;
169
+ (function (FCellShapes) {
170
+ FCellShapes["AUTOCOMPLETE"] = "ACP";
171
+ FCellShapes["BUTTON_LIST"] = "BTN";
172
+ FCellShapes["CHART"] = "GRA";
173
+ FCellShapes["CHECKBOX"] = "CHK";
174
+ FCellShapes["CHIP"] = "CHI";
175
+ FCellShapes["COLOR_PICKER"] = "CLP";
176
+ FCellShapes["COMBOBOX"] = "CMB";
177
+ FCellShapes["EDITOR"] = "EDT";
178
+ FCellShapes["GAUGE"] = "GAU";
179
+ FCellShapes["IMAGE"] = "IMG";
180
+ FCellShapes["KNOB"] = "KNB";
181
+ FCellShapes["PROGRESS_BAR"] = "PGB";
182
+ FCellShapes["RADIO"] = "RAD";
183
+ FCellShapes["RATING"] = "RTG";
184
+ FCellShapes["TEXT_FIELD"] = "ITX";
185
+ })(FCellShapes || (FCellShapes = {}));
186
+ /**
187
+ * Supported cell types.
188
+ */
189
+ var FCellTypes;
190
+ (function (FCellTypes) {
191
+ FCellTypes["AUTOCOMPLETE"] = "autocomplete";
192
+ FCellTypes["BAR"] = "bar";
193
+ FCellTypes["BUTTON"] = "button";
194
+ FCellTypes["BUTTON_LIST"] = "button-list";
195
+ FCellTypes["CHART"] = "chart";
196
+ FCellTypes["CHECKBOX"] = "checkbox";
197
+ FCellTypes["CHIP"] = "chips";
198
+ FCellTypes["COLOR_PICKER"] = "color-picker";
199
+ FCellTypes["COMBOBOX"] = "combobox";
200
+ FCellTypes["DATE"] = "date";
201
+ FCellTypes["DATETIME"] = "datetime";
202
+ FCellTypes["EDITOR"] = "editor";
203
+ FCellTypes["GAUGE"] = "gauge";
204
+ FCellTypes["ICON"] = "icon";
205
+ FCellTypes["IMAGE"] = "image";
206
+ FCellTypes["KNOB"] = "knob";
207
+ FCellTypes["LINK"] = "link";
208
+ FCellTypes["NUMBER"] = "number";
209
+ FCellTypes["PROGRESS_BAR"] = "progress-bar";
210
+ FCellTypes["RADIO"] = "radio";
211
+ FCellTypes["RATING"] = "rating";
212
+ FCellTypes["STRING"] = "string";
213
+ FCellTypes["TIME"] = "time";
214
+ })(FCellTypes || (FCellTypes = {}));
215
+ const editableTypes = [
216
+ FCellTypes.AUTOCOMPLETE,
217
+ FCellTypes.CHECKBOX,
218
+ FCellTypes.COLOR_PICKER,
219
+ FCellTypes.COMBOBOX,
220
+ FCellTypes.DATE,
221
+ FCellTypes.NUMBER,
222
+ FCellTypes.RATING,
223
+ FCellTypes.STRING,
224
+ FCellTypes.TIME,
225
+ ];
226
+ const kupTypes = [
227
+ FCellTypes.BAR,
228
+ FCellTypes.BUTTON,
229
+ FCellTypes.BUTTON_LIST,
230
+ FCellTypes.CHART,
231
+ FCellTypes.CHIP,
232
+ FCellTypes.COLOR_PICKER,
233
+ FCellTypes.GAUGE,
234
+ FCellTypes.KNOB,
235
+ FCellTypes.PROGRESS_BAR,
236
+ FCellTypes.RADIO,
237
+ FCellTypes.RATING,
238
+ ];
239
+
240
+ /*-------------------------------------------------*/
241
+ /* C o m p o n e n t */
242
+ /*-------------------------------------------------*/
243
+ const FCheckbox = (props) => {
244
+ const indeterminateAttr = {
245
+ 'data-indeterminate': props.indeterminate ? true : false,
246
+ };
247
+ const classObj = {
248
+ checkbox: true,
249
+ 'checkbox--checked': props.checked && !props.indeterminate ? true : false,
250
+ 'checkbox--disabled': props.disabled ? true : false,
251
+ 'checkbox--indeterminate': props.indeterminate ? true : false,
252
+ };
253
+ return (h("div", Object.assign({ class: `f-checkbox ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
254
+ h("div", { class: `form-field ${props.leadingLabel ? 'form-field--align-end' : ''}` },
255
+ h("div", { class: classObj },
256
+ h("input", Object.assign({ type: "checkbox", class: "checkbox__native-control", checked: props.checked, disabled: props.disabled, onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus }, indeterminateAttr, { value: props.checked ? 'on' : 'off' })),
257
+ h("div", { class: "checkbox__background", onClick: props.onChange },
258
+ h("svg", { class: "checkbox__checkmark", viewBox: "0 0 24 24" },
259
+ h("path", { class: "checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })),
260
+ h("div", { class: "checkbox__mixedmark" }))),
261
+ props.label ? h("label", null, props.label) : undefined)));
262
+ };
263
+
264
+ const dom = document.documentElement;
265
+ /*-------------------------------------------------*/
266
+ /* C o m p o n e n t */
267
+ /*-------------------------------------------------*/
268
+ const FCell = (props) => {
269
+ const cell = props.cell;
270
+ const column = props.column;
271
+ const row = props.row;
272
+ const shape = props.shape
273
+ ? props.shape
274
+ : cell.shape
275
+ ? cell.shape
276
+ : column.shape
277
+ ? column.shape
278
+ : null;
279
+ const hasObj = !dom.ketchup.objects.isEmptyKupObj(cell.obj);
280
+ const isEditable = cell.isEditable && props.editable ? true : false;
281
+ const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
282
+ const cellType = getCellType(cell, shape);
283
+ const subcomponentProps = Object.assign({}, cell.data);
284
+ let cssClasses = cell.cssClass
285
+ ? cell.cssClass
286
+ : column.cssClass
287
+ ? column.cssClass
288
+ : '';
289
+ const classObj = {
290
+ 'f-cell': true,
291
+ [FCellClasses.OBJ]: hasObj ? true : false,
292
+ [cellType + '-cell']: true,
293
+ [props.wrapperClass]: props.wrapperClass ? true : false,
294
+ [props.density]: props.density && cellType !== FCellTypes.BAR ? true : false,
295
+ [cssClasses]: cssClasses ? true : false,
296
+ };
297
+ let content = valueToDisplay;
298
+ if (isEditable && editableTypes.includes(cellType)) {
299
+ content = setEditableCell(cellType, classObj, cell, column, props);
300
+ }
301
+ else if (cell.data && kupTypes.includes(cellType)) {
302
+ if (props.setSizes) {
303
+ setCellSizeKup(cellType, subcomponentProps, cell);
304
+ }
305
+ if (!props.renderKup) {
306
+ const lazyClass = 'cell-' + cellType + ' placeholder';
307
+ content = h("span", { class: lazyClass });
308
+ }
309
+ else {
310
+ content = setKupCell(cellType, classObj, subcomponentProps, cell, row, column, props);
311
+ }
312
+ }
313
+ else {
314
+ if (props.setSizes) {
315
+ setCellSize(cellType, subcomponentProps, cell, props);
316
+ }
317
+ content = setCell(cellType, subcomponentProps, content, classObj, cell, column, props);
318
+ }
319
+ let icon = null;
320
+ if (!isEditable && (column.icon || cell.icon) && content) {
321
+ const fProps = {
322
+ color: `rgba(var(${KupThemeColorValues.TEXT}-rgb), 0.375)`,
323
+ resource: cell.icon ? cell.icon : column.icon,
324
+ sizeX: '1.25em',
325
+ sizeY: '1.25em',
326
+ wrapperClass: 'obj-icon',
327
+ };
328
+ icon = h(FImage, Object.assign({}, fProps));
329
+ }
330
+ let cellTitle = null;
331
+ if (dom.ketchup.debug.isDebug() && hasObj) {
332
+ cellTitle = cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
333
+ }
334
+ else if (cell.title != null && cell.title.trim() != '') {
335
+ cellTitle = cell.title;
336
+ }
337
+ let infoEl = null;
338
+ if (cell.info) {
339
+ const info = Object.assign({}, cell.info);
340
+ if (!info.color) {
341
+ info.color = `var(${KupThemeColorValues.INFO})`;
342
+ }
343
+ if (!info.icon) {
344
+ info.icon = 'info';
345
+ }
346
+ const fProps = {
347
+ color: info.color,
348
+ resource: info.icon,
349
+ sizeX: '1.25em',
350
+ sizeY: '1.25em',
351
+ title: info.message ? info.message : '',
352
+ wrapperClass: 'cell-info',
353
+ };
354
+ infoEl = h(FImage, Object.assign({}, fProps));
355
+ }
356
+ return (h("div", { class: classObj, style: cell.style },
357
+ h("div", { class: "f-cell__content", style: cell.styleContent, title: cellTitle },
358
+ props.indents,
359
+ infoEl,
360
+ icon,
361
+ content)));
362
+ };
363
+ function setCellSize(cellType, subcomponentProps, cell, props) {
364
+ switch (cellType) {
365
+ case FCellTypes.CHECKBOX:
366
+ case FCellTypes.ICON:
367
+ if (!subcomponentProps.sizeX) {
368
+ subcomponentProps.sizeX = '18px';
369
+ }
370
+ if (!subcomponentProps.sizeY) {
371
+ subcomponentProps.sizeY = '18px';
372
+ }
373
+ if (cell.style) {
374
+ if (!cell.style.height) {
375
+ cell.style['minHeight'] = subcomponentProps.sizeY;
376
+ }
377
+ }
378
+ else {
379
+ cell.style = {
380
+ minHeight: subcomponentProps.sizeY,
381
+ };
382
+ }
383
+ break;
384
+ case FCellTypes.IMAGE:
385
+ if (props.component.rootElement.tagName ===
386
+ 'KUP-BOX') {
387
+ if (!subcomponentProps.sizeY) {
388
+ subcomponentProps.sizeY = 'auto';
389
+ }
390
+ if (subcomponentProps.fit === undefined) {
391
+ subcomponentProps.fit = true;
392
+ }
393
+ }
394
+ else if (!subcomponentProps.sizeX) {
395
+ subcomponentProps.sizeX = 'auto';
396
+ }
397
+ if (!subcomponentProps.sizeY) {
398
+ subcomponentProps.sizeY = '64px';
399
+ }
400
+ break;
401
+ }
402
+ }
403
+ function setCellSizeKup(cellType, subcomponentProps, cell) {
404
+ switch (cellType) {
405
+ case FCellTypes.BAR:
406
+ if (!subcomponentProps.sizeY) {
407
+ subcomponentProps.sizeY = '26px';
408
+ }
409
+ break;
410
+ case FCellTypes.BUTTON:
411
+ let height = '';
412
+ if (subcomponentProps.label) {
413
+ height = '36px';
414
+ }
415
+ if (cell.style) {
416
+ if (!cell.style.height) {
417
+ cell.style['minHeight'] = height;
418
+ }
419
+ }
420
+ else {
421
+ cell.style = { minHeight: height };
422
+ }
423
+ break;
424
+ case FCellTypes.CHART:
425
+ if (!subcomponentProps.sizeX) {
426
+ subcomponentProps.sizeX = '100%';
427
+ }
428
+ if (!subcomponentProps.sizeY) {
429
+ subcomponentProps.sizeY = '100%';
430
+ }
431
+ break;
432
+ case FCellTypes.CHIP:
433
+ if (cell.style) {
434
+ if (!cell.style.height) {
435
+ cell.style['minHeight'] = '40px';
436
+ }
437
+ }
438
+ else {
439
+ cell.style = { minHeight: '40px' };
440
+ }
441
+ break;
442
+ case FCellTypes.RADIO:
443
+ if (cell.style) {
444
+ if (!cell.style.height) {
445
+ cell.style['minHeight'] = '40px';
446
+ }
447
+ }
448
+ else {
449
+ cell.style = { minHeight: '40px' };
450
+ }
451
+ break;
452
+ }
453
+ }
454
+ function setEditableCell(cellType, classObj, cell, column, props) {
455
+ switch (cellType) {
456
+ case FCellTypes.AUTOCOMPLETE:
457
+ return (h("kup-autocomplete", Object.assign({}, cell.data, { class: "kup-full-width", "onkup-autocomplete-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-autocomplete-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
458
+ case FCellTypes.CHECKBOX:
459
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
460
+ classObj[FCellClasses.C_CENTERED] = true;
461
+ }
462
+ return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
463
+ case FCellTypes.COLOR_PICKER:
464
+ return (h("kup-color-picker", Object.assign({}, cell.data, { disabled: false, "onkup-colorpicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
465
+ case FCellTypes.COMBOBOX:
466
+ return (h("kup-combobox", Object.assign({}, cell.data, { class: "kup-full-width", "onkup-combobox-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-combobox-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
467
+ case FCellTypes.DATE:
468
+ return (h("kup-date-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: "kup-full-width", "onkup-datepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-datepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
469
+ case FCellTypes.RATING:
470
+ return (h("kup-rating", Object.assign({}, cell.data, { disabled: false, "onkup-rating-click": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
471
+ case FCellTypes.TIME:
472
+ return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: "kup-full-width", "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
473
+ case FCellTypes.NUMBER:
474
+ classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
475
+ case FCellTypes.STRING:
476
+ return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: true, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
477
+ ? stringToNumber(cell.value).toString()
478
+ : cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
479
+ }
480
+ }
481
+ function setCell(cellType, subcomponentProps, content, classObj, cell, column, props) {
482
+ switch (cellType) {
483
+ case FCellTypes.AUTOCOMPLETE:
484
+ case FCellTypes.COMBOBOX:
485
+ case FCellTypes.DATE:
486
+ case FCellTypes.DATETIME:
487
+ case FCellTypes.TIME:
488
+ if (content && content != '') {
489
+ const cellValue = getCellValueForDisplay(column, cell);
490
+ return h("div", { class: "f-cell__text" }, cellValue);
491
+ }
492
+ return content;
493
+ case FCellTypes.CHECKBOX:
494
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
495
+ classObj[FCellClasses.C_CENTERED] = true;
496
+ }
497
+ return (h(FImage, { resource: subcomponentProps.checked
498
+ ? 'check_box'
499
+ : 'check_box_outline_blank', sizeX: "18px", sizeY: "18px" }));
500
+ case FCellTypes.EDITOR:
501
+ return h("div", { innerHTML: cell.value });
502
+ case FCellTypes.ICON:
503
+ case FCellTypes.IMAGE:
504
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
505
+ classObj[FCellClasses.C_CENTERED] = true;
506
+ }
507
+ if (subcomponentProps.badgeData) {
508
+ classObj[FCellClasses.C_PADDED] = true;
509
+ }
510
+ return h(FImage, Object.assign({}, subcomponentProps));
511
+ case FCellTypes.LINK:
512
+ return (h("a", { href: content, target: "_blank" }, cell.value));
513
+ case FCellTypes.NUMBER:
514
+ if (content && content != '') {
515
+ const cellValueNumber = stringToNumber(cell.value);
516
+ const cellValue = getCellValueForDisplay(column, cell);
517
+ if (cellValueNumber < 0) {
518
+ classObj[FCellClasses.TEXT_DANGER] = true;
519
+ }
520
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
521
+ classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
522
+ }
523
+ return h("div", { class: "f-cell__text" }, cellValue);
524
+ }
525
+ return h("div", { class: "f-cell__text" }, content);
526
+ default:
527
+ return h("div", { class: "f-cell__text" }, content);
528
+ }
529
+ }
530
+ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, props) {
531
+ switch (cellType) {
532
+ case FCellTypes.BAR:
533
+ if (!subcomponentProps.data) {
534
+ return h("kup-image", Object.assign({}, subcomponentProps));
535
+ }
536
+ else {
537
+ const barStyle = {
538
+ height: subcomponentProps.sizeY,
539
+ };
540
+ return (h("div", { style: barStyle },
541
+ h(FImage, Object.assign({}, subcomponentProps))));
542
+ }
543
+ case FCellTypes.BUTTON:
544
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
545
+ classObj[FCellClasses.C_CENTERED] = true;
546
+ }
547
+ return (h("kup-button", Object.assign({}, subcomponentProps, { "onkup-button-click": (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
548
+ case FCellTypes.BUTTON_LIST:
549
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
550
+ classObj[FCellClasses.C_CENTERED] = true;
551
+ }
552
+ subcomponentProps['data-storage'] = {
553
+ cell: cell,
554
+ row: row,
555
+ column: column,
556
+ };
557
+ return h("kup-button-list", Object.assign({}, subcomponentProps));
558
+ case FCellTypes.CHART:
559
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
560
+ classObj[FCellClasses.C_CENTERED] = true;
561
+ }
562
+ return h("kup-chart", Object.assign({}, subcomponentProps));
563
+ case FCellTypes.CHIP:
564
+ return h(FChip, Object.assign({}, subcomponentProps));
565
+ case FCellTypes.COLOR_PICKER:
566
+ return (h("kup-color-picker", Object.assign({}, subcomponentProps, { disabled: true })));
567
+ case FCellTypes.GAUGE:
568
+ return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "280px" }, subcomponentProps)));
569
+ case FCellTypes.KNOB:
570
+ case FCellTypes.PROGRESS_BAR:
571
+ return h("kup-progress-bar", Object.assign({}, subcomponentProps));
572
+ case FCellTypes.RADIO:
573
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
574
+ classObj[FCellClasses.C_CENTERED] = true;
575
+ }
576
+ subcomponentProps['disabled'] = row.readOnly;
577
+ return h("kup-radio", Object.assign({}, subcomponentProps));
578
+ case FCellTypes.RATING:
579
+ return h("kup-rating", Object.assign({}, subcomponentProps, { disabled: true }));
580
+ }
581
+ }
582
+ function getCellType(cell, shape) {
583
+ const obj = cell.obj;
584
+ if (shape) {
585
+ switch (shape.toUpperCase()) {
586
+ case FCellShapes.AUTOCOMPLETE:
587
+ return FCellTypes.AUTOCOMPLETE;
588
+ case FCellShapes.BUTTON_LIST:
589
+ return FCellTypes.BUTTON_LIST;
590
+ case FCellShapes.CHART:
591
+ return FCellTypes.CHART;
592
+ case FCellShapes.CHECKBOX:
593
+ return FCellTypes.CHECKBOX;
594
+ case FCellShapes.CHIP:
595
+ return FCellTypes.CHIP;
596
+ case FCellShapes.COLOR_PICKER:
597
+ return FCellTypes.COLOR_PICKER;
598
+ case FCellShapes.COMBOBOX:
599
+ return FCellTypes.COMBOBOX;
600
+ case FCellShapes.EDITOR:
601
+ return FCellTypes.EDITOR;
602
+ case FCellShapes.GAUGE:
603
+ return FCellTypes.GAUGE;
604
+ case FCellShapes.IMAGE:
605
+ return FCellTypes.IMAGE;
606
+ case FCellShapes.KNOB:
607
+ return FCellTypes.KNOB;
608
+ case FCellShapes.PROGRESS_BAR:
609
+ return FCellTypes.PROGRESS_BAR;
610
+ case FCellShapes.RADIO:
611
+ return FCellTypes.RADIO;
612
+ case FCellShapes.RATING:
613
+ return FCellTypes.RATING;
614
+ case FCellShapes.TEXT_FIELD:
615
+ return FCellTypes.STRING;
616
+ }
617
+ }
618
+ if (dom.ketchup.objects.isBar(obj)) {
619
+ return FCellTypes.BAR;
620
+ }
621
+ else if (dom.ketchup.objects.isButton(obj)) {
622
+ return FCellTypes.BUTTON;
623
+ }
624
+ else if (dom.ketchup.objects.isChart(obj)) {
625
+ return FCellTypes.CHART;
626
+ }
627
+ else if (dom.ketchup.objects.isCheckbox(obj)) {
628
+ return FCellTypes.CHECKBOX;
629
+ }
630
+ else if (dom.ketchup.objects.isColor(obj)) {
631
+ return FCellTypes.COLOR_PICKER;
632
+ }
633
+ else if (dom.ketchup.objects.isIcon(obj)) {
634
+ return FCellTypes.ICON;
635
+ }
636
+ else if (dom.ketchup.objects.isImage(obj)) {
637
+ return FCellTypes.IMAGE;
638
+ }
639
+ else if (dom.ketchup.objects.isLink(obj)) {
640
+ return FCellTypes.LINK;
641
+ }
642
+ else if (dom.ketchup.objects.isProgressBar(obj)) {
643
+ return FCellTypes.PROGRESS_BAR;
644
+ }
645
+ else if (dom.ketchup.objects.isRadio(obj)) {
646
+ return FCellTypes.RADIO;
647
+ }
648
+ else if (dom.ketchup.objects.isKupObjList(obj)) {
649
+ return FCellTypes.CHIP;
650
+ }
651
+ else if (dom.ketchup.objects.isNumber(obj)) {
652
+ return FCellTypes.NUMBER;
653
+ }
654
+ else if (dom.ketchup.objects.isDate(obj)) {
655
+ return FCellTypes.DATE;
656
+ }
657
+ else if (dom.ketchup.objects.isTimestamp(obj)) {
658
+ return FCellTypes.DATETIME;
659
+ }
660
+ else if (dom.ketchup.objects.isTime(obj)) {
661
+ return FCellTypes.TIME;
662
+ }
663
+ else if (dom.ketchup.objects.isVoCodver(obj)) {
664
+ return FCellTypes.ICON;
665
+ }
666
+ else {
667
+ return FCellTypes.STRING;
668
+ }
669
+ }
670
+ function cellEvent(e, props, cellType, cellEventName) {
671
+ const cell = props.cell;
672
+ const column = props.column;
673
+ const comp = props.component;
674
+ const row = props.row;
675
+ const isInputEvent = !!(e.target.tagName === 'INPUT');
676
+ let value = isInputEvent
677
+ ? e.target.value
678
+ : e.detail.value;
679
+ if (cellEventName === FCellEvents.UPDATE) {
680
+ switch (cellType) {
681
+ case FCellTypes.AUTOCOMPLETE:
682
+ case FCellTypes.COMBOBOX:
683
+ case FCellTypes.DATE:
684
+ case FCellTypes.TIME:
685
+ if (cell.data) {
686
+ cell.data['initialValue'] = value;
687
+ }
688
+ break;
689
+ case FCellTypes.CHECKBOX:
690
+ value = value === 'on' ? '0' : '1';
691
+ if (cell.data) {
692
+ cell.data.checked =
693
+ value === '0' ? false : true;
694
+ }
695
+ break;
696
+ }
697
+ if (cell.obj) {
698
+ cell.obj.k = value;
699
+ }
700
+ cell.value = value;
701
+ cell.displayedValue = null;
702
+ cell.displayedValue = getCellValueForDisplay(column, cell);
703
+ }
704
+ if (comp && comp.rootElement) {
705
+ const updateEvent = new CustomEvent(cellEventName, {
706
+ bubbles: true,
707
+ cancelable: true,
708
+ composed: true,
709
+ detail: {
710
+ comp: comp,
711
+ id: comp.rootElement.id,
712
+ cell: cell,
713
+ column: column,
714
+ event: e,
715
+ row: row,
716
+ type: cellType,
717
+ },
718
+ });
719
+ comp.rootElement.dispatchEvent(updateEvent);
720
+ try {
721
+ comp.refresh();
722
+ }
723
+ catch (error) { }
724
+ }
725
+ }
726
+
727
+ export { FTextField as F, FCell as a, FCheckbox as b, FCellPadding as c };