@epam/ai-dial-publish-panel 1.3.0-dev.310 → 1.3.0-dev.317
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublishHistoryList.d.ts","sourceRoot":"","sources":["../../../src/components/PublishHistoryList/PublishHistoryList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI3D,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,sIAAsI;IACtI,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oHAAoH;IACpH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mIAAmI;IACnI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,iHAAiH;AACjH,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sFAAsF;IACtF,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wFAAwF;IACxF,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,iFAAiF;IACjF,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,oIAAoI;AACpI,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PublishHistoryList.d.ts","sourceRoot":"","sources":["../../../src/components/PublishHistoryList/PublishHistoryList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI3D,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,sIAAsI;IACtI,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oHAAoH;IACpH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mIAAmI;IACnI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,iHAAiH;AACjH,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sFAAsF;IACtF,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wFAAwF;IACxF,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,iFAAiF;IACjF,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,oIAAoI;AACpI,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA4F1D,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
2
|
-
import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, LiveRegion as g, LiveRegionElement as _, NeutralButton as v, Notification as
|
|
3
|
-
import { ResourceSummary as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { IconFolderPlus as
|
|
6
|
-
import { DialFileNodeType as
|
|
2
|
+
import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, LiveRegion as g, LiveRegionElement as _, NeutralButton as v, Notification as ee, NotificationType as y, NotificationVariant as b, Search as x, Select as S, SideDrawer as te, Spinner as C, Tag as w, TagInput as T } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { ResourceSummary as E, TAG_INPUT_TAG_CLASS_NAME as D, buildCssVars as O, mergeClasses as k } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
5
|
+
import { IconFolderPlus as ne, IconPlus as re, IconTrashX as ie } from "@tabler/icons-react";
|
|
6
|
+
import { DialFileNodeType as ae, DialFoldersTree as oe } from "@epam/ai-dial-react-file-manager";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var N = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), P = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
|
|
12
|
-
}({}),
|
|
13
|
-
calloutKind:
|
|
12
|
+
}({}), se = (e) => e.isSubmitting ? {
|
|
13
|
+
calloutKind: P.None,
|
|
14
14
|
isSubmitDisabled: !0,
|
|
15
15
|
isSubmitLoading: !0
|
|
16
16
|
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
|
|
17
|
-
calloutKind:
|
|
17
|
+
calloutKind: P.SubmitError,
|
|
18
18
|
isSubmitDisabled: !1,
|
|
19
19
|
isSubmitLoading: !1
|
|
20
20
|
} : e.hasExistingPublicationInFolder ? {
|
|
21
|
-
calloutKind:
|
|
21
|
+
calloutKind: P.ReplaceWarning,
|
|
22
22
|
isSubmitDisabled: e.allowReplace === !1,
|
|
23
23
|
isSubmitLoading: !1
|
|
24
24
|
} : {
|
|
25
|
-
calloutKind:
|
|
25
|
+
calloutKind: P.Info,
|
|
26
26
|
isSubmitDisabled: !1,
|
|
27
27
|
isSubmitLoading: !1
|
|
28
28
|
} : {
|
|
29
|
-
calloutKind:
|
|
29
|
+
calloutKind: P.NoAccess,
|
|
30
30
|
isSubmitDisabled: !0,
|
|
31
31
|
isSubmitLoading: !1
|
|
32
32
|
} : {
|
|
33
|
-
calloutKind:
|
|
33
|
+
calloutKind: P.None,
|
|
34
34
|
isSubmitDisabled: !0,
|
|
35
35
|
isSubmitLoading: !1
|
|
36
|
-
},
|
|
37
|
-
let r = Math.floor((t - e) /
|
|
36
|
+
}, F = 864e5, I = (e, t = Date.now(), n) => {
|
|
37
|
+
let r = Math.floor((t - e) / F);
|
|
38
38
|
return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
|
|
39
39
|
month: "short",
|
|
40
40
|
day: "numeric",
|
|
41
41
|
year: "numeric"
|
|
42
42
|
});
|
|
43
|
-
},
|
|
43
|
+
}, L = (e, t, n) => t.length === 0 ? [...e, {
|
|
44
44
|
path: [n],
|
|
45
45
|
name: n
|
|
46
46
|
}] : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
@@ -51,46 +51,46 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
51
51
|
}]
|
|
52
52
|
} : {
|
|
53
53
|
...e,
|
|
54
|
-
children: e.children ?
|
|
55
|
-
}),
|
|
54
|
+
children: e.children ? L(e.children, t, n) : e.children
|
|
55
|
+
}), R = (e, t, n) => {
|
|
56
56
|
let r = [...t, n].join("/");
|
|
57
57
|
return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
58
58
|
...e,
|
|
59
59
|
children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
|
|
60
60
|
} : {
|
|
61
61
|
...e,
|
|
62
|
-
children: e.children ?
|
|
62
|
+
children: e.children ? R(e.children, t, n) : e.children
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, z = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
|
|
65
65
|
let [m, h] = a(o);
|
|
66
66
|
t(() => {
|
|
67
67
|
h(o);
|
|
68
68
|
}, [o]);
|
|
69
|
-
let [g, _] = a(), [v,
|
|
69
|
+
let [g, _] = a(), [v, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [te, C] = a(!1), [w, T] = a(!1), [E, D] = a(c), [O, k] = a(!1), [A, j] = a(!1);
|
|
70
70
|
t(() => {
|
|
71
|
-
|
|
72
|
-
}, [c,
|
|
73
|
-
let
|
|
74
|
-
|
|
71
|
+
A || D(c);
|
|
72
|
+
}, [c, A]);
|
|
73
|
+
let M = e((e) => {
|
|
74
|
+
j(!0), D(e);
|
|
75
75
|
}, []);
|
|
76
76
|
t(() => {
|
|
77
77
|
if (g == null) {
|
|
78
|
-
|
|
78
|
+
S([]), T(!1);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
if (!p) return;
|
|
82
82
|
let e = !1;
|
|
83
|
-
return
|
|
84
|
-
e ||
|
|
83
|
+
return C(!0), T(!1), p(g).then((t) => {
|
|
84
|
+
e || S(t);
|
|
85
85
|
}).catch(() => {
|
|
86
|
-
e ||
|
|
86
|
+
e || T(!0);
|
|
87
87
|
}).finally(() => {
|
|
88
|
-
e ||
|
|
88
|
+
e || C(!1);
|
|
89
89
|
}), () => {
|
|
90
90
|
e = !0;
|
|
91
91
|
};
|
|
92
92
|
}, [g]);
|
|
93
|
-
let
|
|
93
|
+
let ne = r(() => {
|
|
94
94
|
if (!g) return !1;
|
|
95
95
|
let e = g.join("/");
|
|
96
96
|
return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
|
|
@@ -98,59 +98,59 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
98
98
|
i,
|
|
99
99
|
n.version,
|
|
100
100
|
g
|
|
101
|
-
]),
|
|
102
|
-
h((n) =>
|
|
101
|
+
]), re = e(async (e, t) => {
|
|
102
|
+
h((n) => L(n, e, t));
|
|
103
103
|
try {
|
|
104
104
|
await l?.(e, t);
|
|
105
105
|
} catch {
|
|
106
|
-
h((n) =>
|
|
106
|
+
h((n) => R(n, e, t)), b(!0);
|
|
107
107
|
}
|
|
108
|
-
}, [l]),
|
|
108
|
+
}, [l]), ie = e(async () => {
|
|
109
109
|
if (!g) return !1;
|
|
110
|
-
|
|
110
|
+
ee(!0), b(!1);
|
|
111
111
|
try {
|
|
112
|
-
return await u(n, g,
|
|
112
|
+
return await u(n, g, x, E.trim(), O), d?.(n, g), !0;
|
|
113
113
|
} catch (e) {
|
|
114
|
-
return
|
|
114
|
+
return b(!0), f?.(n, g, e), !1;
|
|
115
115
|
} finally {
|
|
116
|
-
|
|
116
|
+
ee(!1);
|
|
117
117
|
}
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
E,
|
|
120
120
|
n,
|
|
121
121
|
u,
|
|
122
122
|
f,
|
|
123
123
|
d,
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
O,
|
|
125
|
+
x,
|
|
126
126
|
g
|
|
127
|
-
]),
|
|
128
|
-
h(o), _(void 0),
|
|
127
|
+
]), ae = e(() => {
|
|
128
|
+
h(o), _(void 0), b(!1), S([]), T(!1), D(c), j(!1), k(!1);
|
|
129
129
|
}, [c, o]);
|
|
130
130
|
return {
|
|
131
131
|
folderItems: m,
|
|
132
132
|
selectedFolderPath: g,
|
|
133
133
|
setSelectedFolderPath: _,
|
|
134
|
-
handleCreateFolder:
|
|
135
|
-
hasExistingPublicationInFolder:
|
|
134
|
+
handleCreateFolder: re,
|
|
135
|
+
hasExistingPublicationInFolder: ne,
|
|
136
136
|
hasWriteAccess: !g || s(g),
|
|
137
137
|
isSubmitting: v,
|
|
138
|
-
hasSubmitError:
|
|
139
|
-
handleSubmit:
|
|
140
|
-
reset:
|
|
141
|
-
rules:
|
|
142
|
-
setRules:
|
|
143
|
-
author:
|
|
144
|
-
setAuthor:
|
|
145
|
-
publishCredentials:
|
|
146
|
-
setPublishCredentials:
|
|
147
|
-
isRulesLoading:
|
|
148
|
-
hasRulesLoadError:
|
|
138
|
+
hasSubmitError: y,
|
|
139
|
+
handleSubmit: ie,
|
|
140
|
+
reset: ae,
|
|
141
|
+
rules: x,
|
|
142
|
+
setRules: S,
|
|
143
|
+
author: E,
|
|
144
|
+
setAuthor: M,
|
|
145
|
+
publishCredentials: O,
|
|
146
|
+
setPublishCredentials: k,
|
|
147
|
+
isRulesLoading: te,
|
|
148
|
+
hasRulesLoadError: w
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, B = (e, t) => {
|
|
151
151
|
let n = t.trim().toLowerCase();
|
|
152
152
|
return n ? e.reduce((e, r) => {
|
|
153
|
-
let i = r.children ?
|
|
153
|
+
let i = r.children ? B(r.children, t) : void 0;
|
|
154
154
|
return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
|
|
155
155
|
...r,
|
|
156
156
|
children: i
|
|
@@ -217,7 +217,7 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
217
217
|
}
|
|
218
218
|
}, he = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = fe, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: g = {} }) => {
|
|
219
219
|
let _ = {
|
|
220
|
-
...
|
|
220
|
+
...O({
|
|
221
221
|
"--pare-mobile-bg": g.colors?.mobileBackground,
|
|
222
222
|
"--pare-bg": g.colors?.background,
|
|
223
223
|
"--pare-error-text": g.colors?.errorText,
|
|
@@ -227,103 +227,103 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
227
227
|
"--pare-select-border-focus": g.colors?.selectBorderFocus
|
|
228
228
|
}),
|
|
229
229
|
...g.cssVars
|
|
230
|
-
}, { sourceLabel:
|
|
230
|
+
}, { sourceLabel: ee = "Source", sourcePlaceholder: y = "Select...", functionLabel: b = "Function", equalOptionLabel: x = "Equal", containOptionLabel: te = "Contain", regexOptionLabel: C = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: E = "Add a target", targetsHintLabel: A = "Press Enter or comma to add a target.", patternLabel: ne = "Pattern", patternPlaceholder: re = "Enter a regular expression", invalidRegexError: ie = "Enter a valid regular expression.", requiredFieldError: ae = "This field is required.", targetsRequiredError: oe = "Add at least one target.", saveLabel: P = "Save", cancelLabel: se = "Cancel", dialogAriaLabel: F = "Add access rule" } = u, I = n(), L = n(), R = n(), z = n(), B = i(null);
|
|
231
231
|
t(() => {
|
|
232
|
-
|
|
232
|
+
B.current?.focus();
|
|
233
233
|
}, []);
|
|
234
|
-
let [V, ce] = a(), [H, U] = a(), [W, G] = a([]), [K, le] = a(""), [q, ue] = a(!1), [J, de] = a(""), [X, he] = a(!1), [Z, ge] = a(!1), _e =
|
|
234
|
+
let [V, ce] = a(), [H, U] = a(), [W, G] = a([]), [K, le] = a(""), [q, ue] = a(!1), [J, de] = a(""), [X, he] = a(!1), [Z, ge] = a(!1), _e = k(Y.selectField, q && Y.selectFieldOpen), ve = k(Y.selectField, X && Y.selectFieldOpen), Q = r(() => e.map((e) => ({
|
|
235
235
|
value: e,
|
|
236
236
|
label: e,
|
|
237
|
-
labelNode: J.trim() ? /* @__PURE__ */
|
|
237
|
+
labelNode: J.trim() ? /* @__PURE__ */ j(m, {
|
|
238
238
|
text: e,
|
|
239
239
|
query: J,
|
|
240
240
|
maxLines: 1
|
|
241
241
|
}) : void 0
|
|
242
242
|
})), [e, J]), ye = r(() => [
|
|
243
243
|
{
|
|
244
|
-
value:
|
|
245
|
-
label:
|
|
244
|
+
value: N.Equal,
|
|
245
|
+
label: x
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
value:
|
|
249
|
-
label:
|
|
248
|
+
value: N.Contain,
|
|
249
|
+
label: te
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
|
-
value:
|
|
253
|
-
label:
|
|
252
|
+
value: N.Regex,
|
|
253
|
+
label: C
|
|
254
254
|
}
|
|
255
255
|
], [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]), be = H ===
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
ref:
|
|
256
|
+
x,
|
|
257
|
+
te,
|
|
258
|
+
C
|
|
259
|
+
]), be = H === N.Regex, $ = me(K), xe = V != null && H != null && (be ? $ : W.length > 0);
|
|
260
|
+
return /* @__PURE__ */ M("div", {
|
|
261
|
+
ref: B,
|
|
262
262
|
role: "dialog",
|
|
263
263
|
"aria-modal": "true",
|
|
264
|
-
"aria-label":
|
|
264
|
+
"aria-label": F,
|
|
265
265
|
tabIndex: -1,
|
|
266
266
|
onKeyDown: (e) => {
|
|
267
267
|
e.key === "Escape" && (e.stopPropagation(), s());
|
|
268
268
|
},
|
|
269
269
|
style: _,
|
|
270
|
-
className:
|
|
270
|
+
className: k("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", Y.dialog),
|
|
271
271
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
id:
|
|
274
|
-
labelProps: { label:
|
|
272
|
+
/* @__PURE__ */ j(S, {
|
|
273
|
+
id: L,
|
|
274
|
+
labelProps: { label: ee },
|
|
275
275
|
options: Q,
|
|
276
276
|
value: V,
|
|
277
277
|
onChange: (e) => {
|
|
278
278
|
ce(Array.isArray(e) ? e[0] : e), ue(!1);
|
|
279
279
|
},
|
|
280
|
-
placeholder:
|
|
280
|
+
placeholder: y,
|
|
281
281
|
searchable: e.length > pe,
|
|
282
|
-
searchPlaceholder:
|
|
282
|
+
searchPlaceholder: y,
|
|
283
283
|
onSearchQueryChange: de,
|
|
284
284
|
disabled: c,
|
|
285
285
|
open: q,
|
|
286
286
|
onOpenChange: ue,
|
|
287
287
|
fieldClassName: _e,
|
|
288
288
|
invalid: Z && V == null,
|
|
289
|
-
error: Z && V == null ?
|
|
289
|
+
error: Z && V == null ? ae : void 0
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
labelProps: { label:
|
|
293
|
-
id:
|
|
291
|
+
/* @__PURE__ */ j(S, {
|
|
292
|
+
labelProps: { label: b },
|
|
293
|
+
id: R,
|
|
294
294
|
options: ye,
|
|
295
295
|
value: H,
|
|
296
296
|
onChange: (e) => {
|
|
297
297
|
let t = Array.isArray(e) ? e[0] : e;
|
|
298
|
-
H ===
|
|
298
|
+
H === N.Regex != (t === N.Regex) && (G([]), le("")), U(t), he(!1);
|
|
299
299
|
},
|
|
300
|
-
placeholder:
|
|
300
|
+
placeholder: b,
|
|
301
301
|
disabled: c,
|
|
302
302
|
open: X,
|
|
303
303
|
onOpenChange: he,
|
|
304
304
|
fieldClassName: ve,
|
|
305
305
|
invalid: Z && H == null,
|
|
306
|
-
error: Z && H == null ?
|
|
306
|
+
error: Z && H == null ? ae : void 0
|
|
307
307
|
}),
|
|
308
|
-
be ? /* @__PURE__ */
|
|
309
|
-
id: `${
|
|
310
|
-
labelProps: { label:
|
|
311
|
-
placeholder:
|
|
308
|
+
be ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(h, {
|
|
309
|
+
id: `${I}-input`,
|
|
310
|
+
labelProps: { label: ne },
|
|
311
|
+
placeholder: re,
|
|
312
312
|
value: K,
|
|
313
313
|
onChange: (e) => le(e ?? ""),
|
|
314
314
|
invalid: (K.length > 0 || Z) && !$,
|
|
315
|
-
"aria-describedby": (K.length > 0 || Z) && !$ ?
|
|
315
|
+
"aria-describedby": (K.length > 0 || Z) && !$ ? I : void 0,
|
|
316
316
|
disabled: c
|
|
317
|
-
}), (K.length > 0 || Z) && !$ && /* @__PURE__ */
|
|
318
|
-
id:
|
|
319
|
-
className:
|
|
320
|
-
text:
|
|
321
|
-
})] }) : /* @__PURE__ */
|
|
322
|
-
id:
|
|
323
|
-
labelProps: { label:
|
|
324
|
-
placeholder:
|
|
325
|
-
caption: Z && W.length === 0 ? void 0 :
|
|
326
|
-
error: Z && W.length === 0 ?
|
|
317
|
+
}), (K.length > 0 || Z) && !$ && /* @__PURE__ */ j(d, {
|
|
318
|
+
id: I,
|
|
319
|
+
className: k("mt-1 block", p, Y.error),
|
|
320
|
+
text: ie
|
|
321
|
+
})] }) : /* @__PURE__ */ j(T, {
|
|
322
|
+
id: z,
|
|
323
|
+
labelProps: { label: w },
|
|
324
|
+
placeholder: E,
|
|
325
|
+
caption: Z && W.length === 0 ? void 0 : A,
|
|
326
|
+
error: Z && W.length === 0 ? oe : void 0,
|
|
327
327
|
invalid: Z && W.length === 0,
|
|
328
328
|
value: W,
|
|
329
329
|
onChange: (e) => {
|
|
@@ -335,16 +335,16 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
335
335
|
G(t);
|
|
336
336
|
},
|
|
337
337
|
disabled: c,
|
|
338
|
-
tagClassName:
|
|
338
|
+
tagClassName: D
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ M("div", {
|
|
341
341
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
-
label:
|
|
342
|
+
children: [/* @__PURE__ */ j(f, {
|
|
343
|
+
label: se,
|
|
344
344
|
onClick: s,
|
|
345
345
|
disabled: c
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
label:
|
|
346
|
+
}), /* @__PURE__ */ j(v, {
|
|
347
|
+
label: P,
|
|
348
348
|
onClick: () => {
|
|
349
349
|
!xe || V == null || H == null ? ge(!0) : o({
|
|
350
350
|
source: V,
|
|
@@ -363,17 +363,17 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
363
363
|
hint: "_hint_nx0en_9",
|
|
364
364
|
loading: "_loading_nx0en_13",
|
|
365
365
|
ruleText: "_ruleText_nx0en_17"
|
|
366
|
-
}, ge = 20, _e = (e, t) => e ===
|
|
367
|
-
let
|
|
368
|
-
...
|
|
369
|
-
"--par-rule-bg":
|
|
370
|
-
"--par-heading-text":
|
|
371
|
-
"--par-hint-text":
|
|
372
|
-
"--par-loading-text":
|
|
373
|
-
"--par-rule-text":
|
|
366
|
+
}, ge = 20, _e = (e, t) => e === N.Equal ? t.equal : e === N.Contain ? t.contain : t.regex, ve = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: v = ge, maxTargetsPerRule: x, labels: S = {}, headingClassName: te = "dial-body-semi-text", hintClassName: w = "dial-small-text", loadingClassName: T = "dial-small-text", ruleTextClassName: E = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: A = {} }) => {
|
|
367
|
+
let ne = {
|
|
368
|
+
...O({
|
|
369
|
+
"--par-rule-bg": A.colors?.ruleBackground,
|
|
370
|
+
"--par-heading-text": A.colors?.headingText,
|
|
371
|
+
"--par-hint-text": A.colors?.hintText,
|
|
372
|
+
"--par-loading-text": A.colors?.loadingText,
|
|
373
|
+
"--par-rule-text": A.colors?.ruleText
|
|
374
374
|
}),
|
|
375
|
-
...
|
|
376
|
-
}, { heading:
|
|
375
|
+
...A.cssVars
|
|
376
|
+
}, { heading: ae = "Allow access if all match", folderScopeHint: oe = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: N = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: P = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: se = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: F = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: L = "Or", removeRuleAriaLabelTemplate: R = "Remove rule for {source}: {targets}", equalFunctionLabel: z = "Equal", containFunctionLabel: B = "Contain", regexFunctionLabel: V = "Regex", loadingLabel: ce = "Loading existing rules…", loadErrorLabel: H = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: U = "Rule added.", ruleRemovedAnnouncement: W = "Rule removed.", rulesClearedAnnouncement: G = "All rules cleared.", rulesLoadedAnnouncement: K = "Existing rules loaded for the selected folder.", editorLabels: le } = S, q = n(), [ue, J] = a(!1), [de, Y] = a(""), fe = i(null), X = i(m);
|
|
377
377
|
t(() => {
|
|
378
378
|
X.current && !m && e.length > 0 && Y(K), X.current = m;
|
|
379
379
|
}, [
|
|
@@ -392,72 +392,72 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
392
392
|
}, ye = () => {
|
|
393
393
|
r([]), Y(G);
|
|
394
394
|
}, be = {
|
|
395
|
-
equal:
|
|
396
|
-
contain:
|
|
395
|
+
equal: z,
|
|
396
|
+
contain: B,
|
|
397
397
|
regex: V
|
|
398
398
|
}, $ = e.length >= v, xe = d || $, Se = u != null && u !== "";
|
|
399
|
-
return /* @__PURE__ */
|
|
399
|
+
return /* @__PURE__ */ M("div", {
|
|
400
400
|
role: "group",
|
|
401
401
|
"aria-labelledby": q,
|
|
402
|
-
style:
|
|
403
|
-
className:
|
|
402
|
+
style: ne,
|
|
403
|
+
className: k(d && "pointer-events-none opacity-60"),
|
|
404
404
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ j(g, {
|
|
406
406
|
visuallyHidden: !0,
|
|
407
407
|
as: _.Span,
|
|
408
408
|
children: de
|
|
409
409
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ M("div", {
|
|
411
411
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ j("div", {
|
|
413
413
|
id: q,
|
|
414
|
-
className:
|
|
415
|
-
children:
|
|
416
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
414
|
+
className: k(te, Z.heading),
|
|
415
|
+
children: ae
|
|
416
|
+
}), e.length > 0 && /* @__PURE__ */ j(f, {
|
|
417
417
|
variant: o.Primary,
|
|
418
|
-
label:
|
|
418
|
+
label: I,
|
|
419
419
|
onClick: ye,
|
|
420
420
|
disabled: d
|
|
421
421
|
})]
|
|
422
422
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
className:
|
|
425
|
-
children: Se ?
|
|
423
|
+
/* @__PURE__ */ j("p", {
|
|
424
|
+
className: k("mb-2", w, Z.hint),
|
|
425
|
+
children: Se ? oe.replace("{folder}", u) : N
|
|
426
426
|
}),
|
|
427
|
-
e.length > 0 && !Se && /* @__PURE__ */
|
|
427
|
+
e.length > 0 && !Se && /* @__PURE__ */ j("div", {
|
|
428
428
|
className: "mb-2",
|
|
429
|
-
children: /* @__PURE__ */
|
|
430
|
-
type:
|
|
431
|
-
variant:
|
|
432
|
-
message:
|
|
429
|
+
children: /* @__PURE__ */ j(ee, {
|
|
430
|
+
type: y.SectionMessage,
|
|
431
|
+
variant: b.Warning,
|
|
432
|
+
message: P
|
|
433
433
|
})
|
|
434
434
|
}),
|
|
435
|
-
m && /* @__PURE__ */
|
|
436
|
-
className:
|
|
437
|
-
children: [/* @__PURE__ */
|
|
435
|
+
m && /* @__PURE__ */ M("div", {
|
|
436
|
+
className: k("mb-2 flex items-center gap-2", T, Z.loading),
|
|
437
|
+
children: [/* @__PURE__ */ j(C, {
|
|
438
438
|
size: 16,
|
|
439
439
|
ariaLabel: ce
|
|
440
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ j("span", { children: ce })]
|
|
441
441
|
}),
|
|
442
|
-
h && /* @__PURE__ */
|
|
442
|
+
h && /* @__PURE__ */ j("div", {
|
|
443
443
|
className: "mb-2",
|
|
444
|
-
children: /* @__PURE__ */
|
|
445
|
-
type:
|
|
446
|
-
variant:
|
|
444
|
+
children: /* @__PURE__ */ j(ee, {
|
|
445
|
+
type: y.SectionMessage,
|
|
446
|
+
variant: b.Warning,
|
|
447
447
|
message: H
|
|
448
448
|
})
|
|
449
449
|
}),
|
|
450
|
-
e.length > 0 && /* @__PURE__ */
|
|
450
|
+
e.length > 0 && /* @__PURE__ */ j("ul", {
|
|
451
451
|
className: "mb-3 flex flex-col gap-2",
|
|
452
452
|
children: e.map((e, t) => {
|
|
453
|
-
let n = e.targets.join(` ${
|
|
454
|
-
return /* @__PURE__ */
|
|
455
|
-
className:
|
|
456
|
-
children: [/* @__PURE__ */
|
|
457
|
-
className:
|
|
453
|
+
let n = e.targets.join(` ${L} `), r = R.replace("{source}", e.source).replace("{targets}", n);
|
|
454
|
+
return /* @__PURE__ */ M("li", {
|
|
455
|
+
className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Z.ruleRow),
|
|
456
|
+
children: [/* @__PURE__ */ M("span", {
|
|
457
|
+
className: k("truncate", E, Z.ruleText),
|
|
458
458
|
children: [
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
className:
|
|
459
|
+
/* @__PURE__ */ j("span", {
|
|
460
|
+
className: D,
|
|
461
461
|
children: e.source
|
|
462
462
|
}),
|
|
463
463
|
" ",
|
|
@@ -465,8 +465,8 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
465
465
|
": ",
|
|
466
466
|
n
|
|
467
467
|
]
|
|
468
|
-
}), /* @__PURE__ */
|
|
469
|
-
icon: /* @__PURE__ */
|
|
468
|
+
}), /* @__PURE__ */ j(p, {
|
|
469
|
+
icon: /* @__PURE__ */ j(ie, {
|
|
470
470
|
size: c.SM,
|
|
471
471
|
"aria-hidden": !0,
|
|
472
472
|
stroke: l
|
|
@@ -478,20 +478,20 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
478
478
|
}, t);
|
|
479
479
|
})
|
|
480
480
|
}),
|
|
481
|
-
ue && /* @__PURE__ */
|
|
481
|
+
ue && /* @__PURE__ */ j(he, {
|
|
482
482
|
sourceOptions: s,
|
|
483
483
|
onSave: ve,
|
|
484
484
|
onCancel: me,
|
|
485
485
|
disabled: d,
|
|
486
|
-
maxTargets:
|
|
486
|
+
maxTargets: x,
|
|
487
487
|
labels: le,
|
|
488
|
-
styles:
|
|
488
|
+
styles: A.editor
|
|
489
489
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ j("div", {
|
|
491
491
|
className: "flex flex-wrap items-center gap-2",
|
|
492
|
-
children: /* @__PURE__ */
|
|
493
|
-
label:
|
|
494
|
-
iconBefore: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ j(f, {
|
|
493
|
+
label: F,
|
|
494
|
+
iconBefore: /* @__PURE__ */ j(re, {
|
|
495
495
|
size: c.SM,
|
|
496
496
|
"aria-hidden": !0,
|
|
497
497
|
stroke: l
|
|
@@ -500,9 +500,9 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
500
500
|
disabled: xe
|
|
501
501
|
})
|
|
502
502
|
}),
|
|
503
|
-
$ && /* @__PURE__ */
|
|
504
|
-
className:
|
|
505
|
-
children:
|
|
503
|
+
$ && /* @__PURE__ */ j("p", {
|
|
504
|
+
className: k("mt-2", w, Z.hint),
|
|
505
|
+
children: se.replace("{max}", String(v))
|
|
506
506
|
})
|
|
507
507
|
]
|
|
508
508
|
});
|
|
@@ -514,7 +514,7 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
514
514
|
emptyState: "_emptyState_d0adf_21",
|
|
515
515
|
stripedRow: "_stripedRow_d0adf_25"
|
|
516
516
|
}, ye = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
|
|
517
|
-
let m =
|
|
517
|
+
let m = O({
|
|
518
518
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
519
519
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
520
520
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -525,99 +525,95 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
525
525
|
"--phl-date-text": p?.dateText,
|
|
526
526
|
"--phl-empty-text": p?.emptyStateText,
|
|
527
527
|
"--phl-striped-bg": p?.stripedBackground
|
|
528
|
-
}), h =
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
style: m,
|
|
540
|
-
className: h,
|
|
541
|
-
children: s
|
|
542
|
-
}) : /* @__PURE__ */ M("ul", {
|
|
528
|
+
}), h = k(f, Q.emptyState);
|
|
529
|
+
if (n || r || e.length === 0) {
|
|
530
|
+
let e = s;
|
|
531
|
+
return n ? e = c : r && (e = l), /* @__PURE__ */ j(g, {
|
|
532
|
+
as: _.P,
|
|
533
|
+
style: m,
|
|
534
|
+
className: h,
|
|
535
|
+
children: e
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
return /* @__PURE__ */ j("ul", {
|
|
543
539
|
style: m,
|
|
544
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
545
|
-
className:
|
|
546
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: e.map((e, n) => /* @__PURE__ */ M("li", {
|
|
541
|
+
className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
|
|
542
|
+
children: [/* @__PURE__ */ M("span", {
|
|
547
543
|
className: "flex min-w-0 items-center gap-2",
|
|
548
544
|
style: m,
|
|
549
545
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
className:
|
|
546
|
+
/* @__PURE__ */ M("span", {
|
|
547
|
+
className: k(u, Q.version),
|
|
552
548
|
children: [
|
|
553
549
|
i,
|
|
554
550
|
" ",
|
|
555
551
|
e.version
|
|
556
552
|
]
|
|
557
553
|
}),
|
|
558
|
-
e.version === t && /* @__PURE__ */
|
|
554
|
+
e.version === t && /* @__PURE__ */ j(w, {
|
|
559
555
|
label: a,
|
|
560
|
-
className:
|
|
556
|
+
className: k("shrink-0 whitespace-nowrap", Q.currentBadge)
|
|
561
557
|
}),
|
|
562
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
558
|
+
e.publishCredentials === !0 && /* @__PURE__ */ j(w, {
|
|
563
559
|
label: o,
|
|
564
|
-
className:
|
|
560
|
+
className: k("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
|
|
565
561
|
})
|
|
566
562
|
]
|
|
567
|
-
}), /* @__PURE__ */
|
|
568
|
-
className:
|
|
569
|
-
children:
|
|
563
|
+
}), /* @__PURE__ */ j("span", {
|
|
564
|
+
className: k(d, Q.date),
|
|
565
|
+
children: I(e.publishedAt)
|
|
570
566
|
})]
|
|
571
567
|
}, `${e.version}-${n}`))
|
|
572
568
|
});
|
|
573
569
|
}, be = {
|
|
574
570
|
divider: "_divider_1gs31_1",
|
|
575
571
|
tree: "_tree_1gs31_17"
|
|
576
|
-
}, $ = "data-cancel-creating-folder", xe = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError:
|
|
577
|
-
let
|
|
578
|
-
...
|
|
579
|
-
...
|
|
580
|
-
}, [
|
|
572
|
+
}, $ = "data-cancel-creating-folder", xe = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError: ee = "Folder name cannot be empty.", invalidFolderNameError: y = "Folder name contains invalid characters.", duplicateFolderNameError: b = "A folder with this name already exists.", rootLabel: x = "Organization", expandedPaths: S, onExpandedPathsChange: te, loadingPaths: C, styles: w = {} }) => {
|
|
573
|
+
let T = {
|
|
574
|
+
...O({ "--pft-divider": w.colors?.divider }),
|
|
575
|
+
...w.cssVars
|
|
576
|
+
}, [E, D] = a(() => new Set(n?.map((e, t) => G(n.slice(0, t + 1))) ?? [])), A = S ?? E, ie = (e) => {
|
|
581
577
|
let t = new Set(e);
|
|
582
|
-
t.delete(""),
|
|
583
|
-
}, [
|
|
578
|
+
t.delete(""), te ? te(t) : D(t);
|
|
579
|
+
}, [N, P] = a(null), [se, F] = a(_), I = i(null), L = i(!1);
|
|
584
580
|
t(() => {
|
|
585
581
|
let e = (e) => {
|
|
586
|
-
e.target instanceof Element && e.target.closest(`[${$}]`) && (
|
|
582
|
+
e.target instanceof Element && e.target.closest(`[${$}]`) && (L.current = !0);
|
|
587
583
|
};
|
|
588
584
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
589
585
|
}, []);
|
|
590
|
-
let
|
|
586
|
+
let R = u.trim(), z = N != null, V = r(() => B(e, u), [e, u]), H = R.length > 0 && V.length === 0, U = !z && R.length > 0, q = r(() => ce(U ? V : e), [
|
|
591
587
|
U,
|
|
592
588
|
V,
|
|
593
589
|
e
|
|
594
|
-
]), Y = r(() => /* @__PURE__ */ new Set(["", ...W(q)]), [q]), fe = r(() => /* @__PURE__ */ new Set(["", ...U ? Y :
|
|
590
|
+
]), Y = r(() => /* @__PURE__ */ new Set(["", ...W(q)]), [q]), fe = r(() => /* @__PURE__ */ new Set(["", ...U ? Y : A]), [
|
|
595
591
|
U,
|
|
596
592
|
Y,
|
|
597
|
-
|
|
593
|
+
A
|
|
598
594
|
]), X = r(() => le(q), [q]), pe = r(() => U && X.length === 0 ? [] : [{
|
|
599
595
|
path: "",
|
|
600
|
-
name:
|
|
596
|
+
name: x,
|
|
601
597
|
folderId: "",
|
|
602
|
-
nodeType:
|
|
598
|
+
nodeType: ae.FOLDER,
|
|
603
599
|
items: X
|
|
604
600
|
}], [
|
|
605
601
|
X,
|
|
606
|
-
|
|
602
|
+
x,
|
|
607
603
|
U
|
|
608
|
-
]), me =
|
|
609
|
-
empty:
|
|
610
|
-
invalid:
|
|
611
|
-
duplicate:
|
|
612
|
-
}, Z = (t) => J(H && ue(
|
|
613
|
-
|
|
604
|
+
]), me = N ? G(N) : null, he = {
|
|
605
|
+
empty: ee,
|
|
606
|
+
invalid: y,
|
|
607
|
+
duplicate: b
|
|
608
|
+
}, Z = (t) => J(H && ue(R, [], he) == null ? R : _, de(e, t)), ge = (e) => {
|
|
609
|
+
P(e), F(Z(e)), I.current = null, L.current = !1;
|
|
614
610
|
let t = G(e);
|
|
615
|
-
t &&
|
|
611
|
+
t && ie(new Set(A).add(t));
|
|
616
612
|
}, _e = () => ge(n ?? []), ve = (e) => {
|
|
617
613
|
let t = K(e.path), n = [{
|
|
618
614
|
key: "add-child",
|
|
619
615
|
label: g,
|
|
620
|
-
icon: /* @__PURE__ */
|
|
616
|
+
icon: /* @__PURE__ */ j(ne, {
|
|
621
617
|
size: c.SM,
|
|
622
618
|
"aria-hidden": !0,
|
|
623
619
|
stroke: l
|
|
@@ -627,7 +623,7 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
627
623
|
return e.path !== "" && n.push({
|
|
628
624
|
key: "add-sibling",
|
|
629
625
|
label: h,
|
|
630
|
-
icon: /* @__PURE__ */
|
|
626
|
+
icon: /* @__PURE__ */ j(re, {
|
|
631
627
|
size: c.SM,
|
|
632
628
|
"aria-hidden": !0,
|
|
633
629
|
stroke: l
|
|
@@ -635,55 +631,55 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
635
631
|
onClick: () => ge(t.slice(0, -1))
|
|
636
632
|
}), n;
|
|
637
633
|
}, Q = (t) => {
|
|
638
|
-
if (!
|
|
639
|
-
let n = ue(t, de(e,
|
|
640
|
-
return
|
|
634
|
+
if (!N) return null;
|
|
635
|
+
let n = ue(t, de(e, N), he);
|
|
636
|
+
return I.current = n, n;
|
|
641
637
|
}, ye = (e) => {
|
|
642
|
-
if (!
|
|
643
|
-
let t = e.trim(), n =
|
|
644
|
-
(Q(e) ?? n) || (s(
|
|
645
|
-
}, xe = () =>
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
style:
|
|
648
|
-
className:
|
|
638
|
+
if (!N || L.current) return;
|
|
639
|
+
let t = e.trim(), n = I.current;
|
|
640
|
+
(Q(e) ?? n) || (s(N, t), o([...N, t])), P(null);
|
|
641
|
+
}, xe = () => P(null);
|
|
642
|
+
return /* @__PURE__ */ M("div", {
|
|
643
|
+
style: T,
|
|
644
|
+
className: k(d && "pointer-events-none opacity-60", w.className),
|
|
649
645
|
children: [
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
className:
|
|
652
|
-
children: /* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ j("div", {
|
|
647
|
+
className: k("w-full max-w-full min-w-0", be.tree),
|
|
648
|
+
children: /* @__PURE__ */ j(oe, {
|
|
653
649
|
items: pe,
|
|
654
650
|
showFiles: !1,
|
|
655
651
|
selectedPath: n == null ? void 0 : G(n),
|
|
656
652
|
expandedPaths: fe,
|
|
657
|
-
onExpandedPathsChange:
|
|
658
|
-
loadingPaths:
|
|
653
|
+
onExpandedPathsChange: ie,
|
|
654
|
+
loadingPaths: C,
|
|
659
655
|
onItemClick: (e) => {
|
|
660
656
|
o(n != null && G(n) === e.path ? void 0 : K(e.path));
|
|
661
657
|
},
|
|
662
658
|
getContextMenuItems: ve,
|
|
663
659
|
createdFolderPath: me,
|
|
664
|
-
newFolderDefaultName:
|
|
660
|
+
newFolderDefaultName: se,
|
|
665
661
|
onCreateFolderSave: ye,
|
|
666
662
|
onCreateFolderCancel: xe,
|
|
667
663
|
onRenameValidate: (e) => Q(e),
|
|
668
|
-
emptyStateTitle: U ? v.replace("{query}",
|
|
664
|
+
emptyStateTitle: U ? v.replace("{query}", R) : void 0
|
|
669
665
|
})
|
|
670
666
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
-
className:
|
|
667
|
+
/* @__PURE__ */ j("div", {
|
|
668
|
+
className: k("my-2 h-px", be.divider),
|
|
673
669
|
"aria-hidden": !0
|
|
674
670
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ M("div", {
|
|
676
672
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ j(f, {
|
|
678
674
|
onClick: _e,
|
|
679
675
|
label: p,
|
|
680
|
-
iconBefore: /* @__PURE__ */
|
|
676
|
+
iconBefore: /* @__PURE__ */ j(re, {
|
|
681
677
|
size: c.SM,
|
|
682
678
|
"aria-hidden": !0,
|
|
683
679
|
stroke: l
|
|
684
680
|
}),
|
|
685
|
-
disabled: d ||
|
|
686
|
-
}),
|
|
681
|
+
disabled: d || z
|
|
682
|
+
}), z && /* @__PURE__ */ j(f, {
|
|
687
683
|
label: m,
|
|
688
684
|
onClick: xe,
|
|
689
685
|
disabled: d,
|
|
@@ -695,22 +691,22 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
695
691
|
}, Se = { panel: "dial-publish-panel-panel" }, Ce = {
|
|
696
692
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
697
693
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
698
|
-
}, we = 200, Te = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: _ = !1, allowReplace: v = !0, author:
|
|
699
|
-
let { colors:
|
|
700
|
-
...
|
|
701
|
-
"--pp-summary-title-text":
|
|
702
|
-
"--pp-heading-text":
|
|
694
|
+
}, we = 200, Te = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: _ = !1, allowReplace: v = !0, author: b, onAuthorChange: S, publishCredentials: te = !1, onPublishCredentialsChange: C, rules: w, onRulesChange: T, ruleSourceOptions: D, isRulesLoading: A = !1, hasRulesLoadError: ne = !1, labels: re = {}, summaryTitleClassName: ie = "dial-body-semi-text", headingClassName: ae = "dial-body-semi-text", calloutFolderNameClassName: oe = "dial-small-paragraph-semi-text", styles: N = {} }) => {
|
|
695
|
+
let { colors: F, folderTree: I, accessRules: L } = N, R = {
|
|
696
|
+
...O({
|
|
697
|
+
"--pp-summary-title-text": F?.summaryTitleText,
|
|
698
|
+
"--pp-heading-text": F?.headingText
|
|
703
699
|
}),
|
|
704
|
-
...
|
|
705
|
-
},
|
|
706
|
-
border:
|
|
707
|
-
background:
|
|
708
|
-
versionTagBorder:
|
|
709
|
-
versionTagBackground:
|
|
710
|
-
versionTagText:
|
|
711
|
-
}, { folderLabel:
|
|
700
|
+
...N.cssVars
|
|
701
|
+
}, z = {
|
|
702
|
+
border: F?.summaryBorder,
|
|
703
|
+
background: F?.summaryBackground,
|
|
704
|
+
versionTagBorder: F?.summaryVersionTagBorder,
|
|
705
|
+
versionTagBackground: F?.summaryVersionTagBackground,
|
|
706
|
+
versionTagText: F?.summaryVersionTagText
|
|
707
|
+
}, { folderLabel: B = "Publish to folder", replaceWarning: V = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ce = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: H = "Publishing failed. Please try again.", folderEmptyStateLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: G, cancelCreatingFolderLabel: K, createFolderEmptyNameError: le, createFolderInvalidNameError: q, createFolderDuplicateNameError: ue, rootFolderLabel: J = "Organization", summaryVersionLabel: de, accessRulesLabels: Y, searchPlaceholder: fe, clearSearchAriaLabel: X, authorLabel: pe = "Author", authorPlaceholder: me = "Author name", authorHint: he = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Z = "Publish with my credentials", credentialsHint: ge = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = re, [_e, Q] = a(""), ye = n(), be = (e) => {
|
|
712
708
|
Q(e ?? "");
|
|
713
|
-
}, $ = o != null, Te = r(() =>
|
|
709
|
+
}, $ = o != null, Te = r(() => se({
|
|
714
710
|
hasSelectedFolder: $,
|
|
715
711
|
hasExistingPublicationInFolder: p,
|
|
716
712
|
hasWriteAccess: m,
|
|
@@ -724,17 +720,17 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
724
720
|
g,
|
|
725
721
|
_,
|
|
726
722
|
v
|
|
727
|
-
]), De = $ ? o[o.length - 1] ?? J : "", ke = t ? t() : /* @__PURE__ */
|
|
728
|
-
className:
|
|
723
|
+
]), De = $ ? o[o.length - 1] ?? J : "", ke = t ? t() : /* @__PURE__ */ j("span", {
|
|
724
|
+
className: k("truncate", ie, Ce.summaryTitle),
|
|
729
725
|
children: e?.title
|
|
730
726
|
});
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
className:
|
|
733
|
-
style:
|
|
734
|
-
children: [e?.type == null ? /* @__PURE__ */
|
|
735
|
-
colors:
|
|
727
|
+
return /* @__PURE__ */ M("div", {
|
|
728
|
+
className: k("flex flex-col gap-5", Se.panel),
|
|
729
|
+
style: R,
|
|
730
|
+
children: [e?.type == null ? /* @__PURE__ */ j(E, {
|
|
731
|
+
colors: z,
|
|
736
732
|
children: ke
|
|
737
|
-
}) : /* @__PURE__ */
|
|
733
|
+
}) : /* @__PURE__ */ j(E, {
|
|
738
734
|
item: {
|
|
739
735
|
type: e.type,
|
|
740
736
|
name: e.title,
|
|
@@ -742,16 +738,16 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
742
738
|
iconUrl: e.iconUrl
|
|
743
739
|
},
|
|
744
740
|
versionLabel: de,
|
|
745
|
-
colors:
|
|
746
|
-
}), /* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
748
|
-
className:
|
|
749
|
-
children:
|
|
741
|
+
colors: z
|
|
742
|
+
}), /* @__PURE__ */ M("div", { children: [
|
|
743
|
+
/* @__PURE__ */ j("div", {
|
|
744
|
+
className: k("mb-2", ae, Ce.sectionHeading),
|
|
745
|
+
children: B
|
|
750
746
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ j("div", {
|
|
752
748
|
role: "search",
|
|
753
749
|
className: "mb-3",
|
|
754
|
-
children: /* @__PURE__ */
|
|
750
|
+
children: /* @__PURE__ */ j(x, {
|
|
755
751
|
value: _e,
|
|
756
752
|
onChange: be,
|
|
757
753
|
placeholder: fe,
|
|
@@ -759,7 +755,7 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
759
755
|
"aria-label": fe
|
|
760
756
|
})
|
|
761
757
|
}),
|
|
762
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ j(xe, {
|
|
763
759
|
items: i,
|
|
764
760
|
selectedPath: o,
|
|
765
761
|
onSelectedPathChange: c,
|
|
@@ -777,12 +773,12 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
777
773
|
invalidFolderNameError: q,
|
|
778
774
|
duplicateFolderNameError: ue,
|
|
779
775
|
rootLabel: J,
|
|
780
|
-
styles:
|
|
776
|
+
styles: I
|
|
781
777
|
}),
|
|
782
|
-
Te.calloutKind !==
|
|
778
|
+
Te.calloutKind !== P.None && Te.calloutKind !== P.Info && /* @__PURE__ */ j("div", {
|
|
783
779
|
className: "mt-3",
|
|
784
|
-
children: /* @__PURE__ */
|
|
785
|
-
type:
|
|
780
|
+
children: /* @__PURE__ */ j(ee, {
|
|
781
|
+
type: y.SectionMessage,
|
|
786
782
|
variant: Ee(Te.calloutKind),
|
|
787
783
|
message: Oe(Te.calloutKind, {
|
|
788
784
|
replaceWarning: V,
|
|
@@ -790,74 +786,74 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
790
786
|
submitError: H,
|
|
791
787
|
folderName: De,
|
|
792
788
|
version: e?.version,
|
|
793
|
-
folderNameClassName:
|
|
789
|
+
folderNameClassName: oe
|
|
794
790
|
})
|
|
795
791
|
})
|
|
796
792
|
}),
|
|
797
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ j("div", {
|
|
798
794
|
className: "mt-4",
|
|
799
|
-
children: /* @__PURE__ */
|
|
795
|
+
children: /* @__PURE__ */ j(h, {
|
|
800
796
|
id: ye,
|
|
801
797
|
labelProps: { label: pe },
|
|
802
798
|
placeholder: me,
|
|
803
799
|
caption: he,
|
|
804
|
-
value:
|
|
805
|
-
onChange: (e) =>
|
|
800
|
+
value: b,
|
|
801
|
+
onChange: (e) => S(e ?? ""),
|
|
806
802
|
maxLength: we,
|
|
807
803
|
disabled: g
|
|
808
804
|
})
|
|
809
805
|
}),
|
|
810
|
-
|
|
806
|
+
C != null && /* @__PURE__ */ j("div", {
|
|
811
807
|
className: "mt-4",
|
|
812
|
-
children: /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ j(s, {
|
|
813
809
|
labelProps: { label: Z },
|
|
814
810
|
caption: ge,
|
|
815
|
-
isSelected:
|
|
816
|
-
onChange:
|
|
811
|
+
isSelected: te,
|
|
812
|
+
onChange: C,
|
|
817
813
|
disabled: g
|
|
818
814
|
})
|
|
819
815
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ j("div", {
|
|
821
817
|
className: "mt-4",
|
|
822
|
-
children: /* @__PURE__ */
|
|
823
|
-
rules:
|
|
824
|
-
onRulesChange:
|
|
825
|
-
sourceOptions:
|
|
818
|
+
children: /* @__PURE__ */ j(ve, {
|
|
819
|
+
rules: w,
|
|
820
|
+
onRulesChange: T,
|
|
821
|
+
sourceOptions: D,
|
|
826
822
|
folderName: $ ? De : void 0,
|
|
827
823
|
disabled: g,
|
|
828
|
-
isLoading:
|
|
829
|
-
hasLoadError:
|
|
824
|
+
isLoading: A,
|
|
825
|
+
hasLoadError: ne,
|
|
830
826
|
labels: Y,
|
|
831
|
-
styles:
|
|
827
|
+
styles: L
|
|
832
828
|
})
|
|
833
829
|
})
|
|
834
830
|
] })]
|
|
835
831
|
});
|
|
836
|
-
}, Ee = (e) => e ===
|
|
832
|
+
}, Ee = (e) => e === P.ReplaceWarning ? b.Warning : b.Error, De = (e, t, n) => {
|
|
837
833
|
let [r, i, ...a] = e.split("{folder}");
|
|
838
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
834
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ M(A, { children: [
|
|
839
835
|
r,
|
|
840
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ j("strong", {
|
|
841
837
|
className: n,
|
|
842
838
|
children: t
|
|
843
839
|
}),
|
|
844
840
|
i
|
|
845
841
|
] });
|
|
846
|
-
}, Oe = (e, t) => e ===
|
|
847
|
-
let u =
|
|
848
|
-
return /* @__PURE__ */
|
|
842
|
+
}, Oe = (e, t) => e === P.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === P.NoAccess ? De(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, ke = { footer: "_footer_dks1v_1" }, Ae = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
|
|
843
|
+
let u = O({ "--pf-border": l?.border }), { cancelLabel: d = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: h = "Publishing…" } = s, g = i ? h : n && t && e != null ? m.replace("{version}", e) : p;
|
|
844
|
+
return /* @__PURE__ */ M("div", {
|
|
849
845
|
style: u,
|
|
850
|
-
className:
|
|
851
|
-
children: [/* @__PURE__ */
|
|
846
|
+
className: k("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", ke.footer),
|
|
847
|
+
children: [/* @__PURE__ */ j(f, {
|
|
852
848
|
label: d,
|
|
853
849
|
className: "mobile:flex-1",
|
|
854
850
|
disabled: i,
|
|
855
851
|
onClick: a
|
|
856
|
-
}), /* @__PURE__ */
|
|
852
|
+
}), /* @__PURE__ */ j(v, {
|
|
857
853
|
label: g,
|
|
858
854
|
className: "mobile:flex-1",
|
|
859
855
|
disabled: r,
|
|
860
|
-
iconBefore: i ? /* @__PURE__ */
|
|
856
|
+
iconBefore: i ? /* @__PURE__ */ j(C, { size: c.SM }) : void 0,
|
|
861
857
|
onClick: o
|
|
862
858
|
})]
|
|
863
859
|
});
|
|
@@ -867,15 +863,15 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
867
863
|
divider: "_divider_16jmd_15",
|
|
868
864
|
content: "_content_16jmd_19",
|
|
869
865
|
title: "_title_16jmd_24"
|
|
870
|
-
}, Me = ({ isOpen: e, resource: n, renderSummary: i, 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, author: v, onAuthorChange:
|
|
871
|
-
let
|
|
872
|
-
"--spp-backdrop-bg":
|
|
873
|
-
"--spp-panel-bg":
|
|
874
|
-
"--spp-panel-border":
|
|
875
|
-
"--spp-divider-border":
|
|
876
|
-
"--spp-scrollbar-thumb":
|
|
877
|
-
"--spp-title-text":
|
|
878
|
-
}), [
|
|
866
|
+
}, Me = ({ isOpen: e, resource: n, renderSummary: i, 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, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: A, panelSummaryTitleClassName: ne, panelHeadingClassName: re, panelCalloutFolderNameClassName: ie, footerLabels: ae, labels: oe = {}, titleClassName: N = "dial-body-semi-text", colors: P }) => {
|
|
867
|
+
let F = O({
|
|
868
|
+
"--spp-backdrop-bg": P?.backdropBackground,
|
|
869
|
+
"--spp-panel-bg": P?.panelBackground,
|
|
870
|
+
"--spp-panel-border": P?.panelBorder,
|
|
871
|
+
"--spp-divider-border": P?.dividerBorder,
|
|
872
|
+
"--spp-scrollbar-thumb": P?.scrollbarThumb,
|
|
873
|
+
"--spp-title-text": P?.titleText
|
|
874
|
+
}), [I, L] = a(null), { title: R = "Publish", ariaLabel: z = "Publish", closeAriaLabel: B = "Close" } = oe, V = r(() => se({
|
|
879
875
|
hasSelectedFolder: s != null,
|
|
880
876
|
hasExistingPublicationInFolder: p,
|
|
881
877
|
hasWriteAccess: m,
|
|
@@ -891,7 +887,7 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
891
887
|
_
|
|
892
888
|
]);
|
|
893
889
|
return t(() => {
|
|
894
|
-
let t =
|
|
890
|
+
let t = I?.closest("[role=\"dialog\"]");
|
|
895
891
|
if (!e || !t) return;
|
|
896
892
|
let n = () => t.focus({ preventScroll: !0 });
|
|
897
893
|
n();
|
|
@@ -901,36 +897,36 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
901
897
|
document.addEventListener("focusin", r);
|
|
902
898
|
let i = requestAnimationFrame(() => {
|
|
903
899
|
document.removeEventListener("focusin", r);
|
|
904
|
-
}), a =
|
|
900
|
+
}), a = T?.current;
|
|
905
901
|
return () => {
|
|
906
902
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
907
903
|
};
|
|
908
904
|
}, [
|
|
909
905
|
e,
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
]), /* @__PURE__ */
|
|
906
|
+
I,
|
|
907
|
+
T
|
|
908
|
+
]), /* @__PURE__ */ M(te, {
|
|
913
909
|
open: e,
|
|
914
|
-
onClose:
|
|
915
|
-
header: /* @__PURE__ */
|
|
916
|
-
className:
|
|
917
|
-
children:
|
|
910
|
+
onClose: w,
|
|
911
|
+
header: /* @__PURE__ */ j("span", {
|
|
912
|
+
className: k("block truncate text-center", N, je.title),
|
|
913
|
+
children: R
|
|
918
914
|
}),
|
|
919
|
-
ariaLabel:
|
|
920
|
-
closeAriaLabel:
|
|
915
|
+
ariaLabel: z,
|
|
916
|
+
closeAriaLabel: B,
|
|
921
917
|
closeDisabled: h,
|
|
922
|
-
style:
|
|
923
|
-
overlayStyle:
|
|
924
|
-
className:
|
|
918
|
+
style: F,
|
|
919
|
+
overlayStyle: F,
|
|
920
|
+
className: k(je.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
925
921
|
overlayClassName: je.backdrop,
|
|
926
|
-
headerClassName:
|
|
922
|
+
headerClassName: k("px-[22px]", je.divider),
|
|
927
923
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
928
|
-
children: [/* @__PURE__ */
|
|
929
|
-
ref:
|
|
930
|
-
className:
|
|
931
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: [/* @__PURE__ */ j("div", {
|
|
925
|
+
ref: L,
|
|
926
|
+
className: k("min-h-0 flex-1 overflow-y-auto", je.content),
|
|
927
|
+
children: /* @__PURE__ */ j("div", {
|
|
932
928
|
className: "p-[22px]",
|
|
933
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ j(Te, {
|
|
934
930
|
resource: n,
|
|
935
931
|
renderSummary: i,
|
|
936
932
|
folderItems: o,
|
|
@@ -946,30 +942,30 @@ var P = /* @__PURE__ */ function(e) {
|
|
|
946
942
|
hasSubmitError: g,
|
|
947
943
|
allowReplace: _,
|
|
948
944
|
author: v,
|
|
949
|
-
onAuthorChange:
|
|
950
|
-
rules:
|
|
951
|
-
onRulesChange:
|
|
952
|
-
ruleSourceOptions:
|
|
953
|
-
isRulesLoading:
|
|
954
|
-
hasRulesLoadError:
|
|
955
|
-
labels:
|
|
956
|
-
styles:
|
|
957
|
-
summaryTitleClassName:
|
|
958
|
-
headingClassName:
|
|
959
|
-
calloutFolderNameClassName:
|
|
945
|
+
onAuthorChange: ee,
|
|
946
|
+
rules: y,
|
|
947
|
+
onRulesChange: b,
|
|
948
|
+
ruleSourceOptions: x,
|
|
949
|
+
isRulesLoading: S,
|
|
950
|
+
hasRulesLoadError: C,
|
|
951
|
+
labels: D,
|
|
952
|
+
styles: A,
|
|
953
|
+
summaryTitleClassName: ne,
|
|
954
|
+
headingClassName: re,
|
|
955
|
+
calloutFolderNameClassName: ie
|
|
960
956
|
})
|
|
961
957
|
})
|
|
962
|
-
}), /* @__PURE__ */
|
|
958
|
+
}), /* @__PURE__ */ j(Ae, {
|
|
963
959
|
version: n?.version,
|
|
964
960
|
hasExistingPublicationInFolder: p,
|
|
965
961
|
allowReplace: _,
|
|
966
962
|
isSubmitDisabled: V.isSubmitDisabled,
|
|
967
963
|
isSubmitLoading: V.isSubmitLoading,
|
|
968
|
-
onCancel:
|
|
969
|
-
onSubmit:
|
|
970
|
-
labels:
|
|
964
|
+
onCancel: w,
|
|
965
|
+
onSubmit: E,
|
|
966
|
+
labels: ae
|
|
971
967
|
})]
|
|
972
968
|
});
|
|
973
969
|
};
|
|
974
970
|
//#endregion
|
|
975
|
-
export { Se as PUBLISH_PANEL_CLASS,
|
|
971
|
+
export { Se as PUBLISH_PANEL_CLASS, N as PublicationRuleFunction, he as PublishAccessRuleEditor, ve as PublishAccessRules, P as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, ye as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, W as collectFolderKeys, se as derivePublishState, B as filterFolderTree, I as formatPublishedDate, K as fromFolderPathKey, de as getSiblingFolderNames, J as getUniqueFolderName, U as mergeFolderPaths, ce as sortFolderTree, le as toDialFileTree, G as toFolderPathKey, z as usePublishFlow, ue 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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.317",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^19.2.8",
|
|
28
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
29
|
-
"@epam/ai-dial-ui-kit": "^0.16.0-dev.
|
|
28
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.317",
|
|
29
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.72",
|
|
30
30
|
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.25"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|