@epam/ai-dial-ui-kit 0.15.0-dev.4 → 0.15.0-dev.41
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 +190 -0
- package/dist/CHANGELOG.md +73 -0
- package/dist/DateCellRenderer-DFknFcs1.cjs +1 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-J9A5gyDz.cjs} +31 -31
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
- package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
- package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-GvlxX6kx.cjs} +1 -1
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +16 -14
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/FileManager/FileManager.js +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/New/Accordion/Accordion.js +87 -71
- package/dist/components/New/Avatar/Avatar.js +70 -0
- package/dist/components/New/Badge/Badge.js +45 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/ButtonWrappers.js +93 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
- package/dist/components/New/Calendar/Calendar.js +301 -265
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +5 -3
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
- package/dist/components/New/ConfirmationPopup/constants.js +8 -11
- package/dist/components/New/Dropdown/Dropdown.js +112 -105
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
- package/dist/components/New/Dropdown/constants.js +22 -17
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
- package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FileIcon/FileIcon.js +55 -0
- package/dist/components/New/FileIcon/constants.js +134 -0
- package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
- package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
- package/dist/components/New/FileName/FileName.js +78 -0
- package/dist/components/New/FilterChips/FilterChips.js +43 -0
- package/dist/components/New/FilterChips/constants.js +5 -0
- package/dist/components/New/FolderName/FolderName.js +16 -0
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +13 -11
- package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
- package/dist/components/New/Notification/Notification.js +33 -29
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +46 -44
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/Search/Search.js +29 -27
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
- package/dist/components/New/Select/MultiSelectTags.js +18 -15
- package/dist/components/New/Select/Select.js +219 -197
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +125 -61
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +48 -44
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
- package/dist/components/New/Tooltip/TooltipContent.js +11 -9
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
- package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
- package/dist/components/New/TransferQueue/constants.js +24 -0
- package/dist/components/New/constants/overlay.js +17 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -33
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
- package/dist/components/SchemaRenderer/components/SchemaField.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/types.js +19 -8
- package/dist/components/SchemaRenderer/utils.js +122 -95
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +7 -5
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +1478 -59
- package/dist/constants/public-class-names.js +208 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +337 -292
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-BEsZqouS.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
- package/dist/src/components/New/Badge/Badge.d.ts +47 -0
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
- package/dist/src/components/New/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +7 -1
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
- package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
- package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
- package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
- package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
- package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
- package/dist/src/components/New/FileName/FileName.d.ts +79 -0
- package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
- package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
- package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +9 -0
- package/dist/src/components/New/Select/constants.d.ts +3 -2
- package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
- package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
- package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
- package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
- package/dist/src/components/New/constants/overlay.d.ts +13 -0
- package/dist/src/components/Popup/constants.d.ts +1 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
- package/dist/src/components/SchemaRenderer/utils.d.ts +10 -1
- package/dist/src/constants/public-class-names.d.ts +199 -0
- package/dist/src/index.d.ts +34 -1
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/avatar.d.ts +7 -0
- package/dist/src/types/badge.d.ts +16 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/entity-type.d.ts +9 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
- package/dist/src/utils/avatar.d.ts +12 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/types/accordion.js +4 -0
- package/dist/types/avatar.js +4 -0
- package/dist/types/badge.js +5 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/entity-type.js +4 -0
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-Bj_ENNKt.cjs +3 -0
- package/dist/utils/avatar.js +22 -0
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +99 -54
- package/package.json +4 -7
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import { JsonSchemaType as
|
|
2
|
-
function
|
|
1
|
+
import { JsonSchemaType as f } from "./types.js";
|
|
2
|
+
function $(r, n) {
|
|
3
3
|
const i = { ...r, ...n };
|
|
4
4
|
return (r.properties || n.properties) && (i.properties = { ...r.properties, ...n.properties }), (r.required || n.required) && (i.required = Array.from(
|
|
5
5
|
/* @__PURE__ */ new Set([...r.required ?? [], ...n.required ?? []])
|
|
6
6
|
)), i;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function p(r, n, i = 0) {
|
|
9
9
|
if (i > 10) return r;
|
|
10
10
|
let t = r;
|
|
11
11
|
if (t.$ref) {
|
|
12
12
|
const e = t.$ref.replace(/^#\//, "").split("/");
|
|
13
13
|
let o = n;
|
|
14
|
-
for (const
|
|
15
|
-
o = o?.[
|
|
14
|
+
for (const u of e)
|
|
15
|
+
o = o?.[u];
|
|
16
16
|
if (!o || typeof o != "object") return r;
|
|
17
|
-
const { $ref:
|
|
18
|
-
t = { ...
|
|
17
|
+
const { $ref: s, ...y } = t, d = o;
|
|
18
|
+
t = { ...d.$ref ? p(d, n, i + 1) : d, ...y };
|
|
19
19
|
}
|
|
20
20
|
if (t.allOf && t.allOf.length > 0) {
|
|
21
21
|
const { allOf: e, ...o } = t;
|
|
22
|
-
let
|
|
22
|
+
let s = {};
|
|
23
23
|
for (const y of e)
|
|
24
|
-
|
|
25
|
-
t =
|
|
24
|
+
s = $(s, p(y, n, i + 1));
|
|
25
|
+
t = $(s, o);
|
|
26
26
|
}
|
|
27
27
|
return t;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function T(r) {
|
|
30
30
|
return r.map((n, i) => ({ entry: n, index: i })).sort((n, i) => {
|
|
31
31
|
const t = n.entry[1]["dial:meta"]?.["dial:propertyOrder"] ?? 1 / 0, e = i.entry[1]["dial:meta"]?.["dial:propertyOrder"] ?? 1 / 0;
|
|
32
32
|
return t !== e ? t - e : n.index - i.index;
|
|
33
33
|
}).map(({ entry: n }) => n);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function j(r) {
|
|
36
36
|
return r == null || r === "";
|
|
37
37
|
}
|
|
38
38
|
function O(r) {
|
|
39
|
-
return r.type ===
|
|
39
|
+
return r.type === f.Object || r.properties != null && r.oneOf == null && r.anyOf == null && r.type == null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function N(r) {
|
|
42
42
|
return r.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (n) => n.toUpperCase());
|
|
43
43
|
}
|
|
44
|
+
const I = (r) => `"${r}" is required`;
|
|
44
45
|
function q(r, n) {
|
|
45
|
-
return r.type ===
|
|
46
|
+
return r.type === f.Null ? "null" : r.$ref ? p(r, n).title ?? r.$ref.split("/").pop() ?? "Option" : r.title ? r.title : r.type ? Array.isArray(r.type) ? r.type.join(" | ") : r.type : r.discriminator ? Object.keys(r.discriminator.mapping).join(" | ") : r.const != null ? String(r.const) : r.oneOf ? "One of options" : "Option";
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function A(r, n, i = 0) {
|
|
48
49
|
if (i > 15) return;
|
|
49
|
-
const t =
|
|
50
|
+
const t = p(r, n);
|
|
50
51
|
if ("default" in t)
|
|
51
52
|
return t.default;
|
|
52
53
|
if (t.discriminator && t.oneOf) {
|
|
53
54
|
const e = Object.keys(t.discriminator.mapping)[0];
|
|
54
55
|
if (e) {
|
|
55
|
-
const o =
|
|
56
|
+
const o = p(
|
|
56
57
|
{ $ref: t.discriminator.mapping[e] },
|
|
57
58
|
n
|
|
58
59
|
);
|
|
59
60
|
return {
|
|
60
|
-
...
|
|
61
|
+
...A(o, n, i + 1) ?? {},
|
|
61
62
|
[t.discriminator.propertyName]: e
|
|
62
63
|
};
|
|
63
64
|
}
|
|
@@ -66,9 +67,9 @@ function j(r, n, i = 0) {
|
|
|
66
67
|
if (t.properties) {
|
|
67
68
|
const e = {};
|
|
68
69
|
let o = !1;
|
|
69
|
-
for (const [
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
for (const [s, y] of Object.entries(t.properties)) {
|
|
71
|
+
const d = A(y, n, i + 1);
|
|
72
|
+
d !== void 0 && (e[s] = d, o = !0);
|
|
72
73
|
}
|
|
73
74
|
return o ? e : void 0;
|
|
74
75
|
}
|
|
@@ -76,26 +77,26 @@ function j(r, n, i = 0) {
|
|
|
76
77
|
return {};
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function b(r, n, i, t = "", e = 0) {
|
|
80
81
|
if (e > 15) return [];
|
|
81
|
-
const o = [],
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
(
|
|
82
|
+
const o = [], s = p(n, i);
|
|
83
|
+
if (s.anyOf) {
|
|
84
|
+
const l = s.anyOf.filter(
|
|
85
|
+
(u) => u.type !== f.Null
|
|
85
86
|
);
|
|
86
|
-
return r != null &&
|
|
87
|
+
return r != null && l.length === 1 ? b(
|
|
87
88
|
r,
|
|
88
|
-
|
|
89
|
+
l[0],
|
|
89
90
|
i,
|
|
90
91
|
t,
|
|
91
92
|
e + 1
|
|
92
93
|
) : o;
|
|
93
94
|
}
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
97
|
-
const a = { $ref:
|
|
98
|
-
return
|
|
95
|
+
if (s.oneOf && s.discriminator) {
|
|
96
|
+
const l = s.discriminator.propertyName, u = r?.[l];
|
|
97
|
+
if (u && s.discriminator.mapping[u]) {
|
|
98
|
+
const a = { $ref: s.discriminator.mapping[u] }, c = p(a, i);
|
|
99
|
+
return b(
|
|
99
100
|
r,
|
|
100
101
|
c,
|
|
101
102
|
i,
|
|
@@ -105,41 +106,41 @@ function $(r, n, i, t = "", e = 0) {
|
|
|
105
106
|
}
|
|
106
107
|
return o;
|
|
107
108
|
}
|
|
108
|
-
if (
|
|
109
|
-
if (Array.isArray(r) &&
|
|
110
|
-
for (let
|
|
111
|
-
const
|
|
112
|
-
r[
|
|
113
|
-
|
|
109
|
+
if (s.type === f.Array || !s.type && Array.isArray(r)) {
|
|
110
|
+
if (Array.isArray(r) && s.items)
|
|
111
|
+
for (let l = 0; l < r.length; l++) {
|
|
112
|
+
const u = b(
|
|
113
|
+
r[l],
|
|
114
|
+
s.items,
|
|
114
115
|
i,
|
|
115
|
-
`${t}[${
|
|
116
|
+
`${t}[${l}]`,
|
|
116
117
|
e + 1
|
|
117
118
|
);
|
|
118
|
-
o.push(...
|
|
119
|
+
o.push(...u);
|
|
119
120
|
}
|
|
120
121
|
return o;
|
|
121
122
|
}
|
|
122
|
-
if (!O(
|
|
123
|
-
const y =
|
|
124
|
-
for (const
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
123
|
+
if (!O(s)) return o;
|
|
124
|
+
const y = s.required ?? [], d = r;
|
|
125
|
+
for (const l of y) {
|
|
126
|
+
const u = s.properties?.[l];
|
|
127
|
+
if (u && p(u, i).isHidden)
|
|
127
128
|
continue;
|
|
128
|
-
const a = t ? `${t}.${
|
|
129
|
-
if (
|
|
130
|
-
const g =
|
|
131
|
-
o.push({ path: a, message:
|
|
129
|
+
const a = t ? `${t}.${l}` : l, c = d?.[l];
|
|
130
|
+
if (j(c)) {
|
|
131
|
+
const g = u?.title ?? N(l);
|
|
132
|
+
o.push({ path: a, message: I(g) });
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
if (
|
|
135
|
-
for (const [
|
|
136
|
-
if (u
|
|
135
|
+
if (d && s.properties)
|
|
136
|
+
for (const [l, u] of Object.entries(s.properties)) {
|
|
137
|
+
if (p(u, i).isHidden)
|
|
137
138
|
continue;
|
|
138
|
-
const a = t ? `${t}.${
|
|
139
|
+
const a = t ? `${t}.${l}` : l, c = d[l];
|
|
139
140
|
if (c != null) {
|
|
140
|
-
const g =
|
|
141
|
+
const g = b(
|
|
141
142
|
c,
|
|
142
|
-
|
|
143
|
+
u,
|
|
143
144
|
i,
|
|
144
145
|
a,
|
|
145
146
|
e + 1
|
|
@@ -147,12 +148,12 @@ function $(r, n, i, t = "", e = 0) {
|
|
|
147
148
|
o.push(...g);
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
for (const [
|
|
153
|
-
const c = t ? `${t}.${
|
|
151
|
+
if (d && s.additionalProperties != null && s.additionalProperties !== !1 && typeof s.additionalProperties == "object") {
|
|
152
|
+
const l = s.additionalProperties;
|
|
153
|
+
for (const [u, a] of Object.entries(d)) {
|
|
154
|
+
const c = t ? `${t}.${u}` : u, g = b(
|
|
154
155
|
a,
|
|
155
|
-
|
|
156
|
+
l,
|
|
156
157
|
i,
|
|
157
158
|
c,
|
|
158
159
|
e + 1
|
|
@@ -162,61 +163,61 @@ function $(r, n, i, t = "", e = 0) {
|
|
|
162
163
|
}
|
|
163
164
|
return o;
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
-
const t =
|
|
166
|
+
function E(r, n, i) {
|
|
167
|
+
const t = p(n, i);
|
|
167
168
|
if (Array.isArray(r))
|
|
168
169
|
return `${r.length} item${r.length !== 1 ? "s" : ""}`;
|
|
169
170
|
if (O(t) && t.properties) {
|
|
170
171
|
const e = Object.entries(t.properties).filter(
|
|
171
|
-
([,
|
|
172
|
-
), o = e.length,
|
|
173
|
-
return `${e.filter(([
|
|
174
|
-
const
|
|
175
|
-
return
|
|
172
|
+
([, d]) => !p(d, i).isHidden
|
|
173
|
+
), o = e.length, s = r;
|
|
174
|
+
return `${e.filter(([d]) => {
|
|
175
|
+
const l = s?.[d];
|
|
176
|
+
return l != null && l !== "";
|
|
176
177
|
}).length}/${o} fields`;
|
|
177
178
|
}
|
|
178
179
|
return "";
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function R(r, n, i) {
|
|
181
182
|
if (r == null) {
|
|
182
|
-
const t = n.findIndex((e) => e.type ===
|
|
183
|
+
const t = n.findIndex((e) => e.type === f.Null);
|
|
183
184
|
return t >= 0 ? t : 0;
|
|
184
185
|
}
|
|
185
186
|
if (Array.isArray(r)) {
|
|
186
|
-
const t = n.findIndex((e) =>
|
|
187
|
+
const t = n.findIndex((e) => p(e, i).type === f.Array);
|
|
187
188
|
return t >= 0 ? t : 0;
|
|
188
189
|
}
|
|
189
190
|
if (typeof r == "boolean") {
|
|
190
|
-
const t = n.findIndex((e) =>
|
|
191
|
+
const t = n.findIndex((e) => p(e, i).type === f.Boolean);
|
|
191
192
|
return t >= 0 ? t : 0;
|
|
192
193
|
}
|
|
193
194
|
if (typeof r == "number") {
|
|
194
195
|
const t = n.findIndex((e) => {
|
|
195
|
-
const o =
|
|
196
|
-
return o.type ===
|
|
196
|
+
const o = p(e, i);
|
|
197
|
+
return o.type === f.Number || o.type === f.Integer;
|
|
197
198
|
});
|
|
198
199
|
return t >= 0 ? t : 0;
|
|
199
200
|
}
|
|
200
201
|
if (typeof r == "string") {
|
|
201
|
-
const t = n.findIndex((e) =>
|
|
202
|
+
const t = n.findIndex((e) => p(e, i).type === f.String);
|
|
202
203
|
return t >= 0 ? t : 0;
|
|
203
204
|
}
|
|
204
205
|
if (typeof r == "object") {
|
|
205
206
|
const t = r;
|
|
206
207
|
for (let e = 0; e < n.length; e++) {
|
|
207
|
-
const o =
|
|
208
|
+
const o = p(n[e], i);
|
|
208
209
|
if (o.discriminator && o.discriminator.propertyName in t)
|
|
209
210
|
return e;
|
|
210
211
|
}
|
|
211
212
|
for (let e = 0; e < n.length; e++) {
|
|
212
|
-
const o =
|
|
213
|
+
const o = p(n[e], i);
|
|
213
214
|
if (O(o) || o.oneOf) return e;
|
|
214
215
|
}
|
|
215
216
|
return 0;
|
|
216
217
|
}
|
|
217
218
|
return 0;
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
+
function B(r, n, i) {
|
|
220
221
|
if (n && typeof r == "object" && r !== null) {
|
|
221
222
|
const t = r[n];
|
|
222
223
|
if (t) return `Item ${i + 1}: ${t}`;
|
|
@@ -227,32 +228,58 @@ function V(r, n, i) {
|
|
|
227
228
|
}
|
|
228
229
|
return `Item ${i + 1}`;
|
|
229
230
|
}
|
|
230
|
-
function
|
|
231
|
+
function D(r) {
|
|
231
232
|
switch (Array.isArray(r.type) ? r.type[0] : r.type) {
|
|
232
|
-
case
|
|
233
|
+
case f.String:
|
|
233
234
|
return "";
|
|
234
|
-
case
|
|
235
|
+
case f.Boolean:
|
|
235
236
|
return !1;
|
|
236
|
-
case
|
|
237
|
+
case f.Array:
|
|
237
238
|
return [];
|
|
238
|
-
case
|
|
239
|
-
case
|
|
239
|
+
case f.Integer:
|
|
240
|
+
case f.Number:
|
|
240
241
|
return;
|
|
241
242
|
default:
|
|
242
243
|
return {};
|
|
243
244
|
}
|
|
244
245
|
}
|
|
246
|
+
const V = [
|
|
247
|
+
f.String,
|
|
248
|
+
f.Number,
|
|
249
|
+
f.Boolean,
|
|
250
|
+
f.Null,
|
|
251
|
+
f.Object,
|
|
252
|
+
f.Array
|
|
253
|
+
];
|
|
254
|
+
function k(r) {
|
|
255
|
+
return Array.isArray(r) ? f.Array : typeof r == "object" && r !== null ? f.Object : typeof r == "boolean" ? f.Boolean : typeof r == "number" ? f.Number : r === null ? f.Null : f.String;
|
|
256
|
+
}
|
|
257
|
+
const P = {
|
|
258
|
+
[f.String]: "",
|
|
259
|
+
[f.Number]: 0,
|
|
260
|
+
[f.Boolean]: !1,
|
|
261
|
+
[f.Null]: null,
|
|
262
|
+
[f.Object]: {},
|
|
263
|
+
[f.Array]: []
|
|
264
|
+
};
|
|
265
|
+
function _(r) {
|
|
266
|
+
return P[r];
|
|
267
|
+
}
|
|
245
268
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
269
|
+
V as ENTRY_TYPE_OPTIONS,
|
|
270
|
+
E as buildSummary,
|
|
271
|
+
R as detectAnyOfVariant,
|
|
272
|
+
A as extractDefaults,
|
|
273
|
+
_ as getEntryTypeDefault,
|
|
274
|
+
B as getItemTitle,
|
|
250
275
|
q as getOptionLabel,
|
|
251
|
-
|
|
252
|
-
|
|
276
|
+
D as getSchemaDefault,
|
|
277
|
+
k as inferEntryType,
|
|
278
|
+
j as isMissingRequiredValue,
|
|
253
279
|
O as isObjectType,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
280
|
+
p as resolveRef,
|
|
281
|
+
T as sortByPropertyOrder,
|
|
282
|
+
N as toFieldLabel,
|
|
283
|
+
I as toRequiredMessage,
|
|
284
|
+
b as validateRequired
|
|
258
285
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
1
|
+
import { jsx as t, Fragment as L, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { mergeClasses as n } from "../../utils/merge-classes.js";
|
|
4
|
-
import { SkeletonVariant as i, SkeletonAvatarShape as
|
|
5
|
-
import { getAvatarSize as
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { SkeletonVariant as i, SkeletonAvatarShape as S } from "../../types/skeleton.js";
|
|
5
|
+
import { getAvatarSize as P } from "./utils.js";
|
|
6
|
+
import { DIAL_KIT_CLASS as R } from "../../constants/public-class-names.js";
|
|
7
|
+
const B = ({
|
|
8
|
+
active: A = !0,
|
|
8
9
|
paragraph: u = !0,
|
|
9
10
|
avatar: m = !1,
|
|
10
11
|
showTitle: p = !0,
|
|
11
|
-
loading:
|
|
12
|
+
loading: N = !0,
|
|
12
13
|
children: g,
|
|
13
14
|
variant: o = i.Default,
|
|
14
15
|
width: l,
|
|
@@ -16,13 +17,13 @@ const G = ({
|
|
|
16
17
|
overlay: s,
|
|
17
18
|
color: e,
|
|
18
19
|
className: h,
|
|
19
|
-
...
|
|
20
|
+
...C
|
|
20
21
|
}) => {
|
|
21
|
-
if (!
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
22
|
+
if (!N && g)
|
|
23
|
+
return /* @__PURE__ */ t(L, { children: g });
|
|
23
24
|
const d = n(
|
|
24
25
|
"bg-layer-raised",
|
|
25
|
-
|
|
26
|
+
A && "animate-pulse",
|
|
26
27
|
h
|
|
27
28
|
);
|
|
28
29
|
if (o !== i.Default) {
|
|
@@ -33,21 +34,26 @@ const G = ({
|
|
|
33
34
|
o === i.Text && "rounded",
|
|
34
35
|
!!s && "relative"
|
|
35
36
|
), r = {};
|
|
36
|
-
return l && (r.width = typeof l == "number" ? `${l}px` : l), c && (r.height = typeof c == "number" ? `${c}px` : c), e && (r.backgroundColor = e), /* @__PURE__ */ t("div", { className: a, style: r, ...
|
|
37
|
+
return l && (r.width = typeof l == "number" ? `${l}px` : l), c && (r.height = typeof c == "number" ? `${c}px` : c), e && (r.backgroundColor = e), /* @__PURE__ */ t("div", { className: a, style: r, ...C, children: s && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: s }) });
|
|
37
38
|
}
|
|
38
|
-
const
|
|
39
|
+
const j = !!m, w = !!p, z = !!u, b = typeof m == "object" ? m : {}, D = typeof p == "object" ? p : {}, x = typeof u == "object" ? u : {}, y = P(b.size), W = b.shape ?? S.Circle, _ = D.width ?? "38%", v = x.rows ?? 3, f = x.width, I = (a) => f ? Array.isArray(f) ? f[a] ?? "100%" : f : a === v - 1 ? "61%" : "100%";
|
|
39
40
|
return /* @__PURE__ */ k(
|
|
40
41
|
"div",
|
|
41
42
|
{
|
|
42
|
-
...
|
|
43
|
-
className: n(
|
|
43
|
+
...C,
|
|
44
|
+
className: n(
|
|
45
|
+
"flex gap-4",
|
|
46
|
+
!!s && "relative",
|
|
47
|
+
h,
|
|
48
|
+
R.skeleton
|
|
49
|
+
),
|
|
44
50
|
children: [
|
|
45
|
-
|
|
51
|
+
j && /* @__PURE__ */ t(
|
|
46
52
|
"div",
|
|
47
53
|
{
|
|
48
54
|
className: n(
|
|
49
55
|
d,
|
|
50
|
-
|
|
56
|
+
W === S.Circle ? "rounded-full" : "rounded",
|
|
51
57
|
"flex-shrink-0"
|
|
52
58
|
),
|
|
53
59
|
style: {
|
|
@@ -63,7 +69,7 @@ const G = ({
|
|
|
63
69
|
{
|
|
64
70
|
className: n(d, "h-4 rounded"),
|
|
65
71
|
style: {
|
|
66
|
-
width:
|
|
72
|
+
width: _,
|
|
67
73
|
...e && { backgroundColor: e }
|
|
68
74
|
}
|
|
69
75
|
}
|
|
@@ -73,7 +79,7 @@ const G = ({
|
|
|
73
79
|
{
|
|
74
80
|
className: n(d, "h-4 rounded"),
|
|
75
81
|
style: {
|
|
76
|
-
width:
|
|
82
|
+
width: I(r),
|
|
77
83
|
...e && { backgroundColor: e }
|
|
78
84
|
}
|
|
79
85
|
},
|
|
@@ -86,5 +92,5 @@ const G = ({
|
|
|
86
92
|
);
|
|
87
93
|
};
|
|
88
94
|
export {
|
|
89
|
-
|
|
95
|
+
B as Skeleton
|
|
90
96
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { mergeClasses as
|
|
3
|
-
|
|
2
|
+
import { mergeClasses as n } from "../../utils/merge-classes.js";
|
|
3
|
+
import { DIAL_KIT_CLASS as o } from "../../constants/public-class-names.js";
|
|
4
|
+
const d = ({
|
|
4
5
|
size: e = 40,
|
|
5
6
|
className: s,
|
|
6
7
|
fullWidth: t = !1,
|
|
@@ -9,10 +10,11 @@ const o = ({
|
|
|
9
10
|
"div",
|
|
10
11
|
{
|
|
11
12
|
role: "status",
|
|
12
|
-
className:
|
|
13
|
+
className: n(
|
|
13
14
|
"flex items-center justify-center",
|
|
14
15
|
{ "size-full": t },
|
|
15
|
-
s
|
|
16
|
+
s,
|
|
17
|
+
o.spinner
|
|
16
18
|
),
|
|
17
19
|
children: /* @__PURE__ */ r(
|
|
18
20
|
"div",
|
|
@@ -26,5 +28,5 @@ const o = ({
|
|
|
26
28
|
}
|
|
27
29
|
);
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
d as Spinner
|
|
30
32
|
};
|
|
@@ -4,28 +4,28 @@ import c from "classnames";
|
|
|
4
4
|
import { useRef as f } from "react";
|
|
5
5
|
import { useHasHover as d } from "../../hooks/use-has-hover.js";
|
|
6
6
|
import { useTooltipContext as x } from "./TooltipContext.js";
|
|
7
|
-
const F = ({ style: e, ...
|
|
8
|
-
const
|
|
9
|
-
return !
|
|
7
|
+
const F = ({ style: e, ...r }) => {
|
|
8
|
+
const o = x(), s = d(), l = f(null), a = n([o.refs.setFloating, l]);
|
|
9
|
+
return !o.open || !s ? null : /* @__PURE__ */ t(p, { id: "tooltip-portal", children: /* @__PURE__ */ i(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
12
|
+
ref: a,
|
|
13
13
|
style: {
|
|
14
|
-
...
|
|
14
|
+
...o.floatingStyles,
|
|
15
15
|
...e
|
|
16
16
|
},
|
|
17
|
-
...
|
|
17
|
+
...o.getFloatingProps(r),
|
|
18
18
|
className: c(
|
|
19
|
-
"z-
|
|
20
|
-
|
|
19
|
+
"z-tooltip whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",
|
|
20
|
+
o.getFloatingProps(r).className
|
|
21
21
|
),
|
|
22
22
|
children: [
|
|
23
|
-
|
|
23
|
+
r.children,
|
|
24
24
|
/* @__PURE__ */ t(
|
|
25
25
|
m,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
28
|
-
context:
|
|
27
|
+
ref: o.arrowRef,
|
|
28
|
+
context: o.context,
|
|
29
29
|
fill: "currentColor",
|
|
30
30
|
strokeWidth: 1,
|
|
31
31
|
className: "stroke-primary text-[var(--bg-layer-0,_#000000)]"
|