@ironsource/shared-ui 2.1.12-rc.3 → 2.1.12-rc.30

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 (237) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_adb49e50_lang.css +1 -0
  2. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
  3. package/ButtonV4.vue_vue_type_style_index_0_scoped_852be7ec_lang.css +1 -0
  4. package/Chart.vue_vue_type_style_index_0_scoped_fa533a3d_lang.css +1 -0
  5. package/ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css +1 -0
  6. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +1 -0
  7. package/ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css +1 -0
  8. package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +1 -0
  9. package/ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css +1 -0
  10. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_38354f10_lang.css +1 -0
  11. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +1 -0
  12. package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +1 -0
  13. package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
  14. package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
  15. package/DropdownV4.vue_vue_type_style_index_0_scoped_55dd36a7_lang.css +1 -0
  16. package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
  17. package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
  18. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  19. package/Link.vue_vue_type_style_index_0_scoped_ad98fe7b_lang.css +1 -0
  20. package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +1 -0
  21. package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
  22. package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
  23. package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
  24. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_2076b5ab_lang.css +1 -0
  25. package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
  26. package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
  27. package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
  28. package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
  29. package/components/appIcon/index.d.ts +3 -3
  30. package/components/banner/Banner.vue.d.ts +3 -3
  31. package/components/banner/index.d.ts +7 -7
  32. package/components/button/common/consts.d.ts +1 -0
  33. package/components/button/v3/Button.vue.d.ts +3 -3
  34. package/components/button/v3/ButtonBase.vue.d.ts +3 -3
  35. package/components/button/v3/IconButton.vue.d.ts +3 -3
  36. package/components/button/v3/index.d.ts +14 -14
  37. package/components/button/v4/ButtonV4.vue.d.ts +5 -3
  38. package/components/button/v4/ButtonV4.vue.js +4 -4
  39. package/components/button/v4/ButtonV4.vue2.js +28 -27
  40. package/components/button/v4/ToggleButtonGroupAB.vue.js +3 -3
  41. package/components/button/v4/ToggleButtonGroupAB.vue2.js +40 -44
  42. package/components/chart/Chart.vue.d.ts +158 -37
  43. package/components/chart/Chart.vue.js +2 -2
  44. package/components/chart/Chart.vue2.js +150 -297
  45. package/components/chart/ChartHeader.vue.d.ts +50 -11
  46. package/components/chart/ChartHeader.vue.js +3 -3
  47. package/components/chart/ChartHeader.vue2.js +73 -54
  48. package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
  49. package/components/chart/ChartHeaderTrend.vue.js +7 -0
  50. package/components/chart/ChartHeaderTrend.vue2.js +96 -0
  51. package/components/chart/ChartLegend.vue.d.ts +24 -0
  52. package/components/chart/ChartLegend.vue.js +3 -3
  53. package/components/chart/ChartLegend.vue2.js +82 -63
  54. package/components/chart/ChartPlane.vue.d.ts +226 -0
  55. package/components/chart/ChartPlane.vue.js +7 -0
  56. package/components/chart/ChartPlane.vue2.js +370 -0
  57. package/components/chart/ChartStoryArgs.d.ts +184 -0
  58. package/components/chart/ChartTooltip.vue.d.ts +22 -2
  59. package/components/chart/ChartTooltip.vue.js +2 -2
  60. package/components/chart/ChartTooltip.vue2.js +50 -55
  61. package/components/chart/LegendSorting.vue.d.ts +37 -0
  62. package/components/chart/LegendSorting.vue.js +45 -0
  63. package/components/chart/LegendSorting.vue2.js +4 -0
  64. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  65. package/components/chart/SettingsHeader.vue.js +3 -3
  66. package/components/chart/SettingsHeader.vue2.js +17 -16
  67. package/components/chart/SubHeader.vue.d.ts +52 -0
  68. package/components/chart/SubHeader.vue.js +7 -0
  69. package/components/chart/SubHeader.vue2.js +61 -0
  70. package/components/chart/TooltipHeader.vue.d.ts +50 -0
  71. package/components/chart/TooltipHeader.vue.js +7 -0
  72. package/components/chart/TooltipHeader.vue2.js +69 -0
  73. package/components/chart/colorPalette.d.ts +5 -0
  74. package/components/chart/colorPalette.js +68 -0
  75. package/components/chart/composables/useChartHeight.d.ts +5 -0
  76. package/components/chart/composables/useChartHeight.js +24 -0
  77. package/components/chart/composables/useColorsMap.d.ts +12 -0
  78. package/components/chart/composables/useColorsMap.js +48 -0
  79. package/components/chart/composables/useTooltipPosition.d.ts +1 -1
  80. package/components/chart/composables/useTooltipPosition.js +11 -15
  81. package/components/chart/consts.d.ts +29 -7
  82. package/components/chart/consts.js +41 -21
  83. package/components/chart/index.d.ts +554 -119
  84. package/components/chart/mockData.d.ts +44 -5
  85. package/components/chart/types.d.ts +38 -6
  86. package/components/chart/types.js +5 -2
  87. package/components/chart/utils/formatNumber.d.ts +0 -1
  88. package/components/chart/utils/highlightUtils.d.ts +3 -0
  89. package/components/chart/utils/highlightUtils.js +18 -0
  90. package/components/chart/utils/utils.d.ts +3 -3
  91. package/components/chart/utils/utils.js +19 -10
  92. package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
  93. package/components/checkbox/v3/index.d.ts +7 -7
  94. package/components/dateRange/common/DateRange.common.js +81 -75
  95. package/components/dateRange/common/DateServices.common.d.ts +7 -1
  96. package/components/dateRange/common/DateServices.common.js +88 -92
  97. package/components/dateRange/common/consts.common.d.ts +5 -0
  98. package/components/dateRange/common/consts.common.js +9 -3
  99. package/components/dateRange/v3/DateRange.vue.d.ts +3 -3
  100. package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
  101. package/components/dateRange/v3/index.d.ts +7 -7
  102. package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
  103. package/components/dateRange/v4/DateRangeV4.vue.d.ts +3 -3
  104. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  105. package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
  106. package/components/dateRange/v4/index.d.ts +7 -7
  107. package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
  108. package/components/dialog/v4/DialogV4.vue.js +4 -4
  109. package/components/dialog/v4/DialogV4.vue2.js +1 -1
  110. package/components/dialog/v4/index.d.ts +7 -7
  111. package/components/dropdown/common/Dropdown.common.d.ts +1 -0
  112. package/components/dropdown/common/Dropdown.common.js +172 -160
  113. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  114. package/components/dropdown/v3/index.d.ts +20 -20
  115. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -0
  116. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
  117. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +16 -13
  118. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  119. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
  120. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +5 -0
  121. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  122. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +64 -54
  123. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +22 -9
  124. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  125. package/components/dropdown/v4/ConditionalDropdown.vue2.js +151 -129
  126. package/components/dropdown/v4/DropdownV4.vue.d.ts +34 -1
  127. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  128. package/components/dropdown/v4/DropdownV4.vue2.js +241 -189
  129. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  130. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  131. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  132. package/components/dropdown/v4/OptionV4.vue.d.ts +18 -5
  133. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  134. package/components/dropdown/v4/OptionV4.vue2.js +140 -108
  135. package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
  136. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  137. package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
  138. package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
  139. package/components/dropdown/v4/index.d.ts +682 -162
  140. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
  141. package/components/emptyState/v4/index.d.ts +7 -7
  142. package/components/forms/FormRow.vue.d.ts +9 -2
  143. package/components/forms/FormRow.vue.js +3 -3
  144. package/components/forms/FormRow.vue2.js +25 -14
  145. package/components/forms/index.d.ts +25 -5
  146. package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
  147. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
  148. package/components/includeExclude/index.d.ts +40 -40
  149. package/components/link/Link.vue.d.ts +70 -0
  150. package/components/link/Link.vue.js +7 -0
  151. package/components/link/Link.vue2.js +43 -0
  152. package/components/link/index.d.ts +201 -0
  153. package/components/link/index.js +6 -0
  154. package/components/search/v3/index.d.ts +3 -3
  155. package/components/shared/FieldLabel.vue.d.ts +19 -7
  156. package/components/shared/FieldLabel.vue.js +3 -3
  157. package/components/shared/FieldLabel.vue2.js +50 -37
  158. package/components/switch/v4/SwitchV4.vue.d.ts +16 -0
  159. package/components/switch/v4/SwitchV4.vue.js +3 -3
  160. package/components/switch/v4/SwitchV4.vue2.js +39 -24
  161. package/components/switch/v4/index.d.ts +29 -0
  162. package/components/table/common/Table.common.d.ts +0 -1
  163. package/components/table/common/Table.common.js +38 -39
  164. package/components/table/common/Table.types.d.ts +2 -0
  165. package/components/table/common/consts.d.ts +1 -0
  166. package/components/table/common/consts.js +2 -1
  167. package/components/table/v4/DataGrid.vue.d.ts +15 -4
  168. package/components/table/v4/DataGrid.vue.js +4 -4
  169. package/components/table/v4/DataGrid.vue2.js +288 -230
  170. package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
  171. package/components/table/v4/index.d.ts +50 -15
  172. package/components/table/v4/storyUtils.d.ts +2 -0
  173. package/components/tabs/v3/Tabs.vue.d.ts +3 -3
  174. package/components/tabs/v3/index.d.ts +7 -7
  175. package/components/tooltip/common/Tooltip.types.d.ts +1 -0
  176. package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
  177. package/components/tooltip/v3/Tooltip.vue.js +2 -2
  178. package/components/tooltip/v3/Tooltip.vue2.js +1 -1
  179. package/components/tooltip/v3/index.d.ts +7 -7
  180. package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
  181. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  182. package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
  183. package/components/tooltip/v4/index.d.ts +7 -7
  184. package/components/typography/Text.vue.d.ts +3 -3
  185. package/components/typography/index.d.ts +7 -7
  186. package/composables/useDateService.d.ts +7 -0
  187. package/composables/useDateService.js +10 -0
  188. package/composables/useFormValidation.d.ts +1 -0
  189. package/composables/useFormValidation.js +32 -27
  190. package/composables/useFullPageHeight.d.ts +10 -0
  191. package/composables/useFullPageHeight.js +15 -0
  192. package/consts/common.d.ts +1 -0
  193. package/consts/common.js +4 -0
  194. package/consts/regex.d.ts +1 -0
  195. package/consts/regex.js +2 -1
  196. package/index.d.ts +1601 -425
  197. package/index.js +148 -136
  198. package/mocks/apps.d.ts +1 -0
  199. package/mocks/optionsWithIcons.d.ts +2 -0
  200. package/package.json +9 -1
  201. package/testids/index.d.ts +4 -0
  202. package/testids/index.js +31 -30
  203. package/utils/formatNumbers.d.ts +1 -1
  204. package/utils/formatNumbers.js +19 -6
  205. package/utils/index.js +7 -0
  206. package/utils/text.d.ts +3 -0
  207. package/utils/text.js +24 -5
  208. package/utils/totals.d.ts +5 -0
  209. package/utils/totals.js +9 -0
  210. package/utils/utils.d.ts +1 -0
  211. package/utils/utils.js +4 -0
  212. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
  213. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
  214. package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
  215. package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
  216. package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
  217. package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
  218. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
  219. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +0 -1
  220. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
  221. package/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css +0 -1
  222. package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
  223. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
  224. package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
  225. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
  226. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
  227. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  228. package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
  229. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
  230. package/SwitchV4.vue_vue_type_style_index_0_scoped_c2e356f5_lang.css +0 -1
  231. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +0 -1
  232. package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
  233. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
  234. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
  235. package/components/chart/composables/useChartValues.d.ts +0 -12
  236. package/components/chart/composables/useChartValues.js +0 -32
  237. package/components/chart/utils/formatNumber.js +0 -11
@@ -1,324 +1,177 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css"; import { defineComponent as J, computed as i, ref as T, onMounted as Q, watch as C, nextTick as Y, openBlock as d, createElementBlock as k, Fragment as F, createBlock as v, unref as u, isRef as N, withCtx as x, renderSlot as L, createCommentVNode as y, createElementVNode as p, normalizeClass as _, createVNode as H, normalizeStyle as ee } from "vue";
2
- import { useVModel as te } from "@vueuse/core";
3
- import { Chart as P, ArcElement as ae, LineElement as oe, BarElement as ie, PointElement as le, LineController as re, BarController as ne, PieController as se, ScatterController as de, CategoryScale as ue, LinearScale as ce, Filler as pe, Tooltip as he } from "chart.js";
4
- import { HoverVerticalLine as me } from "./plugins/HoverVerticalLine.js";
5
- import { formatValue as U, calcStepSize as fe } from "./utils/utils.js";
6
- import { DEFAULT_TICK_COUNT as ve, DEFAULT_MIN_VISIBLE as ye, DEFAULT_MAX_VISIBLE as be, COLOR_PALETTE as ge, POINT_BORDER_COLOR as Te, TICK_LABEL_COLOR as z, TICK_LABEL_FONT as M, GRID_LINE_COLOR as $ } from "./consts.js";
7
- import { ChartType as n } from "./types.js";
8
- import { useTooltipPosition as Ce } from "./composables/useTooltipPosition.js";
9
- import ke from "./ChartTooltip.vue.js";
10
- import xe from "./ChartLegend.vue.js";
11
- import Le from "./ChartHeader.vue.js";
12
- import { hexColorToRgba as Se } from "../../utils/color.js";
13
- import { useChartValues as we } from "./composables/useChartValues.js";
14
- import Be from "./ChartLoader.vue.js";
15
- import Ie from "../emptyState/v4/EmptyStateV4.vue.js";
16
- import Ae from "./SettingsHeader.vue.js";
17
- const Ee = { class: "chart-container" }, Ve = { class: "header-wrapper" }, Re = { class: "chart" }, De = {
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_fa533a3d_lang.css"; import { defineComponent as U, ref as O, computed as n, openBlock as s, createElementBlock as m, Fragment as C, createBlock as I, unref as i, isRef as b, withCtx as d, renderSlot as u, createCommentVNode as D, createElementVNode as k, mergeProps as g, normalizeClass as E, createVNode as L, createSlots as N, renderList as M } from "vue";
2
+ import { useVModel as V } from "@vueuse/core";
3
+ import $ from "./ChartLegend.vue.js";
4
+ import K from "./SettingsHeader.vue.js";
5
+ import A from "./ChartPlane.vue.js";
6
+ import { useColorsMap as z } from "./composables/useColorsMap.js";
7
+ import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as Y } from "./consts.js";
8
+ import { ChartType as j, DateInterval as q, TooltipOrder as G, TrendDirection as J } from "./types.js";
9
+ import { useChartHeight as Q } from "./composables/useChartHeight.js";
10
+ import { TotalType as W, calculateTotal as Z } from "../../utils/totals.js";
11
+ const _ = {
18
12
  key: 0,
19
13
  class: "chart-sidebar"
20
- }, Je = /* @__PURE__ */ J({
14
+ }, ue = /* @__PURE__ */ U({
21
15
  __name: "Chart",
22
16
  props: {
23
17
  dataSets: { default: () => [] },
24
18
  visibleIds: { default: () => [] },
25
- chartType: { default: n.Line },
19
+ chartType: { default: j.Line },
26
20
  parsing: { default: void 0 },
27
21
  xAxisFormat: { default: "string" },
28
22
  yAxisFormat: { default: "number" },
29
- tickCount: { default: ve },
23
+ xAxisDateInterval: { default: q.DAILY },
24
+ tickCount: { default: R },
25
+ truncateTickLabels: { type: Boolean, default: !1 },
26
+ loading: { type: Boolean, default: !1 },
27
+ empty: { type: Boolean, default: !1 },
28
+ withAnimation: { type: Boolean, default: !0 },
29
+ totalsChart: { type: Boolean, default: !1 },
30
+ tooltipTotalType: { default: W.Total },
31
+ tooltipTotalCalcFn: { type: Function, default: Z },
32
+ tooltipOrder: { default: G.Legend },
33
+ valueSuffix: { default: "" },
34
+ valuePrefix: { default: "" },
30
35
  header: { default: "" },
31
36
  subheader: { default: "" },
32
- withSubheaderTooltip: { type: Boolean, default: !1 },
33
- hideLegend: { type: Boolean, default: !1 },
34
- minVisible: { default: ye },
35
- maxVisible: { default: be },
36
- loading: { type: Boolean, default: !1 },
37
+ subheaderTooltip: { default: null },
38
+ keepSubheaderVisible: { type: Boolean, default: !1 },
39
+ trendValue: { default: null },
40
+ trendDirection: { default: J.UP },
41
+ trendTooltip: { default: null },
42
+ noteText: { default: "" },
37
43
  noDataIcon: { default: "file-search" },
38
44
  noDataTitle: { default: "No data to display" },
39
45
  noDataSubtitle: { default: "Search again with different filters" },
40
- withSettingsHeader: { type: Boolean, default: !0 },
46
+ hideLegend: { type: Boolean, default: !1 },
47
+ minVisible: { default: X },
48
+ maxVisible: { default: Y },
41
49
  maxLimitTooltipText: { default: "" },
42
- withAnimation: { type: Boolean, default: !0 }
50
+ sortSelected: { default: null },
51
+ sortOptions: { default: () => [] },
52
+ sortOptionNameKey: { default: "" },
53
+ fullHeight: { type: Boolean, default: !1 },
54
+ fullHeightBottomSpacing: { default: 50 },
55
+ withSettingsHeader: { type: Boolean, default: !0 },
56
+ extraCharts: { default: () => [] },
57
+ colorVariant: { default: "default" }
43
58
  },
44
- emits: ["update:chartType", "update:visibleIds"],
45
- setup(a, { emit: S }) {
46
- const t = a;
47
- P.register(
48
- ae,
49
- oe,
50
- ie,
51
- le,
52
- re,
53
- ne,
54
- se,
55
- de,
56
- ue,
57
- ce,
58
- pe,
59
- he,
60
- me
61
- );
62
- const c = te(t, "chartType", S), K = i(
63
- () => t.withAnimation ? "" : "none"
64
- ), h = T(null);
65
- let s = null;
66
- const w = i(() => t.dataSets.length === 0), B = i(() => !t.loading && !w.value), b = () => {
67
- h.value && (s && s.destroy(), s = new P(h.value, E.value));
68
- }, W = () => {
69
- s && (s.data.datasets = g.value, s.options = E.value.options, s.update(K.value));
70
- };
71
- Q(b), C(() => t.chartType, b), C(B, async (e) => {
72
- e && (await Y(), b());
73
- }), C([() => t.visibleIds, () => t.dataSets], W);
74
- const m = i(
75
- () => t.chartType === n.StackedLine || t.chartType === n.StackedBar
76
- ), I = i(
77
- () => t.chartType === n.Line || t.chartType === n.StackedLine
78
- ), f = i(
79
- () => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
80
- ), g = i(() => f.value.map((e, o) => {
81
- const l = e.color || ge[o] || "#000000";
82
- return {
83
- ...e,
84
- fill: m.value ? "start" : void 0,
85
- backgroundColor: Se(
86
- l,
87
- t.chartType === n.StackedLine ? 10 : 70
88
- ),
89
- borderColor: l,
90
- pointBackgroundColor: l,
91
- pointHoverBorderColor: l,
92
- maxBarThickness: 50,
93
- clip: 5,
94
- // draw a bit outside the chart area
95
- icon: e.icon || null,
96
- iconType: e.iconType || "branded"
97
- };
98
- })), A = i(
99
- () => f.value.length && f.value.every(
100
- (e) => e.data.length === 1
101
- )
102
- ), E = i(
103
- () => ({
104
- type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
105
- // Chart Data
106
- data: {
107
- datasets: g.value
108
- },
109
- // Chart Options
110
- options: {
111
- parsing: t.parsing,
112
- interaction: {
113
- intersect: !1,
114
- mode: "index",
115
- axis: "x"
116
- },
117
- // plugins
118
- plugins: {
119
- legend: { display: !1 },
120
- title: { display: !1 },
121
- hoverVerticalLine: I.value,
122
- // tooltip
123
- tooltip: {
124
- enabled: !1,
125
- position: "average",
126
- external: ({ tooltip: e }) => {
127
- r.value = { ...e };
128
- },
129
- callbacks: {
130
- footer: (e) => {
131
- const o = e.reduce((l, q) => l + (q.parsed.y || 0), 0);
132
- return ["Total", String(o)];
133
- }
134
- }
135
- }
136
- },
137
- // chart layout
138
- responsive: !0,
139
- maintainAspectRatio: !1,
140
- layout: {
141
- padding: {
142
- left: 18,
143
- top: 18,
144
- bottom: 13
145
- }
146
- },
147
- // basic styles
148
- elements: {
149
- line: {
150
- borderWidth: 2,
151
- tension: 0.3
152
- },
153
- point: {
154
- radius: A.value ? 3 : 1,
155
- hitRadius: 8,
156
- borderWidth: 0,
157
- hoverRadius: 4,
158
- hoverBorderWidth: 2,
159
- pointHoverBackgroundColor: Te
160
- },
161
- bar: {
162
- borderRadius: 4
163
- }
164
- },
165
- scales: {
166
- // Horizontal Axis (X)
167
- x: {
168
- beginAtZero: !0,
169
- offset: !I.value || A.value,
170
- border: { display: !1 },
171
- stacked: m.value,
172
- // stack on top of each other
173
- // ticks
174
- ticks: {
175
- color: z,
176
- font: M,
177
- padding: 4,
178
- callback: function(e) {
179
- return U(
180
- this.getLabelForValue(e),
181
- t.xAxisFormat
182
- );
183
- }
184
- },
185
- // grid lines
186
- grid: {
187
- color: $,
188
- drawOnChartArea: !1,
189
- drawTicks: !0,
190
- drawBorder: !1,
191
- tickLength: 7
192
- }
193
- },
194
- // Vertical Axis (Y)
195
- y: {
196
- beginAtZero: !0,
197
- border: { display: !1 },
198
- // hide left borderline
199
- stacked: m.value,
200
- // stack on top of each other
201
- // ticks
202
- ticks: {
203
- color: z,
204
- font: M,
205
- padding: 8,
206
- stepSize: O.value,
207
- min: D.value,
208
- max: O.value * t.tickCount,
209
- callback: (e) => U(e, t.yAxisFormat)
210
- },
211
- // grid lines
212
- grid: {
213
- color: $,
214
- drawOnChartArea: !0,
215
- drawTicks: !1
216
- }
217
- }
218
- }
219
- }
220
- })
221
- ), Z = i(
222
- () => g.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
223
- ), G = i(() => t.dataSets.map((e) => ({
224
- id: e.id,
225
- label: e.label,
226
- caption: e.caption || null,
227
- color: Z.value[e.id] || null,
228
- icon: e.icon || null,
229
- iconType: e.iconType || "branded"
230
- }))), V = T(null), r = T(null), { position: R } = Ce(
231
- h,
232
- V,
233
- r
234
- ), X = i(() => ({
235
- left: `${R.value.left}px`,
236
- top: `${R.value.top}px`,
237
- opacity: r.value?.opacity || 0
238
- })), { minValue: D, maxValue: j } = we({
239
- parsingConfig: t.parsing,
240
- dataSets: f,
241
- isStacked: m
242
- }), O = i(
243
- () => fe(D.value, j.value, t.tickCount)
244
- );
245
- return (e, o) => (d(), k(F, null, [
246
- a.withSettingsHeader ? (d(), v(Ae, {
59
+ emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
60
+ setup(a, { emit: p }) {
61
+ const e = a, r = V(e, "chartType", p), c = V(e, "sortSelected", p), f = O(null), y = n(() => ({
62
+ dataSets: e.dataSets,
63
+ visibleIds: e.visibleIds,
64
+ parsing: e.parsing,
65
+ xAxisFormat: e.xAxisFormat,
66
+ yAxisFormat: e.yAxisFormat,
67
+ xAxisDateInterval: e.xAxisDateInterval,
68
+ tickCount: e.tickCount,
69
+ truncateTickLabels: e.truncateTickLabels,
70
+ header: e.header,
71
+ subheader: e.subheader,
72
+ noteText: e.noteText,
73
+ loading: e.loading,
74
+ empty: e.empty,
75
+ noDataIcon: e.noDataIcon,
76
+ noDataTitle: e.noDataTitle,
77
+ noDataSubtitle: e.noDataSubtitle,
78
+ withAnimation: e.withAnimation,
79
+ typeSwitcher: !e.withSettingsHeader,
80
+ height: P.value,
81
+ compactHeader: x.value > 1,
82
+ trendValue: e.trendValue,
83
+ trendDirection: e.trendDirection,
84
+ trendTooltip: e.trendTooltip,
85
+ totalsChart: e.totalsChart,
86
+ subheaderTooltip: e.subheaderTooltip,
87
+ keepSubheaderVisible: e.keepSubheaderVisible,
88
+ colorsMap: h.value,
89
+ tooltipTotalType: e.tooltipTotalType,
90
+ tooltipTotalCalcFn: e.tooltipTotalCalcFn,
91
+ tooltipOrder: e.tooltipOrder,
92
+ highlightedId: f.value,
93
+ valueSuffix: e.valueSuffix,
94
+ valuePrefix: e.valuePrefix
95
+ })), B = n(() => e.dataSets), T = n(() => e.visibleIds), v = n(() => e.extraCharts.length), x = n(() => 1 + v.value), F = (t) => t === v.value - 1, { colorsMap: h } = z({
96
+ dataSets: B,
97
+ visibleIds: T,
98
+ variant: e.colorVariant
99
+ }), w = n(() => e.dataSets.map((t) => ({
100
+ id: t.id,
101
+ label: t.label,
102
+ caption: t.caption || null,
103
+ color: h.value[t.id] || null,
104
+ icon: t.icon || null,
105
+ iconType: t.iconType || "branded"
106
+ }))), { containerProps: H, eachPlaneHeight: P } = Q({
107
+ chartPlanesCount: x,
108
+ useFullHeight: e.fullHeight,
109
+ bottomSpacing: e.fullHeightBottomSpacing
110
+ });
111
+ return (t, o) => (s(), m(C, null, [
112
+ a.withSettingsHeader ? (s(), I(K, {
247
113
  key: 0,
248
- "chart-type": u(c),
249
- "onUpdate:chart-type": o[0] || (o[0] = (l) => N(c) ? c.value = l : null),
114
+ "chart-type": i(r),
115
+ "onUpdate:chart-type": o[0] || (o[0] = (l) => b(r) ? r.value = l : null),
250
116
  "hide-legend": a.hideLegend
251
117
  }, {
252
- metric: x(() => [
253
- L(e.$slots, "metric", {}, void 0, !0)
118
+ "before-chart-type": d(() => [
119
+ u(t.$slots, "before-chart-type", {}, void 0, !0)
120
+ ]),
121
+ metric: d(() => [
122
+ u(t.$slots, "metric", {}, void 0, !0)
254
123
  ]),
255
- breakdowns: x(() => [
256
- L(e.$slots, "breakdowns", {}, void 0, !0)
124
+ breakdowns: d(() => [
125
+ u(t.$slots, "breakdowns", {}, void 0, !0)
257
126
  ]),
258
127
  _: 3
259
- }, 8, ["chart-type", "hide-legend"])) : y("", !0),
260
- p("div", Ee, [
261
- u(B) ? (d(), k(F, { key: 0 }, [
262
- p("section", {
263
- class: _(["chart-content", [{ "with-legend": !a.hideLegend }]])
264
- }, [
265
- p("div", Ve, [
266
- H(Le, {
267
- "chart-type": u(c),
268
- "onUpdate:chart-type": o[1] || (o[1] = (l) => N(c) ? c.value = l : null),
269
- "with-settings-header": a.withSettingsHeader,
270
- header: a.header,
271
- subheader: a.subheader,
272
- "with-subheader-tooltip": a.withSubheaderTooltip
273
- }, {
274
- "subheader-tooltip": x(() => [
275
- L(e.$slots, "subheader-tooltip", {}, void 0, !0)
276
- ]),
277
- _: 3
278
- }, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
279
- ]),
280
- p("div", Re, [
281
- p("canvas", {
282
- ref_key: "chartRef",
283
- ref: h,
284
- class: "chart__canvas"
285
- }, null, 512),
286
- p("div", {
287
- ref_key: "tooltipRef",
288
- ref: V,
289
- class: "chart__tooltip",
290
- style: ee(u(X))
291
- }, [
292
- r.value ? (d(), v(ke, {
293
- key: 0,
294
- title: String(r.value.title),
295
- "data-points": r.value.dataPoints,
296
- "x-axis-format": a.xAxisFormat,
297
- "y-axis-format": a.yAxisFormat,
298
- "total-label": r.value.footer[0],
299
- "total-value": Number(r.value.footer[1])
300
- }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : y("", !0)
301
- ], 4)
302
- ])
303
- ], 2),
304
- a.hideLegend ? y("", !0) : (d(), k("section", De, [
305
- H(xe, {
306
- items: u(G),
307
- "visible-ids": a.visibleIds,
308
- "max-limit-tooltip-text": a.maxLimitTooltipText,
309
- "onUpdate:visibleIds": o[2] || (o[2] = (l) => S("update:visibleIds", l))
310
- }, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
311
- ]))
312
- ], 64)) : a.loading ? (d(), v(Be, { key: 1 })) : u(w) ? (d(), v(u(Ie), {
313
- key: 2,
314
- title: a.noDataTitle,
315
- subtitle: a.noDataSubtitle,
316
- "icon-name": a.noDataIcon
317
- }, null, 8, ["title", "subtitle", "icon-name"])) : y("", !0)
318
- ])
128
+ }, 8, ["chart-type", "hide-legend"])) : D("", !0),
129
+ k("div", g({ class: "chart-container" }, i(H)), [
130
+ k("section", {
131
+ class: E(["chart-planes", [{ "with-legend": !a.hideLegend }]])
132
+ }, [
133
+ L(A, g({
134
+ "chart-type": i(r),
135
+ "onUpdate:chart-type": o[1] || (o[1] = (l) => b(r) ? r.value = l : null)
136
+ }, i(y)), N({ _: 2 }, [
137
+ t.$slots["subheader-tooltip"] ? {
138
+ name: "subheader-tooltip",
139
+ fn: d(() => [
140
+ u(t.$slots, "subheader-tooltip", {}, void 0, !0)
141
+ ]),
142
+ key: "0"
143
+ } : void 0
144
+ ]), 1040, ["chart-type"]),
145
+ (s(!0), m(C, null, M(a.extraCharts, (l, S) => (s(), I(A, g({
146
+ key: S,
147
+ class: "extra-chart-plane"
148
+ }, { ...i(y), ...l }, {
149
+ "chart-type": i(r),
150
+ "colors-map": i(h),
151
+ "type-switcher": !1,
152
+ "tooltip-respects-top-edge": !F(S)
153
+ }), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
154
+ ], 2),
155
+ a.hideLegend ? D("", !0) : (s(), m("section", _, [
156
+ L($, {
157
+ "sort-selected": i(c),
158
+ "onUpdate:sort-selected": o[2] || (o[2] = (l) => b(c) ? c.value = l : null),
159
+ "highlighted-id": f.value,
160
+ "onUpdate:highlighted-id": o[3] || (o[3] = (l) => f.value = l),
161
+ items: i(w),
162
+ "visible-ids": i(T),
163
+ "max-limit-tooltip-text": a.maxLimitTooltipText,
164
+ "sort-options": a.sortOptions,
165
+ "sort-option-name-key": a.sortOptionNameKey,
166
+ "min-visible": a.minVisible,
167
+ "max-visible": a.maxVisible,
168
+ "onUpdate:visibleIds": o[4] || (o[4] = (l) => p("update:visibleIds", l))
169
+ }, null, 8, ["sort-selected", "highlighted-id", "items", "visible-ids", "max-limit-tooltip-text", "sort-options", "sort-option-name-key", "min-visible", "max-visible"])
170
+ ]))
171
+ ], 16)
319
172
  ], 64));
320
173
  }
321
174
  });
322
175
  export {
323
- Je as default
176
+ ue as default
324
177
  };
@@ -1,38 +1,77 @@
1
- import { ChartType } from '@/components/chart/types';
1
+ import { ChartType, TrendDirection } from '@/components/chart/types';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
3
  chartType: ChartType;
4
- withSettingsHeader: boolean;
4
+ typeSwitcher: boolean;
5
5
  header?: string;
6
6
  subheader?: string;
7
- withSubheaderTooltip?: boolean;
7
+ subheaderTooltip?: {
8
+ header?: string;
9
+ text?: string;
10
+ };
11
+ trendTooltip?: {
12
+ header?: string;
13
+ rangeCurrent?: string;
14
+ rangePrevious?: string;
15
+ };
16
+ compact: boolean;
17
+ trendValue?: string | number;
18
+ trendDirection?: TrendDirection;
19
+ noteText?: string;
8
20
  }>, {
9
21
  chartType: ChartType;
10
- withSettingsHeader: boolean;
22
+ typeSwitcher: boolean;
11
23
  header: string;
12
24
  subheader: string;
13
- withSubheaderTooltip: boolean;
25
+ subheaderTooltip: any;
26
+ trendTooltip: any;
27
+ compact: boolean;
28
+ trendValue: any;
29
+ trendDirection: TrendDirection;
30
+ noteText: string;
14
31
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
32
  "update:chartType": (type: ChartType) => void;
16
33
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
17
34
  chartType: ChartType;
18
- withSettingsHeader: boolean;
35
+ typeSwitcher: boolean;
19
36
  header?: string;
20
37
  subheader?: string;
21
- withSubheaderTooltip?: boolean;
38
+ subheaderTooltip?: {
39
+ header?: string;
40
+ text?: string;
41
+ };
42
+ trendTooltip?: {
43
+ header?: string;
44
+ rangeCurrent?: string;
45
+ rangePrevious?: string;
46
+ };
47
+ compact: boolean;
48
+ trendValue?: string | number;
49
+ trendDirection?: TrendDirection;
50
+ noteText?: string;
22
51
  }>, {
23
52
  chartType: ChartType;
24
- withSettingsHeader: boolean;
53
+ typeSwitcher: boolean;
25
54
  header: string;
26
55
  subheader: string;
27
- withSubheaderTooltip: boolean;
56
+ subheaderTooltip: any;
57
+ trendTooltip: any;
58
+ compact: boolean;
59
+ trendValue: any;
60
+ trendDirection: TrendDirection;
61
+ noteText: string;
28
62
  }>>> & {
29
63
  "onUpdate:chartType"?: (type: ChartType) => any;
30
64
  }, {
31
65
  header: string;
66
+ compact: boolean;
32
67
  chartType: ChartType;
33
- withSettingsHeader: boolean;
68
+ trendTooltip: any;
34
69
  subheader: string;
35
- withSubheaderTooltip: boolean;
70
+ subheaderTooltip: any;
71
+ typeSwitcher: boolean;
72
+ trendValue: string | number;
73
+ trendDirection: TrendDirection;
74
+ noteText: string;
36
75
  }>, {
37
76
  "subheader-tooltip"?(_: {}): any;
38
77
  }>;
@@ -1,7 +1,7 @@
1
1
  import e from "./ChartHeader.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css"; //*');
4
- const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-b8213498"]]);
3
+ // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css"; //*');
4
+ const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-af520313"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };