dynamic-mui 2.2.0 → 2.3.0

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 (166) hide show
  1. package/README.md +142 -5
  2. package/dist/accordion-DqBdGRim.mjs +23 -0
  3. package/dist/accordion-lvbD_BpX.js +1 -0
  4. package/dist/addressfield-CGX3UppE.mjs +152 -0
  5. package/dist/addressfield-DDG15fqJ.js +1 -0
  6. package/dist/asyncautocomplete-BAfBR9P7.mjs +89 -0
  7. package/dist/asyncautocomplete-w9q_1DWt.js +1 -0
  8. package/dist/bar-BzO7tvYJ.mjs +20 -0
  9. package/dist/bar-DEVxyUVS.js +1 -0
  10. package/dist/cascadeselect-C3QVfoig.mjs +64 -0
  11. package/dist/cascadeselect-DzbhK9en.js +1 -0
  12. package/dist/colorpicker-5qmEq7ZI.js +1 -0
  13. package/dist/colorpicker-DhNZulJY.mjs +98 -0
  14. package/dist/components/DynamicComponent.d.ts +2 -0
  15. package/dist/components/FormGenerator.d.ts +99 -10
  16. package/dist/components/controls/index.d.ts +45 -79
  17. package/dist/consentfield-B7Rm8d3U.js +1 -0
  18. package/dist/consentfield-CBQUR4J5.mjs +78 -0
  19. package/dist/datatable-BIQznwQe.mjs +20 -0
  20. package/dist/datatable-BWlcUP0M.js +1 -0
  21. package/dist/dynamic-mui.cjs +1 -0
  22. package/dist/dynamic-mui.mjs +32 -0
  23. package/dist/editabletable-DCoRmsEO.js +1 -0
  24. package/dist/editabletable-DRlBV8lk.mjs +126 -0
  25. package/dist/fileupload-ByBv1UjT.mjs +172 -0
  26. package/dist/fileupload-Cze3Oc_2.js +1 -0
  27. package/dist/formrepeater-BBkKGLFJ.mjs +71 -0
  28. package/dist/formrepeater-BxJzXoHx.js +1 -0
  29. package/dist/formwizard-BDZE1UDD.js +1 -0
  30. package/dist/formwizard-D2u1bMvK.mjs +83 -0
  31. package/dist/geofield-8WTeZk0Z.mjs +104 -0
  32. package/dist/geofield-Bw3p4NLJ.js +1 -0
  33. package/dist/group-B2mSylHd.mjs +23 -0
  34. package/dist/group-BlfO3ZZf.js +1 -0
  35. package/dist/imagelist-Bn9QhIv7.js +1 -0
  36. package/dist/imagelist-rqmJajHt.mjs +18 -0
  37. package/dist/index-CddjLTWF.mjs +12499 -0
  38. package/dist/index-D08GIfqF.js +43 -0
  39. package/dist/index.d.ts +9 -1
  40. package/dist/intlphone-B_Xn98pU.js +1 -0
  41. package/dist/intlphone-DtQZ12xk.mjs +140 -0
  42. package/dist/keyvaluefield-B_1NeGuP.mjs +125 -0
  43. package/dist/keyvaluefield-DyKCGd32.js +1 -0
  44. package/dist/line-B-DwR1hm.mjs +20 -0
  45. package/dist/line-BkymZu31.js +1 -0
  46. package/dist/lineitemlist-DGo8UOZC.js +1 -0
  47. package/dist/lineitemlist-vGKzJlQx.mjs +166 -0
  48. package/dist/list-7uNWrepS.mjs +20 -0
  49. package/dist/list-C0FgmtQw.js +1 -0
  50. package/dist/locationfield-CeUgxLkQ.mjs +119 -0
  51. package/dist/locationfield-Duyw1ZEz.js +1 -0
  52. package/dist/markdowneditor-B1y-hfny.mjs +90 -0
  53. package/dist/markdowneditor-Db0Un1_Z.js +2 -0
  54. package/dist/matrixfield-C7Sc-YpI.mjs +117 -0
  55. package/dist/matrixfield-CckODuPn.js +1 -0
  56. package/dist/mixChart-C3o184UT.js +1 -0
  57. package/dist/mixChart-ISf3Kbr-.mjs +75 -0
  58. package/dist/multitextbox-BYazIAeG.js +1 -0
  59. package/dist/multitextbox-ide2lvJ6.mjs +78 -0
  60. package/dist/npsscale-C2e88qk_.js +1 -0
  61. package/dist/npsscale-lndz7GEq.mjs +87 -0
  62. package/dist/numberstepper-DitbcvV9.mjs +128 -0
  63. package/dist/numberstepper-DyRjQM_K.js +1 -0
  64. package/dist/pie-CJSL8Sv5.js +1 -0
  65. package/dist/pie-CL29dlh5.mjs +20 -0
  66. package/dist/richtexteditor-CVg-MnKp.js +1 -0
  67. package/dist/richtexteditor-DsC1XC7h.mjs +141 -0
  68. package/dist/s3Upload-B0JeoLkS.js +1 -0
  69. package/dist/s3Upload-dpioZ2c8.mjs +51 -0
  70. package/dist/signature-14OrZriO.mjs +1225 -0
  71. package/dist/signature-D582X6tB.js +2 -0
  72. package/dist/stepper-B-FpcZvT.js +1 -0
  73. package/dist/stepper-CDfEy_C6.mjs +140 -0
  74. package/dist/summaryfield-B08ZmVHh.js +1 -0
  75. package/dist/summaryfield-CTpPlZBG.mjs +96 -0
  76. package/dist/tabs-BIliqFOs.js +1 -0
  77. package/dist/tabs-DDeJCFt8.mjs +39 -0
  78. package/dist/tagsinput-D-q6rRZS.mjs +58 -0
  79. package/dist/tagsinput-qh_lhdFb.js +1 -0
  80. package/dist/util/registry.d.ts +29 -0
  81. package/dist/util/resolvers.d.ts +45 -0
  82. package/dist/util/useFormEngine.d.ts +74 -0
  83. package/dist/util/validateSchema.d.ts +23 -0
  84. package/dist/v4-BysszJq8.mjs +30 -0
  85. package/dist/v4-CqdK_b8Y.js +1 -0
  86. package/package.json +36 -11
  87. package/dist/AxisSharedComponents-BbsKw1BT.js +0 -3
  88. package/dist/AxisSharedComponents-xLtpOLH_.mjs +0 -605
  89. package/dist/ChartsAxis-CANvBdY9.mjs +0 -47
  90. package/dist/ChartsAxis-EZ7m_KrU.js +0 -1
  91. package/dist/ChartsGrid-BCRTvNTr.js +0 -3
  92. package/dist/ChartsGrid-C_HT7qpL.mjs +0 -381
  93. package/dist/ChartsWrapper-CM7EDyAK.js +0 -5
  94. package/dist/ChartsWrapper-CO5_Z6BD.mjs +0 -1878
  95. package/dist/ChartsXAxis-CPmuCRhq.mjs +0 -487
  96. package/dist/ChartsXAxis-DFFY1sPg.js +0 -3
  97. package/dist/ChartsYAxis-DLUMr9vG.mjs +0 -392
  98. package/dist/ChartsYAxis-fpevi1sP.js +0 -1
  99. package/dist/XmlShapeDeserializer-3yQdm0b0.mjs +0 -237
  100. package/dist/XmlShapeDeserializer-XKJAoqLc.js +0 -1
  101. package/dist/clampAngle-BvZjnf53.mjs +0 -11
  102. package/dist/clampAngle-DpAsDoeT.js +0 -1
  103. package/dist/createSelector-B-9FwV16.mjs +0 -430
  104. package/dist/createSelector-f0oqn8Lr.js +0 -7
  105. package/dist/date-utils-CFUUt6NL.js +0 -4
  106. package/dist/date-utils-pGzaKb0p.mjs +0 -477
  107. package/dist/dynamic-mui.cjs.js +0 -1
  108. package/dist/dynamic-mui.es.js +0 -22
  109. package/dist/index--8Zky9Oh.js +0 -299
  110. package/dist/index-6WTs1Xy_.js +0 -1
  111. package/dist/index-B1R1akM2.js +0 -1
  112. package/dist/index-BW8_rRff.js +0 -7
  113. package/dist/index-BXFVK_GX.js +0 -1
  114. package/dist/index-B_KNUTjy.js +0 -1
  115. package/dist/index-BhaKvHkU.mjs +0 -62051
  116. package/dist/index-Bif92ima.js +0 -1
  117. package/dist/index-BnZOu8CL.js +0 -1
  118. package/dist/index-CDxpgRlR.mjs +0 -7
  119. package/dist/index-CThMfvtJ.mjs +0 -2555
  120. package/dist/index-CVqLvm8B.js +0 -1
  121. package/dist/index-CodJBIn6.mjs +0 -1665
  122. package/dist/index-Cr6Wp_S-.mjs +0 -3141
  123. package/dist/index-CslPwsrf.mjs +0 -4
  124. package/dist/index-CuV0MQzZ.mjs +0 -1173
  125. package/dist/index-DA0XouZs.mjs +0 -153
  126. package/dist/index-DKS5Sz9e.js +0 -14
  127. package/dist/index-DSkYYZuW.mjs +0 -4
  128. package/dist/index-DU78_FiA.js +0 -1
  129. package/dist/index-D_mYhgJ0.js +0 -10
  130. package/dist/index-DcWfyXJp.mjs +0 -92
  131. package/dist/index-Dlimbnxj.mjs +0 -2965
  132. package/dist/index-MllWgTJ5.mjs +0 -9372
  133. package/dist/index-in5z9hUb.js +0 -133
  134. package/dist/index-qUW7FnZ-.mjs +0 -20540
  135. package/dist/index.browser-BSu11T_q.mjs +0 -363
  136. package/dist/index.browser-By7-GABP.js +0 -4
  137. package/dist/isDeepEqual-BHfPvf9U.mjs +0 -393
  138. package/dist/isDeepEqual-CqxZGVRk.js +0 -1
  139. package/dist/loadCognitoIdentity-DtYTy-DW.js +0 -1
  140. package/dist/loadCognitoIdentity-DzdR91GB.mjs +0 -872
  141. package/dist/loadSts-Cic6UToN.mjs +0 -593
  142. package/dist/loadSts-csbFP6zX.js +0 -1
  143. package/dist/main.d.ts +0 -1
  144. package/dist/noAuth-B8ui2kBg.mjs +0 -71
  145. package/dist/noAuth-JPA2o4dt.js +0 -1
  146. package/dist/playground/AIContext.d.ts +0 -18
  147. package/dist/playground/AIPanel.d.ts +0 -10
  148. package/dist/playground/Builder.d.ts +0 -1
  149. package/dist/playground/Canvas.d.ts +0 -9
  150. package/dist/playground/DemoGallery.d.ts +0 -6
  151. package/dist/playground/PropertiesEditor.d.ts +0 -10
  152. package/dist/playground/Sidebar.d.ts +0 -9
  153. package/dist/playground/demoForms.d.ts +0 -3
  154. package/dist/playground/demoRecipes.d.ts +0 -15
  155. package/dist/playground/demoVariants.d.ts +0 -11
  156. package/dist/playground/documentation.d.ts +0 -6
  157. package/dist/playground/templates.d.ts +0 -7
  158. package/dist/playground/testData.d.ts +0 -2
  159. package/dist/test/setup.d.ts +0 -0
  160. package/dist/theme/theme.d.ts +0 -6
  161. package/dist/useAxis-DSbfEtO7.js +0 -3
  162. package/dist/useAxis-SiNBMMWq.mjs +0 -3010
  163. package/dist/useChartContainerProps-Bl3hO-r1.mjs +0 -5418
  164. package/dist/useChartContainerProps-C_C_PZoi.js +0 -12
  165. package/dist/useItemHighlightedGetter-9CIwqsGj.js +0 -1
  166. package/dist/useItemHighlightedGetter-CTISrNdV.mjs +0 -88
@@ -1,605 +0,0 @@
1
- import * as D from "react";
2
- import { d as Z, k as J, i as E } from "./useAxis-SiNBMMWq.mjs";
3
- import { _ as $, g as Q, h as q, a as R, j as V, P as C, s as K } from "./index-BhaKvHkU.mjs";
4
- import { c as B } from "./clampAngle-BvZjnf53.mjs";
5
- function tt() {
6
- const [e, t] = D.useState(!1);
7
- return D.useEffect(() => {
8
- t(!0);
9
- }, []), e;
10
- }
11
- function et(e) {
12
- return typeof e == "number" && !Number.isFinite(e);
13
- }
14
- function nt(e, t) {
15
- return Math.abs(t.getFullYear() - e.getFullYear());
16
- }
17
- function j(e, t) {
18
- return Math.abs(t.getFullYear() * 12 + t.getMonth() - 12 * e.getFullYear() - e.getMonth());
19
- }
20
- function S(e, t) {
21
- return Math.abs(t.getTime() - e.getTime()) / (1e3 * 60 * 60 * 24);
22
- }
23
- function it(e, t) {
24
- return Math.abs(t.getTime() - e.getTime()) / (1e3 * 60 * 60);
25
- }
26
- const rt = {
27
- years: {
28
- getTickNumber: nt,
29
- isTick: (e, t) => t.getFullYear() !== e.getFullYear(),
30
- format: (e) => e.getFullYear().toString()
31
- },
32
- quarterly: {
33
- getTickNumber: (e, t) => Math.floor(j(e, t) / 3),
34
- isTick: (e, t) => t.getMonth() !== e.getMonth() && t.getMonth() % 3 === 0,
35
- format: new Intl.DateTimeFormat("default", {
36
- month: "short"
37
- }).format
38
- },
39
- months: {
40
- getTickNumber: j,
41
- isTick: (e, t) => t.getMonth() !== e.getMonth(),
42
- format: new Intl.DateTimeFormat("default", {
43
- month: "short"
44
- }).format
45
- },
46
- biweekly: {
47
- getTickNumber: (e, t) => S(e, t) / 14,
48
- isTick: (e, t) => (t.getDay() < e.getDay() || S(t, e) > 7) && Math.floor(t.getDate() / 7) % 2 === 1,
49
- format: new Intl.DateTimeFormat("default", {
50
- day: "numeric"
51
- }).format
52
- },
53
- weeks: {
54
- getTickNumber: (e, t) => S(e, t) / 7,
55
- isTick: (e, t) => t.getDay() < e.getDay() || S(t, e) >= 7,
56
- format: new Intl.DateTimeFormat("default", {
57
- day: "numeric"
58
- }).format
59
- },
60
- days: {
61
- getTickNumber: S,
62
- isTick: (e, t) => t.getDate() !== e.getDate(),
63
- format: new Intl.DateTimeFormat("default", {
64
- day: "numeric"
65
- }).format
66
- },
67
- hours: {
68
- getTickNumber: it,
69
- isTick: (e, t) => t.getHours() !== e.getHours(),
70
- format: new Intl.DateTimeFormat("default", {
71
- hour: "2-digit",
72
- minute: "2-digit"
73
- }).format
74
- }
75
- }, P = {
76
- start: 0,
77
- extremities: 0,
78
- end: 1,
79
- middle: 0.5
80
- };
81
- function M(e, t, n) {
82
- return e(t) - (e.step() - e.bandwidth()) / 2 + P[n] * e.step();
83
- }
84
- function st(e, t, n) {
85
- const s = Math.abs(t[1] - t[0]), i = Math.ceil(e.length / (s / n));
86
- return Number.isNaN(i) || i <= 1 ? e : e.filter((o, c) => c % i === 0);
87
- }
88
- function ot(e, t, n, s, i) {
89
- if (n.length === 0)
90
- return [];
91
- const o = s.range()[0] > s.range()[1], c = e.findIndex((l) => i(M(s, l, o ? "start" : "end"))), u = e.findLastIndex((l) => i(M(s, l, o ? "end" : "start"))), r = e[0], a = e[e.length - 1];
92
- if (!(r instanceof Date) || !(a instanceof Date))
93
- return [];
94
- let d = 0;
95
- for (let l = 0; l < n.length; l += 1)
96
- if (n[l].getTickNumber(r, a) !== 0) {
97
- d = l;
98
- break;
99
- }
100
- let g = d;
101
- for (let l = d; l < n.length; l += 1) {
102
- if (l === n.length - 1) {
103
- g = l;
104
- break;
105
- }
106
- const b = n[l].getTickNumber(r, a), f = n[l + 1].getTickNumber(r, a);
107
- if (f > t || t / b < f / t) {
108
- g = l;
109
- break;
110
- }
111
- }
112
- const m = [];
113
- for (let l = Math.max(1, c); l <= u; l += 1)
114
- for (let b = d; b <= g; b += 1) {
115
- const f = e[l - 1], k = e[l];
116
- if (f instanceof Date && k instanceof Date && n[b].isTick(f, k)) {
117
- m.push({
118
- index: l,
119
- formatter: n[b].format
120
- });
121
- break;
122
- }
123
- }
124
- return m;
125
- }
126
- function at(e) {
127
- const {
128
- scale: t,
129
- tickNumber: n,
130
- valueFormatter: s,
131
- tickInterval: i,
132
- tickPlacement: o,
133
- tickLabelPlacement: c,
134
- tickSpacing: u,
135
- isInside: r,
136
- ordinalTimeTicks: a
137
- } = e;
138
- if (a !== void 0 && J(t.domain()) && E(t)) {
139
- const f = t.domain();
140
- if (f.length === 0 || f.length === 1)
141
- return [];
142
- const k = "middle";
143
- return ot(f, n, a.map((p) => typeof p == "string" ? rt[p] : p), t, r).map(({
144
- index: p,
145
- formatter: w
146
- }) => {
147
- const I = f[p], y = w(I);
148
- return {
149
- value: I,
150
- formattedValue: y,
151
- offset: M(t, I, k),
152
- labelOffset: 0
153
- };
154
- });
155
- }
156
- const d = o ?? "extremities";
157
- if (E(t)) {
158
- const f = t.domain(), k = c ?? "middle";
159
- let h = f;
160
- if (typeof i == "object" && i != null ? h = i : (typeof i == "function" && (h = h.filter(i)), u !== void 0 && u > 0 && (h = st(h, t.range(), u))), h.length === 0)
161
- return [];
162
- if (t.bandwidth() > 0) {
163
- const p = t.range()[0] > t.range()[1], w = h.findIndex((y) => r(M(t, y, p ? "start" : "end"))), I = h.findLastIndex((y) => r(M(t, y, p ? "end" : "start")));
164
- return [...h.slice(w, I + 1).map((y) => {
165
- const v = `${y}`;
166
- return {
167
- value: y,
168
- formattedValue: s?.(y, {
169
- location: "tick",
170
- scale: t,
171
- tickNumber: n,
172
- defaultTickLabel: v
173
- }) ?? v,
174
- offset: M(t, y, d),
175
- labelOffset: k === "tick" ? 0 : t.step() * (P[k] - P[d])
176
- };
177
- }), ...d === "extremities" && I === f.length - 1 && r(t.range()[1]) ? [{
178
- formattedValue: void 0,
179
- offset: t.range()[1],
180
- labelOffset: 0
181
- }] : []];
182
- }
183
- return h.map((p) => {
184
- const w = `${p}`;
185
- return {
186
- value: p,
187
- formattedValue: s?.(p, {
188
- location: "tick",
189
- scale: t,
190
- tickNumber: n,
191
- defaultTickLabel: w
192
- }) ?? w,
193
- offset: t(p),
194
- labelOffset: 0
195
- };
196
- });
197
- }
198
- if (t.domain().some(et))
199
- return [];
200
- const m = c, l = typeof i == "object" ? i : ct(t, n), b = [];
201
- for (let f = 0; f < l.length; f += 1) {
202
- const k = l[f], h = t(k);
203
- if (r(h)) {
204
- const p = t.tickFormat(n)(k);
205
- b.push({
206
- value: k,
207
- formattedValue: s?.(k, {
208
- location: "tick",
209
- scale: t,
210
- tickNumber: n,
211
- defaultTickLabel: p
212
- }) ?? p,
213
- offset: h,
214
- // Allowing the label to be placed in the middle of a continuous scale is weird.
215
- // But it is useful in some cases, like funnel categories with a linear scale.
216
- labelOffset: m === "middle" ? t(l[f - 1] ?? 0) - (h + t(l[f - 1] ?? 0)) / 2 : 0
217
- });
218
- }
219
- }
220
- return b;
221
- }
222
- function ct(e, t) {
223
- const n = e.domain();
224
- return n[0] === n[1] ? [n[0]] : e.ticks(t);
225
- }
226
- function St(e) {
227
- const {
228
- scale: t,
229
- tickNumber: n,
230
- valueFormatter: s,
231
- tickInterval: i,
232
- tickPlacement: o = "extremities",
233
- tickLabelPlacement: c,
234
- tickSpacing: u,
235
- direction: r,
236
- ordinalTimeTicks: a
237
- } = e, {
238
- instance: d
239
- } = Z(), g = r === "x" ? d.isXInside : d.isYInside;
240
- return D.useMemo(() => at({
241
- scale: t,
242
- tickNumber: n,
243
- tickPlacement: o,
244
- tickInterval: i,
245
- tickLabelPlacement: c,
246
- tickSpacing: u,
247
- valueFormatter: s,
248
- isInside: g,
249
- ordinalTimeTicks: a
250
- }), [t, n, o, i, c, u, s, g, a]);
251
- }
252
- const H = typeof window < "u" && "Intl" in window && "Segmenter" in Intl ? new Intl.Segmenter(void 0, {
253
- granularity: "grapheme"
254
- }) : null;
255
- function lt(e) {
256
- return e.length;
257
- }
258
- function ut(e) {
259
- const t = H.segment(e);
260
- let n = 0;
261
- for (const s of t)
262
- n += 1;
263
- return n;
264
- }
265
- const dt = H ? ut : lt;
266
- function ft(e) {
267
- return e * (Math.PI / 180);
268
- }
269
- const Y = typeof window < "u" && "Intl" in window && "Segmenter" in Intl ? new Intl.Segmenter(void 0, {
270
- granularity: "grapheme"
271
- }) : null;
272
- function gt(e, t) {
273
- return e.slice(0, t);
274
- }
275
- function mt(e, t) {
276
- const n = Y.segment(e);
277
- let s = "", i = 0;
278
- for (const o of n)
279
- if (s += o.segment, i += 1, i >= t)
280
- break;
281
- return s;
282
- }
283
- const ht = Y ? mt : gt, F = "…";
284
- function Nt(e, t) {
285
- const {
286
- width: n,
287
- height: s,
288
- measureText: i
289
- } = t, o = ft(t.angle), c = i(e), u = Math.abs(c.width * Math.cos(o)) + Math.abs(c.height * Math.sin(o)), r = Math.abs(c.width * Math.sin(o)) + Math.abs(c.height * Math.cos(o));
290
- return u <= n && r <= s;
291
- }
292
- function Dt(e, t) {
293
- if (t(e))
294
- return e;
295
- let n = e, s = 1, i = 1 / 2;
296
- const o = dt(e);
297
- let c = o, u = o, r = null;
298
- do {
299
- if (u = c, c = Math.floor(o * i), c === 0)
300
- break;
301
- n = ht(e, c).trim();
302
- const a = t(n + F);
303
- s += 1, a ? (r = n, i += 1 / 2 ** s) : i -= 1 / 2 ** s;
304
- } while (Math.abs(c - u) !== 1);
305
- return r ? r + F : "";
306
- }
307
- function z() {
308
- return typeof window > "u";
309
- }
310
- const T = /* @__PURE__ */ new Map(), U = 2e3, pt = /* @__PURE__ */ new Set(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height", "top", "left", "fontSize", "padding", "margin", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom"]);
311
- function A(e, t) {
312
- return pt.has(e) && t === +t ? `${t}px` : t;
313
- }
314
- const bt = /([A-Z])/g;
315
- function O(e) {
316
- return String(e).replace(bt, (t) => `-${t.toLowerCase()}`);
317
- }
318
- function G(e) {
319
- let t = "";
320
- for (const n in e)
321
- if (Object.hasOwn(e, n)) {
322
- const s = n, i = e[s];
323
- if (i === void 0)
324
- continue;
325
- t += `${O(s)}:${A(s, i)};`;
326
- }
327
- return t;
328
- }
329
- const kt = (e, t = {}) => {
330
- if (e == null || z())
331
- return {
332
- width: 0,
333
- height: 0
334
- };
335
- const n = String(e), s = G(t), i = `${n}-${s}`, o = T.get(i);
336
- if (o)
337
- return o;
338
- try {
339
- const c = X(), u = document.createElementNS("http://www.w3.org/2000/svg", "text");
340
- Object.keys(t).map((a) => (u.style[O(a)] = A(a, t[a]), a)), u.textContent = n, c.replaceChildren(u);
341
- const r = W(u);
342
- return T.set(i, r), T.size + 1 > U && T.clear(), process.env.NODE_ENV === "test" && c.replaceChildren(), r;
343
- } catch {
344
- return {
345
- width: 0,
346
- height: 0
347
- };
348
- }
349
- };
350
- function Lt(e, t = {}) {
351
- if (z())
352
- return new Map(Array.from(e).map((r) => [r, {
353
- width: 0,
354
- height: 0
355
- }]));
356
- const n = /* @__PURE__ */ new Map(), s = [], i = G(t);
357
- for (const r of e) {
358
- const a = `${r}-${i}`, d = T.get(a);
359
- d ? n.set(r, d) : s.push(r);
360
- }
361
- const o = X(), c = $({}, t);
362
- Object.keys(c).map((r) => (o.style[O(r)] = A(r, c[r]), r));
363
- const u = [];
364
- for (const r of s) {
365
- const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
366
- a.textContent = `${r}`, u.push(a);
367
- }
368
- o.replaceChildren(...u);
369
- for (let r = 0; r < s.length; r += 1) {
370
- const a = s[r], d = o.children[r], g = W(d), m = `${a}-${i}`;
371
- T.set(m, g), n.set(a, g);
372
- }
373
- return T.size + 1 > U && T.clear(), process.env.NODE_ENV === "test" && o.replaceChildren(), n;
374
- }
375
- function W(e) {
376
- try {
377
- const t = e.getBBox();
378
- return {
379
- width: t.width,
380
- height: t.height
381
- };
382
- } catch {
383
- const t = e.getBoundingClientRect();
384
- return {
385
- width: t.width,
386
- height: t.height
387
- };
388
- }
389
- }
390
- let x = null;
391
- function X() {
392
- return x === null && (x = document.createElementNS("http://www.w3.org/2000/svg", "svg"), x.setAttribute("aria-hidden", "true"), x.style.position = "absolute", x.style.top = "-20000px", x.style.left = "0", x.style.padding = "0", x.style.margin = "0", x.style.border = "none", x.style.pointerEvents = "none", x.style.visibility = "hidden", x.style.contain = "strict", document.body.appendChild(x)), x;
393
- }
394
- function $t(e) {
395
- return Q("MuiChartsAxis", e);
396
- }
397
- const L = q("MuiChartsAxis", ["root", "line", "tickContainer", "tick", "tickLabel", "label", "directionX", "directionY", "top", "bottom", "left", "right", "id"]);
398
- function xt({
399
- style: e,
400
- needsComputation: t,
401
- text: n
402
- }) {
403
- return n.split(`
404
- `).map((s) => $({
405
- text: s
406
- }, t ? kt(s, e) : {
407
- width: 0,
408
- height: 0
409
- }));
410
- }
411
- const yt = ["x", "y", "style", "text", "ownerState"], Tt = ["angle", "textAnchor", "dominantBaseline"];
412
- function wt(e) {
413
- const {
414
- x: t,
415
- y: n,
416
- style: s,
417
- text: i
418
- } = e, o = R(e, yt), c = s ?? {}, {
419
- angle: u,
420
- textAnchor: r,
421
- dominantBaseline: a
422
- } = c, d = R(c, Tt), g = tt(), m = D.useMemo(() => xt({
423
- style: d,
424
- needsComputation: g && i.includes(`
425
- `),
426
- text: i
427
- }), [d, i, g]);
428
- let l;
429
- switch (a) {
430
- case "hanging":
431
- case "text-before-edge":
432
- l = 0;
433
- break;
434
- case "central":
435
- l = (m.length - 1) / 2 * -m[0].height;
436
- break;
437
- default:
438
- l = (m.length - 1) * -m[0].height;
439
- break;
440
- }
441
- return /* @__PURE__ */ V.jsx("text", $({}, o, {
442
- transform: u ? `rotate(${u}, ${t}, ${n})` : void 0,
443
- x: t,
444
- y: n,
445
- textAnchor: r,
446
- dominantBaseline: a,
447
- style: d,
448
- children: m.map((b, f) => /* @__PURE__ */ V.jsx("tspan", {
449
- x: t,
450
- dy: `${f === 0 ? l : m[0].height}px`,
451
- dominantBaseline: a,
452
- children: b.text
453
- }, f))
454
- }));
455
- }
456
- process.env.NODE_ENV !== "production" && (wt.propTypes = {
457
- // ----------------------------- Warning --------------------------------
458
- // | These PropTypes are generated from the TypeScript type definitions |
459
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
460
- // ----------------------------------------------------------------------
461
- /**
462
- * Height of a text line (in `em`).
463
- */
464
- lineHeight: C.number,
465
- /**
466
- * If `true`, the line width is computed.
467
- * @default false
468
- */
469
- needsComputation: C.bool,
470
- ownerState: C.any,
471
- /**
472
- * Style applied to text elements.
473
- */
474
- style: C.object,
475
- /**
476
- * Text displayed.
477
- */
478
- text: C.string.isRequired
479
- });
480
- function Et(e) {
481
- const t = B(e);
482
- return t <= 30 || t >= 330 || t <= 210 && t >= 150 ? "middle" : t <= 180 ? "end" : "start";
483
- }
484
- function Pt(e) {
485
- const t = B(e);
486
- return t <= 30 || t >= 330 ? "hanging" : t <= 210 && t >= 150 ? "auto" : "central";
487
- }
488
- function At(e) {
489
- switch (e) {
490
- case "start":
491
- return "end";
492
- case "end":
493
- return "start";
494
- default:
495
- return e;
496
- }
497
- }
498
- const N = {
499
- start: 0,
500
- extremities: 0,
501
- end: 1,
502
- middle: 0.5,
503
- tick: 0
504
- };
505
- function Ot(e) {
506
- const {
507
- scale: t,
508
- tickInterval: n,
509
- tickLabelPlacement: s = "middle",
510
- tickPlacement: i = "extremities",
511
- groups: o
512
- } = e;
513
- return D.useMemo(() => {
514
- const c = t.domain(), u = typeof n == "function" && c.filter(n) || typeof n == "object" && n || c;
515
- if (t.bandwidth() > 0) {
516
- const r = _(u, o, i, s, t);
517
- return r[0] && (r[0].ignoreTick = !0), [
518
- {
519
- formattedValue: void 0,
520
- offset: t.range()[0],
521
- labelOffset: 0,
522
- groupIndex: o.length - 1
523
- },
524
- ...r,
525
- // Last tick
526
- {
527
- formattedValue: void 0,
528
- offset: t.range()[1],
529
- labelOffset: 0,
530
- groupIndex: o.length - 1
531
- }
532
- ];
533
- }
534
- return _(u, o, i, s, t);
535
- }, [t, n, o, i, s]);
536
- }
537
- function _(e, t, n, s, i) {
538
- const o = [], c = /* @__PURE__ */ new Map();
539
- let u = 0;
540
- for (let r = 0; r < t.length; r += 1)
541
- for (let a = 0; a < e.length; a += 1) {
542
- const d = e[a], g = t[r].getValue(d, a), m = o[o.length - 1];
543
- if (m?.value !== g || m?.groupIndex !== r) {
544
- u = 1;
545
- const b = E(i) ? i(d) - (i.step() - i.bandwidth()) / 2 + N[n] * i.step() : i(d), f = i.step() * u * (N[s] - N[n]);
546
- o.push({
547
- value: g,
548
- formattedValue: `${g}`,
549
- offset: b,
550
- groupIndex: r,
551
- dataIndex: a,
552
- ignoreTick: !1,
553
- labelOffset: f
554
- }), c.has(a) || c.set(a, /* @__PURE__ */ new Set());
555
- const k = c.get(a);
556
- for (const h of k.values())
557
- o[h].ignoreTick = !0;
558
- k.add(o.length - 1);
559
- } else {
560
- u += 1;
561
- const b = i.step() * u * (N[s] - N[n]);
562
- m.labelOffset = b;
563
- }
564
- }
565
- return o;
566
- }
567
- const vt = K("g", {
568
- name: "MuiChartsAxis",
569
- slot: "Root"
570
- })(({
571
- theme: e
572
- }) => ({
573
- [`& .${L.tickLabel}`]: $({}, e.typography.caption, {
574
- fill: (e.vars || e).palette.text.primary
575
- }),
576
- [`& .${L.label}`]: {
577
- fill: (e.vars || e).palette.text.primary
578
- },
579
- [`& .${L.line}`]: {
580
- stroke: (e.vars || e).palette.text.primary,
581
- shapeRendering: "crispEdges",
582
- strokeWidth: 1
583
- },
584
- [`& .${L.tick}`]: {
585
- stroke: (e.vars || e).palette.text.primary,
586
- shapeRendering: "crispEdges"
587
- }
588
- }));
589
- export {
590
- vt as A,
591
- wt as C,
592
- L as a,
593
- kt as b,
594
- Et as c,
595
- Nt as d,
596
- Dt as e,
597
- Pt as f,
598
- $t as g,
599
- St as h,
600
- At as i,
601
- Ot as j,
602
- et as k,
603
- Lt as l,
604
- tt as u
605
- };
@@ -1,47 +0,0 @@
1
- import * as u from "react";
2
- import { j as o, P as i } from "./index-BhaKvHkU.mjs";
3
- import { C as x } from "./ChartsXAxis-CPmuCRhq.mjs";
4
- import { C as a } from "./ChartsYAxis-DLUMr9vG.mjs";
5
- import { u as c, a as A } from "./useAxis-SiNBMMWq.mjs";
6
- function f(e) {
7
- const {
8
- slots: t,
9
- slotProps: r
10
- } = e, {
11
- xAxisIds: m,
12
- xAxis: n
13
- } = c(), {
14
- yAxisIds: l,
15
- yAxis: p
16
- } = A();
17
- return /* @__PURE__ */ o.jsxs(u.Fragment, {
18
- children: [m.map((s) => !n[s].position || n[s].position === "none" ? null : /* @__PURE__ */ o.jsx(x, {
19
- slots: t,
20
- slotProps: r,
21
- axisId: s
22
- }, s)), l.map((s) => !p[s].position || p[s].position === "none" ? null : /* @__PURE__ */ o.jsx(a, {
23
- slots: t,
24
- slotProps: r,
25
- axisId: s
26
- }, s))]
27
- });
28
- }
29
- process.env.NODE_ENV !== "production" && (f.propTypes = {
30
- // ----------------------------- Warning --------------------------------
31
- // | These PropTypes are generated from the TypeScript type definitions |
32
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
33
- // ----------------------------------------------------------------------
34
- /**
35
- * The props used for each component slot.
36
- * @default {}
37
- */
38
- slotProps: i.object,
39
- /**
40
- * Overridable component slots.
41
- * @default {}
42
- */
43
- slots: i.object
44
- });
45
- export {
46
- f as C
47
- };
@@ -1 +0,0 @@
1
- "use strict";const x=require("react"),r=require("./index--8Zky9Oh.js"),a=require("./ChartsXAxis-DFFY1sPg.js"),A=require("./ChartsYAxis-fpevi1sP.js"),c=require("./useAxis-DSbfEtO7.js");function f(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const j=f(x);function p(t){const{slots:o,slotProps:e}=t,{xAxisIds:n,xAxis:i}=c.useXAxes(),{yAxisIds:l,yAxis:u}=c.useYAxes();return r.jsxRuntimeExports.jsxs(j.Fragment,{children:[n.map(s=>!i[s].position||i[s].position==="none"?null:r.jsxRuntimeExports.jsx(a.ChartsXAxis,{slots:o,slotProps:e,axisId:s},s)),l.map(s=>!u[s].position||u[s].position==="none"?null:r.jsxRuntimeExports.jsx(A.ChartsYAxis,{slots:o,slotProps:e,axisId:s},s))]})}process.env.NODE_ENV!=="production"&&(p.propTypes={slotProps:r.PropTypes.object,slots:r.PropTypes.object});exports.ChartsAxis=p;
@@ -1,3 +0,0 @@
1
- "use strict";const a=require("./useAxis-DSbfEtO7.js"),N=require("react"),i=require("./index--8Zky9Oh.js"),d=require("./useChartContainerProps-C_C_PZoi.js"),f=require("./createSelector-f0oqn8Lr.js"),I=require("./AxisSharedComponents-BbsKw1BT.js");function L(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const y=L(N);function b(t,s,e){if(t==="pointer"){if(s)return[s];if(e)return[e]}if(t==="keyboard"){if(e)return[e];if(s)return[s]}return[]}const C=t=>t.controlledCartesianAxisHighlight,E=(t,s,e,r,c,x)=>{if(x)return[];if(e!==void 0)return e.filter(h=>s.axis[h.axisId]!==void 0).map(h=>h);const u=t!==null&&{axisId:s.axisIds[0],dataIndex:t},l=r!=null&&r;return b(c,u,l)},M=f.createSelectorMemoized(d.selectorChartsInteractionXAxisIndex,a.selectorChartXAxis,C,d.selectorChartsKeyboardXAxisIndex,d.selectorChartsLastInteraction,d.selectorBrushShouldPreventAxisHighlight,E);f.createSelectorMemoized(d.selectorChartsInteractionYAxisIndex,a.selectorChartYAxis,C,d.selectorChartsKeyboardYAxisIndex,d.selectorChartsLastInteraction,d.selectorBrushShouldPreventAxisHighlight,E);const S=(t,s,e,r,c,x,u)=>{if(u)return[];if(r!==void 0)return r.map(p=>i._extends({},p,{value:e.axis[p.axisId]?.data?.[p.dataIndex]})).filter(({value:p})=>p!==void 0);const l=s!=null&&{axisId:e.axisIds[0],value:s};l&&t!=null&&(l.dataIndex=t);const h=c!=null&&e.axis[c.axisId]?.data?.[c.dataIndex],o=c!=null&&h!=null&&i._extends({},c,{value:h});return b(x,l,o)},X=f.createSelectorMemoized(d.selectorChartsInteractionXAxisIndex,d.selectorChartsInteractionXAxisValue,a.selectorChartXAxis,C,d.selectorChartsKeyboardXAxisIndex,d.selectorChartsLastInteraction,d.selectorBrushShouldPreventAxisHighlight,S),k=f.createSelectorMemoized(d.selectorChartsInteractionYAxisIndex,d.selectorChartsInteractionYAxisValue,a.selectorChartYAxis,C,d.selectorChartsKeyboardYAxisIndex,d.selectorChartsLastInteraction,d.selectorBrushShouldPreventAxisHighlight,S),H=(t,s)=>t===void 0?[s.axis[s.axisIds[0]]]:t.map(r=>s.axis[r.axisId]??null).filter(r=>r!==null);f.createSelector(C,a.selectorChartXAxis,H);f.createSelector(C,a.selectorChartYAxis,H);function j(t){if(a.isOrdinalScale(t))return e=>(t(e)??0)+t.bandwidth()/2;const s=t.domain();return s[0]===s[1]?e=>e===s[0]?t(e):NaN:e=>t(e)}function O(){return a.useStore().use(a.selectorChartZoomIsInteracting)}function z(t){return i.generateUtilityClass("MuiChartsAxisHighlight",t)}i.generateUtilityClasses("MuiChartsAxisHighlight",["root"]);const A=i.styled("path",{name:"MuiChartsAxisHighlight",slot:"Root"})(({theme:t})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:i._extends({fill:"white",fillOpacity:.1},t.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:i._extends({strokeDasharray:"5 2",stroke:"#ffffff"},t.applyStyles("light",{stroke:"#000000"}))}]}));function Y(t){const{type:s,classes:e}=t,{left:r,width:c}=a.useDrawingArea(),x=a.useStore(),u=x.use(k),l=x.use(a.selectorChartYAxis);return u.length===0?null:u.map(({axisId:h,value:o})=>{const n=l.axis[h].scale,g=j(n),m=s==="band"&&o!==null&&a.isOrdinalScale(n);return process.env.NODE_ENV!=="production"&&m&&n(o)===void 0&&console.error(["MUI X Charts: The position value provided for the axis is not valid for the current scale.","This probably means something is wrong with the data passed to the chart.","The ChartsAxisHighlight component will not be displayed."].join(`
2
- `)),i.jsxRuntimeExports.jsxs(y.Fragment,{children:[m&&n(o)!==void 0&&i.jsxRuntimeExports.jsx(A,{d:`M ${r} ${n(o)-(n.step()-n.bandwidth())/2} l 0 ${n.step()} l ${c} 0 l 0 ${-n.step()} Z`,className:e.root,ownerState:{axisHighlight:"band"}}),s==="line"&&o!==null&&i.jsxRuntimeExports.jsx(A,{d:`M ${r} ${g(o)} L ${r+c} ${g(o)}`,className:e.root,ownerState:{axisHighlight:"line"}})]},`${h}-${o}`)})}function _(t){const{type:s,classes:e}=t,{top:r,height:c}=a.useDrawingArea(),x=a.useStore(),u=x.use(X),l=x.use(a.selectorChartXAxis);return u.length===0?null:u.map(({axisId:h,value:o})=>{const n=l.axis[h].scale,g=j(n),m=s==="band"&&o!==null&&a.isOrdinalScale(n);return process.env.NODE_ENV!=="production"&&m&&n(o)===void 0&&console.error(["MUI X Charts: The position value provided for the axis is not valid for the current scale.","This probably means something is wrong with the data passed to the chart.","The ChartsAxisHighlight component will not be displayed."].join(`
3
- `)),i.jsxRuntimeExports.jsxs(y.Fragment,{children:[m&&n(o)!==void 0&&i.jsxRuntimeExports.jsx(A,{d:`M ${n(o)-(n.step()-n.bandwidth())/2} ${r} l ${n.step()} 0 l 0 ${c} l ${-n.step()} 0 Z`,className:e.root,ownerState:{axisHighlight:"band"}}),s==="line"&&o!==null&&i.jsxRuntimeExports.jsx(A,{d:`M ${g(o)} ${r} L ${g(o)} ${r+c}`,className:e.root,ownerState:{axisHighlight:"line"}})]},`${h}-${o}`)})}const V=()=>{const t={root:["root"]};return i.composeClasses(t,z)};function P(t){const{x:s,y:e}=t,r=V();return i.jsxRuntimeExports.jsxs(y.Fragment,{children:[s&&s!=="none"&&i.jsxRuntimeExports.jsx(_,{type:s,classes:r}),e&&e!=="none"&&i.jsxRuntimeExports.jsx(Y,{type:e,classes:r})]})}process.env.NODE_ENV!=="production"&&(P.propTypes={x:i.PropTypes.oneOf(["band","line","none"]),y:i.PropTypes.oneOf(["band","line","none"])});function $(t){const{id:s,offset:e}=t,{left:r,top:c,width:x,height:u}=a.useDrawingArea(),l=i._extends({top:0,right:0,bottom:0,left:0},e);return i.jsxRuntimeExports.jsx("clipPath",{id:s,children:i.jsxRuntimeExports.jsx("rect",{x:r-l.left,y:c-l.top,width:x+l.left+l.right,height:u+l.top+l.bottom})})}process.env.NODE_ENV!=="production"&&($.propTypes={id:i.PropTypes.string.isRequired,offset:i.PropTypes.shape({bottom:i.PropTypes.number,left:i.PropTypes.number,right:i.PropTypes.number,top:i.PropTypes.number})});function G(t){return i.generateUtilityClass("MuiChartsGrid",t)}const T=i.generateUtilityClasses("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),D=i.styled("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(t,s)=>[{[`&.${T.verticalLine}`]:s.verticalLine},{[`&.${T.horizontalLine}`]:s.horizontalLine},s.root]})({}),R=i.styled("line",{name:"MuiChartsGrid",slot:"Line"})(({theme:t})=>({stroke:(t.vars||t).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function U(t){const{instance:s}=a.useChartContext(),{axis:e,start:r,end:c,classes:x}=t,{scale:u,tickNumber:l,tickInterval:h,tickSpacing:o}=e,p=I.useTicks({scale:u,tickNumber:l,tickInterval:h,tickSpacing:o,direction:"x",ordinalTimeTicks:"ordinalTimeTicks"in e?e.ordinalTimeTicks:void 0});return i.jsxRuntimeExports.jsx(y.Fragment,{children:p.map(({value:n,offset:g})=>s.isXInside(g)?i.jsxRuntimeExports.jsx(R,{y1:r,y2:c,x1:g,x2:g,className:x.verticalLine},`vertical-${n?.getTime?.()??n}`):null)})}function q(t){const{instance:s}=a.useChartContext(),{axis:e,start:r,end:c,classes:x}=t,{scale:u,tickNumber:l,tickInterval:h,tickSpacing:o}=e,p=I.useTicks({scale:u,tickNumber:l,tickInterval:h,tickSpacing:o,direction:"y",ordinalTimeTicks:"ordinalTimeTicks"in e?e.ordinalTimeTicks:void 0});return i.jsxRuntimeExports.jsx(y.Fragment,{children:p.map(({value:n,offset:g})=>s.isYInside(g)?i.jsxRuntimeExports.jsx(R,{y1:g,y2:g,x1:r,x2:c,className:x.horizontalLine},`horizontal-${n?.getTime?.()??n}`):null)})}const F=["vertical","horizontal"],Z=({classes:t})=>{const s={root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]};return i.composeClasses(s,G,t)};function v(t){const s=i.useThemeProps({props:t,name:"MuiChartsGrid"}),e=a.useDrawingArea(),{vertical:r,horizontal:c}=s,x=i._objectWithoutPropertiesLoose(s,F),{xAxis:u,xAxisIds:l}=a.useXAxes(),{yAxis:h,yAxisIds:o}=a.useYAxes(),p=Z(s),n=h[o[0]],g=u[l[0]];return i.jsxRuntimeExports.jsxs(D,i._extends({},x,{className:p.root,children:[r&&i.jsxRuntimeExports.jsx(U,{axis:g,start:e.top,end:e.height+e.top,classes:p}),c&&i.jsxRuntimeExports.jsx(q,{axis:n,start:e.left,end:e.width+e.left,classes:p})]}))}process.env.NODE_ENV!=="production"&&(v.propTypes={classes:i.PropTypes.object,horizontal:i.PropTypes.bool,vertical:i.PropTypes.bool});exports.ChartsAxisHighlight=P;exports.ChartsClipPath=$;exports.ChartsGrid=v;exports.getValueToPositionMapper=j;exports.selectorChartsHighlightXAxisIndex=M;exports.useInternalIsZoomInteracting=O;