@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,69 +1,88 @@
1
- import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css"; import { defineComponent as y, computed as T, openBlock as c, createElementBlock as b, createElementVNode as S, createVNode as i, unref as a, withCtx as o, renderSlot as V, createTextVNode as s, toDisplayString as u, createBlock as g, isRef as v, createCommentVNode as w } from "vue";
2
- import h from "../typography/v4/Typography.vue.js";
3
- import B from "../switch/v4/SwitchV4.vue.js";
4
- import { ChartType as r } from "./types.js";
5
- import k from "../tooltip/v4/TooltipV4.vue.js";
6
- const C = { class: "chart-header" }, x = { class: "header-texts" }, D = /* @__PURE__ */ y({
1
+ import "../../ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css"; import { defineComponent as k, computed as m, openBlock as r, createElementBlock as C, normalizeClass as S, createElementVNode as c, createVNode as p, createSlots as w, withCtx as f, renderSlot as x, unref as a, createTextVNode as B, toDisplayString as N, createBlock as l, normalizeProps as y, mergeProps as T, createCommentVNode as d, isRef as g } from "vue";
2
+ import D from "../typography/v4/Typography.vue.js";
3
+ import P from "../switch/v4/SwitchV4.vue.js";
4
+ import H from "../chip/v4/ChipV4.vue.js";
5
+ import { ChartType as n, TrendDirection as L } from "./types.js";
6
+ import b from "./ChartHeaderTrend.vue.js";
7
+ import $ from "./SubHeader.vue.js";
8
+ const z = { class: "header-texts" }, E = { class: "header-row" }, U = { class: "header-actions" }, I = /* @__PURE__ */ k({
7
9
  __name: "ChartHeader",
8
10
  props: {
9
- chartType: { default: r.Line },
10
- withSettingsHeader: { type: Boolean, default: !0 },
11
+ chartType: { default: n.Line },
12
+ typeSwitcher: { type: Boolean, default: !0 },
11
13
  header: { default: "" },
12
14
  subheader: { default: "" },
13
- withSubheaderTooltip: { type: Boolean, default: !1 }
15
+ subheaderTooltip: { default: null },
16
+ trendTooltip: { default: null },
17
+ compact: { type: Boolean, default: !1 },
18
+ trendValue: { default: null },
19
+ trendDirection: { default: L.UP },
20
+ noteText: { default: "" }
14
21
  },
15
22
  emits: ["update:chartType"],
16
- setup(e, { emit: p }) {
17
- const m = e, l = [
18
- { id: r.Line, icon: "chart-line-up" },
19
- { id: r.Bar, icon: "chart-bar" },
20
- { id: r.StackedLine, icon: "chart-line" }
21
- ], d = T({
23
+ setup(e, { emit: V }) {
24
+ const o = e, u = [
25
+ { id: n.Line, icon: "chart-line-up" },
26
+ { id: n.Bar, icon: "chart-bar" },
27
+ { id: n.StackedLine, icon: "chart-line" }
28
+ ], i = m({
22
29
  get() {
23
- return l.find(({ id: t }) => t === m.chartType);
30
+ return u.find(({ id: t }) => t === o.chartType);
24
31
  },
25
32
  set(t) {
26
- p("update:chartType", t.id);
33
+ V("update:chartType", t.id);
27
34
  }
28
- });
29
- return (t, n) => (c(), b("div", C, [
30
- S("div", x, [
31
- i(a(k), {
32
- placement: "right",
33
- disabled: !e.withSubheaderTooltip
34
- }, {
35
- tooltip: o(() => [
36
- V(t.$slots, "subheader-tooltip", {}, void 0, !0)
37
- ]),
38
- default: o(() => [
39
- i(a(h), {
40
- class: "subheader",
41
- variant: "h5"
42
- }, {
43
- default: o(() => [
44
- s(u(e.subheader), 1)
45
- ]),
46
- _: 1
47
- })
48
- ]),
49
- _: 3
50
- }, 8, ["disabled"]),
51
- i(a(h), { variant: "chart2" }, {
52
- default: o(() => [
53
- s(u(e.header), 1)
54
- ]),
55
- _: 1
56
- })
35
+ }), s = m(() => ({
36
+ value: o.trendValue,
37
+ direction: o.trendDirection,
38
+ trendTooltip: o.trendTooltip
39
+ }));
40
+ return (t, h) => (r(), C("div", {
41
+ class: S(["chart-header", { "chart-header--compact": e.compact }])
42
+ }, [
43
+ c("div", z, [
44
+ p($, {
45
+ subheader: e.subheader,
46
+ "subheader-tooltip": e.subheaderTooltip,
47
+ "show-separator": e.compact && (!!e.header || !!e.trendValue)
48
+ }, w({ _: 2 }, [
49
+ t.$slots["subheader-tooltip"] ? {
50
+ name: "subheader-tooltip",
51
+ fn: f(() => [
52
+ x(t.$slots, "subheader-tooltip", {}, void 0, !0)
53
+ ]),
54
+ key: "0"
55
+ } : void 0
56
+ ]), 1032, ["subheader", "subheader-tooltip", "show-separator"]),
57
+ c("div", E, [
58
+ p(a(D), {
59
+ class: "header-text",
60
+ variant: e.compact ? "h5" : "chart2"
61
+ }, {
62
+ default: f(() => [
63
+ B(N(e.header), 1)
64
+ ]),
65
+ _: 1
66
+ }, 8, ["variant"]),
67
+ !e.compact && e.trendValue !== null ? (r(), l(b, y(T({ key: 0 }, a(s))), null, 16)) : d("", !0)
68
+ ]),
69
+ e.compact && e.trendValue !== null ? (r(), l(b, y(T({ key: 0 }, a(s))), null, 16)) : d("", !0)
57
70
  ]),
58
- e.withSettingsHeader ? w("", !0) : (c(), g(a(B), {
59
- key: 0,
60
- modelValue: a(d),
61
- "onUpdate:modelValue": n[0] || (n[0] = (f) => v(d) ? d.value = f : null),
62
- options: l
63
- }, null, 8, ["modelValue"]))
64
- ]));
71
+ c("div", U, [
72
+ e.noteText ? (r(), l(a(H), {
73
+ key: 0,
74
+ label: `Note: ${e.noteText}`
75
+ }, null, 8, ["label"])) : d("", !0),
76
+ e.typeSwitcher ? (r(), l(a(P), {
77
+ key: 1,
78
+ modelValue: a(i),
79
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => g(i) ? i.value = v : null),
80
+ options: u
81
+ }, null, 8, ["modelValue"])) : d("", !0)
82
+ ])
83
+ ], 2));
65
84
  }
66
85
  });
67
86
  export {
68
- D as default
87
+ I as default
69
88
  };
@@ -0,0 +1,48 @@
1
+ import { TrendDirection } from '@/components/chart/types';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ value?: number | string;
4
+ direction?: TrendDirection;
5
+ trendTooltip?: {
6
+ header?: string;
7
+ rangeCurrent?: string;
8
+ rangePrevious?: string;
9
+ };
10
+ }>, {
11
+ value: any;
12
+ direction: TrendDirection;
13
+ trendTooltip: any;
14
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
+ value?: number | string;
16
+ direction?: TrendDirection;
17
+ trendTooltip?: {
18
+ header?: string;
19
+ rangeCurrent?: string;
20
+ rangePrevious?: string;
21
+ };
22
+ }>, {
23
+ value: any;
24
+ direction: TrendDirection;
25
+ trendTooltip: any;
26
+ }>>>, {
27
+ value: number | string;
28
+ direction: TrendDirection;
29
+ trendTooltip: any;
30
+ }>;
31
+ export default _default;
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToRuntimeProps<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_WithDefaults<P, D> = {
42
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
43
+ default: D[K];
44
+ }> : P[K];
45
+ };
46
+ type __VLS_Prettify<T> = {
47
+ [K in keyof T]: T[K];
48
+ } & {};
@@ -0,0 +1,7 @@
1
+ import e from "./ChartHeaderTrend.vue2.js";
2
+ /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css"; //*');
4
+ const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-db8a902c"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,96 @@
1
+ import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css"; import { defineComponent as f, computed as v, openBlock as r, createElementBlock as p, normalizeClass as y, createVNode as u, unref as t, withCtx as o, createElementVNode as s, createBlock as d, createTextVNode as a, toDisplayString as i, createCommentVNode as n, pushScopeId as g, popScopeId as C } from "vue";
2
+ import l from "../typography/v4/Typography.vue.js";
3
+ import b from "../icon/v4/IconV4.vue.js";
4
+ import "../icon/v4/IconFlag.vue.js";
5
+ import k from "../tooltip/v4/TooltipV4.vue.js";
6
+ import { TrendDirection as m } from "./types.js";
7
+ const h = (e) => (g("data-v-db8a902c"), e = e(), C(), e), x = { class: "trend-tooltip" }, N = {
8
+ key: 2,
9
+ class: "separator"
10
+ }, P = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), _ = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), L = /* @__PURE__ */ f({
11
+ __name: "ChartHeaderTrend",
12
+ props: {
13
+ value: { default: null },
14
+ direction: { default: m.UP },
15
+ trendTooltip: { default: null }
16
+ },
17
+ setup(e) {
18
+ const c = e, T = v(
19
+ () => c.trendTooltip?.header || c.trendTooltip?.rangeCurrent || c.trendTooltip?.rangePrevious
20
+ );
21
+ return (I, S) => (r(), p("div", {
22
+ class: y(["chart-trend", [`chart-trend--${e.direction}`]])
23
+ }, [
24
+ u(t(k), {
25
+ disabled: !t(T)
26
+ }, {
27
+ tooltip: o(() => [
28
+ s("div", x, [
29
+ e.trendTooltip?.header ? (r(), d(t(l), {
30
+ key: 0,
31
+ class: "trend-tooltip__header",
32
+ variant: "subtitle2"
33
+ }, {
34
+ default: o(() => [
35
+ a(i(e.trendTooltip.header), 1)
36
+ ]),
37
+ _: 1
38
+ })) : n("", !0),
39
+ e.trendTooltip?.rangeCurrent ? (r(), d(t(l), {
40
+ key: 1,
41
+ variant: "body2",
42
+ class: "trend-tooltip__text"
43
+ }, {
44
+ default: o(() => [
45
+ a(i(e.trendTooltip.rangeCurrent), 1)
46
+ ]),
47
+ _: 1
48
+ })) : n("", !0),
49
+ e.trendTooltip?.rangeCurrent && e.trendTooltip?.rangePrevious ? (r(), p("div", N, [
50
+ P,
51
+ u(t(l), {
52
+ class: "separator__text",
53
+ variant: "caption"
54
+ }, {
55
+ default: o(() => [
56
+ a(" vs. ")
57
+ ]),
58
+ _: 1
59
+ }),
60
+ _
61
+ ])) : n("", !0),
62
+ e.trendTooltip?.rangePrevious ? (r(), d(t(l), {
63
+ key: 3,
64
+ variant: "body2",
65
+ class: "trend-tooltip__text"
66
+ }, {
67
+ default: o(() => [
68
+ a(i(e.trendTooltip.rangePrevious), 1)
69
+ ]),
70
+ _: 1
71
+ })) : n("", !0)
72
+ ])
73
+ ]),
74
+ default: o(() => [
75
+ e.direction !== t(m).NEUTRAL ? (r(), d(t(b), {
76
+ key: 0,
77
+ class: "trend-icon",
78
+ type: "bold",
79
+ name: `arrow-${e.direction}`,
80
+ size: "15px"
81
+ }, null, 8, ["name"])) : n("", !0),
82
+ u(t(l), { variant: "chipLabel" }, {
83
+ default: o(() => [
84
+ a(i(e.value), 1)
85
+ ]),
86
+ _: 1
87
+ })
88
+ ]),
89
+ _: 1
90
+ }, 8, ["disabled"])
91
+ ], 2));
92
+ }
93
+ });
94
+ export {
95
+ L as default
96
+ };
@@ -2,37 +2,61 @@ import { LegendItem } from '@/components/chart/types';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
3
  items: LegendItem[];
4
4
  visibleIds: unknown[];
5
+ highlightedId?: string | number;
5
6
  minVisible?: number;
6
7
  maxVisible?: number;
7
8
  maxLimitTooltipText?: string;
9
+ sortSelected?: unknown;
10
+ sortOptions?: unknown[];
11
+ sortOptionNameKey?: string;
8
12
  }>, {
9
13
  items: () => any[];
10
14
  visibleIds: () => any[];
15
+ highlightedId: any;
11
16
  minVisible: number;
12
17
  maxVisible: number;
13
18
  maxLimitTooltipText: string;
19
+ sortSelected: any;
20
+ sortOptions: () => any[];
21
+ sortOptionNameKey: string;
14
22
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
23
  "update:visibleIds": (visibleIds: unknown[]) => void;
24
+ "update:sortSelected": (sortOption: unknown) => void;
25
+ "update:highlightedId": (id: string | number) => void;
16
26
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
17
27
  items: LegendItem[];
18
28
  visibleIds: unknown[];
29
+ highlightedId?: string | number;
19
30
  minVisible?: number;
20
31
  maxVisible?: number;
21
32
  maxLimitTooltipText?: string;
33
+ sortSelected?: unknown;
34
+ sortOptions?: unknown[];
35
+ sortOptionNameKey?: string;
22
36
  }>, {
23
37
  items: () => any[];
24
38
  visibleIds: () => any[];
39
+ highlightedId: any;
25
40
  minVisible: number;
26
41
  maxVisible: number;
27
42
  maxLimitTooltipText: string;
43
+ sortSelected: any;
44
+ sortOptions: () => any[];
45
+ sortOptionNameKey: string;
28
46
  }>>> & {
29
47
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
48
+ "onUpdate:sortSelected"?: (sortOption: unknown) => any;
49
+ "onUpdate:highlightedId"?: (id: string | number) => any;
30
50
  }, {
31
51
  items: LegendItem[];
32
52
  visibleIds: unknown[];
53
+ highlightedId: string | number;
33
54
  minVisible: number;
34
55
  maxVisible: number;
35
56
  maxLimitTooltipText: string;
57
+ sortSelected: any;
58
+ sortOptions: unknown[];
59
+ sortOptionNameKey: string;
36
60
  }>;
37
61
  export default _default;
38
62
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import e from "./ChartLegend.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css"; //*');
4
- const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4fe1c7d1"]]);
3
+ // import "../../ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-6103d8bd"]]);
5
5
  export {
6
- c as default
6
+ s as default
7
7
  };
@@ -1,132 +1,151 @@
1
- import "../../ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css"; import { defineComponent as D, ref as M, computed as m, openBlock as r, createElementBlock as c, createElementVNode as d, createVNode as s, unref as o, mergeProps as I, withCtx as p, createTextVNode as b, Fragment as S, renderList as P, normalizeClass as A, withModifiers as F, createBlock as H, createCommentVNode as U, toDisplayString as L } from "vue";
2
- import { useVirtualList as z } from "@vueuse/core";
3
- import f from "../typography/v4/Typography.vue.js";
4
- import R from "../checkbox/v4/CheckboxV4.vue.js";
5
- import q from "../search/v4/SearchV4.vue.js";
6
- import { DEFAULT_MIN_VISIBLE as G, DEFAULT_MAX_VISIBLE as X } from "./consts.js";
7
- import $ from "../icon/v4/IconV4.vue.js";
1
+ import "../../ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css"; import { defineComponent as F, ref as H, computed as v, openBlock as s, createElementBlock as u, createElementVNode as r, createVNode as c, unref as o, createBlock as g, isRef as R, createCommentVNode as x, mergeProps as T, withCtx as p, createTextVNode as I, Fragment as $, renderList as z, normalizeClass as K, withModifiers as q, toDisplayString as V } from "vue";
2
+ import { useVModel as C, useVirtualList as G } from "@vueuse/core";
3
+ import k from "../typography/v4/Typography.vue.js";
4
+ import X from "../checkbox/v4/CheckboxV4.vue.js";
5
+ import j from "../search/v4/SearchV4.vue.js";
6
+ import { DEFAULT_MIN_VISIBLE as J, DEFAULT_MAX_VISIBLE as Q } from "./consts.js";
7
+ import W from "../icon/v4/IconV4.vue.js";
8
8
  import "../icon/v4/IconFlag.vue.js";
9
- import j from "../tooltip/v4/TooltipV4.vue.js";
10
- const J = { class: "chart-legend" }, K = { class: "search-box" }, O = {
9
+ import Y from "../tooltip/v4/TooltipV4.vue.js";
10
+ import Z from "./LegendSorting.vue.js";
11
+ const ee = { class: "chart-legend" }, te = { class: "search-box" }, oe = {
11
12
  key: 0,
12
13
  class: "empty-list"
13
- }, Q = ["onClick"], W = { class: "label-container" }, ne = /* @__PURE__ */ D({
14
+ }, le = ["onMouseenter"], ie = ["onClick"], se = { class: "label-container" }, be = /* @__PURE__ */ F({
14
15
  __name: "ChartLegend",
15
16
  props: {
16
17
  items: { default: () => [] },
17
18
  visibleIds: { default: () => [] },
18
- minVisible: { default: G },
19
- maxVisible: { default: X },
20
- maxLimitTooltipText: { default: "" }
19
+ highlightedId: { default: null },
20
+ minVisible: { default: J },
21
+ maxVisible: { default: Q },
22
+ maxLimitTooltipText: { default: "" },
23
+ sortSelected: { default: null },
24
+ sortOptions: { default: () => [] },
25
+ sortOptionNameKey: { default: "" }
21
26
  },
22
- emits: ["update:visibleIds"],
23
- setup(h, { emit: g }) {
24
- const l = h, k = 32, u = M(""), T = m(() => {
25
- const t = u.value.toLowerCase();
27
+ emits: ["update:visibleIds", "update:sortSelected", "update:highlightedId"],
28
+ setup(a, { emit: m }) {
29
+ const l = a, M = 32, h = C(l, "sortSelected", m), y = C(l, "highlightedId", m), w = (t) => {
30
+ y.value = n(t) ? t.id : null;
31
+ }, E = () => {
32
+ y.value = null;
33
+ }, f = H(""), S = v(() => {
34
+ const t = f.value.toLowerCase();
26
35
  return l.items.filter(
27
36
  (i) => i.label.toLowerCase().includes(t)
28
37
  );
29
- }), a = (t) => l.visibleIds.includes(t.id), v = m(
38
+ }), n = (t) => l.visibleIds.includes(t.id), L = v(
30
39
  () => l.visibleIds.length >= l.maxVisible
31
- ), y = m(
40
+ ), N = v(
32
41
  () => l.visibleIds.length <= l.minVisible
33
- ), n = (t) => y.value && a(t) || v.value && !a(t), C = (t) => !l.maxLimitTooltipText || a(t) || !v.value, V = (t, i) => {
34
- g(
42
+ ), d = (t) => N.value && n(t) || L.value && !n(t), B = (t) => !l.maxLimitTooltipText || n(t) || !L.value, D = (t, i) => {
43
+ m(
35
44
  "update:visibleIds",
36
45
  t ? [...l.visibleIds, i.id] : l.visibleIds.filter((e) => e !== i.id)
37
46
  );
38
- }, { list: x, containerProps: w, wrapperProps: E } = z(T, {
39
- itemHeight: k,
47
+ }, { list: _, containerProps: O, wrapperProps: P } = G(S, {
48
+ itemHeight: M,
40
49
  overscan: 10
41
- }), N = (t) => {
42
- n(t) || V(!a(t), t);
50
+ }), U = (t) => {
51
+ d(t) || D(!n(t), t);
43
52
  };
44
- return (t, i) => (r(), c("div", J, [
45
- d("div", K, [
46
- s(o(q), {
47
- modelValue: u.value,
48
- "onUpdate:modelValue": i[0] || (i[0] = (e) => u.value = e)
49
- }, null, 8, ["modelValue"])
53
+ return (t, i) => (s(), u("div", ee, [
54
+ r("div", te, [
55
+ c(o(j), {
56
+ modelValue: f.value,
57
+ "onUpdate:modelValue": i[0] || (i[0] = (e) => f.value = e)
58
+ }, null, 8, ["modelValue"]),
59
+ a.sortOptions?.length > 0 ? (s(), g(Z, {
60
+ key: 0,
61
+ selected: o(h),
62
+ "onUpdate:selected": i[1] || (i[1] = (e) => R(h) ? h.value = e : null),
63
+ options: a.sortOptions,
64
+ "option-name-key": a.sortOptionNameKey
65
+ }, null, 8, ["selected", "options", "option-name-key"])) : x("", !0)
50
66
  ]),
51
- d("div", I({ class: "legend" }, o(w)), [
52
- d("ul", I({ class: "legend__list" }, o(E)), [
53
- o(x).length === 0 ? (r(), c("li", O, [
54
- s(o(f), { variant: "body2" }, {
67
+ r("div", T({ class: "legend" }, o(O)), [
68
+ r("ul", T({ class: "legend__list" }, o(P)), [
69
+ o(_).length === 0 ? (s(), u("li", oe, [
70
+ c(o(k), { variant: "body2" }, {
55
71
  default: p(() => [
56
- b("No results")
72
+ I("No results")
57
73
  ]),
58
74
  _: 1
59
75
  })
60
- ])) : (r(!0), c(S, { key: 1 }, P(o(x), ({ data: e, index: B }) => (r(), c("li", {
61
- key: B,
62
- class: A({ "disabled-item": n(e) })
76
+ ])) : (s(!0), u($, { key: 1 }, z(o(_), ({ data: e, index: A }) => (s(), u("li", {
77
+ key: A,
78
+ class: K({ "disabled-item": d(e) }),
79
+ onMouseenter: (b) => w(e),
80
+ onMouseleave: E
63
81
  }, [
64
- s(o(j), {
65
- text: h.maxLimitTooltipText,
66
- disabled: C(e),
82
+ c(o(Y), {
83
+ text: a.maxLimitTooltipText,
84
+ disabled: B(e),
67
85
  class: "disabled-tooltip"
68
86
  }, {
69
87
  default: p(() => [
70
- d("div", {
88
+ r("div", {
71
89
  class: "item-wrapper",
72
- onClick: (_) => N(e)
90
+ onClick: (b) => U(e)
73
91
  }, [
74
- s(o(R), {
92
+ c(o(X), {
75
93
  color: e.color,
76
- "is-checked": a(e),
77
- disabled: n(e),
78
- onClick: i[1] || (i[1] = F(
79
- (_) => {
80
- _.stopPropagation();
94
+ "is-checked": n(e),
95
+ disabled: d(e),
96
+ onClick: i[2] || (i[2] = q(
97
+ (b) => {
98
+ b.stopPropagation();
81
99
  },
82
100
  ["stop"]
83
101
  ))
84
102
  }, null, 8, ["color", "is-checked", "disabled"]),
85
- e.icon ? (r(), H(o($), {
103
+ e.icon ? (s(), g(o(W), {
86
104
  key: 0,
87
105
  class: "icon-color",
88
106
  type: e.iconType,
89
107
  name: e.icon,
90
108
  size: "16px"
91
- }, null, 8, ["type", "name"])) : U("", !0),
92
- d("div", W, [
93
- s(o(f), {
109
+ }, null, 8, ["type", "name"])) : x("", !0),
110
+ r("div", se, [
111
+ c(o(k), {
94
112
  variant: "body2",
95
113
  class: "legend-label",
96
114
  "is-truncated": "",
97
- "with-tooltip": !n(e),
115
+ "with-tooltip": !d(e),
98
116
  "tooltip-text": e.label,
99
117
  "tooltip-placement": "left"
100
118
  }, {
101
119
  default: p(() => [
102
- b(L(e.label), 1)
120
+ I(V(e.label), 1)
103
121
  ]),
104
122
  _: 2
105
123
  }, 1032, ["with-tooltip", "tooltip-text"]),
106
- s(o(f), {
124
+ e.caption ? (s(), g(o(k), {
125
+ key: 0,
107
126
  variant: "caption",
108
127
  class: "legend-caption legend-label",
109
128
  "is-truncated": "",
110
- "with-tooltip": !n(e),
129
+ "with-tooltip": !d(e),
111
130
  "tooltip-text": e.caption,
112
131
  "tooltip-placement": "left"
113
132
  }, {
114
133
  default: p(() => [
115
- b(L(e.caption), 1)
134
+ I(V(e.caption), 1)
116
135
  ]),
117
136
  _: 2
118
- }, 1032, ["with-tooltip", "tooltip-text"])
137
+ }, 1032, ["with-tooltip", "tooltip-text"])) : x("", !0)
119
138
  ])
120
- ], 8, Q)
139
+ ], 8, ie)
121
140
  ]),
122
141
  _: 2
123
142
  }, 1032, ["text", "disabled"])
124
- ], 2))), 128))
143
+ ], 42, le))), 128))
125
144
  ], 16)
126
145
  ], 16)
127
146
  ]));
128
147
  }
129
148
  });
130
149
  export {
131
- ne as default
150
+ be as default
132
151
  };