@epam/ai-dial-publish-panel 1.3.0-dev.246 → 1.3.0-dev.248
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/components/PublishAccessRules/PublishAccessRules.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +456 -457
- package/package.json +3 -3
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,
|
|
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 N, DialFoldersTree as ae } from "@epam/ai-dial-react-file-manager";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var P = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), F = /* @__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
|
+
}({}), oe = (e) => e.isSubmitting ? {
|
|
13
|
+
calloutKind: F.None,
|
|
14
14
|
isSubmitDisabled: !0,
|
|
15
15
|
isSubmitLoading: !0
|
|
16
16
|
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
|
|
17
|
-
calloutKind:
|
|
17
|
+
calloutKind: F.SubmitError,
|
|
18
18
|
isSubmitDisabled: !1,
|
|
19
19
|
isSubmitLoading: !1
|
|
20
20
|
} : e.hasExistingPublicationInFolder ? {
|
|
21
|
-
calloutKind:
|
|
21
|
+
calloutKind: F.ReplaceWarning,
|
|
22
22
|
isSubmitDisabled: e.allowReplace === !1,
|
|
23
23
|
isSubmitLoading: !1
|
|
24
24
|
} : {
|
|
25
|
-
calloutKind:
|
|
25
|
+
calloutKind: F.Info,
|
|
26
26
|
isSubmitDisabled: !1,
|
|
27
27
|
isSubmitLoading: !1
|
|
28
28
|
} : {
|
|
29
|
-
calloutKind:
|
|
29
|
+
calloutKind: F.NoAccess,
|
|
30
30
|
isSubmitDisabled: !0,
|
|
31
31
|
isSubmitLoading: !1
|
|
32
32
|
} : {
|
|
33
|
-
calloutKind:
|
|
33
|
+
calloutKind: F.None,
|
|
34
34
|
isSubmitDisabled: !0,
|
|
35
35
|
isSubmitLoading: !1
|
|
36
|
-
},
|
|
37
|
-
let r = Math.floor((t - e) /
|
|
36
|
+
}, se = 864e5, I = (e, t = Date.now(), n) => {
|
|
37
|
+
let r = Math.floor((t - e) / se);
|
|
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 A = /* @__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
|
+
}, ce = ({ 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(), [
|
|
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,70 +98,70 @@ var A = /* @__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
|
+
]), N = 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
|
-
isSubmitting:
|
|
138
|
-
hasSubmitError:
|
|
139
|
-
handleSubmit:
|
|
140
|
-
reset:
|
|
141
|
-
rules:
|
|
142
|
-
setRules:
|
|
143
|
-
author:
|
|
144
|
-
setAuthor:
|
|
145
|
-
publishCredentials:
|
|
146
|
-
setPublishCredentials:
|
|
147
|
-
isRulesLoading:
|
|
148
|
-
hasRulesLoadError:
|
|
137
|
+
isSubmitting: v,
|
|
138
|
+
hasSubmitError: y,
|
|
139
|
+
handleSubmit: ie,
|
|
140
|
+
reset: N,
|
|
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
|
+
}, le = (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 ? le(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
|
|
157
157
|
}), e;
|
|
158
158
|
}, []) : e;
|
|
159
|
-
},
|
|
159
|
+
}, z = (e, t) => e.localeCompare(t, void 0, {
|
|
160
160
|
sensitivity: "base",
|
|
161
161
|
numeric: !0
|
|
162
|
-
}),
|
|
162
|
+
}), ue = (e) => [...e].sort((e, t) => z(e.name, t.name)).map((e) => e.children ? {
|
|
163
163
|
...e,
|
|
164
|
-
children:
|
|
164
|
+
children: ue(e.children)
|
|
165
165
|
} : e), B = (e, t, n) => {
|
|
166
166
|
let [r, ...i] = t;
|
|
167
167
|
if (r == null) return e;
|
|
@@ -174,182 +174,182 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
174
174
|
name: r,
|
|
175
175
|
children: i.length ? B([], i, a) : void 0
|
|
176
176
|
}];
|
|
177
|
-
},
|
|
178
|
-
let t =
|
|
177
|
+
}, V = (e, t) => t.reduce((e, t) => t.length ? B(e, t, []) : e, e), H = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? H(e.children) : []]), U = (e) => e.join("/"), W = (e) => e.split("/").filter(Boolean), de = (e) => e.map((e) => {
|
|
178
|
+
let t = U(e.path);
|
|
179
179
|
return {
|
|
180
180
|
path: t,
|
|
181
181
|
name: e.name,
|
|
182
182
|
folderId: t,
|
|
183
183
|
nodeType: u.FOLDER,
|
|
184
|
-
items: e.children ?
|
|
184
|
+
items: e.children ? de(e.children) : void 0
|
|
185
185
|
};
|
|
186
|
-
}),
|
|
186
|
+
}), G = /[/\\:;,={}&"]/, K = (e, t, n) => {
|
|
187
187
|
let r = e.trim();
|
|
188
|
-
return r ? r.includes("..") ||
|
|
189
|
-
},
|
|
188
|
+
return r ? r.includes("..") || G.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
|
|
189
|
+
}, q = (e, t) => {
|
|
190
190
|
let n = new Set(t.map((e) => e.toLowerCase()));
|
|
191
191
|
if (!n.has(e.toLowerCase())) return e;
|
|
192
192
|
let r = 2;
|
|
193
193
|
for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
|
|
194
194
|
return `${e} ${r}`;
|
|
195
|
-
},
|
|
195
|
+
}, fe = (e, t) => {
|
|
196
196
|
if (t.length === 0) return e.map((e) => e.name);
|
|
197
|
-
let n =
|
|
197
|
+
let n = U(t), r = (e) => {
|
|
198
198
|
for (let t of e) {
|
|
199
|
-
if (
|
|
199
|
+
if (U(t.path) === n) return t;
|
|
200
200
|
let e = t.children ? r(t.children) : void 0;
|
|
201
201
|
if (e) return e;
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
return (r(e)?.children ?? []).map((e) => e.name);
|
|
205
|
-
},
|
|
205
|
+
}, J = {
|
|
206
206
|
dialog: "_dialog_jqcm2_5",
|
|
207
207
|
error: "_error_jqcm2_14",
|
|
208
208
|
selectField: "_selectField_jqcm2_28",
|
|
209
209
|
selectFieldOpen: "_selectFieldOpen_jqcm2_40"
|
|
210
|
-
},
|
|
210
|
+
}, pe = 20, Y = 200, me = 8, he = (e) => {
|
|
211
211
|
let t = e.trim();
|
|
212
|
-
if (t.length === 0 || t.length >
|
|
212
|
+
if (t.length === 0 || t.length > Y) return !1;
|
|
213
213
|
try {
|
|
214
214
|
return new RegExp(t) instanceof RegExp;
|
|
215
215
|
} catch {
|
|
216
216
|
return !1;
|
|
217
217
|
}
|
|
218
|
-
},
|
|
219
|
-
let
|
|
220
|
-
...
|
|
221
|
-
"--pare-mobile-bg":
|
|
222
|
-
"--pare-bg":
|
|
223
|
-
"--pare-error-text":
|
|
224
|
-
"--pare-select-border":
|
|
225
|
-
"--pare-select-border-hover":
|
|
226
|
-
"--pare-select-border-open":
|
|
227
|
-
"--pare-select-border-focus":
|
|
218
|
+
}, ge = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = pe, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: g = {} }) => {
|
|
219
|
+
let _ = {
|
|
220
|
+
...O({
|
|
221
|
+
"--pare-mobile-bg": g.colors?.mobileBackground,
|
|
222
|
+
"--pare-bg": g.colors?.background,
|
|
223
|
+
"--pare-error-text": g.colors?.errorText,
|
|
224
|
+
"--pare-select-border": g.colors?.selectBorder,
|
|
225
|
+
"--pare-select-border-hover": g.colors?.selectBorderHover,
|
|
226
|
+
"--pare-select-border-open": g.colors?.selectBorderOpen,
|
|
227
|
+
"--pare-select-border-focus": g.colors?.selectBorderFocus
|
|
228
228
|
}),
|
|
229
|
-
...
|
|
230
|
-
}, { sourceLabel:
|
|
229
|
+
...g.cssVars
|
|
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: N = "This field is required.", targetsRequiredError: ae = "Add at least one target.", saveLabel: F = "Save", cancelLabel: oe = "Cancel", dialogAriaLabel: se = "Add access rule" } = u, I = n(), L = n(), R = n(), ce = n(), le = i(null);
|
|
231
231
|
t(() => {
|
|
232
|
-
|
|
232
|
+
le.current?.focus();
|
|
233
233
|
}, []);
|
|
234
|
-
let [
|
|
234
|
+
let [z, ue] = a(), [B, V] = a(), [H, U] = a([]), [W, de] = a(""), [G, K] = a(!1), [q, fe] = a(""), [Y, ge] = a(!1), [X, _e] = a(!1), ve = k(J.selectField, G && J.selectFieldOpen), ye = k(J.selectField, Y && J.selectFieldOpen), Z = r(() => e.map((e) => ({
|
|
235
235
|
value: e,
|
|
236
236
|
label: e,
|
|
237
|
-
labelNode:
|
|
237
|
+
labelNode: q.trim() ? /* @__PURE__ */ j(m, {
|
|
238
238
|
text: e,
|
|
239
|
-
query:
|
|
239
|
+
query: q,
|
|
240
240
|
maxLines: 1
|
|
241
241
|
}) : void 0
|
|
242
|
-
})), [e,
|
|
242
|
+
})), [e, q]), be = r(() => [
|
|
243
243
|
{
|
|
244
|
-
value:
|
|
244
|
+
value: P.Equal,
|
|
245
245
|
label: x
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
value:
|
|
249
|
-
label:
|
|
248
|
+
value: P.Contain,
|
|
249
|
+
label: te
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
|
-
value:
|
|
252
|
+
value: P.Regex,
|
|
253
253
|
label: C
|
|
254
254
|
}
|
|
255
255
|
], [
|
|
256
256
|
x,
|
|
257
|
-
|
|
257
|
+
te,
|
|
258
258
|
C
|
|
259
|
-
]), Q =
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
ref:
|
|
259
|
+
]), Q = B === P.Regex, $ = he(W), xe = z != null && B != null && (Q ? $ : H.length > 0);
|
|
260
|
+
return /* @__PURE__ */ M("div", {
|
|
261
|
+
ref: le,
|
|
262
262
|
role: "dialog",
|
|
263
263
|
"aria-modal": "true",
|
|
264
|
-
"aria-label":
|
|
264
|
+
"aria-label": se,
|
|
265
265
|
tabIndex: -1,
|
|
266
266
|
onKeyDown: (e) => {
|
|
267
267
|
e.key === "Escape" && (e.stopPropagation(), s());
|
|
268
268
|
},
|
|
269
|
-
style:
|
|
270
|
-
className:
|
|
269
|
+
style: _,
|
|
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", J.dialog),
|
|
271
271
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
id:
|
|
274
|
-
labelProps: { label:
|
|
275
|
-
options:
|
|
276
|
-
value:
|
|
272
|
+
/* @__PURE__ */ j(S, {
|
|
273
|
+
id: L,
|
|
274
|
+
labelProps: { label: ee },
|
|
275
|
+
options: Z,
|
|
276
|
+
value: z,
|
|
277
277
|
onChange: (e) => {
|
|
278
|
-
|
|
278
|
+
ue(Array.isArray(e) ? e[0] : e), K(!1);
|
|
279
279
|
},
|
|
280
|
-
placeholder:
|
|
281
|
-
searchable: e.length >
|
|
282
|
-
searchPlaceholder:
|
|
283
|
-
onSearchQueryChange:
|
|
280
|
+
placeholder: y,
|
|
281
|
+
searchable: e.length > me,
|
|
282
|
+
searchPlaceholder: y,
|
|
283
|
+
onSearchQueryChange: fe,
|
|
284
284
|
disabled: c,
|
|
285
|
-
open:
|
|
286
|
-
onOpenChange:
|
|
287
|
-
fieldClassName:
|
|
288
|
-
invalid: X &&
|
|
289
|
-
error: X &&
|
|
285
|
+
open: G,
|
|
286
|
+
onOpenChange: K,
|
|
287
|
+
fieldClassName: ve,
|
|
288
|
+
invalid: X && z == null,
|
|
289
|
+
error: X && z == null ? N : void 0
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ j(S, {
|
|
292
292
|
labelProps: { label: b },
|
|
293
|
-
id:
|
|
293
|
+
id: R,
|
|
294
294
|
options: be,
|
|
295
|
-
value:
|
|
295
|
+
value: B,
|
|
296
296
|
onChange: (e) => {
|
|
297
297
|
let t = Array.isArray(e) ? e[0] : e;
|
|
298
|
-
|
|
298
|
+
B === P.Regex != (t === P.Regex) && (U([]), de("")), V(t), ge(!1);
|
|
299
299
|
},
|
|
300
300
|
placeholder: b,
|
|
301
301
|
disabled: c,
|
|
302
302
|
open: Y,
|
|
303
303
|
onOpenChange: ge,
|
|
304
|
-
fieldClassName:
|
|
305
|
-
invalid: X &&
|
|
306
|
-
error: X &&
|
|
304
|
+
fieldClassName: ye,
|
|
305
|
+
invalid: X && B == null,
|
|
306
|
+
error: X && B == null ? N : void 0
|
|
307
307
|
}),
|
|
308
|
-
Q ? /* @__PURE__ */
|
|
309
|
-
id: `${
|
|
310
|
-
labelProps: { label:
|
|
311
|
-
placeholder:
|
|
308
|
+
Q ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(h, {
|
|
309
|
+
id: `${I}-input`,
|
|
310
|
+
labelProps: { label: ne },
|
|
311
|
+
placeholder: re,
|
|
312
312
|
value: W,
|
|
313
313
|
onChange: (e) => de(e ?? ""),
|
|
314
314
|
invalid: (W.length > 0 || X) && !$,
|
|
315
|
-
"aria-describedby": (W.length > 0 || X) && !$ ?
|
|
315
|
+
"aria-describedby": (W.length > 0 || X) && !$ ? I : void 0,
|
|
316
316
|
disabled: c
|
|
317
|
-
}), (W.length > 0 || X) && !$ && /* @__PURE__ */
|
|
318
|
-
id:
|
|
319
|
-
className:
|
|
320
|
-
text:
|
|
321
|
-
})] }) : /* @__PURE__ */
|
|
322
|
-
id:
|
|
323
|
-
labelProps: { label:
|
|
324
|
-
placeholder:
|
|
325
|
-
caption: X &&
|
|
326
|
-
error: X &&
|
|
327
|
-
invalid: X &&
|
|
328
|
-
value:
|
|
317
|
+
}), (W.length > 0 || X) && !$ && /* @__PURE__ */ j(d, {
|
|
318
|
+
id: I,
|
|
319
|
+
className: k("mt-1 block", p, J.error),
|
|
320
|
+
text: ie
|
|
321
|
+
})] }) : /* @__PURE__ */ j(T, {
|
|
322
|
+
id: ce,
|
|
323
|
+
labelProps: { label: w },
|
|
324
|
+
placeholder: E,
|
|
325
|
+
caption: X && H.length === 0 ? void 0 : A,
|
|
326
|
+
error: X && H.length === 0 ? ae : void 0,
|
|
327
|
+
invalid: X && H.length === 0,
|
|
328
|
+
value: H,
|
|
329
329
|
onChange: (e) => {
|
|
330
330
|
let t = [];
|
|
331
331
|
for (let n of e) {
|
|
332
332
|
let e = n.trim();
|
|
333
333
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= l)) break;
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
U(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: oe,
|
|
344
344
|
onClick: s,
|
|
345
345
|
disabled: c
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
label:
|
|
346
|
+
}), /* @__PURE__ */ j(v, {
|
|
347
|
+
label: F,
|
|
348
348
|
onClick: () => {
|
|
349
|
-
!xe ||
|
|
350
|
-
source:
|
|
351
|
-
function:
|
|
352
|
-
targets: Q ? [W.trim()] :
|
|
349
|
+
!xe || z == null || B == null ? _e(!0) : o({
|
|
350
|
+
source: z,
|
|
351
|
+
function: B,
|
|
352
|
+
targets: Q ? [W.trim()] : H
|
|
353
353
|
});
|
|
354
354
|
},
|
|
355
355
|
disabled: c
|
|
@@ -357,117 +357,116 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
357
357
|
})
|
|
358
358
|
]
|
|
359
359
|
});
|
|
360
|
-
},
|
|
360
|
+
}, X = {
|
|
361
361
|
ruleRow: "_ruleRow_nx0en_1",
|
|
362
362
|
heading: "_heading_nx0en_5",
|
|
363
363
|
hint: "_hint_nx0en_9",
|
|
364
364
|
loading: "_loading_nx0en_13",
|
|
365
365
|
ruleText: "_ruleText_nx0en_17"
|
|
366
|
-
},
|
|
367
|
-
let
|
|
368
|
-
...
|
|
369
|
-
"--par-rule-bg":
|
|
370
|
-
"--par-heading-text":
|
|
371
|
-
"--par-hint-text":
|
|
372
|
-
"--par-loading-text":
|
|
373
|
-
"--par-rule-text":
|
|
366
|
+
}, _e = 20, ve = (e, t) => e === P.Equal ? t.equal : e === P.Contain ? t.contain : t.regex, ye = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: v = _e, 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: N = "Allow access if all match", folderScopeHint: ae = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: P = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: F = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: oe = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: se = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: L = "Or", removeRuleAriaLabelTemplate: R = "Remove rule for {source}: {targets}", equalFunctionLabel: ce = "Equal", containFunctionLabel: le = "Contain", regexFunctionLabel: z = "Regex", loadingLabel: ue = "Loading existing rules…", loadErrorLabel: B = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: V = "Rule added.", ruleRemovedAnnouncement: H = "Rule removed.", rulesClearedAnnouncement: U = "All rules cleared.", rulesLoadedAnnouncement: W = "Existing rules loaded for the selected folder.", editorLabels: de } = S, G = n(), [K, q] = a(!1), [fe, J] = a(""), pe = i(null), Y = i(m);
|
|
377
377
|
t(() => {
|
|
378
|
-
|
|
378
|
+
Y.current && !m && e.length > 0 && J(W), Y.current = m;
|
|
379
379
|
}, [
|
|
380
380
|
m,
|
|
381
381
|
e,
|
|
382
|
-
|
|
382
|
+
W
|
|
383
383
|
]);
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
r([...e, t]),
|
|
384
|
+
let me = () => {
|
|
385
|
+
pe.current = document.activeElement, q(!0);
|
|
386
|
+
}, he = () => {
|
|
387
|
+
q(!1), pe.current?.focus?.();
|
|
388
|
+
}, ye = (t) => {
|
|
389
|
+
r([...e, t]), J(V), he();
|
|
390
390
|
}, Z = (t) => {
|
|
391
|
-
r(e.filter((e, n) => n !== t)),
|
|
392
|
-
},
|
|
393
|
-
r([]),
|
|
394
|
-
},
|
|
395
|
-
equal:
|
|
396
|
-
contain:
|
|
397
|
-
regex:
|
|
398
|
-
},
|
|
399
|
-
return /* @__PURE__ */
|
|
391
|
+
r(e.filter((e, n) => n !== t)), J(H);
|
|
392
|
+
}, be = () => {
|
|
393
|
+
r([]), J(U);
|
|
394
|
+
}, Q = {
|
|
395
|
+
equal: ce,
|
|
396
|
+
contain: le,
|
|
397
|
+
regex: z
|
|
398
|
+
}, $ = e.length >= v, xe = d || $, Se = u != null && u !== "";
|
|
399
|
+
return /* @__PURE__ */ M("div", {
|
|
400
400
|
role: "group",
|
|
401
|
-
"aria-labelledby":
|
|
402
|
-
style:
|
|
403
|
-
className:
|
|
401
|
+
"aria-labelledby": G,
|
|
402
|
+
style: ne,
|
|
403
|
+
className: k(d && "pointer-events-none opacity-60"),
|
|
404
404
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
children: G
|
|
405
|
+
/* @__PURE__ */ j(g, {
|
|
406
|
+
visuallyHidden: !0,
|
|
407
|
+
as: _.Span,
|
|
408
|
+
children: fe
|
|
410
409
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ M("div", {
|
|
412
411
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
414
|
-
id:
|
|
415
|
-
className:
|
|
416
|
-
children:
|
|
417
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ j("div", {
|
|
413
|
+
id: G,
|
|
414
|
+
className: k(te, X.heading),
|
|
415
|
+
children: N
|
|
416
|
+
}), e.length > 0 && /* @__PURE__ */ j(f, {
|
|
418
417
|
variant: o.Primary,
|
|
419
|
-
label:
|
|
420
|
-
onClick:
|
|
418
|
+
label: I,
|
|
419
|
+
onClick: be,
|
|
421
420
|
disabled: d
|
|
422
421
|
})]
|
|
423
422
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
className:
|
|
426
|
-
children:
|
|
423
|
+
/* @__PURE__ */ j("p", {
|
|
424
|
+
className: k("mb-2", w, X.hint),
|
|
425
|
+
children: Se ? ae.replace("{folder}", u) : P
|
|
427
426
|
}),
|
|
428
|
-
e.length > 0 &&
|
|
427
|
+
e.length > 0 && !Se && /* @__PURE__ */ j("div", {
|
|
429
428
|
className: "mb-2",
|
|
430
|
-
children: /* @__PURE__ */
|
|
431
|
-
type:
|
|
432
|
-
variant:
|
|
433
|
-
message:
|
|
429
|
+
children: /* @__PURE__ */ j(ee, {
|
|
430
|
+
type: y.SectionMessage,
|
|
431
|
+
variant: b.Warning,
|
|
432
|
+
message: F
|
|
434
433
|
})
|
|
435
434
|
}),
|
|
436
|
-
m && /* @__PURE__ */
|
|
437
|
-
className:
|
|
438
|
-
children: [/* @__PURE__ */
|
|
435
|
+
m && /* @__PURE__ */ M("div", {
|
|
436
|
+
className: k("mb-2 flex items-center gap-2", T, X.loading),
|
|
437
|
+
children: [/* @__PURE__ */ j(C, {
|
|
439
438
|
size: 16,
|
|
440
|
-
ariaLabel:
|
|
441
|
-
}), /* @__PURE__ */
|
|
439
|
+
ariaLabel: ue
|
|
440
|
+
}), /* @__PURE__ */ j("span", { children: ue })]
|
|
442
441
|
}),
|
|
443
|
-
h && /* @__PURE__ */
|
|
442
|
+
h && /* @__PURE__ */ j("div", {
|
|
444
443
|
className: "mb-2",
|
|
445
|
-
children: /* @__PURE__ */
|
|
446
|
-
type:
|
|
447
|
-
variant:
|
|
444
|
+
children: /* @__PURE__ */ j(ee, {
|
|
445
|
+
type: y.SectionMessage,
|
|
446
|
+
variant: b.Warning,
|
|
448
447
|
message: B
|
|
449
448
|
})
|
|
450
449
|
}),
|
|
451
|
-
e.length > 0 && /* @__PURE__ */
|
|
450
|
+
e.length > 0 && /* @__PURE__ */ j("ul", {
|
|
452
451
|
className: "mb-3 flex flex-col gap-2",
|
|
453
452
|
children: e.map((e, t) => {
|
|
454
|
-
let n = e.targets.join(` ${
|
|
455
|
-
return /* @__PURE__ */
|
|
456
|
-
className:
|
|
457
|
-
children: [/* @__PURE__ */
|
|
458
|
-
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", X.ruleRow),
|
|
456
|
+
children: [/* @__PURE__ */ M("span", {
|
|
457
|
+
className: k("truncate", E, X.ruleText),
|
|
459
458
|
children: [
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
className:
|
|
459
|
+
/* @__PURE__ */ j("span", {
|
|
460
|
+
className: D,
|
|
462
461
|
children: e.source
|
|
463
462
|
}),
|
|
464
463
|
" ",
|
|
465
|
-
|
|
464
|
+
ve(e.function, Q),
|
|
466
465
|
": ",
|
|
467
466
|
n
|
|
468
467
|
]
|
|
469
|
-
}), /* @__PURE__ */
|
|
470
|
-
icon: /* @__PURE__ */
|
|
468
|
+
}), /* @__PURE__ */ j(p, {
|
|
469
|
+
icon: /* @__PURE__ */ j(ie, {
|
|
471
470
|
size: c.SM,
|
|
472
471
|
"aria-hidden": !0,
|
|
473
472
|
stroke: l
|
|
@@ -479,31 +478,31 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
479
478
|
}, t);
|
|
480
479
|
})
|
|
481
480
|
}),
|
|
482
|
-
|
|
481
|
+
K && /* @__PURE__ */ j(ge, {
|
|
483
482
|
sourceOptions: s,
|
|
484
|
-
onSave:
|
|
485
|
-
onCancel:
|
|
483
|
+
onSave: ye,
|
|
484
|
+
onCancel: he,
|
|
486
485
|
disabled: d,
|
|
487
|
-
maxTargets:
|
|
488
|
-
labels:
|
|
489
|
-
styles:
|
|
486
|
+
maxTargets: x,
|
|
487
|
+
labels: de,
|
|
488
|
+
styles: A.editor
|
|
490
489
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ j("div", {
|
|
492
491
|
className: "flex flex-wrap items-center gap-2",
|
|
493
|
-
children: /* @__PURE__ */
|
|
494
|
-
label:
|
|
495
|
-
iconBefore: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ j(f, {
|
|
493
|
+
label: se,
|
|
494
|
+
iconBefore: /* @__PURE__ */ j(re, {
|
|
496
495
|
size: c.SM,
|
|
497
496
|
"aria-hidden": !0,
|
|
498
497
|
stroke: l
|
|
499
498
|
}),
|
|
500
|
-
onClick:
|
|
501
|
-
disabled:
|
|
499
|
+
onClick: me,
|
|
500
|
+
disabled: xe
|
|
502
501
|
})
|
|
503
502
|
}),
|
|
504
|
-
|
|
505
|
-
className:
|
|
506
|
-
children:
|
|
503
|
+
$ && /* @__PURE__ */ j("p", {
|
|
504
|
+
className: k("mt-2", w, X.hint),
|
|
505
|
+
children: oe.replace("{max}", String(v))
|
|
507
506
|
})
|
|
508
507
|
]
|
|
509
508
|
});
|
|
@@ -514,8 +513,8 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
514
513
|
date: "_date_d0adf_17",
|
|
515
514
|
emptyState: "_emptyState_d0adf_21",
|
|
516
515
|
stripedRow: "_stripedRow_d0adf_25"
|
|
517
|
-
},
|
|
518
|
-
let m =
|
|
516
|
+
}, be = ({ 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 = O({
|
|
519
518
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
520
519
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
521
520
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -526,99 +525,99 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
526
525
|
"--phl-date-text": p?.dateText,
|
|
527
526
|
"--phl-empty-text": p?.emptyStateText,
|
|
528
527
|
"--phl-striped-bg": p?.stripedBackground
|
|
529
|
-
}), h =
|
|
530
|
-
return n ? /* @__PURE__ */
|
|
528
|
+
}), h = k(f, Z.emptyState);
|
|
529
|
+
return n ? /* @__PURE__ */ j("p", {
|
|
531
530
|
style: m,
|
|
532
531
|
className: h,
|
|
533
532
|
children: c
|
|
534
|
-
}) : r ? /* @__PURE__ */
|
|
533
|
+
}) : r ? /* @__PURE__ */ j("p", {
|
|
535
534
|
style: m,
|
|
536
535
|
className: h,
|
|
537
|
-
role: "
|
|
536
|
+
role: "status",
|
|
538
537
|
children: l
|
|
539
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
538
|
+
}) : e.length === 0 ? /* @__PURE__ */ j("p", {
|
|
540
539
|
style: m,
|
|
541
540
|
className: h,
|
|
542
541
|
children: s
|
|
543
|
-
}) : /* @__PURE__ */
|
|
542
|
+
}) : /* @__PURE__ */ j("ul", {
|
|
544
543
|
style: m,
|
|
545
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
546
|
-
className:
|
|
547
|
-
children: [/* @__PURE__ */
|
|
544
|
+
children: e.map((e, n) => /* @__PURE__ */ M("li", {
|
|
545
|
+
className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Z.stripedRow),
|
|
546
|
+
children: [/* @__PURE__ */ M("span", {
|
|
548
547
|
className: "flex min-w-0 items-center gap-2",
|
|
549
548
|
style: m,
|
|
550
549
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
className:
|
|
550
|
+
/* @__PURE__ */ M("span", {
|
|
551
|
+
className: k(u, Z.version),
|
|
553
552
|
children: [
|
|
554
553
|
i,
|
|
555
554
|
" ",
|
|
556
555
|
e.version
|
|
557
556
|
]
|
|
558
557
|
}),
|
|
559
|
-
e.version === t && /* @__PURE__ */
|
|
558
|
+
e.version === t && /* @__PURE__ */ j(w, {
|
|
560
559
|
label: a,
|
|
561
|
-
className:
|
|
560
|
+
className: k("shrink-0 whitespace-nowrap", Z.currentBadge)
|
|
562
561
|
}),
|
|
563
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
562
|
+
e.publishCredentials === !0 && /* @__PURE__ */ j(w, {
|
|
564
563
|
label: o,
|
|
565
|
-
className:
|
|
564
|
+
className: k("shrink-0 whitespace-nowrap", Z.sharedCredentialsBadge)
|
|
566
565
|
})
|
|
567
566
|
]
|
|
568
|
-
}), /* @__PURE__ */
|
|
569
|
-
className:
|
|
570
|
-
children:
|
|
567
|
+
}), /* @__PURE__ */ j("span", {
|
|
568
|
+
className: k(d, Z.date),
|
|
569
|
+
children: I(e.publishedAt)
|
|
571
570
|
})]
|
|
572
571
|
}, `${e.version}-${n}`))
|
|
573
572
|
});
|
|
574
|
-
},
|
|
573
|
+
}, Q = {
|
|
575
574
|
divider: "_divider_1gs31_1",
|
|
576
575
|
tree: "_tree_1gs31_17"
|
|
577
|
-
},
|
|
578
|
-
let
|
|
579
|
-
...
|
|
580
|
-
...
|
|
581
|
-
}, [
|
|
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: 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 = {} }) => {
|
|
577
|
+
let T = {
|
|
578
|
+
...O({ "--pft-divider": w.colors?.divider }),
|
|
579
|
+
...w.cssVars
|
|
580
|
+
}, [E, D] = a(() => new Set(n?.map((e, t) => U(n.slice(0, t + 1))) ?? [])), A = S ?? E, ie = (e) => {
|
|
582
581
|
let t = new Set(e);
|
|
583
|
-
t.delete(""),
|
|
584
|
-
}, [
|
|
582
|
+
t.delete(""), te ? te(t) : D(t);
|
|
583
|
+
}, [P, F] = a(null), [oe, se] = a(_), I = i(null), L = i(!1);
|
|
585
584
|
t(() => {
|
|
586
585
|
let e = (e) => {
|
|
587
|
-
e.target instanceof Element && e.target.closest(`[${
|
|
586
|
+
e.target instanceof Element && e.target.closest(`[${$}]`) && (L.current = !0);
|
|
588
587
|
};
|
|
589
588
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
590
589
|
}, []);
|
|
591
|
-
let R = u.trim(),
|
|
592
|
-
|
|
593
|
-
|
|
590
|
+
let R = u.trim(), ce = P != null, z = r(() => le(e, u), [e, u]), B = R.length > 0 && z.length === 0, V = !ce && R.length > 0, G = r(() => ue(V ? z : e), [
|
|
591
|
+
V,
|
|
592
|
+
z,
|
|
594
593
|
e
|
|
595
|
-
]), J = r(() => /* @__PURE__ */ new Set(["", ...
|
|
596
|
-
|
|
594
|
+
]), J = r(() => /* @__PURE__ */ new Set(["", ...H(G)]), [G]), pe = r(() => /* @__PURE__ */ new Set(["", ...V ? J : A]), [
|
|
595
|
+
V,
|
|
597
596
|
J,
|
|
598
597
|
A
|
|
599
|
-
]),
|
|
598
|
+
]), Y = r(() => de(G), [G]), me = r(() => V && Y.length === 0 ? [] : [{
|
|
600
599
|
path: "",
|
|
601
|
-
name:
|
|
600
|
+
name: x,
|
|
602
601
|
folderId: "",
|
|
603
|
-
nodeType:
|
|
604
|
-
items:
|
|
602
|
+
nodeType: N.FOLDER,
|
|
603
|
+
items: Y
|
|
605
604
|
}], [
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
]),
|
|
610
|
-
empty:
|
|
611
|
-
invalid:
|
|
612
|
-
duplicate:
|
|
613
|
-
}, X = (t) =>
|
|
614
|
-
|
|
615
|
-
let t =
|
|
616
|
-
t &&
|
|
617
|
-
},
|
|
618
|
-
let t =
|
|
605
|
+
Y,
|
|
606
|
+
x,
|
|
607
|
+
V
|
|
608
|
+
]), he = P ? U(P) : null, ge = {
|
|
609
|
+
empty: ee,
|
|
610
|
+
invalid: y,
|
|
611
|
+
duplicate: b
|
|
612
|
+
}, X = (t) => q(B && K(R, [], ge) == null ? R : _, fe(e, t)), _e = (e) => {
|
|
613
|
+
F(e), se(X(e)), I.current = null, L.current = !1;
|
|
614
|
+
let t = U(e);
|
|
615
|
+
t && ie(new Set(A).add(t));
|
|
616
|
+
}, ve = () => _e(n ?? []), ye = (e) => {
|
|
617
|
+
let t = W(e.path), n = [{
|
|
619
618
|
key: "add-child",
|
|
620
619
|
label: g,
|
|
621
|
-
icon: /* @__PURE__ */
|
|
620
|
+
icon: /* @__PURE__ */ j(ne, {
|
|
622
621
|
size: c.SM,
|
|
623
622
|
"aria-hidden": !0,
|
|
624
623
|
stroke: l
|
|
@@ -628,139 +627,139 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
628
627
|
return e.path !== "" && n.push({
|
|
629
628
|
key: "add-sibling",
|
|
630
629
|
label: h,
|
|
631
|
-
icon: /* @__PURE__ */
|
|
630
|
+
icon: /* @__PURE__ */ j(re, {
|
|
632
631
|
size: c.SM,
|
|
633
632
|
"aria-hidden": !0,
|
|
634
633
|
stroke: l
|
|
635
634
|
}),
|
|
636
635
|
onClick: () => _e(t.slice(0, -1))
|
|
637
636
|
}), n;
|
|
638
|
-
},
|
|
639
|
-
if (!
|
|
640
|
-
let n =
|
|
641
|
-
return
|
|
642
|
-
},
|
|
643
|
-
if (!
|
|
644
|
-
let t = e.trim(), n =
|
|
645
|
-
(
|
|
646
|
-
}, xe = () =>
|
|
647
|
-
return /* @__PURE__ */
|
|
648
|
-
style:
|
|
649
|
-
className:
|
|
637
|
+
}, Z = (t) => {
|
|
638
|
+
if (!P) return null;
|
|
639
|
+
let n = K(t, fe(e, P), ge);
|
|
640
|
+
return I.current = n, n;
|
|
641
|
+
}, be = (e) => {
|
|
642
|
+
if (!P || L.current) return;
|
|
643
|
+
let t = e.trim(), n = I.current;
|
|
644
|
+
(Z(e) ?? n) || (s(P, t), o([...P, t])), F(null);
|
|
645
|
+
}, xe = () => F(null);
|
|
646
|
+
return /* @__PURE__ */ M("div", {
|
|
647
|
+
style: T,
|
|
648
|
+
className: k(d && "pointer-events-none opacity-60", w.className),
|
|
650
649
|
children: [
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
className:
|
|
653
|
-
children: /* @__PURE__ */
|
|
654
|
-
items:
|
|
650
|
+
/* @__PURE__ */ j("div", {
|
|
651
|
+
className: k("w-full max-w-full min-w-0", Q.tree),
|
|
652
|
+
children: /* @__PURE__ */ j(ae, {
|
|
653
|
+
items: me,
|
|
655
654
|
showFiles: !1,
|
|
656
|
-
selectedPath: n == null ? void 0 :
|
|
655
|
+
selectedPath: n == null ? void 0 : U(n),
|
|
657
656
|
expandedPaths: pe,
|
|
658
|
-
onExpandedPathsChange:
|
|
659
|
-
loadingPaths:
|
|
657
|
+
onExpandedPathsChange: ie,
|
|
658
|
+
loadingPaths: C,
|
|
660
659
|
onItemClick: (e) => {
|
|
661
|
-
o(n != null &&
|
|
660
|
+
o(n != null && U(n) === e.path ? void 0 : W(e.path));
|
|
662
661
|
},
|
|
663
|
-
getContextMenuItems:
|
|
664
|
-
createdFolderPath:
|
|
665
|
-
newFolderDefaultName:
|
|
666
|
-
onCreateFolderSave:
|
|
662
|
+
getContextMenuItems: ye,
|
|
663
|
+
createdFolderPath: he,
|
|
664
|
+
newFolderDefaultName: oe,
|
|
665
|
+
onCreateFolderSave: be,
|
|
667
666
|
onCreateFolderCancel: xe,
|
|
668
|
-
onRenameValidate: (e) =>
|
|
669
|
-
emptyStateTitle:
|
|
667
|
+
onRenameValidate: (e) => Z(e),
|
|
668
|
+
emptyStateTitle: V ? v.replace("{query}", R) : void 0
|
|
670
669
|
})
|
|
671
670
|
}),
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
className:
|
|
671
|
+
/* @__PURE__ */ j("div", {
|
|
672
|
+
className: k("my-2 h-px", Q.divider),
|
|
674
673
|
"aria-hidden": !0
|
|
675
674
|
}),
|
|
676
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ M("div", {
|
|
677
676
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
678
|
-
children: [/* @__PURE__ */
|
|
679
|
-
onClick:
|
|
677
|
+
children: [/* @__PURE__ */ j(f, {
|
|
678
|
+
onClick: ve,
|
|
680
679
|
label: p,
|
|
681
|
-
iconBefore: /* @__PURE__ */
|
|
680
|
+
iconBefore: /* @__PURE__ */ j(re, {
|
|
682
681
|
size: c.SM,
|
|
683
682
|
"aria-hidden": !0,
|
|
684
683
|
stroke: l
|
|
685
684
|
}),
|
|
686
|
-
disabled: d ||
|
|
687
|
-
}),
|
|
685
|
+
disabled: d || ce
|
|
686
|
+
}), ce && /* @__PURE__ */ j(f, {
|
|
688
687
|
label: m,
|
|
689
688
|
onClick: xe,
|
|
690
689
|
disabled: d,
|
|
691
|
-
[
|
|
690
|
+
[$]: ""
|
|
692
691
|
})]
|
|
693
692
|
})
|
|
694
693
|
]
|
|
695
694
|
});
|
|
696
|
-
},
|
|
695
|
+
}, Se = { panel: "dial-publish-panel-panel" }, Ce = {
|
|
697
696
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
698
697
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
699
|
-
},
|
|
700
|
-
let { colors: P, folderTree:
|
|
701
|
-
...
|
|
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: 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: N = "dial-body-semi-text", styles: ae = {} }) => {
|
|
699
|
+
let { colors: P, folderTree: se, accessRules: I } = ae, L = {
|
|
700
|
+
...O({
|
|
702
701
|
"--pp-summary-title-text": P?.summaryTitleText,
|
|
703
702
|
"--pp-heading-text": P?.headingText
|
|
704
703
|
}),
|
|
705
|
-
...
|
|
706
|
-
},
|
|
704
|
+
...ae.cssVars
|
|
705
|
+
}, R = {
|
|
707
706
|
border: P?.summaryBorder,
|
|
708
707
|
background: P?.summaryBackground,
|
|
709
708
|
versionTagBorder: P?.summaryVersionTagBorder,
|
|
710
709
|
versionTagBackground: P?.summaryVersionTagBackground,
|
|
711
710
|
versionTagText: P?.summaryVersionTagText
|
|
712
|
-
}, { folderLabel:
|
|
711
|
+
}, { folderLabel: ce = "Publish to folder", replaceWarning: le = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: z = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: ue = "Publishing failed. Please try again.", folderEmptyStateLabel: B, addSiblingFolderLabel: V, addChildFolderLabel: H, cancelCreatingFolderLabel: U, createFolderEmptyNameError: W, createFolderInvalidNameError: de, createFolderDuplicateNameError: G, rootFolderLabel: K = "Organization", summaryVersionLabel: q, accessRulesLabels: fe, searchPlaceholder: J, clearSearchAriaLabel: pe, authorLabel: Y = "Author", authorPlaceholder: me = "Author name", authorHint: he = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ge = "Publish with my credentials", credentialsHint: X = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = re, [_e, ve] = a(""), Z = n(), be = (e) => {
|
|
713
712
|
ve(e ?? "");
|
|
714
|
-
},
|
|
715
|
-
hasSelectedFolder:
|
|
713
|
+
}, Q = o != null, $ = r(() => oe({
|
|
714
|
+
hasSelectedFolder: Q,
|
|
716
715
|
hasExistingPublicationInFolder: p,
|
|
717
716
|
hasWriteAccess: m,
|
|
718
717
|
isSubmitting: g,
|
|
719
|
-
hasSubmitError:
|
|
720
|
-
allowReplace:
|
|
718
|
+
hasSubmitError: _,
|
|
719
|
+
allowReplace: v
|
|
721
720
|
}), [
|
|
722
|
-
|
|
721
|
+
Q,
|
|
723
722
|
p,
|
|
724
723
|
m,
|
|
725
724
|
g,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
]),
|
|
729
|
-
className:
|
|
725
|
+
_,
|
|
726
|
+
v
|
|
727
|
+
]), Te = Q ? o[o.length - 1] ?? K : "", De = t ? t() : /* @__PURE__ */ j("span", {
|
|
728
|
+
className: k("truncate", ie, Ce.summaryTitle),
|
|
730
729
|
children: e?.title
|
|
731
730
|
});
|
|
732
|
-
return /* @__PURE__ */
|
|
733
|
-
className:
|
|
734
|
-
style:
|
|
735
|
-
children: [e?.type == null ? /* @__PURE__ */
|
|
736
|
-
colors:
|
|
737
|
-
children:
|
|
738
|
-
}) : /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ M("div", {
|
|
732
|
+
className: k("flex flex-col gap-5", Se.panel),
|
|
733
|
+
style: L,
|
|
734
|
+
children: [e?.type == null ? /* @__PURE__ */ j(E, {
|
|
735
|
+
colors: R,
|
|
736
|
+
children: De
|
|
737
|
+
}) : /* @__PURE__ */ j(E, {
|
|
739
738
|
item: {
|
|
740
739
|
type: e.type,
|
|
741
740
|
name: e.title,
|
|
742
741
|
version: e.version ?? "",
|
|
743
742
|
iconUrl: e.iconUrl
|
|
744
743
|
},
|
|
745
|
-
versionLabel:
|
|
746
|
-
colors:
|
|
747
|
-
}), /* @__PURE__ */
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
className:
|
|
750
|
-
children:
|
|
744
|
+
versionLabel: q,
|
|
745
|
+
colors: R
|
|
746
|
+
}), /* @__PURE__ */ M("div", { children: [
|
|
747
|
+
/* @__PURE__ */ j("div", {
|
|
748
|
+
className: k("mb-2", N, Ce.sectionHeading),
|
|
749
|
+
children: ce
|
|
751
750
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ j("div", {
|
|
753
752
|
role: "search",
|
|
754
753
|
className: "mb-3",
|
|
755
|
-
children: /* @__PURE__ */
|
|
756
|
-
value:
|
|
754
|
+
children: /* @__PURE__ */ j(x, {
|
|
755
|
+
value: _e,
|
|
757
756
|
onChange: be,
|
|
758
757
|
placeholder: J,
|
|
759
758
|
clearLabel: pe,
|
|
760
759
|
"aria-label": J
|
|
761
760
|
})
|
|
762
761
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ j(xe, {
|
|
764
763
|
items: i,
|
|
765
764
|
selectedPath: o,
|
|
766
765
|
onSelectedPathChange: c,
|
|
@@ -768,114 +767,114 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
768
767
|
expandedPaths: u,
|
|
769
768
|
onExpandedPathsChange: d,
|
|
770
769
|
loadingPaths: f,
|
|
771
|
-
searchQuery:
|
|
770
|
+
searchQuery: _e,
|
|
772
771
|
disabled: g,
|
|
773
|
-
noResultsLabel:
|
|
774
|
-
addSiblingFolderLabel:
|
|
775
|
-
addChildFolderLabel:
|
|
776
|
-
cancelCreatingFolderLabel:
|
|
772
|
+
noResultsLabel: B,
|
|
773
|
+
addSiblingFolderLabel: V,
|
|
774
|
+
addChildFolderLabel: H,
|
|
775
|
+
cancelCreatingFolderLabel: U,
|
|
777
776
|
emptyFolderNameError: W,
|
|
778
777
|
invalidFolderNameError: de,
|
|
779
|
-
duplicateFolderNameError:
|
|
780
|
-
rootLabel:
|
|
781
|
-
styles:
|
|
778
|
+
duplicateFolderNameError: G,
|
|
779
|
+
rootLabel: K,
|
|
780
|
+
styles: se
|
|
782
781
|
}),
|
|
783
|
-
|
|
782
|
+
$.calloutKind !== F.None && $.calloutKind !== F.Info && /* @__PURE__ */ j("div", {
|
|
784
783
|
className: "mt-3",
|
|
785
|
-
children: /* @__PURE__ */
|
|
786
|
-
type:
|
|
787
|
-
variant:
|
|
788
|
-
message:
|
|
789
|
-
replaceWarning:
|
|
790
|
-
noAccessError:
|
|
791
|
-
submitError:
|
|
792
|
-
folderName:
|
|
784
|
+
children: /* @__PURE__ */ j(ee, {
|
|
785
|
+
type: y.SectionMessage,
|
|
786
|
+
variant: Ee($.calloutKind),
|
|
787
|
+
message: Oe($.calloutKind, {
|
|
788
|
+
replaceWarning: le,
|
|
789
|
+
noAccessError: z,
|
|
790
|
+
submitError: ue,
|
|
791
|
+
folderName: Te,
|
|
793
792
|
version: e?.version
|
|
794
793
|
})
|
|
795
794
|
})
|
|
796
795
|
}),
|
|
797
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ j("div", {
|
|
798
797
|
className: "mt-4",
|
|
799
|
-
children: /* @__PURE__ */
|
|
800
|
-
id:
|
|
801
|
-
labelProps: { label:
|
|
802
|
-
placeholder:
|
|
803
|
-
caption:
|
|
798
|
+
children: /* @__PURE__ */ j(h, {
|
|
799
|
+
id: Z,
|
|
800
|
+
labelProps: { label: Y },
|
|
801
|
+
placeholder: me,
|
|
802
|
+
caption: he,
|
|
804
803
|
value: b,
|
|
805
|
-
onChange: (e) =>
|
|
806
|
-
maxLength:
|
|
804
|
+
onChange: (e) => S(e ?? ""),
|
|
805
|
+
maxLength: we,
|
|
807
806
|
disabled: g
|
|
808
807
|
})
|
|
809
808
|
}),
|
|
810
|
-
|
|
809
|
+
C != null && /* @__PURE__ */ j("div", {
|
|
811
810
|
className: "mt-4",
|
|
812
|
-
children: /* @__PURE__ */
|
|
811
|
+
children: /* @__PURE__ */ j(s, {
|
|
813
812
|
labelProps: { label: ge },
|
|
814
813
|
caption: X,
|
|
815
|
-
isSelected:
|
|
816
|
-
onChange:
|
|
814
|
+
isSelected: te,
|
|
815
|
+
onChange: C,
|
|
817
816
|
disabled: g
|
|
818
817
|
})
|
|
819
818
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ j("div", {
|
|
821
820
|
className: "mt-4",
|
|
822
|
-
children: /* @__PURE__ */
|
|
821
|
+
children: /* @__PURE__ */ j(ye, {
|
|
823
822
|
rules: w,
|
|
824
|
-
onRulesChange:
|
|
825
|
-
sourceOptions:
|
|
826
|
-
folderName:
|
|
823
|
+
onRulesChange: T,
|
|
824
|
+
sourceOptions: D,
|
|
825
|
+
folderName: Q ? Te : void 0,
|
|
827
826
|
disabled: g,
|
|
828
|
-
isLoading:
|
|
829
|
-
hasLoadError:
|
|
830
|
-
labels:
|
|
831
|
-
styles:
|
|
827
|
+
isLoading: A,
|
|
828
|
+
hasLoadError: ne,
|
|
829
|
+
labels: fe,
|
|
830
|
+
styles: I
|
|
832
831
|
})
|
|
833
832
|
})
|
|
834
833
|
] })]
|
|
835
834
|
});
|
|
836
|
-
},
|
|
835
|
+
}, Ee = (e) => e === F.ReplaceWarning ? b.Warning : b.Error, De = (e, t) => {
|
|
837
836
|
let [n, r, ...i] = e.split("{folder}");
|
|
838
|
-
return r === void 0 || i.length > 0 ? e : /* @__PURE__ */
|
|
837
|
+
return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ M(A, { children: [
|
|
839
838
|
n,
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
className: "
|
|
839
|
+
/* @__PURE__ */ j("strong", {
|
|
840
|
+
className: "dial-small-paragraph-semi-text",
|
|
842
841
|
children: t
|
|
843
842
|
}),
|
|
844
843
|
r
|
|
845
844
|
] });
|
|
846
|
-
},
|
|
847
|
-
let u =
|
|
848
|
-
return /* @__PURE__ */
|
|
845
|
+
}, Oe = (e, t) => e === F.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === F.NoAccess ? De(t.noAccessError, t.folderName) : 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 }) => {
|
|
846
|
+
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;
|
|
847
|
+
return /* @__PURE__ */ M("div", {
|
|
849
848
|
style: u,
|
|
850
|
-
className:
|
|
851
|
-
children: [/* @__PURE__ */
|
|
849
|
+
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),
|
|
850
|
+
children: [/* @__PURE__ */ j(f, {
|
|
852
851
|
label: d,
|
|
853
852
|
className: "mobile:flex-1",
|
|
854
853
|
disabled: i,
|
|
855
854
|
onClick: a
|
|
856
|
-
}), /* @__PURE__ */
|
|
857
|
-
label:
|
|
855
|
+
}), /* @__PURE__ */ j(v, {
|
|
856
|
+
label: g,
|
|
858
857
|
className: "mobile:flex-1",
|
|
859
858
|
disabled: r,
|
|
860
|
-
iconBefore: i ? /* @__PURE__ */
|
|
859
|
+
iconBefore: i ? /* @__PURE__ */ j(C, { size: c.SM }) : void 0,
|
|
861
860
|
onClick: o
|
|
862
861
|
})]
|
|
863
862
|
});
|
|
864
|
-
},
|
|
863
|
+
}, je = {
|
|
865
864
|
backdrop: "_backdrop_16jmd_6",
|
|
866
865
|
panel: "_panel_16jmd_10",
|
|
867
866
|
divider: "_divider_16jmd_15",
|
|
868
867
|
content: "_content_16jmd_19",
|
|
869
868
|
title: "_title_16jmd_24"
|
|
870
|
-
},
|
|
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
|
-
}), [
|
|
869
|
+
}, 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, footerLabels: ne, labels: re = {}, titleClassName: ie = "dial-body-semi-text", colors: N }) => {
|
|
870
|
+
let ae = O({
|
|
871
|
+
"--spp-backdrop-bg": N?.backdropBackground,
|
|
872
|
+
"--spp-panel-bg": N?.panelBackground,
|
|
873
|
+
"--spp-panel-border": N?.panelBorder,
|
|
874
|
+
"--spp-divider-border": N?.dividerBorder,
|
|
875
|
+
"--spp-scrollbar-thumb": N?.scrollbarThumb,
|
|
876
|
+
"--spp-title-text": N?.titleText
|
|
877
|
+
}), [P, F] = a(null), { title: se = "Publish", ariaLabel: I = "Publish", closeAriaLabel: L = "Close" } = re, R = r(() => oe({
|
|
879
878
|
hasSelectedFolder: s != null,
|
|
880
879
|
hasExistingPublicationInFolder: p,
|
|
881
880
|
hasWriteAccess: m,
|
|
@@ -891,7 +890,7 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
891
890
|
_
|
|
892
891
|
]);
|
|
893
892
|
return t(() => {
|
|
894
|
-
let t =
|
|
893
|
+
let t = P?.closest("[role=\"dialog\"]");
|
|
895
894
|
if (!e || !t) return;
|
|
896
895
|
let n = () => t.focus({ preventScroll: !0 });
|
|
897
896
|
n();
|
|
@@ -901,36 +900,36 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
901
900
|
document.addEventListener("focusin", r);
|
|
902
901
|
let i = requestAnimationFrame(() => {
|
|
903
902
|
document.removeEventListener("focusin", r);
|
|
904
|
-
}), a =
|
|
903
|
+
}), a = T?.current;
|
|
905
904
|
return () => {
|
|
906
905
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
907
906
|
};
|
|
908
907
|
}, [
|
|
909
908
|
e,
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
]), /* @__PURE__ */
|
|
909
|
+
P,
|
|
910
|
+
T
|
|
911
|
+
]), /* @__PURE__ */ M(te, {
|
|
913
912
|
open: e,
|
|
914
|
-
onClose:
|
|
915
|
-
header: /* @__PURE__ */
|
|
916
|
-
className:
|
|
917
|
-
children:
|
|
913
|
+
onClose: w,
|
|
914
|
+
header: /* @__PURE__ */ j("span", {
|
|
915
|
+
className: k("block truncate text-center", ie, je.title),
|
|
916
|
+
children: se
|
|
918
917
|
}),
|
|
919
|
-
ariaLabel:
|
|
920
|
-
closeAriaLabel:
|
|
918
|
+
ariaLabel: I,
|
|
919
|
+
closeAriaLabel: L,
|
|
921
920
|
closeDisabled: h,
|
|
922
|
-
style:
|
|
923
|
-
overlayStyle:
|
|
924
|
-
className:
|
|
925
|
-
overlayClassName:
|
|
926
|
-
headerClassName:
|
|
921
|
+
style: ae,
|
|
922
|
+
overlayStyle: ae,
|
|
923
|
+
className: je.panel,
|
|
924
|
+
overlayClassName: je.backdrop,
|
|
925
|
+
headerClassName: k("px-[22px]", je.divider),
|
|
927
926
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
928
|
-
children: [/* @__PURE__ */
|
|
929
|
-
ref:
|
|
930
|
-
className:
|
|
931
|
-
children: /* @__PURE__ */
|
|
927
|
+
children: [/* @__PURE__ */ j("div", {
|
|
928
|
+
ref: F,
|
|
929
|
+
className: k("min-h-0 flex-1 overflow-y-auto", je.content),
|
|
930
|
+
children: /* @__PURE__ */ j("div", {
|
|
932
931
|
className: "p-[22px]",
|
|
933
|
-
children: /* @__PURE__ */
|
|
932
|
+
children: /* @__PURE__ */ j(Te, {
|
|
934
933
|
resource: n,
|
|
935
934
|
renderSummary: i,
|
|
936
935
|
folderItems: o,
|
|
@@ -945,28 +944,28 @@ var A = /* @__PURE__ */ function(e) {
|
|
|
945
944
|
isSubmitting: h,
|
|
946
945
|
hasSubmitError: g,
|
|
947
946
|
allowReplace: _,
|
|
948
|
-
author:
|
|
949
|
-
onAuthorChange:
|
|
950
|
-
rules:
|
|
951
|
-
onRulesChange:
|
|
947
|
+
author: v,
|
|
948
|
+
onAuthorChange: ee,
|
|
949
|
+
rules: y,
|
|
950
|
+
onRulesChange: b,
|
|
952
951
|
ruleSourceOptions: x,
|
|
953
952
|
isRulesLoading: S,
|
|
954
|
-
hasRulesLoadError:
|
|
955
|
-
labels:
|
|
956
|
-
styles:
|
|
953
|
+
hasRulesLoadError: C,
|
|
954
|
+
labels: D,
|
|
955
|
+
styles: A
|
|
957
956
|
})
|
|
958
957
|
})
|
|
959
|
-
}), /* @__PURE__ */
|
|
958
|
+
}), /* @__PURE__ */ j(Ae, {
|
|
960
959
|
version: n?.version,
|
|
961
960
|
hasExistingPublicationInFolder: p,
|
|
962
961
|
allowReplace: _,
|
|
963
|
-
isSubmitDisabled:
|
|
964
|
-
isSubmitLoading:
|
|
965
|
-
onCancel:
|
|
966
|
-
onSubmit:
|
|
967
|
-
labels:
|
|
962
|
+
isSubmitDisabled: R.isSubmitDisabled,
|
|
963
|
+
isSubmitLoading: R.isSubmitLoading,
|
|
964
|
+
onCancel: w,
|
|
965
|
+
onSubmit: E,
|
|
966
|
+
labels: ne
|
|
968
967
|
})]
|
|
969
968
|
});
|
|
970
969
|
};
|
|
971
970
|
//#endregion
|
|
972
|
-
export {
|
|
971
|
+
export { Se as PUBLISH_PANEL_CLASS, P as PublicationRuleFunction, ge as PublishAccessRuleEditor, ye as PublishAccessRules, F as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, be as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, H as collectFolderKeys, oe as derivePublishState, le as filterFolderTree, I as formatPublishedDate, W as fromFolderPathKey, fe as getSiblingFolderNames, q as getUniqueFolderName, V as mergeFolderPaths, ue as sortFolderTree, de as toDialFileTree, U as toFolderPathKey, ce as usePublishFlow, K as validateFolderName };
|