@epam/ai-dial-ui-kit 0.16.0-dev.16 → 0.16.0-dev.19
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/CHANGELOG.md +9 -1
- package/dist/{DateCellRenderer-D8Th5Hi7.cjs → DateCellRenderer-DDEzIi2B.cjs} +8 -8
- package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
- package/dist/{MarkdownEditor-Cp-KX6-T.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/{MarkdownEditor-Dav_pp0T.cjs → MarkdownEditor-Bapd1ycU.cjs} +1 -1
- package/dist/MarkdownEditorContainer-DLPODjar.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +16 -18
- package/dist/components/New/FolderPath/FolderPath.js +136 -77
- package/dist/components/New/Popup/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +66 -71
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +30 -38
- package/dist/components-manifest.json +5 -5
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/editors.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-_W6FYhKg.cjs +1 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +5 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +9 -5
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +1 -3
- package/package.json +1 -1
- package/dist/JsonEditor-eAV7SaKu.cjs +0 -1
- package/dist/MarkdownEditorContainer-D8YTX8EM.cjs +0 -1
- package/dist/editor-BH6_A1k2.cjs +0 -1
- package/dist/lazy-DMVYJhUR.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-_W6FYhKg.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[a.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...t??{}}})};exports.DialJsonEditor=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-_W6FYhKg.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const h=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:g,strikethrough:x,table:j,unorderedListCommand:C}=h;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(x,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(g,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(j,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=h;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m,showDragbar:I=!0})=>{const g=b.useMemo(()=>M(),[]),x=b.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:j=>i?.(j||""),height:r,preview:u,visibleDragbar:I,commands:g,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-_W6FYhKg.cjs"),x=require("./merge-classes-BEJXjzkx.cjs"),g=({value:r,onChange:s,height:o=300,preview:i="edit",theme:a=u.EditorThemes.dark,className:n,placeholder:t,showDragbar:d=!0})=>{const l=t!==void 0&&!r;return e.jsxs("div",{"data-color-mode":a,className:x.mergeClasses("relative",n),children:[e.jsx(m,{value:r,onChange:c=>s?.(c||""),height:o,preview:i,visibleDragbar:d}),l&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:t})]})};exports.DialMarkdownEditor=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),m=require("./Switch-DAaAOaIu.cjs"),N=require("./lazy-_W6FYhKg.cjs"),b=require("./MarkdownEditor-Bapd1ycU.cjs"),g=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=N.EditorThemes.dark,onValidateJSON:x,preview:j="edit",showDragbar:w=!0})=>{const C=n.useId(),[t,p]=n.useState(!1),[f,S]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-Bxui5wJH.cjs")).then(s=>{S(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),E=n.useCallback(s=>{x?.(s)},[x]),o=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||o)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,o&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:C,onChange:s=>p(s)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:E,currentTheme:u})}):e.jsx(b.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,showDragbar:w,theme:u})]})})})};exports.DialMarkdownEditorContainer=g;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as J, useState as u, useEffect as S, useCallback as x } from "react";
|
|
3
|
-
import "
|
|
4
|
-
import { EditorThemes as
|
|
5
|
-
import "@monaco-editor/react";
|
|
6
|
-
import { DialSwitch as v } from "../Switch/Switch.js";
|
|
3
|
+
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
4
|
+
import { EditorThemes as v } from "../../types/editor.js";
|
|
7
5
|
import { DialMarkdownEditor as y } from "./MarkdownEditor.js";
|
|
8
6
|
import { DialLabel as j } from "../Label/Label.js";
|
|
9
|
-
const
|
|
7
|
+
const B = ({
|
|
10
8
|
value: s,
|
|
11
9
|
onChangeValue: l,
|
|
12
|
-
label:
|
|
10
|
+
label: t,
|
|
13
11
|
headerContent: d,
|
|
14
12
|
switcherLabel: a,
|
|
15
13
|
height: c = 300,
|
|
16
|
-
theme: m =
|
|
14
|
+
theme: m = v.dark,
|
|
17
15
|
onValidateJSON: f,
|
|
18
16
|
preview: C = "edit",
|
|
19
17
|
showDragbar: N = !0
|
|
20
18
|
}) => {
|
|
21
|
-
const w = J(), [
|
|
19
|
+
const w = J(), [n, D] = u(!1), [p, E] = u(null);
|
|
22
20
|
S(() => {
|
|
23
|
-
|
|
21
|
+
n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
24
22
|
E(() => o.DialJsonEditor);
|
|
25
23
|
});
|
|
26
|
-
}, [
|
|
24
|
+
}, [n]);
|
|
27
25
|
const h = x(
|
|
28
26
|
(o) => {
|
|
29
27
|
l?.(o);
|
|
@@ -34,16 +32,16 @@ const q = ({
|
|
|
34
32
|
f?.(o);
|
|
35
33
|
},
|
|
36
34
|
[f]
|
|
37
|
-
),
|
|
35
|
+
), i = !!a;
|
|
38
36
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
39
|
-
(
|
|
40
|
-
|
|
37
|
+
(t || d || i) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
38
|
+
t && /* @__PURE__ */ e(j, { label: t }),
|
|
41
39
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
42
40
|
d,
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
i && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
42
|
+
b,
|
|
45
43
|
{
|
|
46
|
-
isOn:
|
|
44
|
+
isOn: n,
|
|
47
45
|
label: a,
|
|
48
46
|
switchId: w,
|
|
49
47
|
onChange: (o) => D(o)
|
|
@@ -51,7 +49,7 @@ const q = ({
|
|
|
51
49
|
) })
|
|
52
50
|
] })
|
|
53
51
|
] }),
|
|
54
|
-
|
|
52
|
+
i && n ? /* @__PURE__ */ e(
|
|
55
53
|
"div",
|
|
56
54
|
{
|
|
57
55
|
className: "border border-primary rounded",
|
|
@@ -80,5 +78,5 @@ const q = ({
|
|
|
80
78
|
] }) }) });
|
|
81
79
|
};
|
|
82
80
|
export {
|
|
83
|
-
|
|
81
|
+
B as DialMarkdownEditorContainer
|
|
84
82
|
};
|
|
@@ -1,111 +1,170 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconFolder as
|
|
3
|
-
import {
|
|
4
|
-
import { breadcrumbListClassName as
|
|
5
|
-
import { DialIcon as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { DIAL_ICON_SIZE as
|
|
9
|
-
import { mergeClasses as
|
|
10
|
-
import { DIAL_KIT_CLASS as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx as s, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { IconFolder as O, IconDots as G, IconChevronRight as V } from "@tabler/icons-react";
|
|
3
|
+
import { useRef as f, useState as X, useCallback as v, useEffect as N } from "react";
|
|
4
|
+
import { breadcrumbListClassName as Z, breadcrumbBaseClassName as $, breadcrumbCurrentClassName as q, breadcrumbLinkBaseClassName as H, breadcrumbItemBaseClassName as x, breadcrumbSeparatorClassName as J } from "../../Breadcrumb/constants.js";
|
|
5
|
+
import { DialIcon as E } from "../../Icon/Icon.js";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as b } from "../constants/icon.js";
|
|
7
|
+
import { Tooltip as Q } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { DIAL_ICON_SIZE as k } from "../../../constants/icon.js";
|
|
9
|
+
import { mergeClasses as o } from "../../../utils/merge-classes.js";
|
|
10
|
+
import { DIAL_KIT_CLASS as U } from "../../../constants/public-class-names.js";
|
|
11
|
+
import { observeElementSize as Y, scheduleMeasure as y } from "../../../utils/element-size-observer.js";
|
|
12
|
+
const ee = 3, fe = ({
|
|
13
|
+
segments: t,
|
|
14
|
+
labelClassName: R = "dial-small-text",
|
|
15
|
+
leafClassName: W = "dial-small-semi-text",
|
|
16
|
+
className: F,
|
|
17
|
+
ariaLabel: M = "Folder path"
|
|
17
18
|
}) => {
|
|
18
|
-
const I =
|
|
19
|
-
|
|
19
|
+
const p = f(null), L = f(null), I = f(null), [i, P] = X(!1), C = f(!1), S = f(0), c = v((e) => {
|
|
20
|
+
C.current = e, P(e);
|
|
21
|
+
}, []), n = v(() => {
|
|
22
|
+
const e = p.current;
|
|
23
|
+
if (!e) return;
|
|
24
|
+
if (C.current) {
|
|
25
|
+
e.clientWidth >= S.current && c(!1);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const r = L.current, a = I.current;
|
|
29
|
+
if (!r || !a) return;
|
|
30
|
+
const d = r.scrollWidth - r.clientWidth, B = parseFloat(getComputedStyle(a).minWidth) || 0, K = a.clientWidth <= B + 1;
|
|
31
|
+
d > 0 && K && (S.current = e.clientWidth + d, c(!0));
|
|
32
|
+
}, [c]);
|
|
33
|
+
N(() => {
|
|
34
|
+
const e = p.current;
|
|
35
|
+
if (e)
|
|
36
|
+
return Y(e, n);
|
|
37
|
+
}, [n]);
|
|
38
|
+
const A = t.join("\0");
|
|
39
|
+
N(() => {
|
|
40
|
+
c(!1), y(n);
|
|
41
|
+
}, [A, n, c]), N(() => {
|
|
42
|
+
i || y(n);
|
|
43
|
+
}, [i, n]);
|
|
44
|
+
const D = /* @__PURE__ */ s(
|
|
45
|
+
E,
|
|
20
46
|
{
|
|
21
|
-
icon: /* @__PURE__ */
|
|
22
|
-
|
|
47
|
+
icon: /* @__PURE__ */ s(
|
|
48
|
+
O,
|
|
23
49
|
{
|
|
24
|
-
size:
|
|
25
|
-
stroke:
|
|
50
|
+
size: k.SM,
|
|
51
|
+
stroke: b,
|
|
26
52
|
"aria-hidden": "true"
|
|
27
53
|
}
|
|
28
54
|
),
|
|
29
55
|
className: "text-secondary"
|
|
30
56
|
}
|
|
31
|
-
),
|
|
32
|
-
|
|
57
|
+
), _ = /* @__PURE__ */ s("span", { className: J, children: /* @__PURE__ */ s(
|
|
58
|
+
E,
|
|
33
59
|
{
|
|
34
|
-
icon: /* @__PURE__ */
|
|
35
|
-
|
|
60
|
+
icon: /* @__PURE__ */ s(
|
|
61
|
+
V,
|
|
36
62
|
{
|
|
37
63
|
size: 14,
|
|
38
|
-
stroke:
|
|
64
|
+
stroke: b,
|
|
39
65
|
"aria-hidden": "true",
|
|
40
66
|
className: "rtl:scale-x-[-1]"
|
|
41
67
|
}
|
|
42
68
|
),
|
|
43
69
|
className: "text-secondary"
|
|
44
70
|
}
|
|
45
|
-
),
|
|
46
|
-
|
|
47
|
-
"text-secondary"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
) }), j = o(
|
|
72
|
+
R,
|
|
73
|
+
"text-secondary cursor-default"
|
|
74
|
+
), l = t.length - 1, T = t.length >= 3 ? l - 1 : -1, g = t.length > ee || i, w = t.slice(
|
|
75
|
+
1,
|
|
76
|
+
i ? l : l - 1
|
|
77
|
+
), u = (e) => {
|
|
78
|
+
const r = e === l, a = e === T;
|
|
79
|
+
let d = t[e];
|
|
80
|
+
return r && (d = /* @__PURE__ */ s("span", { className: W, children: t[e] })), /* @__PURE__ */ h(
|
|
81
|
+
"li",
|
|
53
82
|
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
className: o(
|
|
84
|
+
x,
|
|
85
|
+
r && "min-w-0",
|
|
86
|
+
// Gives up its width long before the leaf does.
|
|
87
|
+
a && "shrink-[1000]",
|
|
88
|
+
!r && !a && "shrink-0"
|
|
89
|
+
),
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ h(
|
|
92
|
+
"span",
|
|
93
|
+
{
|
|
94
|
+
className: o(
|
|
95
|
+
H,
|
|
96
|
+
q,
|
|
97
|
+
"pointer-events-none opacity-75",
|
|
98
|
+
// Lets the label's own minimum width hold the folder at one character.
|
|
99
|
+
a && "min-w-auto"
|
|
100
|
+
),
|
|
101
|
+
"aria-current": r ? "page" : void 0,
|
|
102
|
+
"aria-disabled": "true",
|
|
103
|
+
children: [
|
|
104
|
+
e === 0 && D,
|
|
105
|
+
/* @__PURE__ */ s(
|
|
106
|
+
"span",
|
|
107
|
+
{
|
|
108
|
+
ref: r && L || a && I || void 0,
|
|
109
|
+
className: o(
|
|
110
|
+
"truncate",
|
|
111
|
+
r && "min-w-0 flex-1",
|
|
112
|
+
a && "min-w-[2ch]",
|
|
113
|
+
j
|
|
114
|
+
),
|
|
115
|
+
children: d
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
!r && _
|
|
122
|
+
]
|
|
61
123
|
},
|
|
62
|
-
`item-${
|
|
124
|
+
`item-${e}`
|
|
63
125
|
);
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
"nav",
|
|
126
|
+
}, z = () => /* @__PURE__ */ h(
|
|
127
|
+
"li",
|
|
67
128
|
{
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
F.folderPath
|
|
73
|
-
),
|
|
74
|
-
children: /* @__PURE__ */ r("ol", { className: D, children: u ? /* @__PURE__ */ l(C, { children: [
|
|
75
|
-
o(0),
|
|
76
|
-
/* @__PURE__ */ l(
|
|
77
|
-
"li",
|
|
129
|
+
className: o(x, "shrink-0"),
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ h(
|
|
132
|
+
Q,
|
|
78
133
|
{
|
|
79
|
-
|
|
134
|
+
tooltip: t.join(" > "),
|
|
135
|
+
triggerClassName: "inline-flex cursor-default items-center text-secondary",
|
|
80
136
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
137
|
+
/* @__PURE__ */ s(
|
|
138
|
+
G,
|
|
83
139
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/* @__PURE__ */ r(
|
|
88
|
-
_,
|
|
89
|
-
{
|
|
90
|
-
size: n.SM,
|
|
91
|
-
stroke: t,
|
|
92
|
-
"aria-hidden": "true"
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children: b.join(", ") })
|
|
96
|
-
]
|
|
140
|
+
size: k.SM,
|
|
141
|
+
stroke: b,
|
|
142
|
+
"aria-hidden": "true"
|
|
97
143
|
}
|
|
98
144
|
),
|
|
99
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ s("span", { className: "sr-only", children: w.join(", ") })
|
|
100
146
|
]
|
|
101
147
|
}
|
|
102
148
|
),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
149
|
+
_
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"ellipsis"
|
|
153
|
+
), m = [];
|
|
154
|
+
return g ? (m.push(u(0), z()), i || m.push(u(l - 1)), m.push(u(l))) : t.forEach((e, r) => m.push(u(r))), /* @__PURE__ */ s(
|
|
155
|
+
"nav",
|
|
156
|
+
{
|
|
157
|
+
ref: p,
|
|
158
|
+
"aria-label": M,
|
|
159
|
+
className: o(
|
|
160
|
+
$,
|
|
161
|
+
F,
|
|
162
|
+
U.folderPath
|
|
163
|
+
),
|
|
164
|
+
children: /* @__PURE__ */ s("ol", { className: Z, children: m })
|
|
106
165
|
}
|
|
107
166
|
);
|
|
108
167
|
};
|
|
109
168
|
export {
|
|
110
|
-
|
|
169
|
+
fe as FolderPath
|
|
111
170
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopupSize as e } from "../../../types/popup.js";
|
|
2
|
-
const o = "z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6", a = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto", t = "flex flex-row items-center justify-between px-6 py-4", s = "flex-1 min-w-0 mr-3 truncate dial-
|
|
2
|
+
const o = "z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6", a = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto", t = "flex flex-row items-center justify-between px-6 py-4", s = "flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary", l = "border-b border-tertiary", r = "flex flex-row items-center gap-2 px-6 py-4", m = "border-t border-tertiary", i = "flex shrink-0 flex-row items-center gap-2", x = "ml-auto mobile:flex-1", n = "mobile:flex-1", u = {
|
|
3
3
|
[e.Sm]: "max-w-full md:max-w-[400px]",
|
|
4
4
|
[e.Md]: "max-w-full md:max-w-[800px]",
|
|
5
5
|
[e.Lg]: "max-w-full md:max-w-[1200px]"
|
|
@@ -1,118 +1,113 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ConfirmationPopup as
|
|
1
|
+
import { jsxs as _, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useId as b, useCallback as f, useEffect as Q } from "react";
|
|
3
|
+
import { ConfirmationPopup as w } from "../ConfirmationPopup/ConfirmationPopup.js";
|
|
4
4
|
import { ProgressBar as U } from "../../ProgressBar/ProgressBar.js";
|
|
5
|
-
import { DIAL_KIT_CLASS as
|
|
6
|
-
import { ConfirmationPopupVariant as
|
|
7
|
-
import { ElementSize as
|
|
8
|
-
import { TransferQueueItemStatus as
|
|
9
|
-
import { mergeClasses as
|
|
10
|
-
import { DEFAULT_TRANSFER_QUEUE_LABELS as
|
|
11
|
-
import { TransferQueueHeader as
|
|
12
|
-
import { TransferQueueRow as
|
|
13
|
-
const
|
|
5
|
+
import { DIAL_KIT_CLASS as D } from "../../../constants/public-class-names.js";
|
|
6
|
+
import { ConfirmationPopupVariant as F } from "../../../types/confirmation-popup.js";
|
|
7
|
+
import { ElementSize as R } from "../../../types/size.js";
|
|
8
|
+
import { TransferQueueItemStatus as t } from "../../../types/transfer-queue.js";
|
|
9
|
+
import { mergeClasses as C } from "../../../utils/merge-classes.js";
|
|
10
|
+
import { DEFAULT_TRANSFER_QUEUE_LABELS as N, TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS as O } from "./constants.js";
|
|
11
|
+
import { TransferQueueHeader as y } from "./TransferQueueHeader.js";
|
|
12
|
+
import { TransferQueueRow as M } from "./TransferQueueRow.js";
|
|
13
|
+
const j = (n) => Math.round(
|
|
14
14
|
n.reduce(
|
|
15
|
-
(e,
|
|
15
|
+
(e, o) => e + (o.percent ?? (o.status === t.InProgress ? 0 : 100)),
|
|
16
16
|
0
|
|
17
17
|
) / n.length
|
|
18
|
-
),
|
|
18
|
+
), q = (n, e) => n ? e.closeConfirmDescriptionMixed : e.closeConfirmDescriptionInProgress, $ = ({
|
|
19
19
|
title: n,
|
|
20
20
|
items: e,
|
|
21
|
-
onClose:
|
|
22
|
-
onCancelItem:
|
|
23
|
-
labels:
|
|
24
|
-
autoCloseDelay:
|
|
25
|
-
className:
|
|
26
|
-
bodyClassName:
|
|
21
|
+
onClose: o,
|
|
22
|
+
onCancelItem: h,
|
|
23
|
+
labels: T,
|
|
24
|
+
autoCloseDelay: l = O,
|
|
25
|
+
className: E,
|
|
26
|
+
bodyClassName: S
|
|
27
27
|
}) => {
|
|
28
|
-
const [
|
|
29
|
-
(
|
|
30
|
-
).length,
|
|
31
|
-
(
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
|
|
28
|
+
const [i, v] = g(!1), [x, c] = g(!1), m = b(), s = { ...N, ...T }, p = e.filter(
|
|
29
|
+
(r) => r.status === t.InProgress
|
|
30
|
+
).length, u = p > 0, I = e.some(
|
|
31
|
+
(r) => r.status === t.Failed
|
|
32
|
+
), d = e.length > 0 && e.every((r) => r.status === t.Success), L = f(() => {
|
|
33
|
+
u ? c(!0) : o();
|
|
34
|
+
}, [u, o]), P = f(() => {
|
|
35
|
+
c(!1), o();
|
|
36
|
+
}, [o]), A = f(() => {
|
|
37
|
+
v((r) => !r);
|
|
38
38
|
}, []);
|
|
39
|
-
return
|
|
40
|
-
if (!
|
|
41
|
-
const
|
|
42
|
-
return () => clearTimeout(
|
|
43
|
-
}, [
|
|
39
|
+
return Q(() => {
|
|
40
|
+
if (!d || l <= 0) return;
|
|
41
|
+
const r = setTimeout(o, l);
|
|
42
|
+
return () => clearTimeout(r);
|
|
43
|
+
}, [d, l, o]), e.length === 0 ? null : /* @__PURE__ */ _(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
role: "status",
|
|
47
47
|
"aria-live": "polite",
|
|
48
|
-
className:
|
|
48
|
+
className: C(
|
|
49
49
|
"w-[370px] max-w-[calc(100vw-2rem)] rounded-xl bg-layer-raised shadow-md",
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
E,
|
|
51
|
+
D.transferQueue
|
|
52
52
|
),
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
54
|
+
/* @__PURE__ */ a(
|
|
55
|
+
y,
|
|
56
56
|
{
|
|
57
57
|
title: n,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
itemsId: p,
|
|
58
|
+
isCollapsed: i,
|
|
59
|
+
itemsId: m,
|
|
61
60
|
labels: s,
|
|
62
|
-
onToggleCollapse:
|
|
63
|
-
onClose:
|
|
61
|
+
onToggleCollapse: A,
|
|
62
|
+
onClose: L
|
|
64
63
|
}
|
|
65
64
|
),
|
|
66
|
-
|
|
65
|
+
i && u && /*
|
|
67
66
|
* Only while collapsed: expanded, every running row already shows its
|
|
68
67
|
* own spinner, so an aggregate bar would restate what is on screen.
|
|
69
68
|
*/
|
|
70
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a(
|
|
71
70
|
U,
|
|
72
71
|
{
|
|
73
|
-
value:
|
|
74
|
-
size:
|
|
72
|
+
value: j(e),
|
|
73
|
+
size: R.Small,
|
|
75
74
|
"aria-label": s.queueProgressAriaLabel,
|
|
76
75
|
"aria-valuetext": s.queueProgressValueText(
|
|
77
|
-
e.length -
|
|
76
|
+
e.length - p,
|
|
78
77
|
e.length
|
|
79
78
|
)
|
|
80
79
|
}
|
|
81
80
|
),
|
|
82
|
-
!
|
|
81
|
+
!i && /* @__PURE__ */ a(
|
|
83
82
|
"div",
|
|
84
83
|
{
|
|
85
|
-
id:
|
|
86
|
-
className:
|
|
84
|
+
id: m,
|
|
85
|
+
className: C(
|
|
87
86
|
"flex max-h-[40vh] flex-col overflow-y-auto py-1",
|
|
88
|
-
|
|
87
|
+
S
|
|
89
88
|
),
|
|
90
|
-
children: e.map((
|
|
91
|
-
|
|
89
|
+
children: e.map((r) => /* @__PURE__ */ a(
|
|
90
|
+
M,
|
|
92
91
|
{
|
|
93
|
-
item:
|
|
92
|
+
item: r,
|
|
94
93
|
labels: s,
|
|
95
|
-
onCancel:
|
|
94
|
+
onCancel: h
|
|
96
95
|
},
|
|
97
|
-
|
|
96
|
+
r.id
|
|
98
97
|
))
|
|
99
98
|
}
|
|
100
99
|
),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
100
|
+
/* @__PURE__ */ a(
|
|
101
|
+
w,
|
|
103
102
|
{
|
|
104
|
-
open:
|
|
103
|
+
open: x,
|
|
105
104
|
header: s.closeConfirmHeader,
|
|
106
|
-
description:
|
|
107
|
-
a,
|
|
108
|
-
u,
|
|
109
|
-
s
|
|
110
|
-
),
|
|
105
|
+
description: q(I, s),
|
|
111
106
|
confirmLabel: s.closeConfirmLabel,
|
|
112
107
|
cancelLabel: s.closeCancelLabel,
|
|
113
|
-
variant:
|
|
114
|
-
onConfirm:
|
|
115
|
-
onClose: () =>
|
|
108
|
+
variant: F.Danger,
|
|
109
|
+
onConfirm: P,
|
|
110
|
+
onClose: () => c(!1)
|
|
116
111
|
}
|
|
117
112
|
)
|
|
118
113
|
]
|
|
@@ -120,5 +115,5 @@ const q = (n) => Math.round(
|
|
|
120
115
|
);
|
|
121
116
|
};
|
|
122
117
|
export {
|
|
123
|
-
|
|
118
|
+
$ as TransferQueue
|
|
124
119
|
};
|