@epam/ai-dial-ui-kit 0.16.0-dev.48 → 0.16.0-dev.49
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/README.md +1 -0
- package/dist/CHANGELOG.md +3 -0
- package/dist/{DateCellRenderer-B2BORgHD.cjs → DateCellRenderer-C3KzulHA.cjs} +2 -2
- package/dist/components/New/Analytics/Bar/Bar.js +7 -7
- package/dist/components/New/Analytics/BarGroup/BarGroup.js +4 -4
- package/dist/components/New/Analytics/Histogram/Histogram.js +12 -12
- package/dist/components/New/Steps/Steps.js +84 -0
- package/dist/components-manifest.json +245 -618
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +370 -380
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/migration-guides/0.16.0/legacy-analytics-and-steps-removal.md +54 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/src/components/{Analytics → New/Analytics}/Bar/utils.d.ts +1 -1
- package/dist/src/components/{Analytics → New/Analytics}/Histogram/utils.d.ts +1 -1
- package/dist/src/components/New/Analytics/index.d.ts +11 -0
- package/dist/src/components/New/Steps/Steps.d.ts +55 -0
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +5 -14
- package/package.json +1 -1
- package/dist/components/Analytics/Bar/Bar.js +0 -80
- package/dist/components/Analytics/BarGroup/BarGroup.js +0 -142
- package/dist/components/Analytics/Card/Card.js +0 -87
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +0 -19
- package/dist/components/Analytics/Histogram/Histogram.js +0 -200
- package/dist/components/Steps/Step.js +0 -34
- package/dist/components/Steps/Steps.js +0 -27
- package/dist/components/Steps/utils.js +0 -42
- package/dist/src/components/Analytics/Bar/Bar.d.ts +0 -86
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +0 -103
- package/dist/src/components/Analytics/Card/Card.d.ts +0 -91
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +0 -22
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +0 -59
- package/dist/src/components/Analytics/index.d.ts +0 -13
- package/dist/src/components/Steps/Step.d.ts +0 -9
- package/dist/src/components/Steps/Steps.d.ts +0 -26
- package/dist/src/components/Steps/utils.d.ts +0 -3
- /package/dist/components/{Analytics → New/Analytics}/Bar/utils.js +0 -0
- /package/dist/components/{Analytics → New/Analytics}/Histogram/utils.js +0 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
export { DialCaptionText, DialErrorText, } from './components/CaptionText/CaptionText';
|
|
2
|
-
export { DialAnalyticsCard } from './components/Analytics';
|
|
3
|
-
export type { DialAnalyticsCardProps } from './components/Analytics';
|
|
4
|
-
export { AnalyticsCardVariant } from './types/analytics';
|
|
5
|
-
export { DialAnalyticsBar } from './components/Analytics';
|
|
6
|
-
export type { DialAnalyticsBarProps } from './components/Analytics';
|
|
7
|
-
export { DEFAULT_ANALYTICS_BAR_COLOR_MAP } from './components/Analytics';
|
|
8
|
-
export type { AnalyticsBarColorStop, AnalyticsCardCompareItem, } from './models/analytics';
|
|
9
|
-
export { DialAnalyticsErrorTag } from './components/Analytics';
|
|
10
|
-
export type { DialAnalyticsErrorTagProps } from './components/Analytics';
|
|
11
|
-
export { DialAnalyticsBarGroup } from './components/Analytics';
|
|
12
|
-
export type { DialAnalyticsBarGroupProps } from './components/Analytics';
|
|
13
|
-
export { DialAnalyticsHistogram } from './components/Analytics';
|
|
14
|
-
export type { DialAnalyticsHistogramProps } from './components/Analytics';
|
|
15
2
|
export { DialLabel } from './components/Label/Label';
|
|
16
3
|
export { DialAccordion } from './components/Accordion/Accordion';
|
|
17
4
|
export type { DialAccordionProps } from './components/Accordion/Accordion';
|
|
@@ -21,7 +8,6 @@ export { Spinner } from './components/Spinner/Spinner';
|
|
|
21
8
|
export type { SpinnerProps } from './components/Spinner/Spinner';
|
|
22
9
|
export { ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
23
10
|
export type { ProgressBarProps } from './components/ProgressBar/ProgressBar';
|
|
24
|
-
export { DialSteps } from './components/Steps/Steps';
|
|
25
11
|
export { DialNoDataContent } from './components/NoDataContent/NoDataContent';
|
|
26
12
|
export type { DialNoDataContentProps } from './components/NoDataContent/NoDataContent';
|
|
27
13
|
export { DialLabelledText } from './components/LabelledText/LabelledText';
|
|
@@ -124,10 +110,15 @@ export type { MultiSelectTagsProps } from './components/New/Select/MultiSelectTa
|
|
|
124
110
|
export { InfoButton } from './components/New/InfoButton/InfoButton';
|
|
125
111
|
export type { InfoButtonProps } from './components/New/InfoButton/InfoButton';
|
|
126
112
|
export type { LabelProps } from './components/New/Label/Label';
|
|
113
|
+
export { Steps } from './components/New/Steps/Steps';
|
|
114
|
+
export type { StepsProps } from './components/New/Steps/Steps';
|
|
127
115
|
export { AnalyticsCard } from './components/New/Analytics/Card/Card';
|
|
128
116
|
export type { AnalyticsCardProps } from './components/New/Analytics/Card/Card';
|
|
117
|
+
export { AnalyticsCardVariant } from './types/analytics';
|
|
129
118
|
export { AnalyticsBar } from './components/New/Analytics/Bar/Bar';
|
|
130
119
|
export type { AnalyticsBarProps } from './components/New/Analytics/Bar/Bar';
|
|
120
|
+
export { DEFAULT_ANALYTICS_BAR_COLOR_MAP } from './components/New/Analytics/Bar/utils';
|
|
121
|
+
export type { AnalyticsBarColorStop, AnalyticsCardCompareItem, } from './models/analytics';
|
|
131
122
|
export { AnalyticsBarGroup } from './components/New/Analytics/BarGroup/BarGroup';
|
|
132
123
|
export type { AnalyticsBarGroupProps } from './components/New/Analytics/BarGroup/BarGroup';
|
|
133
124
|
export { AnalyticsHistogram } from './components/New/Analytics/Histogram/Histogram';
|
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { DialAnalyticsErrorTag as C } from "../ErrorTag/ErrorTag.js";
|
|
3
|
-
import { DialLoader as D } from "../../Loader/Loader.js";
|
|
4
|
-
import { mergeClasses as r } from "../../../utils/merge-classes.js";
|
|
5
|
-
import { getAnalyticsBarColor as T, DEFAULT_ANALYTICS_BAR_COLOR_MAP as _, getAnalyticsBarRatio as j } from "./utils.js";
|
|
6
|
-
const L = ({
|
|
7
|
-
value: a,
|
|
8
|
-
maxValue: c = 1,
|
|
9
|
-
error: e,
|
|
10
|
-
isLoading: s,
|
|
11
|
-
title: i,
|
|
12
|
-
valueLabel: p,
|
|
13
|
-
colorMap: u = _,
|
|
14
|
-
className: m,
|
|
15
|
-
titleClassName: w,
|
|
16
|
-
valueClassName: y,
|
|
17
|
-
inline: o,
|
|
18
|
-
ariaLabel: v
|
|
19
|
-
}) => {
|
|
20
|
-
const n = a == null, N = !!(e || s || !n), d = j(n ? 0 : a, c), b = T(d, u), g = p ?? (n ? "—" : a), A = v ?? (typeof i == "string" ? i : void 0), B = e || s, f = e ? /* @__PURE__ */ l(C, {}) : s ? /* @__PURE__ */ l(D, { fullWidth: !1 }) : /* @__PURE__ */ l(
|
|
21
|
-
"span",
|
|
22
|
-
{
|
|
23
|
-
className: r(
|
|
24
|
-
"shrink-0 tabular-nums text-end",
|
|
25
|
-
o ? "dial-small-text min-w-[5ch] text-primary" : "dial-small-semi-text text-primary",
|
|
26
|
-
y
|
|
27
|
-
),
|
|
28
|
-
children: g
|
|
29
|
-
}
|
|
30
|
-
), h = N ? /* @__PURE__ */ l(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
role: "progressbar",
|
|
34
|
-
"aria-valuenow": e || s || typeof a != "number" ? void 0 : a,
|
|
35
|
-
"aria-valuemin": 0,
|
|
36
|
-
"aria-valuemax": c,
|
|
37
|
-
"aria-label": A,
|
|
38
|
-
className: r(
|
|
39
|
-
"w-full overflow-hidden rounded-xs",
|
|
40
|
-
o ? "h-1" : "h-2",
|
|
41
|
-
e ? "bg-error" : "bg-layer-1"
|
|
42
|
-
),
|
|
43
|
-
children: !B && /* @__PURE__ */ l(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: "h-full rounded-xs transition-[width] duration-300",
|
|
47
|
-
style: { width: `${d * 100}%`, backgroundColor: b }
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
) : null, x = /* @__PURE__ */ l(
|
|
52
|
-
"span",
|
|
53
|
-
{
|
|
54
|
-
className: r("dial-small-text text-primary", w),
|
|
55
|
-
children: i
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
return o ? /* @__PURE__ */ t(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: r("flex flex-row items-center gap-2", m),
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ l("div", { className: "w-1/2 min-w-0", children: x }),
|
|
64
|
-
/* @__PURE__ */ t("div", { className: "flex w-1/2 flex-row items-center gap-2", children: [
|
|
65
|
-
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1", children: h }),
|
|
66
|
-
f
|
|
67
|
-
] })
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
) : /* @__PURE__ */ t("div", { className: r("flex flex-col gap-1", m), children: [
|
|
71
|
-
/* @__PURE__ */ t("div", { className: "flex flex-row items-center justify-between gap-2", children: [
|
|
72
|
-
x,
|
|
73
|
-
f
|
|
74
|
-
] }),
|
|
75
|
-
h
|
|
76
|
-
] });
|
|
77
|
-
};
|
|
78
|
-
export {
|
|
79
|
-
L as DialAnalyticsBar
|
|
80
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as f, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment as Q } from "react";
|
|
3
|
-
import { DialAccordion as R } from "../../Accordion/Accordion.js";
|
|
4
|
-
import { DialAnalyticsBar as b } from "../Bar/Bar.js";
|
|
5
|
-
import { DialLoader as U } from "../../Loader/Loader.js";
|
|
6
|
-
import { DialTooltip as x } from "../../Tooltip/Tooltip.js";
|
|
7
|
-
import { mergeClasses as i } from "../../../utils/merge-classes.js";
|
|
8
|
-
const k = ({
|
|
9
|
-
title: g,
|
|
10
|
-
titleTooltip: h,
|
|
11
|
-
description: S,
|
|
12
|
-
data: a,
|
|
13
|
-
compareData: r,
|
|
14
|
-
compareLabels: m,
|
|
15
|
-
maxValue: p,
|
|
16
|
-
colorMap: d,
|
|
17
|
-
defaultExpanded: E = !0,
|
|
18
|
-
nonCollapsible: G,
|
|
19
|
-
isLoading: K,
|
|
20
|
-
onBarClick: o,
|
|
21
|
-
inline: c,
|
|
22
|
-
barTitleClassName: N,
|
|
23
|
-
barValueClassName: P,
|
|
24
|
-
barClassName: v,
|
|
25
|
-
barDescriptions: C,
|
|
26
|
-
className: T
|
|
27
|
-
}) => {
|
|
28
|
-
const W = Object.entries(a), q = c ? i("text-secondary", N) : N, j = m ? "dial-tiny-text text-secondary" : void 0, z = h ? /* @__PURE__ */ t(x, { tooltip: h, children: g }) : g, H = r ? [.../* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(r)])] : [], y = "cursor-pointer rounded-xs text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-primary", F = "group flex flex-col gap-1.5", I = i(
|
|
29
|
-
"flex flex-col gap-1.5 pl-2",
|
|
30
|
-
o && "group-hover:bg-accent-primary-alpha group-focus-visible:bg-accent-primary-alpha",
|
|
31
|
-
v
|
|
32
|
-
);
|
|
33
|
-
return /* @__PURE__ */ t(
|
|
34
|
-
R,
|
|
35
|
-
{
|
|
36
|
-
title: z,
|
|
37
|
-
description: S,
|
|
38
|
-
defaultExpanded: E,
|
|
39
|
-
nonCollapsible: G,
|
|
40
|
-
className: T,
|
|
41
|
-
children: /* @__PURE__ */ t(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
className: i(
|
|
45
|
-
"flex flex-col",
|
|
46
|
-
r ? "gap-4" : c ? "gap-2" : "gap-3"
|
|
47
|
-
),
|
|
48
|
-
children: K ? /* @__PURE__ */ t(U, { fullWidth: !1, className: "self-center" }) : r ? H.map((e) => {
|
|
49
|
-
const l = e in a ? a[e] : null, n = e in r ? r[e] : null, s = typeof l == "number" && typeof n == "number" ? parseFloat((n - l).toFixed(3)) : null, L = s != null && s !== 0, A = L && s > 0, D = L ? A ? `+${s}` : String(s) : null, O = C?.[e], $ = /* @__PURE__ */ t("span", { className: "dial-small-text text-secondary", children: e }), w = /* @__PURE__ */ f(J, { children: [
|
|
50
|
-
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
51
|
-
O ? /* @__PURE__ */ t(x, { tooltip: O, children: $ }) : $,
|
|
52
|
-
D != null && /* @__PURE__ */ t(
|
|
53
|
-
"span",
|
|
54
|
-
{
|
|
55
|
-
className: i(
|
|
56
|
-
"dial-tiny-semi-text rounded-[120px] border border-transparent px-2",
|
|
57
|
-
A ? "bg-success text-success" : "bg-error text-error"
|
|
58
|
-
),
|
|
59
|
-
children: D
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ f("div", { className: I, children: [
|
|
64
|
-
/* @__PURE__ */ t(
|
|
65
|
-
b,
|
|
66
|
-
{
|
|
67
|
-
title: m?.[0],
|
|
68
|
-
value: l,
|
|
69
|
-
maxValue: p,
|
|
70
|
-
colorMap: d,
|
|
71
|
-
inline: c,
|
|
72
|
-
titleClassName: j,
|
|
73
|
-
ariaLabel: e
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ t(
|
|
77
|
-
b,
|
|
78
|
-
{
|
|
79
|
-
title: m?.[1],
|
|
80
|
-
value: n,
|
|
81
|
-
maxValue: p,
|
|
82
|
-
colorMap: d,
|
|
83
|
-
inline: c,
|
|
84
|
-
titleClassName: j,
|
|
85
|
-
ariaLabel: `${e} compare`
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
] })
|
|
89
|
-
] });
|
|
90
|
-
return o ? /* @__PURE__ */ t(
|
|
91
|
-
"button",
|
|
92
|
-
{
|
|
93
|
-
type: "button",
|
|
94
|
-
onClick: () => o(e, l),
|
|
95
|
-
className: i(
|
|
96
|
-
F,
|
|
97
|
-
y
|
|
98
|
-
),
|
|
99
|
-
children: w
|
|
100
|
-
},
|
|
101
|
-
e
|
|
102
|
-
) : /* @__PURE__ */ t("div", { className: F, children: w }, e);
|
|
103
|
-
}) : W.map(([e, l]) => {
|
|
104
|
-
const n = /* @__PURE__ */ t(
|
|
105
|
-
b,
|
|
106
|
-
{
|
|
107
|
-
title: e,
|
|
108
|
-
value: l,
|
|
109
|
-
maxValue: p,
|
|
110
|
-
colorMap: d,
|
|
111
|
-
inline: c,
|
|
112
|
-
titleClassName: q,
|
|
113
|
-
valueClassName: P,
|
|
114
|
-
className: v
|
|
115
|
-
}
|
|
116
|
-
), u = o ? /* @__PURE__ */ t(
|
|
117
|
-
"button",
|
|
118
|
-
{
|
|
119
|
-
type: "button",
|
|
120
|
-
onClick: () => o(e, l),
|
|
121
|
-
className: y,
|
|
122
|
-
children: n
|
|
123
|
-
}
|
|
124
|
-
) : n, s = C?.[e];
|
|
125
|
-
return s ? /* @__PURE__ */ t(
|
|
126
|
-
x,
|
|
127
|
-
{
|
|
128
|
-
tooltip: s,
|
|
129
|
-
triggerClassName: "flex flex-col",
|
|
130
|
-
children: u
|
|
131
|
-
},
|
|
132
|
-
e
|
|
133
|
-
) : /* @__PURE__ */ t(Q, { children: u }, e);
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
k as DialAnalyticsBarGroup
|
|
142
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { DialAnalyticsErrorTag as u } from "../ErrorTag/ErrorTag.js";
|
|
3
|
-
import { DialEllipsisTooltip as m } from "../../EllipsisTooltip/EllipsisTooltip.js";
|
|
4
|
-
import { DialLoader as g } from "../../Loader/Loader.js";
|
|
5
|
-
import { AnalyticsCardVariant as c } from "../../../types/analytics.js";
|
|
6
|
-
import { mergeClasses as x } from "../../../utils/merge-classes.js";
|
|
7
|
-
const b = {
|
|
8
|
-
[c.Default]: {
|
|
9
|
-
container: "bg-layer-3",
|
|
10
|
-
title: "dial-small-text text-secondary",
|
|
11
|
-
value: "dial-display2-text text-primary",
|
|
12
|
-
showDescription: !0
|
|
13
|
-
},
|
|
14
|
-
[c.Compact]: {
|
|
15
|
-
container: "bg-layer-2",
|
|
16
|
-
title: "dial-tiny-text text-secondary",
|
|
17
|
-
value: "dial-body-semi-text text-primary",
|
|
18
|
-
showDescription: !1
|
|
19
|
-
}
|
|
20
|
-
}, E = ({
|
|
21
|
-
title: o,
|
|
22
|
-
value: p,
|
|
23
|
-
description: i,
|
|
24
|
-
variant: f = c.Default,
|
|
25
|
-
error: r,
|
|
26
|
-
isLoading: n,
|
|
27
|
-
className: y,
|
|
28
|
-
delta: t,
|
|
29
|
-
deltaPositive: d,
|
|
30
|
-
deltaUnit: h,
|
|
31
|
-
compareValues: l
|
|
32
|
-
}) => {
|
|
33
|
-
const a = b[f], v = d !== void 0 ? d : (t ?? 0) >= 0, N = t === void 0 ? null : `${t >= 0 ? `+${t}` : String(t)}${h ?? ""}`;
|
|
34
|
-
return /* @__PURE__ */ s(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
className: x(
|
|
38
|
-
"flex flex-col rounded-lg border border-secondary p-4",
|
|
39
|
-
r || n ? "gap-2" : "gap-1",
|
|
40
|
-
a.container,
|
|
41
|
-
y
|
|
42
|
-
),
|
|
43
|
-
children: [
|
|
44
|
-
t !== void 0 ? /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
45
|
-
/* @__PURE__ */ e("span", { className: a.title, children: o }),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
"span",
|
|
48
|
-
{
|
|
49
|
-
className: x(
|
|
50
|
-
"dial-tiny-semi-text rounded-[120px] border border-transparent px-2",
|
|
51
|
-
v ? "bg-success text-success" : "bg-error text-error"
|
|
52
|
-
),
|
|
53
|
-
children: N
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
] }) : /* @__PURE__ */ e("span", { className: a.title, children: o }),
|
|
57
|
-
r ? /* @__PURE__ */ e(u, { className: "self-start" }) : n ? /* @__PURE__ */ e(g, { fullWidth: !1, className: "self-start" }) : l ? /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
58
|
-
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
m,
|
|
61
|
-
{
|
|
62
|
-
text: l[0].title,
|
|
63
|
-
className: "dial-tiny-text text-secondary"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ e("span", { className: a.value, children: l[0].value })
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-px flex-shrink-0 bg-controls-disable-accent" }),
|
|
69
|
-
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
m,
|
|
72
|
-
{
|
|
73
|
-
text: l[1].title,
|
|
74
|
-
className: "dial-tiny-text text-secondary"
|
|
75
|
-
}
|
|
76
|
-
),
|
|
77
|
-
/* @__PURE__ */ e("span", { className: a.value, children: l[1].value })
|
|
78
|
-
] })
|
|
79
|
-
] }) : /* @__PURE__ */ e("span", { className: a.value, children: p }),
|
|
80
|
-
!r && !n && a.showDescription && i != null && i !== !1 && /* @__PURE__ */ e("span", { className: "dial-tiny-text text-secondary", children: i })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
E as DialAnalyticsCard
|
|
87
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { DialTag as t } from "../../Tag/Tag.js";
|
|
3
|
-
import { mergeClasses as a } from "../../../utils/merge-classes.js";
|
|
4
|
-
const l = ({
|
|
5
|
-
label: r = "Error",
|
|
6
|
-
className: o
|
|
7
|
-
}) => /* @__PURE__ */ e(
|
|
8
|
-
t,
|
|
9
|
-
{
|
|
10
|
-
label: r,
|
|
11
|
-
className: a(
|
|
12
|
-
"dial-tiny-semi-text cursor-default rounded-[120px] border-transparent bg-error text-error",
|
|
13
|
-
o
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
export {
|
|
18
|
-
l as DialAnalyticsErrorTag
|
|
19
|
-
};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { DEFAULT_ANALYTICS_BAR_COLOR_MAP as D } from "../Bar/utils.js";
|
|
3
|
-
import { DialLoader as I } from "../../Loader/Loader.js";
|
|
4
|
-
import { DialTooltip as w } from "../../Tooltip/Tooltip.js";
|
|
5
|
-
import { mergeClasses as H } from "../../../utils/merge-classes.js";
|
|
6
|
-
import { buildHistogramColumns as A, formatHistogramColumnLabel as _, getHistogramYTicks as S, getHistogramYMax as B } from "./utils.js";
|
|
7
|
-
const u = 128, O = (s, i) => {
|
|
8
|
-
const l = _(s, i);
|
|
9
|
-
return s === i ? `scored ${l}` : `scored between ${l}`;
|
|
10
|
-
}, T = (s, i, l, o, d) => /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
11
|
-
s && /* @__PURE__ */ t("strong", { children: s }),
|
|
12
|
-
/* @__PURE__ */ n("span", { children: [
|
|
13
|
-
i,
|
|
14
|
-
" out of ",
|
|
15
|
-
l,
|
|
16
|
-
" ",
|
|
17
|
-
o
|
|
18
|
-
] }),
|
|
19
|
-
/* @__PURE__ */ t("span", { children: O(d.from, d.to) })
|
|
20
|
-
] }), W = ({
|
|
21
|
-
title: s,
|
|
22
|
-
values: i,
|
|
23
|
-
colorMap: l = D,
|
|
24
|
-
valueTitle: o = "values",
|
|
25
|
-
showCount: d,
|
|
26
|
-
isLoading: L,
|
|
27
|
-
className: j,
|
|
28
|
-
compareValues: h,
|
|
29
|
-
valueSetLabel: M,
|
|
30
|
-
compareValueSetLabel: Y
|
|
31
|
-
}) => {
|
|
32
|
-
const k = A(i, l), y = h ? A(h, l) : void 0, c = i.length, p = h?.length ?? 0, N = Math.max(c, p), b = B(N), m = S(N), v = (e) => e.map((r) => ({
|
|
33
|
-
...r,
|
|
34
|
-
ratio: b > 0 ? r.count / b : 0
|
|
35
|
-
})), f = v(k), $ = y ? v(y) : void 0, C = (e, r, a, x) => {
|
|
36
|
-
if (e.count === 0)
|
|
37
|
-
return /* @__PURE__ */ t("div", { className: "flex h-full flex-1 items-end", "aria-hidden": "true", children: /* @__PURE__ */ t(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
className: "min-h-2 w-full rounded-xs",
|
|
41
|
-
style: { height: `${e.ratio * 100}%` }
|
|
42
|
-
}
|
|
43
|
-
) });
|
|
44
|
-
const g = x ? {
|
|
45
|
-
backgroundImage: `repeating-linear-gradient(135deg, ${e.color} 0px, ${e.color} 1px, transparent 1px, transparent 4px)`,
|
|
46
|
-
borderColor: e.color
|
|
47
|
-
} : { backgroundColor: e.color };
|
|
48
|
-
return /* @__PURE__ */ t(
|
|
49
|
-
w,
|
|
50
|
-
{
|
|
51
|
-
placement: "bottom",
|
|
52
|
-
tooltip: r,
|
|
53
|
-
triggerClassName: "flex h-full flex-1 items-end",
|
|
54
|
-
children: /* @__PURE__ */ t(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
role: "img",
|
|
58
|
-
"aria-label": a,
|
|
59
|
-
className: "flex min-h-2 w-full items-center justify-center rounded-xs border border-transparent",
|
|
60
|
-
style: { height: `${e.ratio * 100}%`, ...g },
|
|
61
|
-
children: d && /* @__PURE__ */ t("span", { className: "dial-tiny-semi-text text-primary", children: e.count })
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
return /* @__PURE__ */ n("div", { className: H("flex flex-col gap-2", j), children: [
|
|
68
|
-
/* @__PURE__ */ t("span", { className: "dial-small-text text-primary", children: s }),
|
|
69
|
-
L ? /* @__PURE__ */ t(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
className: "flex items-center justify-center",
|
|
73
|
-
style: { height: u },
|
|
74
|
-
children: /* @__PURE__ */ t(I, { fullWidth: !1 })
|
|
75
|
-
}
|
|
76
|
-
) : /* @__PURE__ */ n("div", { className: "grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1", children: [
|
|
77
|
-
/* @__PURE__ */ t(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
"data-histogram-y-axis": !0,
|
|
81
|
-
"aria-hidden": "true",
|
|
82
|
-
className: "relative",
|
|
83
|
-
style: { height: u },
|
|
84
|
-
children: m.map((e, r) => /* @__PURE__ */ t(
|
|
85
|
-
"span",
|
|
86
|
-
{
|
|
87
|
-
className: "dial-tiny-text absolute right-0 whitespace-nowrap text-secondary",
|
|
88
|
-
style: {
|
|
89
|
-
top: `${r / (m.length - 1) * 100}%`,
|
|
90
|
-
transform: "translateY(-50%)"
|
|
91
|
-
},
|
|
92
|
-
children: e
|
|
93
|
-
},
|
|
94
|
-
e
|
|
95
|
-
))
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
/* @__PURE__ */ n("div", { className: "relative min-w-0", children: [
|
|
99
|
-
m.map((e, r) => /* @__PURE__ */ t(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
"data-histogram-grid": !0,
|
|
103
|
-
className: "pointer-events-none absolute inset-x-0 border-t border-primary",
|
|
104
|
-
style: { top: `${r / (m.length - 1) * 100}%` }
|
|
105
|
-
},
|
|
106
|
-
e
|
|
107
|
-
)),
|
|
108
|
-
/* @__PURE__ */ t(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
className: "relative flex items-end gap-1",
|
|
112
|
-
style: { height: u },
|
|
113
|
-
children: $ ? f.map((e, r) => {
|
|
114
|
-
const a = $[r], x = `${e.count} out of ${c} ${o}`, g = `${a.count} out of ${p} ${o}`;
|
|
115
|
-
return /* @__PURE__ */ n("div", { className: "flex h-full flex-1 items-end", children: [
|
|
116
|
-
C(
|
|
117
|
-
e,
|
|
118
|
-
T(
|
|
119
|
-
M,
|
|
120
|
-
e.count,
|
|
121
|
-
c,
|
|
122
|
-
o,
|
|
123
|
-
e
|
|
124
|
-
),
|
|
125
|
-
x,
|
|
126
|
-
!0
|
|
127
|
-
),
|
|
128
|
-
C(
|
|
129
|
-
a,
|
|
130
|
-
T(
|
|
131
|
-
Y,
|
|
132
|
-
a.count,
|
|
133
|
-
p,
|
|
134
|
-
o,
|
|
135
|
-
a
|
|
136
|
-
),
|
|
137
|
-
g,
|
|
138
|
-
!1
|
|
139
|
-
)
|
|
140
|
-
] }, r);
|
|
141
|
-
}) : f.map((e, r) => {
|
|
142
|
-
const a = `${e.count} out of ${c} ${o}`;
|
|
143
|
-
return e.count === 0 ? /* @__PURE__ */ t(
|
|
144
|
-
"div",
|
|
145
|
-
{
|
|
146
|
-
className: "flex h-full flex-1 items-end",
|
|
147
|
-
"aria-hidden": "true",
|
|
148
|
-
children: /* @__PURE__ */ t(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
className: "min-h-2 w-full rounded-xs",
|
|
152
|
-
style: { height: `${e.ratio * 100}%` }
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
},
|
|
156
|
-
r
|
|
157
|
-
) : /* @__PURE__ */ t(
|
|
158
|
-
w,
|
|
159
|
-
{
|
|
160
|
-
placement: "bottom",
|
|
161
|
-
tooltip: a,
|
|
162
|
-
triggerClassName: "flex h-full flex-1 items-end",
|
|
163
|
-
children: /* @__PURE__ */ t(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
role: "img",
|
|
167
|
-
"aria-label": a,
|
|
168
|
-
className: H(
|
|
169
|
-
"flex min-h-2 w-full items-center justify-center rounded-xs border",
|
|
170
|
-
"border-transparent"
|
|
171
|
-
),
|
|
172
|
-
style: {
|
|
173
|
-
height: `${e.ratio * 100}%`,
|
|
174
|
-
backgroundColor: e.color
|
|
175
|
-
},
|
|
176
|
-
children: d && e.count > 0 && /* @__PURE__ */ t("span", { className: "dial-tiny-semi-text text-primary", children: e.count })
|
|
177
|
-
}
|
|
178
|
-
)
|
|
179
|
-
},
|
|
180
|
-
r
|
|
181
|
-
);
|
|
182
|
-
})
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
] }),
|
|
186
|
-
/* @__PURE__ */ t("div", {}),
|
|
187
|
-
/* @__PURE__ */ t("div", { "data-histogram-x-axis": !0, className: "flex gap-1", children: f.map((e, r) => /* @__PURE__ */ t(
|
|
188
|
-
"span",
|
|
189
|
-
{
|
|
190
|
-
className: "dial-caption-text flex-1 text-center text-secondary",
|
|
191
|
-
children: _(e.from, e.to)
|
|
192
|
-
},
|
|
193
|
-
r
|
|
194
|
-
)) })
|
|
195
|
-
] })
|
|
196
|
-
] });
|
|
197
|
-
};
|
|
198
|
-
export {
|
|
199
|
-
W as DialAnalyticsHistogram
|
|
200
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { IconExclamationCircle as x, IconCheck as d } from "@tabler/icons-react";
|
|
3
|
-
import { StepStatus as e } from "../../models/step.js";
|
|
4
|
-
import i from "classnames";
|
|
5
|
-
import { getCircleClass as C, getStepClass as p } from "./utils.js";
|
|
6
|
-
import { DIAL_ICON_SIZE as o } from "../../constants/icon.js";
|
|
7
|
-
const g = ({
|
|
8
|
-
step: t,
|
|
9
|
-
index: n,
|
|
10
|
-
currentStep: s,
|
|
11
|
-
onChangeStep: l
|
|
12
|
-
}) => {
|
|
13
|
-
const a = "h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step", m = "w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full", c = () => s === t.id && t.status === e.ERROR ? /* @__PURE__ */ r(x, { stroke: 2, size: o.SM }) : s !== t.id && t.status === e.VALID ? /* @__PURE__ */ r(d, { stroke: 2, size: o.SM }) : n + 1;
|
|
14
|
-
return /* @__PURE__ */ f(
|
|
15
|
-
"button",
|
|
16
|
-
{
|
|
17
|
-
className: i(a, p(t, s)),
|
|
18
|
-
onClick: () => l(t.id),
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ r(
|
|
21
|
-
"span",
|
|
22
|
-
{
|
|
23
|
-
className: i(m, C(t, s)),
|
|
24
|
-
children: c()
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ r("span", { children: t.name })
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
g as DialStep
|
|
34
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { StepStatus as f } from "../../models/step.js";
|
|
3
|
-
import { DialStep as m } from "./Step.js";
|
|
4
|
-
const u = ({
|
|
5
|
-
steps: n,
|
|
6
|
-
currentStep: t,
|
|
7
|
-
onChangeStep: o
|
|
8
|
-
}) => {
|
|
9
|
-
const l = (i) => {
|
|
10
|
-
const a = n.findIndex((e) => e.id === t), r = n.findIndex((e) => e.id === i);
|
|
11
|
-
if (i === t) return;
|
|
12
|
-
(n.slice(0, r).every((e) => e.status === f.VALID) || r < a) && o(i);
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ d("div", { id: "steps", className: "flex gap-x-3", children: n.map((i, a) => /* @__PURE__ */ d(
|
|
15
|
-
m,
|
|
16
|
-
{
|
|
17
|
-
currentStep: t,
|
|
18
|
-
onChangeStep: l,
|
|
19
|
-
step: i,
|
|
20
|
-
index: a
|
|
21
|
-
},
|
|
22
|
-
i.id
|
|
23
|
-
)) });
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
u as DialSteps
|
|
27
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { StepStatus as r } from "../../models/step.js";
|
|
2
|
-
const c = (e, t) => {
|
|
3
|
-
if (t === e.id)
|
|
4
|
-
switch (e.status) {
|
|
5
|
-
case r.VALID:
|
|
6
|
-
return "border-accent-secondary text-primary";
|
|
7
|
-
case r.ERROR:
|
|
8
|
-
return "border-red-900 text-primary";
|
|
9
|
-
default:
|
|
10
|
-
return "border-accent-primary text-primary";
|
|
11
|
-
}
|
|
12
|
-
switch (e.status) {
|
|
13
|
-
case r.VALID:
|
|
14
|
-
return "border-primary text-primary";
|
|
15
|
-
case r.ERROR:
|
|
16
|
-
return "border-red-900 text-error";
|
|
17
|
-
default:
|
|
18
|
-
return "border-primary text-secondary";
|
|
19
|
-
}
|
|
20
|
-
}, s = (e, t) => {
|
|
21
|
-
if (t === e.id)
|
|
22
|
-
switch (e.status) {
|
|
23
|
-
case r.VALID:
|
|
24
|
-
return "bg-accent-secondary";
|
|
25
|
-
case r.ERROR:
|
|
26
|
-
return "bg-red-400";
|
|
27
|
-
default:
|
|
28
|
-
return "bg-accent-primary";
|
|
29
|
-
}
|
|
30
|
-
switch (e.status) {
|
|
31
|
-
case r.VALID:
|
|
32
|
-
return "bg-accent-secondary";
|
|
33
|
-
case r.ERROR:
|
|
34
|
-
return "bg-red-400";
|
|
35
|
-
default:
|
|
36
|
-
return "bg-layer-4";
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
s as getCircleClass,
|
|
41
|
-
c as getStepClass
|
|
42
|
-
};
|