@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
@@ -1,4842 +0,0 @@
1
- import { d as createCommonjsModule, K as KupDates, c as KupObjects, e as KupDatesLocales } from './kup-objects-d38d2fa2.js';
2
- import { g as getAssetPath } from './index-bf2824a6.js';
3
-
4
- /**
5
- * Category of debug logs.
6
- */
7
- var KupDebugCategory;
8
- (function (KupDebugCategory) {
9
- KupDebugCategory["INFO"] = "Informational";
10
- KupDebugCategory["WARNING"] = "Warning";
11
- KupDebugCategory["ERROR"] = "Error";
12
- })(KupDebugCategory || (KupDebugCategory = {}));
13
- /**
14
- * Colors associated with every type of log to be printed.
15
- */
16
- var KupDebugLogColor;
17
- (function (KupDebugLogColor) {
18
- KupDebugLogColor["Load"] = "green";
19
- KupDebugLogColor["Render"] = "green";
20
- KupDebugLogColor["Resize"] = "green";
21
- KupDebugLogColor["Misc"] = "blue";
22
- KupDebugLogColor["Total"] = "teal";
23
- })(KupDebugLogColor || (KupDebugLogColor = {}));
24
-
25
- /**
26
- * HTML attribute attached to dynamically positioned elements.
27
- */
28
- const kupDynamicPositionAttribute = 'kup-dynamic-position';
29
- /**
30
- * HTML attribute attached to dynamically positioned elements' anchor point.
31
- */
32
- const kupDynamicPositionAnchorAttribute = 'kup-dynamic-position-anchor';
33
- /**
34
- * CSS class attached to dynamically positioned elements when the script is running.
35
- */
36
- const kupDynamicPositionActiveClass = 'kup-dynamic-position-active';
37
- /**
38
- * Available placements.
39
- */
40
- var KupDynamicPositionPlacement;
41
- (function (KupDynamicPositionPlacement) {
42
- KupDynamicPositionPlacement["AUTO"] = "";
43
- KupDynamicPositionPlacement["BOTTOM"] = "b";
44
- KupDynamicPositionPlacement["BOTTOM_LEFT"] = "bl";
45
- KupDynamicPositionPlacement["BOTTOM_RIGHT"] = "br";
46
- KupDynamicPositionPlacement["LEFT"] = "l";
47
- KupDynamicPositionPlacement["RIGHT"] = "r";
48
- KupDynamicPositionPlacement["TOP"] = "t";
49
- KupDynamicPositionPlacement["TOP_LEFT"] = "tl";
50
- KupDynamicPositionPlacement["TOP_RIGHT"] = "tr";
51
- })(KupDynamicPositionPlacement || (KupDynamicPositionPlacement = {}));
52
-
53
- /**
54
- * Props of the kup-card component.
55
- * Used to export every prop in an object.
56
- */
57
- var KupCardProps;
58
- (function (KupCardProps) {
59
- KupCardProps["customStyle"] = "Custom style of the component.";
60
- KupCardProps["data"] = "The actual data of the card.";
61
- KupCardProps["isMenu"] = "Defines whether the card is a menu or not. Works together with menuVisible.";
62
- KupCardProps["layoutFamily"] = "Sets the type of the card.";
63
- KupCardProps["layoutNumber"] = "Sets the number of the layout.";
64
- KupCardProps["menuVisible"] = "Sets the status of the card as menu, when false it's hidden otherwise it's visible. Works together with isMenu.";
65
- KupCardProps["sizeX"] = "The width of the card, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.).";
66
- KupCardProps["sizeY"] = "The height of the card, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.).";
67
- })(KupCardProps || (KupCardProps = {}));
68
- /**
69
- * Layout families of the kup-card component.
70
- * @enum {string}
71
- * @property {string} COLLAPSIBLE - Cards belonging to this family will display an area usable to expand the content of the card.
72
- * @property {string} SCALABLE - Content will fit its container, resizing itself automatically.
73
- * @property {string} STANDARD - Stndard layouts.
74
- */
75
- var KupCardFamily;
76
- (function (KupCardFamily) {
77
- KupCardFamily["COLLAPSIBLE"] = "collapsible";
78
- KupCardFamily["DIALOG"] = "dialog";
79
- KupCardFamily["SCALABLE"] = "scalable";
80
- KupCardFamily["STANDARD"] = "standard";
81
- })(KupCardFamily || (KupCardFamily = {}));
82
- /**
83
- * Recurring IDs.
84
- */
85
- var KupCardIds;
86
- (function (KupCardIds) {
87
- KupCardIds["COLUMNS_LIST"] = "columns-list";
88
- KupCardIds["DIALOG_CLOSE"] = "dialog-close";
89
- KupCardIds["DRAG_HANDLE"] = "drag-handle";
90
- KupCardIds["EXPAND_ACTION"] = "expand-action";
91
- KupCardIds["EXTRA_COLUMNS"] = "extra-columns";
92
- KupCardIds["NEXT_ROW"] = "next-row";
93
- KupCardIds["OBJECT_CHANGE"] = "object-change";
94
- KupCardIds["PREVIOUS_ROW"] = "previous-row";
95
- KupCardIds["VIEW_SELECTOR"] = "view-selector";
96
- })(KupCardIds || (KupCardIds = {}));
97
- /**
98
- * Recurring CSS classes.
99
- */
100
- var KupCardCSSClasses;
101
- (function (KupCardCSSClasses) {
102
- KupCardCSSClasses["CARD_VIEW"] = "card-view";
103
- KupCardCSSClasses["CLICKABLE_LINK"] = "clickable-link";
104
- KupCardCSSClasses["COLLAPSIBLE_ACTIVE"] = "collapsible-active";
105
- KupCardCSSClasses["COLLAPSIBLE_CARD"] = "collapsible-card";
106
- KupCardCSSClasses["COLLAPSIBLE_ELEMENT"] = "collapsible-element";
107
- KupCardCSSClasses["COLLAPSIBLE_WRAPPER"] = "collapsible-wrapper";
108
- KupCardCSSClasses["DIALOG_TITLE"] = "dialog-title";
109
- KupCardCSSClasses["DIALOG_UNRESIZABLE"] = "dialog-unresizable";
110
- KupCardCSSClasses["EXPANDED"] = "expanded";
111
- KupCardCSSClasses["HAS_ACTIONS"] = "has-actions";
112
- KupCardCSSClasses["HAS_CONTENT"] = "has-content";
113
- KupCardCSSClasses["HEADER_BAR"] = "header-bar";
114
- KupCardCSSClasses["VIEW_PREFIX"] = "view-";
115
- KupCardCSSClasses["VISIBLE"] = "visible";
116
- })(KupCardCSSClasses || (KupCardCSSClasses = {}));
117
- /**
118
- * Internally-handled sub-component events.
119
- */
120
- var KupCardSubEvents;
121
- (function (KupCardSubEvents) {
122
- KupCardSubEvents["AUTOCOMPLETE_BLUR"] = "kup-autocomplete-blur";
123
- KupCardSubEvents["AUTOCOMPLETE_ITEMCLICK"] = "kup-autocomplete-itemclick";
124
- KupCardSubEvents["BUTTON_CLICK"] = "kup-button-click";
125
- KupCardSubEvents["CHIP_BLUR"] = "kup-chip-blur";
126
- KupCardSubEvents["CHIP_ICONCLICK"] = "kup-chip-iconclick";
127
- KupCardSubEvents["TABBAR_CLICK"] = "kup-tabbar-click";
128
- KupCardSubEvents["TREE_NODESELECTED"] = "kup-tree-nodeselected";
129
- })(KupCardSubEvents || (KupCardSubEvents = {}));
130
-
131
- /**
132
- * Default languages available.
133
- */
134
- var KupLanguageDefaults;
135
- (function (KupLanguageDefaults) {
136
- KupLanguageDefaults["cn"] = "chinese";
137
- KupLanguageDefaults["en"] = "english";
138
- KupLanguageDefaults["es"] = "spanish";
139
- KupLanguageDefaults["it"] = "italian";
140
- KupLanguageDefaults["fr"] = "french";
141
- KupLanguageDefaults["pl"] = "polish";
142
- KupLanguageDefaults["ru"] = "russian";
143
- })(KupLanguageDefaults || (KupLanguageDefaults = {}));
144
- /**
145
- * Checkbox statuses decodes.
146
- */
147
- var KupLanguageCheckbox;
148
- (function (KupLanguageCheckbox) {
149
- KupLanguageCheckbox["ALL"] = "checkboxAll";
150
- KupLanguageCheckbox["CHECKED"] = "checkboxChecked";
151
- KupLanguageCheckbox["INDETERMINATE"] = "checkboxIndeterminate";
152
- KupLanguageCheckbox["UNCHECKED"] = "checkboxUnchecked";
153
- })(KupLanguageCheckbox || (KupLanguageCheckbox = {}));
154
- /**
155
- * Column related decodes.
156
- */
157
- var KupLanguageColumn;
158
- (function (KupLanguageColumn) {
159
- KupLanguageColumn["ADD"] = "columnAdd";
160
- KupLanguageColumn["ADD_DESCRIPTION"] = "columnAddDescription";
161
- KupLanguageColumn["COLUMNS"] = "columnColumns";
162
- KupLanguageColumn["HIDE"] = "columnHide";
163
- })(KupLanguageColumn || (KupLanguageColumn = {}));
164
- /**
165
- * Debug widget decodes.
166
- */
167
- var KupLanguageDebug;
168
- (function (KupLanguageDebug) {
169
- KupLanguageDebug["AUTOPRINT"] = "debugAutoprint";
170
- KupLanguageDebug["CLEAR"] = "debugClear";
171
- KupLanguageDebug["DUMP"] = "debugDump";
172
- KupLanguageDebug["DL_ALL"] = "debugDLAll";
173
- KupLanguageDebug["DL_PROPS"] = "debugDLProps";
174
- KupLanguageDebug["DL_PROPS_COMP"] = "debugDLPropsComp";
175
- KupLanguageDebug["LANGUAGE_CHANGER"] = "debugLanguageChanger";
176
- KupLanguageDebug["LOG_LIMIT"] = "debugLogLimit";
177
- KupLanguageDebug["MAGIC_BOX"] = "debugMagicBox";
178
- KupLanguageDebug["OFF"] = "debugOff";
179
- KupLanguageDebug["PRINT"] = "debugPrint";
180
- KupLanguageDebug["THEME_CHANGER"] = "debugThemeChanger";
181
- })(KupLanguageDebug || (KupLanguageDebug = {}));
182
- /**
183
- * Density decodes (data table customization settings).
184
- */
185
- var KupLanguageDensity;
186
- (function (KupLanguageDensity) {
187
- KupLanguageDensity["DENSE"] = "densityDense";
188
- KupLanguageDensity["LABEL"] = "densityLabel";
189
- KupLanguageDensity["MEDIUM"] = "densityMedium";
190
- KupLanguageDensity["WIDE"] = "densityWide";
191
- })(KupLanguageDensity || (KupLanguageDensity = {}));
192
- /**
193
- * Font size decodes (data table customization settings).
194
- */
195
- var KupLanguageFontsize;
196
- (function (KupLanguageFontsize) {
197
- KupLanguageFontsize["BIG"] = "fontsizeBig";
198
- KupLanguageFontsize["LABEL"] = "fontsizeLabel";
199
- KupLanguageFontsize["MEDIUM"] = "fontsizeMedium";
200
- KupLanguageFontsize["SMALL"] = "fontsizeSmall";
201
- })(KupLanguageFontsize || (KupLanguageFontsize = {}));
202
- /**
203
- * Generic user interface action/messages.
204
- */
205
- var KupLanguageGeneric;
206
- (function (KupLanguageGeneric) {
207
- KupLanguageGeneric["ADD_NEW"] = "genericAddNew";
208
- KupLanguageGeneric["APPLY"] = "genericApply";
209
- KupLanguageGeneric["COLLAPSE"] = "genericCollapse";
210
- KupLanguageGeneric["DAY"] = "genericDay";
211
- KupLanguageGeneric["DRAG_AND_DROP"] = "genericDragAndDrop";
212
- KupLanguageGeneric["DROP_YOUR_DATA"] = "genericDropYourData";
213
- KupLanguageGeneric["EDITABLE"] = "genericEditable";
214
- KupLanguageGeneric["EDITABLE_FIELD"] = "genericEditableField";
215
- KupLanguageGeneric["EMPTY_DATA"] = "genericEmptyData";
216
- KupLanguageGeneric["EXPAND"] = "genericExpand";
217
- KupLanguageGeneric["EXPERIMENTAL_FEAT"] = "genericExperimentalFeat";
218
- KupLanguageGeneric["FILTERS"] = "genericFilters";
219
- KupLanguageGeneric["INFO"] = "genericInfo";
220
- KupLanguageGeneric["INVALID_COLOR"] = "genericInvalidColor";
221
- KupLanguageGeneric["LAYOUT_NYI"] = "genericLayoutNotYetImplemented";
222
- KupLanguageGeneric["LIST"] = "genericList";
223
- KupLanguageGeneric["LOAD_MORE"] = "genericLoadMoreData";
224
- KupLanguageGeneric["MENU"] = "genericMenu";
225
- KupLanguageGeneric["MONTH"] = "genericMonth";
226
- KupLanguageGeneric["NEXT"] = "genericNext";
227
- KupLanguageGeneric["OPEN_NAVIGATION_MENU"] = "genericOpenNavigationMenu";
228
- KupLanguageGeneric["OPEN_IN_NEW_TAB"] = "genericOpenInNewTab";
229
- KupLanguageGeneric["OPEN_IN_NEW_WINDOW"] = "genericOpenInNewWindow";
230
- KupLanguageGeneric["OPTIONS"] = "genericOptions";
231
- KupLanguageGeneric["PREVIOUS"] = "genericPrevious";
232
- KupLanguageGeneric["REMOVE_FILTERS"] = "genericRemoveFilters";
233
- KupLanguageGeneric["SETTINGS"] = "genericSettings";
234
- KupLanguageGeneric["SHOW_ROW_OPTIONS"] = "genericShowRowOptions";
235
- KupLanguageGeneric["SHOW_TOOLTIP_INFO"] = "genericShowTooltipInfo";
236
- KupLanguageGeneric["SORT_BY"] = "genericSortBy";
237
- KupLanguageGeneric["TOGGLE"] = "genericToggle";
238
- KupLanguageGeneric["TODAY"] = "genericToday";
239
- KupLanguageGeneric["TOTALS_TABLE"] = "genericTotalsTable";
240
- KupLanguageGeneric["TRANSPOSE_DATA"] = "genericTransposeData";
241
- KupLanguageGeneric["VIEW_AS"] = "genericViewAs";
242
- KupLanguageGeneric["WEEK"] = "genericWeek";
243
- })(KupLanguageGeneric || (KupLanguageGeneric = {}));
244
- /**
245
- * Grid decodes (data table customization settings).
246
- */
247
- var KupLanguageGrid;
248
- (function (KupLanguageGrid) {
249
- KupLanguageGrid["COLUMN"] = "gridColumn";
250
- KupLanguageGrid["COMPLETE"] = "gridComplete";
251
- KupLanguageGrid["LABEL"] = "gridLabel";
252
- KupLanguageGrid["NONE"] = "gridNone";
253
- KupLanguageGrid["ROW"] = "gridRow";
254
- })(KupLanguageGrid || (KupLanguageGrid = {}));
255
- /**
256
- * Grouping decodes (data table groups).
257
- */
258
- var KupLanguageGrouping;
259
- (function (KupLanguageGrouping) {
260
- KupLanguageGrouping["DISABLE"] = "groupingDisable";
261
- KupLanguageGrouping["ENABLE"] = "groupingEnable";
262
- KupLanguageGrouping["GROUPS"] = "groupingGroups";
263
- })(KupLanguageGrouping || (KupLanguageGrouping = {}));
264
- /**
265
- * Page related decodes.
266
- */
267
- var KupLanguagePage;
268
- (function (KupLanguagePage) {
269
- KupLanguagePage["PAGE"] = "pagePage";
270
- KupLanguagePage["TOTAL"] = "pageTotal";
271
- })(KupLanguagePage || (KupLanguagePage = {}));
272
- /**
273
- * Row related decodes.
274
- */
275
- var KupLanguageRow;
276
- (function (KupLanguageRow) {
277
- KupLanguageRow["DETAIL"] = "rowDetail";
278
- KupLanguageRow["EDITABLE_KEY"] = "rowEditableKey";
279
- KupLanguageRow["KEY"] = "rowKey";
280
- KupLanguageRow["NEXT"] = "rowNext";
281
- KupLanguageRow["PREVIOUS"] = "rowPrevious";
282
- KupLanguageRow["RENDERED"] = "rowRendered";
283
- KupLanguageRow["ROWS"] = "rowRows";
284
- KupLanguageRow["SELECTED"] = "rowSelected";
285
- KupLanguageRow["TOTAL"] = "rowTotal";
286
- })(KupLanguageRow || (KupLanguageRow = {}));
287
- /**
288
- * Search decodes.
289
- */
290
- var KupLanguageSearch;
291
- (function (KupLanguageSearch) {
292
- KupLanguageSearch["FROM"] = "searchFrom";
293
- KupLanguageSearch["SEARCH"] = "searchSearch";
294
- KupLanguageSearch["TO"] = "searchTo";
295
- })(KupLanguageSearch || (KupLanguageSearch = {}));
296
- /**
297
- * Footer totals decodes (tree and data table).
298
- */
299
- var KupLanguageTotals;
300
- (function (KupLanguageTotals) {
301
- KupLanguageTotals["AVERAGE"] = "totalsAverage";
302
- KupLanguageTotals["CALCULATE"] = "totalsCalculate";
303
- KupLanguageTotals["CANCEL"] = "totalsCancel";
304
- KupLanguageTotals["COUNT"] = "totalsCount";
305
- KupLanguageTotals["DISTINCT"] = "totalsDistinct";
306
- KupLanguageTotals["FORMULA"] = "totalsFormula";
307
- KupLanguageTotals["MAXIMUM"] = "totalsMaximum";
308
- KupLanguageTotals["MINIMUM"] = "totalsMinimum";
309
- KupLanguageTotals["SUM"] = "totalsSum";
310
- })(KupLanguageTotals || (KupLanguageTotals = {}));
311
-
312
- var __classPrivateFieldSet$3 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
313
- if (!privateMap.has(receiver)) {
314
- throw new TypeError("attempted to set private field on non-instance");
315
- }
316
- privateMap.set(receiver, value);
317
- return value;
318
- };
319
- var __classPrivateFieldGet$3 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
320
- if (!privateMap.has(receiver)) {
321
- throw new TypeError("attempted to get private field on non-instance");
322
- }
323
- return privateMap.get(receiver);
324
- };
325
- var _debugWidget;
326
- const dom$7 = document.documentElement;
327
- /**
328
- * Debugging suite, used to log messages and statuses from the Ketch.UP components.
329
- * @module KupDebug
330
- */
331
- class KupDebug {
332
- /**
333
- * Initializes KupDebug.
334
- * @param {boolean} active - When true, the debug is active on initialization.
335
- * @param {boolean} autoprint - When true, logs will be automatically printed inside the debug widget.
336
- * @param {number} logLimit - Maximum amount of logs stored, when they exceed the number specified in logLimit the cache will be automatically cleared.
337
- */
338
- constructor(active, autoprint, logLimit) {
339
- _debugWidget.set(this, void 0);
340
- this.active = active ? true : false;
341
- this.autoPrint = autoprint ? true : false;
342
- this.container = document.createElement('div');
343
- this.container.setAttribute('kup-debug', '');
344
- document.body.appendChild(this.container);
345
- this.logLimit = logLimit ? logLimit : 250;
346
- this.logs = [];
347
- __classPrivateFieldSet$3(this, _debugWidget, null);
348
- document.addEventListener('kup-language-change', () => {
349
- if (this.active && __classPrivateFieldGet$3(this, _debugWidget)) {
350
- this.hideWidget();
351
- this.showWidget();
352
- }
353
- });
354
- }
355
- /**
356
- * Allows the download of props by creating a temporary clickable anchor element.
357
- */
358
- downloadProps(res) {
359
- const dataStr = 'data:text/json;charset=utf-8,' +
360
- encodeURIComponent(JSON.stringify(res, null, 2));
361
- const downloadAnchorNode = document.createElement('a');
362
- downloadAnchorNode.setAttribute('href', dataStr);
363
- downloadAnchorNode.setAttribute('download', 'kup_props.json');
364
- this.container.appendChild(downloadAnchorNode);
365
- downloadAnchorNode.click();
366
- downloadAnchorNode.remove();
367
- }
368
- /**
369
- * Creates the debug widget.
370
- */
371
- showWidget() {
372
- const debugWidget = document.createElement('kup-card');
373
- const languages = dom$7.ketchup.language.getLanguages();
374
- const languagesListData = [];
375
- for (let index = 0; index < languages.length; index++) {
376
- languagesListData.push({
377
- text: languages[index],
378
- value: languages[index],
379
- selected: languages[index] === dom$7.ketchup.language.name
380
- ? true
381
- : false,
382
- });
383
- }
384
- const themes = dom$7.ketchup.theme.getThemes();
385
- const themesListData = [];
386
- for (let index = 0; index < themes.length; index++) {
387
- themesListData.push({
388
- text: themes[index],
389
- value: themes[index],
390
- selected: themes[index] === dom$7.ketchup.theme.name ? true : false,
391
- });
392
- }
393
- debugWidget.data = {
394
- button: [
395
- {
396
- icon: 'power_settings_new',
397
- id: 'kup-debug-off',
398
- customStyle: ':host {--kup-font-size: 0.875em; border-left: 1px solid var(--kup-border-color); border-right: 1px solid var(--kup-border-color);}',
399
- title: dom$7.ketchup.language.translate(KupLanguageDebug.OFF),
400
- },
401
- {
402
- customStyle: ':host {--kup-font-size: 0.875em;}',
403
- icon: 'print',
404
- id: 'kup-debug-print',
405
- title: dom$7.ketchup.language.translate(KupLanguageDebug.PRINT),
406
- },
407
- {
408
- checked: this.autoPrint,
409
- customStyle: ':host {--kup-font-size: 0.875em; border-right: 1px solid var(--kup-border-color);}',
410
- icon: 'speaker_notes',
411
- iconOff: 'speaker_notes_off',
412
- id: 'kup-debug-autoprint',
413
- title: dom$7.ketchup.language.translate(KupLanguageDebug.AUTOPRINT),
414
- toggable: true,
415
- },
416
- {
417
- customStyle: ':host {--kup-font-size: 0.875em;}',
418
- icon: 'broom',
419
- id: 'kup-debug-clear',
420
- title: dom$7.ketchup.language.translate(KupLanguageDebug.CLEAR),
421
- },
422
- {
423
- customStyle: ':host {--kup-font-size: 0.875em;}',
424
- icon: 'delete',
425
- id: 'kup-debug-delete',
426
- title: dom$7.ketchup.language.translate(KupLanguageDebug.DUMP),
427
- },
428
- {
429
- className: 'kup-full-height',
430
- customStyle: ':host {border-left: 1px solid var(--kup-border-color);}',
431
- icon: 'download',
432
- id: 'kup-debug-dl-props',
433
- label: 'Props',
434
- styling: 'flat',
435
- title: dom$7.ketchup.language.translate(KupLanguageDebug.DL_PROPS),
436
- },
437
- {
438
- className: 'kup-full-height',
439
- customStyle: ':host {border-right: 1px solid var(--kup-border-color);}',
440
- icon: 'download',
441
- id: 'kup-debug-dl-all',
442
- label: dom$7.ketchup.language.translate(KupLanguageDebug.DL_ALL),
443
- styling: 'flat',
444
- title: dom$7.ketchup.language.translate(KupLanguageDebug.DL_ALL),
445
- },
446
- {
447
- customStyle: ':host {--kup-font-size: 0.875em;}',
448
- icon: 'auto-fix',
449
- id: 'kup-debug-magic-box',
450
- title: dom$7.ketchup.language.translate(KupLanguageDebug.MAGIC_BOX),
451
- },
452
- ],
453
- combobox: [
454
- {
455
- className: 'kup-full-height',
456
- data: {
457
- 'kup-list': {
458
- data: themesListData,
459
- id: 'kup-debug-theme-changer-list',
460
- },
461
- 'kup-text-field': {
462
- className: 'kup-full-height',
463
- emitSubmitEventOnEnter: false,
464
- inputType: 'text',
465
- label: dom$7.ketchup.language.translate(KupLanguageDebug.THEME_CHANGER),
466
- },
467
- },
468
- id: 'kup-debug-theme-changer',
469
- initialValue: dom$7.ketchup.theme.name,
470
- isSelect: true,
471
- },
472
- {
473
- className: 'kup-full-height',
474
- data: {
475
- 'kup-list': {
476
- data: languagesListData,
477
- id: 'kup-debug-language-changer-list',
478
- },
479
- 'kup-text-field': {
480
- className: 'kup-full-height',
481
- emitSubmitEventOnEnter: false,
482
- inputType: 'text',
483
- label: dom$7.ketchup.language.translate(KupLanguageDebug.LANGUAGE_CHANGER),
484
- },
485
- },
486
- id: 'kup-debug-language-changer',
487
- initialValue: dom$7.ketchup.language.name,
488
- isSelect: true,
489
- },
490
- ],
491
- textfield: [
492
- {
493
- className: 'kup-full-height',
494
- id: 'kup-debug-log-limit',
495
- label: dom$7.ketchup.language.translate(KupLanguageDebug.LOG_LIMIT),
496
- initialValue: this.logLimit,
497
- emitSubmitEventOnEnter: false,
498
- inputType: 'number',
499
- },
500
- ],
501
- };
502
- debugWidget.customStyle =
503
- '#kup-debug-log-limit {width: 120px;} #kup-debug-theme-changer {width: 190px;} #kup-debug-language-changer {width: 190px;}';
504
- debugWidget.id = 'kup-debug-widget';
505
- debugWidget.layoutFamily = KupCardFamily.DIALOG;
506
- debugWidget.layoutNumber = 3;
507
- debugWidget.sizeX = 'auto';
508
- debugWidget.sizeY = 'auto';
509
- debugWidget.addEventListener('kup-card-event', (e) => this.handleEvents(e));
510
- this.container.append(debugWidget);
511
- __classPrivateFieldSet$3(this, _debugWidget, debugWidget);
512
- }
513
- /**
514
- * Closes the debug widget.
515
- */
516
- hideWidget() {
517
- __classPrivateFieldGet$3(this, _debugWidget).remove();
518
- __classPrivateFieldSet$3(this, _debugWidget, null);
519
- }
520
- /**
521
- * Clears all the printed logs inside the debug widget.
522
- */
523
- widgetClear() {
524
- const children = Array.prototype.slice.call(__classPrivateFieldGet$3(this, _debugWidget).children, 0);
525
- for (let index = 0; index < children.length; index++) {
526
- children[index].remove();
527
- }
528
- }
529
- /**
530
- * Prints the stored logs inside the debug widget.
531
- */
532
- widgetPrint() {
533
- const slots = [];
534
- for (let index = 0; index < this.logs.length; index++) {
535
- // Wrapper div
536
- const slot = document.createElement('div');
537
- slot.classList.add('text');
538
- switch (this.logs[index].category) {
539
- case KupDebugCategory.ERROR:
540
- slot.style.backgroundColor =
541
- 'rgba(var(--kup-danger-color-rgb), 0.15)';
542
- slot.style.borderLeft = '5px solid var(--kup-danger-color)';
543
- break;
544
- case KupDebugCategory.WARNING:
545
- slot.style.backgroundColor =
546
- 'rgba(var(--kup-warning-color-rgb), 0.15)';
547
- slot.style.borderLeft =
548
- '5px solid var(--kup-warning-color)';
549
- break;
550
- case KupDebugCategory.INFO:
551
- default:
552
- slot.style.borderLeft = '5px solid var(--kup-info-color)';
553
- break;
554
- }
555
- // If the log is tied to a KupComponent, on click its props will be downloaded.
556
- // Also, a different style will be applied to distinguish it between the others.
557
- if (typeof this.logs[index].element == 'object') {
558
- slot.title = dom$7.ketchup.language.translate(KupLanguageDebug.DL_PROPS_COMP);
559
- slot.style.fontWeight = 'bold';
560
- slot.style.cursor = 'pointer';
561
- slot.onclick = () => {
562
- try {
563
- this.logs[index].element
564
- .getProps()
565
- .then((res) => {
566
- this.downloadProps(res);
567
- });
568
- }
569
- catch (err) {
570
- this.logMessage('kup-debug', err, KupDebugCategory.WARNING);
571
- }
572
- };
573
- }
574
- // ID span
575
- const id = document.createElement('span');
576
- id.innerHTML = this.logs[index].id;
577
- id.style.opacity = '0.75';
578
- id.style.marginLeft = '5px';
579
- // Message span
580
- const message = document.createElement('span');
581
- message.innerHTML = this.logs[index].message;
582
- // Append elements
583
- slot.append(id, message);
584
- slots.push(slot);
585
- }
586
- slots.reverse();
587
- for (let index = 0; index < slots.length; index++) {
588
- __classPrivateFieldGet$3(this, _debugWidget).append(slots[index]);
589
- }
590
- }
591
- /**
592
- * Dumps the stored logs.
593
- */
594
- dump() {
595
- this.logs = [];
596
- }
597
- /**
598
- * Displays a table with debug information inside the browser's console.
599
- */
600
- print() {
601
- let printLog = {};
602
- for (let index = 0; index < this.logs.length; index++) {
603
- const type = this.logs[index].message.indexOf('Render #') > -1
604
- ? 'Render'
605
- : this.logs[index].message.indexOf('Component ready') > -1
606
- ? 'Load'
607
- : this.logs[index].message.indexOf('Size changed') > -1
608
- ? 'Resize'
609
- : 'Misc';
610
- const isComponent = !!this.logs[index]
611
- .element;
612
- if (!printLog[type]) {
613
- printLog[type] = [];
614
- }
615
- printLog[type].push({
616
- date: this.formatDate(this.logs[index].date),
617
- element: isComponent
618
- ? this.logs[index].element
619
- : this.logs[index].id,
620
- message: isComponent
621
- ? this.logs[index].id + this.logs[index].message
622
- : this.logs[index].message,
623
- });
624
- }
625
- for (const key in printLog) {
626
- if (Object.prototype.hasOwnProperty.call(printLog, key)) {
627
- console.groupCollapsed('%c %c' +
628
- key +
629
- ' logs ' +
630
- '(' +
631
- printLog[key].length +
632
- ')', 'background-color: ' +
633
- KupDebugLogColor[key] +
634
- '; margin-right: 10px; border-radius: 50%', 'background-color: transparent');
635
- for (let index = 0; index < printLog[key].length; index++) {
636
- console.log(printLog[key][index].date, printLog[key][index].message, printLog[key][index].element);
637
- }
638
- console.groupEnd();
639
- }
640
- }
641
- if (this.logs.length > 0) {
642
- console.groupCollapsed('%c %c' + 'All logs (' + this.logs.length + ')', 'background-color: ' +
643
- KupDebugLogColor['Total'] +
644
- '; margin-right: 10px; border-radius: 50%', 'background-color: transparent');
645
- console.table(this.logs);
646
- console.groupEnd();
647
- }
648
- }
649
- /**
650
- * Function used to set the status of the debug.
651
- * If no argument is provided, this method will work as a toggler.
652
- * @param {boolean} value - If this argument is provided, the debug status will be forced to its value.
653
- */
654
- toggle(value) {
655
- if (typeof value !== 'boolean') {
656
- this.active = !this.active;
657
- }
658
- else {
659
- this.active = value;
660
- }
661
- if (this.active) {
662
- document.dispatchEvent(new CustomEvent('kup-debug-active'));
663
- if (!__classPrivateFieldGet$3(this, _debugWidget)) {
664
- this.showWidget();
665
- }
666
- }
667
- else {
668
- document.dispatchEvent(new CustomEvent('kup-debug-inactive'));
669
- if (__classPrivateFieldGet$3(this, _debugWidget)) {
670
- this.hideWidget();
671
- }
672
- }
673
- }
674
- /**
675
- * Listens the card events and handles the related actions.
676
- * @param {CustomEvent} e - kup-card-event.
677
- */
678
- handleEvents(e) {
679
- const compEvent = e.detail.event;
680
- const compID = compEvent.detail.id;
681
- switch (compEvent.type) {
682
- case 'kup-button-click':
683
- switch (compID) {
684
- case 'kup-debug-autoprint':
685
- this.autoPrint = !this.autoPrint;
686
- break;
687
- case 'kup-debug-clear':
688
- this.widgetClear();
689
- __classPrivateFieldGet$3(this, _debugWidget).refresh();
690
- break;
691
- case 'kup-debug-dl-props':
692
- this.getProps().then((res) => {
693
- this.downloadProps(res);
694
- });
695
- break;
696
- case 'kup-debug-dl-all':
697
- this.getProps(true).then((res) => {
698
- this.downloadProps(res);
699
- });
700
- break;
701
- case 'kup-debug-delete':
702
- this.dump();
703
- break;
704
- case 'kup-debug-magic-box':
705
- dom$7.ketchup.toggleMagicBox();
706
- break;
707
- case 'kup-debug-off':
708
- this.toggle();
709
- break;
710
- case 'kup-debug-print':
711
- this.widgetClear();
712
- this.widgetPrint();
713
- __classPrivateFieldGet$3(this, _debugWidget).refresh();
714
- break;
715
- }
716
- break;
717
- case 'kup-combobox-itemclick':
718
- switch (compID) {
719
- case 'kup-debug-language-changer':
720
- dom$7.ketchup.language.set(compEvent.detail.value);
721
- break;
722
- case 'kup-debug-theme-changer':
723
- dom$7.ketchup.theme.set(compEvent.detail.value);
724
- break;
725
- }
726
- case 'kup-textfield-input':
727
- switch (compID) {
728
- case 'kup-debug-log-limit':
729
- if (compEvent.detail.value === '' ||
730
- compEvent.detail.value < 1) {
731
- this.logLimit = 1;
732
- }
733
- else {
734
- this.logLimit = compEvent.detail.value;
735
- }
736
- break;
737
- }
738
- }
739
- }
740
- /**
741
- * Function used to check whether the debug is active or not.
742
- * If kupDebug on documentElement's type is not a boolean, it will be set to false.
743
- * @returns {boolean} Status of the debug.
744
- */
745
- isDebug() {
746
- return this.active;
747
- }
748
- /**
749
- * Retrieves the information for every component in this.logs by invoking the getProps public method of each component.
750
- * 'tag' will contain the props of the component's html tag (i.e.: <kup-chip>).
751
- * 'props' will contain the developer defined props of the component, making it handy for test purposes.
752
- * @param {boolean} detail - If provided and true, the returned object will contain additional information (i.e.: className, id).
753
- * @returns {GenericObject} Props of the components.
754
- */
755
- async getProps(detail) {
756
- let comps = new Set();
757
- let props = detail ? { descriptions: {} } : {};
758
- // Storing unique components inside "comps"
759
- for (let index = 0; index < this.logs.length; index++) {
760
- if (typeof this.logs[index].element !== 'string') {
761
- if (!comps.has(this.logs[index].element)) {
762
- comps.add(this.logs[index].element);
763
- }
764
- }
765
- }
766
- // Object of two arrays, positionally matching each other.
767
- // One contains components, the other the relative promise.
768
- const matchingObject = {
769
- comps: [],
770
- promises: [],
771
- };
772
- comps.forEach((el) => {
773
- try {
774
- matchingObject.comps.push(el);
775
- matchingObject.promises.push(el.getProps());
776
- }
777
- catch (error) {
778
- this.logMessage('kup-debug', 'Exception when accessing "getProps" public method for component: ' +
779
- el.rootElement.tagName, KupDebugCategory.WARNING);
780
- }
781
- });
782
- // Returning "props", which is returned by the Promise.all
783
- return Promise.all(matchingObject.promises).then((responses) => {
784
- for (let index = 0; index < matchingObject.comps.length; index++) {
785
- const el = matchingObject.comps[index];
786
- const res = responses[index];
787
- let cnt = 0;
788
- let key = el.rootElement.id
789
- ? el.rootElement.tagName + '#' + el.rootElement.id
790
- : el.rootElement.tagName + '_' + ++cnt;
791
- while (props[key]) {
792
- key = el.rootElement.tagName + '_' + ++cnt;
793
- }
794
- if (detail) {
795
- let tag = {};
796
- for (const key in el.rootElement) {
797
- tag[key] = el.rootElement[key];
798
- }
799
- props[key] = {
800
- props: res,
801
- tagInfo: tag,
802
- };
803
- if (!props.descriptions[el.rootElement.tagName]) {
804
- try {
805
- el.getProps(true).then((res) => {
806
- props.descriptions[el.rootElement.tagName] =
807
- res;
808
- });
809
- }
810
- catch (error) {
811
- this.logMessage('kup-debug', 'Exception when accessing "getProps" public method for component: ' +
812
- el.rootElement.tagName, KupDebugCategory.WARNING);
813
- }
814
- }
815
- }
816
- else {
817
- props[key] = res;
818
- }
819
- }
820
- return props;
821
- });
822
- }
823
- /**
824
- * Displays a timestamped message in the browser's console when the kupDebug property on document.documentElement is true.
825
- * Warnings and errors will be displayed even when kupDebug !== true.
826
- * @param {any} comp - The component calling this function or a string.
827
- * @param {string} message - The actual message that will be printed.
828
- * @param {KupDebugCategory} category - The type of console message, defaults to log but warning and error can be used as well.
829
- */
830
- logMessage(comp, message, category) {
831
- if ((!category || category === KupDebugCategory.INFO) &&
832
- !this.isDebug()) {
833
- return;
834
- }
835
- const date = new Date();
836
- if (!category) {
837
- category = KupDebugCategory.INFO;
838
- }
839
- let obj = null;
840
- let id = '';
841
- if (comp.rootElement) {
842
- id =
843
- ' ' +
844
- comp.rootElement.tagName +
845
- '#' +
846
- comp.rootElement.id +
847
- ' => ';
848
- obj = comp;
849
- }
850
- else {
851
- id = ' ' + comp + ' => ';
852
- obj = '';
853
- }
854
- if (this.isDebug() && id.indexOf('#kup-debug') < 0) {
855
- const log = {
856
- category: category,
857
- date: date,
858
- element: obj,
859
- id: id,
860
- message: message,
861
- };
862
- if (this.logs.length > this.logLimit) {
863
- console.warn(this.formatDate(date) +
864
- ' kup-debug => ' +
865
- 'Too many logs (> ' +
866
- this.logLimit +
867
- ')! Dumping (increase debug.logLimit to store more logs)... .');
868
- this.dump();
869
- }
870
- this.logs.push(log);
871
- if (this.autoPrint && __classPrivateFieldGet$3(this, _debugWidget)) {
872
- this.widgetClear();
873
- this.widgetPrint();
874
- __classPrivateFieldGet$3(this, _debugWidget).refresh();
875
- }
876
- }
877
- switch (category) {
878
- case KupDebugCategory.ERROR:
879
- console.error(this.formatDate(date) + id + message, obj);
880
- window.dispatchEvent(new CustomEvent('kupError', {
881
- bubbles: true,
882
- detail: { comp, date, message },
883
- }));
884
- break;
885
- case KupDebugCategory.WARNING:
886
- console.warn(this.formatDate(date) + id + message, obj);
887
- break;
888
- }
889
- }
890
- /**
891
- * Function used to format a date.
892
- * Example: "Sun Mar 14 2021 13:50:56,329pm"
893
- * @param {Date} date - Date to be formatted.
894
- * @returns {string} Formatted
895
- */
896
- formatDate(date) {
897
- let minutes = date.getMinutes().toString().length == 1
898
- ? '0' + date.getMinutes()
899
- : date.getMinutes(), hours = date.getHours().toString().length == 1
900
- ? '0' + date.getHours()
901
- : date.getHours(), seconds = date.getSeconds().toString().length == 1
902
- ? '0' + date.getSeconds()
903
- : date.getSeconds(), milliseconds = date.getMilliseconds().toString().length == 1
904
- ? '0' + date.getMilliseconds()
905
- : date.getMilliseconds(), ampm = date.getHours() >= 12 ? 'pm' : 'am', months = [
906
- 'Jan',
907
- 'Feb',
908
- 'Mar',
909
- 'Apr',
910
- 'May',
911
- 'Jun',
912
- 'Jul',
913
- 'Aug',
914
- 'Sep',
915
- 'Oct',
916
- 'Nov',
917
- 'Dec',
918
- ], days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
919
- return (days[date.getDay()] +
920
- ' ' +
921
- months[date.getMonth()] +
922
- ' ' +
923
- date.getDate() +
924
- ' ' +
925
- date.getFullYear() +
926
- ' ' +
927
- hours +
928
- ':' +
929
- minutes +
930
- ':' +
931
- seconds +
932
- ',' +
933
- milliseconds +
934
- ampm);
935
- }
936
- /**
937
- * Function used to time the loading times of a component.
938
- * @param {any} comp - The component calling this function or a string.
939
- * @param {boolean} didLoad - Must be set to false when called inside a componentWillLoad() lifecycle hook and true when called inside componentDidLoad().
940
- */
941
- logLoad(comp, didLoad) {
942
- if (!didLoad) {
943
- comp['debugInfo'] = {
944
- startTime: window.performance.now(),
945
- endTime: 0,
946
- renderCount: 0,
947
- renderStart: 0,
948
- renderEnd: 0,
949
- };
950
- }
951
- else {
952
- comp.debugInfo.endTime = window.performance.now();
953
- let timeDiff = comp.debugInfo.endTime - comp.debugInfo.startTime;
954
- if (this.isDebug()) {
955
- this.logMessage(comp, 'Component ready after ' + timeDiff + 'ms.');
956
- }
957
- }
958
- }
959
- /**
960
- * Function used to time the render times of a component.
961
- * @param {any} comp - The component calling this function or a string.
962
- * @param {boolean} didRender - Must be set to false when called inside a componentWillRender() lifecycle hook and true when called inside componentDidRender().
963
- * @param {string} breakpoint - When present, this log is supposedly between a willRender and didRender hook. Used to time single features of the render lifecycle.
964
- */
965
- logRender(comp, didRender, breakpoint) {
966
- if (breakpoint) {
967
- const timeDiff = window.performance.now() - comp.debugInfo.renderStart;
968
- if (this.isDebug()) {
969
- this.logMessage(comp, breakpoint + ' took ' + timeDiff + 'ms.');
970
- }
971
- }
972
- else if (!didRender) {
973
- comp.debugInfo.renderCount++;
974
- comp.debugInfo.renderStart = window.performance.now();
975
- }
976
- else {
977
- comp.debugInfo.renderEnd = window.performance.now();
978
- const timeDiff = comp.debugInfo.renderEnd - comp.debugInfo.renderStart;
979
- if (this.isDebug()) {
980
- this.logMessage(comp, 'Render #' +
981
- comp.debugInfo.renderCount +
982
- ' took ' +
983
- timeDiff +
984
- 'ms.');
985
- }
986
- }
987
- }
988
- }
989
- _debugWidget = new WeakMap();
990
-
991
- /**
992
- * HTML Attribute attached to dialogs.
993
- * Referenced by kup-theme.css
994
- */
995
- const kupDialogAttribute = 'kup-dialog';
996
- /**
997
- * CSS class attached to resizable dialogs.
998
- * Referenced by kup-theme.css
999
- */
1000
- const kupResizableDialogClass = 'kup-resizable';
1001
- /**
1002
- * Actions performed by KupDialog.
1003
- * The value reflects the CSS "cursor" property.
1004
- */
1005
- var KupDialogActions;
1006
- (function (KupDialogActions) {
1007
- KupDialogActions["MOVE"] = "move";
1008
- KupDialogActions["RESIZE"] = "resize";
1009
- })(KupDialogActions || (KupDialogActions = {}));
1010
- /**
1011
- * Coordinates of the resize.
1012
- * The value reflects the CSS "cursor" property.
1013
- */
1014
- var KupDialogCoordinates;
1015
- (function (KupDialogCoordinates) {
1016
- KupDialogCoordinates["ALL"] = "move";
1017
- KupDialogCoordinates["UNSET"] = "auto";
1018
- KupDialogCoordinates["NORTHWEST"] = "nw-resize";
1019
- KupDialogCoordinates["NORTH"] = "n-resize";
1020
- KupDialogCoordinates["NORTHEAST"] = "ne-resize";
1021
- KupDialogCoordinates["EAST"] = "e-resize";
1022
- KupDialogCoordinates["SOUTHEAST"] = "se-resize";
1023
- KupDialogCoordinates["SOUTH"] = "s-resize";
1024
- KupDialogCoordinates["SOUTHWEST"] = "sw-resize";
1025
- KupDialogCoordinates["WEST"] = "w-resize";
1026
- })(KupDialogCoordinates || (KupDialogCoordinates = {}));
1027
-
1028
- var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
1029
- if (!privateMap.has(receiver)) {
1030
- throw new TypeError("attempted to set private field on non-instance");
1031
- }
1032
- privateMap.set(receiver, value);
1033
- return value;
1034
- };
1035
- var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
1036
- if (!privateMap.has(receiver)) {
1037
- throw new TypeError("attempted to get private field on non-instance");
1038
- }
1039
- return privateMap.get(receiver);
1040
- };
1041
- var _elementDrag, _mouseDown, _mouseUp;
1042
- const dom$6 = document.documentElement;
1043
- /**
1044
- * This class handles elements as dialogs, making them resizable and movable.
1045
- * @module KupDialog
1046
- */
1047
- class KupDialog {
1048
- /**
1049
- * Initializes KupDialog.
1050
- * @param {number} zIndex - The starting z-index assigned to dialogs.
1051
- */
1052
- constructor(zIndex) {
1053
- _elementDrag.set(this, void 0);
1054
- _mouseDown.set(this, void 0);
1055
- _mouseUp.set(this, void 0);
1056
- this.action = null;
1057
- this.activeElement = null;
1058
- this.activeX = 0;
1059
- this.activeY = 0;
1060
- this.coordinates = null;
1061
- this.managedElements = new Set();
1062
- this.startingHeight = 0;
1063
- this.startingWidth = 0;
1064
- this.startingX = 0;
1065
- this.startingY = 0;
1066
- this.threshold = 5;
1067
- this.zIndex = zIndex ? zIndex : 200;
1068
- __classPrivateFieldSet$2(this, _elementDrag, function (e) {
1069
- const kupDialog = dom$6.ketchup.dialog;
1070
- const paths = e.composedPath();
1071
- if (kupDialog.action === KupDialogActions.MOVE) {
1072
- const x = kupDialog.activeElement.offsetLeft -
1073
- (kupDialog.activeX - e.clientX);
1074
- const y = kupDialog.activeElement.offsetTop -
1075
- (kupDialog.activeY - e.clientY);
1076
- kupDialog.activeElement.style.left = x + 'px';
1077
- kupDialog.activeElement.style.top = y + 'px';
1078
- kupDialog.activeX = e.clientX;
1079
- kupDialog.activeY = e.clientY;
1080
- }
1081
- else if (kupDialog.action === KupDialogActions.RESIZE) {
1082
- const height = kupDialog.activeElement.offsetHeight;
1083
- const width = kupDialog.activeElement.offsetWidth;
1084
- let x = kupDialog.startingWidth;
1085
- let y = kupDialog.startingHeight;
1086
- //Y coordinates
1087
- switch (kupDialog.coordinates) {
1088
- case KupDialogCoordinates.NORTH:
1089
- case KupDialogCoordinates.NORTHEAST:
1090
- case KupDialogCoordinates.NORTHWEST: {
1091
- y += kupDialog.activeY - e.clientY;
1092
- if (y < 100) {
1093
- y = 100;
1094
- }
1095
- kupDialog.activeElement.style.height = y + 'px';
1096
- if (height !== kupDialog.activeElement.offsetHeight) {
1097
- kupDialog.activeElement.style.top =
1098
- kupDialog.activeElement.offsetTop -
1099
- (kupDialog.startingY - e.clientY) +
1100
- 'px';
1101
- kupDialog.startingY = e.clientY;
1102
- }
1103
- break;
1104
- }
1105
- case KupDialogCoordinates.SOUTH:
1106
- case KupDialogCoordinates.SOUTHEAST:
1107
- case KupDialogCoordinates.SOUTHWEST: {
1108
- y -= kupDialog.activeY - e.clientY;
1109
- if (y < 100) {
1110
- y = 100;
1111
- }
1112
- kupDialog.activeElement.style.height = y + 'px';
1113
- break;
1114
- }
1115
- }
1116
- //X coordinates
1117
- switch (kupDialog.coordinates) {
1118
- case KupDialogCoordinates.EAST:
1119
- case KupDialogCoordinates.NORTHEAST:
1120
- case KupDialogCoordinates.SOUTHEAST: {
1121
- x -= kupDialog.activeX - e.clientX;
1122
- if (x < 100) {
1123
- x = 100;
1124
- }
1125
- kupDialog.activeElement.style.width = x + 'px';
1126
- break;
1127
- }
1128
- case KupDialogCoordinates.WEST:
1129
- case KupDialogCoordinates.NORTHWEST:
1130
- case KupDialogCoordinates.SOUTHWEST: {
1131
- x += kupDialog.activeX - e.clientX;
1132
- if (x < 100) {
1133
- x = 100;
1134
- }
1135
- kupDialog.activeElement.style.width = x + 'px';
1136
- if (width !== kupDialog.activeElement.offsetWidth) {
1137
- kupDialog.activeElement.style.left =
1138
- kupDialog.activeElement.offsetLeft -
1139
- (kupDialog.startingX - e.clientX) +
1140
- 'px';
1141
- kupDialog.startingX = e.clientX;
1142
- }
1143
- break;
1144
- }
1145
- }
1146
- }
1147
- else {
1148
- kupDialog.managedElements.forEach((el) => {
1149
- if (paths.includes(el)) {
1150
- kupDialog.activeElement = el;
1151
- }
1152
- });
1153
- kupDialog.setCoords(e.clientX, e.clientY, paths);
1154
- }
1155
- // Check whether position is inside viewport's contraints
1156
- if (kupDialog.activeElement) {
1157
- const rect = kupDialog.activeElement.getBoundingClientRect();
1158
- if (rect.left < 0) {
1159
- kupDialog.activeElement.style.left = '0';
1160
- }
1161
- else if (rect.right > window.innerWidth) {
1162
- kupDialog.activeElement.style.left =
1163
- window.innerWidth - rect.width + 'px';
1164
- }
1165
- if (rect.top < 0) {
1166
- kupDialog.activeElement.style.top = '0';
1167
- }
1168
- else if (rect.bottom > window.innerHeight) {
1169
- kupDialog.activeElement.style.top =
1170
- window.innerHeight - rect.height + 'px';
1171
- }
1172
- }
1173
- });
1174
- __classPrivateFieldSet$2(this, _mouseDown, function (e) {
1175
- const kupDialog = dom$6.ketchup.dialog;
1176
- if (kupDialog.activeElement) {
1177
- switch (kupDialog.coordinates) {
1178
- case KupDialogCoordinates.ALL:
1179
- kupDialog.action = KupDialogActions.MOVE;
1180
- break;
1181
- case KupDialogCoordinates.UNSET:
1182
- return;
1183
- default:
1184
- kupDialog.action = KupDialogActions.RESIZE;
1185
- kupDialog.startingHeight =
1186
- kupDialog.activeElement.offsetHeight;
1187
- kupDialog.startingWidth =
1188
- kupDialog.activeElement.offsetWidth;
1189
- kupDialog.startingX =
1190
- kupDialog.activeElement.offsetLeft;
1191
- kupDialog.startingY = kupDialog.activeElement.offsetTop;
1192
- break;
1193
- }
1194
- e.preventDefault();
1195
- kupDialog.activeX = e.clientX;
1196
- kupDialog.activeY = e.clientY;
1197
- kupDialog.activeElement.style.zIndex = (this
1198
- .zIndex++).toString();
1199
- }
1200
- });
1201
- __classPrivateFieldSet$2(this, _mouseUp, function () {
1202
- const kupDialog = dom$6.ketchup.dialog;
1203
- kupDialog.action = null;
1204
- kupDialog.activeElement = null;
1205
- });
1206
- document.addEventListener('mousemove', __classPrivateFieldGet$2(this, _elementDrag));
1207
- document.addEventListener('mouseup', __classPrivateFieldGet$2(this, _mouseUp));
1208
- }
1209
- /**
1210
- * Checks whether the mouse overs on the edges of the element or not.
1211
- * @param {number} x - X coordinate.
1212
- * @param {number} y - Y coordinate.
1213
- * @param {EventTarget[]} paths - Paths returned from the event. Used to search for the drag handle and, if found, enables dragging.
1214
- */
1215
- setCoords(x, y, paths) {
1216
- this.coordinates = KupDialogCoordinates.UNSET;
1217
- if (this.activeElement) {
1218
- if (this.activeElement.kupDialog.resizable) {
1219
- // Left border
1220
- if (x === this.activeElement.offsetLeft ||
1221
- (x > this.activeElement.offsetLeft &&
1222
- x < this.activeElement.offsetLeft + this.threshold)) {
1223
- this.coordinates = KupDialogCoordinates.WEST;
1224
- }
1225
- else if (x ===
1226
- this.activeElement.offsetLeft +
1227
- this.activeElement.offsetWidth ||
1228
- (x <
1229
- this.activeElement.offsetLeft +
1230
- this.activeElement.offsetWidth &&
1231
- x >
1232
- this.activeElement.offsetLeft +
1233
- this.activeElement.offsetWidth -
1234
- this.threshold)) {
1235
- // Right border
1236
- this.coordinates = KupDialogCoordinates.EAST;
1237
- }
1238
- // Top border
1239
- if (y === this.activeElement.offsetTop ||
1240
- (y > this.activeElement.offsetTop &&
1241
- y < this.activeElement.offsetTop + this.threshold)) {
1242
- if (this.coordinates === KupDialogCoordinates.WEST) {
1243
- this.coordinates = KupDialogCoordinates.NORTHWEST;
1244
- }
1245
- else if (this.coordinates === KupDialogCoordinates.EAST) {
1246
- this.coordinates = KupDialogCoordinates.NORTHEAST;
1247
- }
1248
- else {
1249
- this.coordinates = KupDialogCoordinates.NORTH;
1250
- }
1251
- }
1252
- else if (
1253
- // Bottom border
1254
- y ===
1255
- this.activeElement.offsetTop +
1256
- this.activeElement.offsetHeight ||
1257
- (y <
1258
- this.activeElement.offsetTop +
1259
- this.activeElement.offsetHeight &&
1260
- y >
1261
- this.activeElement.offsetTop +
1262
- this.activeElement.offsetHeight -
1263
- this.threshold)) {
1264
- if (this.coordinates === KupDialogCoordinates.WEST) {
1265
- this.coordinates = KupDialogCoordinates.SOUTHWEST;
1266
- }
1267
- else if (this.coordinates === KupDialogCoordinates.EAST) {
1268
- this.coordinates = KupDialogCoordinates.SOUTHEAST;
1269
- }
1270
- else {
1271
- this.coordinates = KupDialogCoordinates.SOUTH;
1272
- }
1273
- }
1274
- }
1275
- if (this.coordinates === KupDialogCoordinates.UNSET) {
1276
- if (this.activeElement.kupDialog.dragHandle) {
1277
- if (paths.includes(this.activeElement.kupDialog.dragHandle)) {
1278
- this.coordinates = KupDialogCoordinates.ALL;
1279
- }
1280
- }
1281
- else {
1282
- this.coordinates = KupDialogCoordinates.ALL;
1283
- }
1284
- }
1285
- this.activeElement.style.cursor = this.coordinates;
1286
- }
1287
- }
1288
- /**
1289
- * Watches the element handled as dialog.
1290
- * @param {DialogElement} el - Dialog element.
1291
- * @param {HTMLElement} handleEl - Element that must be dragged in order to trigger movement. When not provided, dragging anywhere on "el" will move it.
1292
- * @param {boolean} unresizable - When true, the dialog can't be resized.
1293
- */
1294
- register(el, handleEl, unresizable) {
1295
- el.setAttribute(kupDialogAttribute, '');
1296
- el.style.zIndex = (this.zIndex++).toString();
1297
- if (!el.style.left) {
1298
- el.style.left = '0';
1299
- }
1300
- if (!el.style.top) {
1301
- el.style.top = '0';
1302
- }
1303
- el.addEventListener('mousedown', (e) => __classPrivateFieldGet$2(this, _mouseDown).call(this, e));
1304
- el.kupDialog = { dragHandle: null, resizable: true };
1305
- if (handleEl) {
1306
- el.kupDialog.dragHandle = handleEl;
1307
- }
1308
- if (unresizable) {
1309
- el.kupDialog.resizable = false;
1310
- }
1311
- else {
1312
- el.classList.add(kupResizableDialogClass);
1313
- }
1314
- this.managedElements.add(el);
1315
- }
1316
- /**
1317
- * Removes the elements from the MoveOnDrag class watchlist.
1318
- * @param {DialogElement[]} elements - Elements to remove.
1319
- */
1320
- unregister(elements) {
1321
- if (this.managedElements) {
1322
- for (let index = 0; index < elements.length; index++) {
1323
- this.managedElements.delete(elements[index]);
1324
- }
1325
- }
1326
- }
1327
- /**
1328
- * Returns whether an element was previously registered or not.
1329
- * @param {DialogElement} el - Element to test.
1330
- * @returns {boolean} True if the element was registered.
1331
- */
1332
- isRegistered(el) {
1333
- return !this.managedElements ? false : this.managedElements.has(el);
1334
- }
1335
- }
1336
- _elementDrag = new WeakMap(), _mouseDown = new WeakMap(), _mouseUp = new WeakMap();
1337
-
1338
- const dom$5 = document.documentElement;
1339
- /**
1340
- * This class is used to dynamically reposition HTML elements.
1341
- * @module KupDynamicPosition
1342
- */
1343
- class KupDynamicPosition {
1344
- /**
1345
- * Initializes KupDynamicPosition.
1346
- */
1347
- constructor() {
1348
- this.container = document.createElement('div');
1349
- this.container.setAttribute('kup-dynamic-position', '');
1350
- document.body.appendChild(this.container);
1351
- this.managedElements = new Set();
1352
- }
1353
- /**
1354
- * Function used to check whether the anchor point is an HTMLElement or a set of coordinates.
1355
- * @param {KupDynamicPositionAnchor} anchor - Anchor point.
1356
- * @returns {anchor is HTMLElement} Returns true when the anchor point is an HTMLElement.
1357
- */
1358
- anchorIsHTMLElement(anchor) {
1359
- return anchor.tagName !== undefined;
1360
- }
1361
- /**
1362
- * Watches the element eligible to dynamic positioning.
1363
- * @param {KupDynamicPositionElement} el - Element to reposition.
1364
- * @param {KupDynamicPositionAnchor} anchorEl - "el" position will be anchored to this element or to these coordinates.
1365
- * @param {number} margin - "el" distance from its parent in pixels.
1366
- * @param {KupDynamicPositionPlacement} placement - "el" placement.
1367
- * @param {boolean} detach - When true, the function won't be recursive but it will be executed only once. "el" will be detached from its original parent and it will be appended to this.container.
1368
- */
1369
- register(el, anchorEl, margin, placement, detach) {
1370
- if (this.isRegistered(el)) {
1371
- if (this.anchorIsHTMLElement(anchorEl)) {
1372
- this.changeAnchor(el, anchorEl);
1373
- }
1374
- return;
1375
- }
1376
- el.setAttribute(kupDynamicPositionAttribute, '');
1377
- if (this.anchorIsHTMLElement(anchorEl)) {
1378
- anchorEl.setAttribute(kupDynamicPositionAnchorAttribute, '');
1379
- }
1380
- if (detach) {
1381
- el.style.position = 'absolute';
1382
- this.container.appendChild(el);
1383
- }
1384
- else {
1385
- el.style.position = 'fixed';
1386
- }
1387
- el.style.zIndex = '1000';
1388
- el.kupDynamicPosition = {
1389
- anchor: anchorEl,
1390
- detach: detach ? true : false,
1391
- margin: margin ? margin : 0,
1392
- placement: placement ? placement : KupDynamicPositionPlacement.AUTO,
1393
- rAF: null,
1394
- };
1395
- const mutObserver = new MutationObserver(function (mutations) {
1396
- const target = mutations[0].target;
1397
- if (target.classList.contains(kupDynamicPositionActiveClass)) {
1398
- requestAnimationFrame(function () {
1399
- dom$5.ketchup.dynamicPosition.run(el);
1400
- });
1401
- }
1402
- });
1403
- mutObserver.observe(el, {
1404
- attributes: true,
1405
- attributeFilter: ['class'],
1406
- });
1407
- this.managedElements.add(el);
1408
- }
1409
- /**
1410
- * Changes the anchor point of the given element.
1411
- * @param {KupDynamicPositionElement} elements - Dynamically positioned element previously registered.
1412
- * @param {HTMLElement} anchorEl - New anchor point.
1413
- */
1414
- changeAnchor(el, anchorEl) {
1415
- el.kupDynamicPosition.anchor = anchorEl;
1416
- }
1417
- /**
1418
- * Removes the element from dynamic position management.
1419
- * @param {KupDynamicPositionElement[]} elements - Elements to remove from the managed elements set.
1420
- */
1421
- unregister(elements) {
1422
- if (this.managedElements) {
1423
- for (let index = 0; index < elements.length; index++) {
1424
- this.managedElements.delete(elements[index]);
1425
- }
1426
- }
1427
- }
1428
- /**
1429
- * Returns whether an element was previously registered or not.
1430
- * @param {KupDynamicPositionElement} el - Element to test.
1431
- * @returns {boolean} True if the element was registered.
1432
- */
1433
- isRegistered(el) {
1434
- return !this.managedElements ? false : this.managedElements.has(el);
1435
- }
1436
- /**
1437
- * Starts the process of dynamically reposition the element (which must be firstly initialized through this.setup()).
1438
- * @param {KupDynamicPositionElement} el - Element to reposition.
1439
- */
1440
- start(el) {
1441
- el.classList.add(kupDynamicPositionActiveClass);
1442
- }
1443
- /**
1444
- * Ends the process of dynamically reposition the element.
1445
- * @param {KupDynamicPositionElement} el - Element to reposition.
1446
- */
1447
- stop(el) {
1448
- el.classList.remove(kupDynamicPositionActiveClass);
1449
- }
1450
- /**
1451
- * This function calculates where to place the element in order to correctly display it attached to its anchor point.
1452
- * @param {KupDynamicPositionElement} el - Element to reposition.
1453
- */
1454
- run(el) {
1455
- if (!el.isConnected) {
1456
- dom$5.ketchup.dynamicPosition.managedElements.delete(el);
1457
- cancelAnimationFrame(el.kupDynamicPosition.rAF);
1458
- return;
1459
- }
1460
- if (!el.classList.contains(kupDynamicPositionActiveClass)) {
1461
- cancelAnimationFrame(el.kupDynamicPosition.rAF);
1462
- return;
1463
- }
1464
- // Reset placement
1465
- el.style.top = '';
1466
- el.style.right = '';
1467
- el.style.bottom = '';
1468
- el.style.left = '';
1469
- // Fixed position (usually from mouse events).
1470
- // When anchor doesn't have the tagName property, anchor is considered as a set of coordinates.
1471
- if (!this.anchorIsHTMLElement(el.kupDynamicPosition.anchor)) {
1472
- const x = el.kupDynamicPosition.anchor.x;
1473
- const y = el.kupDynamicPosition.anchor.y;
1474
- if (el.offsetWidth >
1475
- window.innerWidth - el.kupDynamicPosition.anchor.x) {
1476
- el.style.left = x - el.offsetWidth + 'px';
1477
- }
1478
- else {
1479
- el.style.left = x + 'px';
1480
- }
1481
- if (el.offsetHeight >
1482
- window.innerHeight - el.kupDynamicPosition.anchor.y) {
1483
- el.style.top = y - el.offsetHeight + 'px';
1484
- }
1485
- else {
1486
- el.style.top = y + 'px';
1487
- }
1488
- return;
1489
- }
1490
- const detached = !!el.kupDynamicPosition.detach;
1491
- const offsetH = el.clientHeight;
1492
- const offsetW = el.clientWidth;
1493
- const rect = el.kupDynamicPosition.anchor.getBoundingClientRect();
1494
- const top = detached ? window.pageYOffset + rect.top : rect.top, left = detached
1495
- ? window.pageXOffset + rect.left
1496
- : rect.left, bottom = detached
1497
- ? window.pageYOffset + rect.bottom
1498
- : rect.bottom, right = detached
1499
- ? window.pageXOffset + rect.right
1500
- : rect.right;
1501
- // Vertical position
1502
- if (el.kupDynamicPosition.placement ===
1503
- KupDynamicPositionPlacement.TOP ||
1504
- el.kupDynamicPosition.placement ===
1505
- KupDynamicPositionPlacement.TOP_LEFT ||
1506
- el.kupDynamicPosition.placement ===
1507
- KupDynamicPositionPlacement.TOP_RIGHT) {
1508
- el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
1509
- }
1510
- else if (el.kupDynamicPosition.placement ===
1511
- KupDynamicPositionPlacement.BOTTOM ||
1512
- el.kupDynamicPosition.placement ===
1513
- KupDynamicPositionPlacement.BOTTOM_LEFT ||
1514
- el.kupDynamicPosition.placement ===
1515
- KupDynamicPositionPlacement.BOTTOM_RIGHT) {
1516
- el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
1517
- }
1518
- else {
1519
- if (window.innerHeight - bottom < offsetH) {
1520
- el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
1521
- }
1522
- else {
1523
- el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
1524
- }
1525
- }
1526
- // Horizontal position
1527
- if (el.kupDynamicPosition.placement ===
1528
- KupDynamicPositionPlacement.LEFT ||
1529
- el.kupDynamicPosition.placement ===
1530
- KupDynamicPositionPlacement.BOTTOM_LEFT ||
1531
- el.kupDynamicPosition.placement ===
1532
- KupDynamicPositionPlacement.TOP_LEFT) {
1533
- el.style.left = `${left}px`;
1534
- }
1535
- else if (el.kupDynamicPosition.placement ===
1536
- KupDynamicPositionPlacement.RIGHT ||
1537
- el.kupDynamicPosition.placement ===
1538
- KupDynamicPositionPlacement.BOTTOM_RIGHT ||
1539
- el.kupDynamicPosition.placement ===
1540
- KupDynamicPositionPlacement.TOP_RIGHT) {
1541
- let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
1542
- if (scrollbarWidth > 30) {
1543
- scrollbarWidth = 0;
1544
- }
1545
- el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
1546
- }
1547
- else {
1548
- if (window.innerWidth - left < offsetW) {
1549
- let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
1550
- if (scrollbarWidth > 30) {
1551
- scrollbarWidth = 0;
1552
- }
1553
- el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
1554
- }
1555
- else {
1556
- el.style.left = `${left}px`;
1557
- }
1558
- }
1559
- // Recursive
1560
- if (!el.kupDynamicPosition.detach) {
1561
- el.kupDynamicPosition.rAF = requestAnimationFrame(function () {
1562
- dom$5.ketchup.dynamicPosition.run(el);
1563
- });
1564
- }
1565
- else {
1566
- cancelAnimationFrame(el.kupDynamicPosition.rAF);
1567
- return;
1568
- }
1569
- }
1570
- }
1571
-
1572
- const chinese = {
1573
- keys: {
1574
- checkboxAll: "全部",
1575
- checkboxChecked: "已检查",
1576
- checkboxIndeterminate: "不定",
1577
- checkboxUnchecked: "未检查",
1578
- columnAdd: "添加栏",
1579
- columnAddDescription: "添加代码/描述列",
1580
- columnColumns: "列",
1581
- columnHide: "隐藏栏",
1582
- debugAutoprint: "切换自动打印",
1583
- debugClear: "清除小部件",
1584
- debugDLAll: "全部",
1585
- debugDLProps: "下载组件道具",
1586
- debugDLPropsComp: "下载组件道具",
1587
- debugDump: "转储存储的日志",
1588
- debugLanguageChanger: "设置语言",
1589
- debugLogLimit: "设置日志限制",
1590
- debugMagicBox: "切换kup-magic-box",
1591
- debugOff: "关闭调试",
1592
- debugPrint: "打印已存储的日志",
1593
- debugThemeChanger: "设置主题",
1594
- densityDense: "稠密",
1595
- densityLabel: "行密度",
1596
- densityMedium: "中等的",
1597
- densityWide: "宽的",
1598
- fontsizeBig: "大的",
1599
- fontsizeLabel: "字体大小",
1600
- fontsizeMedium: "中等的",
1601
- fontsizeSmall: "小的",
1602
- genericAddNew: "添新",
1603
- genericApply: "申请",
1604
- genericCollapse: "坍塌",
1605
- genericDay: "日",
1606
- genericDragAndDrop: "拖放",
1607
- genericDropYourData: "将您的数据放在这里",
1608
- genericEditable: "可编辑的",
1609
- genericEditableField: "该字段可以编辑",
1610
- genericEmptyData: "空数据",
1611
- genericExpand: "扩张",
1612
- genericExperimentalFeat: "实验功能",
1613
- genericFilters: "筛选器",
1614
- genericInfo: "信息",
1615
- genericInvalidColor: "颜色无效",
1616
- genericLayoutNotYetImplemented: "布局尚未实施",
1617
- genericList: "列表",
1618
- genericLoadMoreData: "加载更多数据",
1619
- genericMenu: "画面",
1620
- genericMonth: "月",
1621
- genericNext: "下一个",
1622
- genericOpenInNewTab: "在新标签页中打开",
1623
- genericOpenInNewWindow: "在新窗口中打开",
1624
- genericOpenNavigationMenu: "打开导航菜单",
1625
- genericOptions: "选项",
1626
- genericPrevious: "以前的",
1627
- genericRemoveFilters: "删除过滤器",
1628
- genericSettings: "设置",
1629
- genericShowRowOptions: "显示行选项",
1630
- genericShowTooltipInfo: "显示工具提示信息",
1631
- genericSortBy: "排序方式",
1632
- genericToday: "今天",
1633
- genericToggle: "切换",
1634
- genericTotalsTable: "总计表",
1635
- genericTransposeData: "转置数据",
1636
- genericViewAs: "查看为",
1637
- genericWeek: "星期",
1638
- gridColumn: "柱子",
1639
- gridComplete: "完全的",
1640
- gridLabel: "网格类型",
1641
- gridNone: "没有任何",
1642
- gridRow: "排",
1643
- groupingDisable: "禁用分组",
1644
- groupingEnable: "启用分组",
1645
- groupingGroups: "团体",
1646
- pagePage: "页",
1647
- pageTotal: "总页数",
1648
- rowDetail: "行详细信息",
1649
- rowEditableKey: "可编辑的记录键",
1650
- rowKey: "记录键",
1651
- rowNext: "下一行",
1652
- rowPrevious: "上一行",
1653
- rowRendered: "渲染的行",
1654
- rowRows: "行数",
1655
- rowSelected: "选定的行",
1656
- rowTotal: "总行数",
1657
- searchFrom: "从",
1658
- searchSearch: "搜索",
1659
- searchTo: "至",
1660
- totalsAverage: "平均数",
1661
- totalsCalculate: "计算",
1662
- totalsCancel: "取消",
1663
- totalsCount: "数数",
1664
- totalsDistinct: "清楚的",
1665
- totalsFormula: "公式",
1666
- totalsMaximum: "最大",
1667
- totalsMinimum: "最低限度",
1668
- totalsSum: "和"
1669
- }
1670
- };
1671
- const english = {
1672
- keys: {
1673
- checkboxAll: "All",
1674
- checkboxChecked: "Checked",
1675
- checkboxIndeterminate: "Indeterminate",
1676
- checkboxUnchecked: "Unchecked",
1677
- columnAdd: "Add column",
1678
- columnAddDescription: "Add code/description column",
1679
- columnColumns: "Columns",
1680
- columnHide: "Hide column",
1681
- debugAutoprint: "Toggle automatic print",
1682
- debugClear: "Clear widget",
1683
- debugDLAll: "All",
1684
- debugDLProps: "Download components props",
1685
- debugDLPropsComp: "Download component props",
1686
- debugDump: "Dump stored logs",
1687
- debugLanguageChanger: "Set language",
1688
- debugLogLimit: "Set log limit",
1689
- debugMagicBox: "Toggle kup-magic-box",
1690
- debugOff: "Turn off debug",
1691
- debugPrint: "Print logs stored",
1692
- debugThemeChanger: "Set theme",
1693
- densityDense: "Dense",
1694
- densityLabel: "Row density",
1695
- densityMedium: "Medium",
1696
- densityWide: "Wide",
1697
- fontsizeBig: "Big",
1698
- fontsizeLabel: "Font size",
1699
- fontsizeMedium: "Medium",
1700
- fontsizeSmall: "Small",
1701
- genericAddNew: "Add new",
1702
- genericApply: "Apply",
1703
- genericCollapse: "Collapse",
1704
- genericDay: "Day",
1705
- genericDragAndDrop: "Drag and drop",
1706
- genericDropYourData: "Drop your data here",
1707
- genericEditable: "Editable",
1708
- genericEditableField: "This field can be edited",
1709
- genericEmptyData: "Empty data.",
1710
- genericExpand: "Expand",
1711
- genericExperimentalFeat: "Experimental feature",
1712
- genericFilters: "Filters",
1713
- genericInfo: "Info",
1714
- genericInvalidColor: "Invalid color",
1715
- genericLayoutNotYetImplemented: "Layout not yet implemented",
1716
- genericList: "List",
1717
- genericLoadMoreData: "Load more data",
1718
- genericMenu: "Menu",
1719
- genericMonth: "Month",
1720
- genericNext: "Next",
1721
- genericOpenInNewTab: "Open in new tab",
1722
- genericOpenInNewWindow: "Open in new window",
1723
- genericOpenNavigationMenu: "Open navigation menu",
1724
- genericOptions: "Options",
1725
- genericPrevious: "Previous",
1726
- genericRemoveFilters: "Remove filters",
1727
- genericSettings: "Settings",
1728
- genericShowRowOptions: "Show row options",
1729
- genericShowTooltipInfo: "Show tooltip info",
1730
- genericSortBy: "Sort by",
1731
- genericToday: "Today",
1732
- genericToggle: "Toggle",
1733
- genericTotalsTable: "Totals table",
1734
- genericTransposeData: "Transpose data",
1735
- genericViewAs: "View as",
1736
- genericWeek: "Week",
1737
- gridColumn: "Column",
1738
- gridComplete: "Complete",
1739
- gridLabel: "Grid type",
1740
- gridNone: "None",
1741
- gridRow: "Row",
1742
- groupingDisable: "Disable grouping",
1743
- groupingEnable: "Enable grouping",
1744
- groupingGroups: "Group",
1745
- pagePage: "Page",
1746
- pageTotal: "Total",
1747
- rowDetail: "Row detail",
1748
- rowEditableKey: "Editable record key",
1749
- rowKey: "Record key",
1750
- rowNext: "Next row",
1751
- rowPrevious: "Previous row",
1752
- rowRendered: "Rendered rows",
1753
- rowRows: "Rows",
1754
- rowSelected: "Selected rows",
1755
- rowTotal: "Total rows",
1756
- searchFrom: "From",
1757
- searchSearch: "Search",
1758
- searchTo: "To",
1759
- totalsAverage: "Average",
1760
- totalsCalculate: "Calculate",
1761
- totalsCancel: "Cancel",
1762
- totalsCount: "Count",
1763
- totalsDistinct: "Distinct",
1764
- totalsFormula: "Formula",
1765
- totalsMaximum: "Maximum",
1766
- totalsMinimum: "Minimum",
1767
- totalsSum: "Sum"
1768
- }
1769
- };
1770
- const french = {
1771
- keys: {
1772
- checkboxAll: "Tout",
1773
- checkboxChecked: "Vérifié",
1774
- checkboxIndeterminate: "Indéterminé",
1775
- checkboxUnchecked: "Non coché",
1776
- columnAdd: "Ajouter une colonne",
1777
- columnAddDescription: "Ajouter une colonne code / description",
1778
- columnColumns: "Colonnes",
1779
- columnHide: "Masquer la colonne",
1780
- debugAutoprint: "Activer l'impression automatique",
1781
- debugClear: "Effacer le widget",
1782
- debugDLAll: "Tout",
1783
- debugDLProps: "Télécharger les accessoires des composants",
1784
- debugDLPropsComp: "Télécharger les accessoires des composants",
1785
- debugDump: "Vider les journaux stockés",
1786
- debugLanguageChanger: "Définir la langue",
1787
- debugLogLimit: "Définir la limite du journal",
1788
- debugMagicBox: "Activer / désactiver kup-magic-box",
1789
- debugOff: "Désactiver le débogage",
1790
- debugPrint: "Imprimer les journaux stockés",
1791
- debugThemeChanger: "Définir le thème",
1792
- densityDense: "Dense",
1793
- densityLabel: "Densité des rangs",
1794
- densityMedium: "Moyen",
1795
- densityWide: "Large",
1796
- fontsizeBig: "Gros",
1797
- fontsizeLabel: "Taille de police",
1798
- fontsizeMedium: "Moyen",
1799
- fontsizeSmall: "Petit",
1800
- genericAddNew: "Ajouter un nouveau",
1801
- genericApply: "Appliquer",
1802
- genericCollapse: "Effondrer",
1803
- genericDay: "Jour",
1804
- genericDragAndDrop: "Glisser-déposer",
1805
- genericDropYourData: "Déposez vos données ici",
1806
- genericEditable: "Modifiable",
1807
- genericEditableField: "Ce champ peut être édité",
1808
- genericEmptyData: "Données vides",
1809
- genericExpand: "Étendre",
1810
- genericExperimentalFeat: "Fonctionnalité expérimentale",
1811
- genericFilters: "Filtres",
1812
- genericInfo: "Info",
1813
- genericInvalidColor: "Couleur invalide",
1814
- genericLayoutNotYetImplemented: "Mise en page pas encore implémentée",
1815
- genericList: "Lister",
1816
- genericLoadMoreData: "Charger plus de données",
1817
- genericMenu: "Menu",
1818
- genericMonth: "Mois",
1819
- genericNext: "Prochain",
1820
- genericOpenInNewTab: "Ouvrir dans un nouvel onglet",
1821
- genericOpenInNewWindow: "Ouvrir dans une nouvelle fenêtre",
1822
- genericOpenNavigationMenu: "Ouvrir le menu de navigation",
1823
- genericOptions: "Options",
1824
- genericPrevious: "Précédent",
1825
- genericRemoveFilters: "Supprimer les filtres",
1826
- genericSettings: "Paramètres",
1827
- genericShowRowOptions: "Afficher les options de ligne",
1828
- genericShowTooltipInfo: "Afficher les informations de l'info-bulle",
1829
- genericSortBy: "Trier par",
1830
- genericToday: "Aujourd'hui",
1831
- genericToggle: "Basculer",
1832
- genericTotalsTable: "Tableau des totaux",
1833
- genericTransposeData: "Transposer les données",
1834
- genericViewAs: "Voir comme",
1835
- genericWeek: "La semaine",
1836
- gridColumn: "Colonne",
1837
- gridComplete: "Compléte",
1838
- gridLabel: "Type de grille",
1839
- gridNone: "Rien",
1840
- gridRow: "Ligne",
1841
- groupingDisable: "Désactiver le regroupement",
1842
- groupingEnable: "Activer le regroupement",
1843
- groupingGroups: "Groupe",
1844
- pagePage: "Page",
1845
- pageTotal: "Pages totales",
1846
- rowDetail: "Détail de la ligne",
1847
- rowEditableKey: "Clé d'enregistrement modifiable",
1848
- rowKey: "Clé d'enregistrement",
1849
- rowNext: "Ligne suivante",
1850
- rowPrevious: "Ligne précédente",
1851
- rowRendered: "Lignes rendues",
1852
- rowRows: "Lignes",
1853
- rowSelected: "Lignes sélectionnées",
1854
- rowTotal: "Total des lignes",
1855
- searchFrom: "De",
1856
- searchSearch: "Rechercher",
1857
- searchTo: "À",
1858
- totalsAverage: "Moyenne",
1859
- totalsCalculate: "Calculer",
1860
- totalsCancel: "Annuler",
1861
- totalsCount: "Compter",
1862
- totalsDistinct: "Distinct",
1863
- totalsFormula: "Formule",
1864
- totalsMaximum: "Maximum",
1865
- totalsMinimum: "Minimum",
1866
- totalsSum: "Somme"
1867
- }
1868
- };
1869
- const italian = {
1870
- keys: {
1871
- checkboxAll: "Tutti",
1872
- checkboxChecked: "Selezionato",
1873
- checkboxIndeterminate: "Indeterminato",
1874
- checkboxUnchecked: "Non selezionato",
1875
- columnAdd: "Aggiungi colonna",
1876
- columnAddDescription: "Aggiungi colonna codice/descrizione",
1877
- columnColumns: "Colonne",
1878
- columnHide: "Nascondi colonna",
1879
- debugAutoprint: "Attiva stampa automatica logs",
1880
- debugClear: "Pulisci widget",
1881
- debugDLAll: "Tutto",
1882
- debugDLProps: "Scarica props componenti",
1883
- debugDLPropsComp: "Scarica props del componente",
1884
- debugDump: "Svuota cache dei logs",
1885
- debugLanguageChanger: "Cambia lingua",
1886
- debugLogLimit: "Imposta limite log",
1887
- debugMagicBox: "Attiva kup-magic-box",
1888
- debugOff: "Disattiva debug",
1889
- debugPrint: "Stampa logs immagazzinati",
1890
- debugThemeChanger: "Cambia tema",
1891
- densityDense: "Densa",
1892
- densityLabel: "Densità righe",
1893
- densityMedium: "Media",
1894
- densityWide: "Ampia",
1895
- fontsizeBig: "Grande",
1896
- fontsizeLabel: "Dimensione caratteri",
1897
- fontsizeMedium: "Media",
1898
- fontsizeSmall: "Piccola",
1899
- genericAddNew: "Aggiungi nuovo",
1900
- genericApply: "Applica",
1901
- genericCollapse: "Chiudi",
1902
- genericDay: "Giorno",
1903
- genericDragAndDrop: "Drag & drop",
1904
- genericDropYourData: "Trascina qui i tuoi dati",
1905
- genericEditable: "Editabile",
1906
- genericEditableField: "Questo campo è editabile",
1907
- genericEmptyData: "Nessun dato da visualizzare.",
1908
- genericExpand: "Espandi",
1909
- genericExperimentalFeat: "Funzionalità sperimentale",
1910
- genericFilters: "Filtri",
1911
- genericInfo: "Informazioni",
1912
- genericInvalidColor: "Colore invalido",
1913
- genericLayoutNotYetImplemented: "Layout non ancora implementato",
1914
- genericList: "Lista",
1915
- genericLoadMoreData: "Carica più dati",
1916
- genericMenu: "Menu",
1917
- genericMonth: "Mese",
1918
- genericNext: "Avanti",
1919
- genericOpenInNewTab: "Apri in nuovo tab",
1920
- genericOpenInNewWindow: "Apri in nuova finestra",
1921
- genericOpenNavigationMenu: "Apri menu di navigazione",
1922
- genericOptions: "Opzioni",
1923
- genericPrevious: "Indietro",
1924
- genericRemoveFilters: "Rimuovi filtri",
1925
- genericSettings: "Impostazioni",
1926
- genericShowRowOptions: "Mostra opzioni di riga",
1927
- genericShowTooltipInfo: "Mostra informazioni tooltip",
1928
- genericSortBy: "Ordina per",
1929
- genericToday: "Oggi",
1930
- genericToggle: "Attiva",
1931
- genericTotalsTable: "Tabella dei totali",
1932
- genericTransposeData: "Trasposizione dati",
1933
- genericViewAs: "Vedi come",
1934
- genericWeek: "Settimana",
1935
- gridColumn: "Colonna",
1936
- gridComplete: "Completa",
1937
- gridLabel: "Tipo di griglia",
1938
- gridNone: "Nessuna",
1939
- gridRow: "Riga",
1940
- groupingDisable: "Disabilita gruppo",
1941
- groupingEnable: "Abilita gruppo",
1942
- groupingGroups: "Gruppo",
1943
- pagePage: "Pagina",
1944
- pageTotal: "Totale",
1945
- rowDetail: "Dettaglio riga",
1946
- rowEditableKey: "Chiave record editabile",
1947
- rowKey: "Chiave record",
1948
- rowNext: "Riga successiva",
1949
- rowPrevious: "Riga precedente",
1950
- rowRendered: "Righe renderizzate",
1951
- rowRows: "Righe",
1952
- rowSelected: "Righe selezionate",
1953
- rowTotal: "Righe totali",
1954
- searchFrom: "Da...",
1955
- searchSearch: "Cerca...",
1956
- searchTo: "A...",
1957
- totalsAverage: "Media",
1958
- totalsCalculate: "Calcola",
1959
- totalsCancel: "Cancella",
1960
- totalsCount: "Conta",
1961
- totalsDistinct: "Distinct",
1962
- totalsFormula: "Formula",
1963
- totalsMinimum: "Minimo",
1964
- totalsMaximum: "Massimo",
1965
- totalsSum: "Somma"
1966
- },
1967
- variants: {
1968
- smeup: {
1969
- keys: {
1970
- genericEditableField: "Questo OAV è editabile",
1971
- genericTotalsTable: "Matrice dei totali",
1972
- groupingDisable: "Disabilita raggruppamento",
1973
- groupingEnable: "Abilita raggruppamento",
1974
- groupingGroups: "Raggruppamento",
1975
- rowEditableKey: "K01 (editabile)",
1976
- rowKey: "K01"
1977
- }
1978
- }
1979
- }
1980
- };
1981
- const polish = {
1982
- keys: {
1983
- checkboxAll: "Wszystko",
1984
- checkboxChecked: "Sprawdzone",
1985
- checkboxIndeterminate: "Nieokreślony",
1986
- checkboxUnchecked: "Niepowstrzymany",
1987
- columnAdd: "Dodaj kolumnę",
1988
- columnAddDescription: "Dodaj kolumnę z kodem / opisem",
1989
- columnColumns: "Kolumny",
1990
- columnHide: "Ukryj kolumnę",
1991
- debugAutoprint: "Przełącz automatyczne drukowanie",
1992
- debugClear: "Wyczyść widżet",
1993
- debugDLAll: "Wszystko",
1994
- debugDLProps: "Pobierz właściwości komponentów",
1995
- debugDLPropsComp: "Pobierz rekwizyty komponentów",
1996
- debugDump: "Zrzuć zapisane dzienniki",
1997
- debugLanguageChanger: "Ustaw język",
1998
- debugLogLimit: "Ustaw limit logów",
1999
- debugMagicBox: "Przełącz kup-magic-box",
2000
- debugOff: "Wyłącz debugowanie",
2001
- debugPrint: "Drukuj zapisane logi",
2002
- debugThemeChanger: "Ustaw motyw",
2003
- densityDense: "Gęsty",
2004
- densityLabel: "Gęstość rzędów",
2005
- densityMedium: "Średni",
2006
- densityWide: "Szeroki",
2007
- fontsizeBig: "Duży",
2008
- fontsizeLabel: "Rozmiar czcionki",
2009
- fontsizeMedium: "Średni",
2010
- fontsizeSmall: "Mały",
2011
- genericAddNew: "Dodaj nowe",
2012
- genericApply: "Zastosować",
2013
- genericCollapse: "Zawalić się",
2014
- genericDay: "Dzień",
2015
- genericDragAndDrop: "Przeciągnij i upuść",
2016
- genericDropYourData: "Upuść swoje dane tutaj",
2017
- genericEditable: "Edytowalne",
2018
- genericEditableField: "To pole można edytować",
2019
- genericEmptyData: "Puste dane",
2020
- genericExpand: "Rozszerzać",
2021
- genericExperimentalFeat: "Funkcja eksperymentalna",
2022
- genericFilters: "Filtry",
2023
- genericInfo: "Informacje",
2024
- genericInvalidColor: "Nieprawidłowy kolor",
2025
- genericLayoutNotYetImplemented: "Układ nie został jeszcze zaimplementowany",
2026
- genericList: "Lista",
2027
- genericLoadMoreData: "Załaduj więcej danych",
2028
- genericMenu: "Menu",
2029
- genericMonth: "Miesiąc",
2030
- genericNext: "Następny",
2031
- genericOpenInNewTab: "Otwórz w nowej karcie",
2032
- genericOpenInNewWindow: "Otworzyć w nowym oknie",
2033
- genericOpenNavigationMenu: "Otwórz menu nawigacyjne",
2034
- genericOptions: "Opcje",
2035
- genericPrevious: "Poprzedni",
2036
- genericRemoveFilters: "Usuń filtry",
2037
- genericSettings: "Ustawienia",
2038
- genericShowRowOptions: "Pokaż opcje wierszy",
2039
- genericShowTooltipInfo: "Pokaż informacje w podpowiedzi",
2040
- genericSortBy: "Sortuj według",
2041
- genericToday: "Dziś",
2042
- genericToggle: "Przełącznik",
2043
- genericTotalsTable: "Tabela sum",
2044
- genericTransposeData: "Transpozycja danych",
2045
- genericViewAs: "Wyświetl jako",
2046
- genericWeek: "Tydzień",
2047
- gridColumn: "Kolumna",
2048
- gridComplete: "Kompletny",
2049
- gridLabel: "Typ siatki",
2050
- gridNone: "Żaden",
2051
- gridRow: "Rząd",
2052
- groupingDisable: "Wyłącz grupowanie",
2053
- groupingEnable: "Włącz grupowanie",
2054
- groupingGroups: "Grupy",
2055
- pagePage: "Strona",
2056
- pageTotal: "Wszystkie strony",
2057
- rowDetail: "Szczegóły rzędu",
2058
- rowEditableKey: "Edytowalny klucz nagrywania",
2059
- rowKey: "Klucz nagrywania",
2060
- rowNext: "Następny rząd",
2061
- rowPrevious: "Poprzedni wiersz",
2062
- rowRendered: "Renderowane wiersze",
2063
- rowRows: "Wydziwianie",
2064
- rowSelected: "Wybrane wiersze",
2065
- rowTotal: "Łączna liczba wierszy",
2066
- searchFrom: "Z",
2067
- searchSearch: "Szukaj",
2068
- searchTo: "Do",
2069
- totalsAverage: "Średni",
2070
- totalsCalculate: "Oblicz",
2071
- totalsCancel: "Anuluj",
2072
- totalsCount: "Liczyć",
2073
- totalsDistinct: "Odrębny",
2074
- totalsFormula: "Formuła",
2075
- totalsMinimum: "Minimo",
2076
- totalsMaximum: "Maksymalny",
2077
- totalsSum: "Suma"
2078
- }
2079
- };
2080
- const russian = {
2081
- keys: {
2082
- checkboxAll: "Все",
2083
- checkboxChecked: "Проверено",
2084
- checkboxIndeterminate: "Неопределенный",
2085
- checkboxUnchecked: "Не отмечено",
2086
- columnAdd: "Добавить столбец",
2087
- columnAddDescription: "Добавить столбец кода / описания",
2088
- columnColumns: "Столбцы",
2089
- columnHide: "Скрыть столбец",
2090
- debugAutoprint: "Включить автоматическую печать",
2091
- debugClear: "Очистить виджет",
2092
- debugDLAll: "Все",
2093
- debugDLProps: "Загрузить свойства компонентов",
2094
- debugDLPropsComp: "Скачать реквизиты компонентов",
2095
- debugDump: "Дамп сохраненных журналов",
2096
- debugLanguageChanger: "Установить язык",
2097
- debugLogLimit: "Установить ограничение журнала",
2098
- debugMagicBox: "Переключить волшебный ящик купа",
2099
- debugOff: "Отключить отладку",
2100
- debugPrint: "Печать сохраненных журналов",
2101
- debugThemeChanger: "Установить тему",
2102
- densityDense: "Плотный",
2103
- densityLabel: "Плотность строк",
2104
- densityMedium: "Середина",
2105
- densityWide: "Широкий",
2106
- fontsizeBig: "Большой",
2107
- fontsizeLabel: "Размер шрифта",
2108
- fontsizeMedium: "Середина",
2109
- fontsizeSmall: "Небольшой",
2110
- genericAddNew: "Добавить новое",
2111
- genericApply: "Применять",
2112
- genericCollapse: "Крах",
2113
- genericDay: "День",
2114
- genericDragAndDrop: "Перетащить и отпустить",
2115
- genericDropYourData: "Перетащите сюда свои данные",
2116
- genericEditable: "Редактируемый",
2117
- genericEditableField: "Это поле можно редактировать",
2118
- genericEmptyData: "Пустые данные",
2119
- genericExpand: "Расширять",
2120
- genericExperimentalFeat: "Экспериментальная особенность",
2121
- genericFilters: "Фильтры",
2122
- genericInfo: "Информация",
2123
- genericInvalidColor: "Неверный цвет",
2124
- genericLayoutNotYetImplemented: "Макет еще не реализован",
2125
- genericList: "Список",
2126
- genericLoadMoreData: "Загрузить больше данных",
2127
- genericMenu: "Меню",
2128
- genericMonth: "Месяц",
2129
- genericNext: "Следующий",
2130
- genericOpenInNewTab: "Открыть в новой вкладке",
2131
- genericOpenInNewWindow: "Открыть в новом окне",
2132
- genericOpenNavigationMenu: "Открыть меню навигации",
2133
- genericOptions: "Параметры",
2134
- genericPrevious: "Предыдущий",
2135
- genericRemoveFilters: "Удалить фильтры",
2136
- genericSettings: "Настройки",
2137
- genericShowRowOptions: "Показать параметры строки",
2138
- genericShowTooltipInfo: "Показать информацию во всплывающей подсказке",
2139
- genericSortBy: "Сортировать по",
2140
- genericToday: "Сегодня",
2141
- genericToggle: "Переключать",
2142
- genericTotalsTable: "Итоговая таблица",
2143
- genericTransposeData: "Транспонировать данные",
2144
- genericViewAs: "Просмотреть как",
2145
- genericWeek: "Неделя",
2146
- gridColumn: "Столбец",
2147
- gridComplete: "Полный",
2148
- gridLabel: "Тип сетки",
2149
- gridNone: "Никто",
2150
- gridRow: "Строка",
2151
- groupingDisable: "Отключить группировку",
2152
- groupingEnable: "Включить группировку",
2153
- groupingGroups: "Группы",
2154
- pagePage: "Страница",
2155
- pageTotal: "Всего страниц",
2156
- rowDetail: "Детали строки",
2157
- rowEditableKey: "Редактируемый ключ записи",
2158
- rowKey: "Ключ записи",
2159
- rowNext: "Следующая строка",
2160
- rowPrevious: "Предыдущая строка",
2161
- rowRendered: "Отрисованные строки",
2162
- rowRows: "Рядов",
2163
- rowSelected: "Выбранные строки",
2164
- rowTotal: "Всего строк",
2165
- searchFrom: "Из",
2166
- searchSearch: "Поиск",
2167
- searchTo: "К",
2168
- totalsAverage: "В среднем",
2169
- totalsCalculate: "Рассчитать",
2170
- totalsCancel: "Отмена",
2171
- totalsCount: "Считать",
2172
- totalsDistinct: "Отчетливый",
2173
- totalsFormula: "Формула",
2174
- totalsMinimum: "Минимум",
2175
- totalsMaximum: "Максимум",
2176
- totalsSum: "Сумма"
2177
- }
2178
- };
2179
- const spanish = {
2180
- keys: {
2181
- checkboxAll: "Todas",
2182
- checkboxChecked: "Marcado",
2183
- checkboxIndeterminate: "Indeterminado",
2184
- checkboxUnchecked: "Sin marcar",
2185
- columnAdd: "Añadir columna",
2186
- columnAddDescription: "Agregar columna de código / descripción",
2187
- columnColumns: "Columnas",
2188
- columnHide: "Ocultar columna",
2189
- debugAutoprint: "Alternar impresión automática",
2190
- debugClear: "Borrar widget",
2191
- debugDLAll: "Todas",
2192
- debugDLProps: "Descargar accesorios de componentes",
2193
- debugDLPropsComp: "Descargar accesorios de componentes",
2194
- debugDump: "Volcar registros almacenados",
2195
- debugLanguageChanger: "Establecer idioma",
2196
- debugLogLimit: "Establecer límite de registro",
2197
- debugMagicBox: "Alternar kup-magic-box",
2198
- debugOff: "Desactivar depuración",
2199
- debugPrint: "Imprimir registros almacenados",
2200
- debugThemeChanger: "Establecer tema",
2201
- densityDense: "Densa",
2202
- densityLabel: "Densidad de hileras",
2203
- densityMedium: "Medio",
2204
- densityWide: "Amplia",
2205
- fontsizeBig: "Grande",
2206
- fontsizeLabel: "Tamaño de fuente",
2207
- fontsizeMedium: "Medio",
2208
- fontsizeSmall: "Pequeño",
2209
- genericAddNew: "Añadir nuevo",
2210
- genericApply: "Solicitar",
2211
- genericCollapse: "Colapso",
2212
- genericDay: "Día",
2213
- genericDragAndDrop: "Arrastrar y soltar",
2214
- genericDropYourData: "Deja tus datos aquí",
2215
- genericEditable: "Editable",
2216
- genericEditableField: "Este campo se puede editar",
2217
- genericEmptyData: "Datos vacíos",
2218
- genericExpand: "Expandir",
2219
- genericExperimentalFeat: "Característica experimental",
2220
- genericFilters: "Filtros",
2221
- genericInfo: "Información",
2222
- genericInvalidColor: "Color inválido",
2223
- genericLayoutNotYetImplemented: "Diseño aún no implementado",
2224
- genericList: "Lista",
2225
- genericLoadMoreData: "Cargar más datos",
2226
- genericMenu: "Menú",
2227
- genericMonth: "Mes",
2228
- genericNext: "Próximo",
2229
- genericOpenInNewTab: "Abrir en una pestaña nueva",
2230
- genericOpenInNewWindow: "Abrir en Nueva ventana",
2231
- genericOpenNavigationMenu: "Abrir menú de navegación",
2232
- genericOptions: "Opciones",
2233
- genericPrevious: "Previo",
2234
- genericRemoveFilters: "Quitar filtros",
2235
- genericSettings: "Ajustes",
2236
- genericShowRowOptions: "Mostrar opciones de fila",
2237
- genericShowTooltipInfo: "Mostrar información de información sobre herramientas",
2238
- genericSortBy: "Ordenar por",
2239
- genericToday: "Hoy dia",
2240
- genericToggle: "Palanca",
2241
- genericTotalsTable: "Tabla de totales",
2242
- genericTransposeData: "Transponer datos",
2243
- genericViewAs: "Visto como",
2244
- genericWeek: "Semana",
2245
- gridColumn: "Columna",
2246
- gridComplete: "Completa",
2247
- gridLabel: "Tipo de cuadrícula",
2248
- gridNone: "Ninguna",
2249
- gridRow: "Fila",
2250
- groupingDisable: "Desactivar agrupación",
2251
- groupingEnable: "Habilitar agrupación",
2252
- groupingGroups: "Grupo",
2253
- pagePage: "Página",
2254
- pageTotal: "Paginas totales",
2255
- rowDetail: "Detalle de fila",
2256
- rowEditableKey: "Clave de registro editable",
2257
- rowKey: "Grabar clave",
2258
- rowNext: "Siguiente fila",
2259
- rowPrevious: "Fila anterior",
2260
- rowRendered: "Filas renderizadas",
2261
- rowRows: "Filas",
2262
- rowSelected: "Filas seleccionadas",
2263
- rowTotal: "Filas totales",
2264
- searchFrom: "De",
2265
- searchSearch: "Buscar",
2266
- searchTo: "A",
2267
- totalsAverage: "Promedio",
2268
- totalsCalculate: "Calcular",
2269
- totalsCancel: "Cancelar",
2270
- totalsCount: "Contar",
2271
- totalsDistinct: "Distinct",
2272
- totalsFormula: "Fórmula",
2273
- totalsMaximum: "Máximo",
2274
- totalsMinimum: "Mínimo",
2275
- totalsSum: "Suma"
2276
- }
2277
- };
2278
- const languages = {
2279
- chinese: chinese,
2280
- english: english,
2281
- french: french,
2282
- italian: italian,
2283
- polish: polish,
2284
- russian: russian,
2285
- spanish: spanish
2286
- };
2287
-
2288
- const dom$4 = document.documentElement;
2289
- /**
2290
- * Handles the translation to different languages.
2291
- * @module KupLanguage
2292
- */
2293
- class KupLanguage {
2294
- /**
2295
- * Initializes KupLanguage.
2296
- * @param {KupLanguageJSON} list - Overrides the default languages.json.
2297
- * @param {string} name - Starting language. Can be a combination of language and variant (separated by "_").
2298
- */
2299
- constructor(list, name) {
2300
- this.list = list ? list : languages;
2301
- this.managedComponents = new Set();
2302
- this.name = name ? name : KupLanguageDefaults.en;
2303
- }
2304
- /**
2305
- * Translates the string to the given language.
2306
- * When translation fails, the key will be displayed in place of the string - this way it will be easier to correct missing string <-> key bounds.
2307
- * @param {KupLanguageKey} key - Key of a string to be translated.
2308
- * @param {string} language - Language to translate the string to. When not provided, KupLanguage current language will be used.
2309
- * @returns {string} Translated string or initial string (when translation failed).
2310
- */
2311
- translate(key, language) {
2312
- const decodedLanguage = this.decodeLanguage(language ? language : this.name);
2313
- const name = decodedLanguage.language;
2314
- const variantName = decodedLanguage.variant;
2315
- try {
2316
- let translatedString = null;
2317
- if (variantName) {
2318
- const variants = this.list[name].variants;
2319
- if (variants &&
2320
- variants[variantName] &&
2321
- variants[variantName].keys[key]) {
2322
- translatedString = variants[variantName].keys[key];
2323
- }
2324
- else {
2325
- translatedString = this.list[name].keys[key];
2326
- }
2327
- }
2328
- else {
2329
- translatedString = this.list[name].keys[key];
2330
- }
2331
- if (translatedString) {
2332
- return translatedString;
2333
- }
2334
- else {
2335
- return invalidKey(key);
2336
- }
2337
- }
2338
- catch (error) {
2339
- return invalidKey(key);
2340
- }
2341
- function invalidKey(key) {
2342
- dom$4.ketchup.debug.logMessage('kup-language', 'Invalid translation for key (' + key + ')!', KupDebugCategory.WARNING);
2343
- return key;
2344
- }
2345
- }
2346
- /**
2347
- * Changes the current Ketch.UP language to the one provided. If the language argument contains a "_", a combo of language and variant will be assumed.
2348
- * @param {string} language - The new language. If not present in this.list, this function will keep the previous language.
2349
- */
2350
- set(language) {
2351
- if (language && typeof language === 'string') {
2352
- language = language.toLowerCase();
2353
- }
2354
- else {
2355
- dom$4.ketchup.debug.logMessage('kup-language', "Couldn't set language, invalid string received (" +
2356
- language +
2357
- ')!', KupDebugCategory.WARNING);
2358
- return;
2359
- }
2360
- const decodedLanguage = this.decodeLanguage(language);
2361
- const dLanguage = decodedLanguage.language;
2362
- const dVariant = decodedLanguage.variant;
2363
- if (this.list[dLanguage]) {
2364
- if (dVariant && !this.list[dLanguage].variants[dVariant]) {
2365
- dom$4.ketchup.debug.logMessage('kup-language', 'Variant not found (' + dVariant + ')!', KupDebugCategory.WARNING);
2366
- return;
2367
- }
2368
- }
2369
- else {
2370
- dom$4.ketchup.debug.logMessage('kup-language', 'Language not found (' + dLanguage + ')!', KupDebugCategory.WARNING);
2371
- return;
2372
- }
2373
- this.name = language;
2374
- this.managedComponents.forEach(function (comp) {
2375
- if (comp.isConnected) {
2376
- comp.refresh();
2377
- }
2378
- });
2379
- document.dispatchEvent(new CustomEvent('kup-language-change'));
2380
- }
2381
- /**
2382
- * Checks whether the language is a combination of main language and variant (separated by "_"), returning them splitted in an object.
2383
- * @param {string} language - Language to check.
2384
- * @returns {KupLanguageDecode} Object containing language and variant.
2385
- */
2386
- decodeLanguage(language) {
2387
- const result = {
2388
- language: null,
2389
- variant: null,
2390
- };
2391
- const separator = language.indexOf('_');
2392
- if (separator > -1) {
2393
- result.variant = language.substr(separator + 1);
2394
- result.language = language.substr(0, separator);
2395
- }
2396
- else {
2397
- result.language = language;
2398
- }
2399
- return result;
2400
- }
2401
- /**
2402
- * Gets the name of available languages.
2403
- * @returns {Array<string>} Array of languages' names.
2404
- */
2405
- getLanguages() {
2406
- const languages = [];
2407
- for (var key in this.list) {
2408
- if (this.list.hasOwnProperty(key)) {
2409
- const language = this.list[key];
2410
- languages.push(key);
2411
- for (const variantKey in language.variants) {
2412
- languages.push(key + '_' + variantKey);
2413
- }
2414
- }
2415
- }
2416
- return languages;
2417
- }
2418
- /**
2419
- * Registers a KupComponent in KupLanguage, in order to be properly handled whenever the language changes.
2420
- * @param {any} component - The component calling this function.
2421
- */
2422
- register(component) {
2423
- this.managedComponents.add(component.rootElement);
2424
- }
2425
- /**
2426
- * Unregisters a KupComponent, so it won't be handled when the theme changes.
2427
- *
2428
- * @param {any} component - The component calling this function.
2429
- */
2430
- unregister(component) {
2431
- if (this.managedComponents) {
2432
- this.managedComponents.delete(component.rootElement);
2433
- }
2434
- }
2435
- }
2436
-
2437
- /**
2438
- * The direction to which ScollableElement can be scrolled.
2439
- */
2440
- var ScrollOnHoverDirection;
2441
- (function (ScrollOnHoverDirection) {
2442
- ScrollOnHoverDirection["LEFT"] = "left";
2443
- ScrollOnHoverDirection["RIGHT"] = "right";
2444
- })(ScrollOnHoverDirection || (ScrollOnHoverDirection = {}));
2445
-
2446
- var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
2447
- if (!privateMap.has(receiver)) {
2448
- throw new TypeError("attempted to set private field on non-instance");
2449
- }
2450
- privateMap.set(receiver, value);
2451
- return value;
2452
- };
2453
- var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
2454
- if (!privateMap.has(receiver)) {
2455
- throw new TypeError("attempted to get private field on non-instance");
2456
- }
2457
- return privateMap.get(receiver);
2458
- };
2459
- var _arrowsContainer, _leftArrows, _rightArrows, _scrollEvent, _mousemoveEvent, _mouseleaveEvent, _rAF, _timeout;
2460
- const dom$3 = document.documentElement;
2461
- /**
2462
- * Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
2463
- * @module KupScrollOnHover
2464
- */
2465
- class KupScrollOnHover {
2466
- /**
2467
- * Initializes KupScrollOnHover.
2468
- * @param {number} delay - Sets the time in milliseconds before the scrolling starts when mouse-hovering.
2469
- * @param {number} step - The amount in pixels for each scroll recursion.
2470
- */
2471
- constructor(delay, step) {
2472
- _arrowsContainer.set(this, void 0);
2473
- _leftArrows.set(this, void 0);
2474
- _rightArrows.set(this, void 0);
2475
- _scrollEvent.set(this, void 0);
2476
- _mousemoveEvent.set(this, void 0);
2477
- _mouseleaveEvent.set(this, void 0);
2478
- _rAF.set(this, void 0);
2479
- _timeout.set(this, void 0);
2480
- this.delay = delay ? delay : 500;
2481
- this.managedElements = new Set();
2482
- this.step = step ? step : 50;
2483
- __classPrivateFieldSet$1(this, _arrowsContainer, document.createElement('div'));
2484
- __classPrivateFieldSet$1(this, _leftArrows, []);
2485
- __classPrivateFieldSet$1(this, _mouseleaveEvent, (event) => this.stop(event.target));
2486
- __classPrivateFieldSet$1(this, _mousemoveEvent, (event) => this.start(event));
2487
- __classPrivateFieldSet$1(this, _rAF, null);
2488
- __classPrivateFieldSet$1(this, _rightArrows, []);
2489
- __classPrivateFieldSet$1(this, _scrollEvent, (event) => this.updateChildren(event.target));
2490
- __classPrivateFieldSet$1(this, _timeout, null);
2491
- __classPrivateFieldGet$1(this, _arrowsContainer).id = 'kup-scrolling-arrows';
2492
- for (let index = 1; index < 4; index++) {
2493
- const arrow = document.createElement('div');
2494
- arrow.setAttribute('class', 'kup-left-scrolling-arrow kup-arrow-' + index);
2495
- __classPrivateFieldGet$1(this, _leftArrows).push(arrow);
2496
- }
2497
- for (let index = 1; index < 4; index++) {
2498
- const arrow = document.createElement('div');
2499
- arrow.setAttribute('class', 'kup-right-scrolling-arrow kup-arrow-' + index);
2500
- __classPrivateFieldGet$1(this, _rightArrows).push(arrow);
2501
- }
2502
- __classPrivateFieldGet$1(this, _arrowsContainer).append(__classPrivateFieldGet$1(this, _leftArrows)[2], __classPrivateFieldGet$1(this, _leftArrows)[1], __classPrivateFieldGet$1(this, _leftArrows)[0], __classPrivateFieldGet$1(this, _rightArrows)[0], __classPrivateFieldGet$1(this, _rightArrows)[1], __classPrivateFieldGet$1(this, _rightArrows)[2]);
2503
- this.container = document.createElement('div');
2504
- this.container.setAttribute('kup-scroll-on-hover', '');
2505
- this.container.appendChild(__classPrivateFieldGet$1(this, _arrowsContainer));
2506
- document.body.appendChild(this.container);
2507
- }
2508
- /**
2509
- * Watches the given element in order to trigger the scroll on hover when conditions are met.
2510
- * Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
2511
- * @param {KupScrollOnHoverElement} el - Element to watch.
2512
- */
2513
- register(el) {
2514
- el.style.overflowX = 'auto';
2515
- el.scrollOnHover = {
2516
- active: false,
2517
- children: el.querySelectorAll('.hover-scrolling-child'),
2518
- rect: null,
2519
- x: 0,
2520
- y: 0,
2521
- };
2522
- if (el.scrollOnHover.children) {
2523
- el.addEventListener('scroll', __classPrivateFieldGet$1(this, _scrollEvent));
2524
- }
2525
- el.addEventListener('mousemove', __classPrivateFieldGet$1(this, _mousemoveEvent));
2526
- el.addEventListener('mouseleave', __classPrivateFieldGet$1(this, _mouseleaveEvent));
2527
- this.managedElements.add(el);
2528
- }
2529
- /**
2530
- * Removes the given element from ScrollOnHover watchlist.
2531
- * @param {KupScrollOnHoverElement} el - Element to unregister.
2532
- */
2533
- unregister(el) {
2534
- el.removeEventListener('scroll', __classPrivateFieldGet$1(this, _scrollEvent));
2535
- el.removeEventListener('mousemove', __classPrivateFieldGet$1(this, _mousemoveEvent));
2536
- el.removeEventListener('mouseleave', __classPrivateFieldGet$1(this, _mouseleaveEvent));
2537
- if (this.managedElements) {
2538
- this.managedElements.delete(el);
2539
- }
2540
- }
2541
- /**
2542
- * Returns whether an element was previously registered or not.
2543
- * @param {KupScrollOnHoverElement} el - Element to test.
2544
- * @returns {boolean} True if the element was registered.
2545
- */
2546
- isRegistered(el) {
2547
- return !this.managedElements ? false : this.managedElements.has(el);
2548
- }
2549
- /**
2550
- * When called, this function prepares the class for the scrolling process.
2551
- * @param {MouseEvent} event - The starter event, which should be a MouseMove event.
2552
- */
2553
- async start(event) {
2554
- const el = event.currentTarget;
2555
- el.scrollOnHover.rect = el.getBoundingClientRect();
2556
- el.scrollOnHover.x = event.clientX;
2557
- el.scrollOnHover.y = event.clientY;
2558
- __classPrivateFieldGet$1(this, _arrowsContainer).style.left = event.clientX + 'px';
2559
- __classPrivateFieldGet$1(this, _arrowsContainer).style.top = event.clientY + 'px';
2560
- if (el.scrollOnHover.active || __classPrivateFieldGet$1(this, _timeout)) {
2561
- return;
2562
- }
2563
- let trueWidth = el.clientWidth;
2564
- if (trueWidth === 0) {
2565
- trueWidth = el.offsetWidth;
2566
- }
2567
- if (el.scrollWidth > trueWidth + 10) {
2568
- if (trueWidth !== 0 && !el.scrollOnHover.active) {
2569
- const percRight = trueWidth - trueWidth * 0.1;
2570
- const percLeft = trueWidth - trueWidth * 0.9;
2571
- const elOffset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
2572
- const maxScrollLeft = el.scrollWidth - trueWidth;
2573
- const direction = elOffset < percLeft && el.scrollLeft !== 0
2574
- ? ScrollOnHoverDirection.LEFT
2575
- : elOffset > percRight &&
2576
- el.scrollLeft !== maxScrollLeft
2577
- ? ScrollOnHoverDirection.RIGHT
2578
- : null;
2579
- if (direction) {
2580
- for (let i = 0; i < 3; i++) {
2581
- if (direction === ScrollOnHoverDirection.LEFT) {
2582
- __classPrivateFieldGet$1(this, _leftArrows)[i].classList.add('kup-activated');
2583
- }
2584
- else {
2585
- __classPrivateFieldGet$1(this, _rightArrows)[i].classList.add('kup-activated');
2586
- }
2587
- }
2588
- __classPrivateFieldSet$1(this, _timeout, setTimeout(() => {
2589
- el.scrollOnHover.active = true;
2590
- __classPrivateFieldSet$1(this, _rAF, requestAnimationFrame(function () {
2591
- dom$3.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
2592
- }));
2593
- }, this.delay));
2594
- }
2595
- }
2596
- }
2597
- }
2598
- /**
2599
- * When called, this function stops the scrolling process.
2600
- * @param {KupScrollOnHoverElement} el - The scrolled element.
2601
- */
2602
- async stop(el) {
2603
- el.scrollOnHover.active = false;
2604
- cancelAnimationFrame(__classPrivateFieldGet$1(this, _rAF));
2605
- clearTimeout(__classPrivateFieldGet$1(this, _timeout));
2606
- __classPrivateFieldSet$1(this, _timeout, null);
2607
- for (let i = 0; i < __classPrivateFieldGet$1(this, _leftArrows).length; i++) {
2608
- __classPrivateFieldGet$1(this, _leftArrows)[i].classList.remove('kup-activated');
2609
- __classPrivateFieldGet$1(this, _leftArrows)[i].classList.remove('kup-animated');
2610
- }
2611
- for (let i = 0; i < __classPrivateFieldGet$1(this, _rightArrows).length; i++) {
2612
- __classPrivateFieldGet$1(this, _rightArrows)[i].classList.remove('kup-activated');
2613
- __classPrivateFieldGet$1(this, _rightArrows)[i].classList.remove('kup-animated');
2614
- }
2615
- }
2616
- /**
2617
- * The actual recursive scroll function.
2618
- * @param {KupScrollOnHoverElement} el - The scrolled element.
2619
- * @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
2620
- * @param {number} percRight - Range of the right scrollable area.
2621
- * @param {number} percLeft - Range of the left scrollable area.
2622
- * @param {ScrollOnHoverDirection} direction - Direction of the scroll.
2623
- */
2624
- run(el, maxScrollLeft, percRight, percLeft, direction) {
2625
- if (!el.scrollOnHover.active) {
2626
- this.stop(el);
2627
- return;
2628
- }
2629
- const offset = el.scrollOnHover.x - el.scrollOnHover.rect.left;
2630
- if (offset > percLeft && offset < percRight) {
2631
- this.stop(el);
2632
- return;
2633
- }
2634
- if (direction === ScrollOnHoverDirection.RIGHT && percRight > offset) {
2635
- this.stop(el);
2636
- return;
2637
- }
2638
- if (direction === ScrollOnHoverDirection.LEFT && percLeft < offset) {
2639
- this.stop(el);
2640
- return;
2641
- }
2642
- if (el.scrollOnHover.children) {
2643
- this.updateChildren(el);
2644
- }
2645
- let arrow;
2646
- if (direction === ScrollOnHoverDirection.LEFT) {
2647
- arrow = __classPrivateFieldGet$1(this, _leftArrows);
2648
- if (el.scrollLeft === 0) {
2649
- this.stop(el);
2650
- return;
2651
- }
2652
- el.scrollLeft -= this.step;
2653
- }
2654
- else {
2655
- arrow = __classPrivateFieldGet$1(this, _rightArrows);
2656
- if (el.scrollLeft === maxScrollLeft) {
2657
- this.stop(el);
2658
- return;
2659
- }
2660
- el.scrollLeft += this.step;
2661
- }
2662
- for (let i = 0; i < arrow.length; i++) {
2663
- arrow[i].classList.add('kup-animated');
2664
- }
2665
- __classPrivateFieldSet$1(this, _rAF, requestAnimationFrame(function () {
2666
- dom$3.ketchup.scrollOnHover.run(el, maxScrollLeft, percRight, percLeft, direction);
2667
- }));
2668
- }
2669
- /**
2670
- * Scrolls children of the element having the "hover-scrolling-child" class
2671
- * @param {KupScrollOnHoverElement} el - The scrolled element.
2672
- */
2673
- updateChildren(el) {
2674
- for (let i = 0; i < el.scrollOnHover.children.length; i++) {
2675
- el.scrollOnHover.children[i].scrollLeft = el.scrollLeft;
2676
- }
2677
- }
2678
- }
2679
- _arrowsContainer = new WeakMap(), _leftArrows = new WeakMap(), _rightArrows = new WeakMap(), _scrollEvent = new WeakMap(), _mousemoveEvent = new WeakMap(), _mouseleaveEvent = new WeakMap(), _rAF = new WeakMap(), _timeout = new WeakMap();
2680
-
2681
- const bubbles = {
2682
- cssVariables: {
2683
- "--kup-primary-color": "#c18f00",
2684
- "--kup-secondary-color": "#1d1d1d",
2685
- "--kup-background-color": "#ffffff",
2686
- "--kup-navbar-background-color": "#beb08d",
2687
- "--kup-navbar-color": "#ffffff",
2688
- "--kup-drawer-background-color": "#ffffff",
2689
- "--kup-drawer-color": "#000000",
2690
- "--kup-navbar-height": "64px",
2691
- "--kup-drawer-width": "300px",
2692
- "--kup-font-family": "Lato, sans-serif",
2693
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
2694
- "--kup-font-size": "14px",
2695
- "--kup-text-color": "#2e2e2e",
2696
- "--kup-text-on-primary-color": "#ffffff",
2697
- "--kup-text-on-secondary-color": "#ffffff",
2698
- "--kup-disabled-background-color": "#eaeaea",
2699
- "--kup-disabled-color": "#5c5c5c",
2700
- "--kup-hover-background-color": "#f0f0f0",
2701
- "--kup-hover-color": "#545454",
2702
- "--kup-title-background-color": "#f1f3f4",
2703
- "--kup-title-color": "#2e2e2e",
2704
- "--kup-icon-color": "#505050",
2705
- "--kup-border-color": "#e0e0e0",
2706
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
2707
- "--kup-info-color": "#2592df",
2708
- "--kup-success-color": "#4d9f02",
2709
- "--kup-warning-color": "#ffc107",
2710
- "--kup-danger-color": "#d91e18",
2711
- "--kup-spinner-color": "#1D1D1B",
2712
- "--kup-chart-color-1": "#ff5959",
2713
- "--kup-chart-color-2": "#e0a0a0",
2714
- "--kup-chart-color-3": "#8e1010",
2715
- "--kup-chart-color-4": "#f5f5dc",
2716
- "--kup-obj-cursor": "inherit",
2717
- "--kup-drawer-zindex": "90",
2718
- "--kup-navbar-zindex": "90"
2719
- },
2720
- icons: {
2721
- "--kup-ascending-icon": "sort-ascending",
2722
- "--kup-descending-icon": "sort-descending",
2723
- "--kup-expanded-icon": "chevron-down",
2724
- "--kup-collapsed-icon": "chevron_right",
2725
- "--kup-dropdown-icon": "chevron-down",
2726
- "--kup-clear-icon": "clear",
2727
- "--kup-filter-remove-icon": "filter-remove",
2728
- "--kup-key-icon": "key-variant",
2729
- "--kup-search-icon": "search"
2730
- },
2731
- customStyles: {
2732
- },
2733
- imports: [
2734
- "@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap')"
2735
- ]
2736
- };
2737
- const cobalt = {
2738
- cssVariables: {
2739
- "--kup-primary-color": "#248aff",
2740
- "--kup-secondary-color": "#65cbe9",
2741
- "--kup-background-color": "#222222",
2742
- "--kup-navbar-background-color": "#131313",
2743
- "--kup-navbar-color": "#65cbe9",
2744
- "--kup-drawer-background-color": "#2e2e2e",
2745
- "--kup-drawer-color": "#65cbe9",
2746
- "--kup-navbar-height": "64px",
2747
- "--kup-drawer-width": "300px",
2748
- "--kup-font-family": "Blinker, sans-serif;",
2749
- "--kup-font-family-monospace": "Andalé Mono, monospace",
2750
- "--kup-font-size": "14px",
2751
- "--kup-text-color": "#65cbe9",
2752
- "--kup-text-on-primary-color": "#f1f7ff",
2753
- "--kup-text-on-secondary-color": "#000000",
2754
- "--kup-disabled-background-color": "#3c3c3c",
2755
- "--kup-disabled-color": "#7e7e7e",
2756
- "--kup-hover-background-color": "#383838",
2757
- "--kup-hover-color": "#96e7ff",
2758
- "--kup-title-background-color": "#2e2e2e",
2759
- "--kup-title-color": "#f5f5f5",
2760
- "--kup-icon-color": "#65cbe9",
2761
- "--kup-border-color": "#535353",
2762
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
2763
- "--kup-info-color": "#2592df",
2764
- "--kup-success-color": "#4d9f02",
2765
- "--kup-warning-color": "#ffc107",
2766
- "--kup-danger-color": "#d91e18",
2767
- "--kup-spinner-color": "#a4d9f7",
2768
- "--kup-chart-color-1": "#308aff",
2769
- "--kup-chart-color-2": "#5eb6d1",
2770
- "--kup-chart-color-3": "#b1eafb",
2771
- "--kup-chart-color-4": "#ffffff",
2772
- "--kup-obj-cursor": "inherit",
2773
- "--kup-drawer-zindex": "90",
2774
- "--kup-navbar-zindex": "90"
2775
- },
2776
- icons: {
2777
- "--kup-ascending-icon": "arrow_drop_up",
2778
- "--kup-descending-icon": "arrow_drop_down",
2779
- "--kup-expanded-icon": "arrow_drop_down",
2780
- "--kup-collapsed-icon": "menu-right",
2781
- "--kup-dropdown-icon": "arrow_drop_down",
2782
- "--kup-clear-icon": "cancel",
2783
- "--kup-filter-remove-icon": "filter-remove",
2784
- "--kup-key-icon": "key-variant",
2785
- "--kup-search-icon": "search"
2786
- },
2787
- imports: [
2788
- "url('https://fonts.googleapis.com/css2?family=Blinker:wght@200;300;600&display=swap')"
2789
- ]
2790
- };
2791
- const dark = {
2792
- cssVariables: {
2793
- "--kup-primary-color": "#82f0e2",
2794
- "--kup-secondary-color": "#f9ff00",
2795
- "--kup-background-color": "#2d2d2d",
2796
- "--kup-navbar-background-color": "#2d2d2d",
2797
- "--kup-navbar-color": "#ffffff",
2798
- "--kup-drawer-background-color": "#1f1f1f",
2799
- "--kup-drawer-color": "#f5f5f5",
2800
- "--kup-navbar-height": "64px",
2801
- "--kup-drawer-width": "300px",
2802
- "--kup-font-family": "Lato, sans-serif",
2803
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
2804
- "--kup-font-size": "14px",
2805
- "--kup-text-color": "#f5f5f5",
2806
- "--kup-text-on-primary-color": "#555555",
2807
- "--kup-text-on-secondary-color": "#000000",
2808
- "--kup-disabled-background-color": "#3c3c3c",
2809
- "--kup-disabled-color": "#7e7e7e",
2810
- "--kup-hover-background-color": "#3c3c3c",
2811
- "--kup-hover-color": "#dddddd",
2812
- "--kup-title-background-color": "#111111",
2813
- "--kup-title-color": "#f5f5f5",
2814
- "--kup-icon-color": "#e0e0e0",
2815
- "--kup-border-color": "#535353",
2816
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
2817
- "--kup-info-color": "#2592df",
2818
- "--kup-success-color": "#4d9f02",
2819
- "--kup-warning-color": "#ffc107",
2820
- "--kup-danger-color": "#d91e18",
2821
- "--kup-spinner-color": "#f2e114",
2822
- "--kup-chart-color-1": "#60c3fc",
2823
- "--kup-chart-color-2": "#e268d8",
2824
- "--kup-chart-color-3": "#860bb5",
2825
- "--kup-chart-color-4": "#1a83e4",
2826
- "--kup-obj-cursor": "inherit",
2827
- "--kup-drawer-zindex": "90",
2828
- "--kup-navbar-zindex": "90"
2829
- },
2830
- icons: {
2831
- "--kup-ascending-icon": "arrow_drop_up",
2832
- "--kup-descending-icon": "arrow_drop_down",
2833
- "--kup-expanded-icon": "arrow_drop_down",
2834
- "--kup-collapsed-icon": "menu-right",
2835
- "--kup-dropdown-icon": "arrow_drop_down",
2836
- "--kup-clear-icon": "cancel",
2837
- "--kup-filter-remove-icon": "filter-remove",
2838
- "--kup-key-icon": "key-variant",
2839
- "--kup-search-icon": "search"
2840
- },
2841
- imports: [
2842
- "@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap')"
2843
- ]
2844
- };
2845
- const flamingo = {
2846
- cssVariables: {
2847
- "--kup-primary-color": "#e88aab",
2848
- "--kup-secondary-color": "#7f00e7",
2849
- "--kup-background-color": "#222222",
2850
- "--kup-navbar-background-color": "#2d2d2d",
2851
- "--kup-navbar-color": "#ffffff",
2852
- "--kup-drawer-background-color": "#1f1f1f",
2853
- "--kup-drawer-color": "#f5f5f5",
2854
- "--kup-navbar-height": "64px",
2855
- "--kup-drawer-width": "300px",
2856
- "--kup-font-family": "Mali, cursive;",
2857
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
2858
- "--kup-font-size": "14px",
2859
- "--kup-text-color": "#f5f5f5",
2860
- "--kup-text-on-primary-color": "#000000",
2861
- "--kup-text-on-secondary-color": "#ffffff",
2862
- "--kup-disabled-background-color": "#3c3c3c",
2863
- "--kup-disabled-color": "#7e7e7e",
2864
- "--kup-hover-background-color": "#3c3c3c",
2865
- "--kup-hover-color": "#dddddd",
2866
- "--kup-title-background-color": "#111111",
2867
- "--kup-title-color": "#f5f5f5",
2868
- "--kup-icon-color": "#e0e0e0",
2869
- "--kup-border-color": "#535353",
2870
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
2871
- "--kup-info-color": "#2592df",
2872
- "--kup-success-color": "#4d9f02",
2873
- "--kup-warning-color": "#ffc107",
2874
- "--kup-danger-color": "#d91e18",
2875
- "--kup-spinner-color": "#ffd0d8",
2876
- "--kup-chart-color-1": "#e88aab",
2877
- "--kup-chart-color-2": "#dc5584",
2878
- "--kup-chart-color-3": "#c21350",
2879
- "--kup-chart-color-4": "#c88da1",
2880
- "--kup-obj-cursor": "inherit",
2881
- "--kup-drawer-zindex": "90",
2882
- "--kup-navbar-zindex": "90"
2883
- },
2884
- icons: {
2885
- "--kup-ascending-icon": "arrow_drop_up",
2886
- "--kup-descending-icon": "arrow_drop_down",
2887
- "--kup-expanded-icon": "arrow_drop_down",
2888
- "--kup-collapsed-icon": "menu-right",
2889
- "--kup-dropdown-icon": "arrow_drop_down",
2890
- "--kup-clear-icon": "cancel",
2891
- "--kup-filter-remove-icon": "filter-remove",
2892
- "--kup-key-icon": "key-variant",
2893
- "--kup-search-icon": "search"
2894
- },
2895
- imports: [
2896
- "url('https://fonts.googleapis.com/css2?family=Mali:wght@300&display=swap')"
2897
- ]
2898
- };
2899
- const graphite = {
2900
- cssVariables: {
2901
- "--kup-primary-color": "#888888",
2902
- "--kup-secondary-color": "#d91e18",
2903
- "--kup-background-color": "#ffffff",
2904
- "--kup-navbar-background-color": "#535353",
2905
- "--kup-navbar-color": "#ffffff",
2906
- "--kup-drawer-background-color": "#ffffff",
2907
- "--kup-drawer-color": "#545454",
2908
- "--kup-navbar-height": "64px",
2909
- "--kup-drawer-width": "300px",
2910
- "--kup-font-family": "Roboto, sans-serif",
2911
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
2912
- "--kup-font-size": "13px",
2913
- "--kup-text-color": "#545454",
2914
- "--kup-text-on-primary-color": "#ffffff",
2915
- "--kup-text-on-secondary-color": "#ffffff",
2916
- "--kup-disabled-color": "#5c5c5c",
2917
- "--kup-disabled-background-color": "#eaeaea",
2918
- "--kup-hover-background-color": "#f0f0f0",
2919
- "--kup-hover-color": "#545454",
2920
- "--kup-title-background-color": "#f0f0f0",
2921
- "--kup-title-color": "#545454",
2922
- "--kup-icon-color": "#808080",
2923
- "--kup-border-color": "#e0e0e0",
2924
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
2925
- "--kup-info-color": "#2592df",
2926
- "--kup-success-color": "#4d9f02",
2927
- "--kup-warning-color": "#ffc107",
2928
- "--kup-danger-color": "#d91e18",
2929
- "--kup-spinner-color": "#eaa710",
2930
- "--kup-chart-color-1": "red",
2931
- "--kup-chart-color-2": "blue",
2932
- "--kup-chart-color-3": "orange",
2933
- "--kup-chart-color-4": "green",
2934
- "--kup-chart-color-5": "yellow",
2935
- "--kup-chart-color-6": "cyan",
2936
- "--kup-chart-color-7": "brown",
2937
- "--kup-chart-color-8": "magenta",
2938
- "--kup-chart-color-9": "grey",
2939
- "--kup-chart-color-10": "indigo",
2940
- "--kup-obj-cursor": "inherit",
2941
- "--kup-drawer-zindex": "90",
2942
- "--kup-navbar-zindex": "90"
2943
- },
2944
- customStyles: {
2945
- "KUP-BUTTON": "#kup-component button {\ntext-transform: unset;\n}\n\n"
2946
- },
2947
- icons: {
2948
- "--kup-ascending-icon": "arrow_drop_up",
2949
- "--kup-descending-icon": "arrow_drop_down",
2950
- "--kup-expanded-icon": "arrow_drop_down",
2951
- "--kup-collapsed-icon": "menu-right",
2952
- "--kup-dropdown-icon": "arrow_drop_down",
2953
- "--kup-clear-icon": "cancel",
2954
- "--kup-filter-remove-icon": "filter-remove",
2955
- "--kup-key-icon": "key-variant",
2956
- "--kup-search-icon": "search"
2957
- }
2958
- };
2959
- const ketchup = {
2960
- cssVariables: {
2961
- "--kup-primary-color": "#d64325",
2962
- "--kup-secondary-color": "#a6192e",
2963
- "--kup-background-color": "#ffffff",
2964
- "--kup-navbar-background-color": "#2e2e2e",
2965
- "--kup-navbar-color": "#ffffff",
2966
- "--kup-drawer-background-color": "#ffffff",
2967
- "--kup-drawer-color": "#595959",
2968
- "--kup-navbar-height": "64px",
2969
- "--kup-drawer-width": "300px",
2970
- "--kup-font-family": "Ubuntu, sans-serif",
2971
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
2972
- "--kup-font-size": "14px",
2973
- "--kup-text-color": "#595959",
2974
- "--kup-text-on-primary-color": "#ffffff",
2975
- "--kup-text-on-secondary-color": "#ffffff",
2976
- "--kup-disabled-background-color": "#eaeaea",
2977
- "--kup-disabled-color": "#5c5c5c",
2978
- "--kup-hover-background-color": "#f0f0f0",
2979
- "--kup-hover-color": "#545454",
2980
- "--kup-title-background-color": "#f1f3f4",
2981
- "--kup-title-color": "#2e2e2e",
2982
- "--kup-icon-color": "#505050",
2983
- "--kup-border-color": "#e0e0e0",
2984
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
2985
- "--kup-info-color": "#2592df",
2986
- "--kup-success-color": "#4d9f02",
2987
- "--kup-warning-color": "#ffc107",
2988
- "--kup-danger-color": "#d91e18",
2989
- "--kup-spinner-color": "#eaa710",
2990
- "--kup-chart-color-1": "#ff5959",
2991
- "--kup-chart-color-2": "#e0a0a0",
2992
- "--kup-chart-color-3": "#8e1010",
2993
- "--kup-chart-color-4": "#f5f5dc",
2994
- "--kup-obj-cursor": "inherit",
2995
- "--kup-drawer-zindex": "90",
2996
- "--kup-navbar-zindex": "90"
2997
- },
2998
- icons: {
2999
- "--kup-ascending-icon": "sort-ascending",
3000
- "--kup-descending-icon": "sort-descending",
3001
- "--kup-expanded-icon": "chevron-down",
3002
- "--kup-collapsed-icon": "chevron_right",
3003
- "--kup-dropdown-icon": "chevron-down",
3004
- "--kup-clear-icon": "clear",
3005
- "--kup-filter-remove-icon": "filter-remove",
3006
- "--kup-key-icon": "key",
3007
- "--kup-search-icon": "search"
3008
- },
3009
- imports: [
3010
- "url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;500&display=swap')"
3011
- ]
3012
- };
3013
- const obsidian = {
3014
- cssVariables: {
3015
- "--kup-primary-color": "#a6192e",
3016
- "--kup-secondary-color": "#f5f4f4",
3017
- "--kup-background-color": "#ffffff",
3018
- "--kup-navbar-background-color": "#000000",
3019
- "--kup-navbar-color": "#ffffff",
3020
- "--kup-drawer-background-color": "#f5f4f4",
3021
- "--kup-drawer-color": "#4c4c4d",
3022
- "--kup-navbar-height": "64px",
3023
- "--kup-drawer-width": "300px",
3024
- "--kup-font-family": "Open Sans, arial, helvatica",
3025
- "--kup-font-family-monospace": "Courier New, Courier, monospace",
3026
- "--kup-font-size": "13px",
3027
- "--kup-text-color": "#4c4c4d",
3028
- "--kup-text-on-primary-color": "#ffffff",
3029
- "--kup-text-on-secondary-color": "#a6192e",
3030
- "--kup-disabled-background-color": "#ffffff",
3031
- "--kup-disabled-color": "#4c4c4d",
3032
- "--kup-hover-background-color": "#f5f4f4",
3033
- "--kup-hover-color": "#000000",
3034
- "--kup-title-background-color": "#068a9c",
3035
- "--kup-title-color": "#ffffff",
3036
- "--kup-icon-color": "#9d9d9d",
3037
- "--kup-border-color": "#ededed",
3038
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
3039
- "--kup-info-color": "#2592df",
3040
- "--kup-success-color": "#4d9f02",
3041
- "--kup-warning-color": "#ffc107",
3042
- "--kup-danger-color": "#A6192E",
3043
- "--kup-spinner-color": "#a6192e",
3044
- "--kup-chart-color-1": "#735DED",
3045
- "--kup-chart-color-2": "#00B2CB",
3046
- "--kup-chart-color-3": "#EDC900",
3047
- "--kup-chart-color-4": "green",
3048
- "--kup-chart-color-5": "yellow",
3049
- "--kup-chart-color-6": "cyan",
3050
- "--kup-chart-color-7": "brown",
3051
- "--kup-chart-color-8": "magenta",
3052
- "--kup-chart-color-9": "grey",
3053
- "--kup-chart-color-10": "indigo",
3054
- "--kup-obj-cursor": "inherit",
3055
- "--kup-drawer-zindex": "90",
3056
- "--kup-navbar-zindex": "90"
3057
- },
3058
- icons: {
3059
- "--kup-ascending-icon": "arrow_drop_up",
3060
- "--kup-descending-icon": "arrow_drop_down",
3061
- "--kup-expanded-icon": "arrow_drop_down",
3062
- "--kup-collapsed-icon": "menu-right",
3063
- "--kup-dropdown-icon": "arrow_drop_down",
3064
- "--kup-clear-icon": "cancel",
3065
- "--kup-filter-remove-icon": "filter-remove",
3066
- "--kup-key-icon": "key-variant",
3067
- "--kup-search-icon": "search"
3068
- },
3069
- imports: [
3070
- "url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400&display=swap')"
3071
- ]
3072
- };
3073
- const ocean = {
3074
- cssVariables: {
3075
- "--kup-primary-color": "#0081c5",
3076
- "--kup-secondary-color": "#3a8ede",
3077
- "--kup-background-color": "#ffffff",
3078
- "--kup-navbar-background-color": "#001d3e",
3079
- "--kup-navbar-color": "#ffffff",
3080
- "--kup-drawer-background-color": "#e6f1ff",
3081
- "--kup-drawer-color": "#1b1b1b",
3082
- "--kup-navbar-height": "64px",
3083
- "--kup-drawer-width": "300px",
3084
- "--kup-font-family": "Open Sans Condensed, sans-serif",
3085
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3086
- "--kup-font-size": "16px",
3087
- "--kup-text-color": "#1b1b1b",
3088
- "--kup-text-on-primary-color": "#ffffff",
3089
- "--kup-text-on-secondary-color": "#ffffff",
3090
- "--kup-disabled-background-color": "#eaeaea",
3091
- "--kup-disabled-color": "#5c5c5c",
3092
- "--kup-hover-background-color": "#cfe8ff",
3093
- "--kup-hover-color": "#545454",
3094
- "--kup-title-background-color": "#f1f3f4",
3095
- "--kup-title-color": "#1b1b1b",
3096
- "--kup-icon-color": "#505050",
3097
- "--kup-border-color": "#e0e0e0",
3098
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
3099
- "--kup-info-color": "#2592df",
3100
- "--kup-success-color": "#4d9f02",
3101
- "--kup-warning-color": "#ffc107",
3102
- "--kup-danger-color": "#d91e18",
3103
- "--kup-spinner-color": "#6edeff",
3104
- "--kup-chart-color-1": "#60c3fc",
3105
- "--kup-chart-color-2": "#e268d8",
3106
- "--kup-chart-color-3": "#e48b47",
3107
- "--kup-chart-color-4": "#81e447",
3108
- "--kup-obj-cursor": "inherit",
3109
- "--kup-drawer-zindex": "90",
3110
- "--kup-navbar-zindex": "90"
3111
- },
3112
- icons: {
3113
- "--kup-ascending-icon": "arrow_drop_up",
3114
- "--kup-descending-icon": "arrow_drop_down",
3115
- "--kup-expanded-icon": "arrow_drop_down",
3116
- "--kup-collapsed-icon": "menu-right",
3117
- "--kup-dropdown-icon": "arrow_drop_down",
3118
- "--kup-clear-icon": "cancel",
3119
- "--kup-filter-remove-icon": "filter-remove",
3120
- "--kup-key-icon": "key-variant",
3121
- "--kup-search-icon": "search"
3122
- },
3123
- imports: [
3124
- "url('https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300;700&display=swap')"
3125
- ]
3126
- };
3127
- const print = {
3128
- cssVariables: {
3129
- "--kup-primary-color": "#000000",
3130
- "--kup-secondary-color": "#cccccc",
3131
- "--kup-background-color": "#ffffff",
3132
- "--kup-navbar-background-color": "#000000",
3133
- "--kup-navbar-color": "#ffffff",
3134
- "--kup-drawer-background-color": "#ffffff",
3135
- "--kup-drawer-color": "#000000",
3136
- "--kup-navbar-height": "64px",
3137
- "--kup-drawer-width": "300px",
3138
- "--kup-font-family": "Arial, Helvetica, sans-serif",
3139
- "--kup-font-family-monospace": "Courier New, Courier, monospace",
3140
- "--kup-font-size": "13px",
3141
- "--kup-text-color": "#000000",
3142
- "--kup-text-on-primary-color": "#ffffff",
3143
- "--kup-text-on-secondary-color": "#000000",
3144
- "--kup-disabled-background-color": "#ffffff",
3145
- "--kup-disabled-color": "#000000",
3146
- "--kup-hover-background-color": "#ffffff",
3147
- "--kup-hover-color": "#000000",
3148
- "--kup-title-background-color": "#f1f1f1",
3149
- "--kup-title-color": "#000000",
3150
- "--kup-icon-color": "#9d9d9d",
3151
- "--kup-border-color": "#ededed",
3152
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
3153
- "--kup-info-color": "#2592df",
3154
- "--kup-success-color": "#4d9f02",
3155
- "--kup-warning-color": "#ffc107",
3156
- "--kup-danger-color": "#A6192E",
3157
- "--kup-spinner-color": "#eaa710",
3158
- "--kup-chart-color-1": "#735DED",
3159
- "--kup-chart-color-2": "#00B2CB",
3160
- "--kup-chart-color-3": "#EDC900",
3161
- "--kup-chart-color-4": "green",
3162
- "--kup-chart-color-5": "yellow",
3163
- "--kup-chart-color-6": "cyan",
3164
- "--kup-chart-color-7": "brown",
3165
- "--kup-chart-color-8": "magenta",
3166
- "--kup-chart-color-9": "grey",
3167
- "--kup-chart-color-10": "indigo",
3168
- "--kup-obj-cursor": "inherit",
3169
- "--kup-drawer-zindex": "90",
3170
- "--kup-navbar-zindex": "90"
3171
- },
3172
- customStyles: {
3173
- MASTER: "#kup-component #global-filter {\ndisplay: none;\n}\n\n",
3174
- "KUP-BOX": "#kup-component #box-container .box-wrapper .box:hover {\nbox-shadow: none;\n}\n\n#kup-component #box-container .box-wrapper .box.selected {\nbackground-color: inherit;\n}",
3175
- "KUP-BUTTON": ":host(:not(.printable)) {\ndisplay: none;\n}\n\n",
3176
- "KUP-CARD": "",
3177
- "KUP-DATA-TABLE": "#kup-component sticky-header {\ndisplay: none;\n}\n\n#kup-component kup-paginator {\ndisplay: none;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.selected, \n#kup-component table td.selected, #kup-component tr.selected td {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n#kup-component table,\n#kup-component .below-wrapper {\noverflow: hidden !important;\n}\n\n:host(.cross-selection) #kup-component tr.selected td:first-of-type,\n:host(.cross-selection) #kup-component th.selected { \nbox-shadow: none !important;\n}\n\n:host(.cross-selection) #kup-component table td.selected,\n:host(.cross-selection) #kup-component table tr.selected td {\nbackground-color: inherit;\n}\n\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column.selected,\n:host(.cross-selection) #kup-component table td.selected.fixed-column, \n:host(.cross-selection) #kup-component table td.selected.fixed-row,\n:host(.cross-selection) #kup-component table tr.selected td.fixed-column, \n:host(.cross-selection) #kup-component table tr.selected td.fixed-row {\nbackground-color: inherit;\nbackground-image: none;\n}\n\n",
3178
- "KUP-PROGRESS-BAR": "#kup-component .progress-bar {\nbackground: #e7e7e7;\n}\n\n#kup-component .progress-bar-percentage span {\ntext-shadow: 0px 0px 0px hsl(0deg 0% 100%);\n}\n\n",
3179
- "KUP-TREE": "#kup-component .wrapper {\noverflow: hidden;\n}\n\n#kup-component tr.mdc-ripple-surface::before, \n#kup-component tr.mdc-ripple-surface::after,\n#kup-component td.mdc-ripple-surface::before, \n#kup-component td.mdc-ripple-surface::after,\n#kup-component .kup-tree__node--selected:not(.kup-tree__node--disabled) td {\nbackground-color: var(--kup-background-color);\n}"
3180
- },
3181
- icons: {
3182
- "--kup-ascending-icon": "arrow_drop_up",
3183
- "--kup-descending-icon": "arrow_drop_down",
3184
- "--kup-expanded-icon": "arrow_drop_down",
3185
- "--kup-collapsed-icon": "menu-right",
3186
- "--kup-dropdown-icon": "arrow_drop_down",
3187
- "--kup-clear-icon": "cancel",
3188
- "--kup-filter-remove-icon": "filter-remove",
3189
- "--kup-key-icon": "key-variant",
3190
- "--kup-search-icon": "search"
3191
- }
3192
- };
3193
- const raj = {
3194
- cssVariables: {
3195
- "--kup-primary-color": "rgb(187, 198, 5)",
3196
- "--kup-secondary-color": "#ffe600",
3197
- "--kup-background-color": "#000000",
3198
- "--kup-navbar-background-color": "#000000",
3199
- "--kup-navbar-color": "#ffffff",
3200
- "--kup-drawer-background-color": "#000000",
3201
- "--kup-drawer-color": "#ffffff",
3202
- "--kup-navbar-height": "64px",
3203
- "--kup-drawer-width": "300px",
3204
- "--kup-font-family": "'Rajdhani', sans-serif",
3205
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3206
- "--kup-font-size": "15px",
3207
- "--kup-text-color": "#ffffff",
3208
- "--kup-text-on-primary-color": "#000000",
3209
- "--kup-text-on-secondary-color": "#000000",
3210
- "--kup-disabled-background-color": "#151515",
3211
- "--kup-disabled-color": "#7b7b7b",
3212
- "--kup-hover-background-color": "#404040",
3213
- "--kup-hover-color": "#ffffff",
3214
- "--kup-title-background-color": "#ffe600",
3215
- "--kup-title-color": "#000000",
3216
- "--kup-icon-color": "#9d9d9d",
3217
- "--kup-border-color": "#9d9d9d",
3218
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
3219
- "--kup-info-color": "#2592df",
3220
- "--kup-success-color": "#4d9f02",
3221
- "--kup-warning-color": "#ffc107",
3222
- "--kup-danger-color": "#d91e18",
3223
- "--kup-spinner-color": "#ffe600",
3224
- "--kup-chart-color-1": "#ffffff",
3225
- "--kup-chart-color-2": "rgb(187, 198, 5)",
3226
- "--kup-chart-color-3": "#ffe600",
3227
- "--kup-chart-color-4": "#effd02",
3228
- "--kup-obj-cursor": "inherit",
3229
- "--kup-drawer-zindex": "90",
3230
- "--kup-navbar-zindex": "90"
3231
- },
3232
- icons: {
3233
- "--kup-ascending-icon": "sort-ascending",
3234
- "--kup-descending-icon": "sort-descending",
3235
- "--kup-expanded-icon": "chevron-down",
3236
- "--kup-collapsed-icon": "chevron_right",
3237
- "--kup-dropdown-icon": "chevron-down",
3238
- "--kup-clear-icon": "cancel",
3239
- "--kup-filter-remove-icon": "filter-remove",
3240
- "--kup-key-icon": "key-variant",
3241
- "--kup-search-icon": "search"
3242
- },
3243
- imports: [
3244
- "url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600&display=swap')"
3245
- ]
3246
- };
3247
- const red = {
3248
- cssVariables: {
3249
- "--kup-primary-color": "#a6192e",
3250
- "--kup-secondary-color": "#ffc107",
3251
- "--kup-background-color": "#ffffff",
3252
- "--kup-navbar-background-color": "#a6192e",
3253
- "--kup-navbar-color": "#ffffff",
3254
- "--kup-drawer-background-color": "#f5f5f5",
3255
- "--kup-drawer-color": "#000000",
3256
- "--kup-navbar-height": "64px",
3257
- "--kup-drawer-width": "300px",
3258
- "--kup-font-family": "Open Sans, arial, helvatica",
3259
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3260
- "--kup-font-size": "13px",
3261
- "--kup-text-color": "#000000",
3262
- "--kup-text-on-primary-color": "#ffffff",
3263
- "--kup-text-on-secondary-color": "#ffffff",
3264
- "--kup-disabled-background-color": "#eaeaea",
3265
- "--kup-disabled-color": "#333333",
3266
- "--kup-hover-background-color": "#eeeeee",
3267
- "--kup-hover-color": "#000000",
3268
- "--kup-title-background-color": "#f1f3f4",
3269
- "--kup-title-color": "#2e2e2e",
3270
- "--kup-icon-color": "#808080",
3271
- "--kup-border-color": "#ededed",
3272
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
3273
- "--kup-info-color": "#2592df",
3274
- "--kup-success-color": "#4d9f02",
3275
- "--kup-warning-color": "#ffc107",
3276
- "--kup-danger-color": "#A6192E",
3277
- "--kup-spinner-color": "#1D1D1B",
3278
- "--kup-chart-color-1": "#735DED",
3279
- "--kup-chart-color-2": "#00B2CB",
3280
- "--kup-chart-color-3": "#EDC900",
3281
- "--kup-chart-color-4": "#a6192e",
3282
- "--kup-chart-color-5": "yellow",
3283
- "--kup-chart-color-6": "cyan",
3284
- "--kup-chart-color-7": "brown",
3285
- "--kup-chart-color-8": "magenta",
3286
- "--kup-chart-color-9": "grey",
3287
- "--kup-chart-color-10": "indigo",
3288
- "--kup-obj-cursor": "inherit",
3289
- "--kup-drawer-zindex": "90",
3290
- "--kup-navbar-zindex": "90"
3291
- },
3292
- icons: {
3293
- "--kup-ascending-icon": "arrow_drop_up",
3294
- "--kup-descending-icon": "arrow_drop_down",
3295
- "--kup-expanded-icon": "arrow_drop_down",
3296
- "--kup-collapsed-icon": "menu-right",
3297
- "--kup-dropdown-icon": "arrow_drop_down",
3298
- "--kup-clear-icon": "cancel",
3299
- "--kup-filter-remove-icon": "filter-remove",
3300
- "--kup-key-icon": "key-variant",
3301
- "--kup-search-icon": "search"
3302
- },
3303
- customStyles: {
3304
- },
3305
- imports: [
3306
- "url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400&display=swap')"
3307
- ]
3308
- };
3309
- const sapphire = {
3310
- cssVariables: {
3311
- "--kup-primary-color": "#003b77",
3312
- "--kup-secondary-color": "#ff1414",
3313
- "--kup-background-color": "#ffffff",
3314
- "--kup-navbar-background-color": "#003b77",
3315
- "--kup-navbar-color": "#ffffff",
3316
- "--kup-drawer-background-color": "#002244",
3317
- "--kup-drawer-color": "#ffffff",
3318
- "--kup-navbar-height": "64px",
3319
- "--kup-drawer-width": "20em",
3320
- "--kup-font-family": "Arial",
3321
- "--kup-font-family-monospace": "Arial",
3322
- "--kup-font-size": "13px",
3323
- "--kup-text-color": "#333333",
3324
- "--kup-text-on-primary-color": "#fafafa",
3325
- "--kup-text-on-secondary-color": "#ffffff",
3326
- "--kup-disabled-background-color": "#ddecf8",
3327
- "--kup-disabled-color": "#333333",
3328
- "--kup-hover-background-color": "#d8ecf6",
3329
- "--kup-hover-color": "#333333",
3330
- "--kup-title-background-color": "#003b77",
3331
- "--kup-title-color": "#ffffff",
3332
- "--kup-icon-color": "#808080",
3333
- "--kup-border-color": "#93c4ec",
3334
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
3335
- "--kup-info-color": "#2592df",
3336
- "--kup-success-color": "#4d9f02",
3337
- "--kup-warning-color": "#ffc107",
3338
- "--kup-danger-color": "#a94442",
3339
- "--kup-spinner-color": "#003b77",
3340
- "--kup-chart-color-1": "#0781fd",
3341
- "--kup-chart-color-2": "#002244",
3342
- "--kup-chart-color-3": "#c6cff8",
3343
- "--kup-chart-color-4": "#66bdda",
3344
- "--kup-chart-color-5": "yellow",
3345
- "--kup-chart-color-6": "cyan",
3346
- "--kup-chart-color-7": "brown",
3347
- "--kup-chart-color-8": "magenta",
3348
- "--kup-chart-color-9": "grey",
3349
- "--kup-chart-color-10": "indigo",
3350
- "--kup-obj-cursor": "inherit",
3351
- "--kup-drawer-zindex": "90",
3352
- "--kup-navbar-zindex": "90"
3353
- },
3354
- icons: {
3355
- "--kup-ascending-icon": "arrow_drop_up",
3356
- "--kup-descending-icon": "arrow_drop_down",
3357
- "--kup-expanded-icon": "arrow_drop_down",
3358
- "--kup-collapsed-icon": "menu-right",
3359
- "--kup-dropdown-icon": "arrow_drop_down",
3360
- "--kup-clear-icon": "cancel",
3361
- "--kup-filter-remove-icon": "filter-remove",
3362
- "--kup-key-icon": "key-variant",
3363
- "--kup-search-icon": "search"
3364
- },
3365
- customStyles: {
3366
- "KUP-DATA-TABLE": "#kup-component th { --kup_datatable_th_border: none; font-weight: normal; }"
3367
- }
3368
- };
3369
- const teal = {
3370
- cssVariables: {
3371
- "--kup-primary-color": "#068A9C",
3372
- "--kup-secondary-color": "#ffc107",
3373
- "--kup-background-color": "#ffffff",
3374
- "--kup-navbar-background-color": "#068A9C",
3375
- "--kup-navbar-color": "#ffffff",
3376
- "--kup-drawer-background-color": "#ffffff",
3377
- "--kup-drawer-color": "#000000",
3378
- "--kup-navbar-height": "64px",
3379
- "--kup-drawer-width": "300px",
3380
- "--kup-font-family": "Roboto, sans-serif",
3381
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3382
- "--kup-font-size": "13px",
3383
- "--kup-text-color": "#000000",
3384
- "--kup-text-on-primary-color": "#ffffff",
3385
- "--kup-text-on-secondary-color": "#ffffff",
3386
- "--kup-disabled-background-color": "#eaeaea",
3387
- "--kup-disabled-color": "#333333",
3388
- "--kup-hover-background-color": "#f0f0f0",
3389
- "--kup-hover-color": "#000000",
3390
- "--kup-title-background-color": "#f1f3f4",
3391
- "--kup-title-color": "#2e2e2e",
3392
- "--kup-icon-color": "#808080",
3393
- "--kup-border-color": "#ededed",
3394
- "--kup-box-shadow": "rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",
3395
- "--kup-info-color": "#2592df",
3396
- "--kup-success-color": "#4d9f02",
3397
- "--kup-warning-color": "#ffc107",
3398
- "--kup-danger-color": "#A6192E",
3399
- "--kup-spinner-color": "#eaa710",
3400
- "--kup-chart-color-1": "#735DED",
3401
- "--kup-chart-color-2": "#00B2CB",
3402
- "--kup-chart-color-3": "#EDC900",
3403
- "--kup-chart-color-4": "green",
3404
- "--kup-chart-color-5": "yellow",
3405
- "--kup-chart-color-6": "cyan",
3406
- "--kup-chart-color-7": "brown",
3407
- "--kup-chart-color-8": "magenta",
3408
- "--kup-chart-color-9": "grey",
3409
- "--kup-chart-color-10": "indigo",
3410
- "--kup-obj-cursor": "inherit",
3411
- "--kup-drawer-zindex": "90",
3412
- "--kup-navbar-zindex": "90"
3413
- },
3414
- icons: {
3415
- "--kup-ascending-icon": "arrow_drop_up",
3416
- "--kup-descending-icon": "arrow_drop_down",
3417
- "--kup-expanded-icon": "arrow_drop_down",
3418
- "--kup-collapsed-icon": "menu-right",
3419
- "--kup-dropdown-icon": "arrow_drop_down",
3420
- "--kup-clear-icon": "cancel",
3421
- "--kup-filter-remove-icon": "filter-remove",
3422
- "--kup-key-icon": "key-variant",
3423
- "--kup-search-icon": "search"
3424
- }
3425
- };
3426
- const wildlife = {
3427
- cssVariables: {
3428
- "--kup-primary-color": "#0fa918",
3429
- "--kup-secondary-color": "#739f5a",
3430
- "--kup-background-color": "#ffffff",
3431
- "--kup-navbar-background-color": "#095a1f",
3432
- "--kup-navbar-color": "#ffffff",
3433
- "--kup-drawer-background-color": "#dbfbd5",
3434
- "--kup-drawer-color": "#000000",
3435
- "--kup-navbar-height": "64px",
3436
- "--kup-drawer-width": "300px",
3437
- "--kup-font-family": "Abel, sans-serif",
3438
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3439
- "--kup-font-size": "16px",
3440
- "--kup-text-color": "#000000",
3441
- "--kup-text-on-primary-color": "#ffffff",
3442
- "--kup-text-on-secondary-color": "#ffffff",
3443
- "--kup-disabled-background-color": "#eaeaea",
3444
- "--kup-disabled-color": "#5c5c5c",
3445
- "--kup-hover-background-color": "#63ab46",
3446
- "--kup-hover-color": "#ffffff",
3447
- "--kup-title-background-color": "#f1f3f4",
3448
- "--kup-title-color": "#000000",
3449
- "--kup-icon-color": "#333333",
3450
- "--kup-border-color": "#e0e0e0",
3451
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
3452
- "--kup-info-color": "#2592df",
3453
- "--kup-success-color": "#4d9f02",
3454
- "--kup-warning-color": "#ffc107",
3455
- "--kup-danger-color": "#d91e18",
3456
- "--kup-spinner-color": "#44b383",
3457
- "--kup-chart-color-1": "#60c3fc",
3458
- "--kup-chart-color-2": "#e268d8",
3459
- "--kup-chart-color-3": "#e48b47",
3460
- "--kup-chart-color-4": "#81e447",
3461
- "--kup-obj-cursor": "inherit",
3462
- "--kup-drawer-zindex": "90",
3463
- "--kup-navbar-zindex": "90"
3464
- },
3465
- icons: {
3466
- "--kup-ascending-icon": "arrow_drop_up",
3467
- "--kup-descending-icon": "arrow_drop_down",
3468
- "--kup-expanded-icon": "arrow_drop_down",
3469
- "--kup-collapsed-icon": "menu-right",
3470
- "--kup-dropdown-icon": "arrow_drop_down",
3471
- "--kup-clear-icon": "cancel",
3472
- "--kup-filter-remove-icon": "filter-remove",
3473
- "--kup-key-icon": "key-variant",
3474
- "--kup-search-icon": "search"
3475
- },
3476
- imports: [
3477
- "url('https://fonts.googleapis.com/css2?family=Abel&display=swap')"
3478
- ]
3479
- };
3480
- const test = {
3481
- cssVariables: {
3482
- "--kup-primary-color": "#d64325",
3483
- "--kup-secondary-color": "#ffc107",
3484
- "--kup-background-color": "#ffffff",
3485
- "--kup-navbar-background-color": "#f5f5f5",
3486
- "--kup-navbar-color": "pink",
3487
- "--kup-drawer-background-color": "#ffffff",
3488
- "--kup-drawer-color": "purple",
3489
- "--kup-navbar-height": "64px",
3490
- "--kup-drawer-width": "300px",
3491
- "--kup-font-family": "Architects Daughter, cursive",
3492
- "--kup-font-family-monospace": "Roboto Mono, consolas, monospace",
3493
- "--kup-font-size": "14px",
3494
- "--kup-text-color": "#2e2e2e",
3495
- "--kup-text-on-primary-color": "#ffffff",
3496
- "--kup-text-on-secondary-color": "#ffffff",
3497
- "--kup-disabled-background-color": "#eaeaea",
3498
- "--kup-disabled-color": "#5c5c5c",
3499
- "--kup-hover-background-color": "#f0f0f0",
3500
- "--kup-hover-color": "#545454",
3501
- "--kup-title-background-color": "#f1f3f4",
3502
- "--kup-title-color": "#2e2e2e",
3503
- "--kup-icon-color": "#505050",
3504
- "--kup-border-color": "#e0e0e0",
3505
- "--kup-box-shadow": "0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)",
3506
- "--kup-info-color": "#2592df",
3507
- "--kup-success-color": "#4d9f02",
3508
- "--kup-warning-color": "#ffc107",
3509
- "--kup-danger-color": "#d91e18",
3510
- "--kup-spinner-color": "#eaa710",
3511
- "--kup-chart-color-1": "#60c3fc",
3512
- "--kup-chart-color-2": "#e268d8",
3513
- "--kup-chart-color-3": "#e48b47",
3514
- "--kup-chart-color-4": "#81e447",
3515
- "--kup-obj-cursor": "alias",
3516
- "--kup-drawer-zindex": "90",
3517
- "--kup-navbar-zindex": "90"
3518
- },
3519
- customStyles: {
3520
- MASTER: "#kup-component { background-color: red; }",
3521
- "KUP-AUTOCOMPLETE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3522
- "KUP-BADGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3523
- "KUP-BUTTON": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3524
- "KUP-BOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3525
- "KUP-CARD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3526
- "KUP-CHECKBOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3527
- "KUP-CHIP": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3528
- "KUP-COLOR-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3529
- "KUP-COMBOBOX": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3530
- "KUP-DATA-TABLE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3531
- "KUP-DATE-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3532
- "KUP-DRAWER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3533
- "KUP-FIELD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3534
- "KUP-GAUGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3535
- "KUP-GRID": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3536
- "KUP-IMAGE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3537
- "KUP-LAZY": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3538
- "KUP-LIST": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3539
- "KUP-NAV-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3540
- "KUP-PROGRESS-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3541
- "KUP-RADIO": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3542
- "KUP-RATING": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3543
- "KUP-SPINNER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3544
- "KUP-SWITCH": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3545
- "KUP-TAB-BAR": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3546
- "KUP-TEXT-FIELD": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3547
- "KUP-TIME-PICKER": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n",
3548
- "KUP-TREE": "#kup-component {\nborder: 1px solid var(--kup-border-color);\n}\n\n"
3549
- },
3550
- icons: {
3551
- "--kup-ascending-icon": "sort-ascending",
3552
- "--kup-descending-icon": "sort-descending",
3553
- "--kup-expanded-icon": "chevron-down",
3554
- "--kup-collapsed-icon": "chevron_right",
3555
- "--kup-dropdown-icon": "chevron-down",
3556
- "--kup-clear-icon": "cancel",
3557
- "--kup-filter-remove-icon": "broom",
3558
- "--kup-key-icon": "key",
3559
- "--kup-search-icon": "search"
3560
- },
3561
- imports: [
3562
- "url('https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap')"
3563
- ]
3564
- };
3565
- const themes = {
3566
- bubbles: bubbles,
3567
- cobalt: cobalt,
3568
- dark: dark,
3569
- flamingo: flamingo,
3570
- graphite: graphite,
3571
- ketchup: ketchup,
3572
- obsidian: obsidian,
3573
- ocean: ocean,
3574
- print: print,
3575
- raj: raj,
3576
- red: red,
3577
- sapphire: sapphire,
3578
- teal: teal,
3579
- wildlife: wildlife,
3580
- test: test
3581
- };
3582
-
3583
- const kupThemeCss = "#kup-debug-widget{position:fixed;top:0;left:0;z-index:200}[kup-dialog]{background-color:var(--kup-background-color);margin:0;position:fixed;transition:none;max-height:95vh;max-width:95vw}[kup-dialog].kup-resizable{border:3px outset var(--kup-title-background-color)}#kup-scrolling-arrows{position:fixed;top:50%;left:50%;pointer-events:none;z-index:9999}#kup-scrolling-arrows .kup-left-scrolling-arrow,#kup-scrolling-arrows .kup-right-scrolling-arrow{position:absolute;width:0;height:0;visibility:hidden}#kup-scrolling-arrows .kup-left-scrolling-arrow{border-top:8px solid transparent;border-bottom:8px solid transparent;border-right:8px solid var(--kup-primary-color);transform:translate(30px, -10px) translateZ(0)}#kup-scrolling-arrows .kup-right-scrolling-arrow{border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid var(--kup-primary-color);transform:translate(-30px, -10px) translateZ(0)}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated{visibility:visible}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-1{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite;animation-delay:0.4s}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-2{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite;animation-delay:0.2s}#kup-scrolling-arrows .kup-left-scrolling-arrow.kup-activated.kup-animated.kup-arrow-3{-webkit-animation:kup-pulseleft 1.2s infinite;animation:kup-pulseleft 1.2s infinite}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated{visibility:visible}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-1{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite;animation-delay:0.4s}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-2{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite;animation-delay:0.2s}#kup-scrolling-arrows .kup-right-scrolling-arrow.kup-activated.kup-animated.kup-arrow-3{-webkit-animation:kup-pulseright 1.2s infinite;animation:kup-pulseright 1.2s infinite}@-moz-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-webkit-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-o-keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@keyframes kup-pulseleft{0%{opacity:0.2;transform:translate(30px, -10px)}100%{opacity:1;transform:translate(10px, -10px)}}@-moz-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@-webkit-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@-o-keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}@keyframes kup-pulseright{0%{opacity:0.2;transform:translate(-30px, -10px)}100%{opacity:1;transform:translate(-10px, -10px)}}";
3584
-
3585
- /**
3586
- * Variable used to fetch the MASTER customStyle (used in every component).
3587
- */
3588
- const masterCustomStyle = 'MASTER';
3589
- /**
3590
- * List of all colors.
3591
- */
3592
- var KupThemeColorValues;
3593
- (function (KupThemeColorValues) {
3594
- KupThemeColorValues["PRIMARY"] = "--kup-primary-color";
3595
- KupThemeColorValues["SECONDARY"] = "--kup-secondary-color";
3596
- KupThemeColorValues["BACKGROUND"] = "--kup-background-color";
3597
- KupThemeColorValues["NAV_BAR"] = "--kup-navbar-color";
3598
- KupThemeColorValues["NAV_BAR_BACKGROUND"] = "--kup-navbar-background-color";
3599
- KupThemeColorValues["DRAWER_BACKGROUND"] = "--kup-drawer-background-color";
3600
- KupThemeColorValues["TEXT"] = "--kup-text-color";
3601
- KupThemeColorValues["TEXT_ON_PRIMARY"] = "--kup-text-on-primary-color";
3602
- KupThemeColorValues["TEXT_ON_SECONDARY"] = "--kup-text-on-secondary-color";
3603
- KupThemeColorValues["DISABLED_BACKGROUND"] = "--kup-disabled-background-color";
3604
- KupThemeColorValues["DISABLED"] = "--kup-disabled-color";
3605
- KupThemeColorValues["HOVER_BACKGROUND"] = "--kup-hover-background-color";
3606
- KupThemeColorValues["HOVER"] = "--kup-hover-color";
3607
- KupThemeColorValues["TITLE_BACKGROUND"] = "--kup-title-background-color";
3608
- KupThemeColorValues["TITLE"] = "--kup-title-color";
3609
- KupThemeColorValues["ICON"] = "--kup-icon-color";
3610
- KupThemeColorValues["BORDER"] = "--kup-border-color";
3611
- KupThemeColorValues["INFO"] = "--kup-info-color";
3612
- KupThemeColorValues["SUCCESS"] = "--kup-success-color";
3613
- KupThemeColorValues["WARNING"] = "--kup-warning-color";
3614
- KupThemeColorValues["DANGER"] = "--kup-danger-color";
3615
- KupThemeColorValues["SPINNER"] = "--kup-spinner-color";
3616
- KupThemeColorValues["CHART_1"] = "--kup-chart-color-1";
3617
- KupThemeColorValues["CHART_2"] = "--kup-chart-color-2";
3618
- KupThemeColorValues["CHART_3"] = "--kup-chart-color-3";
3619
- KupThemeColorValues["CHART_4"] = "--kup-chart-color-4";
3620
- })(KupThemeColorValues || (KupThemeColorValues = {}));
3621
- /**
3622
- * List of all icons.
3623
- */
3624
- var KupThemeIconValues;
3625
- (function (KupThemeIconValues) {
3626
- KupThemeIconValues["ASCENDING"] = "--kup-ascending-icon";
3627
- KupThemeIconValues["CLEAR"] = "--kup-clear-icon";
3628
- KupThemeIconValues["COLLAPSED"] = "--kup-collapsed-icon";
3629
- KupThemeIconValues["DESCENDING"] = "--kup-descending-icon";
3630
- KupThemeIconValues["DROPDOWN"] = "--kup-dropdown-icon";
3631
- KupThemeIconValues["EXPANDED"] = "--kup-expanded-icon";
3632
- KupThemeIconValues["FILTER_REMOVE"] = "--kup-filter-remove-icon";
3633
- KupThemeIconValues["KEY"] = "--kup-key-icon";
3634
- KupThemeIconValues["SEARCH"] = "--kup-search-icon";
3635
- })(KupThemeIconValues || (KupThemeIconValues = {}));
3636
-
3637
- const dom$2 = document.documentElement;
3638
- /**
3639
- * Theme manager, handles everything about theming, customStyles and color utilities.
3640
- * @module KupTheme
3641
- */
3642
- class KupTheme {
3643
- /**
3644
- * Initializes KupTheme.
3645
- */
3646
- constructor(list, name) {
3647
- this.cssVars = {};
3648
- this.list = list ? list : themes;
3649
- this.managedComponents = new Set();
3650
- this.name = name ? name : 'ketchup';
3651
- this.styleTag = dom$2
3652
- .querySelector('head')
3653
- .appendChild(document.createElement('style'));
3654
- }
3655
- /**
3656
- * Sets the theme using this.name or the function's argument.
3657
- * @param {string} name - When present, this theme will be set.
3658
- */
3659
- set(name, list) {
3660
- if (name) {
3661
- this.name = name;
3662
- }
3663
- if (list) {
3664
- this.list = list;
3665
- }
3666
- dom$2.ketchup.debug.logMessage('theme manager', 'Setting theme to: ' + this.name + '.');
3667
- if (!this.list[this.name]) {
3668
- dom$2.ketchup.debug.logMessage('theme manager', 'Invalid theme name, falling back to default ("ketchup").');
3669
- this.name = 'ketchup';
3670
- }
3671
- this.cssVars = {};
3672
- this.styleTag.innerText =
3673
- this.imports() +
3674
- ' :root[kup-theme="' +
3675
- this.name +
3676
- '"]{' +
3677
- this.cssVariables() +
3678
- this.icons() +
3679
- '}' +
3680
- kupThemeCss;
3681
- this.customStyle();
3682
- document.documentElement.setAttribute('kup-theme', this.name);
3683
- document.dispatchEvent(new CustomEvent('kup-theme-change'));
3684
- }
3685
- /**
3686
- * Gets the name of available themes (filters out themes named "test").
3687
- * @returns {Array<string>} Array of themes' names.
3688
- */
3689
- getThemes() {
3690
- const themes = [];
3691
- for (var key in this.list) {
3692
- if (this.list.hasOwnProperty(key)) {
3693
- if (key !== 'test') {
3694
- themes.push(key);
3695
- }
3696
- }
3697
- }
3698
- return themes;
3699
- }
3700
- /**
3701
- * Sets the CSS variables of the theme.
3702
- */
3703
- imports() {
3704
- const imports = this.list[this.name].imports
3705
- ? this.list[this.name].imports
3706
- : [];
3707
- let css = '';
3708
- for (let index = 0; index < imports.length; index++) {
3709
- css += '@import ' + imports[index] + ';';
3710
- }
3711
- return css;
3712
- }
3713
- /**
3714
- * Sets the CSS variables of the theme.
3715
- */
3716
- cssVariables() {
3717
- const variables = this.list[this.name].cssVariables;
3718
- let css = '';
3719
- for (let key in variables) {
3720
- if (variables.hasOwnProperty(key)) {
3721
- const val = variables[key];
3722
- this.cssVars[key] = val;
3723
- css += key + ': ' + val + ';';
3724
- if (key.indexOf('color') > -1) {
3725
- const computedColor = this.colorCheck(val);
3726
- const rgbKey = key + '-rgb';
3727
- const hKey = key + '-h';
3728
- const sKey = key + '-s';
3729
- const lKey = key + '-l';
3730
- const rgbVal = computedColor.rgbValues;
3731
- const hue = computedColor.hue;
3732
- const saturation = computedColor.saturation;
3733
- const lightness = computedColor.lightness;
3734
- this.cssVars[rgbKey] = rgbVal;
3735
- this.cssVars[hKey] = hue;
3736
- this.cssVars[lKey] = lightness;
3737
- this.cssVars[sKey] = saturation;
3738
- css += rgbKey + ': ' + rgbVal + ';';
3739
- css += hKey + ': ' + hue + ';';
3740
- css += lKey + ': ' + lightness + ';';
3741
- css += sKey + ': ' + saturation + ';';
3742
- }
3743
- }
3744
- }
3745
- return css;
3746
- }
3747
- /**
3748
- * Sets the icon variables of the theme.
3749
- */
3750
- icons() {
3751
- const icons = this.list[this.name].icons;
3752
- let css = '';
3753
- for (var key in icons) {
3754
- if (icons.hasOwnProperty(key)) {
3755
- const val = `url('${getAssetPath(`./assets/svg/${icons[key]}.svg`)}') no-repeat center`;
3756
- this.cssVars[key] = val;
3757
- css += key + ': ' + val + ';';
3758
- }
3759
- }
3760
- return css;
3761
- }
3762
- /**
3763
- * Refreshed managed components to apply theme customStyles.
3764
- */
3765
- customStyle() {
3766
- this.managedComponents.forEach(function (comp) {
3767
- if (comp.isConnected) {
3768
- comp.refresh();
3769
- }
3770
- });
3771
- }
3772
- /**
3773
- * This method will just refresh the current theme.
3774
- */
3775
- refresh() {
3776
- try {
3777
- this.styleTag.innerText =
3778
- ':root[kup-theme="' +
3779
- this.name +
3780
- '"]{' +
3781
- this.cssVariables() +
3782
- this.icons() +
3783
- '}';
3784
- this.customStyle();
3785
- dom$2.ketchup.debug.logMessage('kup-theme', 'Theme ' + dom$2.getAttribute('kup-theme') + ' refreshed.');
3786
- document.dispatchEvent(new CustomEvent('kup-theme-refresh'));
3787
- }
3788
- catch (error) {
3789
- dom$2.ketchup.debug.logMessage('kup-theme', 'Theme not refreshed.', KupDebugCategory.WARNING);
3790
- }
3791
- }
3792
- /**
3793
- * Registers a KupComponent in KupTheme, in order to be properly handled whenever the theme changes.
3794
- * @param {any} comp - The component calling this function.
3795
- */
3796
- register(comp) {
3797
- this.managedComponents.add(comp.rootElement);
3798
- }
3799
- /**
3800
- * Unregisters a KupComponent, so it won't be handled when the theme changes.
3801
- * @param {any} comp - The component calling this function.
3802
- */
3803
- unregister(comp) {
3804
- if (this.managedComponents) {
3805
- this.managedComponents.delete(comp.rootElement);
3806
- }
3807
- }
3808
- /**
3809
- * Combines theme's and component's customStyles, returning the result.
3810
- * @param comp - The component calling this function.
3811
- * @returns {string} Combined customStyle.
3812
- */
3813
- setCustomStyle(comp) {
3814
- const styles = this.list[this.name].customStyles;
3815
- let completeStyle = '';
3816
- if (styles && styles[masterCustomStyle]) {
3817
- completeStyle += styles[masterCustomStyle];
3818
- }
3819
- if (styles && styles[comp.tagName]) {
3820
- completeStyle += ' ' + styles[comp.tagName];
3821
- }
3822
- if (comp.customStyle) {
3823
- completeStyle += ' ' + comp.customStyle;
3824
- }
3825
- return completeStyle ? completeStyle : null;
3826
- }
3827
- /**
3828
- * Checks whether on a given color the text should be white or black.
3829
- * @param {string} color - Color used to check the contrast.
3830
- * @returns {string} "white" or "black".
3831
- */
3832
- colorContrast(color) {
3833
- color = this.colorCheck(color).rgbColor;
3834
- const colorValues = color.replace(/[^\d,.]/g, '').split(',');
3835
- const brightness = Math.round((parseInt(colorValues[0]) * 299 +
3836
- parseInt(colorValues[1]) * 587 +
3837
- parseInt(colorValues[2]) * 114) /
3838
- 1000);
3839
- return brightness > 125 ? 'black' : 'white';
3840
- }
3841
- /**
3842
- * Generates a random HEX color.
3843
- * @param {number} brightness - Brightness of the color generated (0-255).
3844
- * @returns {string} Random HEX color.
3845
- */
3846
- randomColor(brightness) {
3847
- function randomChannel(brightness) {
3848
- var r = 255 - brightness;
3849
- var n = 0 | (Math.random() * r + brightness);
3850
- var s = n.toString(16);
3851
- return s.length == 1 ? '0' + s : s;
3852
- }
3853
- return ('#' +
3854
- randomChannel(brightness) +
3855
- randomChannel(brightness) +
3856
- randomChannel(brightness));
3857
- }
3858
- /**
3859
- * Sets a random theme between those specified in this.list (excludes "print" and "test").
3860
- */
3861
- randomTheme() {
3862
- let themes = [];
3863
- for (var key in this.list) {
3864
- if (this.list.hasOwnProperty(key)) {
3865
- if (key !== 'test' && key !== 'print') {
3866
- themes.push(key);
3867
- }
3868
- }
3869
- }
3870
- if (themes.length > 0) {
3871
- this.set(themes[Math.floor(Math.random() * Math.floor(themes.length))]);
3872
- }
3873
- else {
3874
- dom$2.ketchup.debug.logMessage('kup-theme', "Couldn't set a random theme: no themes available!", KupDebugCategory.WARNING);
3875
- }
3876
- }
3877
- /**
3878
- * Returns HEX, RGB and RGB values from a given color.
3879
- * @param {string} color - Color.
3880
- * @returns {KupThemeColor} Object of color values: hexColor ("#ffffff"), hslColor ("hsl(255,100%,100%)"), hslValues ("255,100%,100%"), rgbColor ("rgb(255,255,255)") and rgbValues ("255,255,255").
3881
- */
3882
- colorCheck(color) {
3883
- //Testing whether the color is transparent, if it is a fall back value will be returned matching the background-color
3884
- if (color === 'transparent') {
3885
- color = this.cssVars['--kup-background-color'];
3886
- dom$2.ketchup.debug.logMessage('theme manager', 'Received TRANSPARENT color, converted to ' +
3887
- color +
3888
- ' (theme background).');
3889
- }
3890
- let isHex = color.substr(0, 1) === '#';
3891
- const isHsl = color.substr(0, 3).toLowerCase() === 'hsl';
3892
- const isRgb = color.substr(0, 3).toLowerCase() === 'rgb';
3893
- //If true, supposedly it's a code word
3894
- if (!isHex && !isHsl && !isRgb) {
3895
- const oldColor = color;
3896
- color = this.codeToHex(color);
3897
- isHex = color.substr(0, 1) === '#' ? true : false;
3898
- dom$2.ketchup.debug.logMessage('theme manager', 'Received CODE NAME color ' +
3899
- oldColor +
3900
- ', converted to ' +
3901
- color +
3902
- '.');
3903
- }
3904
- //Testing whether the color is "hex" value or "hsl"
3905
- let hexColor = null;
3906
- let hslColor = null;
3907
- let hslValues = null;
3908
- let hue = null;
3909
- let lightness = null;
3910
- let saturation = null;
3911
- if (isHex || isHsl) {
3912
- const oldColor = color;
3913
- let rgbColor = null;
3914
- if (isHex) {
3915
- hexColor = color;
3916
- rgbColor = this.hexToRgb(color);
3917
- }
3918
- else {
3919
- hslColor = color;
3920
- const regexp = /hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/g;
3921
- const hsl = regexp.exec(color).slice(1);
3922
- hslValues = hsl[0] + ',' + hsl[1] + ',' + hsl[2];
3923
- hue = hsl[0];
3924
- saturation = hsl[2];
3925
- lightness = hsl[1];
3926
- const h = parseInt(hue.replace('deg', ''));
3927
- const s = parseInt(saturation.replace('%', '')) / 100;
3928
- const l = parseInt(lightness.replace('%', '')) / 100;
3929
- rgbColor = this.hslToRgb(h, s, l);
3930
- }
3931
- try {
3932
- color =
3933
- 'rgb(' +
3934
- rgbColor.r +
3935
- ',' +
3936
- rgbColor.g +
3937
- ',' +
3938
- rgbColor.b +
3939
- ')';
3940
- if (isHex) {
3941
- const hsl = this.rgbToHsl(rgbColor.r, rgbColor.g, rgbColor.b);
3942
- hue = hsl.h.toString();
3943
- saturation = hsl.s.toString() + '%';
3944
- lightness = hsl.l.toString() + '%';
3945
- hslValues = hue + ',' + saturation + ',' + lightness;
3946
- hslColor = 'hsl(' + hslValues + ')';
3947
- }
3948
- else {
3949
- hexColor = this.rgbToHex(rgbColor.r, rgbColor.g, rgbColor.b);
3950
- }
3951
- dom$2.ketchup.debug.logMessage('theme-manager', 'Received HEX color ' +
3952
- oldColor +
3953
- ', converted to ' +
3954
- color +
3955
- '.');
3956
- }
3957
- catch (error) {
3958
- dom$2.ketchup.debug.logMessage('theme-manager', 'Invalid color: ' + color + '.');
3959
- }
3960
- }
3961
- let rgbValues = null;
3962
- const values = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
3963
- try {
3964
- rgbValues = values[1] + ',' + values[2] + ',' + values[3];
3965
- }
3966
- catch (error) {
3967
- dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to rgb values: ' + color + '.');
3968
- }
3969
- if (!hexColor) {
3970
- try {
3971
- hexColor = this.rgbToHex(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
3972
- }
3973
- catch (error) {
3974
- dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
3975
- }
3976
- }
3977
- if (!hslColor || !hslValues) {
3978
- try {
3979
- const hsl = this.rgbToHsl(parseInt(values[1]), parseInt(values[2]), parseInt(values[3]));
3980
- hue = hsl.h.toString();
3981
- saturation = hsl.s.toString() + '%';
3982
- lightness = hsl.l.toString() + '%';
3983
- hslValues = hsl.h + ',' + hsl.s + '%,' + hsl.l + '%';
3984
- hslColor = 'hsl(' + hsl.h + ',' + hsl.s + '%,' + hsl.l + '%)';
3985
- }
3986
- catch (error) {
3987
- dom$2.ketchup.debug.logMessage('theme-manager', 'Color not converted to hex value: ' + color + '.');
3988
- }
3989
- }
3990
- return {
3991
- hexColor: hexColor,
3992
- hslColor: hslColor,
3993
- hslValues: hslValues,
3994
- hue: hue,
3995
- lightness: lightness,
3996
- saturation: saturation,
3997
- rgbColor: color,
3998
- rgbValues: rgbValues,
3999
- };
4000
- }
4001
- /**
4002
- * Converts an HEX color to its RGB values.
4003
- * @param {string} hex - Hex code.
4004
- * @returns {KupThemeRGBValues} Object containing RGB values.
4005
- */
4006
- hexToRgb(hex) {
4007
- var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
4008
- return result
4009
- ? {
4010
- r: parseInt(result[1], 16),
4011
- g: parseInt(result[2], 16),
4012
- b: parseInt(result[3], 16),
4013
- }
4014
- : null;
4015
- }
4016
- /**
4017
- * Converts an HSL color to its RGB values.
4018
- * @param {number} h - Hue (range [0, 360)).
4019
- * @param {number} s - Saturation (range [0, 1)).
4020
- * @param {number} l - Lightness (range [0, 1)).
4021
- * @returns {Array} RGB values.
4022
- */
4023
- hslToRgb(h, s, l) {
4024
- if (h == undefined) {
4025
- return { r: 0, g: 0, b: 0 };
4026
- }
4027
- let huePrime = h / 60;
4028
- const chroma = (1 - Math.abs(2 * l - 1)) * s;
4029
- const secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1));
4030
- huePrime = Math.floor(huePrime);
4031
- let red, green, blue;
4032
- if (huePrime === 0) {
4033
- red = chroma;
4034
- green = secondComponent;
4035
- blue = 0;
4036
- }
4037
- else if (huePrime === 1) {
4038
- red = secondComponent;
4039
- green = chroma;
4040
- blue = 0;
4041
- }
4042
- else if (huePrime === 2) {
4043
- red = 0;
4044
- green = chroma;
4045
- blue = secondComponent;
4046
- }
4047
- else if (huePrime === 3) {
4048
- red = 0;
4049
- green = secondComponent;
4050
- blue = chroma;
4051
- }
4052
- else if (huePrime === 4) {
4053
- red = secondComponent;
4054
- green = 0;
4055
- blue = chroma;
4056
- }
4057
- else if (huePrime === 5) {
4058
- red = chroma;
4059
- green = 0;
4060
- blue = secondComponent;
4061
- }
4062
- const lightnessAdjustment = l - chroma / 2;
4063
- red += lightnessAdjustment;
4064
- green += lightnessAdjustment;
4065
- blue += lightnessAdjustment;
4066
- return {
4067
- r: Math.round(red * 255),
4068
- g: Math.round(green * 255),
4069
- b: Math.round(blue * 255),
4070
- };
4071
- }
4072
- /**
4073
- * Converts a color in RGB format to the corresponding HEX color.
4074
- * @param {number} r - Red channel value.
4075
- * @param {number} g - Green channel value.
4076
- * @param {number} b - Blue channel value.
4077
- * @returns {string} HEX color.
4078
- */
4079
- rgbToHex(r, g, b) {
4080
- return ('#' + this.valueToHex(r) + this.valueToHex(g) + this.valueToHex(b));
4081
- }
4082
- /**
4083
- * Converts a color in RGB format to the corresponding HSL color.
4084
- * @param {number} r - Red channel value.
4085
- * @param {number} g - Green channel value.
4086
- * @param {number} b - Blue channel value.
4087
- * @returns {KupThemeHSLValues} Object containing HSL values.
4088
- */
4089
- rgbToHsl(r, g, b) {
4090
- // Make r, g, and b fractions of 1
4091
- r /= 255;
4092
- g /= 255;
4093
- b /= 255;
4094
- // Find greatest and smallest channel values
4095
- const cmin = Math.min(r, g, b), cmax = Math.max(r, g, b), delta = cmax - cmin;
4096
- let h = 0, s = 0, l = 0;
4097
- // Calculate hue
4098
- // No difference
4099
- if (delta == 0)
4100
- h = 0;
4101
- // Red is max
4102
- else if (cmax == r)
4103
- h = ((g - b) / delta) % 6;
4104
- // Green is max
4105
- else if (cmax == g)
4106
- h = (b - r) / delta + 2;
4107
- // Blue is max
4108
- else
4109
- h = (r - g) / delta + 4;
4110
- h = Math.round(h * 60);
4111
- // Make negative hues positive behind 360°
4112
- if (h < 0)
4113
- h += 360;
4114
- // Calculate lightness
4115
- l = (cmax + cmin) / 2;
4116
- // Calculate saturation
4117
- s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
4118
- // Multiply l and s by 100
4119
- s = +(s * 100).toFixed(1);
4120
- l = +(l * 100).toFixed(1);
4121
- return { h: h, s: s, l: l };
4122
- }
4123
- /**
4124
- * Converts a single RGB value to the corresponding HEX value.
4125
- * @param {number} c - Color value.
4126
- * @returns {string} HEX value.
4127
- */
4128
- valueToHex(c) {
4129
- const hex = c.toString(16);
4130
- return hex.length == 1 ? '0' + hex : hex;
4131
- }
4132
- /**
4133
- * Converts a color code word to the corresponding HEX value.
4134
- * @param {string} color - Color code word.
4135
- * @returns {string} HEX value.
4136
- */
4137
- codeToHex(color) {
4138
- const colorCodes = {
4139
- aliceblue: '#f0f8ff',
4140
- antiquewhite: '#faebd7',
4141
- aqua: '#00ffff',
4142
- aquamarine: '#7fffd4',
4143
- azure: '#f0ffff',
4144
- beige: '#f5f5dc',
4145
- bisque: '#ffe4c4',
4146
- black: '#000000',
4147
- blanchedalmond: '#ffebcd',
4148
- blue: '#0000ff',
4149
- blueviolet: '#8a2be2',
4150
- brown: '#a52a2a',
4151
- burlywood: '#deb887',
4152
- cadetblue: '#5f9ea0',
4153
- chartreuse: '#7fff00',
4154
- chocolate: '#d2691e',
4155
- coral: '#ff7f50',
4156
- cornflowerblue: '#6495ed',
4157
- cornsilk: '#fff8dc',
4158
- crimson: '#dc143c',
4159
- cyan: '#00ffff',
4160
- darkblue: '#00008b',
4161
- darkcyan: '#008b8b',
4162
- darkgoldenrod: '#b8860b',
4163
- darkgray: '#a9a9a9',
4164
- darkgreen: '#006400',
4165
- darkgrey: '#a9a9a9',
4166
- darkkhaki: '#bdb76b',
4167
- darkmagenta: '#8b008b',
4168
- darkolivegreen: '#556b2f',
4169
- darkorange: '#ff8c00',
4170
- darkorchid: '#9932cc',
4171
- darkred: '#8b0000',
4172
- darksalmon: '#e9967a',
4173
- darkseagreen: '#8fbc8f',
4174
- darkslateblue: '#483d8b',
4175
- darkslategray: '#2f4f4f',
4176
- darkslategrey: '#2f4f4f',
4177
- darkturquoise: '#00ced1',
4178
- darkviolet: '#9400d3',
4179
- deeppink: '#ff1493',
4180
- deepskyblue: '#00bfff',
4181
- dimgray: '#696969',
4182
- dimgrey: '#696969',
4183
- dodgerblue: '#1e90ff',
4184
- firebrick: '#b22222',
4185
- floralwhite: '#fffaf0',
4186
- forestgreen: '#228b22',
4187
- fuchsia: '#ff00ff',
4188
- gainsboro: '#dcdcdc',
4189
- ghostwhite: '#f8f8ff',
4190
- goldenrod: '#daa520',
4191
- gold: '#ffd700',
4192
- gray: '#808080',
4193
- green: '#008000',
4194
- greenyellow: '#adff2f',
4195
- grey: '#808080',
4196
- honeydew: '#f0fff0',
4197
- hotpink: '#ff69b4',
4198
- indianred: '#cd5c5c',
4199
- indigo: '#4b0082',
4200
- ivory: '#fffff0',
4201
- khaki: '#f0e68c',
4202
- lavenderblush: '#fff0f5',
4203
- lavender: '#e6e6fa',
4204
- lawngreen: '#7cfc00',
4205
- lemonchiffon: '#fffacd',
4206
- lightblue: '#add8e6',
4207
- lightcoral: '#f08080',
4208
- lightcyan: '#e0ffff',
4209
- lightgoldenrodyellow: '#fafad2',
4210
- lightgray: '#d3d3d3',
4211
- lightgreen: '#90ee90',
4212
- lightgrey: '#d3d3d3',
4213
- lightpink: '#ffb6c1',
4214
- lightsalmon: '#ffa07a',
4215
- lightseagreen: '#20b2aa',
4216
- lightskyblue: '#87cefa',
4217
- lightslategray: '#778899',
4218
- lightslategrey: '#778899',
4219
- lightsteelblue: '#b0c4de',
4220
- lightyellow: '#ffffe0',
4221
- lime: '#00ff00',
4222
- limegreen: '#32cd32',
4223
- linen: '#faf0e6',
4224
- magenta: '#ff00ff',
4225
- maroon: '#800000',
4226
- mediumaquamarine: '#66cdaa',
4227
- mediumblue: '#0000cd',
4228
- mediumorchid: '#ba55d3',
4229
- mediumpurple: '#9370db',
4230
- mediumseagreen: '#3cb371',
4231
- mediumslateblue: '#7b68ee',
4232
- mediumspringgreen: '#00fa9a',
4233
- mediumturquoise: '#48d1cc',
4234
- mediumvioletred: '#c71585',
4235
- midnightblue: '#191970',
4236
- mintcream: '#f5fffa',
4237
- mistyrose: '#ffe4e1',
4238
- moccasin: '#ffe4b5',
4239
- navajowhite: '#ffdead',
4240
- navy: '#000080',
4241
- oldlace: '#fdf5e6',
4242
- olive: '#808000',
4243
- olivedrab: '#6b8e23',
4244
- orange: '#ffa500',
4245
- orangered: '#ff4500',
4246
- orchid: '#da70d6',
4247
- palegoldenrod: '#eee8aa',
4248
- palegreen: '#98fb98',
4249
- paleturquoise: '#afeeee',
4250
- palevioletred: '#db7093',
4251
- papayawhip: '#ffefd5',
4252
- peachpuff: '#ffdab9',
4253
- peru: '#cd853f',
4254
- pink: '#ffc0cb',
4255
- plum: '#dda0dd',
4256
- powderblue: '#b0e0e6',
4257
- purple: '#800080',
4258
- rebeccapurple: '#663399',
4259
- red: '#ff0000',
4260
- rosybrown: '#bc8f8f',
4261
- royalblue: '#4169e1',
4262
- saddlebrown: '#8b4513',
4263
- salmon: '#fa8072',
4264
- sandybrown: '#f4a460',
4265
- seagreen: '#2e8b57',
4266
- seashell: '#fff5ee',
4267
- sienna: '#a0522d',
4268
- silver: '#c0c0c0',
4269
- skyblue: '#87ceeb',
4270
- slateblue: '#6a5acd',
4271
- slategray: '#708090',
4272
- slategrey: '#708090',
4273
- snow: '#fffafa',
4274
- springgreen: '#00ff7f',
4275
- steelblue: '#4682b4',
4276
- tan: '#d2b48c',
4277
- teal: '#008080',
4278
- thistle: '#d8bfd8',
4279
- tomato: '#ff6347',
4280
- turquoise: '#40e0d0',
4281
- violet: '#ee82ee',
4282
- wheat: '#f5deb3',
4283
- white: '#ffffff',
4284
- whitesmoke: '#f5f5f5',
4285
- yellow: '#ffff00',
4286
- yellowgreen: '#9acd32',
4287
- };
4288
- if (colorCodes[color.toLowerCase()]) {
4289
- return colorCodes[color.toLowerCase()];
4290
- }
4291
- else {
4292
- dom$2.ketchup.debug.logMessage('theme manager', 'Could not decode color ' + color + '!');
4293
- return color;
4294
- }
4295
- }
4296
- }
4297
-
4298
- /**
4299
- * Modifiers to listen to in Keyboard Event in order to trigger the toolbars.
4300
- */
4301
- var KupToolbarModifierKeys;
4302
- (function (KupToolbarModifierKeys) {
4303
- KupToolbarModifierKeys["ALT"] = "altKey";
4304
- KupToolbarModifierKeys["CTRL"] = "ctrlKey";
4305
- KupToolbarModifierKeys["SHIFT"] = "shiftKey";
4306
- })(KupToolbarModifierKeys || (KupToolbarModifierKeys = {}));
4307
-
4308
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
4309
- if (!privateMap.has(receiver)) {
4310
- throw new TypeError("attempted to set private field on non-instance");
4311
- }
4312
- privateMap.set(receiver, value);
4313
- return value;
4314
- };
4315
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
4316
- if (!privateMap.has(receiver)) {
4317
- throw new TypeError("attempted to get private field on non-instance");
4318
- }
4319
- return privateMap.get(receiver);
4320
- };
4321
- var _keyEvent;
4322
- const dom$1 = document.documentElement;
4323
- /**
4324
- * Handles component's toolbar.
4325
- * @module KupToolbar
4326
- */
4327
- class KupToolbar {
4328
- /**
4329
- * Initializes KupToolbar.
4330
- */
4331
- constructor() {
4332
- _keyEvent.set(this, void 0);
4333
- this.active = false;
4334
- this.managedElements = new Set();
4335
- this.modifiers = [
4336
- KupToolbarModifierKeys.ALT,
4337
- KupToolbarModifierKeys.CTRL,
4338
- ];
4339
- __classPrivateFieldSet(this, _keyEvent, function (e) {
4340
- const toolbar = dom$1.ketchup.toolbar;
4341
- if (toolbar.managedElements) {
4342
- for (let index = 0; index < toolbar.modifiers.length; index++) {
4343
- if (toolbar.modifiers[index] ===
4344
- KupToolbarModifierKeys.CTRL &&
4345
- e.metaKey) {
4346
- continue;
4347
- }
4348
- else {
4349
- if (!e[toolbar.modifiers[index]]) {
4350
- {
4351
- if (toolbar.active) {
4352
- toolbar.hide();
4353
- }
4354
- return;
4355
- }
4356
- }
4357
- }
4358
- }
4359
- toolbar.show();
4360
- }
4361
- });
4362
- document.addEventListener('keydown', __classPrivateFieldGet(this, _keyEvent));
4363
- document.addEventListener('keyup', __classPrivateFieldGet(this, _keyEvent));
4364
- }
4365
- /**
4366
- * Shows components' toolbar.
4367
- */
4368
- show() {
4369
- this.managedElements.forEach(function (comp) {
4370
- if (comp.isConnected) {
4371
- comp.setAttribute('kup-toolbar', '');
4372
- }
4373
- });
4374
- this.active = true;
4375
- }
4376
- /**
4377
- * Hides components' toolbar.
4378
- */
4379
- hide() {
4380
- this.managedElements.forEach(function (comp) {
4381
- if (comp.isConnected) {
4382
- comp.removeAttribute('kup-toolbar');
4383
- }
4384
- });
4385
- this.active = false;
4386
- }
4387
- /**
4388
- * Watches the element eligible to move when dragging.
4389
- * @param {HTMLElement} el - Toolbar-supporting element.
4390
- */
4391
- register(el) {
4392
- this.managedElements.add(el);
4393
- }
4394
- /**
4395
- * Removes the elements from the KupToolbar class watchlist.
4396
- * @param {HTMLElement[]} elements - Elements to remove.
4397
- */
4398
- unregister(elements) {
4399
- if (this.managedElements) {
4400
- for (let index = 0; index < elements.length; index++) {
4401
- this.managedElements.delete(elements[index]);
4402
- }
4403
- }
4404
- }
4405
- /**
4406
- * Returns whether an element was previously registered or not.
4407
- * @param {HTMLElement} el - Element to test.
4408
- * @returns {boolean} True if the element was registered.
4409
- */
4410
- isRegistered(el) {
4411
- return !this.managedElements ? false : this.managedElements.has(el);
4412
- }
4413
- }
4414
- _keyEvent = new WeakMap();
4415
-
4416
- var ContentRect_1 = createCommonjsModule(function (module, exports) {
4417
- Object.defineProperty(exports, "__esModule", { value: true });
4418
- var ContentRect = function (target) {
4419
- if ('getBBox' in target) {
4420
- var box = target.getBBox();
4421
- return Object.freeze({
4422
- height: box.height,
4423
- left: 0,
4424
- top: 0,
4425
- width: box.width,
4426
- });
4427
- }
4428
- else { // if (target instanceof HTMLElement) { // also includes all other non-SVGGraphicsElements
4429
- var styles = window.getComputedStyle(target);
4430
- return Object.freeze({
4431
- height: parseFloat(styles.height || '0'),
4432
- left: parseFloat(styles.paddingLeft || '0'),
4433
- top: parseFloat(styles.paddingTop || '0'),
4434
- width: parseFloat(styles.width || '0'),
4435
- });
4436
- }
4437
- };
4438
- exports.ContentRect = ContentRect;
4439
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29udGVudFJlY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQ29udGVudFJlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFPQSxJQUFNLFdBQVcsR0FBRyxVQUFDLE1BQWU7SUFDaEMsSUFBSSxTQUFTLElBQUssTUFBNkIsRUFBRTtRQUM3QyxJQUFNLEdBQUcsR0FBSSxNQUE2QixDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3JELE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQztZQUNqQixNQUFNLEVBQUUsR0FBRyxDQUFDLE1BQU07WUFDbEIsSUFBSSxFQUFFLENBQUM7WUFDUCxHQUFHLEVBQUUsQ0FBQztZQUNOLEtBQUssRUFBRSxHQUFHLENBQUMsS0FBSztTQUNuQixDQUFDLENBQUM7S0FDTjtTQUFNLEVBQUUsMEZBQTBGO1FBQy9GLElBQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUMvQyxPQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUM7WUFDakIsTUFBTSxFQUFFLFVBQVUsQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFJLEdBQUcsQ0FBQztZQUN4QyxJQUFJLEVBQUUsVUFBVSxDQUFDLE1BQU0sQ0FBQyxXQUFXLElBQUksR0FBRyxDQUFDO1lBQzNDLEdBQUcsRUFBRSxVQUFVLENBQUMsTUFBTSxDQUFDLFVBQVUsSUFBSSxHQUFHLENBQUM7WUFDekMsS0FBSyxFQUFFLFVBQVUsQ0FBQyxNQUFNLENBQUMsS0FBSyxJQUFJLEdBQUcsQ0FBQztTQUN6QyxDQUFDLENBQUM7S0FDTjtBQUNMLENBQUMsQ0FBQztBQUVPLGtDQUFXIn0=
4440
- });
4441
-
4442
- var ResizeObservation_1 = createCommonjsModule(function (module, exports) {
4443
- Object.defineProperty(exports, "__esModule", { value: true });
4444
-
4445
- var ResizeObservation = /** @class */ (function () {
4446
- function ResizeObservation(target) {
4447
- this.target = target;
4448
- this.$$broadcastWidth = this.$$broadcastHeight = 0;
4449
- }
4450
- Object.defineProperty(ResizeObservation.prototype, "broadcastWidth", {
4451
- get: function () {
4452
- return this.$$broadcastWidth;
4453
- },
4454
- enumerable: true,
4455
- configurable: true
4456
- });
4457
- Object.defineProperty(ResizeObservation.prototype, "broadcastHeight", {
4458
- get: function () {
4459
- return this.$$broadcastHeight;
4460
- },
4461
- enumerable: true,
4462
- configurable: true
4463
- });
4464
- ResizeObservation.prototype.isActive = function () {
4465
- var cr = ContentRect_1.ContentRect(this.target);
4466
- return !!cr
4467
- && (cr.width !== this.broadcastWidth
4468
- || cr.height !== this.broadcastHeight);
4469
- };
4470
- return ResizeObservation;
4471
- }());
4472
- exports.ResizeObservation = ResizeObservation;
4473
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUmVzaXplT2JzZXJ2YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2Q0FBNEM7QUFFNUM7SUFlSSwyQkFBWSxNQUFlO1FBQ3ZCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUksQ0FBQyxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsaUJBQWlCLEdBQUcsQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFWRCxzQkFBVyw2Q0FBYzthQUF6QjtZQUNJLE9BQU8sSUFBSSxDQUFDLGdCQUFnQixDQUFDO1FBQ2pDLENBQUM7OztPQUFBO0lBQ0Qsc0JBQVcsOENBQWU7YUFBMUI7WUFDSSxPQUFPLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztRQUNsQyxDQUFDOzs7T0FBQTtJQU9NLG9DQUFRLEdBQWY7UUFDSSxJQUFNLEVBQUUsR0FBRyx5QkFBVyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUVwQyxPQUFPLENBQUMsQ0FBQyxFQUFFO2VBQ0osQ0FDQyxFQUFFLENBQUMsS0FBSyxLQUFLLElBQUksQ0FBQyxjQUFjO21CQUM3QixFQUFFLENBQUMsTUFBTSxLQUFLLElBQUksQ0FBQyxlQUFlLENBQ3hDLENBQUM7SUFDVixDQUFDO0lBQ0wsd0JBQUM7QUFBRCxDQUFDLEFBN0JELElBNkJDO0FBRVEsOENBQWlCIn0=
4474
- });
4475
-
4476
- var ResizeObserverEntry_1 = createCommonjsModule(function (module, exports) {
4477
- Object.defineProperty(exports, "__esModule", { value: true });
4478
-
4479
- var ResizeObserverEntry = /** @class */ (function () {
4480
- function ResizeObserverEntry(target) {
4481
- this.target = target;
4482
- this.contentRect = ContentRect_1.ContentRect(target);
4483
- }
4484
- return ResizeObserverEntry;
4485
- }());
4486
- exports.ResizeObserverEntry = ResizeObserverEntry;
4487
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2ZXJFbnRyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9SZXNpemVPYnNlcnZlckVudHJ5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNkNBQTRDO0FBRTVDO0lBR0ksNkJBQVksTUFBZTtRQUN2QixJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztRQUNyQixJQUFJLENBQUMsV0FBVyxHQUFHLHlCQUFXLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDM0MsQ0FBQztJQUNMLDBCQUFDO0FBQUQsQ0FBQyxBQVBELElBT0M7QUFFUSxrREFBbUIifQ==
4488
- });
4489
-
4490
- var ResizeObserver_1 = createCommonjsModule(function (module, exports) {
4491
- Object.defineProperty(exports, "__esModule", { value: true });
4492
-
4493
-
4494
- var resizeObservers = [];
4495
- var ResizeObserver = /** @class */ (function () {
4496
- function ResizeObserver(callback) {
4497
- /** @internal */
4498
- this.$$observationTargets = [];
4499
- /** @internal */
4500
- this.$$activeTargets = [];
4501
- /** @internal */
4502
- this.$$skippedTargets = [];
4503
- var message = callbackGuard(callback);
4504
- if (message) {
4505
- throw TypeError(message);
4506
- }
4507
- this.$$callback = callback;
4508
- }
4509
- ResizeObserver.prototype.observe = function (target) {
4510
- var message = targetGuard('observe', target);
4511
- if (message) {
4512
- throw TypeError(message);
4513
- }
4514
- var index = findTargetIndex(this.$$observationTargets, target);
4515
- if (index >= 0) {
4516
- return;
4517
- }
4518
- this.$$observationTargets.push(new ResizeObservation_1.ResizeObservation(target));
4519
- registerResizeObserver(this);
4520
- };
4521
- ResizeObserver.prototype.unobserve = function (target) {
4522
- var message = targetGuard('unobserve', target);
4523
- if (message) {
4524
- throw TypeError(message);
4525
- }
4526
- var index = findTargetIndex(this.$$observationTargets, target);
4527
- if (index < 0) {
4528
- return;
4529
- }
4530
- this.$$observationTargets.splice(index, 1);
4531
- if (this.$$observationTargets.length === 0) {
4532
- deregisterResizeObserver(this);
4533
- }
4534
- };
4535
- ResizeObserver.prototype.disconnect = function () {
4536
- this.$$observationTargets = [];
4537
- this.$$activeTargets = [];
4538
- deregisterResizeObserver(this);
4539
- };
4540
- return ResizeObserver;
4541
- }());
4542
- exports.ResizeObserver = ResizeObserver;
4543
- function registerResizeObserver(resizeObserver) {
4544
- var index = resizeObservers.indexOf(resizeObserver);
4545
- if (index < 0) {
4546
- resizeObservers.push(resizeObserver);
4547
- startLoop();
4548
- }
4549
- }
4550
- function deregisterResizeObserver(resizeObserver) {
4551
- var index = resizeObservers.indexOf(resizeObserver);
4552
- if (index >= 0) {
4553
- resizeObservers.splice(index, 1);
4554
- checkStopLoop();
4555
- }
4556
- }
4557
- function callbackGuard(callback) {
4558
- if (typeof (callback) === 'undefined') {
4559
- return "Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";
4560
- }
4561
- if (typeof (callback) !== 'function') {
4562
- return "Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.";
4563
- }
4564
- }
4565
- function targetGuard(functionName, target) {
4566
- if (typeof (target) === 'undefined') {
4567
- return "Failed to execute '" + functionName + "' on 'ResizeObserver': 1 argument required, but only 0 present.";
4568
- }
4569
- if (!(target instanceof window.Element)) {
4570
- return "Failed to execute '" + functionName + "' on 'ResizeObserver': parameter 1 is not of type 'Element'.";
4571
- }
4572
- }
4573
- function findTargetIndex(collection, target) {
4574
- for (var index = 0; index < collection.length; index += 1) {
4575
- if (collection[index].target === target) {
4576
- return index;
4577
- }
4578
- }
4579
- return -1;
4580
- }
4581
- var gatherActiveObservationsAtDepth = function (depth) {
4582
- resizeObservers.forEach(function (ro) {
4583
- ro.$$activeTargets = [];
4584
- ro.$$skippedTargets = [];
4585
- ro.$$observationTargets.forEach(function (ot) {
4586
- if (ot.isActive()) {
4587
- var targetDepth = calculateDepthForNode(ot.target);
4588
- if (targetDepth > depth) {
4589
- ro.$$activeTargets.push(ot);
4590
- }
4591
- else {
4592
- ro.$$skippedTargets.push(ot);
4593
- }
4594
- }
4595
- });
4596
- });
4597
- };
4598
- var hasActiveObservations = function () {
4599
- return resizeObservers.some(function (ro) { return !!ro.$$activeTargets.length; });
4600
- };
4601
- var hasSkippedObservations = function () {
4602
- return resizeObservers.some(function (ro) { return !!ro.$$skippedTargets.length; });
4603
- };
4604
- var broadcastActiveObservations = function () {
4605
- var shallowestTargetDepth = Infinity;
4606
- resizeObservers.forEach(function (ro) {
4607
- if (!ro.$$activeTargets.length) {
4608
- return;
4609
- }
4610
- var entries = [];
4611
- ro.$$activeTargets.forEach(function (obs) {
4612
- var entry = new ResizeObserverEntry_1.ResizeObserverEntry(obs.target);
4613
- entries.push(entry);
4614
- obs.$$broadcastWidth = entry.contentRect.width;
4615
- obs.$$broadcastHeight = entry.contentRect.height;
4616
- var targetDepth = calculateDepthForNode(obs.target);
4617
- if (targetDepth < shallowestTargetDepth) {
4618
- shallowestTargetDepth = targetDepth;
4619
- }
4620
- });
4621
- ro.$$callback(entries, ro);
4622
- ro.$$activeTargets = [];
4623
- });
4624
- return shallowestTargetDepth;
4625
- };
4626
- var deliverResizeLoopErrorNotification = function () {
4627
- var errorEvent = new window.ErrorEvent('ResizeLoopError', {
4628
- message: 'ResizeObserver loop completed with undelivered notifications.',
4629
- });
4630
- window.dispatchEvent(errorEvent);
4631
- };
4632
- var calculateDepthForNode = function (target) {
4633
- var depth = 0;
4634
- while (target.parentNode) {
4635
- target = target.parentNode;
4636
- depth += 1;
4637
- }
4638
- return depth;
4639
- };
4640
- var notificationIteration = function () {
4641
- var depth = 0;
4642
- gatherActiveObservationsAtDepth(depth);
4643
- while (hasActiveObservations()) {
4644
- depth = broadcastActiveObservations();
4645
- gatherActiveObservationsAtDepth(depth);
4646
- }
4647
- if (hasSkippedObservations()) {
4648
- deliverResizeLoopErrorNotification();
4649
- }
4650
- };
4651
- var animationFrameCancelToken;
4652
- var startLoop = function () {
4653
- if (animationFrameCancelToken)
4654
- return;
4655
- runLoop();
4656
- };
4657
- var runLoop = function () {
4658
- animationFrameCancelToken = window.requestAnimationFrame(function () {
4659
- notificationIteration();
4660
- runLoop();
4661
- });
4662
- };
4663
- var checkStopLoop = function () {
4664
- if (animationFrameCancelToken && !resizeObservers.some(function (ro) { return !!ro.$$observationTargets.length; })) {
4665
- window.cancelAnimationFrame(animationFrameCancelToken);
4666
- animationFrameCancelToken = undefined;
4667
- }
4668
- };
4669
- var install = function () {
4670
- return window.ResizeObserver = ResizeObserver;
4671
- };
4672
- exports.install = install;
4673
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzaXplT2JzZXJ2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUmVzaXplT2JzZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5REFBd0Q7QUFFeEQsNkRBQTREO0FBRTVELElBQU0sZUFBZSxHQUFHLEVBQXNCLENBQUM7QUFFL0M7SUFVSSx3QkFBWSxRQUFnQztRQVA1QyxnQkFBZ0I7UUFDVCx5QkFBb0IsR0FBRyxFQUF5QixDQUFDO1FBQ3hELGdCQUFnQjtRQUNULG9CQUFlLEdBQUcsRUFBeUIsQ0FBQztRQUNuRCxnQkFBZ0I7UUFDVCxxQkFBZ0IsR0FBRyxFQUF5QixDQUFDO1FBR2hELElBQU0sT0FBTyxHQUFHLGFBQWEsQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUN4QyxJQUFJLE9BQU8sRUFBRTtZQUNULE1BQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBSSxDQUFDLFVBQVUsR0FBRyxRQUFRLENBQUM7SUFDL0IsQ0FBQztJQUVNLGdDQUFPLEdBQWQsVUFBZSxNQUFlO1FBQzFCLElBQU0sT0FBTyxHQUFHLFdBQVcsQ0FBQyxTQUFTLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDL0MsSUFBSSxPQUFPLEVBQUU7WUFDVCxNQUFNLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQztTQUM1QjtRQUNELElBQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxJQUFJLENBQUMsb0JBQW9CLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDakUsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1lBQ1osT0FBTztTQUNWO1FBQ0QsSUFBSSxDQUFDLG9CQUFvQixDQUFDLElBQUksQ0FBQyxJQUFJLHFDQUFpQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7UUFDOUQsc0JBQXNCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUVNLGtDQUFTLEdBQWhCLFVBQWlCLE1BQWU7UUFDNUIsSUFBTSxPQUFPLEdBQUcsV0FBVyxDQUFDLFdBQVcsRUFBRSxNQUFNLENBQUMsQ0FBQztRQUNqRCxJQUFJLE9BQU8sRUFBRTtZQUNULE1BQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBTSxLQUFLLEdBQUcsZUFBZSxDQUFDLElBQUksQ0FBQyxvQkFBb0IsRUFBRSxNQUFNLENBQUMsQ0FBQztRQUNqRSxJQUFJLEtBQUssR0FBRyxDQUFDLEVBQUU7WUFDWCxPQUFPO1NBQ1Y7UUFDRCxJQUFJLENBQUMsb0JBQW9CLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztRQUMzQyxJQUFJLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1lBQ3hDLHdCQUF3QixDQUFDLElBQUksQ0FBQyxDQUFDO1NBQ2xDO0lBQ0wsQ0FBQztJQUVNLG1DQUFVLEdBQWpCO1FBQ0ksSUFBSSxDQUFDLG9CQUFvQixHQUFHLEVBQUUsQ0FBQztRQUMvQixJQUFJLENBQUMsZUFBZSxHQUFHLEVBQUUsQ0FBQztRQUMxQix3QkFBd0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuQyxDQUFDO0lBQ0wscUJBQUM7QUFBRCxDQUFDLEFBbkRELElBbURDO0FBdUpHLHdDQUFjO0FBckpsQixTQUFTLHNCQUFzQixDQUFDLGNBQThCO0lBQzFELElBQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDdEQsSUFBSSxLQUFLLEdBQUcsQ0FBQyxFQUFFO1FBQ1gsZUFBZSxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUNyQyxTQUFTLEVBQUUsQ0FBQztLQUNmO0FBQ0wsQ0FBQztBQUVELFNBQVMsd0JBQXdCLENBQUMsY0FBOEI7SUFDNUQsSUFBTSxLQUFLLEdBQUcsZUFBZSxDQUFDLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUN0RCxJQUFJLEtBQUssSUFBSSxDQUFDLEVBQUU7UUFDWixlQUFlLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztRQUNqQyxhQUFhLEVBQUUsQ0FBQztLQUNuQjtBQUNMLENBQUM7QUFFRCxTQUFTLGFBQWEsQ0FBQyxRQUFnQztJQUNuRCxJQUFJLE9BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxXQUFXLEVBQUU7UUFDbEMsT0FBTyxnRkFBZ0YsQ0FBQztLQUMzRjtJQUNELElBQUksT0FBTSxDQUFDLFFBQVEsQ0FBQyxLQUFLLFVBQVUsRUFBRTtRQUNqQyxPQUFPLCtGQUErRixDQUFDO0tBQzFHO0FBQ0wsQ0FBQztBQUVELFNBQVMsV0FBVyxDQUFDLFlBQW9CLEVBQUUsTUFBZTtJQUN0RCxJQUFJLE9BQU0sQ0FBQyxNQUFNLENBQUMsS0FBSyxXQUFXLEVBQUU7UUFDaEMsT0FBTyx3QkFBc0IsWUFBWSxvRUFBaUUsQ0FBQztLQUM5RztJQUNELElBQUksQ0FBQyxDQUFDLE1BQU0sWUFBYSxNQUFjLENBQUMsT0FBTyxDQUFDLEVBQUU7UUFDOUMsT0FBTyx3QkFBc0IsWUFBWSxpRUFBOEQsQ0FBQztLQUMzRztBQUNMLENBQUM7QUFFRCxTQUFTLGVBQWUsQ0FBQyxVQUErQixFQUFFLE1BQWU7SUFDckUsS0FBSyxJQUFJLEtBQUssR0FBRyxDQUFDLEVBQUUsS0FBSyxHQUFHLFVBQVUsQ0FBQyxNQUFNLEVBQUUsS0FBSyxJQUFJLENBQUMsRUFBRTtRQUN2RCxJQUFJLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQyxNQUFNLEtBQUssTUFBTSxFQUFFO1lBQ3JDLE9BQU8sS0FBSyxDQUFDO1NBQ2hCO0tBQ0o7SUFDRCxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQ2QsQ0FBQztBQUVELElBQU0sK0JBQStCLEdBQUcsVUFBQyxLQUFhO0lBQ2xELGVBQWUsQ0FBQyxPQUFPLENBQUMsVUFBQyxFQUFFO1FBQ3ZCLEVBQUUsQ0FBQyxlQUFlLEdBQUcsRUFBRSxDQUFDO1FBQ3hCLEVBQUUsQ0FBQyxnQkFBZ0IsR0FBRyxFQUFFLENBQUM7UUFDekIsRUFBRSxDQUFDLG9CQUFvQixDQUFDLE9BQU8sQ0FBQyxVQUFDLEVBQUU7WUFDL0IsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFLEVBQUU7Z0JBQ2YsSUFBTSxXQUFXLEdBQUcscUJBQXFCLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxDQUFDO2dCQUNyRCxJQUFJLFdBQVcsR0FBRyxLQUFLLEVBQUU7b0JBQ3JCLEVBQUUsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO2lCQUMvQjtxQkFBTTtvQkFDSCxFQUFFLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO2lCQUNoQzthQUNKO1FBQ0wsQ0FBQyxDQUFDLENBQUM7SUFDUCxDQUFDLENBQUMsQ0FBQztBQUNQLENBQUMsQ0FBQztBQUVGLElBQU0scUJBQXFCLEdBQUc7SUFDMUIsT0FBQSxlQUFlLENBQUMsSUFBSSxDQUFDLFVBQUMsRUFBRSxJQUFLLE9BQUEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsTUFBTSxFQUEzQixDQUEyQixDQUFDO0FBQXpELENBQXlELENBQUM7QUFFOUQsSUFBTSxzQkFBc0IsR0FBRztJQUMzQixPQUFBLGVBQWUsQ0FBQyxJQUFJLENBQUMsVUFBQyxFQUFFLElBQUssT0FBQSxDQUFDLENBQUMsRUFBRSxDQUFDLGdCQUFnQixDQUFDLE1BQU0sRUFBNUIsQ0FBNEIsQ0FBQztBQUExRCxDQUEwRCxDQUFDO0FBRS9ELElBQU0sMkJBQTJCLEdBQUc7SUFDaEMsSUFBSSxxQkFBcUIsR0FBRyxRQUFRLENBQUM7SUFDckMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxVQUFDLEVBQUU7UUFDdkIsSUFBSSxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsTUFBTSxFQUFFO1lBQzVCLE9BQU87U0FDVjtRQUVELElBQU0sT0FBTyxHQUFHLEVBQTJCLENBQUM7UUFDNUMsRUFBRSxDQUFDLGVBQWUsQ0FBQyxPQUFPLENBQUMsVUFBQyxHQUFHO1lBQzNCLElBQU0sS0FBSyxHQUFHLElBQUkseUNBQW1CLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ2xELE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDcEIsR0FBRyxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDO1lBQy9DLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxLQUFLLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQztZQUNqRCxJQUFNLFdBQVcsR0FBRyxxQkFBcUIsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdEQsSUFBSSxXQUFXLEdBQUcscUJBQXFCLEVBQUU7Z0JBQ3JDLHFCQUFxQixHQUFHLFdBQVcsQ0FBQzthQUN2QztRQUNMLENBQUMsQ0FBQyxDQUFDO1FBRUgsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDM0IsRUFBRSxDQUFDLGVBQWUsR0FBRyxFQUFFLENBQUM7SUFDNUIsQ0FBQyxDQUFDLENBQUM7SUFFSCxPQUFPLHFCQUFxQixDQUFDO0FBQ2pDLENBQUMsQ0FBQztBQUVGLElBQU0sa0NBQWtDLEdBQUc7SUFDdkMsSUFBTSxVQUFVLEdBQUcsSUFBSyxNQUFjLENBQUMsVUFBVSxDQUFDLGlCQUFpQixFQUFFO1FBQ2pFLE9BQU8sRUFBRSwrREFBK0Q7S0FDM0UsQ0FBQyxDQUFDO0lBRUgsTUFBTSxDQUFDLGFBQWEsQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUNyQyxDQUFDLENBQUM7QUFFRixJQUFNLHFCQUFxQixHQUFHLFVBQUMsTUFBWTtJQUN2QyxJQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7SUFDZCxPQUFPLE1BQU0sQ0FBQyxVQUFVLEVBQUU7UUFDdEIsTUFBTSxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUM7UUFDM0IsS0FBSyxJQUFJLENBQUMsQ0FBQztLQUNkO0lBQ0QsT0FBTyxLQUFLLENBQUM7QUFDakIsQ0FBQyxDQUFDO0FBRUYsSUFBTSxxQkFBcUIsR0FBRztJQUMxQixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7SUFDZCwrQkFBK0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUN2QyxPQUFPLHFCQUFxQixFQUFFLEVBQUU7UUFDNUIsS0FBSyxHQUFHLDJCQUEyQixFQUFFLENBQUM7UUFDdEMsK0JBQStCLENBQUMsS0FBSyxDQUFDLENBQUM7S0FDMUM7SUFFRCxJQUFJLHNCQUFzQixFQUFFLEVBQUU7UUFDMUIsa0NBQWtDLEVBQUUsQ0FBQztLQUN4QztBQUNMLENBQUMsQ0FBQztBQUVGLElBQUkseUJBQTZDLENBQUM7QUFFbEQsSUFBTSxTQUFTLEdBQUc7SUFDZCxJQUFJLHlCQUF5QjtRQUFFLE9BQU87SUFFdEMsT0FBTyxFQUFFLENBQUM7QUFDZCxDQUFDLENBQUM7QUFFRixJQUFNLE9BQU8sR0FBRztJQUNaLHlCQUF5QixHQUFHLE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQztRQUNyRCxxQkFBcUIsRUFBRSxDQUFDO1FBQ3hCLE9BQU8sRUFBRSxDQUFDO0lBQ2QsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUM7QUFFRixJQUFNLGFBQWEsR0FBRztJQUNsQixJQUFJLHlCQUF5QixJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxVQUFDLEVBQUUsSUFBSyxPQUFBLENBQUMsQ0FBQyxFQUFFLENBQUMsb0JBQW9CLENBQUMsTUFBTSxFQUFoQyxDQUFnQyxDQUFDLEVBQUU7UUFDOUYsTUFBTSxDQUFDLG9CQUFvQixDQUFDLHlCQUF5QixDQUFDLENBQUM7UUFDdkQseUJBQXlCLEdBQUcsU0FBUyxDQUFDO0tBQ3pDO0FBQ0wsQ0FBQyxDQUFDO0FBRUYsSUFBTSxPQUFPLEdBQUc7SUFDWixPQUFDLE1BQWMsQ0FBQyxjQUFjLEdBQUcsY0FBYztBQUEvQyxDQUErQyxDQUFDO0FBR2hELDBCQUFPIn0=
4674
- });
4675
-
4676
- const dom = document.documentElement;
4677
- /**
4678
- * This class controls every other Ketch.UP utility suite.
4679
- * @module KupManager
4680
- */
4681
- class KupManager {
4682
- /**
4683
- * Initializes KupManager.
4684
- */
4685
- constructor(overrides) {
4686
- let datesLocale = null, debugActive = null, debugAutoprint = null, debugLogLimit = null, dialogZIndex = null, languageList = null, languageName = null, objectsList = null, scrollOnHoverDelay = null, scrollOnHoverStep = null, themeList = null, themeName = null;
4687
- if (overrides) {
4688
- const dates = overrides.dates;
4689
- const debug = overrides.debug;
4690
- const dialog = overrides.dialog;
4691
- const language = overrides.language;
4692
- const objects = overrides.objects;
4693
- const scrollOnHover = overrides.scrollOnHover;
4694
- const theme = overrides.theme;
4695
- if (dates) {
4696
- datesLocale = dates.locale ? dates.locale : null;
4697
- }
4698
- if (debug) {
4699
- debugActive = debug.active ? debug.active : null;
4700
- debugAutoprint = debug.autoPrint ? debug.autoPrint : null;
4701
- debugLogLimit = debug.logLimit ? debug.logLimit : null;
4702
- }
4703
- if (dialog) {
4704
- dialogZIndex = dialog.zIndex ? dialog.zIndex : null;
4705
- }
4706
- if (language) {
4707
- languageList = language.list ? language.list : null;
4708
- languageName = language.name ? language.name : null;
4709
- }
4710
- if (objects) {
4711
- objectsList = objects.list ? objects.list : null;
4712
- }
4713
- if (scrollOnHover) {
4714
- scrollOnHoverDelay = scrollOnHover.delay
4715
- ? scrollOnHover.delay
4716
- : null;
4717
- scrollOnHoverStep = scrollOnHover.step
4718
- ? scrollOnHover.step
4719
- : null;
4720
- }
4721
- if (theme) {
4722
- themeList = theme.list ? theme.list : null;
4723
- themeName = theme.name ? theme.name : null;
4724
- }
4725
- }
4726
- this.dates = new KupDates(datesLocale);
4727
- this.debug = new KupDebug(debugActive, debugAutoprint, debugLogLimit);
4728
- this.dialog = new KupDialog(dialogZIndex);
4729
- this.dynamicPosition = new KupDynamicPosition();
4730
- this.language = new KupLanguage(languageList, languageName);
4731
- this.magicBox = null;
4732
- this.overrides = overrides ? overrides : null;
4733
- this.objects = new KupObjects(objectsList);
4734
- this.resize = new ResizeObserver_1.ResizeObserver((entries) => {
4735
- entries.forEach((entry) => {
4736
- if (entry.contentRect.height && entry.contentRect.width) {
4737
- entry.target.resizeCallback();
4738
- this.debug.logMessage('kup-manager (' +
4739
- entry.target.tagName +
4740
- '#' +
4741
- entry.target.id +
4742
- ')', 'Size changed to x: ' +
4743
- entry.contentRect.width +
4744
- ', y: ' +
4745
- entry.contentRect.height +
4746
- '.');
4747
- }
4748
- });
4749
- });
4750
- this.scrollOnHover = new KupScrollOnHover(scrollOnHoverDelay, scrollOnHoverStep);
4751
- this.utilities = {
4752
- lastPointerDownPath: null,
4753
- lastPointerDownString: null,
4754
- };
4755
- this.theme = new KupTheme(themeList, themeName);
4756
- this.toolbar = new KupToolbar();
4757
- document.addEventListener('pointerdown', (e) => {
4758
- const paths = e.composedPath();
4759
- const lastString = paths[0].innerText || paths[0].value;
4760
- this.utilities.lastPointerDownPath = paths;
4761
- this.utilities.lastPointerDownString = lastString;
4762
- if (lastString) {
4763
- document.dispatchEvent(new CustomEvent('kup-manager-stringfinder', {
4764
- bubbles: true,
4765
- detail: { string: lastString },
4766
- }));
4767
- }
4768
- });
4769
- }
4770
- /**
4771
- * Creates kup-magic-box component.
4772
- */
4773
- showMagicBox() {
4774
- if (this.magicBox) {
4775
- return;
4776
- }
4777
- this.magicBox = document.createElement('kup-magic-box');
4778
- this.magicBox.id = 'kup-magic-box';
4779
- this.magicBox.style.position = 'fixed';
4780
- this.magicBox.style.left = 'calc(50% - 350px)';
4781
- this.magicBox.style.top = 'calc(50% - 150px)';
4782
- document.body.append(this.magicBox);
4783
- }
4784
- /**
4785
- * Removes kup-magic-box component.
4786
- */
4787
- hideMagicBox() {
4788
- if (!this.magicBox) {
4789
- return;
4790
- }
4791
- this.magicBox.remove();
4792
- this.magicBox = null;
4793
- }
4794
- /**
4795
- * Creates or removes kup-magic-box component depending on its existence.
4796
- */
4797
- toggleMagicBox() {
4798
- if (!this.magicBox) {
4799
- this.showMagicBox();
4800
- }
4801
- else {
4802
- this.hideMagicBox();
4803
- }
4804
- }
4805
- /**
4806
- * Sets both locale and language library-wide.
4807
- * @param {KupDatesLocales} locale - The supported locale.
4808
- */
4809
- setLibraryLocalization(locale) {
4810
- if (!Object.values(KupDatesLocales).includes(locale)) {
4811
- this.debug.logMessage('kup-manager', 'Missing locale (' + locale + ')!', KupDebugCategory.ERROR);
4812
- return;
4813
- }
4814
- if (!KupLanguageDefaults[locale]) {
4815
- this.debug.logMessage('kup-manager', 'Missing language for locale (' + locale + ')!', KupDebugCategory.ERROR);
4816
- return;
4817
- }
4818
- this.dates.setLocale(locale);
4819
- this.language.set(KupLanguageDefaults[locale]);
4820
- }
4821
- }
4822
- /**
4823
- * Called by the Ketch.UP components to retrieve the instance of KupManager (or creating a new one when missing).
4824
- * @returns {KupManager} KupManager instance.
4825
- */
4826
- function kupManagerInstance() {
4827
- if (!dom.ketchup) {
4828
- const overrides = dom.ketchupInit
4829
- ? dom.ketchupInit
4830
- : null;
4831
- dom.ketchup = new KupManager(overrides);
4832
- dom.ketchup.theme.set();
4833
- if (dom.ketchup.debug.active) {
4834
- dom.ketchup.debug.toggle(dom.ketchup.debug.active);
4835
- }
4836
- globalThis.kupManager = dom.ketchup;
4837
- document.dispatchEvent(new CustomEvent('kup-manager-ready'));
4838
- }
4839
- return dom.ketchup;
4840
- }
4841
-
4842
- export { KupThemeIconValues as K, KupDebugCategory as a, kupDynamicPositionAttribute as b, KupThemeColorValues as c, KupLanguageGeneric as d, KupLanguageSearch as e, KupCardSubEvents as f, KupCardIds as g, KupCardCSSClasses as h, KupLanguageRow as i, KupLanguageColumn as j, kupManagerInstance as k, KupCardFamily as l, KupCardProps as m, KupDynamicPositionPlacement as n, KupLanguageGrouping as o, KupLanguageCheckbox as p, KupLanguageTotals as q, KupLanguageFontsize as r, KupLanguageDensity as s, KupLanguageGrid as t, KupLanguagePage as u };