@sme.up/ketchup 4.0.0 → 4.2.0-SNAPSHOT

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/cell-utils-1d44a3f0.js +168 -0
  3. package/dist/cjs/f-button-a5788453.js +105 -0
  4. package/dist/cjs/f-cell-eba6f39e.js +727 -0
  5. package/dist/cjs/f-chip-ce69b7d2.js +141 -0
  6. package/dist/cjs/{f-image-5f4f29ca.js → f-image-e03842eb.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} +1678 -2558
  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-75f1a2cd.js +5794 -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-b3ec89fe.js} +18 -26
  27. package/dist/collection/assets/cell.js +51 -0
  28. package/dist/collection/assets/data-table.js +518 -45
  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/dialog/kup-card-dialog.js +18 -0
  48. package/dist/collection/components/kup-card/kup-card-helper.js +19 -1
  49. package/dist/collection/components/kup-card/kup-card.css +147 -216
  50. package/dist/collection/components/kup-card/kup-card.js +80 -29
  51. package/dist/collection/components/kup-card/standard/kup-card-standard.js +75 -0
  52. package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -0
  53. package/dist/collection/components/kup-cell/kup-cell.css +20 -0
  54. package/dist/collection/components/kup-cell/kup-cell.js +413 -0
  55. package/dist/collection/components/kup-chart/kup-chart.js +41 -42
  56. package/dist/collection/components/kup-checkbox/kup-checkbox.css +0 -214
  57. package/dist/collection/components/kup-checkbox/kup-checkbox.js +19 -20
  58. package/dist/collection/components/kup-chip/kup-chip.css +0 -217
  59. package/dist/collection/components/kup-chip/kup-chip.js +15 -16
  60. package/dist/collection/components/kup-color-picker/kup-color-picker.css +7 -2380
  61. package/dist/collection/components/kup-color-picker/kup-color-picker.js +41 -41
  62. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
  63. package/dist/collection/components/kup-combobox/kup-combobox.css +5 -2381
  64. package/dist/collection/components/kup-combobox/kup-combobox.js +68 -28
  65. package/dist/collection/components/kup-dash-list/kup-dash-list.js +13 -4
  66. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
  67. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +61 -102
  68. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  69. package/dist/collection/components/kup-data-table/kup-data-table.css +127 -3203
  70. package/dist/collection/components/kup-data-table/kup-data-table.js +568 -1085
  71. package/dist/collection/components/kup-date-picker/kup-date-picker.css +6 -8
  72. package/dist/collection/components/kup-date-picker/kup-date-picker.js +77 -106
  73. package/dist/collection/components/kup-drawer/kup-drawer.js +9 -10
  74. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +12 -340
  75. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +56 -45
  76. package/dist/collection/components/kup-field/kup-field.js +21 -22
  77. package/dist/collection/components/kup-gauge/kup-gauge.js +17 -18
  78. package/dist/collection/components/kup-grid/kup-grid.css +2 -1
  79. package/dist/collection/components/kup-grid/kup-grid.js +13 -14
  80. package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
  81. package/dist/collection/components/kup-image/assets/svg/ketchup.svg +74 -0
  82. package/dist/collection/components/kup-image/assets/svg/smeup.svg +59 -0
  83. package/dist/collection/components/kup-image/kup-image.css +0 -32
  84. package/dist/collection/components/kup-image/kup-image.js +25 -26
  85. package/dist/collection/components/kup-lazy/kup-lazy.js +17 -18
  86. package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
  87. package/dist/collection/components/kup-list/kup-list.css +4 -260
  88. package/dist/collection/components/kup-list/kup-list.js +39 -49
  89. package/dist/collection/components/kup-magic-box/kup-magic-box.css +13 -39
  90. package/dist/collection/components/kup-magic-box/kup-magic-box.js +29 -38
  91. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +11 -12
  92. package/dist/collection/components/kup-paginator/kup-paginator.css +0 -332
  93. package/dist/collection/components/kup-paginator/kup-paginator.js +44 -12
  94. package/dist/collection/components/kup-probe/kup-probe.js +9 -9
  95. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +21 -22
  96. package/dist/collection/components/kup-radio/kup-radio.js +17 -18
  97. package/dist/collection/components/kup-rating/kup-rating.js +15 -16
  98. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -0
  99. package/dist/collection/components/kup-snackbar/kup-snackbar.css +75 -0
  100. package/dist/collection/components/kup-snackbar/kup-snackbar.js +390 -0
  101. package/dist/collection/components/kup-spinner/kup-spinner.js +23 -24
  102. package/dist/collection/components/kup-switch/kup-switch.css +0 -156
  103. package/dist/collection/components/kup-switch/kup-switch.js +17 -18
  104. package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +0 -199
  105. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +13 -14
  106. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
  107. package/dist/collection/components/kup-text-field/kup-text-field.css +3 -2371
  108. package/dist/collection/components/kup-text-field/kup-text-field.js +77 -51
  109. package/dist/collection/components/kup-time-picker/kup-time-picker.css +6 -0
  110. package/dist/collection/components/kup-time-picker/kup-time-picker.js +55 -85
  111. package/dist/collection/components/kup-tooltip/kup-tooltip.js +24 -14
  112. package/dist/collection/components/kup-tree/kup-tree.css +27 -371
  113. package/dist/collection/components/kup-tree/kup-tree.js +158 -383
  114. package/dist/collection/f-components/f-button/f-button.js +4 -2
  115. package/dist/collection/f-components/f-cell/f-cell-declarations.js +143 -0
  116. package/dist/collection/f-components/f-cell/f-cell.js +467 -0
  117. package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
  118. package/dist/collection/f-components/f-chip/f-chip.js +2 -2
  119. package/dist/collection/f-components/f-image/f-image.js +2 -3
  120. package/dist/collection/f-components/f-switch/f-switch.js +1 -1
  121. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +1 -1
  122. package/dist/collection/f-components/f-text-field/f-text-field.js +25 -21
  123. package/dist/collection/utils/cell-utils.js +18 -222
  124. package/dist/collection/utils/filters/filters.js +31 -37
  125. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +15 -3
  126. package/dist/collection/utils/kup-dates/kup-dates.js +14 -2
  127. package/dist/collection/utils/kup-debug/kup-debug-browser-utils.js +3 -3
  128. package/dist/collection/utils/kup-debug/kup-debug.js +57 -29
  129. package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +5 -7
  130. package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
  131. package/dist/collection/utils/kup-interact/kup-interact.js +379 -0
  132. package/dist/collection/utils/kup-language/kup-language-declarations.js +2 -0
  133. package/dist/collection/utils/kup-language/kup-language.js +1 -1
  134. package/dist/collection/utils/kup-manager/kup-manager.js +47 -10
  135. package/dist/collection/utils/kup-objects/kup-objects.js +9 -33
  136. package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
  137. package/dist/collection/utils/kup-search/kup-search-declarations.js +1 -0
  138. package/dist/collection/utils/kup-search/kup-search.js +76 -0
  139. package/dist/collection/utils/kup-theme/kup-theme-declarations.js +1 -0
  140. package/dist/collection/utils/kup-theme/kup-theme.js +4 -3
  141. package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
  142. package/dist/collection/utils/utils.js +15 -23
  143. package/dist/esm/cell-utils-9a2914fc.js +160 -0
  144. package/dist/esm/f-button-55a9ed88.js +103 -0
  145. package/dist/esm/f-cell-ac520cb2.js +723 -0
  146. package/dist/esm/f-chip-babf1740.js +139 -0
  147. package/dist/esm/{f-image-68b34fab.js → f-image-70ca9dfe.js} +4 -5
  148. package/dist/esm/{index-bf2824a6.js → index-e0e67c23.js} +74 -65
  149. package/dist/esm/ketchup.js +3 -3
  150. package/dist/esm/kup-accordion.entry.js +6 -8
  151. package/dist/esm/{kup-autocomplete_29.entry.js → kup-autocomplete_28.entry.js} +1451 -2330
  152. package/dist/esm/kup-calendar.entry.js +10 -10
  153. package/dist/esm/kup-cell.entry.js +197 -0
  154. package/dist/esm/kup-dash-list.entry.js +15 -7
  155. package/dist/esm/kup-dash_2.entry.js +104 -62
  156. package/dist/esm/kup-drawer.entry.js +4 -6
  157. package/dist/esm/kup-field.entry.js +3 -5
  158. package/dist/esm/kup-iframe.entry.js +3 -4
  159. package/dist/esm/kup-lazy.entry.js +4 -6
  160. package/dist/esm/kup-magic-box.entry.js +21 -31
  161. package/dist/esm/kup-manager-bba32828.js +5781 -0
  162. package/dist/esm/kup-nav-bar.entry.js +4 -6
  163. package/dist/esm/kup-probe.entry.js +3 -4
  164. package/dist/esm/kup-qlik.entry.js +2 -3
  165. package/dist/esm/kup-snackbar.entry.js +148 -0
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/{utils-13dd007a.js → utils-cfcbe33f.js} +16 -23
  168. package/dist/ketchup/assets/svg/ketchup.svg +74 -0
  169. package/dist/ketchup/assets/svg/smeup.svg +59 -0
  170. package/dist/ketchup/ketchup.esm.js +1 -1
  171. package/dist/ketchup/p-03ae1be9.entry.js +1 -0
  172. package/dist/ketchup/p-06c209a5.js +1 -0
  173. package/dist/ketchup/p-1ce9a037.js +1 -0
  174. package/dist/ketchup/p-1e2c3497.js +1 -0
  175. package/dist/ketchup/p-40df35de.entry.js +1 -0
  176. package/dist/ketchup/{p-c7ee1fbc.js → p-4748be4b.js} +2 -2
  177. package/dist/ketchup/p-52038ccb.js +1 -0
  178. package/dist/ketchup/p-5db41fae.entry.js +45 -0
  179. package/dist/ketchup/p-5faf7715.entry.js +1 -0
  180. package/dist/ketchup/p-62208488.entry.js +1 -0
  181. package/dist/ketchup/p-69a705ae.entry.js +1 -0
  182. package/dist/ketchup/p-6cc8264d.entry.js +1 -0
  183. package/dist/ketchup/p-74259992.entry.js +1 -0
  184. package/dist/ketchup/p-756aa8b1.entry.js +1 -0
  185. package/dist/ketchup/p-a7687c0e.entry.js +27 -0
  186. package/dist/ketchup/p-cb5f4994.js +1 -0
  187. package/dist/ketchup/p-d58dbf0e.js +1 -0
  188. package/dist/ketchup/p-d6ce1ac6.entry.js +1 -0
  189. package/dist/ketchup/p-daf03877.entry.js +1 -0
  190. package/dist/ketchup/p-e90934b5.entry.js +1 -0
  191. package/dist/ketchup/p-ea387b49.entry.js +1 -0
  192. package/dist/ketchup/p-f6bff949.js +1 -0
  193. package/dist/ketchup/p-ff7d590e.entry.js +1 -0
  194. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -6
  195. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +7 -13
  196. package/dist/types/components/kup-box/kup-box-declarations.d.ts +13 -4
  197. package/dist/types/components/kup-box/kup-box.d.ts +13 -6
  198. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
  199. package/dist/types/components/kup-card/kup-card.d.ts +9 -0
  200. package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
  201. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -0
  202. package/dist/types/components/kup-cell/kup-cell.d.ts +67 -0
  203. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +1 -1
  204. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -2
  205. package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
  206. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +4 -0
  207. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +21 -32
  208. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +1 -15
  209. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  210. package/dist/types/components/kup-data-table/kup-data-table.d.ts +32 -81
  211. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +12 -14
  212. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -4
  213. package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
  214. package/dist/types/components/kup-list/kup-list.d.ts +2 -3
  215. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
  216. package/dist/types/components/kup-paginator/kup-paginator.d.ts +6 -0
  217. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -0
  218. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +79 -0
  219. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +2 -1
  220. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  221. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +8 -11
  222. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +1 -0
  223. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
  224. package/dist/types/components/kup-tree/kup-tree.d.ts +12 -23
  225. package/dist/types/components.d.ts +346 -174
  226. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +153 -0
  227. package/dist/types/f-components/f-cell/f-cell.d.ts +3 -0
  228. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  229. package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +1 -1
  230. package/dist/types/utils/cell-utils.d.ts +0 -19
  231. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -0
  232. package/dist/types/utils/kup-dates/kup-dates.d.ts +9 -4
  233. package/dist/types/utils/kup-debug/kup-debug.d.ts +1 -1
  234. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
  235. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
  236. package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
  237. package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
  238. package/dist/types/utils/kup-language/kup-language-declarations.d.ts +2 -0
  239. package/dist/types/utils/kup-language/kup-language.d.ts +1 -1
  240. package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +28 -8
  241. package/dist/types/utils/kup-manager/kup-manager.d.ts +18 -5
  242. package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
  243. package/dist/types/utils/kup-search/kup-search-declarations.d.ts +7 -0
  244. package/dist/types/utils/kup-search/kup-search.d.ts +20 -0
  245. package/dist/types/utils/kup-theme/kup-theme-declarations.d.ts +2 -0
  246. package/dist/types/utils/kup-theme/kup-theme.d.ts +2 -2
  247. package/dist/types/utils/utils.d.ts +0 -1
  248. package/package.json +4 -6
  249. package/dist/cjs/cell-utils-1f89a299.js +0 -1527
  250. package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
  251. package/dist/cjs/f-chip-2d58c8f7.js +0 -239
  252. package/dist/cjs/kup-grid.cjs.entry.js +0 -130
  253. package/dist/cjs/kup-manager-59ad8bdc.js +0 -4845
  254. package/dist/cjs/kup-objects-59ea949c.js +0 -717
  255. package/dist/collection/assets/images/drag-multiple.js +0 -1
  256. package/dist/collection/components/kup-editor/kup-editor.css +0 -5
  257. package/dist/collection/components/kup-editor/kup-editor.js +0 -59
  258. package/dist/collection/components/kup-layout/kup-layout.css +0 -53
  259. package/dist/collection/components/kup-layout/kup-layout.js +0 -156
  260. package/dist/collection/utils/drag-and-drop.js +0 -109
  261. package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
  262. package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
  263. package/dist/esm/cell-utils-cb612463.js +0 -1510
  264. package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
  265. package/dist/esm/f-chip-125d5dd6.js +0 -236
  266. package/dist/esm/kup-grid.entry.js +0 -126
  267. package/dist/esm/kup-manager-e7d7b353.js +0 -4842
  268. package/dist/esm/kup-objects-d38d2fa2.js +0 -711
  269. package/dist/ketchup/p-00fe1e3e.js +0 -1
  270. package/dist/ketchup/p-0320e24e.entry.js +0 -1
  271. package/dist/ketchup/p-08c7a092.js +0 -1
  272. package/dist/ketchup/p-1165f4ea.entry.js +0 -1
  273. package/dist/ketchup/p-170d3cba.js +0 -1
  274. package/dist/ketchup/p-18cb3ba3.js +0 -1
  275. package/dist/ketchup/p-23541a97.entry.js +0 -45
  276. package/dist/ketchup/p-64ea7e37.entry.js +0 -1
  277. package/dist/ketchup/p-7896031c.entry.js +0 -1
  278. package/dist/ketchup/p-876da4c2.entry.js +0 -1
  279. package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
  280. package/dist/ketchup/p-940ab57a.entry.js +0 -1
  281. package/dist/ketchup/p-9c858a38.entry.js +0 -1
  282. package/dist/ketchup/p-a12a5690.entry.js +0 -1
  283. package/dist/ketchup/p-a5424073.js +0 -1
  284. package/dist/ketchup/p-b0724035.entry.js +0 -1
  285. package/dist/ketchup/p-b14e77f0.js +0 -1
  286. package/dist/ketchup/p-d24cfdea.entry.js +0 -1
  287. package/dist/ketchup/p-ee89966f.entry.js +0 -27
  288. package/dist/ketchup/p-fcd2fd8f.js +0 -1
  289. package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
  290. package/dist/types/assets/images/drag-multiple.d.ts +0 -1
  291. package/dist/types/components/kup-editor/kup-editor.d.ts +0 -16
  292. package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
  293. package/dist/types/utils/drag-and-drop.d.ts +0 -53
  294. package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
  295. package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
@@ -5,7 +5,7 @@ const dom = document.documentElement;
5
5
  /*-------------------------------------------------*/
6
6
  /* C o m p o n e n t */
7
7
  /*-------------------------------------------------*/
8
- export const FButton = (props) => {
8
+ export const FButton = (props, children) => {
9
9
  if (!props.styling) {
10
10
  props.styling = FButtonStyling.RAISED;
11
11
  }
@@ -16,7 +16,9 @@ export const FButton = (props) => {
16
16
  (props.styling.toLowerCase() === FButtonStyling.RAISED &&
17
17
  props.icon &&
18
18
  (props.label === null || props.label === undefined)));
19
- return (h("div", Object.assign({ class: `f-button--wrapper ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.large ? 'kup-large' : ''} ${props.pulsating ? 'kup-pulsating' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.slim ? 'kup-slim' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }), isIconButton ? renderIconButton(props) : renderButton(props)));
19
+ return (h("div", Object.assign({ class: `f-button ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.large ? 'kup-large' : ''} ${props.pulsating ? 'kup-pulsating' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.slim ? 'kup-slim' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
20
+ isIconButton ? renderIconButton(props) : renderButton(props),
21
+ children));
20
22
  };
21
23
  /*-------------------------------------------------*/
22
24
  /* M e t h o d s */
@@ -0,0 +1,143 @@
1
+ export const autoAlignComps = ['KUP-DATA-TABLE', 'KUP-TREE'];
2
+ /**
3
+ * Supported cell events.
4
+ */
5
+ export var FCellEvents;
6
+ (function (FCellEvents) {
7
+ FCellEvents["CLICK"] = "kup-cell-click";
8
+ FCellEvents["INPUT"] = "kup-cell-input";
9
+ FCellEvents["UPDATE"] = "kup-cell-update";
10
+ })(FCellEvents || (FCellEvents = {}));
11
+ /**
12
+ * Supported cell padding.
13
+ */
14
+ export var FCellPadding;
15
+ (function (FCellPadding) {
16
+ FCellPadding["DENSE"] = "dense";
17
+ FCellPadding["MEDIUM"] = "medium";
18
+ FCellPadding["NONE"] = "";
19
+ FCellPadding["WIDE"] = "wide";
20
+ })(FCellPadding || (FCellPadding = {}));
21
+ /**
22
+ * Supported cell CSS classes.
23
+ */
24
+ export var FCellClasses;
25
+ (function (FCellClasses) {
26
+ FCellClasses["BG_DANGER"] = "danger-bg";
27
+ FCellClasses["BG_GREEN"] = "green-bg";
28
+ FCellClasses["BG_GREY"] = "grey-bg";
29
+ FCellClasses["BG_ORANGE"] = "orange-bg";
30
+ FCellClasses["BG_PURPLE"] = "purple-bg";
31
+ FCellClasses["BG_SUCCESS"] = "success-bg";
32
+ FCellClasses["BG_TEAL"] = "teal-bg";
33
+ FCellClasses["BG_WARNING"] = "warning-bg";
34
+ FCellClasses["C_BG_DANGER"] = "c-danger-bg";
35
+ FCellClasses["C_BG_GREEN"] = "c-green-bg";
36
+ FCellClasses["C_BG_GREY"] = "c-grey-bg";
37
+ FCellClasses["C_BG_ORANGE"] = "c-orange-bg";
38
+ FCellClasses["C_BG_PURPLE"] = "c-purple-bg";
39
+ FCellClasses["C_BG_SUCCESS"] = "c-success-bg";
40
+ FCellClasses["C_BG_TEAL"] = "c-teal-bg";
41
+ FCellClasses["C_BG_WARNING"] = "c-warning-bg";
42
+ FCellClasses["C_CENTERED"] = "c-centered";
43
+ FCellClasses["C_FITTED"] = "c-fitted";
44
+ FCellClasses["C_PADDED"] = "c-padded";
45
+ FCellClasses["C_PADDED_HOR"] = "c-padded-hor";
46
+ FCellClasses["C_PADDED_VER"] = "c-padded-ver";
47
+ FCellClasses["C_ROUND"] = "c-round";
48
+ FCellClasses["C_RIGHT_ALIGNED"] = "c-right-aligned";
49
+ FCellClasses["C_SHAPED"] = "c-shaped";
50
+ FCellClasses["C_TEXT_VERTICAL"] = "c-vertical-text";
51
+ FCellClasses["CLICKABLE"] = "clickable";
52
+ FCellClasses["HOVER_DISPLAY"] = "display-on-hover";
53
+ FCellClasses["HOVER_EXPAND"] = "expand-on-hover";
54
+ FCellClasses["HOVER_REDUCE"] = "reduce-on-hover";
55
+ FCellClasses["INDICATOR_TOPRIGHT"] = "top-right-indicator";
56
+ FCellClasses["LINK"] = "link";
57
+ FCellClasses["MONOSPACE"] = "monospace";
58
+ FCellClasses["OBJ"] = "obj";
59
+ FCellClasses["SHAPED"] = "shaped";
60
+ FCellClasses["TEXT_DANGER"] = "danger-text";
61
+ FCellClasses["TEXT_INFO"] = "info-text";
62
+ FCellClasses["TEXT_PRIMARY"] = "primary-text";
63
+ FCellClasses["TEXT_PURPLE"] = "purple-text";
64
+ FCellClasses["TEXT_SECONDARY"] = "secondary-text";
65
+ FCellClasses["TEXT_STRONG"] = "strong-text";
66
+ FCellClasses["TEXT_SUCCESS"] = "success-text";
67
+ FCellClasses["TEXT_WARNING"] = "warning-text";
68
+ FCellClasses["UNDERLINED"] = "underlined";
69
+ })(FCellClasses || (FCellClasses = {}));
70
+ /**
71
+ * Supported cell shapes.
72
+ */
73
+ export var FCellShapes;
74
+ (function (FCellShapes) {
75
+ FCellShapes["AUTOCOMPLETE"] = "ACP";
76
+ FCellShapes["BUTTON_LIST"] = "BTN";
77
+ FCellShapes["CHART"] = "GRA";
78
+ FCellShapes["CHECKBOX"] = "CHK";
79
+ FCellShapes["CHIP"] = "CHI";
80
+ FCellShapes["COLOR_PICKER"] = "CLP";
81
+ FCellShapes["COMBOBOX"] = "CMB";
82
+ FCellShapes["EDITOR"] = "EDT";
83
+ FCellShapes["GAUGE"] = "GAU";
84
+ FCellShapes["IMAGE"] = "IMG";
85
+ FCellShapes["KNOB"] = "KNB";
86
+ FCellShapes["PROGRESS_BAR"] = "PGB";
87
+ FCellShapes["RADIO"] = "RAD";
88
+ FCellShapes["RATING"] = "RTG";
89
+ FCellShapes["TEXT_FIELD"] = "ITX";
90
+ })(FCellShapes || (FCellShapes = {}));
91
+ /**
92
+ * Supported cell types.
93
+ */
94
+ export var FCellTypes;
95
+ (function (FCellTypes) {
96
+ FCellTypes["AUTOCOMPLETE"] = "autocomplete";
97
+ FCellTypes["BAR"] = "bar";
98
+ FCellTypes["BUTTON"] = "button";
99
+ FCellTypes["BUTTON_LIST"] = "button-list";
100
+ FCellTypes["CHART"] = "chart";
101
+ FCellTypes["CHECKBOX"] = "checkbox";
102
+ FCellTypes["CHIP"] = "chips";
103
+ FCellTypes["COLOR_PICKER"] = "color-picker";
104
+ FCellTypes["COMBOBOX"] = "combobox";
105
+ FCellTypes["DATE"] = "date";
106
+ FCellTypes["DATETIME"] = "datetime";
107
+ FCellTypes["EDITOR"] = "editor";
108
+ FCellTypes["GAUGE"] = "gauge";
109
+ FCellTypes["ICON"] = "icon";
110
+ FCellTypes["IMAGE"] = "image";
111
+ FCellTypes["KNOB"] = "knob";
112
+ FCellTypes["LINK"] = "link";
113
+ FCellTypes["NUMBER"] = "number";
114
+ FCellTypes["PROGRESS_BAR"] = "progress-bar";
115
+ FCellTypes["RADIO"] = "radio";
116
+ FCellTypes["RATING"] = "rating";
117
+ FCellTypes["STRING"] = "string";
118
+ FCellTypes["TIME"] = "time";
119
+ })(FCellTypes || (FCellTypes = {}));
120
+ export const editableTypes = [
121
+ FCellTypes.AUTOCOMPLETE,
122
+ FCellTypes.CHECKBOX,
123
+ FCellTypes.COLOR_PICKER,
124
+ FCellTypes.COMBOBOX,
125
+ FCellTypes.DATE,
126
+ FCellTypes.NUMBER,
127
+ FCellTypes.RATING,
128
+ FCellTypes.STRING,
129
+ FCellTypes.TIME,
130
+ ];
131
+ export const kupTypes = [
132
+ FCellTypes.BAR,
133
+ FCellTypes.BUTTON,
134
+ FCellTypes.BUTTON_LIST,
135
+ FCellTypes.CHART,
136
+ FCellTypes.CHIP,
137
+ FCellTypes.COLOR_PICKER,
138
+ FCellTypes.GAUGE,
139
+ FCellTypes.KNOB,
140
+ FCellTypes.PROGRESS_BAR,
141
+ FCellTypes.RADIO,
142
+ FCellTypes.RATING,
143
+ ];
@@ -0,0 +1,467 @@
1
+ import { autoAlignComps, editableTypes, FCellClasses, FCellEvents, FCellShapes, FCellTypes, kupTypes, } from './f-cell-declarations';
2
+ import { h } from '@stencil/core';
3
+ import { getCellValueForDisplay } from '../../utils/cell-utils';
4
+ import { FCheckbox } from '../f-checkbox/f-checkbox';
5
+ import { FTextField } from '../f-text-field/f-text-field';
6
+ import { stringToNumber } from '../../utils/utils';
7
+ import { FImage } from '../f-image/f-image';
8
+ import { FChip } from '../f-chip/f-chip';
9
+ import { KupThemeColorValues } from '../../utils/kup-theme/kup-theme-declarations';
10
+ const dom = document.documentElement;
11
+ /*-------------------------------------------------*/
12
+ /* C o m p o n e n t */
13
+ /*-------------------------------------------------*/
14
+ export const FCell = (props) => {
15
+ const cell = props.cell;
16
+ const column = props.column;
17
+ const row = props.row;
18
+ const shape = props.shape
19
+ ? props.shape
20
+ : cell.shape
21
+ ? cell.shape
22
+ : column.shape
23
+ ? column.shape
24
+ : null;
25
+ const hasObj = !dom.ketchup.objects.isEmptyKupObj(cell.obj);
26
+ const isEditable = cell.isEditable && props.editable ? true : false;
27
+ const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
28
+ const cellType = getCellType(cell, shape);
29
+ const subcomponentProps = Object.assign({}, cell.data);
30
+ let cssClasses = cell.cssClass
31
+ ? cell.cssClass
32
+ : column.cssClass
33
+ ? column.cssClass
34
+ : '';
35
+ const classObj = {
36
+ 'f-cell': true,
37
+ [FCellClasses.OBJ]: hasObj ? true : false,
38
+ [cellType + '-cell']: true,
39
+ [props.wrapperClass]: props.wrapperClass ? true : false,
40
+ [props.density]: props.density && cellType !== FCellTypes.BAR ? true : false,
41
+ [cssClasses]: cssClasses ? true : false,
42
+ };
43
+ let content = valueToDisplay;
44
+ if (isEditable && editableTypes.includes(cellType)) {
45
+ content = setEditableCell(cellType, classObj, cell, column, props);
46
+ }
47
+ else if (cell.data && kupTypes.includes(cellType)) {
48
+ if (props.setSizes) {
49
+ setCellSizeKup(cellType, subcomponentProps, cell);
50
+ }
51
+ if (!props.renderKup) {
52
+ const lazyClass = 'cell-' + cellType + ' placeholder';
53
+ content = h("span", { class: lazyClass });
54
+ }
55
+ else {
56
+ content = setKupCell(cellType, classObj, subcomponentProps, cell, row, column, props);
57
+ }
58
+ }
59
+ else {
60
+ if (props.setSizes) {
61
+ setCellSize(cellType, subcomponentProps, cell, props);
62
+ }
63
+ content = setCell(cellType, subcomponentProps, content, classObj, cell, column, props);
64
+ }
65
+ let icon = null;
66
+ if (!isEditable && (column.icon || cell.icon) && content) {
67
+ const fProps = {
68
+ color: `rgba(var(${KupThemeColorValues.TEXT}-rgb), 0.375)`,
69
+ resource: cell.icon ? cell.icon : column.icon,
70
+ sizeX: '1.25em',
71
+ sizeY: '1.25em',
72
+ wrapperClass: 'obj-icon',
73
+ };
74
+ icon = h(FImage, Object.assign({}, fProps));
75
+ }
76
+ let cellTitle = null;
77
+ if (dom.ketchup.debug.isDebug() && hasObj) {
78
+ cellTitle = cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
79
+ }
80
+ else if (cell.title != null && cell.title.trim() != '') {
81
+ cellTitle = cell.title;
82
+ }
83
+ let infoEl = null;
84
+ if (cell.info) {
85
+ const info = Object.assign({}, cell.info);
86
+ if (!info.color) {
87
+ info.color = `var(${KupThemeColorValues.INFO})`;
88
+ }
89
+ if (!info.icon) {
90
+ info.icon = 'info';
91
+ }
92
+ const fProps = {
93
+ color: info.color,
94
+ resource: info.icon,
95
+ sizeX: '1.25em',
96
+ sizeY: '1.25em',
97
+ title: info.message ? info.message : '',
98
+ wrapperClass: 'cell-info',
99
+ };
100
+ infoEl = h(FImage, Object.assign({}, fProps));
101
+ }
102
+ return (h("div", { class: classObj, style: cell.style },
103
+ h("div", { class: "f-cell__content", style: cell.styleContent, title: cellTitle },
104
+ props.indents,
105
+ infoEl,
106
+ icon,
107
+ content)));
108
+ };
109
+ function setCellSize(cellType, subcomponentProps, cell, props) {
110
+ switch (cellType) {
111
+ case FCellTypes.CHECKBOX:
112
+ case FCellTypes.ICON:
113
+ if (!subcomponentProps.sizeX) {
114
+ subcomponentProps.sizeX = '18px';
115
+ }
116
+ if (!subcomponentProps.sizeY) {
117
+ subcomponentProps.sizeY = '18px';
118
+ }
119
+ if (cell.style) {
120
+ if (!cell.style.height) {
121
+ cell.style['minHeight'] = subcomponentProps.sizeY;
122
+ }
123
+ }
124
+ else {
125
+ cell.style = {
126
+ minHeight: subcomponentProps.sizeY,
127
+ };
128
+ }
129
+ break;
130
+ case FCellTypes.IMAGE:
131
+ if (props.component.rootElement.tagName ===
132
+ 'KUP-BOX') {
133
+ if (!subcomponentProps.sizeY) {
134
+ subcomponentProps.sizeY = 'auto';
135
+ }
136
+ if (subcomponentProps.fit === undefined) {
137
+ subcomponentProps.fit = true;
138
+ }
139
+ }
140
+ else if (!subcomponentProps.sizeX) {
141
+ subcomponentProps.sizeX = 'auto';
142
+ }
143
+ if (!subcomponentProps.sizeY) {
144
+ subcomponentProps.sizeY = '64px';
145
+ }
146
+ break;
147
+ }
148
+ }
149
+ function setCellSizeKup(cellType, subcomponentProps, cell) {
150
+ switch (cellType) {
151
+ case FCellTypes.BAR:
152
+ if (!subcomponentProps.sizeY) {
153
+ subcomponentProps.sizeY = '26px';
154
+ }
155
+ break;
156
+ case FCellTypes.BUTTON:
157
+ let height = '';
158
+ if (subcomponentProps.label) {
159
+ height = '36px';
160
+ }
161
+ if (cell.style) {
162
+ if (!cell.style.height) {
163
+ cell.style['minHeight'] = height;
164
+ }
165
+ }
166
+ else {
167
+ cell.style = { minHeight: height };
168
+ }
169
+ break;
170
+ case FCellTypes.CHART:
171
+ if (!subcomponentProps.sizeX) {
172
+ subcomponentProps.sizeX = '100%';
173
+ }
174
+ if (!subcomponentProps.sizeY) {
175
+ subcomponentProps.sizeY = '100%';
176
+ }
177
+ break;
178
+ case FCellTypes.CHIP:
179
+ if (cell.style) {
180
+ if (!cell.style.height) {
181
+ cell.style['minHeight'] = '40px';
182
+ }
183
+ }
184
+ else {
185
+ cell.style = { minHeight: '40px' };
186
+ }
187
+ break;
188
+ case FCellTypes.RADIO:
189
+ if (cell.style) {
190
+ if (!cell.style.height) {
191
+ cell.style['minHeight'] = '40px';
192
+ }
193
+ }
194
+ else {
195
+ cell.style = { minHeight: '40px' };
196
+ }
197
+ break;
198
+ }
199
+ }
200
+ function setEditableCell(cellType, classObj, cell, column, props) {
201
+ switch (cellType) {
202
+ case FCellTypes.AUTOCOMPLETE:
203
+ 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) })));
204
+ case FCellTypes.CHECKBOX:
205
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
206
+ classObj[FCellClasses.C_CENTERED] = true;
207
+ }
208
+ return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
209
+ case FCellTypes.COLOR_PICKER:
210
+ return (h("kup-color-picker", Object.assign({}, cell.data, { disabled: false, "onkup-colorpicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
211
+ case FCellTypes.COMBOBOX:
212
+ 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) })));
213
+ case FCellTypes.DATE:
214
+ 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) })));
215
+ case FCellTypes.RATING:
216
+ return (h("kup-rating", Object.assign({}, cell.data, { disabled: false, "onkup-rating-click": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
217
+ case FCellTypes.TIME:
218
+ 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) })));
219
+ case FCellTypes.NUMBER:
220
+ case FCellTypes.STRING:
221
+ 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
222
+ ? stringToNumber(cell.value).toString()
223
+ : cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
224
+ }
225
+ }
226
+ function setCell(cellType, subcomponentProps, content, classObj, cell, column, props) {
227
+ switch (cellType) {
228
+ case FCellTypes.AUTOCOMPLETE:
229
+ case FCellTypes.COMBOBOX:
230
+ case FCellTypes.DATE:
231
+ case FCellTypes.DATETIME:
232
+ case FCellTypes.TIME:
233
+ if (content && content != '') {
234
+ const cellValue = getCellValueForDisplay(column, cell);
235
+ return h("div", { class: "f-cell__text" }, cellValue);
236
+ }
237
+ return content;
238
+ case FCellTypes.CHECKBOX:
239
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
240
+ classObj[FCellClasses.C_CENTERED] = true;
241
+ }
242
+ return (h(FImage, { resource: subcomponentProps.checked
243
+ ? 'check_box'
244
+ : 'check_box_outline_blank', sizeX: "18px", sizeY: "18px" }));
245
+ case FCellTypes.EDITOR:
246
+ return h("div", { innerHTML: cell.value });
247
+ case FCellTypes.ICON:
248
+ case FCellTypes.IMAGE:
249
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
250
+ classObj[FCellClasses.C_CENTERED] = true;
251
+ }
252
+ if (subcomponentProps.badgeData) {
253
+ classObj[FCellClasses.C_PADDED] = true;
254
+ }
255
+ return h(FImage, Object.assign({}, subcomponentProps));
256
+ case FCellTypes.LINK:
257
+ return (h("a", { href: content, target: "_blank" }, cell.value));
258
+ case FCellTypes.NUMBER:
259
+ if (content && content != '') {
260
+ const cellValueNumber = stringToNumber(cell.value);
261
+ const cellValue = getCellValueForDisplay(column, cell);
262
+ if (cellValueNumber < 0) {
263
+ classObj[FCellClasses.TEXT_DANGER] = true;
264
+ }
265
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
266
+ classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
267
+ }
268
+ return h("div", { class: "f-cell__text" }, cellValue);
269
+ }
270
+ return h("div", { class: "f-cell__text" }, content);
271
+ default:
272
+ return h("div", { class: "f-cell__text" }, content);
273
+ }
274
+ }
275
+ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, props) {
276
+ switch (cellType) {
277
+ case FCellTypes.BAR:
278
+ if (!subcomponentProps.data) {
279
+ return h("kup-image", Object.assign({}, subcomponentProps));
280
+ }
281
+ else {
282
+ const barStyle = {
283
+ height: subcomponentProps.sizeY,
284
+ };
285
+ return (h("div", { style: barStyle },
286
+ h(FImage, Object.assign({}, subcomponentProps))));
287
+ }
288
+ case FCellTypes.BUTTON:
289
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
290
+ classObj[FCellClasses.C_CENTERED] = true;
291
+ }
292
+ return (h("kup-button", Object.assign({}, subcomponentProps, { "onkup-button-click": (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
293
+ case FCellTypes.BUTTON_LIST:
294
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
295
+ classObj[FCellClasses.C_CENTERED] = true;
296
+ }
297
+ subcomponentProps['data-storage'] = {
298
+ cell: cell,
299
+ row: row,
300
+ column: column,
301
+ };
302
+ return h("kup-button-list", Object.assign({}, subcomponentProps));
303
+ case FCellTypes.CHART:
304
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
305
+ classObj[FCellClasses.C_CENTERED] = true;
306
+ }
307
+ return h("kup-chart", Object.assign({}, subcomponentProps));
308
+ case FCellTypes.CHIP:
309
+ return h(FChip, Object.assign({}, subcomponentProps));
310
+ case FCellTypes.COLOR_PICKER:
311
+ return (h("kup-color-picker", Object.assign({}, subcomponentProps, { disabled: true })));
312
+ case FCellTypes.GAUGE:
313
+ return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "280px" }, subcomponentProps)));
314
+ case FCellTypes.KNOB:
315
+ case FCellTypes.PROGRESS_BAR:
316
+ return h("kup-progress-bar", Object.assign({}, subcomponentProps));
317
+ case FCellTypes.RADIO:
318
+ if (autoAlignComps.includes(props.component.rootElement.tagName)) {
319
+ classObj[FCellClasses.C_CENTERED] = true;
320
+ }
321
+ subcomponentProps['disabled'] = row.readOnly;
322
+ return h("kup-radio", Object.assign({}, subcomponentProps));
323
+ case FCellTypes.RATING:
324
+ return h("kup-rating", Object.assign({}, subcomponentProps, { disabled: true }));
325
+ }
326
+ }
327
+ function getCellType(cell, shape) {
328
+ const obj = cell.obj;
329
+ if (shape) {
330
+ switch (shape.toUpperCase()) {
331
+ case FCellShapes.AUTOCOMPLETE:
332
+ return FCellTypes.AUTOCOMPLETE;
333
+ case FCellShapes.BUTTON_LIST:
334
+ return FCellTypes.BUTTON_LIST;
335
+ case FCellShapes.CHART:
336
+ return FCellTypes.CHART;
337
+ case FCellShapes.CHECKBOX:
338
+ return FCellTypes.CHECKBOX;
339
+ case FCellShapes.CHIP:
340
+ return FCellTypes.CHIP;
341
+ case FCellShapes.COLOR_PICKER:
342
+ return FCellTypes.COLOR_PICKER;
343
+ case FCellShapes.COMBOBOX:
344
+ return FCellTypes.COMBOBOX;
345
+ case FCellShapes.EDITOR:
346
+ return FCellTypes.EDITOR;
347
+ case FCellShapes.GAUGE:
348
+ return FCellTypes.GAUGE;
349
+ case FCellShapes.IMAGE:
350
+ return FCellTypes.IMAGE;
351
+ case FCellShapes.KNOB:
352
+ return FCellTypes.KNOB;
353
+ case FCellShapes.PROGRESS_BAR:
354
+ return FCellTypes.PROGRESS_BAR;
355
+ case FCellShapes.RADIO:
356
+ return FCellTypes.RADIO;
357
+ case FCellShapes.RATING:
358
+ return FCellTypes.RATING;
359
+ case FCellShapes.TEXT_FIELD:
360
+ return FCellTypes.STRING;
361
+ }
362
+ }
363
+ if (dom.ketchup.objects.isBar(obj)) {
364
+ return FCellTypes.BAR;
365
+ }
366
+ else if (dom.ketchup.objects.isButton(obj)) {
367
+ return FCellTypes.BUTTON;
368
+ }
369
+ else if (dom.ketchup.objects.isChart(obj)) {
370
+ return FCellTypes.CHART;
371
+ }
372
+ else if (dom.ketchup.objects.isCheckbox(obj)) {
373
+ return FCellTypes.CHECKBOX;
374
+ }
375
+ else if (dom.ketchup.objects.isColor(obj)) {
376
+ return FCellTypes.COLOR_PICKER;
377
+ }
378
+ else if (dom.ketchup.objects.isIcon(obj)) {
379
+ return FCellTypes.ICON;
380
+ }
381
+ else if (dom.ketchup.objects.isImage(obj)) {
382
+ return FCellTypes.IMAGE;
383
+ }
384
+ else if (dom.ketchup.objects.isLink(obj)) {
385
+ return FCellTypes.LINK;
386
+ }
387
+ else if (dom.ketchup.objects.isProgressBar(obj)) {
388
+ return FCellTypes.PROGRESS_BAR;
389
+ }
390
+ else if (dom.ketchup.objects.isRadio(obj)) {
391
+ return FCellTypes.RADIO;
392
+ }
393
+ else if (dom.ketchup.objects.isKupObjList(obj)) {
394
+ return FCellTypes.CHIP;
395
+ }
396
+ else if (dom.ketchup.objects.isNumber(obj)) {
397
+ return FCellTypes.NUMBER;
398
+ }
399
+ else if (dom.ketchup.objects.isDate(obj)) {
400
+ return FCellTypes.DATE;
401
+ }
402
+ else if (dom.ketchup.objects.isTimestamp(obj)) {
403
+ return FCellTypes.DATETIME;
404
+ }
405
+ else if (dom.ketchup.objects.isTime(obj)) {
406
+ return FCellTypes.TIME;
407
+ }
408
+ else if (dom.ketchup.objects.isVoCodver(obj)) {
409
+ return FCellTypes.ICON;
410
+ }
411
+ else {
412
+ return FCellTypes.STRING;
413
+ }
414
+ }
415
+ function cellEvent(e, props, cellType, cellEventName) {
416
+ const cell = props.cell;
417
+ const column = props.column;
418
+ const comp = props.component;
419
+ const row = props.row;
420
+ const isInputEvent = !!(e.target.tagName === 'INPUT');
421
+ let value = isInputEvent
422
+ ? e.target.value
423
+ : e.detail.value;
424
+ switch (cellType) {
425
+ case FCellTypes.AUTOCOMPLETE:
426
+ case FCellTypes.COMBOBOX:
427
+ case FCellTypes.DATE:
428
+ case FCellTypes.TIME:
429
+ if (cell.data) {
430
+ cell.data['initialValue'] = value;
431
+ }
432
+ break;
433
+ case FCellTypes.CHECKBOX:
434
+ value = value === 'on' ? '0' : '1';
435
+ if (cell.data) {
436
+ cell.data.checked =
437
+ value === '0' ? false : true;
438
+ }
439
+ break;
440
+ }
441
+ if (cell.obj) {
442
+ cell.obj.k = value;
443
+ }
444
+ cell.value = value;
445
+ cell.displayedValue = null;
446
+ cell.displayedValue = getCellValueForDisplay(column, cell);
447
+ if (comp && comp.rootElement) {
448
+ const updateEvent = new CustomEvent(cellEventName, {
449
+ bubbles: true,
450
+ cancelable: true,
451
+ detail: {
452
+ comp: comp,
453
+ id: comp.rootElement.id,
454
+ cell: cell,
455
+ column: column,
456
+ event: e,
457
+ row: row,
458
+ type: cellType,
459
+ },
460
+ });
461
+ comp.rootElement.dispatchEvent(updateEvent);
462
+ try {
463
+ comp.refresh();
464
+ }
465
+ catch (error) { }
466
+ }
467
+ }
@@ -12,7 +12,7 @@ export const FCheckbox = (props) => {
12
12
  'checkbox--disabled': props.disabled ? true : false,
13
13
  'checkbox--indeterminate': props.indeterminate ? true : false,
14
14
  };
15
- return (h("div", Object.assign({ class: `f-checkbox--wrapper ${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 }),
15
+ 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 }),
16
16
  h("div", { class: `form-field ${props.leadingLabel ? 'form-field--align-end' : ''}` },
17
17
  h("div", { class: classObj },
18
18
  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' })),
@@ -20,7 +20,7 @@ export const FChip = (props) => {
20
20
  'chip-set--filter': isFilter ? true : false,
21
21
  'chip-set--input': isInput ? true : false,
22
22
  };
23
- return (h("div", Object.assign({ class: `f-chip--wrapper ${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 }),
23
+ return (h("div", Object.assign({ class: `f-chip ${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 }),
24
24
  h("div", { class: classObj, role: "grid" }, createChipList(props, isChoice, isFilter, isInput))));
25
25
  };
26
26
  /*-------------------------------------------------*/
@@ -32,7 +32,7 @@ function createChipList(props, isChoice, isFilter, isInput) {
32
32
  if (props.dataNew && props.dataNew.length > 0) {
33
33
  props.data = treeNode2Data(props.dataNew);
34
34
  }
35
- for (let i = 0; i < props.data.length; i++) {
35
+ for (let i = 0; props.data && i < props.data.length; i++) {
36
36
  // could happen due to functions that change the data (such as transposition, etc)
37
37
  if (!props.data[i]) {
38
38
  continue;
@@ -38,7 +38,7 @@ export const FImage = (props) => {
38
38
  badgeCollection.push(h("kup-badge", Object.assign({}, props.badgeData[index])));
39
39
  }
40
40
  }
41
- return (h("div", Object.assign({ class: `f-image--wrapper ${props.wrapperClass ? props.wrapperClass : ''} ${props.fit ? 'kup-fit' : ''}` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }),
41
+ return (h("div", Object.assign({ class: `f-image ${props.wrapperClass ? props.wrapperClass : ''} ${props.fit ? 'kup-fit' : ''}` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }),
42
42
  el,
43
43
  badgeCollection));
44
44
  };
@@ -55,8 +55,7 @@ function createIcon(props) {
55
55
  : `var(${KupThemeColorValues.ICON})`,
56
56
  };
57
57
  if (props.resource.indexOf('--kup') > -1) {
58
- let themeIcon = props.resource.replace('--kup-', '');
59
- themeIcon = themeIcon.replace('-icon', '');
58
+ let themeIcon = props.resource.replace('--', '');
60
59
  classObj['kup-icon'] = true;
61
60
  classObj[themeIcon] = true;
62
61
  }