@sme.up/ketchup 4.3.0-SNAPSHOT → 5.1.0-SNAPSHOT

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +107 -3
  2. package/dist/cjs/{cell-utils-dc0884a3.js → cell-utils-9b1d6563.js} +4 -4
  3. package/dist/cjs/{component-8fbc31a2.js → component-d1496215.js} +203 -174
  4. package/dist/cjs/{f-button-2ba74fb5.js → f-button-02a7cde4.js} +2 -2
  5. package/dist/cjs/{f-cell-fe60a08d.js → f-cell-4d1450a8.js} +38 -28
  6. package/dist/cjs/f-chip-a50b9f00.js +130 -0
  7. package/dist/cjs/{f-image-d3bd4e08.js → f-image-db55ac49.js} +3 -3
  8. package/dist/cjs/{index-0416afab.js → index-ab119fad.js} +23 -0
  9. package/dist/cjs/ketchup.cjs.js +3 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +7 -7
  11. package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +4636 -4073
  12. package/dist/cjs/kup-calendar.cjs.entry.js +626 -359
  13. package/dist/cjs/kup-cell.cjs.entry.js +15 -13
  14. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-dash_2.cjs.entry.js +8 -7
  16. package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
  17. package/dist/cjs/kup-echart.cjs.entry.js +93039 -0
  18. package/dist/cjs/kup-field.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  20. package/dist/cjs/kup-lazy.cjs.entry.js +22 -5
  21. package/dist/cjs/kup-magic-box.cjs.entry.js +95 -42
  22. package/dist/cjs/{kup-manager-1a2688ca.js → kup-manager-5877b2ee.js} +3392 -753
  23. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  24. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  27. package/dist/cjs/loader.cjs.js +3 -3
  28. package/dist/cjs/{tslib.es6-4360c099.js → tslib.es6-0ee02c67.js} +13 -0
  29. package/dist/cjs/utils-1b5c8c70.js +482 -0
  30. package/dist/collection/assets/calendar.js +46 -1
  31. package/dist/collection/assets/card.js +15 -15
  32. package/dist/collection/assets/data-table.js +18 -6
  33. package/dist/collection/assets/index.js +8 -0
  34. package/dist/collection/assets/kupdata.js +937 -0
  35. package/dist/collection/collection-manifest.json +4 -4
  36. package/dist/collection/components/kup-accordion/kup-accordion.css +0 -1
  37. package/dist/collection/components/kup-accordion/kup-accordion.js +2 -2
  38. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -0
  39. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +148 -52
  40. package/dist/collection/components/kup-badge/kup-badge.js +2 -2
  41. package/dist/collection/components/kup-box/kup-box.js +31 -17
  42. package/dist/collection/components/kup-button/kup-button.js +2 -2
  43. package/dist/collection/components/kup-button-list/kup-button-list.js +26 -8
  44. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +14 -8
  45. package/dist/collection/components/kup-calendar/kup-calendar.css +2 -2
  46. package/dist/collection/components/kup-calendar/kup-calendar.js +185 -315
  47. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +38 -0
  48. package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-calendar.js +1 -1
  49. package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-clock.js +32 -32
  50. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +167 -0
  51. package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +1 -1
  52. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +2 -2
  53. package/dist/collection/components/kup-card/free/kup-card-free.js +11 -2
  54. package/dist/collection/components/kup-card/kup-card-declarations.js +14 -14
  55. package/dist/collection/components/kup-card/kup-card-helper.js +3 -3
  56. package/dist/collection/components/kup-card/kup-card.css +423 -137
  57. package/dist/collection/components/kup-card/kup-card.js +62 -11
  58. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +1 -1
  59. package/dist/collection/components/kup-card/standard/kup-card-standard.js +18 -5
  60. package/dist/collection/components/kup-cell/kup-cell.js +15 -13
  61. package/dist/collection/components/kup-chart/kup-chart-builder.js +3 -4
  62. package/dist/collection/components/kup-chart/kup-chart.js +7 -7
  63. package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
  64. package/dist/collection/components/kup-chip/kup-chip.css +1 -0
  65. package/dist/collection/components/kup-chip/kup-chip.js +51 -92
  66. package/dist/collection/components/kup-color-picker/kup-color-picker.css +1 -265
  67. package/dist/collection/components/kup-color-picker/kup-color-picker.js +93 -48
  68. package/dist/collection/components/kup-combobox/kup-combobox.js +148 -115
  69. package/dist/collection/components/kup-dash/kup-dash.js +1 -1
  70. package/dist/collection/components/kup-dash-list/kup-dash-list.js +5 -5
  71. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
  72. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +28 -56
  73. package/dist/collection/components/kup-data-table/kup-data-table.css +4 -0
  74. package/dist/collection/components/kup-data-table/kup-data-table.js +345 -158
  75. package/dist/collection/components/kup-date-picker/kup-date-picker.js +8 -5
  76. package/dist/collection/components/kup-drawer/kup-drawer.js +1 -1
  77. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +2 -2
  78. package/dist/collection/components/kup-echart/assets/maps/africa.json +6116 -0
  79. package/dist/collection/components/kup-echart/assets/maps/america.json +5416 -0
  80. package/dist/collection/components/kup-echart/assets/maps/asia.json +6053 -0
  81. package/dist/collection/components/kup-echart/assets/maps/europe.json +5051 -0
  82. package/dist/collection/components/kup-echart/assets/maps/italy.json +3562 -0
  83. package/dist/collection/components/kup-echart/assets/maps/oceania.json +1069 -0
  84. package/dist/collection/components/kup-echart/assets/maps/world.json +23685 -0
  85. package/dist/collection/components/kup-echart/kup-echart-declarations.js +45 -0
  86. package/dist/collection/components/kup-echart/kup-echart.css +13 -0
  87. package/dist/collection/components/kup-echart/kup-echart.js +1165 -0
  88. package/dist/collection/components/kup-field/kup-field.js +2 -2
  89. package/dist/collection/components/kup-gauge/kup-gauge.js +3 -3
  90. package/dist/collection/components/kup-grid/kup-grid.css +2 -2
  91. package/dist/collection/components/kup-grid/kup-grid.js +6 -5
  92. package/dist/collection/components/kup-iframe/kup-iframe.js +2 -2
  93. package/dist/collection/components/kup-image/assets/svg/science.svg +1 -0
  94. package/dist/collection/components/kup-image/kup-image.js +3 -3
  95. package/dist/collection/components/kup-lazy/kup-lazy.css +21 -11
  96. package/dist/collection/components/kup-lazy/kup-lazy.js +62 -3
  97. package/dist/collection/components/kup-list/kup-list-helper.js +7 -1
  98. package/dist/collection/components/kup-list/kup-list.css +3 -0
  99. package/dist/collection/components/kup-list/kup-list.js +219 -288
  100. package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +11 -7
  101. package/dist/collection/components/kup-magic-box/kup-magic-box.js +90 -41
  102. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  103. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  104. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  105. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  106. package/dist/collection/components/kup-radio/kup-radio.js +1 -1
  107. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  108. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  109. package/dist/collection/components/kup-spinner/kup-spinner.js +1 -1
  110. package/dist/collection/components/kup-state/mock-store.js +1 -1
  111. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  112. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
  113. package/dist/collection/components/kup-text-field/kup-text-field.css +2 -0
  114. package/dist/collection/components/kup-text-field/kup-text-field.js +2 -2
  115. package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -5
  116. package/dist/collection/components/kup-tooltip/kup-tooltip.js +3 -3
  117. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -5
  118. package/dist/collection/components/kup-tree/kup-tree-faker.js +2 -3
  119. package/dist/collection/components/kup-tree/kup-tree.css +2 -0
  120. package/dist/collection/components/kup-tree/kup-tree.js +145 -70
  121. package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -1
  122. package/dist/collection/f-components/f-cell/f-cell.js +29 -19
  123. package/dist/collection/f-components/f-chip/f-chip.js +76 -87
  124. package/dist/collection/f-components/f-image/f-image.js +2 -2
  125. package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -0
  126. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -0
  127. package/dist/collection/f-components/f-paginator/f-paginator.js +91 -0
  128. package/dist/collection/f-components/f-text-field/f-text-field.js +4 -4
  129. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +52 -0
  130. package/dist/collection/managers/kup-data/kup-data-column-helper.js +272 -0
  131. package/dist/collection/managers/kup-data/kup-data-declarations.js +9 -0
  132. package/dist/collection/managers/kup-data/kup-data-node-helper.js +72 -0
  133. package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -0
  134. package/dist/collection/managers/kup-data/kup-data.js +382 -0
  135. package/dist/collection/{utils → managers}/kup-dates/kup-dates-declarations.js +0 -0
  136. package/dist/collection/{utils → managers}/kup-dates/kup-dates.js +53 -19
  137. package/dist/collection/{utils → managers}/kup-debug/kup-debug-browser-utils.js +1 -1
  138. package/dist/collection/{utils → managers}/kup-debug/kup-debug-declarations.js +0 -0
  139. package/dist/collection/{utils → managers}/kup-debug/kup-debug.js +79 -124
  140. package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.js +0 -0
  141. package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position.js +10 -1
  142. package/dist/collection/{utils → managers}/kup-interact/kup-interact-declarations.js +1 -0
  143. package/dist/collection/{utils → managers}/kup-interact/kup-interact.js +22 -13
  144. package/dist/collection/{utils → managers}/kup-language/kup-language-declarations.js +10 -0
  145. package/dist/collection/{utils → managers}/kup-language/kup-language.js +5 -5
  146. package/dist/collection/{utils → managers}/kup-manager/kup-manager-declarations.js +0 -0
  147. package/dist/collection/{utils → managers}/kup-manager/kup-manager.js +45 -4
  148. package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
  149. package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
  150. package/dist/collection/managers/kup-math/kup-math.js +151 -0
  151. package/dist/collection/{utils → managers}/kup-objects/kup-objects-declarations.js +0 -0
  152. package/dist/collection/{utils → managers}/kup-objects/kup-objects.js +15 -0
  153. package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +0 -0
  154. package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.js +0 -0
  155. package/dist/collection/{utils → managers}/kup-search/kup-search-declarations.js +0 -0
  156. package/dist/collection/{utils → managers}/kup-search/kup-search.js +0 -0
  157. package/dist/collection/{utils → managers}/kup-theme/kup-theme-declarations.js +99 -0
  158. package/dist/collection/{utils → managers}/kup-theme/kup-theme.js +117 -68
  159. package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar-declarations.js +0 -0
  160. package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar.js +0 -0
  161. package/dist/collection/types/GenericTypes.js +48 -1
  162. package/dist/collection/utils/cell-utils.js +3 -4
  163. package/dist/collection/utils/filters/filters-column-menu.js +7 -7
  164. package/dist/collection/utils/filters/filters-rows.js +2 -2
  165. package/dist/collection/utils/filters/filters-tree-items.js +12 -12
  166. package/dist/collection/utils/filters/filters.js +3 -2
  167. package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +1 -0
  168. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +100 -68
  169. package/dist/collection/utils/utils.js +4 -4
  170. package/dist/esm/{cell-utils-8f512ea9.js → cell-utils-571978d6.js} +4 -4
  171. package/dist/esm/{component-d2803feb.js → component-c4eb6153.js} +204 -170
  172. package/dist/esm/{f-button-30dbcaa9.js → f-button-b3011cc2.js} +2 -2
  173. package/dist/esm/{f-cell-95c186c6.js → f-cell-b88b2731.js} +38 -28
  174. package/dist/esm/f-chip-a52489ec.js +128 -0
  175. package/dist/esm/{f-image-3bc8b24f.js → f-image-5e5ed7e2.js} +3 -3
  176. package/dist/esm/{index-e0e67c23.js → index-78f3699d.js} +23 -0
  177. package/dist/esm/ketchup.js +3 -3
  178. package/dist/esm/kup-accordion.entry.js +7 -7
  179. package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_27.entry.js} +4420 -3856
  180. package/dist/esm/kup-calendar.entry.js +626 -359
  181. package/dist/esm/kup-cell.entry.js +15 -13
  182. package/dist/esm/kup-dash-list.entry.js +4 -4
  183. package/dist/esm/kup-dash_2.entry.js +8 -7
  184. package/dist/esm/kup-drawer.entry.js +3 -3
  185. package/dist/esm/kup-echart.entry.js +93035 -0
  186. package/dist/esm/kup-field.entry.js +2 -2
  187. package/dist/esm/kup-iframe.entry.js +3 -3
  188. package/dist/esm/kup-lazy.entry.js +22 -5
  189. package/dist/esm/kup-magic-box.entry.js +95 -42
  190. package/dist/esm/{kup-manager-7fc234da.js → kup-manager-1f76a3ef.js} +3388 -753
  191. package/dist/esm/kup-nav-bar.entry.js +3 -3
  192. package/dist/esm/kup-probe.entry.js +2 -2
  193. package/dist/esm/kup-qlik.entry.js +2 -2
  194. package/dist/esm/kup-snackbar.entry.js +5 -5
  195. package/dist/esm/loader.js +3 -3
  196. package/dist/esm/polyfills/css-shim.js +1 -1
  197. package/dist/esm/{tslib.es6-e6137777.js → tslib.es6-8f2d44b6.js} +13 -1
  198. package/dist/esm/utils-93ae800f.js +461 -0
  199. package/dist/ketchup/assets/maps/africa.json +6116 -0
  200. package/dist/ketchup/assets/maps/america.json +5416 -0
  201. package/dist/ketchup/assets/maps/asia.json +6053 -0
  202. package/dist/ketchup/assets/maps/europe.json +5051 -0
  203. package/dist/ketchup/assets/maps/italy.json +3562 -0
  204. package/dist/ketchup/assets/maps/oceania.json +1069 -0
  205. package/dist/ketchup/assets/maps/world.json +23685 -0
  206. package/dist/ketchup/assets/svg/science.svg +1 -0
  207. package/dist/ketchup/ketchup.esm.js +1 -1
  208. package/dist/ketchup/{p-a878016f.entry.js → p-088a886c.entry.js} +1 -1
  209. package/dist/ketchup/p-135cabdc.entry.js +1 -0
  210. package/dist/ketchup/{p-1c6178e4.entry.js → p-1c1e830f.entry.js} +1 -1
  211. package/dist/ketchup/{p-62816d0b.entry.js → p-29208220.entry.js} +1 -1
  212. package/dist/ketchup/{p-ca0ca27f.entry.js → p-2b9f2019.entry.js} +1 -1
  213. package/dist/ketchup/p-52d0582a.js +1 -0
  214. package/dist/ketchup/p-554bd5f0.entry.js +39 -0
  215. package/dist/ketchup/{p-de83f2f6.js → p-5f52e313.js} +1 -1
  216. package/dist/ketchup/{p-ccda584a.entry.js → p-65449480.entry.js} +1 -1
  217. package/dist/ketchup/p-79cf3874.entry.js +1 -0
  218. package/dist/ketchup/p-7a85cda4.js +1 -0
  219. package/dist/ketchup/p-84cce555.entry.js +27 -0
  220. package/dist/ketchup/p-8c44c3b9.js +135 -0
  221. package/dist/ketchup/{p-65adc15b.entry.js → p-9d49cdb2.entry.js} +1 -1
  222. package/dist/ketchup/{p-5a4a5fdc.js → p-a0b1d769.js} +1 -1
  223. package/dist/ketchup/{p-dbb6998b.entry.js → p-a2b6672e.entry.js} +1 -1
  224. package/dist/ketchup/{p-a378ba56.entry.js → p-a4be630b.entry.js} +1 -1
  225. package/dist/ketchup/p-c072b270.js +1 -0
  226. package/dist/ketchup/{p-1baf1205.entry.js → p-c648972c.entry.js} +1 -1
  227. package/dist/ketchup/{p-af4a6191.entry.js → p-d67d39c0.entry.js} +1 -1
  228. package/dist/ketchup/p-d6e2f2b0.entry.js +1 -0
  229. package/dist/ketchup/{p-44375e49.js → p-da387e0e.js} +1 -1
  230. package/dist/ketchup/p-e5c9ec9e.js +1 -0
  231. package/dist/ketchup/{p-cb5f4994.js → p-ed0b8666.js} +0 -0
  232. package/dist/ketchup/p-ef539eda.js +9 -0
  233. package/dist/ketchup/p-f316234c.entry.js +143 -0
  234. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +2 -2
  235. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +6 -0
  236. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +29 -22
  237. package/dist/types/components/kup-box/kup-box-declarations.d.ts +7 -11
  238. package/dist/types/components/kup-box/kup-box.d.ts +4 -4
  239. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +6 -1
  240. package/dist/types/components/kup-button-list/kup-button-list.d.ts +4 -3
  241. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +28 -10
  242. package/dist/types/components/kup-calendar/kup-calendar.d.ts +19 -47
  243. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +27 -0
  244. package/dist/types/components/kup-card/{builtin → built-in}/kup-card-calendar.d.ts +0 -0
  245. package/dist/types/components/kup-card/{builtin → built-in}/kup-card-clock.d.ts +0 -0
  246. package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -0
  247. package/dist/types/components/kup-card/free/kup-card-free.d.ts +7 -1
  248. package/dist/types/components/kup-card/kup-card-declarations.d.ts +46 -21
  249. package/dist/types/components/kup-card/kup-card.d.ts +9 -2
  250. package/dist/types/components/kup-cell/kup-cell.d.ts +3 -3
  251. package/dist/types/components/kup-chart/kup-chart-builder.d.ts +5 -5
  252. package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +3 -3
  253. package/dist/types/components/kup-chart/kup-chart.d.ts +2 -2
  254. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +6 -3
  255. package/dist/types/components/kup-chip/kup-chip.d.ts +9 -13
  256. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +7 -3
  257. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +4 -0
  258. package/dist/types/components/kup-combobox/kup-combobox.d.ts +11 -33
  259. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +2 -2
  260. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +45 -104
  261. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +8 -11
  262. package/dist/types/components/kup-data-table/kup-data-table.d.ts +49 -27
  263. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +55 -0
  264. package/dist/types/components/kup-echart/kup-echart.d.ts +100 -0
  265. package/dist/types/components/kup-lazy/kup-lazy.d.ts +13 -1
  266. package/dist/types/components/kup-list/kup-list-declarations.d.ts +2 -1
  267. package/dist/types/components/kup-list/kup-list.d.ts +4 -35
  268. package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +6 -10
  269. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +7 -11
  270. package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +11 -13
  271. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +14 -35
  272. package/dist/types/components/kup-tree/kup-tree-faker.d.ts +10 -10
  273. package/dist/types/components/kup-tree/kup-tree.d.ts +45 -35
  274. package/dist/types/components.d.ts +305 -186
  275. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +11 -10
  276. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +7 -22
  277. package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -0
  278. package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -0
  279. package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -0
  280. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +24 -0
  281. package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +31 -0
  282. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +160 -0
  283. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +23 -0
  284. package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -0
  285. package/dist/types/managers/kup-data/kup-data.d.ts +77 -0
  286. package/dist/types/{utils → managers}/kup-dates/kup-dates-declarations.d.ts +0 -0
  287. package/dist/types/{utils → managers}/kup-dates/kup-dates.d.ts +24 -2
  288. package/dist/types/{utils → managers}/kup-debug/kup-debug-declarations.d.ts +0 -0
  289. package/dist/types/{utils → managers}/kup-debug/kup-debug.d.ts +6 -13
  290. package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -0
  291. package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position.d.ts +0 -0
  292. package/dist/types/{utils → managers}/kup-interact/kup-interact-declarations.d.ts +9 -8
  293. package/dist/types/{utils → managers}/kup-interact/kup-interact.d.ts +7 -6
  294. package/dist/types/{utils → managers}/kup-language/kup-language-declarations.d.ts +11 -1
  295. package/dist/types/{utils → managers}/kup-language/kup-language.d.ts +3 -3
  296. package/dist/types/{utils → managers}/kup-manager/kup-manager-declarations.d.ts +21 -2
  297. package/dist/types/{utils → managers}/kup-manager/kup-manager.d.ts +4 -0
  298. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
  299. package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
  300. package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
  301. package/dist/types/{utils → managers}/kup-objects/kup-objects-declarations.d.ts +0 -0
  302. package/dist/types/{utils → managers}/kup-objects/kup-objects.d.ts +6 -0
  303. package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +0 -0
  304. package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +0 -0
  305. package/dist/types/{utils → managers}/kup-search/kup-search-declarations.d.ts +0 -0
  306. package/dist/types/{utils → managers}/kup-search/kup-search.d.ts +0 -0
  307. package/dist/types/{utils → managers}/kup-theme/kup-theme-declarations.d.ts +37 -1
  308. package/dist/types/{utils → managers}/kup-theme/kup-theme.d.ts +19 -19
  309. package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar-declarations.d.ts +0 -0
  310. package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar.d.ts +0 -0
  311. package/dist/types/stencil-public-runtime.d.ts +6 -4
  312. package/dist/types/types/GenericTypes.d.ts +53 -6
  313. package/dist/types/utils/cell-utils.d.ts +7 -6
  314. package/dist/types/utils/filters/filters-column-menu.d.ts +16 -16
  315. package/dist/types/utils/filters/filters-rows.d.ts +10 -10
  316. package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
  317. package/dist/types/utils/helpers.d.ts +2 -2
  318. package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +1 -0
  319. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +27 -33
  320. package/dist/types/utils/utils.d.ts +4 -2
  321. package/package.json +31 -26
  322. package/dist/cjs/f-chip-90d95d22.js +0 -141
  323. package/dist/cjs/utils-0cc466b9.js +0 -1492
  324. package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +0 -20
  325. package/dist/collection/components/kup-paginator/kup-paginator-declarations.js +0 -5
  326. package/dist/collection/components/kup-paginator/kup-paginator.css +0 -46
  327. package/dist/collection/components/kup-paginator/kup-paginator.js +0 -408
  328. package/dist/esm/f-chip-c0e9c0ff.js +0 -139
  329. package/dist/esm/utils-6c73709d.js +0 -1470
  330. package/dist/ketchup/p-15321eae.js +0 -1
  331. package/dist/ketchup/p-5a5f2a53.js +0 -1
  332. package/dist/ketchup/p-61faaa38.js +0 -8
  333. package/dist/ketchup/p-7e23ea7c.entry.js +0 -1
  334. package/dist/ketchup/p-9d02a676.js +0 -134
  335. package/dist/ketchup/p-a96e6e32.entry.js +0 -1
  336. package/dist/ketchup/p-ad32821e.entry.js +0 -1
  337. package/dist/ketchup/p-c18c7bb0.entry.js +0 -27
  338. package/dist/ketchup/p-d4aa4922.js +0 -1
  339. package/dist/ketchup/p-ec3a3db9.js +0 -1
  340. package/dist/ketchup/p-ecccb3a4.entry.js +0 -45
  341. package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +0 -14
  342. package/dist/types/components/kup-paginator/kup-paginator-declarations.d.ts +0 -11
  343. package/dist/types/components/kup-paginator/kup-paginator.d.ts +0 -48
@@ -1,1470 +0,0 @@
1
- import { G as createCommonjsModule, H as commonjsGlobal, d as KupDatesNormalize, c as KupDatesFormats } from './kup-manager-7fc234da.js';
2
-
3
- var numeral = createCommonjsModule(function (module) {
4
- /*! @preserve
5
- * numeral.js
6
- * version : 2.0.6
7
- * author : Adam Draper
8
- * license : MIT
9
- * http://adamwdraper.github.com/Numeral-js/
10
- */
11
-
12
- (function (global, factory) {
13
- if (module.exports) {
14
- module.exports = factory();
15
- } else {
16
- global.numeral = factory();
17
- }
18
- }(commonjsGlobal, function () {
19
- /************************************
20
- Variables
21
- ************************************/
22
-
23
- var numeral,
24
- _,
25
- VERSION = '2.0.6',
26
- formats = {},
27
- locales = {},
28
- defaults = {
29
- currentLocale: 'en',
30
- zeroFormat: null,
31
- nullFormat: null,
32
- defaultFormat: '0,0',
33
- scalePercentBy100: true
34
- },
35
- options = {
36
- currentLocale: defaults.currentLocale,
37
- zeroFormat: defaults.zeroFormat,
38
- nullFormat: defaults.nullFormat,
39
- defaultFormat: defaults.defaultFormat,
40
- scalePercentBy100: defaults.scalePercentBy100
41
- };
42
-
43
-
44
- /************************************
45
- Constructors
46
- ************************************/
47
-
48
- // Numeral prototype object
49
- function Numeral(input, number) {
50
- this._input = input;
51
-
52
- this._value = number;
53
- }
54
-
55
- numeral = function(input) {
56
- var value,
57
- kind,
58
- unformatFunction,
59
- regexp;
60
-
61
- if (numeral.isNumeral(input)) {
62
- value = input.value();
63
- } else if (input === 0 || typeof input === 'undefined') {
64
- value = 0;
65
- } else if (input === null || _.isNaN(input)) {
66
- value = null;
67
- } else if (typeof input === 'string') {
68
- if (options.zeroFormat && input === options.zeroFormat) {
69
- value = 0;
70
- } else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) {
71
- value = null;
72
- } else {
73
- for (kind in formats) {
74
- regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat;
75
-
76
- if (regexp && input.match(regexp)) {
77
- unformatFunction = formats[kind].unformat;
78
-
79
- break;
80
- }
81
- }
82
-
83
- unformatFunction = unformatFunction || numeral._.stringToNumber;
84
-
85
- value = unformatFunction(input);
86
- }
87
- } else {
88
- value = Number(input)|| null;
89
- }
90
-
91
- return new Numeral(input, value);
92
- };
93
-
94
- // version number
95
- numeral.version = VERSION;
96
-
97
- // compare numeral object
98
- numeral.isNumeral = function(obj) {
99
- return obj instanceof Numeral;
100
- };
101
-
102
- // helper functions
103
- numeral._ = _ = {
104
- // formats numbers separators, decimals places, signs, abbreviations
105
- numberToFormat: function(value, format, roundingFunction) {
106
- var locale = locales[numeral.options.currentLocale],
107
- negP = false,
108
- optDec = false,
109
- leadingCount = 0,
110
- abbr = '',
111
- trillion = 1000000000000,
112
- billion = 1000000000,
113
- million = 1000000,
114
- thousand = 1000,
115
- decimal = '',
116
- neg = false,
117
- abbrForce, // force abbreviation
118
- abs,
119
- int,
120
- precision,
121
- signed,
122
- thousands,
123
- output;
124
-
125
- // make sure we never format a null value
126
- value = value || 0;
127
-
128
- abs = Math.abs(value);
129
-
130
- // see if we should use parentheses for negative number or if we should prefix with a sign
131
- // if both are present we default to parentheses
132
- if (numeral._.includes(format, '(')) {
133
- negP = true;
134
- format = format.replace(/[\(|\)]/g, '');
135
- } else if (numeral._.includes(format, '+') || numeral._.includes(format, '-')) {
136
- signed = numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1;
137
- format = format.replace(/[\+|\-]/g, '');
138
- }
139
-
140
- // see if abbreviation is wanted
141
- if (numeral._.includes(format, 'a')) {
142
- abbrForce = format.match(/a(k|m|b|t)?/);
143
-
144
- abbrForce = abbrForce ? abbrForce[1] : false;
145
-
146
- // check for space before abbreviation
147
- if (numeral._.includes(format, ' a')) {
148
- abbr = ' ';
149
- }
150
-
151
- format = format.replace(new RegExp(abbr + 'a[kmbt]?'), '');
152
-
153
- if (abs >= trillion && !abbrForce || abbrForce === 't') {
154
- // trillion
155
- abbr += locale.abbreviations.trillion;
156
- value = value / trillion;
157
- } else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') {
158
- // billion
159
- abbr += locale.abbreviations.billion;
160
- value = value / billion;
161
- } else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') {
162
- // million
163
- abbr += locale.abbreviations.million;
164
- value = value / million;
165
- } else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') {
166
- // thousand
167
- abbr += locale.abbreviations.thousand;
168
- value = value / thousand;
169
- }
170
- }
171
-
172
- // check for optional decimals
173
- if (numeral._.includes(format, '[.]')) {
174
- optDec = true;
175
- format = format.replace('[.]', '.');
176
- }
177
-
178
- // break number and format
179
- int = value.toString().split('.')[0];
180
- precision = format.split('.')[1];
181
- thousands = format.indexOf(',');
182
- leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length;
183
-
184
- if (precision) {
185
- if (numeral._.includes(precision, '[')) {
186
- precision = precision.replace(']', '');
187
- precision = precision.split('[');
188
- decimal = numeral._.toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);
189
- } else {
190
- decimal = numeral._.toFixed(value, precision.length, roundingFunction);
191
- }
192
-
193
- int = decimal.split('.')[0];
194
-
195
- if (numeral._.includes(decimal, '.')) {
196
- decimal = locale.delimiters.decimal + decimal.split('.')[1];
197
- } else {
198
- decimal = '';
199
- }
200
-
201
- if (optDec && Number(decimal.slice(1)) === 0) {
202
- decimal = '';
203
- }
204
- } else {
205
- int = numeral._.toFixed(value, 0, roundingFunction);
206
- }
207
-
208
- // check abbreviation again after rounding
209
- if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) {
210
- int = String(Number(int) / 1000);
211
-
212
- switch (abbr) {
213
- case locale.abbreviations.thousand:
214
- abbr = locale.abbreviations.million;
215
- break;
216
- case locale.abbreviations.million:
217
- abbr = locale.abbreviations.billion;
218
- break;
219
- case locale.abbreviations.billion:
220
- abbr = locale.abbreviations.trillion;
221
- break;
222
- }
223
- }
224
-
225
-
226
- // format number
227
- if (numeral._.includes(int, '-')) {
228
- int = int.slice(1);
229
- neg = true;
230
- }
231
-
232
- if (int.length < leadingCount) {
233
- for (var i = leadingCount - int.length; i > 0; i--) {
234
- int = '0' + int;
235
- }
236
- }
237
-
238
- if (thousands > -1) {
239
- int = int.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + locale.delimiters.thousands);
240
- }
241
-
242
- if (format.indexOf('.') === 0) {
243
- int = '';
244
- }
245
-
246
- output = int + decimal + (abbr ? abbr : '');
247
-
248
- if (negP) {
249
- output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : '');
250
- } else {
251
- if (signed >= 0) {
252
- output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+');
253
- } else if (neg) {
254
- output = '-' + output;
255
- }
256
- }
257
-
258
- return output;
259
- },
260
- // unformats numbers separators, decimals places, signs, abbreviations
261
- stringToNumber: function(string) {
262
- var locale = locales[options.currentLocale],
263
- stringOriginal = string,
264
- abbreviations = {
265
- thousand: 3,
266
- million: 6,
267
- billion: 9,
268
- trillion: 12
269
- },
270
- abbreviation,
271
- value,
272
- regexp;
273
-
274
- if (options.zeroFormat && string === options.zeroFormat) {
275
- value = 0;
276
- } else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) {
277
- value = null;
278
- } else {
279
- value = 1;
280
-
281
- if (locale.delimiters.decimal !== '.') {
282
- string = string.replace(/\./g, '').replace(locale.delimiters.decimal, '.');
283
- }
284
-
285
- for (abbreviation in abbreviations) {
286
- regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\)|(\\' + locale.currency.symbol + ')?(?:\\))?)?$');
287
-
288
- if (stringOriginal.match(regexp)) {
289
- value *= Math.pow(10, abbreviations[abbreviation]);
290
- break;
291
- }
292
- }
293
-
294
- // check for negative number
295
- value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1;
296
-
297
- // remove non numbers
298
- string = string.replace(/[^0-9\.]+/g, '');
299
-
300
- value *= Number(string);
301
- }
302
-
303
- return value;
304
- },
305
- isNaN: function(value) {
306
- return typeof value === 'number' && isNaN(value);
307
- },
308
- includes: function(string, search) {
309
- return string.indexOf(search) !== -1;
310
- },
311
- insert: function(string, subString, start) {
312
- return string.slice(0, start) + subString + string.slice(start);
313
- },
314
- reduce: function(array, callback /*, initialValue*/) {
315
- if (this === null) {
316
- throw new TypeError('Array.prototype.reduce called on null or undefined');
317
- }
318
-
319
- if (typeof callback !== 'function') {
320
- throw new TypeError(callback + ' is not a function');
321
- }
322
-
323
- var t = Object(array),
324
- len = t.length >>> 0,
325
- k = 0,
326
- value;
327
-
328
- if (arguments.length === 3) {
329
- value = arguments[2];
330
- } else {
331
- while (k < len && !(k in t)) {
332
- k++;
333
- }
334
-
335
- if (k >= len) {
336
- throw new TypeError('Reduce of empty array with no initial value');
337
- }
338
-
339
- value = t[k++];
340
- }
341
- for (; k < len; k++) {
342
- if (k in t) {
343
- value = callback(value, t[k], k, t);
344
- }
345
- }
346
- return value;
347
- },
348
- /**
349
- * Computes the multiplier necessary to make x >= 1,
350
- * effectively eliminating miscalculations caused by
351
- * finite precision.
352
- */
353
- multiplier: function (x) {
354
- var parts = x.toString().split('.');
355
-
356
- return parts.length < 2 ? 1 : Math.pow(10, parts[1].length);
357
- },
358
- /**
359
- * Given a variable number of arguments, returns the maximum
360
- * multiplier that must be used to normalize an operation involving
361
- * all of them.
362
- */
363
- correctionFactor: function () {
364
- var args = Array.prototype.slice.call(arguments);
365
-
366
- return args.reduce(function(accum, next) {
367
- var mn = _.multiplier(next);
368
- return accum > mn ? accum : mn;
369
- }, 1);
370
- },
371
- /**
372
- * Implementation of toFixed() that treats floats more like decimals
373
- *
374
- * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present
375
- * problems for accounting- and finance-related software.
376
- */
377
- toFixed: function(value, maxDecimals, roundingFunction, optionals) {
378
- var splitValue = value.toString().split('.'),
379
- minDecimals = maxDecimals - (optionals || 0),
380
- boundedPrecision,
381
- optionalsRegExp,
382
- power,
383
- output;
384
-
385
- // Use the smallest precision value possible to avoid errors from floating point representation
386
- if (splitValue.length === 2) {
387
- boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);
388
- } else {
389
- boundedPrecision = minDecimals;
390
- }
391
-
392
- power = Math.pow(10, boundedPrecision);
393
-
394
- // Multiply up by precision, round accurately, then divide and use native toFixed():
395
- output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);
396
-
397
- if (optionals > maxDecimals - boundedPrecision) {
398
- optionalsRegExp = new RegExp('\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');
399
- output = output.replace(optionalsRegExp, '');
400
- }
401
-
402
- return output;
403
- }
404
- };
405
-
406
- // avaliable options
407
- numeral.options = options;
408
-
409
- // avaliable formats
410
- numeral.formats = formats;
411
-
412
- // avaliable formats
413
- numeral.locales = locales;
414
-
415
- // This function sets the current locale. If
416
- // no arguments are passed in, it will simply return the current global
417
- // locale key.
418
- numeral.locale = function(key) {
419
- if (key) {
420
- options.currentLocale = key.toLowerCase();
421
- }
422
-
423
- return options.currentLocale;
424
- };
425
-
426
- // This function provides access to the loaded locale data. If
427
- // no arguments are passed in, it will simply return the current
428
- // global locale object.
429
- numeral.localeData = function(key) {
430
- if (!key) {
431
- return locales[options.currentLocale];
432
- }
433
-
434
- key = key.toLowerCase();
435
-
436
- if (!locales[key]) {
437
- throw new Error('Unknown locale : ' + key);
438
- }
439
-
440
- return locales[key];
441
- };
442
-
443
- numeral.reset = function() {
444
- for (var property in defaults) {
445
- options[property] = defaults[property];
446
- }
447
- };
448
-
449
- numeral.zeroFormat = function(format) {
450
- options.zeroFormat = typeof(format) === 'string' ? format : null;
451
- };
452
-
453
- numeral.nullFormat = function (format) {
454
- options.nullFormat = typeof(format) === 'string' ? format : null;
455
- };
456
-
457
- numeral.defaultFormat = function(format) {
458
- options.defaultFormat = typeof(format) === 'string' ? format : '0.0';
459
- };
460
-
461
- numeral.register = function(type, name, format) {
462
- name = name.toLowerCase();
463
-
464
- if (this[type + 's'][name]) {
465
- throw new TypeError(name + ' ' + type + ' already registered.');
466
- }
467
-
468
- this[type + 's'][name] = format;
469
-
470
- return format;
471
- };
472
-
473
-
474
- numeral.validate = function(val, culture) {
475
- var _decimalSep,
476
- _thousandSep,
477
- _currSymbol,
478
- _valArray,
479
- _abbrObj,
480
- _thousandRegEx,
481
- localeData,
482
- temp;
483
-
484
- //coerce val to string
485
- if (typeof val !== 'string') {
486
- val += '';
487
-
488
- if (console.warn) {
489
- console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);
490
- }
491
- }
492
-
493
- //trim whitespaces from either sides
494
- val = val.trim();
495
-
496
- //if val is just digits return true
497
- if (!!val.match(/^\d+$/)) {
498
- return true;
499
- }
500
-
501
- //if val is empty return false
502
- if (val === '') {
503
- return false;
504
- }
505
-
506
- //get the decimal and thousands separator from numeral.localeData
507
- try {
508
- //check if the culture is understood by numeral. if not, default it to current locale
509
- localeData = numeral.localeData(culture);
510
- } catch (e) {
511
- localeData = numeral.localeData(numeral.locale());
512
- }
513
-
514
- //setup the delimiters and currency symbol based on culture/locale
515
- _currSymbol = localeData.currency.symbol;
516
- _abbrObj = localeData.abbreviations;
517
- _decimalSep = localeData.delimiters.decimal;
518
- if (localeData.delimiters.thousands === '.') {
519
- _thousandSep = '\\.';
520
- } else {
521
- _thousandSep = localeData.delimiters.thousands;
522
- }
523
-
524
- // validating currency symbol
525
- temp = val.match(/^[^\d]+/);
526
- if (temp !== null) {
527
- val = val.substr(1);
528
- if (temp[0] !== _currSymbol) {
529
- return false;
530
- }
531
- }
532
-
533
- //validating abbreviation symbol
534
- temp = val.match(/[^\d]+$/);
535
- if (temp !== null) {
536
- val = val.slice(0, -1);
537
- if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {
538
- return false;
539
- }
540
- }
541
-
542
- _thousandRegEx = new RegExp(_thousandSep + '{2}');
543
-
544
- if (!val.match(/[^\d.,]/g)) {
545
- _valArray = val.split(_decimalSep);
546
- if (_valArray.length > 2) {
547
- return false;
548
- } else {
549
- if (_valArray.length < 2) {
550
- return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx));
551
- } else {
552
- if (_valArray[0].length === 1) {
553
- return ( !! _valArray[0].match(/^\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
554
- } else {
555
- return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
556
- }
557
- }
558
- }
559
- }
560
-
561
- return false;
562
- };
563
-
564
-
565
- /************************************
566
- Numeral Prototype
567
- ************************************/
568
-
569
- numeral.fn = Numeral.prototype = {
570
- clone: function() {
571
- return numeral(this);
572
- },
573
- format: function(inputString, roundingFunction) {
574
- var value = this._value,
575
- format = inputString || options.defaultFormat,
576
- kind,
577
- output,
578
- formatFunction;
579
-
580
- // make sure we have a roundingFunction
581
- roundingFunction = roundingFunction || Math.round;
582
-
583
- // format based on value
584
- if (value === 0 && options.zeroFormat !== null) {
585
- output = options.zeroFormat;
586
- } else if (value === null && options.nullFormat !== null) {
587
- output = options.nullFormat;
588
- } else {
589
- for (kind in formats) {
590
- if (format.match(formats[kind].regexps.format)) {
591
- formatFunction = formats[kind].format;
592
-
593
- break;
594
- }
595
- }
596
-
597
- formatFunction = formatFunction || numeral._.numberToFormat;
598
-
599
- output = formatFunction(value, format, roundingFunction);
600
- }
601
-
602
- return output;
603
- },
604
- value: function() {
605
- return this._value;
606
- },
607
- input: function() {
608
- return this._input;
609
- },
610
- set: function(value) {
611
- this._value = Number(value);
612
-
613
- return this;
614
- },
615
- add: function(value) {
616
- var corrFactor = _.correctionFactor.call(null, this._value, value);
617
-
618
- function cback(accum, curr, currI, O) {
619
- return accum + Math.round(corrFactor * curr);
620
- }
621
-
622
- this._value = _.reduce([this._value, value], cback, 0) / corrFactor;
623
-
624
- return this;
625
- },
626
- subtract: function(value) {
627
- var corrFactor = _.correctionFactor.call(null, this._value, value);
628
-
629
- function cback(accum, curr, currI, O) {
630
- return accum - Math.round(corrFactor * curr);
631
- }
632
-
633
- this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor;
634
-
635
- return this;
636
- },
637
- multiply: function(value) {
638
- function cback(accum, curr, currI, O) {
639
- var corrFactor = _.correctionFactor(accum, curr);
640
- return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor);
641
- }
642
-
643
- this._value = _.reduce([this._value, value], cback, 1);
644
-
645
- return this;
646
- },
647
- divide: function(value) {
648
- function cback(accum, curr, currI, O) {
649
- var corrFactor = _.correctionFactor(accum, curr);
650
- return Math.round(accum * corrFactor) / Math.round(curr * corrFactor);
651
- }
652
-
653
- this._value = _.reduce([this._value, value], cback);
654
-
655
- return this;
656
- },
657
- difference: function(value) {
658
- return Math.abs(numeral(this._value).subtract(value).value());
659
- }
660
- };
661
-
662
- /************************************
663
- Default Locale && Format
664
- ************************************/
665
-
666
- numeral.register('locale', 'en', {
667
- delimiters: {
668
- thousands: ',',
669
- decimal: '.'
670
- },
671
- abbreviations: {
672
- thousand: 'k',
673
- million: 'm',
674
- billion: 'b',
675
- trillion: 't'
676
- },
677
- ordinal: function(number) {
678
- var b = number % 10;
679
- return (~~(number % 100 / 10) === 1) ? 'th' :
680
- (b === 1) ? 'st' :
681
- (b === 2) ? 'nd' :
682
- (b === 3) ? 'rd' : 'th';
683
- },
684
- currency: {
685
- symbol: '$'
686
- }
687
- });
688
-
689
-
690
-
691
- (function() {
692
- numeral.register('format', 'bps', {
693
- regexps: {
694
- format: /(BPS)/,
695
- unformat: /(BPS)/
696
- },
697
- format: function(value, format, roundingFunction) {
698
- var space = numeral._.includes(format, ' BPS') ? ' ' : '',
699
- output;
700
-
701
- value = value * 10000;
702
-
703
- // check for space before BPS
704
- format = format.replace(/\s?BPS/, '');
705
-
706
- output = numeral._.numberToFormat(value, format, roundingFunction);
707
-
708
- if (numeral._.includes(output, ')')) {
709
- output = output.split('');
710
-
711
- output.splice(-1, 0, space + 'BPS');
712
-
713
- output = output.join('');
714
- } else {
715
- output = output + space + 'BPS';
716
- }
717
-
718
- return output;
719
- },
720
- unformat: function(string) {
721
- return +(numeral._.stringToNumber(string) * 0.0001).toFixed(15);
722
- }
723
- });
724
- })();
725
-
726
-
727
- (function() {
728
- var decimal = {
729
- base: 1000,
730
- suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
731
- },
732
- binary = {
733
- base: 1024,
734
- suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
735
- };
736
-
737
- var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) {
738
- return decimal.suffixes.indexOf(item) < 0;
739
- }));
740
- var unformatRegex = allSuffixes.join('|');
741
- // Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp)
742
- unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')';
743
-
744
- numeral.register('format', 'bytes', {
745
- regexps: {
746
- format: /([0\s]i?b)/,
747
- unformat: new RegExp(unformatRegex)
748
- },
749
- format: function(value, format, roundingFunction) {
750
- var output,
751
- bytes = numeral._.includes(format, 'ib') ? binary : decimal,
752
- suffix = numeral._.includes(format, ' b') || numeral._.includes(format, ' ib') ? ' ' : '',
753
- power,
754
- min,
755
- max;
756
-
757
- // check for space before
758
- format = format.replace(/\s?i?b/, '');
759
-
760
- for (power = 0; power <= bytes.suffixes.length; power++) {
761
- min = Math.pow(bytes.base, power);
762
- max = Math.pow(bytes.base, power + 1);
763
-
764
- if (value === null || value === 0 || value >= min && value < max) {
765
- suffix += bytes.suffixes[power];
766
-
767
- if (min > 0) {
768
- value = value / min;
769
- }
770
-
771
- break;
772
- }
773
- }
774
-
775
- output = numeral._.numberToFormat(value, format, roundingFunction);
776
-
777
- return output + suffix;
778
- },
779
- unformat: function(string) {
780
- var value = numeral._.stringToNumber(string),
781
- power,
782
- bytesMultiplier;
783
-
784
- if (value) {
785
- for (power = decimal.suffixes.length - 1; power >= 0; power--) {
786
- if (numeral._.includes(string, decimal.suffixes[power])) {
787
- bytesMultiplier = Math.pow(decimal.base, power);
788
-
789
- break;
790
- }
791
-
792
- if (numeral._.includes(string, binary.suffixes[power])) {
793
- bytesMultiplier = Math.pow(binary.base, power);
794
-
795
- break;
796
- }
797
- }
798
-
799
- value *= (bytesMultiplier || 1);
800
- }
801
-
802
- return value;
803
- }
804
- });
805
- })();
806
-
807
-
808
- (function() {
809
- numeral.register('format', 'currency', {
810
- regexps: {
811
- format: /(\$)/
812
- },
813
- format: function(value, format, roundingFunction) {
814
- var locale = numeral.locales[numeral.options.currentLocale],
815
- symbols = {
816
- before: format.match(/^([\+|\-|\(|\s|\$]*)/)[0],
817
- after: format.match(/([\+|\-|\)|\s|\$]*)$/)[0]
818
- },
819
- output,
820
- symbol,
821
- i;
822
-
823
- // strip format of spaces and $
824
- format = format.replace(/\s?\$\s?/, '');
825
-
826
- // format the number
827
- output = numeral._.numberToFormat(value, format, roundingFunction);
828
-
829
- // update the before and after based on value
830
- if (value >= 0) {
831
- symbols.before = symbols.before.replace(/[\-\(]/, '');
832
- symbols.after = symbols.after.replace(/[\-\)]/, '');
833
- } else if (value < 0 && (!numeral._.includes(symbols.before, '-') && !numeral._.includes(symbols.before, '('))) {
834
- symbols.before = '-' + symbols.before;
835
- }
836
-
837
- // loop through each before symbol
838
- for (i = 0; i < symbols.before.length; i++) {
839
- symbol = symbols.before[i];
840
-
841
- switch (symbol) {
842
- case '$':
843
- output = numeral._.insert(output, locale.currency.symbol, i);
844
- break;
845
- case ' ':
846
- output = numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1);
847
- break;
848
- }
849
- }
850
-
851
- // loop through each after symbol
852
- for (i = symbols.after.length - 1; i >= 0; i--) {
853
- symbol = symbols.after[i];
854
-
855
- switch (symbol) {
856
- case '$':
857
- output = i === symbols.after.length - 1 ? output + locale.currency.symbol : numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i)));
858
- break;
859
- case ' ':
860
- output = i === symbols.after.length - 1 ? output + ' ' : numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1));
861
- break;
862
- }
863
- }
864
-
865
-
866
- return output;
867
- }
868
- });
869
- })();
870
-
871
-
872
- (function() {
873
- numeral.register('format', 'exponential', {
874
- regexps: {
875
- format: /(e\+|e-)/,
876
- unformat: /(e\+|e-)/
877
- },
878
- format: function(value, format, roundingFunction) {
879
- var output,
880
- exponential = typeof value === 'number' && !numeral._.isNaN(value) ? value.toExponential() : '0e+0',
881
- parts = exponential.split('e');
882
-
883
- format = format.replace(/e[\+|\-]{1}0/, '');
884
-
885
- output = numeral._.numberToFormat(Number(parts[0]), format, roundingFunction);
886
-
887
- return output + 'e' + parts[1];
888
- },
889
- unformat: function(string) {
890
- var parts = numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'),
891
- value = Number(parts[0]),
892
- power = Number(parts[1]);
893
-
894
- power = numeral._.includes(string, 'e-') ? power *= -1 : power;
895
-
896
- function cback(accum, curr, currI, O) {
897
- var corrFactor = numeral._.correctionFactor(accum, curr),
898
- num = (accum * corrFactor) * (curr * corrFactor) / (corrFactor * corrFactor);
899
- return num;
900
- }
901
-
902
- return numeral._.reduce([value, Math.pow(10, power)], cback, 1);
903
- }
904
- });
905
- })();
906
-
907
-
908
- (function() {
909
- numeral.register('format', 'ordinal', {
910
- regexps: {
911
- format: /(o)/
912
- },
913
- format: function(value, format, roundingFunction) {
914
- var locale = numeral.locales[numeral.options.currentLocale],
915
- output,
916
- ordinal = numeral._.includes(format, ' o') ? ' ' : '';
917
-
918
- // check for space before
919
- format = format.replace(/\s?o/, '');
920
-
921
- ordinal += locale.ordinal(value);
922
-
923
- output = numeral._.numberToFormat(value, format, roundingFunction);
924
-
925
- return output + ordinal;
926
- }
927
- });
928
- })();
929
-
930
-
931
- (function() {
932
- numeral.register('format', 'percentage', {
933
- regexps: {
934
- format: /(%)/,
935
- unformat: /(%)/
936
- },
937
- format: function(value, format, roundingFunction) {
938
- var space = numeral._.includes(format, ' %') ? ' ' : '',
939
- output;
940
-
941
- if (numeral.options.scalePercentBy100) {
942
- value = value * 100;
943
- }
944
-
945
- // check for space before %
946
- format = format.replace(/\s?\%/, '');
947
-
948
- output = numeral._.numberToFormat(value, format, roundingFunction);
949
-
950
- if (numeral._.includes(output, ')')) {
951
- output = output.split('');
952
-
953
- output.splice(-1, 0, space + '%');
954
-
955
- output = output.join('');
956
- } else {
957
- output = output + space + '%';
958
- }
959
-
960
- return output;
961
- },
962
- unformat: function(string) {
963
- var number = numeral._.stringToNumber(string);
964
- if (numeral.options.scalePercentBy100) {
965
- return number * 0.01;
966
- }
967
- return number;
968
- }
969
- });
970
- })();
971
-
972
-
973
- (function() {
974
- numeral.register('format', 'time', {
975
- regexps: {
976
- format: /(:)/,
977
- unformat: /(:)/
978
- },
979
- format: function(value, format, roundingFunction) {
980
- var hours = Math.floor(value / 60 / 60),
981
- minutes = Math.floor((value - (hours * 60 * 60)) / 60),
982
- seconds = Math.round(value - (hours * 60 * 60) - (minutes * 60));
983
-
984
- return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);
985
- },
986
- unformat: function(string) {
987
- var timeArray = string.split(':'),
988
- seconds = 0;
989
-
990
- // turn hours and minutes into seconds and add them all up
991
- if (timeArray.length === 3) {
992
- // hours
993
- seconds = seconds + (Number(timeArray[0]) * 60 * 60);
994
- // minutes
995
- seconds = seconds + (Number(timeArray[1]) * 60);
996
- // seconds
997
- seconds = seconds + Number(timeArray[2]);
998
- } else if (timeArray.length === 2) {
999
- // minutes
1000
- seconds = seconds + (Number(timeArray[0]) * 60);
1001
- // seconds
1002
- seconds = seconds + Number(timeArray[1]);
1003
- }
1004
- return Number(seconds);
1005
- }
1006
- });
1007
- })();
1008
-
1009
- return numeral;
1010
- }));
1011
- });
1012
-
1013
- const dom = document.documentElement;
1014
- var DateTimeFormatOptionsMonth;
1015
- (function (DateTimeFormatOptionsMonth) {
1016
- DateTimeFormatOptionsMonth["NUMERIC"] = "numeric";
1017
- DateTimeFormatOptionsMonth["DIGIT2"] = "2-digit";
1018
- DateTimeFormatOptionsMonth["LONG"] = "long";
1019
- DateTimeFormatOptionsMonth["SHORT"] = "short";
1020
- DateTimeFormatOptionsMonth["NARROW"] = "narrow";
1021
- })(DateTimeFormatOptionsMonth || (DateTimeFormatOptionsMonth = {}));
1022
- function identify(array) {
1023
- if (array) {
1024
- for (let i = 0; i < array.length; i++) {
1025
- array[i].id = i.toString();
1026
- }
1027
- }
1028
- }
1029
- function getSeparator(locale, separatorType) {
1030
- const numberWithGroupAndDecimalSeparator = 1000.1;
1031
- return Intl.NumberFormat(locale)
1032
- .formatToParts(numberWithGroupAndDecimalSeparator)
1033
- .find((part) => part.type === separatorType).value;
1034
- }
1035
- function getCurrentTimeFormatFromBrowserLocale(manageSeconds) {
1036
- const options = {
1037
- hour: '2-digit',
1038
- minute: '2-digit',
1039
- hour12: false,
1040
- };
1041
- if (manageSeconds == true) {
1042
- options.second = '2-digit';
1043
- }
1044
- const formatObj = new Intl.DateTimeFormat(dom.ketchup.dates.getLocale() + '-u-hc-h23', options).formatToParts(new Date());
1045
- let timeFormat = formatObj
1046
- .map((obj) => {
1047
- switch (obj.type) {
1048
- case 'hour':
1049
- return 'HH';
1050
- case 'minute':
1051
- return 'mm';
1052
- case 'second':
1053
- return 'ss';
1054
- default:
1055
- return obj.value;
1056
- }
1057
- })
1058
- .join('');
1059
- return timeFormat;
1060
- }
1061
- /**
1062
- * Check if an object is undefined, null or empty
1063
- * @param obj the object to check
1064
- * @returns true or false
1065
- */
1066
- function isEmpty(obj) {
1067
- return (!obj ||
1068
- obj === null ||
1069
- (Object.keys(obj).length === 0 && obj.constructor === Object));
1070
- }
1071
- /**
1072
- * @param value number as string, formatted by actual browser locale
1073
- * @param type - type of number for calculate suffix
1074
- * @returns true if number string in input is a valid number
1075
- */
1076
- function isValidFormattedStringNumber(value, type) {
1077
- if (value == null || value.trim() == '') {
1078
- return false;
1079
- }
1080
- let tmpStr = formattedStringToUnformattedStringNumber(value, type);
1081
- if (isNumber(tmpStr)) {
1082
- return true;
1083
- }
1084
- return false;
1085
- }
1086
- function isNumber(value) {
1087
- //return typeof value === 'number';
1088
- return !isNaN(value);
1089
- }
1090
- /**
1091
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
1092
- * @returns number
1093
- **/
1094
- function stringToNumber(input) {
1095
- if (!input || input == null || input.trim() == '') {
1096
- input = '0';
1097
- }
1098
- return numeral(input).value();
1099
- }
1100
- /**
1101
- * @param input number
1102
- * @param decimals number of significant decimal digits for output
1103
- * @returns number as string, formatted by actual browser locale
1104
- **/
1105
- function numberToString(input, decimals) {
1106
- if (input == null) {
1107
- return '';
1108
- }
1109
- return _numberToString(input, decimals, dom.ketchup.dates.getLocale(), true);
1110
- }
1111
- /**
1112
- * @param type - type of number for calculate suffix
1113
- * @returns suffix for number, by type
1114
- **/
1115
- function getNumericValueSuffixByType(type) {
1116
- type = type.toUpperCase();
1117
- let nstr = '';
1118
- if (type == 'P') {
1119
- nstr = ' %';
1120
- }
1121
- else if (type == 'VE') {
1122
- nstr = ' €';
1123
- }
1124
- else if (type == 'VL') {
1125
- nstr = ' £';
1126
- }
1127
- else if (type == 'VV') {
1128
- nstr = ' $';
1129
- }
1130
- return nstr;
1131
- }
1132
- /**
1133
- * @param input number
1134
- * @param decimals number of significant decimal digits for output
1135
- * @param type - type of number for calculate suffix
1136
- * @returns number as string, formatted by actual browser locale, with suffix by type
1137
- **/
1138
- function numberToFormattedStringNumber(input, decimals, type) {
1139
- if (input == null || isNaN(input)) {
1140
- return '';
1141
- }
1142
- let nstr = numberToString(input, decimals);
1143
- nstr = nstr + getNumericValueSuffixByType(type);
1144
- return nstr;
1145
- }
1146
- /**
1147
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
1148
- * @param decimals number of significant decimal digits for output
1149
- * @param type - type of number for calculate suffix
1150
- * @returns number as string, formatted by actual browser locale, with suffix by type
1151
- **/
1152
- function unformattedStringToFormattedStringNumber(input, decimals, type) {
1153
- return numberToFormattedStringNumber(stringToNumber(input), decimals, type);
1154
- }
1155
- /**
1156
- * @param input number as string, formatted by actual browser locale
1157
- * @param type - type of number for calculate suffix
1158
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
1159
- **/
1160
- function formattedStringToUnformattedStringNumber(input, type) {
1161
- return numberStringToNumberString(input, type, getDecimalSeparator(dom.ketchup.dates.getLocale()));
1162
- }
1163
- /**
1164
- * @param input number as string, formatted by locale US, decimal separator . (like java decimal numbers), with group separator
1165
- * @param type - type of number for calculate suffix
1166
- * @returns number as string, formatted by locale US, decimal separator . (like java decimal numbers), without group separator
1167
- **/
1168
- function unformattedStringNumberToNumber(input, type) {
1169
- return numberStringToNumberString(input, type, '.');
1170
- }
1171
- function numberStringToNumberString(input, type, decFmt) {
1172
- if (input == null || input.trim() == '') {
1173
- return '';
1174
- }
1175
- let originalInputValue = input;
1176
- let suffix = getNumericValueSuffixByType(type);
1177
- if (suffix != '') {
1178
- input = input.replace(suffix, '');
1179
- }
1180
- let regExpr = null;
1181
- if (decFmt == '.') {
1182
- regExpr = /,/g;
1183
- }
1184
- else {
1185
- regExpr = /\./g;
1186
- }
1187
- input = input.replace(regExpr, '');
1188
- if (decFmt != '.') {
1189
- input = input.replace(/,/g, '.');
1190
- }
1191
- if (numeral(input).value() == null || isNaN(numeral(input).value())) {
1192
- return originalInputValue;
1193
- }
1194
- let unf = stringToNumber(input);
1195
- return _numberToString(unf, -1, 'en-US', false);
1196
- }
1197
- function getDecimalSeparator(locale) {
1198
- return getSeparator(locale, 'decimal');
1199
- }
1200
- function countDecimals(value) {
1201
- if (Math.floor(value) === value)
1202
- return 0;
1203
- let stringValue = value.toString().split('.')[1];
1204
- if (stringValue) {
1205
- return stringValue.length ? stringValue.length : 0;
1206
- }
1207
- else {
1208
- return 0;
1209
- }
1210
- }
1211
- function _numberToString(input, decimals, locale, useGrouping) {
1212
- if (input == null) {
1213
- input = 0;
1214
- }
1215
- if (decimals == null || decimals == -1) {
1216
- decimals = countDecimals(input);
1217
- }
1218
- let n = Number(input);
1219
- let f = decimals > -1
1220
- ? {
1221
- minimumFractionDigits: decimals,
1222
- maximumFractionDigits: decimals,
1223
- useGrouping: useGrouping,
1224
- }
1225
- : { useGrouping: useGrouping };
1226
- return n.toLocaleString(locale, f);
1227
- }
1228
- /**
1229
- * @param time time as Date object
1230
- * @param manageSeconds flag to set seconds managing
1231
- * @return time as string, formatted
1232
- **/
1233
- function formatTime(time, manageSeconds) {
1234
- const options = {
1235
- hour: '2-digit',
1236
- minute: '2-digit',
1237
- hour12: false,
1238
- };
1239
- if (manageSeconds == true) {
1240
- options.second = '2-digit';
1241
- }
1242
- return time.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
1243
- }
1244
- /**
1245
- * @param value time string, formatted by actual browser locale
1246
- * @returns true if time string in input is a valid time
1247
- */
1248
- function isValidFormattedStringTime(value, manageSeconds) {
1249
- let format = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
1250
- return dom.ketchup.dates.isValid(value, format, true);
1251
- }
1252
- /**
1253
- * @param value date/time as string, formatted by actual browser locale
1254
- * @returns date/time as string, formatted ISO
1255
- **/
1256
- function formattedStringToDefaultUnformattedStringTimestamp(value) {
1257
- return formattedStringToCustomUnformattedStringTime(value, KupDatesFormats.ISO_DATE_TIME, true);
1258
- }
1259
- /**
1260
- * @param value time as string, formatted by actual browser locale
1261
- * @param outputFormat time format to return
1262
- * @param manageSeconds flag to set seconds managing
1263
- * @returns time as string, formatted
1264
- **/
1265
- function formattedStringToCustomUnformattedStringTime(value, outputFormat, manageSeconds) {
1266
- let inputFormat = getCurrentTimeFormatFromBrowserLocale(manageSeconds);
1267
- if (dom.ketchup.dates.isValid(value, inputFormat)) {
1268
- return dom.ketchup.dates.format(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIME), outputFormat);
1269
- }
1270
- else {
1271
- return '';
1272
- }
1273
- }
1274
- /**
1275
- * @param value time as string, formatted ISO
1276
- * @param manageSeconds flag to set seconds managing
1277
- * @param valueTimeFormat time format (default ISO)
1278
- * @param customedFormat time format from smeupObject
1279
- * @returns time as string, formatted by actual browser locale
1280
- **/
1281
- function unformattedStringToFormattedStringTime(value, manageSeconds, customedFormat) {
1282
- const options = {
1283
- hour: '2-digit',
1284
- minute: '2-digit',
1285
- hour12: false,
1286
- };
1287
- if (manageSeconds == true) {
1288
- options.second = '2-digit';
1289
- }
1290
- let date = dom.ketchup.dates.toDate(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIME));
1291
- return formatByCustomedOutputTimeFormat(value, date, options, customedFormat);
1292
- }
1293
- function formatByCustomedOutputTimeFormat(valueStr, date, options, customedFormat) {
1294
- if (customedFormat == null) {
1295
- return date.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
1296
- }
1297
- switch (customedFormat) {
1298
- case 'I13': {
1299
- //hh:mm
1300
- break;
1301
- }
1302
- case 'I12': {
1303
- //hh:mm:ss
1304
- break;
1305
- }
1306
- case 'I11': {
1307
- //???
1308
- //hh:dddd
1309
- //return moment(date).format('HH:DDDD');
1310
- return valueStr;
1311
- }
1312
- case 'I14': {
1313
- //???
1314
- //sssss
1315
- //return moment(date).format('SSSSS');
1316
- return valueStr;
1317
- }
1318
- case 'I1H': {
1319
- //???
1320
- //Ora,Cen/Min HH,xx
1321
- return valueStr;
1322
- }
1323
- case 'I1M': {
1324
- //???
1325
- //Min,Cen/Sec MMMM,xx
1326
- return valueStr;
1327
- }
1328
- case 'I21': {
1329
- //???
1330
- //Giorni,(4 decim)
1331
- return valueStr;
1332
- }
1333
- case 'I22': {
1334
- //???
1335
- //Ore,(4 decim)
1336
- return valueStr;
1337
- }
1338
- case 'I23': {
1339
- //???
1340
- //Minuti,(4 decim)
1341
- return valueStr;
1342
- }
1343
- case 'I24': {
1344
- //???
1345
- //Secondi
1346
- return valueStr;
1347
- }
1348
- case 'I2H': {
1349
- //???
1350
- //Ora,Cen/Min HHHH,xx
1351
- return valueStr;
1352
- }
1353
- case 'I2D': {
1354
- //???
1355
- //Ore Minuti Secondi HHMMS
1356
- return valueStr;
1357
- }
1358
- case 'I2M': {
1359
- //???
1360
- //Min,Cen/Sec MMMM,xx
1361
- return valueStr;
1362
- }
1363
- }
1364
- return date.toLocaleTimeString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
1365
- }
1366
- /**
1367
- * @param value date/time as string, formatted ISO
1368
- * @param valueDateFormat date/time format (default ISO)
1369
- * @returns date/time as string, formatted by actual browser locale
1370
- **/
1371
- function unformattedStringToFormattedStringTimestamp(value) {
1372
- const options = {
1373
- day: '2-digit',
1374
- month: '2-digit',
1375
- year: 'numeric',
1376
- hour: '2-digit',
1377
- minute: '2-digit',
1378
- second: '2-digit',
1379
- hour12: false,
1380
- };
1381
- let date = dom.ketchup.dates.toDate(dom.ketchup.dates.normalize(value, KupDatesNormalize.TIMESTAMP));
1382
- return date.toLocaleString(dom.ketchup.dates.getLocale() + '-u-hc-h23', options);
1383
- }
1384
- function getMonthAsStringByLocale(month, format) {
1385
- if (month == null) {
1386
- return '';
1387
- }
1388
- const dateTmp = new Date();
1389
- dateTmp.setDate(1);
1390
- dateTmp.setMonth(month - 1);
1391
- const options = {
1392
- month: format,
1393
- };
1394
- const dateTimeFormat = new Intl.DateTimeFormat(dom.ketchup.dates.getLocale(), options);
1395
- return dateTimeFormat.format(dateTmp);
1396
- }
1397
- function getMonthsAsStringByLocale(format) {
1398
- if (format == null || format.trim() == '') {
1399
- format = DateTimeFormatOptionsMonth.LONG;
1400
- }
1401
- var months = [];
1402
- for (var i = 0; i < 12; i++) {
1403
- months[i] = getMonthAsStringByLocale(i + 1, format);
1404
- }
1405
- return months;
1406
- }
1407
- function deepEqual(object1, object2) {
1408
- if (!(isObject(object1) && isObject(object2))) {
1409
- return object1 === object2;
1410
- }
1411
- const keys1 = Object.keys(object1);
1412
- const keys2 = Object.keys(object2);
1413
- if (keys1.length !== keys2.length) {
1414
- return false;
1415
- }
1416
- for (const key of keys1) {
1417
- const val1 = object1[key];
1418
- const val2 = object2[key];
1419
- const areObjects = isObject(val1) && isObject(val2);
1420
- if ((areObjects && !deepEqual(val1, val2)) ||
1421
- (!areObjects && val1 !== val2)) {
1422
- return false;
1423
- }
1424
- }
1425
- return true;
1426
- }
1427
- function isObject(object) {
1428
- return object != null && typeof object === 'object';
1429
- }
1430
- /**
1431
- * Used to retrieve component's props values.
1432
- * @param {any} comp - Component calling this function.
1433
- * @param {GenericObject} list - Prop list, specific for each component.
1434
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
1435
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
1436
- */
1437
- function getProps(comp, list, descriptions) {
1438
- let props = {};
1439
- if (descriptions) {
1440
- props = list;
1441
- }
1442
- else {
1443
- for (const key in list) {
1444
- if (Object.prototype.hasOwnProperty.call(list, key)) {
1445
- props[key] = comp[key];
1446
- }
1447
- }
1448
- }
1449
- return props;
1450
- }
1451
- /**
1452
- * Sets the props to the component.
1453
- * @param {any} comp - Component calling this function.
1454
- * @param {GenericObject} list - Prop list, specific for each component.
1455
- * @param {GenericObject} props - Prop to be set.
1456
- */
1457
- function setProps(comp, list, props) {
1458
- for (const key in props) {
1459
- // If key is a custom prop it will be set on the component (i.e.: "data", "customStyle", ecc.)
1460
- if (list[key]) {
1461
- comp[key] = props[key];
1462
- }
1463
- else {
1464
- // Otherwise, it will be set on its HTML element (i.e.: "id", "style", ecc.)
1465
- comp.rootElement[key] = props[key];
1466
- }
1467
- }
1468
- }
1469
-
1470
- export { DateTimeFormatOptionsMonth as D, formattedStringToDefaultUnformattedStringTimestamp as a, isValidFormattedStringNumber as b, formattedStringToUnformattedStringNumber as c, stringToNumber as d, isNumber as e, formattedStringToCustomUnformattedStringTime as f, getProps as g, isEmpty as h, isValidFormattedStringTime as i, deepEqual as j, identify as k, getMonthsAsStringByLocale as l, numberToFormattedStringNumber as m, numeral as n, unformattedStringToFormattedStringNumber as o, formatTime as p, unformattedStringToFormattedStringTime as q, unformattedStringToFormattedStringTimestamp as r, setProps as s, getDecimalSeparator as t, unformattedStringNumberToNumber as u };