@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
@@ -0,0 +1,1165 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
+ if (kind === "m") throw new TypeError("Private method is not writable");
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
+ };
12
+ var _KupEchart_instances, _KupEchart_kupManager, _KupEchart_resizeTimeout, _KupEchart_chartContainer, _KupEchart_chartEl, _KupEchart_gaussianDatasets, _KupEchart_sortedDataset, _KupEchart_themeBorder, _KupEchart_themeBackground, _KupEchart_themeColors, _KupEchart_themeColorBrighter, _KupEchart_themeColorDarker, _KupEchart_themeFont, _KupEchart_themeText, _KupEchart_mapObj, _KupEchart_initChart, _KupEchart_createChart, _KupEchart_createX, _KupEchart_createY, _KupEchart_setAxisColors, _KupEchart_setLegend, _KupEchart_setTitle, _KupEchart_setTooltip, _KupEchart_setVisualMap, _KupEchart_setMapOptions, _KupEchart_setPieOptions, _KupEchart_setGaussianOptions, _KupEchart_addSeries, _KupEchart_setOptions, _KupEchart_fetchThemeColors;
13
+ import { Component, Element, Event, forceUpdate, getAssetPath, Host, h, Method, Prop, } from '@stencil/core';
14
+ import * as echarts from 'echarts';
15
+ import { KupEchartLegendPlacement, KupEchartMaps, KupEchartProps, KupEchartTypes, } from './kup-echart-declarations';
16
+ import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
17
+ import { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';
18
+ import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';
19
+ import { getProps, setProps } from '../../utils/utils';
20
+ import { componentWrapperId } from '../../variables/GenericVariables';
21
+ import { getColumnByName } from '../../utils/cell-utils';
22
+ export class KupEchart {
23
+ constructor() {
24
+ _KupEchart_instances.add(this);
25
+ /*-------------------------------------------------*/
26
+ /* P r o p s */
27
+ /*-------------------------------------------------*/
28
+ /**
29
+ * Sets the axis of the chart.
30
+ * @default ""
31
+ */
32
+ this.axis = '';
33
+ /**
34
+ * Title of the graph.
35
+ * @default null
36
+ */
37
+ this.chartTitle = null;
38
+ /**
39
+ * Custom style of the component.
40
+ * @default ""
41
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
42
+ */
43
+ this.customStyle = '';
44
+ /**
45
+ * The actual data of the chart.
46
+ * @default null
47
+ */
48
+ this.data = null;
49
+ /**
50
+ * Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work.
51
+ * @default KupEchartLegendPlacement.RIGHT
52
+ */
53
+ this.legend = KupEchartLegendPlacement.RIGHT;
54
+ /**
55
+ * Choose which map you want to view, supported values: "europe", "africa", "asia", "oceania", "america", "italy" and "world". It's possible to supply a custom JSON too.
56
+ * @default null
57
+ */
58
+ this.map = null;
59
+ /**
60
+ * The data series to be displayed. They must be of the same type.
61
+ * @default []
62
+ */
63
+ this.series = [];
64
+ /**
65
+ * The width of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.).
66
+ * @default "100%"
67
+ */
68
+ this.sizeX = '100%';
69
+ /**
70
+ * The height of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.).
71
+ * @default "100%"
72
+ */
73
+ this.sizeY = '100%';
74
+ /**
75
+ * The type of the chart. Supported formats: Bar, Gaussian, Line, Pie, Map and Scatter.
76
+ * @default [KupEchartTypes.LINE]
77
+ */
78
+ this.types = [KupEchartTypes.LINE];
79
+ /**
80
+ * Customization options for the x Axis.
81
+ * @default null
82
+ */
83
+ this.xAxis = null;
84
+ /**
85
+ * Customization options for the y Axis.
86
+ * @default null
87
+ */
88
+ this.yAxis = null;
89
+ /*-------------------------------------------------*/
90
+ /* I n t e r n a l V a r i a b l e s */
91
+ /*-------------------------------------------------*/
92
+ _KupEchart_kupManager.set(this, kupManagerInstance());
93
+ _KupEchart_resizeTimeout.set(this, void 0);
94
+ _KupEchart_chartContainer.set(this, void 0);
95
+ _KupEchart_chartEl.set(this, void 0);
96
+ _KupEchart_gaussianDatasets.set(this, void 0);
97
+ _KupEchart_sortedDataset.set(this, null);
98
+ _KupEchart_themeBorder.set(this, null);
99
+ _KupEchart_themeBackground.set(this, null);
100
+ _KupEchart_themeColors.set(this, null);
101
+ _KupEchart_themeColorBrighter.set(this, null);
102
+ _KupEchart_themeColorDarker.set(this, null);
103
+ _KupEchart_themeFont.set(this, null);
104
+ _KupEchart_themeText.set(this, null);
105
+ _KupEchart_mapObj.set(this, {});
106
+ }
107
+ /*-------------------------------------------------*/
108
+ /* P u b l i c M e t h o d s */
109
+ /*-------------------------------------------------*/
110
+ /**
111
+ * Used to retrieve component's props values.
112
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
113
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
114
+ */
115
+ async getProps(descriptions) {
116
+ return getProps(this, KupEchartProps, descriptions);
117
+ }
118
+ /**
119
+ * This method is used to trigger a new render of the component.
120
+ */
121
+ async refresh() {
122
+ forceUpdate(this);
123
+ }
124
+ /**
125
+ * This method is invoked by KupManager whenever the component changes size.
126
+ */
127
+ async resizeCallback() {
128
+ window.clearTimeout(__classPrivateFieldGet(this, _KupEchart_resizeTimeout, "f"));
129
+ __classPrivateFieldSet(this, _KupEchart_resizeTimeout, window.setTimeout(() => this.refresh(), 300), "f");
130
+ }
131
+ /**
132
+ * Sets the props to the component.
133
+ * @param {GenericObject} props - Object containing props that will be set to the component.
134
+ */
135
+ async setProps(props) {
136
+ setProps(this, KupEchartProps, props);
137
+ }
138
+ /*-------------------------------------------------*/
139
+ /* L i f e c y c l e H o o k s */
140
+ /*-------------------------------------------------*/
141
+ componentWillLoad() {
142
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logLoad(this, false);
143
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.register(this);
144
+ }
145
+ componentDidLoad() {
146
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").resize.observe(this.rootElement);
147
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logLoad(this, true);
148
+ }
149
+ componentWillRender() {
150
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logRender(this, false);
151
+ __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_fetchThemeColors).call(this);
152
+ }
153
+ componentDidRender() {
154
+ if (this.data && this.data.columns && this.data.rows) {
155
+ __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_initChart).call(this);
156
+ }
157
+ else {
158
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, 'Insufficient data.(' + this.data + ')', KupDebugCategory.WARNING);
159
+ }
160
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logRender(this, true);
161
+ }
162
+ render() {
163
+ const style = {
164
+ '--kup_echart_height': this.sizeY ? this.sizeY : '100%',
165
+ '--kup_echart_width': this.sizeX ? this.sizeX : '100%',
166
+ };
167
+ return (h(Host, { style: style },
168
+ h("style", null, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.setKupStyle(this.rootElement)),
169
+ h("div", { id: componentWrapperId, ref: (chartContainer) => (__classPrivateFieldSet(this, _KupEchart_chartContainer, chartContainer, "f")) })));
170
+ }
171
+ disconnectedCallback() {
172
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.unregister(this);
173
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").resize.unobserve(this.rootElement);
174
+ }
175
+ static get is() { return "kup-echart"; }
176
+ static get encapsulation() { return "shadow"; }
177
+ static get originalStyleUrls() { return {
178
+ "$": ["kup-echart.scss"]
179
+ }; }
180
+ static get styleUrls() { return {
181
+ "$": ["kup-echart.css"]
182
+ }; }
183
+ static get assetsDirs() { return ["assets/maps"]; }
184
+ static get properties() { return {
185
+ "axis": {
186
+ "type": "string",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "string",
190
+ "resolved": "string",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [{
197
+ "name": "default",
198
+ "text": "\"\""
199
+ }],
200
+ "text": "Sets the axis of the chart."
201
+ },
202
+ "attribute": "axis",
203
+ "reflect": false,
204
+ "defaultValue": "''"
205
+ },
206
+ "chartTitle": {
207
+ "type": "unknown",
208
+ "mutable": false,
209
+ "complexType": {
210
+ "original": "KupEchartTitle",
211
+ "resolved": "KupEchartTitle",
212
+ "references": {
213
+ "KupEchartTitle": {
214
+ "location": "import",
215
+ "path": "./kup-echart-declarations"
216
+ }
217
+ }
218
+ },
219
+ "required": false,
220
+ "optional": false,
221
+ "docs": {
222
+ "tags": [{
223
+ "name": "default",
224
+ "text": "null"
225
+ }],
226
+ "text": "Title of the graph."
227
+ },
228
+ "defaultValue": "null"
229
+ },
230
+ "customStyle": {
231
+ "type": "string",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "string",
235
+ "resolved": "string",
236
+ "references": {}
237
+ },
238
+ "required": false,
239
+ "optional": false,
240
+ "docs": {
241
+ "tags": [{
242
+ "name": "default",
243
+ "text": "\"\""
244
+ }, {
245
+ "name": "see",
246
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
247
+ }],
248
+ "text": "Custom style of the component."
249
+ },
250
+ "attribute": "custom-style",
251
+ "reflect": false,
252
+ "defaultValue": "''"
253
+ },
254
+ "data": {
255
+ "type": "unknown",
256
+ "mutable": false,
257
+ "complexType": {
258
+ "original": "KupDataDataset",
259
+ "resolved": "KupDataDataset",
260
+ "references": {
261
+ "KupDataDataset": {
262
+ "location": "import",
263
+ "path": "../../managers/kup-data/kup-data-declarations"
264
+ }
265
+ }
266
+ },
267
+ "required": false,
268
+ "optional": false,
269
+ "docs": {
270
+ "tags": [{
271
+ "name": "default",
272
+ "text": "null"
273
+ }],
274
+ "text": "The actual data of the chart."
275
+ },
276
+ "defaultValue": "null"
277
+ },
278
+ "legend": {
279
+ "type": "string",
280
+ "mutable": false,
281
+ "complexType": {
282
+ "original": "KupEchartLegendPlacement",
283
+ "resolved": "KupEchartLegendPlacement.BOTTOM | KupEchartLegendPlacement.LEFT | KupEchartLegendPlacement.RIGHT | KupEchartLegendPlacement.TOP",
284
+ "references": {
285
+ "KupEchartLegendPlacement": {
286
+ "location": "import",
287
+ "path": "./kup-echart-declarations"
288
+ }
289
+ }
290
+ },
291
+ "required": false,
292
+ "optional": false,
293
+ "docs": {
294
+ "tags": [{
295
+ "name": "default",
296
+ "text": "KupEchartLegendPlacement.RIGHT"
297
+ }],
298
+ "text": "Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work."
299
+ },
300
+ "attribute": "legend",
301
+ "reflect": false,
302
+ "defaultValue": "KupEchartLegendPlacement.RIGHT"
303
+ },
304
+ "map": {
305
+ "type": "string",
306
+ "mutable": false,
307
+ "complexType": {
308
+ "original": "KupEchartMaps | string | GeoJSON",
309
+ "resolved": "Feature<Geometry, { [name: string]: any; }> | FeatureCollection<Geometry, { [name: string]: any; }> | GeometryCollection | LineString | MultiLineString | MultiPoint | MultiPolygon | Point | Polygon | string",
310
+ "references": {
311
+ "KupEchartMaps": {
312
+ "location": "import",
313
+ "path": "./kup-echart-declarations"
314
+ },
315
+ "GeoJSON": {
316
+ "location": "import",
317
+ "path": "geojson"
318
+ }
319
+ }
320
+ },
321
+ "required": false,
322
+ "optional": false,
323
+ "docs": {
324
+ "tags": [{
325
+ "name": "default",
326
+ "text": "null"
327
+ }],
328
+ "text": "Choose which map you want to view, supported values: \"europe\", \"africa\", \"asia\", \"oceania\", \"america\", \"italy\" and \"world\". It's possible to supply a custom JSON too."
329
+ },
330
+ "attribute": "map",
331
+ "reflect": false,
332
+ "defaultValue": "null"
333
+ },
334
+ "series": {
335
+ "type": "unknown",
336
+ "mutable": false,
337
+ "complexType": {
338
+ "original": "string[]",
339
+ "resolved": "string[]",
340
+ "references": {}
341
+ },
342
+ "required": false,
343
+ "optional": false,
344
+ "docs": {
345
+ "tags": [{
346
+ "name": "default",
347
+ "text": "[]"
348
+ }],
349
+ "text": "The data series to be displayed. They must be of the same type."
350
+ },
351
+ "defaultValue": "[]"
352
+ },
353
+ "sizeX": {
354
+ "type": "string",
355
+ "mutable": false,
356
+ "complexType": {
357
+ "original": "string",
358
+ "resolved": "string",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": false,
363
+ "docs": {
364
+ "tags": [{
365
+ "name": "default",
366
+ "text": "\"100%\""
367
+ }],
368
+ "text": "The width of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.)."
369
+ },
370
+ "attribute": "size-x",
371
+ "reflect": false,
372
+ "defaultValue": "'100%'"
373
+ },
374
+ "sizeY": {
375
+ "type": "string",
376
+ "mutable": false,
377
+ "complexType": {
378
+ "original": "string",
379
+ "resolved": "string",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": false,
384
+ "docs": {
385
+ "tags": [{
386
+ "name": "default",
387
+ "text": "\"100%\""
388
+ }],
389
+ "text": "The height of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.)."
390
+ },
391
+ "attribute": "size-y",
392
+ "reflect": false,
393
+ "defaultValue": "'100%'"
394
+ },
395
+ "types": {
396
+ "type": "unknown",
397
+ "mutable": false,
398
+ "complexType": {
399
+ "original": "KupEchartTypes[]",
400
+ "resolved": "KupEchartTypes[]",
401
+ "references": {
402
+ "KupEchartTypes": {
403
+ "location": "import",
404
+ "path": "./kup-echart-declarations"
405
+ }
406
+ }
407
+ },
408
+ "required": false,
409
+ "optional": false,
410
+ "docs": {
411
+ "tags": [{
412
+ "name": "default",
413
+ "text": "[KupEchartTypes.LINE]"
414
+ }],
415
+ "text": "The type of the chart. Supported formats: Bar, Gaussian, Line, Pie, Map and Scatter."
416
+ },
417
+ "defaultValue": "[KupEchartTypes.LINE]"
418
+ },
419
+ "xAxis": {
420
+ "type": "unknown",
421
+ "mutable": false,
422
+ "complexType": {
423
+ "original": "XAXisComponentOption",
424
+ "resolved": "AxisBaseOptionCommon & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"xAxis\"; } | CategoryAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"xAxis\"; } | LogAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"xAxis\"; } | TimeAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"xAxis\"; } | ValueAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"xAxis\"; }",
425
+ "references": {
426
+ "XAXisComponentOption": {
427
+ "location": "import",
428
+ "path": "echarts"
429
+ }
430
+ }
431
+ },
432
+ "required": false,
433
+ "optional": false,
434
+ "docs": {
435
+ "tags": [{
436
+ "name": "default",
437
+ "text": "null"
438
+ }],
439
+ "text": "Customization options for the x Axis."
440
+ },
441
+ "defaultValue": "null"
442
+ },
443
+ "yAxis": {
444
+ "type": "unknown",
445
+ "mutable": false,
446
+ "complexType": {
447
+ "original": "YAXisComponentOption",
448
+ "resolved": "AxisBaseOptionCommon & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"yAxis\"; } | CategoryAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"yAxis\"; } | LogAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"yAxis\"; } | TimeAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"yAxis\"; } | ValueAxisBaseOption & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { mainType?: \"yAxis\"; }",
449
+ "references": {
450
+ "YAXisComponentOption": {
451
+ "location": "import",
452
+ "path": "echarts"
453
+ }
454
+ }
455
+ },
456
+ "required": false,
457
+ "optional": false,
458
+ "docs": {
459
+ "tags": [{
460
+ "name": "default",
461
+ "text": "null"
462
+ }],
463
+ "text": "Customization options for the y Axis."
464
+ },
465
+ "defaultValue": "null"
466
+ }
467
+ }; }
468
+ static get events() { return [{
469
+ "method": "kupEchartClick",
470
+ "name": "kup-echart-click",
471
+ "bubbles": true,
472
+ "cancelable": false,
473
+ "composed": true,
474
+ "docs": {
475
+ "tags": [],
476
+ "text": ""
477
+ },
478
+ "complexType": {
479
+ "original": "KupEchartClickEventPayload",
480
+ "resolved": "KupEchartClickEventPayload",
481
+ "references": {
482
+ "KupEchartClickEventPayload": {
483
+ "location": "import",
484
+ "path": "./kup-echart-declarations"
485
+ }
486
+ }
487
+ }
488
+ }]; }
489
+ static get methods() { return {
490
+ "getProps": {
491
+ "complexType": {
492
+ "signature": "(descriptions?: boolean) => Promise<GenericObject>",
493
+ "parameters": [{
494
+ "tags": [{
495
+ "name": "param",
496
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
497
+ }],
498
+ "text": "- When provided and true, the result will be the list of props with their description."
499
+ }],
500
+ "references": {
501
+ "Promise": {
502
+ "location": "global"
503
+ },
504
+ "GenericObject": {
505
+ "location": "import",
506
+ "path": "../../types/GenericTypes"
507
+ }
508
+ },
509
+ "return": "Promise<GenericObject>"
510
+ },
511
+ "docs": {
512
+ "text": "Used to retrieve component's props values.",
513
+ "tags": [{
514
+ "name": "param",
515
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
516
+ }, {
517
+ "name": "returns",
518
+ "text": "List of props as object, each key will be a prop."
519
+ }]
520
+ }
521
+ },
522
+ "refresh": {
523
+ "complexType": {
524
+ "signature": "() => Promise<void>",
525
+ "parameters": [],
526
+ "references": {
527
+ "Promise": {
528
+ "location": "global"
529
+ }
530
+ },
531
+ "return": "Promise<void>"
532
+ },
533
+ "docs": {
534
+ "text": "This method is used to trigger a new render of the component.",
535
+ "tags": []
536
+ }
537
+ },
538
+ "resizeCallback": {
539
+ "complexType": {
540
+ "signature": "() => Promise<void>",
541
+ "parameters": [],
542
+ "references": {
543
+ "Promise": {
544
+ "location": "global"
545
+ }
546
+ },
547
+ "return": "Promise<void>"
548
+ },
549
+ "docs": {
550
+ "text": "This method is invoked by KupManager whenever the component changes size.",
551
+ "tags": []
552
+ }
553
+ },
554
+ "setProps": {
555
+ "complexType": {
556
+ "signature": "(props: GenericObject) => Promise<void>",
557
+ "parameters": [{
558
+ "tags": [{
559
+ "name": "param",
560
+ "text": "props - Object containing props that will be set to the component."
561
+ }],
562
+ "text": "- Object containing props that will be set to the component."
563
+ }],
564
+ "references": {
565
+ "Promise": {
566
+ "location": "global"
567
+ },
568
+ "GenericObject": {
569
+ "location": "import",
570
+ "path": "../../types/GenericTypes"
571
+ }
572
+ },
573
+ "return": "Promise<void>"
574
+ },
575
+ "docs": {
576
+ "text": "Sets the props to the component.",
577
+ "tags": [{
578
+ "name": "param",
579
+ "text": "props - Object containing props that will be set to the component."
580
+ }]
581
+ }
582
+ }
583
+ }; }
584
+ static get elementRef() { return "rootElement"; }
585
+ }
586
+ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(), _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _KupEchart_gaussianDatasets = new WeakMap(), _KupEchart_sortedDataset = new WeakMap(), _KupEchart_themeBorder = new WeakMap(), _KupEchart_themeBackground = new WeakMap(), _KupEchart_themeColors = new WeakMap(), _KupEchart_themeColorBrighter = new WeakMap(), _KupEchart_themeColorDarker = new WeakMap(), _KupEchart_themeFont = new WeakMap(), _KupEchart_themeText = new WeakMap(), _KupEchart_mapObj = new WeakMap(), _KupEchart_instances = new WeakSet(), _KupEchart_initChart = function _KupEchart_initChart() {
587
+ if (__classPrivateFieldGet(this, _KupEchart_chartEl, "f")) {
588
+ echarts.dispose(__classPrivateFieldGet(this, _KupEchart_chartContainer, "f"));
589
+ }
590
+ if (this.types && this.types.length > 0) {
591
+ __classPrivateFieldSet(this, _KupEchart_chartEl, echarts.init(__classPrivateFieldGet(this, _KupEchart_chartContainer, "f")), "f");
592
+ __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createChart).call(this);
593
+ }
594
+ else {
595
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, "Can't intialize chart without specifiying at least 1 type.", KupDebugCategory.WARNING);
596
+ }
597
+ }, _KupEchart_createChart = async function _KupEchart_createChart() {
598
+ __classPrivateFieldSet(this, _KupEchart_sortedDataset, null, "f");
599
+ if (!this.types.includes(KupEchartTypes.GAUSSIAN) &&
600
+ (!this.axis ||
601
+ !__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
602
+ name: this.axis,
603
+ }).length)) {
604
+ for (let index = 0; index < this.data.columns.length; index++) {
605
+ const column = this.data.columns[index];
606
+ if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
607
+ this.axis = column.name;
608
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, 'Axis overridden. (' + this.axis + ')', KupDebugCategory.WARNING);
609
+ break;
610
+ }
611
+ }
612
+ }
613
+ let options = null;
614
+ const firstType = this.types[0];
615
+ switch (firstType) {
616
+ case KupEchartTypes.GAUSSIAN:
617
+ options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setGaussianOptions).call(this);
618
+ break;
619
+ case KupEchartTypes.MAP:
620
+ let stringifiedMap = '';
621
+ if (this.map) {
622
+ if (this.map.features) {
623
+ stringifiedMap = JSON.stringify(this.map);
624
+ }
625
+ else if (Object.values(KupEchartMaps).includes(this.map)) {
626
+ stringifiedMap = await (await fetch(getAssetPath(`./assets/maps/${this.map}.json`))).text();
627
+ }
628
+ else {
629
+ stringifiedMap = this.map;
630
+ }
631
+ }
632
+ if (!stringifiedMap) {
633
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, "Couldn't fetch map JSON.", KupDebugCategory.WARNING);
634
+ return;
635
+ }
636
+ echarts.registerMap(this.rootElement.id ? this.rootElement.id : '', stringifiedMap);
637
+ options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setMapOptions).call(this, stringifiedMap);
638
+ break;
639
+ case KupEchartTypes.PIE:
640
+ options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setPieOptions).call(this);
641
+ break;
642
+ default:
643
+ options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setOptions).call(this);
644
+ break;
645
+ }
646
+ __classPrivateFieldGet(this, _KupEchart_chartEl, "f").setOption(options, true);
647
+ __classPrivateFieldGet(this, _KupEchart_chartEl, "f").on('click', (e) => {
648
+ const column = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
649
+ title: e.seriesName,
650
+ })[0];
651
+ let row = null;
652
+ if (e.seriesType === 'map') {
653
+ row = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.row.find(this.data, {
654
+ value: __classPrivateFieldGet(this, _KupEchart_mapObj, "f")[e.name],
655
+ })[0];
656
+ }
657
+ else if (__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f") && e.seriesType === 'bar') {
658
+ row = __classPrivateFieldGet(this, _KupEchart_sortedDataset, "f").rows[e.dataIndex];
659
+ }
660
+ else if (!Array.isArray(e.data)) {
661
+ row = this.data.rows[e.dataIndex];
662
+ }
663
+ this.kupEchartClick.emit({
664
+ comp: this,
665
+ id: this.rootElement.id,
666
+ column: column,
667
+ row: row,
668
+ x: Array.isArray(e.data) ? e.data[0] : e.name,
669
+ y: Array.isArray(e.data) ? e.data[1] : e.value,
670
+ });
671
+ });
672
+ }, _KupEchart_createX = function _KupEchart_createX(dataset = null) {
673
+ const x = [];
674
+ if (!dataset)
675
+ dataset = this.data;
676
+ if (!this.axis) {
677
+ for (let i = 0; i < dataset.rows.length; i++) {
678
+ const cells = dataset.rows[i].cells;
679
+ const treatedCells = {};
680
+ for (const key in cells) {
681
+ const cell = cells[key];
682
+ const title = getColumnByName(dataset.columns, key).title;
683
+ treatedCells[title] = cell;
684
+ }
685
+ if (treatedCells[0]) {
686
+ x.push(treatedCells[0].value);
687
+ }
688
+ }
689
+ }
690
+ else {
691
+ for (let i = 0; i < dataset.rows.length; i++) {
692
+ const cells = dataset.rows[i].cells;
693
+ const treatedCells = {};
694
+ const title = getColumnByName(dataset.columns, this.axis).title;
695
+ treatedCells[title] = cells[this.axis];
696
+ x.push(treatedCells[title].value);
697
+ }
698
+ }
699
+ return x;
700
+ }, _KupEchart_createY = function _KupEchart_createY() {
701
+ const y = {};
702
+ if (this.series && this.series.length > 0) {
703
+ for (const row of this.data.rows) {
704
+ for (const key of Object.keys(row.cells)) {
705
+ if (key != this.axis) {
706
+ if (this.series.includes(key)) {
707
+ const cell = row.cells[key];
708
+ const value = cell.value;
709
+ const column = getColumnByName(this.data.columns, key);
710
+ if (column) {
711
+ const title = column.title;
712
+ if (!y[title]) {
713
+ y[title] = [];
714
+ }
715
+ y[title].push(value);
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ else {
723
+ for (const row of this.data.rows) {
724
+ for (const key of Object.keys(row.cells)) {
725
+ if (key !== this.axis) {
726
+ const cell = row.cells[key];
727
+ const value = cell.value;
728
+ const column = getColumnByName(this.data.columns, key);
729
+ if (column) {
730
+ const title = column.title;
731
+ if (!y[title]) {
732
+ y[title] = [];
733
+ }
734
+ y[title].push(value);
735
+ }
736
+ }
737
+ }
738
+ }
739
+ }
740
+ return y;
741
+ }, _KupEchart_setAxisColors = function _KupEchart_setAxisColors() {
742
+ return {
743
+ axisLabel: {
744
+ color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
745
+ fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
746
+ },
747
+ axisLine: { lineStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeText, "f") } },
748
+ axisTick: { lineStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeBorder, "f") } },
749
+ splitLine: { lineStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeBorder, "f") } },
750
+ };
751
+ }, _KupEchart_setLegend = function _KupEchart_setLegend(y) {
752
+ const data = [];
753
+ for (let key in y) {
754
+ data.push(key);
755
+ }
756
+ return {
757
+ data: data,
758
+ [this.legend]: 0,
759
+ textStyle: {
760
+ color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
761
+ fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
762
+ },
763
+ };
764
+ }, _KupEchart_setTitle = function _KupEchart_setTitle() {
765
+ return {
766
+ text: this.chartTitle ? this.chartTitle.value : undefined,
767
+ [this.chartTitle && this.chartTitle.position
768
+ ? this.chartTitle.position
769
+ : 'left']: 0,
770
+ textStyle: {
771
+ color: this.chartTitle && this.chartTitle.color
772
+ ? this.chartTitle.color
773
+ : 'black',
774
+ fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
775
+ fontSize: this.chartTitle && this.chartTitle.size
776
+ ? this.chartTitle.size
777
+ : 16,
778
+ },
779
+ };
780
+ }, _KupEchart_setTooltip = function _KupEchart_setTooltip() {
781
+ return {
782
+ backgroundColor: __classPrivateFieldGet(this, _KupEchart_themeBackground, "f"),
783
+ textStyle: {
784
+ color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
785
+ fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
786
+ },
787
+ };
788
+ }, _KupEchart_setVisualMap = function _KupEchart_setVisualMap(max, min, colors, hasNumericValues) {
789
+ const opts = {
790
+ visualMap: {
791
+ show: false,
792
+ },
793
+ };
794
+ const colorRange = !hasNumericValues
795
+ ? undefined
796
+ : colors.length > 0
797
+ ? { inRange: { color: colors }, min: min, max: max }
798
+ : {
799
+ inRange: {
800
+ color: [__classPrivateFieldGet(this, _KupEchart_themeColorBrighter, "f"), __classPrivateFieldGet(this, _KupEchart_themeColorDarker, "f")],
801
+ },
802
+ min: min,
803
+ max: max,
804
+ };
805
+ if (colorRange) {
806
+ opts.visualMap = Object.assign(Object.assign(Object.assign({}, opts.visualMap), colorRange), { calculable: true, formatter: (value) => {
807
+ return __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.format(value);
808
+ }, min: min, max: max, show: true });
809
+ }
810
+ return opts;
811
+ }, _KupEchart_setMapOptions = function _KupEchart_setMapOptions(map) {
812
+ const mapJson = JSON.parse(map);
813
+ const isoA2 = [];
814
+ const names = [];
815
+ for (let index = 0; index < mapJson.features.length; index++) {
816
+ const feature = mapJson.features[index];
817
+ isoA2.push(feature.properties.iso_a2);
818
+ names.push(feature.properties.name);
819
+ }
820
+ const y = {};
821
+ let objKey;
822
+ for (const row of this.data.rows) {
823
+ objKey = row.cells[this.axis].value;
824
+ y[objKey] = [];
825
+ for (const key of Object.keys(row.cells)) {
826
+ const cell = row.cells[key];
827
+ const value = cell.value;
828
+ if (!this.axis.includes(key)) {
829
+ if (this.series &&
830
+ this.series.length > 0 &&
831
+ !this.series.includes(key)) {
832
+ continue;
833
+ }
834
+ y[objKey].push(value);
835
+ }
836
+ }
837
+ }
838
+ const colors = [];
839
+ const data = [];
840
+ let hasNumericValues = false;
841
+ let min = 0;
842
+ let max = 0;
843
+ for (let key in y) {
844
+ let color = null;
845
+ let n = null;
846
+ for (let index = 0; index < y[key].length; index++) {
847
+ const value = y[key][index];
848
+ const hexColor = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.colorCheck(value).hexColor;
849
+ if (hexColor) {
850
+ color = hexColor;
851
+ }
852
+ else {
853
+ n = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.numberify(value);
854
+ if (n > max) {
855
+ max = n;
856
+ }
857
+ if (n < min) {
858
+ min = n;
859
+ }
860
+ }
861
+ }
862
+ const keyIsName = names.includes(key);
863
+ if (n !== null) {
864
+ data.push({
865
+ name: keyIsName ? key : names[isoA2.indexOf(key)],
866
+ value: n ? n : undefined,
867
+ });
868
+ if (color) {
869
+ colors.push(color);
870
+ }
871
+ hasNumericValues = true;
872
+ }
873
+ else if (color) {
874
+ data.push({
875
+ itemStyle: {
876
+ color: color,
877
+ },
878
+ name: keyIsName ? key : names[isoA2.indexOf(key)],
879
+ });
880
+ }
881
+ __classPrivateFieldGet(this, _KupEchart_mapObj, "f")[keyIsName
882
+ ? names[names.indexOf(key)]
883
+ : names[isoA2.indexOf(key)]] = key;
884
+ }
885
+ const tipCb = (params) => {
886
+ const value = params.value;
887
+ if (isNaN(value) ||
888
+ value === null ||
889
+ value === undefined) {
890
+ return null;
891
+ }
892
+ else {
893
+ return (params.name +
894
+ ': ' +
895
+ __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.format(value));
896
+ }
897
+ };
898
+ const echartOption = Object.assign({ emphasis: {
899
+ label: {
900
+ show: true,
901
+ },
902
+ }, title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this), tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { formatter: tipCb, showDelay: 0, trigger: 'item', transitionDuration: 0.2 }), series: [
903
+ {
904
+ data: data,
905
+ emphasis: {
906
+ label: {
907
+ show: true,
908
+ },
909
+ },
910
+ map: this.rootElement.id ? this.rootElement.id : '',
911
+ name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
912
+ name: this.axis,
913
+ })[0].title,
914
+ roam: true,
915
+ type: 'map',
916
+ },
917
+ ] }, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setVisualMap).call(this, max, min, colors, hasNumericValues));
918
+ return echartOption;
919
+ }, _KupEchart_setPieOptions = function _KupEchart_setPieOptions() {
920
+ const y = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createY).call(this);
921
+ const data = [];
922
+ for (let key in y) {
923
+ let sum = 0;
924
+ for (let j = 0; j < y[key].length; j++) {
925
+ sum = sum + parseFloat(y[key][j]);
926
+ }
927
+ data.push({
928
+ name: key,
929
+ value: sum,
930
+ });
931
+ }
932
+ return {
933
+ color: __classPrivateFieldGet(this, _KupEchart_themeColors, "f"),
934
+ legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
935
+ title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
936
+ tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)' }),
937
+ series: [
938
+ {
939
+ name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
940
+ name: this.axis,
941
+ })[0].title,
942
+ type: 'pie',
943
+ data: data,
944
+ emphasis: {
945
+ itemStyle: {
946
+ shadowBlur: 10,
947
+ shadowOffsetX: 0,
948
+ shadowColor: 'rgba(0, 0, 0, 0.5)',
949
+ },
950
+ },
951
+ },
952
+ ],
953
+ };
954
+ }, _KupEchart_setGaussianOptions = function _KupEchart_setGaussianOptions() {
955
+ let x = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createX).call(this);
956
+ const y = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createY).call(this);
957
+ const series = [];
958
+ const mixedSeries = this.types.filter((i) => i != KupEchartTypes.GAUSSIAN).length > 0;
959
+ const needSortDataset = this.types.filter((j) => j != KupEchartTypes.GAUSSIAN).length == 1;
960
+ __classPrivateFieldSet(this, _KupEchart_gaussianDatasets, {}, "f");
961
+ let i = 0;
962
+ for (const key in y) {
963
+ let type;
964
+ if (this.types[i]) {
965
+ type = this.types[i];
966
+ }
967
+ else {
968
+ type = KupEchartTypes.GAUSSIAN;
969
+ }
970
+ let values = null;
971
+ const column = this.data.columns.find((col) => col.title === key);
972
+ if (type == KupEchartTypes.GAUSSIAN) {
973
+ if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
974
+ const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.distinct(this.data, [column.name]);
975
+ values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(newDataset, [
976
+ column.name,
977
+ ]);
978
+ __classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column.name] = newDataset;
979
+ }
980
+ else {
981
+ values = y[key];
982
+ }
983
+ }
984
+ else {
985
+ if (needSortDataset) {
986
+ // if there is only one series other than the Gaussian then I apply the sorting algorithm that arranges the data in "mountain"
987
+ __classPrivateFieldSet(this, _KupEchart_sortedDataset, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.sort(this.data, 'normalDistribution', column.name), "f");
988
+ values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"), [column.name]);
989
+ x = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createX).call(this, __classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"));
990
+ }
991
+ else {
992
+ values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(this.data, [
993
+ column.name,
994
+ ]);
995
+ }
996
+ }
997
+ __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_addSeries).call(this, type, series, values, key, mixedSeries, needSortDataset);
998
+ i++;
999
+ }
1000
+ // "any" because type is mismanaged inside echarts library
1001
+ const tipCb = (params) => {
1002
+ params.sort((a, b) => a.seriesIndex - b.seriesIndex);
1003
+ const wrapper = '<div style="display: flex; flex-direction: column">';
1004
+ let format = wrapper;
1005
+ let count = 0;
1006
+ for (let index = 0; index < params.length; index++) {
1007
+ const param = params[index];
1008
+ if (this.types[param.seriesIndex] == undefined ||
1009
+ this.types[param.seriesIndex] == KupEchartTypes.GAUSSIAN) {
1010
+ const value = param.value[0];
1011
+ const x = `<div style="color: ${param.color};"><span style="margin-right: 5px;"><strong>x:</strong></span><span>${param.value[0]}</span></div>`;
1012
+ if (!index) {
1013
+ format += x;
1014
+ }
1015
+ const column = this.data.columns.find((col) => col.title === param.seriesName).name;
1016
+ const filters = {
1017
+ columns: [column],
1018
+ range: {
1019
+ max: value + (value / 100) * 50,
1020
+ min: value - (value / 100) * 50,
1021
+ },
1022
+ };
1023
+ const rows = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.row.find(__classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column]
1024
+ ? __classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column]
1025
+ : this.data, filters);
1026
+ for (let index = 0; index < rows.length; index++) {
1027
+ const row = rows[index];
1028
+ const cells = row.cells;
1029
+ if (cells[this.axis] || cells[column].title) {
1030
+ let title = '';
1031
+ if (cells[this.axis]) {
1032
+ title = cells[this.axis].value;
1033
+ }
1034
+ else {
1035
+ title = cells[column].title;
1036
+ }
1037
+ const remainder = count % 4;
1038
+ if (!remainder) {
1039
+ if (count) {
1040
+ format += `</div>`;
1041
+ }
1042
+ format += `<div style="display: flex; flex-direction: row;">`;
1043
+ }
1044
+ const style = `style="color: ${param.color}; margin-right: 5px"`;
1045
+ format += `<span ${style}><strong>${title}</strong>: ${cells[column].value}</span>`;
1046
+ count++;
1047
+ }
1048
+ }
1049
+ if (format !== wrapper)
1050
+ format += '</div>';
1051
+ }
1052
+ else {
1053
+ const style = `style="color: ${param.color}; margin-right: 5px"`;
1054
+ format += `<div ${style}><strong>${param.name}</strong>: ${param.value}</div>`;
1055
+ }
1056
+ }
1057
+ if (format === wrapper) {
1058
+ return null;
1059
+ }
1060
+ else {
1061
+ return format;
1062
+ }
1063
+ };
1064
+ // list of x-axis, one for the non-Gaussian series which appears on the left and one for the Gaussian series on the right.
1065
+ const xAxisTmp = [
1066
+ Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { data: x.length > 0 ? x : null, type: 'category' }), this.xAxis),
1067
+ Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { type: 'value', max: 'dataMax', min: 'dataMin' }), this.xAxis),
1068
+ ];
1069
+ // list of y-axis, one for the non-Gaussian series which appears at the bottom and one for the Gaussian series at the top.
1070
+ const yAxisTmp = [
1071
+ Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { type: 'value' }), this.yAxis),
1072
+ Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { type: 'value' }), this.yAxis),
1073
+ ];
1074
+ // If the series are not mixed, then I eliminate the extra axis
1075
+ if (!mixedSeries) {
1076
+ xAxisTmp.splice(0, 1);
1077
+ yAxisTmp.splice(0, 1);
1078
+ }
1079
+ return {
1080
+ color: __classPrivateFieldGet(this, _KupEchart_themeColors, "f"),
1081
+ legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
1082
+ series: series,
1083
+ title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
1084
+ tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { trigger: 'axis', formatter: tipCb }),
1085
+ xAxis: xAxisTmp,
1086
+ yAxis: yAxisTmp,
1087
+ };
1088
+ }, _KupEchart_addSeries = function _KupEchart_addSeries(type, series, values, key, mixedSeries = false, needSortDataset = false) {
1089
+ switch (type) {
1090
+ case KupEchartTypes.GAUSSIAN:
1091
+ series.push({
1092
+ data: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.normalDistribution(values),
1093
+ name: key,
1094
+ showSymbol: false,
1095
+ smooth: true,
1096
+ type: 'line',
1097
+ xAxisIndex: mixedSeries ? 1 : 0,
1098
+ yAxisIndex: mixedSeries ? 1 : 0,
1099
+ });
1100
+ break;
1101
+ case KupEchartTypes.BAR:
1102
+ series.push({
1103
+ data: values,
1104
+ name: key,
1105
+ type: 'bar',
1106
+ barWidth: needSortDataset ? '100%' : undefined,
1107
+ });
1108
+ break;
1109
+ case KupEchartTypes.SCATTER:
1110
+ series.push({
1111
+ data: values,
1112
+ name: key,
1113
+ type: 'scatter',
1114
+ });
1115
+ break;
1116
+ case KupEchartTypes.LINE:
1117
+ default:
1118
+ series.push({
1119
+ data: values,
1120
+ name: key,
1121
+ type: 'line',
1122
+ });
1123
+ break;
1124
+ }
1125
+ }, _KupEchart_setOptions = function _KupEchart_setOptions() {
1126
+ const x = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createX).call(this);
1127
+ const y = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createY).call(this);
1128
+ let i = 0;
1129
+ const series = [];
1130
+ for (const key in y) {
1131
+ const values = y[key];
1132
+ let type;
1133
+ if (this.types[i]) {
1134
+ type = this.types[i];
1135
+ }
1136
+ else {
1137
+ type = KupEchartTypes.LINE;
1138
+ }
1139
+ __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_addSeries).call(this, type, series, values, key);
1140
+ i++;
1141
+ }
1142
+ return {
1143
+ color: __classPrivateFieldGet(this, _KupEchart_themeColors, "f"),
1144
+ legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
1145
+ series: series,
1146
+ title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
1147
+ tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { trigger: 'axis' }),
1148
+ xAxis: Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { data: x, type: 'category' }), this.xAxis),
1149
+ yAxis: Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { type: 'value' }), this.yAxis),
1150
+ };
1151
+ }, _KupEchart_fetchThemeColors = function _KupEchart_fetchThemeColors() {
1152
+ let colorArray = [];
1153
+ let key = '--kup-chart-color-';
1154
+ for (let index = 1; __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[key + index]; index++) {
1155
+ colorArray.push(__classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[key + index]);
1156
+ }
1157
+ __classPrivateFieldSet(this, _KupEchart_themeBackground, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[KupThemeColorValues.BACKGROUND], "f");
1158
+ __classPrivateFieldSet(this, _KupEchart_themeBorder, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[KupThemeColorValues.BORDER], "f");
1159
+ __classPrivateFieldSet(this, _KupEchart_themeFont, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars['--kup-font-family'], "f");
1160
+ __classPrivateFieldSet(this, _KupEchart_themeText, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[KupThemeColorValues.TEXT], "f");
1161
+ __classPrivateFieldSet(this, _KupEchart_themeColors, colorArray, "f");
1162
+ const colorCheck = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.colorCheck(colorArray[0]);
1163
+ __classPrivateFieldSet(this, _KupEchart_themeColorDarker, `hsl(${colorCheck.hue}, ${colorCheck.saturation}, ${(parseFloat(colorCheck.lightness) - 30).toString()}%)`, "f");
1164
+ __classPrivateFieldSet(this, _KupEchart_themeColorBrighter, `hsl(${colorCheck.hue}, ${colorCheck.saturation}, ${(parseFloat(colorCheck.lightness) + 30).toString()}%)`, "f");
1165
+ };