@luzmo/analytics-components-kit 1.0.1-alpha.87 → 1.0.1-alpha.89

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 (203) hide show
  1. package/angular/components/display-settings-binning.component.ts +2 -2
  2. package/angular/components/display-settings-datetime.component.ts +2 -2
  3. package/angular/components/display-settings-grand-totals.component.ts +2 -2
  4. package/angular/components/display-settings-numeric.component.ts +2 -2
  5. package/angular/components/display-settings.component.ts +3 -3
  6. package/angular/components/draggable-data-item/index.ts +1 -0
  7. package/angular/components/draggable-data-item/types.ts +40 -0
  8. package/angular/components/draggable-data-item-level/index.ts +1 -0
  9. package/angular/components/draggable-data-item-level/types.ts +15 -0
  10. package/angular/components/draggable-data-item-level.component.ts +4 -10
  11. package/angular/components/draggable-data-item.component.ts +4 -10
  12. package/angular/components/droppable-slot/index.ts +1 -0
  13. package/angular/components/droppable-slot/types.ts +16 -0
  14. package/angular/components/droppable-slot.component.ts +5 -3
  15. package/angular/components/slot-menu/index.ts +1 -0
  16. package/angular/components/slot-menu/types.ts +31 -0
  17. package/angular/components/slot-menu-list.component.ts +2 -2
  18. package/angular/components/slot-menu.component.ts +3 -3
  19. package/angular/esm/components/display-settings-binning.component.d.ts +2 -1
  20. package/angular/esm/components/display-settings-datetime.component.d.ts +2 -2
  21. package/angular/esm/components/display-settings-grand-totals.component.d.ts +2 -1
  22. package/angular/esm/components/display-settings-numeric.component.d.ts +2 -1
  23. package/angular/esm/components/display-settings.component.d.ts +3 -3
  24. package/angular/esm/components/draggable-data-item/index.d.ts +1 -0
  25. package/angular/esm/components/draggable-data-item/index.js +1 -0
  26. package/angular/esm/components/draggable-data-item/types.d.ts +22 -0
  27. package/angular/esm/components/draggable-data-item/types.js +1 -0
  28. package/angular/esm/components/draggable-data-item-level/index.d.ts +1 -0
  29. package/angular/esm/components/draggable-data-item-level/index.js +1 -0
  30. package/angular/esm/components/draggable-data-item-level/types.d.ts +12 -0
  31. package/angular/esm/components/draggable-data-item-level/types.js +1 -0
  32. package/angular/esm/components/draggable-data-item-level.component.d.ts +9 -7
  33. package/angular/esm/components/draggable-data-item-level.component.js +2 -17
  34. package/angular/esm/components/draggable-data-item.component.d.ts +9 -7
  35. package/angular/esm/components/draggable-data-item.component.js +2 -17
  36. package/angular/esm/components/droppable-slot/index.d.ts +1 -0
  37. package/angular/esm/components/droppable-slot/index.js +1 -0
  38. package/angular/esm/components/droppable-slot/types.d.ts +9 -0
  39. package/angular/esm/components/droppable-slot/types.js +1 -0
  40. package/angular/esm/components/droppable-slot.component.d.ts +5 -4
  41. package/angular/esm/components/droppable-slot.component.js +7 -2
  42. package/angular/esm/components/slot-menu/index.d.ts +1 -0
  43. package/angular/esm/components/slot-menu/index.js +1 -0
  44. package/angular/esm/components/slot-menu/types.d.ts +25 -0
  45. package/angular/esm/components/slot-menu/types.js +1 -0
  46. package/angular/esm/components/slot-menu-list.component.d.ts +2 -1
  47. package/angular/esm/components/slot-menu.component.d.ts +3 -3
  48. package/angular/esm/types.d.ts +9 -3
  49. package/angular/tsconfig.json +3 -0
  50. package/angular/types.ts +24 -3
  51. package/angular/utils/base/base.d.ts +16 -0
  52. package/angular/utils/base/focus-visible.d.ts +29 -0
  53. package/angular/utils/base/focusable.d.ts +58 -0
  54. package/angular/utils/base/index.d.ts +4 -0
  55. package/angular/utils/base/sized-mixin.d.ts +17 -0
  56. package/angular/utils/color/color-palettes.d.ts +17 -0
  57. package/angular/utils/color/extrapolate-color.d.ts +1 -0
  58. package/angular/utils/data/load-draggable-items-for-datasets.d.ts +24 -0
  59. package/angular/utils/data-broker/index.d.ts +191 -0
  60. package/angular/utils/data-item-types/calculate-data-item-icon.d.ts +10 -0
  61. package/angular/utils/data-item-types/tests/calculate-data-item-icon.test.d.ts +1 -0
  62. package/angular/utils/drag/draggable.d.ts +13 -0
  63. package/angular/utils/filters/expressions.d.ts +15 -0
  64. package/angular/utils/filters/index.d.ts +1 -0
  65. package/angular/utils/formatter/calculate-duration.d.ts +2 -0
  66. package/angular/utils/formatter/decompose-numeric-format.d.ts +11 -0
  67. package/angular/utils/formatter/default-local-formats.d.ts +20 -0
  68. package/angular/utils/formatter/formats/cs.d.ts +20 -0
  69. package/angular/utils/formatter/formats/da.d.ts +20 -0
  70. package/angular/utils/formatter/formats/de.d.ts +21 -0
  71. package/angular/utils/formatter/formats/en-GB.d.ts +21 -0
  72. package/angular/utils/formatter/formats/en-US.d.ts +1 -0
  73. package/angular/utils/formatter/formats/en.d.ts +1 -0
  74. package/angular/utils/formatter/formats/es.d.ts +54 -0
  75. package/angular/utils/formatter/formats/fi.d.ts +20 -0
  76. package/angular/utils/formatter/formats/fr.d.ts +54 -0
  77. package/angular/utils/formatter/formats/he.d.ts +20 -0
  78. package/angular/utils/formatter/formats/hu.d.ts +20 -0
  79. package/angular/utils/formatter/formats/it.d.ts +54 -0
  80. package/angular/utils/formatter/formats/ja.d.ts +20 -0
  81. package/angular/utils/formatter/formats/ko.d.ts +20 -0
  82. package/angular/utils/formatter/formats/mk.d.ts +20 -0
  83. package/angular/utils/formatter/formats/nl.d.ts +21 -0
  84. package/angular/utils/formatter/formats/no.d.ts +21 -0
  85. package/angular/utils/formatter/formats/pl.d.ts +20 -0
  86. package/angular/utils/formatter/formats/pt.d.ts +20 -0
  87. package/angular/utils/formatter/formats/ru.d.ts +20 -0
  88. package/angular/utils/formatter/formats/sv.d.ts +20 -0
  89. package/angular/utils/formatter/formats/tr.d.ts +21 -0
  90. package/angular/utils/formatter/formats/zh-CN.d.ts +20 -0
  91. package/angular/utils/formatter/formats/zh-TW.d.ts +20 -0
  92. package/angular/utils/formatter/formatter.d.ts +9 -0
  93. package/angular/utils/formatter/localize.d.ts +3 -0
  94. package/angular/utils/formatter/smart-datetime-formats.const.d.ts +36 -0
  95. package/angular/utils/get-css-variable.d.ts +1 -0
  96. package/angular/utils/index.d.ts +7 -0
  97. package/angular/utils/localize/set-locale.d.ts +7 -0
  98. package/angular/utils/map-tile-providers/index.d.ts +93 -0
  99. package/angular/utils/store/slot-context.d.ts +4 -0
  100. package/angular/utils/store/slot-store.d.ts +39 -0
  101. package/angular/utils/switch-item/index.d.ts +14 -0
  102. package/angular/utils/themes/bliss.d.ts +43 -0
  103. package/angular/utils/themes/classic-dark.d.ts +34 -0
  104. package/angular/utils/themes/classic.d.ts +43 -0
  105. package/angular/utils/themes/default-dark.d.ts +46 -0
  106. package/angular/utils/themes/default.d.ts +46 -0
  107. package/angular/utils/themes/index.d.ts +3 -0
  108. package/angular/utils/themes/orion.d.ts +44 -0
  109. package/angular/utils/themes/pinky.d.ts +42 -0
  110. package/angular/utils/themes/radiant.d.ts +42 -0
  111. package/angular/utils/themes/royale.d.ts +36 -0
  112. package/angular/utils/themes/seasonal.d.ts +43 -0
  113. package/angular/utils/themes/urban.d.ts +44 -0
  114. package/angular/utils/themes/vivid.d.ts +42 -0
  115. package/angular/utils/time/formats.const.d.ts +4 -0
  116. package/angular/utils/time/periods.const.d.ts +15 -0
  117. package/angular/utils/transformations/convert-data-item-to-slot-content.d.ts +9 -0
  118. package/angular/utils/transformations/convert-datasets-to-draggable-items.d.ts +17 -0
  119. package/angular/utils/transformations/tests/convert-data-item-to-slot-content.test.d.ts +1 -0
  120. package/angular/utils/transformations/tests/convert-datasets-to-draggable-items.test.d.ts +1 -0
  121. package/angular/utils/types/type-check.d.ts +7 -0
  122. package/components/ai-chat-message-assistant/index.cjs +1 -1
  123. package/components/ai-chat-message-assistant/index.js +0 -1
  124. package/components/calculate-data-item-icon-DMDhKq_m.js +147 -0
  125. package/components/{calculate-data-item-icon-CX4VW9Km.cjs → calculate-data-item-icon-DtVGbet3.cjs} +1 -1
  126. package/components/dataset-selector-list/index.cjs +1 -1
  127. package/components/dataset-selector-list/index.js +1 -1
  128. package/components/display-settings/display-settings.d.ts +4 -2
  129. package/components/display-settings/index.cjs +1 -1
  130. package/components/display-settings/index.js +1 -1
  131. package/components/display-settings-binning/display-settings-binning.d.ts +2 -1
  132. package/components/display-settings-datetime/display-settings-datetime.d.ts +2 -1
  133. package/components/display-settings-datetime/index.cjs +1 -1
  134. package/components/display-settings-datetime/index.js +4 -4
  135. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +2 -1
  136. package/components/display-settings-numeric/display-settings-numeric.d.ts +2 -1
  137. package/components/display-settings-numeric/index.cjs +10 -10
  138. package/components/display-settings-numeric/index.js +5 -5
  139. package/components/draggable-data-item/draggable-data-item.d.ts +5 -7
  140. package/components/draggable-data-item/index.cjs +16 -22
  141. package/components/draggable-data-item/index.d.ts +1 -0
  142. package/components/draggable-data-item/index.js +78 -85
  143. package/components/draggable-data-item/types.d.ts +22 -0
  144. package/components/draggable-data-item-level/draggable-data-item-level.d.ts +4 -6
  145. package/components/draggable-data-item-level/helpers/generate-preview.d.ts +9 -1
  146. package/components/draggable-data-item-level/index.cjs +13 -13
  147. package/components/draggable-data-item-level/index.js +84 -102
  148. package/components/draggable-data-item-level/types.d.ts +12 -0
  149. package/components/droppable-slot/droppable-slot.d.ts +4 -2
  150. package/components/droppable-slot/index.cjs +13 -13
  151. package/components/droppable-slot/index.d.ts +1 -0
  152. package/components/droppable-slot/index.js +198 -199
  153. package/components/droppable-slot/types.d.ts +9 -0
  154. package/components/{en-CtCctD2c.js → en-D3ihEGXg.js} +67 -67
  155. package/components/{en--a5SfjnM.cjs → en-DZcn_iz_.cjs} +1 -1
  156. package/components/{en-GB-CXVKFWyH.cjs → en-GB-TqvgIw9B.cjs} +1 -1
  157. package/components/{en-GB-CbNfyZMo.js → en-GB-ialeqj_z.js} +1 -1
  158. package/components/filter-data-item-picker/index.cjs +1 -1
  159. package/components/filter-data-item-picker/index.js +1 -1
  160. package/components/filter-item/index.cjs +1 -1
  161. package/components/filter-item/index.js +8 -8
  162. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  163. package/components/filter-value-picker-hierarchy/index.js +1 -1
  164. package/components/filter-value-picker-numeric/index.cjs +1 -1
  165. package/components/filter-value-picker-numeric/index.js +1 -1
  166. package/components/{get-css-variable-CuDaWSjr.cjs → get-css-variable-COd1d84B.cjs} +3 -3
  167. package/components/{get-css-variable-DEf4GhTH.js → get-css-variable-CdwF98oh.js} +31 -31
  168. package/components/grid/index.cjs +1 -7
  169. package/components/grid/index.js +0 -7
  170. package/components/{index-BUal0r_D.cjs → index-BekTY3Em.cjs} +1 -1
  171. package/components/index-CFL6gmIu.cjs +20 -0
  172. package/components/{index-3WsfvkZF.js → index-CqKpf0B8.js} +1 -1
  173. package/components/{index-BGb_wRRW.js → index-DNPULp4A.js} +177 -188
  174. package/components/index.cjs +1 -1
  175. package/components/index.js +26 -24
  176. package/components/slot-contents-picker/index.cjs +1 -1
  177. package/components/slot-contents-picker/index.js +2 -2
  178. package/components/slot-menu/index.cjs +1 -1
  179. package/components/slot-menu/index.d.ts +1 -0
  180. package/components/slot-menu/index.js +64 -69
  181. package/components/slot-menu/slot-menu.d.ts +7 -6
  182. package/components/slot-menu/types.d.ts +25 -0
  183. package/components/slot-menu-list/index.cjs +1 -1
  184. package/components/slot-menu-list/index.js +2 -2
  185. package/components/slot-menu-list/slot-menu-list.d.ts +2 -1
  186. package/components/utils.cjs +1 -1
  187. package/components/utils.js +129 -62
  188. package/custom-elements.json +123 -126
  189. package/item-definitions/slicer-filter/slicer-filter-options.config.d.ts +1 -1
  190. package/package.json +1 -1
  191. package/types.d.ts +9 -3
  192. package/utils/data/load-draggable-items-for-datasets.d.ts +24 -0
  193. package/utils/data-broker/index.d.ts +69 -66
  194. package/utils/data-item-types/calculate-data-item-icon.d.ts +8 -2
  195. package/utils/data-item-types/tests/calculate-data-item-icon.test.d.ts +1 -0
  196. package/utils/index.d.ts +2 -0
  197. package/utils/transformations/convert-data-item-to-slot-content.d.ts +9 -0
  198. package/utils/transformations/convert-datasets-to-draggable-items.d.ts +17 -0
  199. package/utils/transformations/tests/convert-data-item-to-slot-content.test.d.ts +1 -0
  200. package/utils/transformations/tests/convert-datasets-to-draggable-items.test.d.ts +1 -0
  201. package/components/calculate-data-item-icon-C8CbsMQf.js +0 -139
  202. package/components/index-D1Y5TRsH.cjs +0 -20
  203. package/utils/types/column.types.d.ts +0 -57
@@ -17,78 +17,145 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- import { d as D } from "./decompose-numeric-format-BuZcjH2k.js";
21
- import { f as A } from "./en-CtCctD2c.js";
22
- import { l as F } from "./localize-CcDpq940.js";
23
- import { s as a } from "./index-V1XCZI4y.js";
24
- import { g as j, s as v } from "./index-CgnTl6Sc.js";
25
- function O(s) {
26
- const n = [], l = [];
27
- Object.keys(a).forEach((t) => {
20
+ import { d as h } from "./index-DNPULp4A.js";
21
+ import { d as F } from "./decompose-numeric-format-BuZcjH2k.js";
22
+ import { f as H } from "./en-D3ihEGXg.js";
23
+ import { l as q } from "./localize-CcDpq940.js";
24
+ import { s as m } from "./index-V1XCZI4y.js";
25
+ import { g as j, s as K } from "./index-CgnTl6Sc.js";
26
+ const f = (r) => !!(r && Object.keys(r).length > 0), I = (r, e, i = {}) => {
27
+ if (e.hidden === !0 && !i.includeHidden || !e.id || !e.type)
28
+ return null;
29
+ const s = f(e.name) ? e.name : { en: "Untitled" }, n = {
30
+ datasetId: r,
31
+ columnId: e.id,
32
+ type: e.type,
33
+ name: s
34
+ };
35
+ return e.description && f(e.description) && (n.description = e.description), e.subtype && (n.subtype = e.subtype), e.format && (n.format = e.format), typeof e.lowestLevel == "number" && (n.lowestLevel = e.lowestLevel), e.expression && (n.expression = e.expression), Array.isArray(e.duration_levels) && e.duration_levels.length > 0 && (n.duration_levels = [...e.duration_levels]), e.duration_format && (n.duration_format = e.duration_format), Array.isArray(e.hierarchyLevels) && e.hierarchyLevels.length > 0 && (n.hierarchyLevels = e.hierarchyLevels.map(({ id: c, level: a, name: l }) => ({ id: c, level: a, name: l }))), e.currency?.id && e.currency.symbol && (n.currency = {
36
+ id: e.currency.id,
37
+ name: e.currency.name,
38
+ symbol: e.currency.symbol
39
+ }), n;
40
+ }, C = (r, e, i = {}) => {
41
+ if (e.hidden === !0 && !i.includeHidden || !e.id || !e.type)
42
+ return null;
43
+ const s = f(e.name) ? e.name : { en: "Untitled" }, n = {
44
+ datasetId: r,
45
+ formulaId: e.id,
46
+ type: e.type,
47
+ name: s
48
+ };
49
+ return e.description && f(e.description) && (n.description = e.description), e.subtype && (n.subtype = e.subtype), e.format && (n.format = e.format), typeof e.lowestLevel == "number" && (n.lowestLevel = e.lowestLevel), e.expression && (n.expression = e.expression), Array.isArray(e.duration_levels) && e.duration_levels.length > 0 && (n.duration_levels = [...e.duration_levels]), e.duration_format && (n.duration_format = e.duration_format), e.currency?.id && e.currency.symbol && (n.currency = {
50
+ id: e.currency.id,
51
+ name: e.currency.name,
52
+ symbol: e.currency.symbol
53
+ }), n;
54
+ }, D = (r, e = {}) => {
55
+ if (!r?.id)
56
+ return [];
57
+ const i = [];
58
+ return Array.isArray(r.columns) && r.columns.forEach((d) => {
59
+ const s = I(r.id, d, e);
60
+ s && i.push(s);
61
+ }), Array.isArray(r.formulas) && r.formulas.forEach((d) => {
62
+ const s = C(r.id, d, e);
63
+ s && i.push(s);
64
+ }), i;
65
+ }, k = (r, e = {}) => r.map((i) => ({
66
+ id: i.id,
67
+ name: i.name,
68
+ description: i.description,
69
+ dataItems: D(i, e)
70
+ })), _ = async (r, e) => {
71
+ if (!Array.isArray(r) || r.length === 0)
72
+ throw new Error("At least one dataset ID is required");
73
+ const { dataBrokerConfig: i } = e;
74
+ if (!i)
75
+ throw new Error("dataBrokerConfig is required");
76
+ if (!i.authKey || !i.authToken)
77
+ throw new Error("Both authKey and authToken are required for DataBroker configuration");
78
+ if (!i.apiUrl)
79
+ throw new Error("apiUrl is required for DataBroker configuration");
80
+ if (typeof i.apiUrl != "string")
81
+ throw new TypeError("apiUrl must be a valid string");
82
+ h.configure(i);
83
+ try {
84
+ const d = await h.fetchDatasetsWithColumnsAndFormulas(r);
85
+ return k(d);
86
+ } catch (d) {
87
+ throw d instanceof Error && d.message.includes("Authentication failed") ? new Error("Failed to load datasets: Authentication failed. Please verify your API credentials are correct.") : d;
88
+ }
89
+ };
90
+ function M(r) {
91
+ const e = [], i = [];
92
+ Object.keys(m).forEach((t) => {
28
93
  t.replace("SlotsConfig", "");
29
- const e = t.replace("SlotsConfig", "").replaceAll(/([A-Z])/g, "-$1").toLowerCase();
30
- l.push({
31
- type: e,
32
- slotsConfig: a[t]
94
+ const o = t.replace("SlotsConfig", "").replaceAll(/([A-Z])/g, "-$1").toLowerCase();
95
+ i.push({
96
+ type: o,
97
+ slotsConfig: m[t]
33
98
  });
34
99
  });
35
- const p = l.find(
36
- (t) => t.type === s?.oldItemType
37
- ), r = l.find(
38
- (t) => t.type === s?.newItemType
39
- ), o = structuredClone(r?.slotsConfig ?? []);
40
- if (!r)
100
+ const d = i.find(
101
+ (t) => t.type === r?.oldItemType
102
+ ), s = i.find(
103
+ (t) => t.type === r?.newItemType
104
+ ), n = structuredClone(s?.slotsConfig ?? []);
105
+ if (!s)
41
106
  return {
42
- type: p?.type ?? "bar-chart",
43
- slots: s.slots ?? []
107
+ type: d?.type ?? "bar-chart",
108
+ slots: r.slots ?? []
44
109
  };
45
- const i = structuredClone(s.slots ?? []);
46
- for (const t of i) {
47
- const e = p?.slotsConfig.find(
48
- (M) => M.name === t.name
110
+ const c = structuredClone(r.slots ?? []);
111
+ for (const t of c) {
112
+ const o = d?.slotsConfig.find(
113
+ (v) => v.name === t.name
49
114
  );
50
- t.type = e?.type ?? t?.type;
115
+ t.type = o?.type ?? t?.type;
51
116
  }
52
- const m = i.filter((t) => t.type === "mixed").sort((t, e) => t.order - e.order), u = o.filter((t) => t.type === "mixed").sort((t, e) => t.order - e.order), y = i.filter((t) => t.type === "numeric").sort((t, e) => t.order - e.order), x = o.filter((t) => t.type === "numeric").sort((t, e) => t.order - e.order), c = [];
53
- for (const t of y)
54
- for (const e of t.content)
55
- e.key = "old-measure-" + t?.name + "-" + t.content.indexOf(e), c.push(e);
56
- for (const t of m)
57
- for (const e of t.content)
58
- e.type === "numeric" && (e.key = "old-mixed-" + t?.name + "-" + t.content.indexOf(e), c.push(e));
59
- const h = [...x, ...u].sort(
60
- (t, e) => o.indexOf(t) - o.indexOf(e)
117
+ const a = c.filter((t) => t.type === "mixed").sort((t, o) => t.order - o.order), l = n.filter((t) => t.type === "mixed").sort((t, o) => t.order - o.order), g = c.filter((t) => t.type === "numeric").sort((t, o) => t.order - o.order), w = n.filter((t) => t.type === "numeric").sort((t, o) => t.order - o.order), p = [];
118
+ for (const t of g)
119
+ for (const o of t.content)
120
+ o.key = "old-measure-" + t?.name + "-" + t.content.indexOf(o), p.push(o);
121
+ for (const t of a)
122
+ for (const o of t.content)
123
+ o.type === "numeric" && (o.key = "old-mixed-" + t?.name + "-" + t.content.indexOf(o), p.push(o));
124
+ const x = [...w, ...l].sort(
125
+ (t, o) => n.indexOf(t) - n.indexOf(o)
61
126
  );
62
- for (const t of c)
63
- for (const e of h)
64
- n.includes(t.key) || (e.content = e?.content ?? [], (e?.content?.length === 0 || e?.content?.length > 0 && e?.canAcceptMultipleDataItems === !0) && (e.content.push(t), n.push(t.key)));
65
- const S = i.filter((t) => t.type === "categorical").sort((t, e) => t.order - e.order), C = o.filter((t) => t.type === "categorical").sort((t, e) => t.order - e.order), f = [];
66
- for (const t of S)
67
- for (const e of t.content)
68
- e.key = "old-dimension-" + t?.name + "-" + t.content.indexOf(e), f.push(e);
69
- for (const t of m)
70
- for (const e of t.content)
71
- e.type !== "numeric" && (e.key = "old-mixed-" + t?.name + "-" + t.content.indexOf(e), f.push(e));
72
- const I = [
73
- ...C,
74
- ...u
75
- ].sort((t, e) => o.indexOf(t) - o.indexOf(e));
76
- for (const t of f)
77
- if (!n.includes(t.key))
78
- for (const e of I)
79
- e && !n.includes(t.key) && (e.content = e?.content ?? [], (e?.content?.length === 0 || e?.content?.length > 0 && e?.canAcceptMultipleDataItems === !0) && (e.content.push(t), n.push(t.key)));
80
- let d = { ...s.options };
81
- return r.setInitialOptions && (d = r?.setInitialOptions({ ...d })), {
82
- type: r.type ?? "bar-chart",
83
- slots: o.map((t) => ({ name: t.name, content: t.content ?? [] })) ?? [],
84
- options: d ?? { ...s.options }
127
+ for (const t of p)
128
+ for (const o of x)
129
+ e.includes(t.key) || (o.content = o?.content ?? [], (o?.content?.length === 0 || o?.content?.length > 0 && o?.canAcceptMultipleDataItems === !0) && (o.content.push(t), e.push(t.key)));
130
+ const b = c.filter((t) => t.type === "categorical").sort((t, o) => t.order - o.order), A = n.filter((t) => t.type === "categorical").sort((t, o) => t.order - o.order), y = [];
131
+ for (const t of b)
132
+ for (const o of t.content)
133
+ o.key = "old-dimension-" + t?.name + "-" + t.content.indexOf(o), y.push(o);
134
+ for (const t of a)
135
+ for (const o of t.content)
136
+ o.type !== "numeric" && (o.key = "old-mixed-" + t?.name + "-" + t.content.indexOf(o), y.push(o));
137
+ const S = [
138
+ ...A,
139
+ ...l
140
+ ].sort((t, o) => n.indexOf(t) - n.indexOf(o));
141
+ for (const t of y)
142
+ if (!e.includes(t.key))
143
+ for (const o of S)
144
+ o && !e.includes(t.key) && (o.content = o?.content ?? [], (o?.content?.length === 0 || o?.content?.length > 0 && o?.canAcceptMultipleDataItems === !0) && (o.content.push(t), e.push(t.key)));
145
+ let u = { ...r.options };
146
+ return s.setInitialOptions && (u = s?.setInitialOptions({ ...u })), {
147
+ type: s.type ?? "bar-chart",
148
+ slots: n.map((t) => ({ name: t.name, content: t.content ?? [] })) ?? [],
149
+ options: u ?? { ...r.options }
85
150
  };
86
151
  }
87
152
  export {
88
- D as decomposeNumericFormat,
89
- A as formatter,
153
+ k as convertDatasetsToDraggableItems,
154
+ F as decomposeNumericFormat,
155
+ H as formatter,
90
156
  j as getTheme,
91
- F as localize,
92
- O as switchItem,
93
- v as systemThemeIds
157
+ _ as loadDraggableItemsForDatasets,
158
+ q as localize,
159
+ M as switchItem,
160
+ K as systemThemeIds
94
161
  };