@epam/ai-dial-publish-panel 1.1.0-dev.422 → 1.1.0-dev.423
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/index.js +113 -111
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -27532,7 +27532,7 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27532
27532
|
"katex-error"
|
|
27533
27533
|
]]
|
|
27534
27534
|
}
|
|
27535
|
-
}], CT = [], wT = /\$\$|\\\(|\\\[/, TT = (e) => wT.test(e), ET = {}, DT = {
|
|
27535
|
+
}], CT = [], wT = /\$\$|\\\(|\\\[/, TT = (e) => wT.test(e), ET = {}, DT = (e) => e == null ? Bv : (t) => Bv(e(t)), OT = {
|
|
27536
27536
|
li: ({ children: e }) => /* @__PURE__ */ I("li", {
|
|
27537
27537
|
className: "mb-1.5 last:mb-0",
|
|
27538
27538
|
children: e
|
|
@@ -27542,17 +27542,17 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27542
27542
|
e,
|
|
27543
27543
|
"</cit>"
|
|
27544
27544
|
] })
|
|
27545
|
-
},
|
|
27545
|
+
}, kT = (e) => {
|
|
27546
27546
|
let t = e?.properties?.className;
|
|
27547
27547
|
return !Array.isArray(t) || !t.includes("katex") ? !1 : (e?.children ?? []).some((e) => e.type === "element" && e.tagName === "math" && e.properties?.display === "block");
|
|
27548
|
-
},
|
|
27548
|
+
}, AT = {
|
|
27549
27549
|
left: "text-start",
|
|
27550
27550
|
center: "text-center",
|
|
27551
27551
|
right: "text-end"
|
|
27552
|
-
},
|
|
27552
|
+
}, jT = (e) => {
|
|
27553
27553
|
let t = e?.properties?.align;
|
|
27554
|
-
return typeof t == "string" ?
|
|
27555
|
-
},
|
|
27554
|
+
return typeof t == "string" ? AT[t] : void 0;
|
|
27555
|
+
}, MT = (e) => e ? e.type === "text" ? e.value ?? "" : (e.children ?? []).map(MT).join("") : "", NT = (e, { isStreaming: t, codeBlockCopyLabel: n, codeBlockCopiedLabel: r, codeBlockTheme: i, tableActionLabels: a, tableDownloadFilename: o, tableOnOpenInCanvas: s, tableScrollRegionAriaLabel: c, mathScrollRegionAriaLabel: l }) => ({
|
|
27556
27556
|
h1: ({ children: t }) => /* @__PURE__ */ I("h1", {
|
|
27557
27557
|
className: e.h1,
|
|
27558
27558
|
children: t
|
|
@@ -27632,7 +27632,7 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27632
27632
|
children: t
|
|
27633
27633
|
}),
|
|
27634
27634
|
input: ({ type: e, checked: t }) => e === "checkbox" ? /* @__PURE__ */ I(_T, { checked: t ?? !1 }) : null,
|
|
27635
|
-
span: ({ children: t, node: n, ...r }) =>
|
|
27635
|
+
span: ({ children: t, node: n, ...r }) => kT(n) ? /* @__PURE__ */ I(iT, {
|
|
27636
27636
|
className: e.mathBlock,
|
|
27637
27637
|
scrollRegionAriaLabel: l,
|
|
27638
27638
|
children: t
|
|
@@ -27650,7 +27650,7 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27650
27650
|
children: n
|
|
27651
27651
|
}),
|
|
27652
27652
|
tr: ({ children: e, node: t }) => {
|
|
27653
|
-
let n = t?.children.filter((e) => e.type === "element") ?? [], r = n.some((e) => e.tagName === "th"), i = n.filter((e) =>
|
|
27653
|
+
let n = t?.children.filter((e) => e.type === "element") ?? [], r = n.some((e) => e.tagName === "th"), i = n.filter((e) => MT(e).trim().length > 0).length, a = !r && n.length > 1 && i === 1;
|
|
27654
27654
|
return /* @__PURE__ */ I("tr", {
|
|
27655
27655
|
className: W(aT.row, a && aT.sectionRow),
|
|
27656
27656
|
children: e
|
|
@@ -27658,87 +27658,88 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27658
27658
|
},
|
|
27659
27659
|
th: ({ children: t, node: n }) => /* @__PURE__ */ I("th", {
|
|
27660
27660
|
scope: "col",
|
|
27661
|
-
className: W("sticky top-0 z-[2] max-w-96 whitespace-normal break-words px-3 py-2.5 text-start",
|
|
27661
|
+
className: W("sticky top-0 z-[2] max-w-96 whitespace-normal break-words px-3 py-2.5 text-start", jT(n), aT.rowDivider, aT.tableHeaderCell, e.tableHeaderFont ?? "dial-tiny-lead-semi-text", e.tableCell, e.tableHeader),
|
|
27662
27662
|
children: t
|
|
27663
27663
|
}),
|
|
27664
27664
|
td: ({ children: t, node: n }) => /* @__PURE__ */ I("td", {
|
|
27665
|
-
className: W("max-w-96 whitespace-normal px-3 py-2.5 align-top [overflow-wrap:anywhere]",
|
|
27665
|
+
className: W("max-w-96 whitespace-normal px-3 py-2.5 align-top [overflow-wrap:anywhere]", jT(n), aT.rowDivider, e.tableBodyCell, e.tableCell),
|
|
27666
27666
|
children: t
|
|
27667
27667
|
})
|
|
27668
|
-
}),
|
|
27669
|
-
let
|
|
27668
|
+
}), PT = S(({ content: e, containerClassName: t, isStreaming: n, streamCharactersPerSecond: r, classNames: i = ET, components: a, urlTransform: o, rehypePlugins: s = CT, thinkingLabel: c = "Thinking", codeBlockCopyLabel: l, codeBlockCopiedLabel: u, codeBlockTheme: d, colors: f, tableActionLabels: p, tableDownloadFilename: m, tableOnOpenInCanvas: h, tableScrollRegionAriaLabel: g, mathScrollRegionAriaLabel: _ }) => {
|
|
27669
|
+
let v = Mw(e, n, r), y = O(() => Hw(v), [v]), b = O(() => TT(y), [y]), [x, S] = A(null);
|
|
27670
27670
|
T(() => {
|
|
27671
|
-
if (!
|
|
27671
|
+
if (!b || x) return;
|
|
27672
27672
|
let e = !1;
|
|
27673
27673
|
return (async () => {
|
|
27674
27674
|
let [t] = await Promise.all([import("./rehype-katex-Da1z0EAE-BhD6x-qn.js"), Promise.resolve({ })]);
|
|
27675
|
-
e ||
|
|
27675
|
+
e || S([t.default, {
|
|
27676
27676
|
output: "mathml",
|
|
27677
27677
|
strict: !1
|
|
27678
27678
|
}]);
|
|
27679
27679
|
})(), () => {
|
|
27680
27680
|
e = !0;
|
|
27681
27681
|
};
|
|
27682
|
-
}, [
|
|
27683
|
-
let
|
|
27682
|
+
}, [b, x]);
|
|
27683
|
+
let C = O(() => [
|
|
27684
27684
|
...xT,
|
|
27685
|
-
...
|
|
27685
|
+
...x ? [x] : [],
|
|
27686
27686
|
ST,
|
|
27687
|
-
...
|
|
27688
|
-
], [
|
|
27689
|
-
"--cm-thinking-inverted":
|
|
27690
|
-
"--cm-thinking-secondary":
|
|
27691
|
-
"--cm-markdown-border":
|
|
27692
|
-
"--cm-blockquote-border":
|
|
27693
|
-
"--cm-blockquote-text":
|
|
27694
|
-
"--cm-link-text":
|
|
27695
|
-
"--cm-link-focus":
|
|
27696
|
-
"--cm-table-header-text":
|
|
27697
|
-
"--cm-h6-text":
|
|
27698
|
-
"--cm-code-inline-bg":
|
|
27699
|
-
"--cm-code-inline-text":
|
|
27700
|
-
}),
|
|
27701
|
-
...
|
|
27687
|
+
...s
|
|
27688
|
+
], [x, s]), w = xo({
|
|
27689
|
+
"--cm-thinking-inverted": f?.thinkingPrimary,
|
|
27690
|
+
"--cm-thinking-secondary": f?.thinkingSecondary,
|
|
27691
|
+
"--cm-markdown-border": f?.border,
|
|
27692
|
+
"--cm-blockquote-border": f?.blockquoteBorder,
|
|
27693
|
+
"--cm-blockquote-text": f?.blockquoteText,
|
|
27694
|
+
"--cm-link-text": f?.linkText,
|
|
27695
|
+
"--cm-link-focus": f?.linkFocus,
|
|
27696
|
+
"--cm-table-header-text": f?.tableHeaderText,
|
|
27697
|
+
"--cm-h6-text": f?.headingSixText,
|
|
27698
|
+
"--cm-code-inline-bg": f?.inlineCodeBackground,
|
|
27699
|
+
"--cm-code-inline-text": f?.inlineCodeText
|
|
27700
|
+
}), E = O(() => DT(o), [o]), ee = O(() => ({
|
|
27701
|
+
...NT(i, {
|
|
27702
27702
|
isStreaming: n,
|
|
27703
|
-
codeBlockCopyLabel:
|
|
27704
|
-
codeBlockCopiedLabel:
|
|
27705
|
-
codeBlockTheme:
|
|
27706
|
-
tableActionLabels:
|
|
27707
|
-
tableDownloadFilename:
|
|
27708
|
-
tableOnOpenInCanvas:
|
|
27709
|
-
tableScrollRegionAriaLabel:
|
|
27710
|
-
mathScrollRegionAriaLabel:
|
|
27703
|
+
codeBlockCopyLabel: l,
|
|
27704
|
+
codeBlockCopiedLabel: u,
|
|
27705
|
+
codeBlockTheme: d,
|
|
27706
|
+
tableActionLabels: p,
|
|
27707
|
+
tableDownloadFilename: m,
|
|
27708
|
+
tableOnOpenInCanvas: h,
|
|
27709
|
+
tableScrollRegionAriaLabel: g,
|
|
27710
|
+
mathScrollRegionAriaLabel: _
|
|
27711
27711
|
}),
|
|
27712
|
-
...
|
|
27712
|
+
...OT,
|
|
27713
27713
|
...a
|
|
27714
27714
|
}), [
|
|
27715
27715
|
i,
|
|
27716
27716
|
n,
|
|
27717
|
-
c,
|
|
27718
27717
|
l,
|
|
27719
27718
|
u,
|
|
27720
|
-
|
|
27719
|
+
d,
|
|
27721
27720
|
p,
|
|
27722
27721
|
m,
|
|
27723
27722
|
h,
|
|
27724
27723
|
g,
|
|
27724
|
+
_,
|
|
27725
27725
|
a
|
|
27726
27726
|
]);
|
|
27727
|
-
return n && !
|
|
27727
|
+
return n && !v ? /* @__PURE__ */ I("span", {
|
|
27728
27728
|
className: eT.thinking,
|
|
27729
|
-
style:
|
|
27730
|
-
children:
|
|
27729
|
+
style: w,
|
|
27730
|
+
children: c
|
|
27731
27731
|
}) : /* @__PURE__ */ I("div", {
|
|
27732
|
-
style:
|
|
27732
|
+
style: w,
|
|
27733
27733
|
className: t,
|
|
27734
27734
|
children: /* @__PURE__ */ I(Iv, {
|
|
27735
27735
|
remarkPlugins: vT,
|
|
27736
|
-
rehypePlugins:
|
|
27737
|
-
components:
|
|
27738
|
-
|
|
27736
|
+
rehypePlugins: C,
|
|
27737
|
+
components: ee,
|
|
27738
|
+
urlTransform: E,
|
|
27739
|
+
children: y
|
|
27739
27740
|
})
|
|
27740
27741
|
});
|
|
27741
|
-
}),
|
|
27742
|
+
}), FT = {
|
|
27742
27743
|
h1: "dial-h1-text mb-3 mt-6 first:mt-0 [text-wrap:balance]",
|
|
27743
27744
|
h2: "dial-h2-text mb-2 mt-5 first:mt-0 [text-wrap:balance]",
|
|
27744
27745
|
h3: "dial-h3-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
@@ -27754,34 +27755,35 @@ var Ew = 120, Dw = () => typeof window < "u" && window.matchMedia?.("(prefers-re
|
|
|
27754
27755
|
tableWrapper: "my-4",
|
|
27755
27756
|
mathBlock: "my-4"
|
|
27756
27757
|
};
|
|
27757
|
-
({ ...
|
|
27758
|
+
({ ...FT }), S(({ content: e, isStreaming: t, thinkingLabel: n, components: r, urlTransform: i, codeBlockCopyLabel: a, codeBlockCopiedLabel: o, codeBlockTheme: s, tableActionLabels: c, tableDownloadFilename: l, tableOnOpenInCanvas: u, tableScrollRegionAriaLabel: d, classNames: f = FT }) => /* @__PURE__ */ I(PT, {
|
|
27758
27759
|
content: e,
|
|
27759
27760
|
isStreaming: t,
|
|
27760
27761
|
thinkingLabel: n,
|
|
27761
27762
|
components: r,
|
|
27762
|
-
|
|
27763
|
-
|
|
27764
|
-
|
|
27765
|
-
|
|
27766
|
-
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27763
|
+
urlTransform: i,
|
|
27764
|
+
codeBlockCopyLabel: a,
|
|
27765
|
+
codeBlockCopiedLabel: o,
|
|
27766
|
+
codeBlockTheme: s,
|
|
27767
|
+
tableActionLabels: c,
|
|
27768
|
+
tableDownloadFilename: l,
|
|
27769
|
+
tableOnOpenInCanvas: u,
|
|
27770
|
+
tableScrollRegionAriaLabel: d,
|
|
27771
|
+
classNames: f
|
|
27770
27772
|
}));
|
|
27771
|
-
var
|
|
27773
|
+
var IT = {
|
|
27772
27774
|
dialog: "_dialog_1chty_2",
|
|
27773
27775
|
error: "_error_1chty_11",
|
|
27774
27776
|
selectField: "_selectField_1chty_25",
|
|
27775
27777
|
selectFieldOpen: "_selectFieldOpen_1chty_37"
|
|
27776
|
-
},
|
|
27778
|
+
}, LT = 20, RT = 200, zT = 8, BT = (e) => {
|
|
27777
27779
|
let t = e.trim();
|
|
27778
|
-
if (t.length === 0 || t.length >
|
|
27780
|
+
if (t.length === 0 || t.length > RT) return !1;
|
|
27779
27781
|
try {
|
|
27780
27782
|
return new RegExp(t) instanceof RegExp;
|
|
27781
27783
|
} catch {
|
|
27782
27784
|
return !1;
|
|
27783
27785
|
}
|
|
27784
|
-
},
|
|
27786
|
+
}, VT = ({ sourceOptions: e, onSave: t, onCancel: n, disabled: r = !1, maxTargets: i = LT, labels: a = {}, errorClassName: o = "dial-small-text", styles: s = {} }) => {
|
|
27785
27787
|
let c = {
|
|
27786
27788
|
...xo({
|
|
27787
27789
|
"--pare-mobile-bg": s.colors?.mobileBackground,
|
|
@@ -27797,7 +27799,7 @@ var FT = {
|
|
|
27797
27799
|
T(() => {
|
|
27798
27800
|
ne.current?.focus();
|
|
27799
27801
|
}, []);
|
|
27800
|
-
let [N, P] = A(), [re, ie] = A(), [ae, oe] = A([]), [se, ce] = A(""), [le, ue] = A(!1), [de, F] = A(!1), [fe, pe] = A(!1), me = W(
|
|
27802
|
+
let [N, P] = A(), [re, ie] = A(), [ae, oe] = A([]), [se, ce] = A(""), [le, ue] = A(!1), [de, F] = A(!1), [fe, pe] = A(!1), me = W(IT.selectField, le && IT.selectFieldOpen), he = W(IT.selectField, de && IT.selectFieldOpen), ge = O(() => e.map((e) => ({
|
|
27801
27803
|
value: e,
|
|
27802
27804
|
label: e
|
|
27803
27805
|
})), [e]), _e = O(() => [
|
|
@@ -27817,7 +27819,7 @@ var FT = {
|
|
|
27817
27819
|
f,
|
|
27818
27820
|
p,
|
|
27819
27821
|
m
|
|
27820
|
-
]), ve = re === Wt.Regex, ye =
|
|
27822
|
+
]), ve = re === Wt.Regex, ye = BT(se), be = N != null && re != null && (ve ? ye : ae.length > 0);
|
|
27821
27823
|
return /* @__PURE__ */ L("div", {
|
|
27822
27824
|
ref: ne,
|
|
27823
27825
|
role: "dialog",
|
|
@@ -27828,7 +27830,7 @@ var FT = {
|
|
|
27828
27830
|
e.key === "Escape" && (e.stopPropagation(), n());
|
|
27829
27831
|
},
|
|
27830
27832
|
style: c,
|
|
27831
|
-
className: W("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3",
|
|
27833
|
+
className: W("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", IT.dialog),
|
|
27832
27834
|
children: [
|
|
27833
27835
|
/* @__PURE__ */ I(Ue, {
|
|
27834
27836
|
id: j,
|
|
@@ -27839,7 +27841,7 @@ var FT = {
|
|
|
27839
27841
|
P(Array.isArray(e) ? e[0] : e), ue(!1);
|
|
27840
27842
|
},
|
|
27841
27843
|
placeholder: u,
|
|
27842
|
-
searchable: e.length >
|
|
27844
|
+
searchable: e.length > zT,
|
|
27843
27845
|
searchPlaceholder: u,
|
|
27844
27846
|
disabled: r,
|
|
27845
27847
|
open: le,
|
|
@@ -27877,7 +27879,7 @@ var FT = {
|
|
|
27877
27879
|
}), (se.length > 0 || fe) && !ye && /* @__PURE__ */ I("span", {
|
|
27878
27880
|
id: D,
|
|
27879
27881
|
role: "alert",
|
|
27880
|
-
className: W("mt-1 block", o,
|
|
27882
|
+
className: W("mt-1 block", o, IT.error),
|
|
27881
27883
|
children: b
|
|
27882
27884
|
})] }) : /* @__PURE__ */ I(Xe, {
|
|
27883
27885
|
id: te,
|
|
@@ -27922,13 +27924,13 @@ var FT = {
|
|
|
27922
27924
|
})
|
|
27923
27925
|
]
|
|
27924
27926
|
});
|
|
27925
|
-
},
|
|
27927
|
+
}, HT = {
|
|
27926
27928
|
ruleRow: "_ruleRow_nx0en_1",
|
|
27927
27929
|
heading: "_heading_nx0en_5",
|
|
27928
27930
|
hint: "_hint_nx0en_9",
|
|
27929
27931
|
loading: "_loading_nx0en_13",
|
|
27930
27932
|
ruleText: "_ruleText_nx0en_17"
|
|
27931
|
-
},
|
|
27933
|
+
}, UT = 20, WT = (e, t) => e === Wt.Equal ? t.equal : e === Wt.Contain ? t.contain : t.regex, GT = ({ rules: e, onRulesChange: t, sourceOptions: n, folderName: r, disabled: i = !1, isLoading: a = !1, hasLoadError: o = !1, maxRules: s = UT, maxTargetsPerRule: c, labels: l = {}, headingClassName: u = "dial-body-semi-text", hintClassName: d = "dial-small-text", loadingClassName: f = "dial-small-text", ruleTextClassName: p = "dial-small-text", ruleSourceClassName: m = "dial-small-semi-text", styles: h = {} }) => {
|
|
27932
27934
|
let g = {
|
|
27933
27935
|
...xo({
|
|
27934
27936
|
"--par-rule-bg": h.colors?.ruleBackground,
|
|
@@ -27977,7 +27979,7 @@ var FT = {
|
|
|
27977
27979
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
27978
27980
|
children: [/* @__PURE__ */ I("div", {
|
|
27979
27981
|
id: oe,
|
|
27980
|
-
className: W(u,
|
|
27982
|
+
className: W(u, HT.heading),
|
|
27981
27983
|
children: _
|
|
27982
27984
|
}), e.length > 0 && /* @__PURE__ */ I(De, {
|
|
27983
27985
|
variant: ne.Primary,
|
|
@@ -27987,7 +27989,7 @@ var FT = {
|
|
|
27987
27989
|
})]
|
|
27988
27990
|
}),
|
|
27989
27991
|
/* @__PURE__ */ I("p", {
|
|
27990
|
-
className: W("mb-2", d,
|
|
27992
|
+
className: W("mb-2", d, HT.hint),
|
|
27991
27993
|
children: Se ? v.replace("{folder}", r) : y
|
|
27992
27994
|
}),
|
|
27993
27995
|
e.length > 0 && !Se && /* @__PURE__ */ I("div", {
|
|
@@ -27999,7 +28001,7 @@ var FT = {
|
|
|
27999
28001
|
})
|
|
28000
28002
|
}),
|
|
28001
28003
|
a && /* @__PURE__ */ L("div", {
|
|
28002
|
-
className: W("mb-2 flex items-center gap-2", f,
|
|
28004
|
+
className: W("mb-2 flex items-center gap-2", f, HT.loading),
|
|
28003
28005
|
children: [/* @__PURE__ */ I(Ke, {
|
|
28004
28006
|
size: 16,
|
|
28005
28007
|
ariaLabel: M
|
|
@@ -28018,16 +28020,16 @@ var FT = {
|
|
|
28018
28020
|
children: e.map((e, t) => {
|
|
28019
28021
|
let n = e.targets.join(` ${w} `), r = ee.replace("{source}", e.source).replace("{targets}", n);
|
|
28020
28022
|
return /* @__PURE__ */ L("li", {
|
|
28021
|
-
className: W("flex items-center justify-between gap-2 rounded-lg px-3 py-2",
|
|
28023
|
+
className: W("flex items-center justify-between gap-2 rounded-lg px-3 py-2", HT.ruleRow),
|
|
28022
28024
|
children: [/* @__PURE__ */ L("span", {
|
|
28023
|
-
className: W("truncate", p,
|
|
28025
|
+
className: W("truncate", p, HT.ruleText),
|
|
28024
28026
|
children: [
|
|
28025
28027
|
/* @__PURE__ */ I("span", {
|
|
28026
28028
|
className: m,
|
|
28027
28029
|
children: e.source
|
|
28028
28030
|
}),
|
|
28029
28031
|
" ",
|
|
28030
|
-
|
|
28032
|
+
WT(e.function, ye),
|
|
28031
28033
|
": ",
|
|
28032
28034
|
n
|
|
28033
28035
|
]
|
|
@@ -28044,7 +28046,7 @@ var FT = {
|
|
|
28044
28046
|
}, t);
|
|
28045
28047
|
})
|
|
28046
28048
|
}),
|
|
28047
|
-
se && /* @__PURE__ */ I(
|
|
28049
|
+
se && /* @__PURE__ */ I(VT, {
|
|
28048
28050
|
sourceOptions: n,
|
|
28049
28051
|
onSave: ge,
|
|
28050
28052
|
onCancel: he,
|
|
@@ -28067,18 +28069,18 @@ var FT = {
|
|
|
28067
28069
|
})
|
|
28068
28070
|
}),
|
|
28069
28071
|
be && /* @__PURE__ */ I("p", {
|
|
28070
|
-
className: W("mt-2", d,
|
|
28072
|
+
className: W("mt-2", d, HT.hint),
|
|
28071
28073
|
children: x.replace("{max}", String(s))
|
|
28072
28074
|
})
|
|
28073
28075
|
]
|
|
28074
28076
|
});
|
|
28075
|
-
},
|
|
28077
|
+
}, KT = {
|
|
28076
28078
|
currentBadge: "_currentBadge_eo6mj_1",
|
|
28077
28079
|
version: "_version_eo6mj_7",
|
|
28078
28080
|
date: "_date_eo6mj_11",
|
|
28079
28081
|
emptyState: "_emptyState_eo6mj_15",
|
|
28080
28082
|
stripedRow: "_stripedRow_eo6mj_19"
|
|
28081
|
-
},
|
|
28083
|
+
}, qT = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", emptyStateLabel: o = "Not published to this folder yet — this will be the first version here.", loadingLabel: s = "Loading history…", errorLabel: c = "Failed to load publish history.", versionClassName: l = "dial-small-text", dateClassName: u = "dial-small-text", emptyStateClassName: d = "dial-small-text", colors: f }) => {
|
|
28082
28084
|
let p = xo({
|
|
28083
28085
|
"--phl-badge-border": f?.currentBadgeBorder,
|
|
28084
28086
|
"--phl-badge-bg": f?.currentBadgeBackground,
|
|
@@ -28087,7 +28089,7 @@ var FT = {
|
|
|
28087
28089
|
"--phl-date-text": f?.dateText,
|
|
28088
28090
|
"--phl-empty-text": f?.emptyStateText,
|
|
28089
28091
|
"--phl-striped-bg": f?.stripedBackground
|
|
28090
|
-
}), m = W(d,
|
|
28092
|
+
}), m = W(d, KT.emptyState);
|
|
28091
28093
|
return n ? /* @__PURE__ */ I("p", {
|
|
28092
28094
|
style: p,
|
|
28093
28095
|
className: m,
|
|
@@ -28104,12 +28106,12 @@ var FT = {
|
|
|
28104
28106
|
}) : /* @__PURE__ */ I("ul", {
|
|
28105
28107
|
style: p,
|
|
28106
28108
|
children: e.map((e, n) => /* @__PURE__ */ L("li", {
|
|
28107
|
-
className: W("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 &&
|
|
28109
|
+
className: W("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && KT.stripedRow),
|
|
28108
28110
|
children: [/* @__PURE__ */ L("span", {
|
|
28109
28111
|
className: "flex min-w-0 items-center gap-2",
|
|
28110
28112
|
style: p,
|
|
28111
28113
|
children: [/* @__PURE__ */ L("span", {
|
|
28112
|
-
className: W(l,
|
|
28114
|
+
className: W(l, KT.version),
|
|
28113
28115
|
children: [
|
|
28114
28116
|
i,
|
|
28115
28117
|
" ",
|
|
@@ -28117,15 +28119,15 @@ var FT = {
|
|
|
28117
28119
|
]
|
|
28118
28120
|
}), e.version === t && /* @__PURE__ */ I(Ye, {
|
|
28119
28121
|
label: a,
|
|
28120
|
-
className: W("shrink-0 whitespace-nowrap",
|
|
28122
|
+
className: W("shrink-0 whitespace-nowrap", KT.currentBadge)
|
|
28121
28123
|
})]
|
|
28122
28124
|
}), /* @__PURE__ */ I("span", {
|
|
28123
|
-
className: W(u,
|
|
28125
|
+
className: W(u, KT.date),
|
|
28124
28126
|
children: Jt(e.publishedAt)
|
|
28125
28127
|
})]
|
|
28126
28128
|
}, `${e.version}-${n}`))
|
|
28127
28129
|
});
|
|
28128
|
-
},
|
|
28130
|
+
}, JT = { divider: "_divider_a8iz6_1" }, YT = ({ items: e, selectedPath: t, onSelectedPathChange: n, onCreateFolder: r, searchQuery: i, disabled: a = !1, createFolderLabel: o = "Create new folder", cancelCreatingFolderLabel: s = "Cancel", addSiblingFolderLabel: c = "Add sibling", addChildFolderLabel: l = "Add child", newFolderDefaultName: u = "New folder", noResultsLabel: d = "No folders match \"{query}\".", emptyFolderNameError: f = "Folder name cannot be empty.", invalidFolderNameError: p = "Folder name contains invalid characters.", duplicateFolderNameError: m = "A folder with this name already exists.", rootLabel: h = "Organization", expandedPaths: g, onExpandedPathsChange: _, loadingPaths: v, styles: y = {} }) => {
|
|
28129
28131
|
let b = {
|
|
28130
28132
|
...xo({ "--pft-divider": y.colors?.divider }),
|
|
28131
28133
|
...y.cssVars
|
|
@@ -28214,7 +28216,7 @@ var FT = {
|
|
|
28214
28216
|
})
|
|
28215
28217
|
}),
|
|
28216
28218
|
/* @__PURE__ */ I("div", {
|
|
28217
|
-
className: W("my-2 h-px",
|
|
28219
|
+
className: W("my-2 h-px", JT.divider),
|
|
28218
28220
|
"aria-hidden": !0
|
|
28219
28221
|
}),
|
|
28220
28222
|
/* @__PURE__ */ L("div", {
|
|
@@ -28236,10 +28238,10 @@ var FT = {
|
|
|
28236
28238
|
})
|
|
28237
28239
|
]
|
|
28238
28240
|
});
|
|
28239
|
-
},
|
|
28241
|
+
}, XT = {
|
|
28240
28242
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
28241
28243
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
28242
|
-
},
|
|
28244
|
+
}, ZT = ({ resource: e, renderSummary: t, history: n, isHistoryLoading: r = !1, hasHistoryError: i = !1, folderItems: a, selectedFolderPath: o, onSelectedFolderPathChange: s, onCreateFolder: c, expandedPaths: l, onExpandedPathsChange: u, loadingPaths: d, hasExistingPublicationInFolder: f, hasWriteAccess: p, isSubmitting: m, hasSubmitError: h = !1, allowReplace: g = !0, rules: _, onRulesChange: v, ruleSourceOptions: y, isRulesLoading: b = !1, hasRulesLoadError: x = !1, labels: S = {}, summaryTitleClassName: C = "dial-body-semi-text", headingClassName: w = "dial-body-semi-text", styles: T = {} }) => {
|
|
28243
28245
|
let { colors: E, folderTree: ee, accessRules: D } = T, k = {
|
|
28244
28246
|
...xo({
|
|
28245
28247
|
"--pp-summary-title-text": E?.summaryTitleText,
|
|
@@ -28269,7 +28271,7 @@ var FT = {
|
|
|
28269
28271
|
h,
|
|
28270
28272
|
g
|
|
28271
28273
|
]), ve = ge ? o[o.length - 1] ?? le : "", ye = t ? t() : /* @__PURE__ */ I("span", {
|
|
28272
|
-
className: W("truncate", C,
|
|
28274
|
+
className: W("truncate", C, XT.summaryTitle),
|
|
28273
28275
|
children: e?.title
|
|
28274
28276
|
});
|
|
28275
28277
|
return /* @__PURE__ */ L("div", {
|
|
@@ -28289,7 +28291,7 @@ var FT = {
|
|
|
28289
28291
|
colors: j
|
|
28290
28292
|
}), /* @__PURE__ */ L("div", { children: [
|
|
28291
28293
|
/* @__PURE__ */ I("div", {
|
|
28292
|
-
className: W("mb-2", w,
|
|
28294
|
+
className: W("mb-2", w, XT.sectionHeading),
|
|
28293
28295
|
children: M
|
|
28294
28296
|
}),
|
|
28295
28297
|
/* @__PURE__ */ I("div", {
|
|
@@ -28303,7 +28305,7 @@ var FT = {
|
|
|
28303
28305
|
"aria-label": F
|
|
28304
28306
|
})
|
|
28305
28307
|
}),
|
|
28306
|
-
/* @__PURE__ */ I(
|
|
28308
|
+
/* @__PURE__ */ I(YT, {
|
|
28307
28309
|
items: a,
|
|
28308
28310
|
selectedPath: o,
|
|
28309
28311
|
onSelectedPathChange: s,
|
|
@@ -28327,8 +28329,8 @@ var FT = {
|
|
|
28327
28329
|
className: "mt-3",
|
|
28328
28330
|
children: /* @__PURE__ */ I(Fe, {
|
|
28329
28331
|
type: Ie.SectionMessage,
|
|
28330
|
-
variant:
|
|
28331
|
-
message:
|
|
28332
|
+
variant: QT(_e.calloutKind),
|
|
28333
|
+
message: eE(_e.calloutKind, {
|
|
28332
28334
|
replaceWarning: te,
|
|
28333
28335
|
noAccessError: ne,
|
|
28334
28336
|
submitError: N,
|
|
@@ -28339,7 +28341,7 @@ var FT = {
|
|
|
28339
28341
|
}),
|
|
28340
28342
|
/* @__PURE__ */ I("div", {
|
|
28341
28343
|
className: "mt-4",
|
|
28342
|
-
children: /* @__PURE__ */ I(
|
|
28344
|
+
children: /* @__PURE__ */ I(GT, {
|
|
28343
28345
|
rules: _,
|
|
28344
28346
|
onRulesChange: v,
|
|
28345
28347
|
sourceOptions: y,
|
|
@@ -28353,7 +28355,7 @@ var FT = {
|
|
|
28353
28355
|
})
|
|
28354
28356
|
] })]
|
|
28355
28357
|
});
|
|
28356
|
-
},
|
|
28358
|
+
}, QT = (e) => e === Gt.ReplaceWarning ? Le.Warning : Le.Error, $T = (e, t) => {
|
|
28357
28359
|
let [n, r, ...i] = e.split("{folder}");
|
|
28358
28360
|
return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ L(ot, { children: [
|
|
28359
28361
|
n,
|
|
@@ -28363,11 +28365,11 @@ var FT = {
|
|
|
28363
28365
|
}),
|
|
28364
28366
|
r
|
|
28365
28367
|
] });
|
|
28366
|
-
},
|
|
28368
|
+
}, eE = (e, t) => e === Gt.ReplaceWarning ? $T(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === Gt.NoAccess ? $T(t.noAccessError, t.folderName) : t.submitError, tE = { footer: "_footer_dks1v_1" }, nE = ({ version: e, hasExistingPublicationInFolder: t, isSubmitDisabled: n, isSubmitLoading: r, onCancel: i, onSubmit: a, labels: o = {}, colors: s }) => {
|
|
28367
28369
|
let c = xo({ "--pf-border": s?.border }), { cancelLabel: l = "Cancel", publishDefaultLabel: u = "Publish", updateLabel: d = "Update version {version}", publishingInProgressLabel: f = "Publishing…" } = o, p = r ? f : t && e != null ? d.replace("{version}", e) : u;
|
|
28368
28370
|
return /* @__PURE__ */ L("div", {
|
|
28369
28371
|
style: c,
|
|
28370
|
-
className: W("flex items-center justify-end gap-2 border-t px-3.5 py-4 rtl:flex-row-reverse rtl:justify-start",
|
|
28372
|
+
className: W("flex items-center justify-end gap-2 border-t px-3.5 py-4 rtl:flex-row-reverse rtl:justify-start", tE.footer),
|
|
28371
28373
|
children: [/* @__PURE__ */ I(De, {
|
|
28372
28374
|
label: l,
|
|
28373
28375
|
disabled: r,
|
|
@@ -28379,7 +28381,7 @@ var FT = {
|
|
|
28379
28381
|
onClick: a
|
|
28380
28382
|
})]
|
|
28381
28383
|
});
|
|
28382
|
-
},
|
|
28384
|
+
}, rE = [
|
|
28383
28385
|
"a[href]",
|
|
28384
28386
|
"area[href]",
|
|
28385
28387
|
"button",
|
|
@@ -28389,13 +28391,13 @@ var FT = {
|
|
|
28389
28391
|
"summary",
|
|
28390
28392
|
"[contenteditable=\"true\"]",
|
|
28391
28393
|
"[tabindex]"
|
|
28392
|
-
].join(","),
|
|
28394
|
+
].join(","), iE = (e) => e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || e.tabIndex < 0 ? !1 : e.closest("[inert],[hidden],[aria-hidden=\"true\"]") == null, aE = (e) => Array.from(e.querySelectorAll(rE)).filter(iE), oE = {
|
|
28393
28395
|
backdrop: "_backdrop_1rdk6_1",
|
|
28394
28396
|
panel: "_panel_1rdk6_5",
|
|
28395
28397
|
divider: "_divider_1rdk6_10",
|
|
28396
28398
|
content: "_content_1rdk6_14",
|
|
28397
28399
|
title: "_title_1rdk6_19"
|
|
28398
|
-
},
|
|
28400
|
+
}, sE = ({ isOpen: e, resource: t, renderSummary: n, history: r, isHistoryLoading: i = !1, hasHistoryError: a = !1, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, rules: v, onRulesChange: y, ruleSourceOptions: b, isRulesLoading: x = !1, hasRulesLoadError: S = !1, onClose: C, returnFocusRef: w, onSubmit: E, panelLabels: ee, panelStyles: D, footerLabels: A, labels: j = {}, titleClassName: M = "dial-body-semi-text", colors: te }) => {
|
|
28399
28401
|
let ne = xo({
|
|
28400
28402
|
"--spp-backdrop-bg": te?.backdropBackground,
|
|
28401
28403
|
"--spp-panel-bg": te?.panelBackground,
|
|
@@ -28446,7 +28448,7 @@ var FT = {
|
|
|
28446
28448
|
if (!t) return;
|
|
28447
28449
|
let n = document.activeElement;
|
|
28448
28450
|
if (!(n instanceof HTMLElement) || !t.contains(n)) return;
|
|
28449
|
-
let r =
|
|
28451
|
+
let r = aE(t);
|
|
28450
28452
|
if (r.length === 0) {
|
|
28451
28453
|
e.preventDefault(), t.focus({ preventScroll: !0 });
|
|
28452
28454
|
return;
|
|
@@ -28463,7 +28465,7 @@ var FT = {
|
|
|
28463
28465
|
};
|
|
28464
28466
|
}, [e, C]), /* @__PURE__ */ L(ot, { children: [/* @__PURE__ */ I("div", {
|
|
28465
28467
|
style: ne,
|
|
28466
|
-
className: W("fixed inset-0 z-[51] transition-opacity duration-300",
|
|
28468
|
+
className: W("fixed inset-0 z-[51] transition-opacity duration-300", oE.backdrop, e ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
28467
28469
|
onClick: C,
|
|
28468
28470
|
"aria-hidden": "true"
|
|
28469
28471
|
}), /* @__PURE__ */ L("div", {
|
|
@@ -28475,14 +28477,14 @@ var FT = {
|
|
|
28475
28477
|
inert: !e,
|
|
28476
28478
|
tabIndex: -1,
|
|
28477
28479
|
style: ne,
|
|
28478
|
-
className: W("fixed inset-y-0 end-0 z-[52] flex w-full flex-col overflow-hidden", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300",
|
|
28480
|
+
className: W("fixed inset-y-0 end-0 z-[52] flex w-full flex-col overflow-hidden", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300", oE.panel, e ? "translate-x-0" : "translate-x-full rtl:-translate-x-full"),
|
|
28479
28481
|
children: [
|
|
28480
28482
|
/* @__PURE__ */ L("div", {
|
|
28481
28483
|
className: "flex shrink-0 items-center gap-2 px-[22px] py-3",
|
|
28482
28484
|
children: [
|
|
28483
28485
|
/* @__PURE__ */ I("div", { className: "flex-1" }),
|
|
28484
28486
|
/* @__PURE__ */ I("span", {
|
|
28485
|
-
className: W("flex-1 text-center", M,
|
|
28487
|
+
className: W("flex-1 text-center", M, oE.title),
|
|
28486
28488
|
children: re
|
|
28487
28489
|
}),
|
|
28488
28490
|
/* @__PURE__ */ I("div", {
|
|
@@ -28495,12 +28497,12 @@ var FT = {
|
|
|
28495
28497
|
})
|
|
28496
28498
|
]
|
|
28497
28499
|
}),
|
|
28498
|
-
/* @__PURE__ */ I("div", { className: W("shrink-0",
|
|
28500
|
+
/* @__PURE__ */ I("div", { className: W("shrink-0", oE.divider) }),
|
|
28499
28501
|
/* @__PURE__ */ I("div", {
|
|
28500
|
-
className: W("min-h-0 flex-1 overflow-y-auto",
|
|
28502
|
+
className: W("min-h-0 flex-1 overflow-y-auto", oE.content),
|
|
28501
28503
|
children: /* @__PURE__ */ I("div", {
|
|
28502
28504
|
className: "p-[22px]",
|
|
28503
|
-
children: /* @__PURE__ */ I(
|
|
28505
|
+
children: /* @__PURE__ */ I(ZT, {
|
|
28504
28506
|
resource: t,
|
|
28505
28507
|
renderSummary: n,
|
|
28506
28508
|
history: r,
|
|
@@ -28528,7 +28530,7 @@ var FT = {
|
|
|
28528
28530
|
})
|
|
28529
28531
|
})
|
|
28530
28532
|
}),
|
|
28531
|
-
/* @__PURE__ */ I(
|
|
28533
|
+
/* @__PURE__ */ I(nE, {
|
|
28532
28534
|
version: t?.version,
|
|
28533
28535
|
hasExistingPublicationInFolder: p,
|
|
28534
28536
|
isSubmitDisabled: oe.isSubmitDisabled,
|
|
@@ -28541,4 +28543,4 @@ var FT = {
|
|
|
28541
28543
|
})] });
|
|
28542
28544
|
};
|
|
28543
28545
|
//#endregion
|
|
28544
|
-
export { Wt as PublicationRuleFunction,
|
|
28546
|
+
export { Wt as PublicationRuleFunction, VT as PublishAccessRuleEditor, GT as PublishAccessRules, Gt as PublishCalloutKind, YT as PublishFoldersTree, nE as PublishFooter, qT as PublishHistoryList, ZT as PublishPanel, sE as StandalonePublishPanel, rn as collectFolderKeys, Kt as derivePublishState, Qt as filterFolderTree, Jt as formatPublishedDate, on as fromFolderPathKey, dn as getSiblingFolderNames, un as getUniqueFolderName, nn as mergeFolderPaths, en as sortFolderTree, sn as toDialFileTree, an as toFolderPathKey, Zt as usePublishFlow, ln as validateFolderName };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-publish-panel",
|
|
3
3
|
"description": "Publish-to-folder UI and state flow shared by catalog entity publish and conversation publish",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.423",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^19.0.0",
|
|
25
25
|
"@tabler/icons-react": "^3.0.0",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.423",
|
|
27
27
|
"@epam/ai-dial-ui-kit": "*",
|
|
28
28
|
"@epam/ai-dial-react-file-manager": "^0.2.0-dev.10"
|
|
29
29
|
},
|