@alfadocs/ui-kit 1.55.0 → 1.56.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.
- package/dist/_chunks/{alia-sidebar-DS0b54Mv.js → alia-sidebar-DOei4Iyu.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js → anamnesis-summary-rows-CQ-XGr0T.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js → balance-badge-cell-DmDcXw0c.js} +3 -3
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js → bmi-calculator-C0UTxB7R.js} +2 -2
- package/dist/_chunks/{booking-uZO10TLK.js → booking-WyNGKPE2.js} +2 -2
- package/dist/_chunks/{breadcrumb-xgVpPH2H.js → breadcrumb-Boan-5n8.js} +39 -39
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js → calculator-dialog-pCPWta7h.js} +2 -2
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js → calendar-workspace-Du2ryaI-.js} +8 -8
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js → care-plan-header-DUX_SVvF.js} +2 -2
- package/dist/_chunks/chart-HsF1KHbx.js +909 -0
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js → contact-profile-card-Ci8lBQ6a.js} +2 -2
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +844 -0
- package/dist/_chunks/{data-table-C6T31E33.js → data-table-D8fuhqO1.js} +1 -1
- package/dist/_chunks/{date-range-picker-BOvHwWO5.js → date-range-picker-CtUOI38x.js} +188 -182
- package/dist/_chunks/{dependent-selector-Bet3XAFj.js → dependent-selector-DgaAQc-c.js} +91 -86
- package/dist/_chunks/{dialog-D52AI4nF.js → dialog-CUzbnKLw.js} +86 -69
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js → due-date-calculator-CSjklbyw.js} +2 -2
- package/dist/_chunks/{file-manager-dIJQUZvq.js → file-manager-Cc_uO8r2.js} +4 -4
- package/dist/_chunks/{freemium-paywall-B6ojVXq7.js → freemium-paywall-DIKuhX8b.js} +90 -86
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js → gestational-age-calculator-DqVeJke2.js} +2 -2
- package/dist/_chunks/{heatmap-BARGZZt2.js → heatmap-Gf9r7Tn1.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-B7L3zGsE.js → help-me-write-templates-fV-Apf72.js} +2 -2
- package/dist/_chunks/{key-value-pair-Ax8IJr1M.js → key-value-pair-BNNITp6S.js} +25 -19
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js → kit-extensions-Byfxy6sy.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js → link-cell-renderer-TeJNvymP.js} +2 -2
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +65 -0
- package/dist/_chunks/{notes-panel-I8ntrrUW.js → notes-panel-DceRhthG.js} +3 -3
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js → patient-summary-card-9nQWTQf6.js} +7 -3
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js → payment-automation-upsell-DiHovmUL.js} +2 -2
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js → payment-request-card-CwDpwXUC.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js → periodontal-chart-DD5C0M3l.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js → periodontal-chart-card-CxdXvsPU.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js → periodontal-diagnosis-D-PJv7KS.js} +2 -2
- package/dist/_chunks/{position-grid-D2D5_Tze.js → position-grid-CBB88EaH.js} +38 -36
- package/dist/_chunks/{practice-results-DxOgbPDy.js → practice-results-Dhbo-fc_.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js → pregnancy-dating-Bfu0Cq4H.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js → pregnancy-weight-gain-CUUrBTBo.js} +2 -2
- package/dist/_chunks/{public-header.agent-BWusjxY8.js → public-header.agent-pr2hyiND.js} +2 -2
- package/dist/_chunks/{radio-group-BT97ty7o.js → radio-group-DicxWJXP.js} +111 -106
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js → radiograph-panel.agent-DkUokbEa.js} +3 -3
- package/dist/_chunks/{rich-text-editor-Blp4smUr.js → rich-text-editor-CkFfmA3v.js} +2 -2
- package/dist/_chunks/{sheet-CNFW8mYZ.js → sheet-C7SwIxwB.js} +95 -79
- package/dist/_chunks/{signature-request-rgMsgo-C.js → signature-request-DhbpB9N9.js} +2 -2
- package/dist/_chunks/{stat-51CDL4au.js → stat-DmjGfXND.js} +117 -108
- package/dist/_chunks/{stepper-accordion-D7lnBGh2.js → stepper-accordion-DDTSOUHc.js} +17 -6
- package/dist/_chunks/{task-editor-Ctxsa1BY.js → task-editor-ByyRu29Y.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js → use-appointment-details-read-JsDM48tf.js} +2 -2
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js +26 -0
- package/dist/_chunks/{widget-picker-D8RiWrJd.js → widget-picker-DXYBMTfe.js} +2 -2
- package/dist/_chunks/{workflow-map-D3mezmGB.js → workflow-map-Demlpy39.js} +2 -2
- package/dist/agent-catalog.json +27 -10
- package/dist/agent-i18n/en.json +8 -7
- package/dist/components/_shared/non-modal-tab-exit.d.ts +8 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts +6 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts +20 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chart/chart.d.ts +10 -5
- package/dist/components/chart/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +22 -0
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +48 -4
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/position-grid/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/stat/index.d.ts +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-legacy.css +13 -2
- package/dist/i18n/locales/ar.d.ts +3 -2
- package/dist/i18n/locales/ar.js +5 -4
- package/dist/i18n/locales/de.d.ts +3 -2
- package/dist/i18n/locales/de.js +5 -4
- package/dist/i18n/locales/el.d.ts +3 -2
- package/dist/i18n/locales/el.js +5 -4
- package/dist/i18n/locales/en.d.ts +3 -2
- package/dist/i18n/locales/en.js +5 -4
- package/dist/i18n/locales/es.d.ts +3 -2
- package/dist/i18n/locales/es.js +5 -4
- package/dist/i18n/locales/fr.d.ts +3 -2
- package/dist/i18n/locales/fr.js +5 -4
- package/dist/i18n/locales/hi.d.ts +3 -2
- package/dist/i18n/locales/hi.js +5 -4
- package/dist/i18n/locales/it.d.ts +3 -2
- package/dist/i18n/locales/it.js +5 -4
- package/dist/i18n/locales/ja.d.ts +3 -2
- package/dist/i18n/locales/ja.js +5 -4
- package/dist/i18n/locales/nl.d.ts +3 -2
- package/dist/i18n/locales/nl.js +5 -4
- package/dist/i18n/locales/pl.d.ts +3 -2
- package/dist/i18n/locales/pl.js +5 -4
- package/dist/i18n/locales/pt.d.ts +3 -2
- package/dist/i18n/locales/pt.js +5 -4
- package/dist/i18n/locales/ro.d.ts +3 -2
- package/dist/i18n/locales/ro.js +5 -4
- package/dist/i18n/locales/ru.d.ts +3 -2
- package/dist/i18n/locales/ru.js +5 -4
- package/dist/i18n/locales/sq.d.ts +3 -2
- package/dist/i18n/locales/sq.js +5 -4
- package/dist/i18n/locales/sv.d.ts +3 -2
- package/dist/i18n/locales/sv.js +5 -4
- package/dist/i18n/locales/tr.d.ts +3 -2
- package/dist/i18n/locales/tr.js +5 -4
- package/dist/i18n/locales/zh.d.ts +3 -2
- package/dist/i18n/locales/zh.js +5 -4
- package/dist/index.js +48 -48
- package/dist/locales/ar.json +5 -4
- package/dist/locales/de.json +5 -4
- package/dist/locales/el.json +5 -4
- package/dist/locales/en.json +5 -4
- package/dist/locales/es.json +5 -4
- package/dist/locales/fr.json +5 -4
- package/dist/locales/hi.json +5 -4
- package/dist/locales/it.json +5 -4
- package/dist/locales/ja.json +5 -4
- package/dist/locales/nl.json +5 -4
- package/dist/locales/pl.json +5 -4
- package/dist/locales/pt.json +5 -4
- package/dist/locales/ro.json +5 -4
- package/dist/locales/ru.json +5 -4
- package/dist/locales/sq.json +5 -4
- package/dist/locales/sv.json +5 -4
- package/dist/locales/tr.json +5 -4
- package/dist/locales/zh.json +5 -4
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +13 -2
- package/package.json +1 -1
- package/dist/_chunks/chart-C2RBJERE.js +0 -705
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js +0 -691
|
@@ -0,0 +1,909 @@
|
|
|
1
|
+
import { jsxs as Y, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as ce, forwardRef as Ge, useId as Ke, useMemo as x, useRef as j, useState as z, useImperativeHandle as Ue } from "react";
|
|
3
|
+
import { c as Ye } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as je } from "react-i18next";
|
|
5
|
+
import Ve from "react-apexcharts";
|
|
6
|
+
import Le from "apexcharts";
|
|
7
|
+
import { u as Ze, a as Je, g as _e, b as Qe, r as Xe } from "./apexcharts-theme-DNoXvgnZ.js";
|
|
8
|
+
import { u as et } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
+
import { c as tt } from "./compose-refs-C0k0tdqF.js";
|
|
10
|
+
import { u as rt } from "./registry-DvAUVLHh.js";
|
|
11
|
+
import { I as at } from "./icon-button-COX76Jdj.js";
|
|
12
|
+
import { I as nt } from "./icon-button-group-C5hhI-R5.js";
|
|
13
|
+
import { c as Z } from "./createLucideIcon-DhHxpK9K.js";
|
|
14
|
+
/**
|
|
15
|
+
* @license lucide-react v1.22.0 - ISC
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the ISC license.
|
|
18
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
const ot = [
|
|
21
|
+
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
22
|
+
[
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
d: "M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",
|
|
26
|
+
key: "q0gr47"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
], st = Z("chart-area", ot);
|
|
30
|
+
/**
|
|
31
|
+
* @license lucide-react v1.22.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
const it = [
|
|
37
|
+
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
38
|
+
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
39
|
+
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
40
|
+
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
41
|
+
], ct = Z("chart-column", it);
|
|
42
|
+
/**
|
|
43
|
+
* @license lucide-react v1.22.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
const lt = [
|
|
49
|
+
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
50
|
+
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
51
|
+
], dt = Z("chart-line", lt);
|
|
52
|
+
/**
|
|
53
|
+
* @license lucide-react v1.22.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/
|
|
58
|
+
const pt = [
|
|
59
|
+
[
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
|
|
63
|
+
key: "pzmjnu"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }]
|
|
67
|
+
], ut = Z("chart-pie", pt);
|
|
68
|
+
/**
|
|
69
|
+
* @license lucide-react v1.22.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/
|
|
74
|
+
const ht = [
|
|
75
|
+
[
|
|
76
|
+
"path",
|
|
77
|
+
{
|
|
78
|
+
d: "M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3",
|
|
79
|
+
key: "19sr3x"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
83
|
+
], mt = Z("donut", ht), ft = ".apexcharts-legend, .apexcharts-toolbar";
|
|
84
|
+
function ie(e, s, t) {
|
|
85
|
+
!e || e.getAttribute(s) === t || (t === null ? e.removeAttribute(s) : e.setAttribute(s, t));
|
|
86
|
+
}
|
|
87
|
+
function yt(e, s) {
|
|
88
|
+
ce(() => {
|
|
89
|
+
if (!e) return;
|
|
90
|
+
const t = () => {
|
|
91
|
+
e.querySelectorAll(".apexcharts-canvas").forEach((u) => {
|
|
92
|
+
Array.from(u.children).forEach((y) => {
|
|
93
|
+
y.matches(ft) || ie(y, "aria-hidden", "true");
|
|
94
|
+
});
|
|
95
|
+
}), e.querySelectorAll(".apexcharts-toolbar").forEach((u) => {
|
|
96
|
+
var v;
|
|
97
|
+
const y = ((v = u.querySelector(".apexcharts-menu-icon")) == null ? void 0 : v.getAttribute("aria-expanded")) === "true";
|
|
98
|
+
ie(
|
|
99
|
+
u.querySelector(".apexcharts-menu"),
|
|
100
|
+
"inert",
|
|
101
|
+
y ? null : ""
|
|
102
|
+
);
|
|
103
|
+
}), e.querySelectorAll(
|
|
104
|
+
'.apexcharts-legend-series[role="button"]'
|
|
105
|
+
).forEach((u) => {
|
|
106
|
+
ie(u, "aria-label", null);
|
|
107
|
+
const y = u.getAttribute("data:collapsed") === "true" ? "false" : "true";
|
|
108
|
+
ie(u, "aria-pressed", s ? y : null);
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
let i = 0;
|
|
112
|
+
const p = (u) => {
|
|
113
|
+
const y = u.target instanceof Element ? u.target.closest(".apexcharts-legend-series") : null, v = y == null ? void 0 : y.getAttribute("rel");
|
|
114
|
+
v && (cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
115
|
+
var l;
|
|
116
|
+
const k = document.activeElement;
|
|
117
|
+
k && k !== document.body || (l = e.querySelector(
|
|
118
|
+
`.apexcharts-legend-series[rel="${CSS.escape(v)}"]`
|
|
119
|
+
)) == null || l.focus();
|
|
120
|
+
}));
|
|
121
|
+
};
|
|
122
|
+
t();
|
|
123
|
+
const c = new MutationObserver(t);
|
|
124
|
+
return c.observe(e, {
|
|
125
|
+
childList: !0,
|
|
126
|
+
subtree: !0,
|
|
127
|
+
attributes: !0,
|
|
128
|
+
attributeFilter: [
|
|
129
|
+
"aria-hidden",
|
|
130
|
+
"aria-label",
|
|
131
|
+
"aria-pressed",
|
|
132
|
+
"aria-expanded"
|
|
133
|
+
]
|
|
134
|
+
}), e.addEventListener("click", p), () => {
|
|
135
|
+
c.disconnect(), e.removeEventListener("click", p), cancelAnimationFrame(i);
|
|
136
|
+
};
|
|
137
|
+
}, [e, s]);
|
|
138
|
+
}
|
|
139
|
+
const bt = {
|
|
140
|
+
id: "chart",
|
|
141
|
+
// view_change backs the opt-in type switcher (`switchableTypes` prop):
|
|
142
|
+
// the same chart re-presented as line / bar / area / pie / donut.
|
|
143
|
+
capabilities: ["view_change"],
|
|
144
|
+
state: {
|
|
145
|
+
declaredType: {
|
|
146
|
+
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
147
|
+
descriptionKey: "ui.agent.chart.state.declaredType",
|
|
148
|
+
description: "The consumer-declared chart type — the shape `update_series` expects.",
|
|
149
|
+
read: (e) => e.getTypeState().declaredType
|
|
150
|
+
},
|
|
151
|
+
effectiveType: {
|
|
152
|
+
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
153
|
+
descriptionKey: "ui.agent.chart.state.effectiveType",
|
|
154
|
+
description: "The type currently rendered — differs from declaredType after a type-switcher pick.",
|
|
155
|
+
read: (e) => e.getTypeState().effectiveType
|
|
156
|
+
},
|
|
157
|
+
availableTypes: {
|
|
158
|
+
type: "ChartType[]",
|
|
159
|
+
descriptionKey: "ui.agent.chart.state.availableTypes",
|
|
160
|
+
description: "Types the switcher offers. Empty when the chart has no type switcher.",
|
|
161
|
+
read: (e) => e.getTypeState().availableTypes
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
actions: {
|
|
165
|
+
change_view: {
|
|
166
|
+
// Switching the presentation is a write (it changes what the user
|
|
167
|
+
// sees) but is trivially reversible by switching back.
|
|
168
|
+
safety: "write",
|
|
169
|
+
argsType: "type",
|
|
170
|
+
argsSchema: {
|
|
171
|
+
type: "object",
|
|
172
|
+
properties: {
|
|
173
|
+
type: {
|
|
174
|
+
type: "string",
|
|
175
|
+
enum: ["line", "bar", "area", "pie", "donut"],
|
|
176
|
+
description: "The chart type to render."
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
required: ["type"]
|
|
180
|
+
},
|
|
181
|
+
returns: "boolean (accepted)",
|
|
182
|
+
returnsSchema: {
|
|
183
|
+
type: "boolean",
|
|
184
|
+
description: "True when the switch was applied; false when the chart has no type switcher or the type is not offered (check availableTypes first)."
|
|
185
|
+
},
|
|
186
|
+
idempotent: !0,
|
|
187
|
+
descriptionKey: "ui.agent.chart.actions.changeView",
|
|
188
|
+
description: "Switch the rendered chart type via the type switcher. No-op (returns false) when the chart has no switcher or the type is not offered.",
|
|
189
|
+
invoke: (e, s) => e.setType(s.type)
|
|
190
|
+
},
|
|
191
|
+
update_series: {
|
|
192
|
+
// Replacing the rendered series mutates what the chart displays — it
|
|
193
|
+
// is a write, reversible by pushing the prior series back.
|
|
194
|
+
safety: "write",
|
|
195
|
+
argsType: "series",
|
|
196
|
+
// `series` is `ChartSeries[]` (line/bar/area) OR `number[]`
|
|
197
|
+
// (pie/donut/radialBar). Both shapes are accepted; the handle routes
|
|
198
|
+
// by chart type internally.
|
|
199
|
+
argsSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
series: {
|
|
203
|
+
oneOf: [
|
|
204
|
+
{
|
|
205
|
+
type: "array",
|
|
206
|
+
description: "Categorical series for line / bar / area charts.",
|
|
207
|
+
items: {
|
|
208
|
+
type: "object",
|
|
209
|
+
properties: {
|
|
210
|
+
name: { type: "string" },
|
|
211
|
+
data: { type: "array", items: { type: "number" } },
|
|
212
|
+
role: {
|
|
213
|
+
type: "string",
|
|
214
|
+
enum: ["primary", "compare"],
|
|
215
|
+
description: "Optional. 'compare' renders this series as a secondary, colour-blind-safe overlay (e.g. the previous period) — dashed grey for line/area, hatched grey for bar. Omit for a normal primary series."
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
required: ["name", "data"]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
type: "array",
|
|
223
|
+
description: "Flat values for pie / donut / radialBar charts.",
|
|
224
|
+
items: { type: "number" }
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
required: ["series"]
|
|
230
|
+
},
|
|
231
|
+
idempotent: !0,
|
|
232
|
+
descriptionKey: "ui.agent.chart.actions.updateSeries",
|
|
233
|
+
description: "Replace the chart series without remounting. Pass the DECLARED type’s shape (see declaredType state); when the user has switched the view cross-shape the values are converted to the rendered shape. The data and its summary table persist across type switches, resizes and theme changes until the host passes a new series prop.",
|
|
234
|
+
invoke: (e, s) => {
|
|
235
|
+
e.updateSeries(s.series);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
export_png: {
|
|
239
|
+
safety: "read",
|
|
240
|
+
returns: "string (PNG data URI)",
|
|
241
|
+
returnsSchema: {
|
|
242
|
+
type: "string",
|
|
243
|
+
description: "A `data:image/png;base64,…` URI of the rendered chart."
|
|
244
|
+
},
|
|
245
|
+
idempotent: !0,
|
|
246
|
+
descriptionKey: "ui.agent.chart.actions.exportPng",
|
|
247
|
+
description: "Return a PNG data URI of the chart for export or screenshotting. Waits until series pushed with update_series are drawn.",
|
|
248
|
+
invoke: (e) => e.dataURI()
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
domHooks: {
|
|
252
|
+
root: { attr: "data-component", value: "chart" },
|
|
253
|
+
instanceId: {
|
|
254
|
+
attr: "data-component-id",
|
|
255
|
+
sourceProp: "id",
|
|
256
|
+
description: "Sourced from the id prop."
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}, gt = Ye(
|
|
260
|
+
"ds:relative ds:block ds:w-full apex-theme-alfadocs",
|
|
261
|
+
{
|
|
262
|
+
variants: {
|
|
263
|
+
density: {
|
|
264
|
+
compact: "ds:min-h-[var(--chart-min-height-compact)]",
|
|
265
|
+
comfortable: "ds:min-h-[var(--chart-min-height-comfortable)]",
|
|
266
|
+
// Applied when an explicit `height` prop is given and no density was
|
|
267
|
+
// requested: the wrapper must not exceed the caller's height (a 96px
|
|
268
|
+
// KPI chart inside a card must not reserve 320px).
|
|
269
|
+
none: ""
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
defaultVariants: { density: "comfortable" }
|
|
273
|
+
}
|
|
274
|
+
), vt = [
|
|
275
|
+
"verticalLines",
|
|
276
|
+
"horizontalLines",
|
|
277
|
+
"slantedLines",
|
|
278
|
+
"squares",
|
|
279
|
+
"circles"
|
|
280
|
+
], wt = ["line", "bar", "area"], St = ["pie", "donut", "radialBar"], Be = [
|
|
281
|
+
"line",
|
|
282
|
+
"bar",
|
|
283
|
+
"area",
|
|
284
|
+
"pie",
|
|
285
|
+
"donut"
|
|
286
|
+
], xt = {
|
|
287
|
+
line: "chart.typeSwitcher.line",
|
|
288
|
+
bar: "chart.typeSwitcher.bar",
|
|
289
|
+
area: "chart.typeSwitcher.area",
|
|
290
|
+
pie: "chart.typeSwitcher.pie",
|
|
291
|
+
donut: "chart.typeSwitcher.donut"
|
|
292
|
+
}, Tt = {
|
|
293
|
+
line: /* @__PURE__ */ g(dt, {}),
|
|
294
|
+
bar: /* @__PURE__ */ g(ct, {}),
|
|
295
|
+
area: /* @__PURE__ */ g(st, {}),
|
|
296
|
+
pie: /* @__PURE__ */ g(ut, {}),
|
|
297
|
+
donut: /* @__PURE__ */ g(mt, {})
|
|
298
|
+
}, At = 2, Pe = "0 6";
|
|
299
|
+
function Ct(e, s) {
|
|
300
|
+
!e || s.length === 0 || e.querySelectorAll(
|
|
301
|
+
".apexcharts-bar-series > .apexcharts-series"
|
|
302
|
+
).forEach((t) => {
|
|
303
|
+
const i = Number(t.getAttribute("data:realIndex"));
|
|
304
|
+
s.includes(i) && t.querySelectorAll("path.apexcharts-bar-area").forEach(
|
|
305
|
+
(p) => {
|
|
306
|
+
if (typeof p.getBBox != "function") return;
|
|
307
|
+
const c = p.getBBox();
|
|
308
|
+
p.setAttribute(
|
|
309
|
+
"d",
|
|
310
|
+
`M ${c.x} ${c.y + c.height} L ${c.x} ${c.y} L ${c.x + c.width} ${c.y} L ${c.x + c.width} ${c.y + c.height}`
|
|
311
|
+
), p.setAttribute("stroke-dasharray", Pe), p.setAttribute("stroke-linecap", "round");
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function Ne(e) {
|
|
317
|
+
const s = getComputedStyle(e), t = (i) => Number.parseFloat(s.getPropertyValue(i)) || 0;
|
|
318
|
+
return t("--min-target-size") + t("--focus-ring-offset") + t("--focus-ring-width");
|
|
319
|
+
}
|
|
320
|
+
function ze(e, s, t, i, p, c) {
|
|
321
|
+
if (i === p)
|
|
322
|
+
return {
|
|
323
|
+
effectiveSeries: e,
|
|
324
|
+
effectiveCategories: s,
|
|
325
|
+
effectiveLabels: t
|
|
326
|
+
};
|
|
327
|
+
if (!i) {
|
|
328
|
+
const v = e.filter((l) => l.role !== "compare");
|
|
329
|
+
return {
|
|
330
|
+
effectiveSeries: v.map((l) => l.data.reduce((C, M) => C + M, 0)),
|
|
331
|
+
effectiveCategories: void 0,
|
|
332
|
+
effectiveLabels: v.map((l) => l.name)
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
return {
|
|
336
|
+
effectiveSeries: [{ name: c, data: e }],
|
|
337
|
+
effectiveCategories: t ?? [],
|
|
338
|
+
effectiveLabels: void 0
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function Me({
|
|
342
|
+
themeOptions: e,
|
|
343
|
+
toolbarBand: s,
|
|
344
|
+
chartId: t,
|
|
345
|
+
toolbar: i,
|
|
346
|
+
reducedMotion: p,
|
|
347
|
+
toolbarLocale: c,
|
|
348
|
+
locale: u,
|
|
349
|
+
effectiveLabels: y,
|
|
350
|
+
formatValue: v,
|
|
351
|
+
noDataText: k,
|
|
352
|
+
effectiveType: l,
|
|
353
|
+
effectiveSeries: C,
|
|
354
|
+
effectiveCategories: M,
|
|
355
|
+
isRtl: L,
|
|
356
|
+
patterns: de,
|
|
357
|
+
stacked: _,
|
|
358
|
+
orientation: P,
|
|
359
|
+
curve: $,
|
|
360
|
+
colors: B,
|
|
361
|
+
radialValueFormatter: J,
|
|
362
|
+
wrapperRef: Q
|
|
363
|
+
}) {
|
|
364
|
+
var X, ee, D, W, te;
|
|
365
|
+
const A = e, o = le(l) && Array.isArray(C) ? C.map((r) => r.role === "compare") : [], E = o.some(Boolean), q = E && l === "bar", R = q && C.some(
|
|
366
|
+
(r) => r.role === "compare" && r.data.some((d) => d < 0)
|
|
367
|
+
), F = q && P === "vertical" && !R, H = E ? Qe() : 0.3, n = {
|
|
368
|
+
...A,
|
|
369
|
+
chart: {
|
|
370
|
+
...A.chart,
|
|
371
|
+
id: t,
|
|
372
|
+
toolbar: { show: i },
|
|
373
|
+
zoom: { enabled: i },
|
|
374
|
+
animations: {
|
|
375
|
+
enabled: !p,
|
|
376
|
+
dynamicAnimation: { enabled: !p }
|
|
377
|
+
},
|
|
378
|
+
locales: [c],
|
|
379
|
+
defaultLocale: u,
|
|
380
|
+
parentHeightOffset: 0,
|
|
381
|
+
// Keep the keyboard-operable legend; drop Apex's data-point navigation
|
|
382
|
+
// and live announcements (English-only, and the summary table covers them).
|
|
383
|
+
accessibility: {
|
|
384
|
+
enabled: !0,
|
|
385
|
+
announcements: { enabled: !1 },
|
|
386
|
+
keyboard: { enabled: !0, navigation: { enabled: !1 } }
|
|
387
|
+
},
|
|
388
|
+
// Stacking is an axis-only concept — gate on the categorical types
|
|
389
|
+
// so a slice/radial chart never receives it, and omit the key
|
|
390
|
+
// entirely when unstacked so the default output is byte-identical.
|
|
391
|
+
..._ && le(l) ? { stacked: !0 } : {}
|
|
392
|
+
},
|
|
393
|
+
// Only set `labels` when the effective type actually has them (slice
|
|
394
|
+
// charts). Emitting `labels: undefined` crashes ApexCharts' bar
|
|
395
|
+
// renderer — `parseDataAxisCharts` reads `labels.length` and throws
|
|
396
|
+
// "Cannot read properties of undefined (reading 'length')", which
|
|
397
|
+
// aborts the render and leaves a blank chart. Absent is safe; area /
|
|
398
|
+
// line tolerate the undefined but bar does not, so never pass it.
|
|
399
|
+
...y ? { labels: y } : {},
|
|
400
|
+
legend: {
|
|
401
|
+
...A.legend,
|
|
402
|
+
position: "bottom",
|
|
403
|
+
// ApexCharts legend.horizontalAlign is a physical prop mapped internally
|
|
404
|
+
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
405
|
+
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
406
|
+
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
407
|
+
horizontalAlign: L ? "right" : "left",
|
|
408
|
+
fontFamily: "inherit",
|
|
409
|
+
// apexcharts-theme.css sizes the legend hit areas and ring room from
|
|
410
|
+
// this 4px; pinned so an ApexCharts default change cannot break them.
|
|
411
|
+
itemMargin: { horizontal: 5, vertical: 4 }
|
|
412
|
+
},
|
|
413
|
+
tooltip: {
|
|
414
|
+
...A.tooltip,
|
|
415
|
+
y: {
|
|
416
|
+
formatter: (r) => v(r)
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
noData: {
|
|
420
|
+
text: k
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
if (i && s && (n.title = { ...n.title, text: "", margin: s }), B && B.length > 0 && (n.colors = B), E) {
|
|
424
|
+
const r = n.colors ?? A.colors ?? [], d = (f) => r[f % Math.max(r.length, 1)], I = C.map((f, S) => f.role === "compare" ? -1 : S).filter((f) => f >= 0);
|
|
425
|
+
let O = 0;
|
|
426
|
+
n.colors = C.map((f, S) => {
|
|
427
|
+
if (f.role !== "compare") return d(S);
|
|
428
|
+
const K = I.length ? I[Math.min(O++, I.length - 1)] : S;
|
|
429
|
+
return d(K);
|
|
430
|
+
});
|
|
431
|
+
const G = n.colors.map(
|
|
432
|
+
(f, S) => o[S] ? Xe(f) : f
|
|
433
|
+
);
|
|
434
|
+
n.legend = {
|
|
435
|
+
...n.legend,
|
|
436
|
+
markers: {
|
|
437
|
+
...((X = n.legend) == null ? void 0 : X.markers) ?? {},
|
|
438
|
+
fillColors: G
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
if (le(l)) {
|
|
443
|
+
const r = l === "bar" && P === "horizontal";
|
|
444
|
+
n.xaxis = {
|
|
445
|
+
...A.xaxis,
|
|
446
|
+
categories: M ?? [],
|
|
447
|
+
...r ? {
|
|
448
|
+
labels: {
|
|
449
|
+
formatter: (d) => v(Number(d))
|
|
450
|
+
}
|
|
451
|
+
} : {}
|
|
452
|
+
}, n.yaxis = {
|
|
453
|
+
...A.yaxis,
|
|
454
|
+
opposite: L,
|
|
455
|
+
...r ? {} : { labels: { formatter: (d) => v(d) } }
|
|
456
|
+
}, n.stroke = {
|
|
457
|
+
curve: $,
|
|
458
|
+
width: l === "bar" ? E ? o.map((d) => d ? At : 0) : 0 : 2,
|
|
459
|
+
...E ? {
|
|
460
|
+
lineCap: "round",
|
|
461
|
+
// Runtime accepts a string dash; the published types say
|
|
462
|
+
// `number` → one documented cast. `'0 6'` + round cap ⇒ dots.
|
|
463
|
+
dashArray: o.map(
|
|
464
|
+
(d) => d ? Pe : 0
|
|
465
|
+
)
|
|
466
|
+
} : {}
|
|
467
|
+
}, n.dataLabels = { enabled: !1 };
|
|
468
|
+
}
|
|
469
|
+
if (l === "radialBar" && J) {
|
|
470
|
+
const r = A.plotOptions ?? {};
|
|
471
|
+
n.plotOptions = {
|
|
472
|
+
...r,
|
|
473
|
+
radialBar: {
|
|
474
|
+
...r.radialBar ?? {},
|
|
475
|
+
dataLabels: {
|
|
476
|
+
...((ee = r.radialBar) == null ? void 0 : ee.dataLabels) ?? {},
|
|
477
|
+
value: {
|
|
478
|
+
...((W = (D = r.radialBar) == null ? void 0 : D.dataLabels) == null ? void 0 : W.value) ?? {},
|
|
479
|
+
formatter: (d) => J(Number(d))
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
if (l === "bar" && P === "horizontal") {
|
|
486
|
+
const r = A.plotOptions ?? {};
|
|
487
|
+
n.plotOptions = {
|
|
488
|
+
...r,
|
|
489
|
+
bar: { ...r.bar ?? {}, horizontal: !0 }
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
if (de ? n.fill = {
|
|
493
|
+
type: E ? o.map((r) => r ? "solid" : "pattern") : "pattern",
|
|
494
|
+
opacity: E ? o.map(
|
|
495
|
+
(r) => r ? H : l === "area" ? 0.3 : 1
|
|
496
|
+
) : l === "area" ? 0.3 : 1,
|
|
497
|
+
pattern: {
|
|
498
|
+
style: [...vt],
|
|
499
|
+
strokeWidth: 2
|
|
500
|
+
}
|
|
501
|
+
} : q ? n.fill = {
|
|
502
|
+
type: "solid",
|
|
503
|
+
opacity: o.map((r) => r ? H : 1)
|
|
504
|
+
} : l === "area" && (n.fill = E ? {
|
|
505
|
+
type: "gradient",
|
|
506
|
+
opacity: o.map((r) => r ? H : 0.3)
|
|
507
|
+
} : {
|
|
508
|
+
type: "gradient",
|
|
509
|
+
opacity: 0.3
|
|
510
|
+
}), F) {
|
|
511
|
+
const r = o.map((O, G) => O ? G : -1).filter((O) => O >= 0), d = () => Ct(Q.current, r), I = () => typeof requestAnimationFrame == "function" ? requestAnimationFrame(d) : d();
|
|
512
|
+
n.chart = {
|
|
513
|
+
...n.chart,
|
|
514
|
+
events: {
|
|
515
|
+
...((te = n.chart) == null ? void 0 : te.events) ?? {},
|
|
516
|
+
mounted: () => I(),
|
|
517
|
+
updated: () => I(),
|
|
518
|
+
animationEnd: () => d()
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
return n;
|
|
523
|
+
}
|
|
524
|
+
function Et(e, s) {
|
|
525
|
+
var p, c, u;
|
|
526
|
+
if (!le(s)) return e;
|
|
527
|
+
const t = (p = e.chart) == null ? void 0 : p.events, i = {
|
|
528
|
+
...e,
|
|
529
|
+
colors: e.colors,
|
|
530
|
+
chart: {
|
|
531
|
+
...e.chart,
|
|
532
|
+
events: {
|
|
533
|
+
...t,
|
|
534
|
+
mounted: t == null ? void 0 : t.mounted,
|
|
535
|
+
updated: t == null ? void 0 : t.updated,
|
|
536
|
+
animationEnd: t == null ? void 0 : t.animationEnd
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
return ((c = e.stroke) == null ? void 0 : c.dashArray) !== void 0 ? i : {
|
|
541
|
+
...i,
|
|
542
|
+
stroke: {
|
|
543
|
+
...e.stroke,
|
|
544
|
+
lineCap: s === "bar" ? "square" : "butt",
|
|
545
|
+
dashArray: 0
|
|
546
|
+
},
|
|
547
|
+
legend: {
|
|
548
|
+
...e.legend,
|
|
549
|
+
markers: { ...(u = e.legend) == null ? void 0 : u.markers, fillColors: void 0 }
|
|
550
|
+
},
|
|
551
|
+
fill: e.fill ?? { type: "solid", opacity: 0.85 }
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function V(e) {
|
|
555
|
+
return St.includes(e);
|
|
556
|
+
}
|
|
557
|
+
function le(e) {
|
|
558
|
+
return wt.includes(e);
|
|
559
|
+
}
|
|
560
|
+
function kt(e, s) {
|
|
561
|
+
return V(s) ? [
|
|
562
|
+
{
|
|
563
|
+
name: "",
|
|
564
|
+
data: e
|
|
565
|
+
}
|
|
566
|
+
] : e;
|
|
567
|
+
}
|
|
568
|
+
const Rt = Ge(
|
|
569
|
+
({
|
|
570
|
+
title: e,
|
|
571
|
+
id: s,
|
|
572
|
+
type: t,
|
|
573
|
+
series: i,
|
|
574
|
+
categories: p,
|
|
575
|
+
labels: c,
|
|
576
|
+
height: u,
|
|
577
|
+
width: y,
|
|
578
|
+
patterns: v = !1,
|
|
579
|
+
stacked: k = !1,
|
|
580
|
+
orientation: l = "vertical",
|
|
581
|
+
curve: C = "smooth",
|
|
582
|
+
colors: M,
|
|
583
|
+
toolbar: L = !1,
|
|
584
|
+
locale: de,
|
|
585
|
+
radialValueFormatter: _,
|
|
586
|
+
valueFormatter: P,
|
|
587
|
+
switchableTypes: $,
|
|
588
|
+
onTypeChange: B,
|
|
589
|
+
density: J,
|
|
590
|
+
className: Q
|
|
591
|
+
}, A) => {
|
|
592
|
+
const { t: o, i18n: E } = je("ui"), q = Ke(), R = x(
|
|
593
|
+
() => `chart-${q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
594
|
+
[q]
|
|
595
|
+
), F = `${R}-summary`, H = j(null), [n, X] = z(null), ee = x(
|
|
596
|
+
() => tt(H, X),
|
|
597
|
+
[]
|
|
598
|
+
), D = x(() => ({ current: n }), [n]), [W, te] = z(0);
|
|
599
|
+
Ze(D), Je(D);
|
|
600
|
+
const r = de ?? E.language ?? "en", [d, I] = z(() => {
|
|
601
|
+
try {
|
|
602
|
+
return _e();
|
|
603
|
+
} catch {
|
|
604
|
+
return {};
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
ce(() => {
|
|
608
|
+
if (typeof document > "u") return;
|
|
609
|
+
let a;
|
|
610
|
+
const m = new MutationObserver(() => {
|
|
611
|
+
clearTimeout(a), a = setTimeout(() => {
|
|
612
|
+
try {
|
|
613
|
+
I(_e());
|
|
614
|
+
} catch {
|
|
615
|
+
}
|
|
616
|
+
}, 50);
|
|
617
|
+
});
|
|
618
|
+
return m.observe(document.documentElement, {
|
|
619
|
+
attributes: !0,
|
|
620
|
+
attributeFilter: ["class"]
|
|
621
|
+
}), () => {
|
|
622
|
+
clearTimeout(a), m.disconnect();
|
|
623
|
+
};
|
|
624
|
+
}, []);
|
|
625
|
+
const [O, G] = z(
|
|
626
|
+
() => typeof document > "u" ? 0 : Ne(document.documentElement)
|
|
627
|
+
);
|
|
628
|
+
ce(() => {
|
|
629
|
+
if (!n || !L) return;
|
|
630
|
+
const a = new ResizeObserver(() => m()), m = () => {
|
|
631
|
+
const w = n.querySelector(".apexcharts-toolbar");
|
|
632
|
+
w && a.observe(w), G(
|
|
633
|
+
Math.max(Ne(n), (w == null ? void 0 : w.offsetHeight) ?? 0)
|
|
634
|
+
);
|
|
635
|
+
};
|
|
636
|
+
m();
|
|
637
|
+
const b = new MutationObserver(m);
|
|
638
|
+
for (let w = n.parentElement; w; w = w.parentElement)
|
|
639
|
+
b.observe(w, { attributes: !0, attributeFilter: ["class"] });
|
|
640
|
+
const T = new MutationObserver((w) => {
|
|
641
|
+
w.flatMap((U) => [...U.addedNodes]).some(
|
|
642
|
+
(U) => U instanceof Element && (U.matches(".apexcharts-toolbar") || U.querySelector(".apexcharts-toolbar"))
|
|
643
|
+
) && m();
|
|
644
|
+
});
|
|
645
|
+
return T.observe(n, { childList: !0, subtree: !0 }), () => {
|
|
646
|
+
a.disconnect(), b.disconnect(), T.disconnect();
|
|
647
|
+
};
|
|
648
|
+
}, [n, L]), ce(() => {
|
|
649
|
+
const a = n;
|
|
650
|
+
if (!a || typeof ResizeObserver > "u") return;
|
|
651
|
+
const m = new ResizeObserver((b) => {
|
|
652
|
+
const T = b[0];
|
|
653
|
+
T && te(Math.floor(T.contentRect.width));
|
|
654
|
+
});
|
|
655
|
+
return m.observe(a), () => m.disconnect();
|
|
656
|
+
}, [n]);
|
|
657
|
+
const f = x(() => {
|
|
658
|
+
if (!$ || $.length === 0) return [];
|
|
659
|
+
const a = $.filter(
|
|
660
|
+
(b) => Be.includes(b)
|
|
661
|
+
);
|
|
662
|
+
if (!Be.includes(t))
|
|
663
|
+
return [];
|
|
664
|
+
const m = a.includes(t) ? a : [t, ...a];
|
|
665
|
+
return [...new Set(m)];
|
|
666
|
+
}, [$, t]), S = f.length >= 2, [K, me] = z(null), h = S && K && f.includes(K) ? K : t;
|
|
667
|
+
yt(
|
|
668
|
+
n,
|
|
669
|
+
h !== "pie" && h !== "donut"
|
|
670
|
+
);
|
|
671
|
+
const pe = V(t), ue = V(h), [re, fe] = z(null), [ye, $e] = z(i);
|
|
672
|
+
ye !== i && ($e(i), re && fe(null));
|
|
673
|
+
const be = re && re.base === i && ye === i ? re.next : i, ge = j(i);
|
|
674
|
+
ge.current = i;
|
|
675
|
+
const { effectiveSeries: N, effectiveCategories: ae, effectiveLabels: ne } = x(
|
|
676
|
+
() => ze(
|
|
677
|
+
be,
|
|
678
|
+
p,
|
|
679
|
+
c,
|
|
680
|
+
pe,
|
|
681
|
+
ue,
|
|
682
|
+
o("chart.table.value")
|
|
683
|
+
),
|
|
684
|
+
[be, p, c, pe, ue, o]
|
|
685
|
+
), ve = (a) => ze(
|
|
686
|
+
a,
|
|
687
|
+
p,
|
|
688
|
+
c,
|
|
689
|
+
pe,
|
|
690
|
+
ue,
|
|
691
|
+
o("chart.table.value")
|
|
692
|
+
), we = j(ve);
|
|
693
|
+
we.current = ve;
|
|
694
|
+
const Se = j(Promise.resolve()), he = x(
|
|
695
|
+
() => ({
|
|
696
|
+
async dataURI() {
|
|
697
|
+
await Se.current;
|
|
698
|
+
const a = Le.getChartByID(R);
|
|
699
|
+
return a ? (await a.dataURI()).imgURI : "";
|
|
700
|
+
},
|
|
701
|
+
updateSeries(a) {
|
|
702
|
+
fe({ base: ge.current, next: a });
|
|
703
|
+
const m = Le.getChartByID(R);
|
|
704
|
+
if (!m) return;
|
|
705
|
+
const b = we.current(a), T = { ...Re.current, ...b };
|
|
706
|
+
Se.current = m.updateOptions(
|
|
707
|
+
{
|
|
708
|
+
...Et(
|
|
709
|
+
Me(T),
|
|
710
|
+
T.effectiveType
|
|
711
|
+
),
|
|
712
|
+
series: b.effectiveSeries
|
|
713
|
+
},
|
|
714
|
+
!1,
|
|
715
|
+
!0
|
|
716
|
+
).catch(() => {
|
|
717
|
+
});
|
|
718
|
+
},
|
|
719
|
+
setType(a) {
|
|
720
|
+
return !S || !f.includes(a) ? !1 : (me(a), !0);
|
|
721
|
+
},
|
|
722
|
+
getTypeState() {
|
|
723
|
+
return {
|
|
724
|
+
declaredType: t,
|
|
725
|
+
effectiveType: h,
|
|
726
|
+
availableTypes: S ? [...f] : []
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
}),
|
|
730
|
+
[R, t, h, S, f]
|
|
731
|
+
);
|
|
732
|
+
Ue(A, () => he, [he]), rt(bt, he, s);
|
|
733
|
+
const xe = typeof document < "u" && document.documentElement.dir === "rtl", Te = x(
|
|
734
|
+
() => kt(N, h),
|
|
735
|
+
[N, h]
|
|
736
|
+
), Ae = x(
|
|
737
|
+
() => new Intl.NumberFormat(r),
|
|
738
|
+
[r]
|
|
739
|
+
), oe = x(
|
|
740
|
+
() => P ?? ((a) => Ae.format(a)),
|
|
741
|
+
[P, Ae]
|
|
742
|
+
), Ce = x(
|
|
743
|
+
() => ({
|
|
744
|
+
name: r,
|
|
745
|
+
options: {
|
|
746
|
+
toolbar: {
|
|
747
|
+
download: o("chart.toolbar.download"),
|
|
748
|
+
// Names the button that opens the export menu (Apex: "Menu").
|
|
749
|
+
menu: o("chart.toolbar.download"),
|
|
750
|
+
selection: o("chart.toolbar.selection"),
|
|
751
|
+
selectionZoom: o("chart.toolbar.selectionZoom"),
|
|
752
|
+
zoomIn: o("chart.toolbar.zoomIn"),
|
|
753
|
+
zoomOut: o("chart.toolbar.zoomOut"),
|
|
754
|
+
pan: o("chart.toolbar.pan"),
|
|
755
|
+
reset: o("chart.toolbar.reset"),
|
|
756
|
+
exportToSVG: o("chart.toolbar.exportToSVG"),
|
|
757
|
+
exportToPNG: o("chart.toolbar.exportToPNG"),
|
|
758
|
+
exportToCSV: o("chart.toolbar.exportToCSV")
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}),
|
|
762
|
+
[r, o]
|
|
763
|
+
), Ee = et(), ke = o("chart.noData"), se = x(
|
|
764
|
+
() => ({
|
|
765
|
+
themeOptions: d,
|
|
766
|
+
toolbarBand: O,
|
|
767
|
+
chartId: R,
|
|
768
|
+
toolbar: L,
|
|
769
|
+
reducedMotion: Ee,
|
|
770
|
+
toolbarLocale: Ce,
|
|
771
|
+
locale: r,
|
|
772
|
+
effectiveLabels: ne,
|
|
773
|
+
formatValue: oe,
|
|
774
|
+
noDataText: ke,
|
|
775
|
+
effectiveType: h,
|
|
776
|
+
effectiveSeries: N,
|
|
777
|
+
effectiveCategories: ae,
|
|
778
|
+
isRtl: xe,
|
|
779
|
+
patterns: v,
|
|
780
|
+
stacked: k,
|
|
781
|
+
orientation: l,
|
|
782
|
+
curve: C,
|
|
783
|
+
colors: M,
|
|
784
|
+
radialValueFormatter: _,
|
|
785
|
+
wrapperRef: H
|
|
786
|
+
}),
|
|
787
|
+
[
|
|
788
|
+
d,
|
|
789
|
+
O,
|
|
790
|
+
R,
|
|
791
|
+
L,
|
|
792
|
+
Ee,
|
|
793
|
+
Ce,
|
|
794
|
+
r,
|
|
795
|
+
ne,
|
|
796
|
+
oe,
|
|
797
|
+
ke,
|
|
798
|
+
h,
|
|
799
|
+
N,
|
|
800
|
+
ae,
|
|
801
|
+
xe,
|
|
802
|
+
v,
|
|
803
|
+
k,
|
|
804
|
+
l,
|
|
805
|
+
C,
|
|
806
|
+
M,
|
|
807
|
+
_
|
|
808
|
+
]
|
|
809
|
+
), qe = x(
|
|
810
|
+
() => Me(se),
|
|
811
|
+
[se]
|
|
812
|
+
), Re = j(se);
|
|
813
|
+
Re.current = se;
|
|
814
|
+
const He = y ?? (W > 0 ? W : "100%"), Fe = u ?? 320, De = x(() => {
|
|
815
|
+
const a = V(h) ? ne ?? [] : ae ?? [], m = Te;
|
|
816
|
+
return /* @__PURE__ */ Y("table", { id: F, className: "ds:sr-only", children: [
|
|
817
|
+
/* @__PURE__ */ g("caption", { children: e }),
|
|
818
|
+
/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ Y("tr", { children: [
|
|
819
|
+
/* @__PURE__ */ g("th", { scope: "col", children: o("chart.table.series") }),
|
|
820
|
+
a.map((b, T) => /* @__PURE__ */ g("th", { scope: "col", children: b }, `${b}-${T}`))
|
|
821
|
+
] }) }),
|
|
822
|
+
/* @__PURE__ */ g("tbody", { children: m.map((b, T) => /* @__PURE__ */ Y("tr", { children: [
|
|
823
|
+
/* @__PURE__ */ g("th", { scope: "row", children: b.name || o("chart.table.value") }),
|
|
824
|
+
b.data.map((w, Oe) => /* @__PURE__ */ g("td", { children: h === "radialBar" && _ ? _(w) : oe(w) }, `${T}-${Oe}`))
|
|
825
|
+
] }, `${b.name}-${T}`)) })
|
|
826
|
+
] });
|
|
827
|
+
}, [
|
|
828
|
+
h,
|
|
829
|
+
Te,
|
|
830
|
+
ne,
|
|
831
|
+
ae,
|
|
832
|
+
F,
|
|
833
|
+
e,
|
|
834
|
+
o,
|
|
835
|
+
oe,
|
|
836
|
+
_
|
|
837
|
+
]), We = x(() => (V(h), N), [N, h]), Ie = /* @__PURE__ */ Y(
|
|
838
|
+
"div",
|
|
839
|
+
{
|
|
840
|
+
ref: ee,
|
|
841
|
+
role: "figure",
|
|
842
|
+
"aria-label": e,
|
|
843
|
+
"aria-describedby": F,
|
|
844
|
+
className: gt({
|
|
845
|
+
// Explicit height wins over the density min-height unless the
|
|
846
|
+
// caller also asked for a density explicitly.
|
|
847
|
+
density: J ?? (u !== void 0 ? "none" : void 0),
|
|
848
|
+
className: S ? void 0 : Q
|
|
849
|
+
}),
|
|
850
|
+
...S ? {} : { "data-component": "chart", "data-component-id": s },
|
|
851
|
+
children: [
|
|
852
|
+
De,
|
|
853
|
+
/* @__PURE__ */ g(
|
|
854
|
+
Ve,
|
|
855
|
+
{
|
|
856
|
+
type: h,
|
|
857
|
+
series: We,
|
|
858
|
+
options: qe,
|
|
859
|
+
width: He,
|
|
860
|
+
height: Fe
|
|
861
|
+
},
|
|
862
|
+
h
|
|
863
|
+
)
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
);
|
|
867
|
+
return S ? /* @__PURE__ */ Y(
|
|
868
|
+
"div",
|
|
869
|
+
{
|
|
870
|
+
"data-component": "chart",
|
|
871
|
+
"data-component-id": s,
|
|
872
|
+
className: `ds:block ds:w-full ${Q ?? ""}`.trim(),
|
|
873
|
+
children: [
|
|
874
|
+
/* @__PURE__ */ g("div", { className: "ds:mb-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ g(
|
|
875
|
+
nt,
|
|
876
|
+
{
|
|
877
|
+
role: "radiogroup",
|
|
878
|
+
mode: "toggle-single",
|
|
879
|
+
size: "sm",
|
|
880
|
+
"aria-label": o("chart.typeSwitcher.label"),
|
|
881
|
+
value: h,
|
|
882
|
+
onValueChange: (a) => {
|
|
883
|
+
a !== h && (me(a), B == null || B(a));
|
|
884
|
+
},
|
|
885
|
+
children: f.map((a) => /* @__PURE__ */ g(
|
|
886
|
+
at,
|
|
887
|
+
{
|
|
888
|
+
value: a,
|
|
889
|
+
type: "button",
|
|
890
|
+
icon: Tt[a],
|
|
891
|
+
"aria-label": o(xt[a])
|
|
892
|
+
},
|
|
893
|
+
a
|
|
894
|
+
))
|
|
895
|
+
}
|
|
896
|
+
) }),
|
|
897
|
+
Ie
|
|
898
|
+
]
|
|
899
|
+
}
|
|
900
|
+
) : Ie;
|
|
901
|
+
}
|
|
902
|
+
);
|
|
903
|
+
Rt.displayName = "Chart";
|
|
904
|
+
export {
|
|
905
|
+
Rt as C,
|
|
906
|
+
gt as a,
|
|
907
|
+
bt as c
|
|
908
|
+
};
|
|
909
|
+
//# sourceMappingURL=chart-HsF1KHbx.js.map
|