@epam/ai-dial-publish-panel 1.3.0-dev.28 → 1.3.0-dev.282
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/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts.map +1 -1
- package/components/PublishAccessRules/PublishAccessRules.d.ts.map +1 -1
- package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +1 -1
- package/components/PublishPanel/PublishFooter.d.ts +2 -0
- package/components/PublishPanel/PublishFooter.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +4 -2
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +8 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/index.css +2 -1
- package/index.js +448 -441
- package/models/publish-access-rule-editor.d.ts +1 -1
- package/models/publish-access-rule-editor.d.ts.map +1 -1
- package/models/publish.d.ts +3 -3
- package/package.json +5 -5
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,
|
|
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 y, NotificationType as b, NotificationVariant as x, Search as S, Select as C, SideDrawer as ee, Spinner as w, Tag as T, TagInput as E } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { ResourceSummary as D, TAG_INPUT_TAG_CLASS_NAME as O, buildCssVars as k, mergeClasses as A } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
5
|
+
import { IconFolderPlus as te, IconPlus as ne, IconTrashX as re } from "@tabler/icons-react";
|
|
6
|
+
import { DialFileNodeType as ie, 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
|
+
}, I = 864e5, L = (e, t = Date.now(), n) => {
|
|
37
|
+
let r = Math.floor((t - e) / I);
|
|
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
|
+
}, R = (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,27 +51,27 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
51
51
|
}]
|
|
52
52
|
} : {
|
|
53
53
|
...e,
|
|
54
|
-
children: e.children ?
|
|
55
|
-
}),
|
|
54
|
+
children: e.children ? R(e.children, t, n) : e.children
|
|
55
|
+
}), z = (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 ? z(e.children, t, n) : e.children
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, B = ({ 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, y] = a(!1), [b, x] = a(!1), [S, C] = a([]), [ee, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j,
|
|
69
|
+
let [g, _] = a(), [v, y] = a(!1), [b, x] = a(!1), [S, C] = a([]), [ee, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j, M] = a(!1);
|
|
70
70
|
t(() => {
|
|
71
71
|
j || O(c);
|
|
72
72
|
}, [c, j]);
|
|
73
|
-
let
|
|
74
|
-
|
|
73
|
+
let N = e((e) => {
|
|
74
|
+
M(!0), O(e);
|
|
75
75
|
}, []);
|
|
76
76
|
t(() => {
|
|
77
77
|
if (g == null) {
|
|
@@ -90,22 +90,22 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
90
90
|
e = !0;
|
|
91
91
|
};
|
|
92
92
|
}, [g]);
|
|
93
|
-
let
|
|
93
|
+
let te = r(() => {
|
|
94
94
|
if (!g) return !1;
|
|
95
95
|
let e = g.join("/");
|
|
96
|
-
return i.some((t) => t.folderPath.join("/") === e ? n.version == null
|
|
96
|
+
return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
|
|
97
97
|
}, [
|
|
98
98
|
i,
|
|
99
99
|
n.version,
|
|
100
100
|
g
|
|
101
|
-
]),
|
|
102
|
-
h((n) =>
|
|
101
|
+
]), ne = e(async (e, t) => {
|
|
102
|
+
h((n) => R(n, e, t));
|
|
103
103
|
try {
|
|
104
104
|
await l?.(e, t);
|
|
105
105
|
} catch {
|
|
106
|
-
h((n) =>
|
|
106
|
+
h((n) => z(n, e, t)), x(!0);
|
|
107
107
|
}
|
|
108
|
-
}, [l]),
|
|
108
|
+
}, [l]), re = e(async () => {
|
|
109
109
|
if (!g) return !1;
|
|
110
110
|
y(!0), x(!1);
|
|
111
111
|
try {
|
|
@@ -124,79 +124,79 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
124
124
|
k,
|
|
125
125
|
S,
|
|
126
126
|
g
|
|
127
|
-
]),
|
|
128
|
-
h(o), _(void 0), x(!1), C([]), E(!1), O(c),
|
|
127
|
+
]), ie = e(() => {
|
|
128
|
+
h(o), _(void 0), x(!1), C([]), E(!1), O(c), M(!1), A(!1);
|
|
129
129
|
}, [c, o]);
|
|
130
130
|
return {
|
|
131
131
|
folderItems: m,
|
|
132
132
|
selectedFolderPath: g,
|
|
133
133
|
setSelectedFolderPath: _,
|
|
134
|
-
handleCreateFolder:
|
|
135
|
-
hasExistingPublicationInFolder:
|
|
136
|
-
hasWriteAccess: g
|
|
134
|
+
handleCreateFolder: ne,
|
|
135
|
+
hasExistingPublicationInFolder: te,
|
|
136
|
+
hasWriteAccess: !g || s(g),
|
|
137
137
|
isSubmitting: v,
|
|
138
138
|
hasSubmitError: b,
|
|
139
|
-
handleSubmit:
|
|
140
|
-
reset:
|
|
139
|
+
handleSubmit: re,
|
|
140
|
+
reset: ie,
|
|
141
141
|
rules: S,
|
|
142
142
|
setRules: C,
|
|
143
143
|
author: D,
|
|
144
|
-
setAuthor:
|
|
144
|
+
setAuthor: N,
|
|
145
145
|
publishCredentials: k,
|
|
146
146
|
setPublishCredentials: A,
|
|
147
147
|
isRulesLoading: ee,
|
|
148
148
|
hasRulesLoadError: T
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, se = (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 ? se(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
|
+
}, V = (e, t) => e.localeCompare(t, void 0, {
|
|
160
160
|
sensitivity: "base",
|
|
161
161
|
numeric: !0
|
|
162
|
-
}),
|
|
162
|
+
}), ce = (e) => [...e].sort((e, t) => V(e.name, t.name)).map((e) => e.children ? {
|
|
163
163
|
...e,
|
|
164
|
-
children:
|
|
165
|
-
} : e),
|
|
164
|
+
children: ce(e.children)
|
|
165
|
+
} : e), H = (e, t, n) => {
|
|
166
166
|
let [r, ...i] = t;
|
|
167
167
|
if (r == null) return e;
|
|
168
168
|
let a = [...n, r], o = e.find((e) => e.name === r);
|
|
169
169
|
return o ? i.length ? e.map((e) => e === o ? {
|
|
170
170
|
...e,
|
|
171
|
-
children:
|
|
171
|
+
children: H(e.children ?? [], i, a)
|
|
172
172
|
} : e) : e : [...e, {
|
|
173
173
|
path: a,
|
|
174
174
|
name: r,
|
|
175
|
-
children: i.length ?
|
|
175
|
+
children: i.length ? H([], i, a) : void 0
|
|
176
176
|
}];
|
|
177
|
-
},
|
|
178
|
-
let t =
|
|
177
|
+
}, U = (e, t) => t.reduce((e, t) => t.length ? H(e, t, []) : e, e), W = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? W(e.children) : []]), G = (e) => e.join("/"), K = (e) => e.split("/").filter(Boolean), le = (e) => e.map((e) => {
|
|
178
|
+
let t = G(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 ? le(e.children) : void 0
|
|
185
185
|
};
|
|
186
|
-
}),
|
|
186
|
+
}), q = /[/\\:;,={}&"]/, ue = (e, t, n) => {
|
|
187
187
|
let r = e.trim();
|
|
188
|
-
return r ? r.includes("..") ||
|
|
189
|
-
},
|
|
188
|
+
return r ? r.includes("..") || q.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
|
|
189
|
+
}, J = (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
|
+
}, de = (e, t) => {
|
|
196
196
|
if (t.length === 0) return e.map((e) => e.name);
|
|
197
|
-
let n =
|
|
197
|
+
let n = G(t), r = (e) => {
|
|
198
198
|
for (let t of e) {
|
|
199
|
-
if (
|
|
199
|
+
if (G(t.path) === n) return t;
|
|
200
200
|
let e = t.children ? r(t.children) : void 0;
|
|
201
201
|
if (e) return e;
|
|
202
202
|
}
|
|
@@ -207,17 +207,17 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
207
207
|
error: "_error_jqcm2_14",
|
|
208
208
|
selectField: "_selectField_jqcm2_28",
|
|
209
209
|
selectFieldOpen: "_selectFieldOpen_jqcm2_40"
|
|
210
|
-
},
|
|
210
|
+
}, fe = 20, X = 200, pe = 8, me = (e) => {
|
|
211
211
|
let t = e.trim();
|
|
212
|
-
if (t.length === 0 || t.length >
|
|
212
|
+
if (t.length === 0 || t.length > X) return !1;
|
|
213
213
|
try {
|
|
214
214
|
return new RegExp(t) instanceof RegExp;
|
|
215
215
|
} catch {
|
|
216
216
|
return !1;
|
|
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
|
+
...k({
|
|
221
221
|
"--pare-mobile-bg": g.colors?.mobileBackground,
|
|
222
222
|
"--pare-bg": g.colors?.background,
|
|
223
223
|
"--pare-error-text": g.colors?.errorText,
|
|
@@ -227,104 +227,103 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
227
227
|
"--pare-select-border-focus": g.colors?.selectBorderFocus
|
|
228
228
|
}),
|
|
229
229
|
...g.cssVars
|
|
230
|
-
}, { sourceLabel:
|
|
230
|
+
}, { sourceLabel: y = "Source", sourcePlaceholder: b = "Select...", functionLabel: x = "Function", equalOptionLabel: S = "Equal", containOptionLabel: ee = "Contain", regexOptionLabel: w = "Regex", targetsLabel: T = "Targets", targetsPlaceholder: D = "Add a target", targetsHintLabel: j = "Press Enter or comma to add a target.", patternLabel: te = "Pattern", patternPlaceholder: ne = "Enter a regular expression", invalidRegexError: re = "Enter a valid regular expression.", requiredFieldError: ie = "This field is required.", targetsRequiredError: ae = "Add at least one target.", saveLabel: F = "Save", cancelLabel: oe = "Cancel", dialogAriaLabel: I = "Add access rule" } = u, L = n(), R = n(), z = n(), B = n(), se = i(null);
|
|
231
231
|
t(() => {
|
|
232
|
-
|
|
232
|
+
se.current?.focus();
|
|
233
233
|
}, []);
|
|
234
|
-
let [V,
|
|
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 = A(Y.selectField, q && Y.selectFieldOpen), ve = A(Y.selectField, X && Y.selectFieldOpen), Q = r(() => e.map((e) => ({
|
|
235
235
|
value: e,
|
|
236
236
|
label: e,
|
|
237
|
-
labelNode:
|
|
237
|
+
labelNode: J.trim() ? /* @__PURE__ */ M(m, {
|
|
238
238
|
text: e,
|
|
239
|
-
query:
|
|
239
|
+
query: J,
|
|
240
240
|
maxLines: 1
|
|
241
241
|
}) : void 0
|
|
242
|
-
})), [e,
|
|
242
|
+
})), [e, J]), ye = r(() => [
|
|
243
243
|
{
|
|
244
|
-
value:
|
|
244
|
+
value: P.Equal,
|
|
245
245
|
label: S
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
value:
|
|
249
|
-
label:
|
|
248
|
+
value: P.Contain,
|
|
249
|
+
label: ee
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
|
-
value:
|
|
252
|
+
value: P.Regex,
|
|
253
253
|
label: w
|
|
254
254
|
}
|
|
255
255
|
], [
|
|
256
256
|
S,
|
|
257
|
-
|
|
257
|
+
ee,
|
|
258
258
|
w
|
|
259
|
-
]),
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
ref:
|
|
259
|
+
]), be = H === P.Regex, $ = me(K), xe = V != null && H != null && (be ? $ : W.length > 0);
|
|
260
|
+
return /* @__PURE__ */ N("div", {
|
|
261
|
+
ref: se,
|
|
262
262
|
role: "dialog",
|
|
263
263
|
"aria-modal": "true",
|
|
264
|
-
"aria-label":
|
|
264
|
+
"aria-label": I,
|
|
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: A("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:
|
|
275
|
-
options:
|
|
272
|
+
/* @__PURE__ */ M(C, {
|
|
273
|
+
id: R,
|
|
274
|
+
labelProps: { label: y },
|
|
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:
|
|
281
|
-
searchable: e.length >
|
|
282
|
-
searchPlaceholder:
|
|
283
|
-
onSearchQueryChange:
|
|
280
|
+
placeholder: b,
|
|
281
|
+
searchable: e.length > pe,
|
|
282
|
+
searchPlaceholder: b,
|
|
283
|
+
onSearchQueryChange: de,
|
|
284
284
|
disabled: c,
|
|
285
|
-
open:
|
|
286
|
-
onOpenChange:
|
|
287
|
-
fieldClassName:
|
|
285
|
+
open: q,
|
|
286
|
+
onOpenChange: ue,
|
|
287
|
+
fieldClassName: _e,
|
|
288
288
|
invalid: Z && V == null,
|
|
289
|
-
error: Z && V == null ?
|
|
289
|
+
error: Z && V == null ? ie : void 0
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ M(C, {
|
|
292
292
|
labelProps: { label: x },
|
|
293
|
-
id:
|
|
294
|
-
options:
|
|
293
|
+
id: z,
|
|
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 === P.Regex != (t === P.Regex) && (G([]), le("")), U(t), he(!1);
|
|
299
299
|
},
|
|
300
300
|
placeholder: x,
|
|
301
301
|
disabled: c,
|
|
302
302
|
open: X,
|
|
303
|
-
onOpenChange:
|
|
304
|
-
fieldClassName:
|
|
303
|
+
onOpenChange: he,
|
|
304
|
+
fieldClassName: ve,
|
|
305
305
|
invalid: Z && H == null,
|
|
306
|
-
error: Z && H == null ?
|
|
306
|
+
error: Z && H == null ? ie : void 0
|
|
307
307
|
}),
|
|
308
|
-
|
|
309
|
-
id: `${
|
|
310
|
-
labelProps: { label:
|
|
311
|
-
placeholder:
|
|
308
|
+
be ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(h, {
|
|
309
|
+
id: `${L}-input`,
|
|
310
|
+
labelProps: { label: te },
|
|
311
|
+
placeholder: ne,
|
|
312
312
|
value: K,
|
|
313
|
-
onChange: (e) =>
|
|
314
|
-
invalid: (K.length > 0 || Z) &&
|
|
315
|
-
"aria-describedby": (K.length > 0 || Z) &&
|
|
313
|
+
onChange: (e) => le(e ?? ""),
|
|
314
|
+
invalid: (K.length > 0 || Z) && !$,
|
|
315
|
+
"aria-describedby": (K.length > 0 || Z) && !$ ? L : void 0,
|
|
316
316
|
disabled: c
|
|
317
|
-
}), (K.length > 0 || Z) &&
|
|
318
|
-
id:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
})] }) : /* @__PURE__ */ k(ee, {
|
|
317
|
+
}), (K.length > 0 || Z) && !$ && /* @__PURE__ */ M(d, {
|
|
318
|
+
id: L,
|
|
319
|
+
className: A("mt-1 block", p, Y.error),
|
|
320
|
+
text: re
|
|
321
|
+
})] }) : /* @__PURE__ */ M(E, {
|
|
323
322
|
id: B,
|
|
324
|
-
labelProps: { label:
|
|
325
|
-
placeholder:
|
|
326
|
-
caption: Z && W.length === 0 ? void 0 :
|
|
327
|
-
error: Z && W.length === 0 ?
|
|
323
|
+
labelProps: { label: T },
|
|
324
|
+
placeholder: D,
|
|
325
|
+
caption: Z && W.length === 0 ? void 0 : j,
|
|
326
|
+
error: Z && W.length === 0 ? ae : void 0,
|
|
328
327
|
invalid: Z && W.length === 0,
|
|
329
328
|
value: W,
|
|
330
329
|
onChange: (e) => {
|
|
@@ -336,25 +335,21 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
336
335
|
G(t);
|
|
337
336
|
},
|
|
338
337
|
disabled: c,
|
|
339
|
-
tagClassName:
|
|
338
|
+
tagClassName: O
|
|
340
339
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ N("div", {
|
|
342
341
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
344
|
-
label:
|
|
342
|
+
children: [/* @__PURE__ */ M(f, {
|
|
343
|
+
label: oe,
|
|
345
344
|
onClick: s,
|
|
346
345
|
disabled: c
|
|
347
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ M(v, {
|
|
348
347
|
label: F,
|
|
349
348
|
onClick: () => {
|
|
350
|
-
|
|
351
|
-
he(!0);
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
o({
|
|
349
|
+
!xe || V == null || H == null ? ge(!0) : o({
|
|
355
350
|
source: V,
|
|
356
351
|
function: H,
|
|
357
|
-
targets:
|
|
352
|
+
targets: be ? [K.trim()] : W
|
|
358
353
|
});
|
|
359
354
|
},
|
|
360
355
|
disabled: c
|
|
@@ -362,15 +357,15 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
362
357
|
})
|
|
363
358
|
]
|
|
364
359
|
});
|
|
365
|
-
},
|
|
360
|
+
}, Z = {
|
|
366
361
|
ruleRow: "_ruleRow_nx0en_1",
|
|
367
362
|
heading: "_heading_nx0en_5",
|
|
368
363
|
hint: "_hint_nx0en_9",
|
|
369
364
|
loading: "_loading_nx0en_13",
|
|
370
365
|
ruleText: "_ruleText_nx0en_17"
|
|
371
|
-
},
|
|
372
|
-
let
|
|
373
|
-
...
|
|
366
|
+
}, ge = 20, _e = (e, t) => e === P.Equal ? t.equal : e === P.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: S, labels: C = {}, headingClassName: ee = "dial-body-semi-text", hintClassName: T = "dial-small-text", loadingClassName: E = "dial-small-text", ruleTextClassName: D = "dial-small-text", ruleSourceClassName: O = "dial-small-semi-text", styles: j = {} }) => {
|
|
367
|
+
let te = {
|
|
368
|
+
...k({
|
|
374
369
|
"--par-rule-bg": j.colors?.ruleBackground,
|
|
375
370
|
"--par-heading-text": j.colors?.headingText,
|
|
376
371
|
"--par-hint-text": j.colors?.hintText,
|
|
@@ -378,137 +373,136 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
378
373
|
"--par-rule-text": j.colors?.ruleText
|
|
379
374
|
}),
|
|
380
375
|
...j.cssVars
|
|
381
|
-
}, { heading: ie = "Allow access if all match", folderScopeHint:
|
|
376
|
+
}, { heading: ie = "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: I = "Add rule", clearAllLabel: L = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate: z = "Remove rule for {source}: {targets}", equalFunctionLabel: B = "Equal", containFunctionLabel: se = "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 } = C, q = n(), [ue, J] = a(!1), [de, Y] = a(""), fe = i(null), X = i(m);
|
|
382
377
|
t(() => {
|
|
383
|
-
|
|
378
|
+
X.current && !m && e.length > 0 && Y(K), X.current = m;
|
|
384
379
|
}, [
|
|
385
380
|
m,
|
|
386
381
|
e,
|
|
387
|
-
|
|
382
|
+
K
|
|
388
383
|
]);
|
|
389
|
-
let
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
-
J(!1),
|
|
384
|
+
let pe = () => {
|
|
385
|
+
fe.current = document.activeElement, J(!0);
|
|
386
|
+
}, me = () => {
|
|
387
|
+
J(!1), fe.current?.focus?.();
|
|
388
|
+
}, ve = (t) => {
|
|
389
|
+
r([...e, t]), Y(U), me();
|
|
393
390
|
}, Q = (t) => {
|
|
394
|
-
r(
|
|
395
|
-
},
|
|
396
|
-
r(
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}, $ = e.length >= y, ye = p || $, be = u != null && u !== "";
|
|
404
|
-
return /* @__PURE__ */ A("div", {
|
|
391
|
+
r(e.filter((e, n) => n !== t)), Y(W);
|
|
392
|
+
}, ye = () => {
|
|
393
|
+
r([]), Y(G);
|
|
394
|
+
}, be = {
|
|
395
|
+
equal: B,
|
|
396
|
+
contain: se,
|
|
397
|
+
regex: V
|
|
398
|
+
}, $ = e.length >= v, xe = d || $, Se = u != null && u !== "";
|
|
399
|
+
return /* @__PURE__ */ N("div", {
|
|
405
400
|
role: "group",
|
|
406
401
|
"aria-labelledby": q,
|
|
407
|
-
style:
|
|
408
|
-
className:
|
|
402
|
+
style: te,
|
|
403
|
+
className: A(d && "pointer-events-none opacity-60"),
|
|
409
404
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
children: Y
|
|
405
|
+
/* @__PURE__ */ M(g, {
|
|
406
|
+
visuallyHidden: !0,
|
|
407
|
+
as: _.Span,
|
|
408
|
+
children: de
|
|
415
409
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ N("div", {
|
|
417
411
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ M("div", {
|
|
419
413
|
id: q,
|
|
420
|
-
className:
|
|
414
|
+
className: A(ee, Z.heading),
|
|
421
415
|
children: ie
|
|
422
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
416
|
+
}), e.length > 0 && /* @__PURE__ */ M(f, {
|
|
423
417
|
variant: o.Primary,
|
|
424
418
|
label: L,
|
|
425
|
-
onClick:
|
|
426
|
-
disabled:
|
|
419
|
+
onClick: ye,
|
|
420
|
+
disabled: d
|
|
427
421
|
})]
|
|
428
422
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
className:
|
|
431
|
-
children:
|
|
423
|
+
/* @__PURE__ */ M("p", {
|
|
424
|
+
className: A("mb-2", T, Z.hint),
|
|
425
|
+
children: Se ? ae.replace("{folder}", u) : P
|
|
432
426
|
}),
|
|
433
|
-
e.length > 0 && !
|
|
427
|
+
e.length > 0 && !Se && /* @__PURE__ */ M("div", {
|
|
434
428
|
className: "mb-2",
|
|
435
|
-
children: /* @__PURE__ */
|
|
436
|
-
type:
|
|
437
|
-
variant:
|
|
438
|
-
message:
|
|
429
|
+
children: /* @__PURE__ */ M(y, {
|
|
430
|
+
type: b.SectionMessage,
|
|
431
|
+
variant: x.Warning,
|
|
432
|
+
message: F
|
|
439
433
|
})
|
|
440
434
|
}),
|
|
441
|
-
m && /* @__PURE__ */
|
|
442
|
-
className:
|
|
443
|
-
children: [/* @__PURE__ */
|
|
435
|
+
m && /* @__PURE__ */ N("div", {
|
|
436
|
+
className: A("mb-2 flex items-center gap-2", E, Z.loading),
|
|
437
|
+
children: [/* @__PURE__ */ M(w, {
|
|
444
438
|
size: 16,
|
|
445
|
-
ariaLabel:
|
|
446
|
-
}), /* @__PURE__ */
|
|
439
|
+
ariaLabel: ce
|
|
440
|
+
}), /* @__PURE__ */ M("span", { children: ce })]
|
|
447
441
|
}),
|
|
448
|
-
h && /* @__PURE__ */
|
|
442
|
+
h && /* @__PURE__ */ M("div", {
|
|
449
443
|
className: "mb-2",
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
-
type:
|
|
452
|
-
variant:
|
|
453
|
-
message:
|
|
444
|
+
children: /* @__PURE__ */ M(y, {
|
|
445
|
+
type: b.SectionMessage,
|
|
446
|
+
variant: x.Warning,
|
|
447
|
+
message: H
|
|
454
448
|
})
|
|
455
449
|
}),
|
|
456
|
-
e.length > 0 && /* @__PURE__ */
|
|
450
|
+
e.length > 0 && /* @__PURE__ */ M("ul", {
|
|
457
451
|
className: "mb-3 flex flex-col gap-2",
|
|
458
452
|
children: e.map((e, t) => {
|
|
459
453
|
let n = e.targets.join(` ${R} `), r = z.replace("{source}", e.source).replace("{targets}", n);
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
className:
|
|
462
|
-
children: [/* @__PURE__ */
|
|
463
|
-
className:
|
|
454
|
+
return /* @__PURE__ */ N("li", {
|
|
455
|
+
className: A("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Z.ruleRow),
|
|
456
|
+
children: [/* @__PURE__ */ N("span", {
|
|
457
|
+
className: A("truncate", D, Z.ruleText),
|
|
464
458
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ M("span", {
|
|
466
460
|
className: O,
|
|
467
461
|
children: e.source
|
|
468
462
|
}),
|
|
469
463
|
" ",
|
|
470
|
-
|
|
464
|
+
_e(e.function, be),
|
|
471
465
|
": ",
|
|
472
466
|
n
|
|
473
467
|
]
|
|
474
|
-
}), /* @__PURE__ */
|
|
475
|
-
icon: /* @__PURE__ */
|
|
468
|
+
}), /* @__PURE__ */ M(p, {
|
|
469
|
+
icon: /* @__PURE__ */ M(re, {
|
|
476
470
|
size: c.SM,
|
|
477
471
|
"aria-hidden": !0,
|
|
478
472
|
stroke: l
|
|
479
473
|
}),
|
|
480
474
|
"aria-label": r,
|
|
481
|
-
onClick: () =>
|
|
482
|
-
disabled:
|
|
475
|
+
onClick: () => Q(t),
|
|
476
|
+
disabled: d
|
|
483
477
|
})]
|
|
484
478
|
}, t);
|
|
485
479
|
})
|
|
486
480
|
}),
|
|
487
|
-
|
|
481
|
+
ue && /* @__PURE__ */ M(he, {
|
|
488
482
|
sourceOptions: s,
|
|
489
|
-
onSave:
|
|
490
|
-
onCancel:
|
|
491
|
-
disabled:
|
|
492
|
-
maxTargets:
|
|
493
|
-
labels:
|
|
483
|
+
onSave: ve,
|
|
484
|
+
onCancel: me,
|
|
485
|
+
disabled: d,
|
|
486
|
+
maxTargets: S,
|
|
487
|
+
labels: le,
|
|
494
488
|
styles: j.editor
|
|
495
489
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ M("div", {
|
|
497
491
|
className: "flex flex-wrap items-center gap-2",
|
|
498
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ M(f, {
|
|
499
493
|
label: I,
|
|
500
|
-
iconBefore: /* @__PURE__ */
|
|
494
|
+
iconBefore: /* @__PURE__ */ M(ne, {
|
|
501
495
|
size: c.SM,
|
|
502
496
|
"aria-hidden": !0,
|
|
503
497
|
stroke: l
|
|
504
498
|
}),
|
|
505
|
-
onClick:
|
|
506
|
-
disabled:
|
|
499
|
+
onClick: pe,
|
|
500
|
+
disabled: xe
|
|
507
501
|
})
|
|
508
502
|
}),
|
|
509
|
-
$ && /* @__PURE__ */
|
|
510
|
-
className:
|
|
511
|
-
children:
|
|
503
|
+
$ && /* @__PURE__ */ M("p", {
|
|
504
|
+
className: A("mt-2", T, Z.hint),
|
|
505
|
+
children: oe.replace("{max}", String(v))
|
|
512
506
|
})
|
|
513
507
|
]
|
|
514
508
|
});
|
|
@@ -519,8 +513,8 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
519
513
|
date: "_date_d0adf_17",
|
|
520
514
|
emptyState: "_emptyState_d0adf_21",
|
|
521
515
|
stripedRow: "_stripedRow_d0adf_25"
|
|
522
|
-
},
|
|
523
|
-
let m =
|
|
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 = k({
|
|
524
518
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
525
519
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
526
520
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -531,233 +525,241 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
531
525
|
"--phl-date-text": p?.dateText,
|
|
532
526
|
"--phl-empty-text": p?.emptyStateText,
|
|
533
527
|
"--phl-striped-bg": p?.stripedBackground
|
|
534
|
-
}), h =
|
|
535
|
-
return n ? /* @__PURE__ */
|
|
528
|
+
}), h = A(f, Q.emptyState);
|
|
529
|
+
return n ? /* @__PURE__ */ M("p", {
|
|
536
530
|
style: m,
|
|
537
531
|
className: h,
|
|
538
532
|
children: c
|
|
539
|
-
}) : r ? /* @__PURE__ */
|
|
533
|
+
}) : r ? /* @__PURE__ */ M("p", {
|
|
540
534
|
style: m,
|
|
541
535
|
className: h,
|
|
542
|
-
role: "
|
|
536
|
+
role: "status",
|
|
543
537
|
children: l
|
|
544
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
538
|
+
}) : e.length === 0 ? /* @__PURE__ */ M("p", {
|
|
545
539
|
style: m,
|
|
546
540
|
className: h,
|
|
547
541
|
children: s
|
|
548
|
-
}) : /* @__PURE__ */
|
|
542
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
549
543
|
style: m,
|
|
550
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
551
|
-
className:
|
|
552
|
-
children: [/* @__PURE__ */
|
|
544
|
+
children: e.map((e, n) => /* @__PURE__ */ N("li", {
|
|
545
|
+
className: A("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
|
|
546
|
+
children: [/* @__PURE__ */ N("span", {
|
|
553
547
|
className: "flex min-w-0 items-center gap-2",
|
|
554
548
|
style: m,
|
|
555
549
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
className:
|
|
550
|
+
/* @__PURE__ */ N("span", {
|
|
551
|
+
className: A(u, Q.version),
|
|
558
552
|
children: [
|
|
559
553
|
i,
|
|
560
554
|
" ",
|
|
561
555
|
e.version
|
|
562
556
|
]
|
|
563
557
|
}),
|
|
564
|
-
e.version === t && /* @__PURE__ */
|
|
558
|
+
e.version === t && /* @__PURE__ */ M(T, {
|
|
565
559
|
label: a,
|
|
566
|
-
className:
|
|
560
|
+
className: A("shrink-0 whitespace-nowrap", Q.currentBadge)
|
|
567
561
|
}),
|
|
568
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
562
|
+
e.publishCredentials === !0 && /* @__PURE__ */ M(T, {
|
|
569
563
|
label: o,
|
|
570
|
-
className:
|
|
564
|
+
className: A("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
|
|
571
565
|
})
|
|
572
566
|
]
|
|
573
|
-
}), /* @__PURE__ */
|
|
574
|
-
className:
|
|
575
|
-
children:
|
|
567
|
+
}), /* @__PURE__ */ M("span", {
|
|
568
|
+
className: A(d, Q.date),
|
|
569
|
+
children: L(e.publishedAt)
|
|
576
570
|
})]
|
|
577
571
|
}, `${e.version}-${n}`))
|
|
578
572
|
});
|
|
579
|
-
},
|
|
573
|
+
}, be = {
|
|
580
574
|
divider: "_divider_1gs31_1",
|
|
581
575
|
tree: "_tree_1gs31_17"
|
|
582
|
-
},
|
|
583
|
-
let
|
|
584
|
-
...
|
|
585
|
-
...
|
|
586
|
-
}, [
|
|
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: y = "Folder name cannot be empty.", invalidFolderNameError: b = "Folder name contains invalid characters.", duplicateFolderNameError: x = "A folder with this name already exists.", rootLabel: S = "Organization", expandedPaths: C, onExpandedPathsChange: ee, loadingPaths: w, styles: T = {} }) => {
|
|
577
|
+
let E = {
|
|
578
|
+
...k({ "--pft-divider": T.colors?.divider }),
|
|
579
|
+
...T.cssVars
|
|
580
|
+
}, [D, O] = a(() => new Set(n?.map((e, t) => G(n.slice(0, t + 1))) ?? [])), j = C ?? D, re = (e) => {
|
|
587
581
|
let t = new Set(e);
|
|
588
|
-
t.delete(""),
|
|
589
|
-
}, [P, F] = a(null), [
|
|
590
|
-
|
|
582
|
+
t.delete(""), ee ? ee(t) : O(t);
|
|
583
|
+
}, [P, F] = a(null), [oe, I] = a(_), L = i(null), R = i(!1);
|
|
584
|
+
t(() => {
|
|
585
|
+
let e = (e) => {
|
|
586
|
+
e.target instanceof Element && e.target.closest(`[${$}]`) && (R.current = !0);
|
|
587
|
+
};
|
|
588
|
+
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
589
|
+
}, []);
|
|
590
|
+
let z = u.trim(), B = P != null, V = r(() => se(e, u), [e, u]), H = z.length > 0 && V.length === 0, U = !B && z.length > 0, q = r(() => ce(U ? V : e), [
|
|
591
|
+
U,
|
|
591
592
|
V,
|
|
592
593
|
e
|
|
593
|
-
]),
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
]),
|
|
594
|
+
]), Y = r(() => /* @__PURE__ */ new Set(["", ...W(q)]), [q]), fe = r(() => /* @__PURE__ */ new Set(["", ...U ? Y : j]), [
|
|
595
|
+
U,
|
|
596
|
+
Y,
|
|
597
|
+
j
|
|
598
|
+
]), X = r(() => le(q), [q]), pe = r(() => U && X.length === 0 ? [] : [{
|
|
598
599
|
path: "",
|
|
599
|
-
name:
|
|
600
|
+
name: S,
|
|
600
601
|
folderId: "",
|
|
601
|
-
nodeType:
|
|
602
|
-
items:
|
|
602
|
+
nodeType: ie.FOLDER,
|
|
603
|
+
items: X
|
|
603
604
|
}], [
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
]),
|
|
608
|
-
empty:
|
|
609
|
-
invalid:
|
|
610
|
-
duplicate:
|
|
611
|
-
},
|
|
612
|
-
F(e),
|
|
613
|
-
let t =
|
|
614
|
-
t &&
|
|
615
|
-
},
|
|
616
|
-
let t =
|
|
605
|
+
X,
|
|
606
|
+
S,
|
|
607
|
+
U
|
|
608
|
+
]), me = P ? G(P) : null, he = {
|
|
609
|
+
empty: y,
|
|
610
|
+
invalid: b,
|
|
611
|
+
duplicate: x
|
|
612
|
+
}, Z = (t) => J(H && ue(z, [], he) == null ? z : _, de(e, t)), ge = (e) => {
|
|
613
|
+
F(e), I(Z(e)), L.current = null, R.current = !1;
|
|
614
|
+
let t = G(e);
|
|
615
|
+
t && re(new Set(j).add(t));
|
|
616
|
+
}, _e = () => ge(n ?? []), ve = (e) => {
|
|
617
|
+
let t = K(e.path), n = [{
|
|
617
618
|
key: "add-child",
|
|
618
|
-
label:
|
|
619
|
-
icon: /* @__PURE__ */
|
|
619
|
+
label: g,
|
|
620
|
+
icon: /* @__PURE__ */ M(te, {
|
|
620
621
|
size: c.SM,
|
|
621
622
|
"aria-hidden": !0,
|
|
622
623
|
stroke: l
|
|
623
624
|
}),
|
|
624
|
-
onClick: () =>
|
|
625
|
+
onClick: () => ge(t)
|
|
625
626
|
}];
|
|
626
627
|
return e.path !== "" && n.push({
|
|
627
628
|
key: "add-sibling",
|
|
628
|
-
label:
|
|
629
|
-
icon: /* @__PURE__ */
|
|
629
|
+
label: h,
|
|
630
|
+
icon: /* @__PURE__ */ M(ne, {
|
|
630
631
|
size: c.SM,
|
|
631
632
|
"aria-hidden": !0,
|
|
632
633
|
stroke: l
|
|
633
634
|
}),
|
|
634
|
-
onClick: () =>
|
|
635
|
+
onClick: () => ge(t.slice(0, -1))
|
|
635
636
|
}), n;
|
|
636
|
-
},
|
|
637
|
+
}, Q = (t) => {
|
|
637
638
|
if (!P) return null;
|
|
638
|
-
let n =
|
|
639
|
-
return
|
|
640
|
-
},
|
|
641
|
-
if (!P) return;
|
|
642
|
-
let t = e.trim(),
|
|
643
|
-
(
|
|
644
|
-
},
|
|
645
|
-
return /* @__PURE__ */
|
|
646
|
-
style:
|
|
647
|
-
className:
|
|
639
|
+
let n = ue(t, de(e, P), he);
|
|
640
|
+
return L.current = n, n;
|
|
641
|
+
}, ye = (e) => {
|
|
642
|
+
if (!P || R.current) return;
|
|
643
|
+
let t = e.trim(), n = L.current;
|
|
644
|
+
(Q(e) ?? n) || (s(P, t), o([...P, t])), F(null);
|
|
645
|
+
}, xe = () => F(null);
|
|
646
|
+
return /* @__PURE__ */ N("div", {
|
|
647
|
+
style: E,
|
|
648
|
+
className: A(d && "pointer-events-none opacity-60", T.className),
|
|
648
649
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
className:
|
|
651
|
-
children: /* @__PURE__ */
|
|
652
|
-
items:
|
|
650
|
+
/* @__PURE__ */ M("div", {
|
|
651
|
+
className: A("w-full max-w-full min-w-0", be.tree),
|
|
652
|
+
children: /* @__PURE__ */ M(ae, {
|
|
653
|
+
items: pe,
|
|
653
654
|
showFiles: !1,
|
|
654
|
-
selectedPath:
|
|
655
|
-
expandedPaths:
|
|
656
|
-
onExpandedPathsChange:
|
|
657
|
-
loadingPaths:
|
|
655
|
+
selectedPath: n == null ? void 0 : G(n),
|
|
656
|
+
expandedPaths: fe,
|
|
657
|
+
onExpandedPathsChange: re,
|
|
658
|
+
loadingPaths: w,
|
|
658
659
|
onItemClick: (e) => {
|
|
659
|
-
n
|
|
660
|
+
o(n != null && G(n) === e.path ? void 0 : K(e.path));
|
|
660
661
|
},
|
|
661
|
-
getContextMenuItems:
|
|
662
|
-
createdFolderPath:
|
|
663
|
-
newFolderDefaultName:
|
|
664
|
-
onCreateFolderSave:
|
|
665
|
-
onCreateFolderCancel:
|
|
666
|
-
onRenameValidate: (e) =>
|
|
667
|
-
emptyStateTitle:
|
|
662
|
+
getContextMenuItems: ve,
|
|
663
|
+
createdFolderPath: me,
|
|
664
|
+
newFolderDefaultName: oe,
|
|
665
|
+
onCreateFolderSave: ye,
|
|
666
|
+
onCreateFolderCancel: xe,
|
|
667
|
+
onRenameValidate: (e) => Q(e),
|
|
668
|
+
emptyStateTitle: U ? v.replace("{query}", z) : void 0
|
|
668
669
|
})
|
|
669
670
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
className:
|
|
671
|
+
/* @__PURE__ */ M("div", {
|
|
672
|
+
className: A("my-2 h-px", be.divider),
|
|
672
673
|
"aria-hidden": !0
|
|
673
674
|
}),
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ N("div", {
|
|
675
676
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
676
|
-
children: [/* @__PURE__ */
|
|
677
|
-
onClick:
|
|
678
|
-
label:
|
|
679
|
-
iconBefore: /* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ M(f, {
|
|
678
|
+
onClick: _e,
|
|
679
|
+
label: p,
|
|
680
|
+
iconBefore: /* @__PURE__ */ M(ne, {
|
|
680
681
|
size: c.SM,
|
|
681
682
|
"aria-hidden": !0,
|
|
682
683
|
stroke: l
|
|
683
684
|
}),
|
|
684
|
-
disabled:
|
|
685
|
-
}), B && /* @__PURE__ */
|
|
686
|
-
label:
|
|
687
|
-
onClick:
|
|
688
|
-
disabled:
|
|
685
|
+
disabled: d || B
|
|
686
|
+
}), B && /* @__PURE__ */ M(f, {
|
|
687
|
+
label: m,
|
|
688
|
+
onClick: xe,
|
|
689
|
+
disabled: d,
|
|
690
|
+
[$]: ""
|
|
689
691
|
})]
|
|
690
692
|
})
|
|
691
693
|
]
|
|
692
694
|
});
|
|
693
|
-
},
|
|
695
|
+
}, Se = { panel: "dial-publish-panel-panel" }, Ce = {
|
|
694
696
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
695
697
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
696
|
-
},
|
|
697
|
-
let { colors:
|
|
698
|
-
...
|
|
699
|
-
"--pp-summary-title-text":
|
|
700
|
-
"--pp-heading-text":
|
|
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: x, onAuthorChange: C, publishCredentials: ee = !1, onPublishCredentialsChange: w, rules: T, onRulesChange: E, ruleSourceOptions: O, isRulesLoading: j = !1, hasRulesLoadError: te = !1, labels: ne = {}, summaryTitleClassName: re = "dial-body-semi-text", headingClassName: ie = "dial-body-semi-text", calloutFolderNameClassName: ae = "dial-small-paragraph-semi-text", styles: P = {} }) => {
|
|
699
|
+
let { colors: I, folderTree: L, accessRules: R } = P, z = {
|
|
700
|
+
...k({
|
|
701
|
+
"--pp-summary-title-text": I?.summaryTitleText,
|
|
702
|
+
"--pp-heading-text": I?.headingText
|
|
701
703
|
}),
|
|
702
|
-
...
|
|
704
|
+
...P.cssVars
|
|
703
705
|
}, B = {
|
|
704
|
-
border:
|
|
705
|
-
background:
|
|
706
|
-
versionTagBorder:
|
|
707
|
-
versionTagBackground:
|
|
708
|
-
versionTagText:
|
|
709
|
-
}, { folderLabel:
|
|
710
|
-
|
|
711
|
-
},
|
|
712
|
-
hasSelectedFolder:
|
|
706
|
+
border: I?.summaryBorder,
|
|
707
|
+
background: I?.summaryBackground,
|
|
708
|
+
versionTagBorder: I?.summaryVersionTagBorder,
|
|
709
|
+
versionTagBackground: I?.summaryVersionTagBackground,
|
|
710
|
+
versionTagText: I?.summaryVersionTagText
|
|
711
|
+
}, { folderLabel: se = "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." } = ne, [_e, Q] = a(""), ye = n(), be = (e) => {
|
|
712
|
+
Q(e ?? "");
|
|
713
|
+
}, $ = o != null, Te = r(() => oe({
|
|
714
|
+
hasSelectedFolder: $,
|
|
713
715
|
hasExistingPublicationInFolder: p,
|
|
714
|
-
hasWriteAccess:
|
|
715
|
-
isSubmitting:
|
|
716
|
-
hasSubmitError:
|
|
717
|
-
allowReplace:
|
|
716
|
+
hasWriteAccess: m,
|
|
717
|
+
isSubmitting: g,
|
|
718
|
+
hasSubmitError: _,
|
|
719
|
+
allowReplace: v
|
|
718
720
|
}), [
|
|
719
|
-
|
|
721
|
+
$,
|
|
720
722
|
p,
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
]), De =
|
|
726
|
-
className:
|
|
723
|
+
m,
|
|
724
|
+
g,
|
|
725
|
+
_,
|
|
726
|
+
v
|
|
727
|
+
]), De = $ ? o[o.length - 1] ?? J : "", ke = t ? t() : /* @__PURE__ */ M("span", {
|
|
728
|
+
className: A("truncate", re, Ce.summaryTitle),
|
|
727
729
|
children: e?.title
|
|
728
730
|
});
|
|
729
|
-
return /* @__PURE__ */
|
|
730
|
-
className:
|
|
731
|
-
style:
|
|
732
|
-
children: [e?.type == null ? /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ N("div", {
|
|
732
|
+
className: A("flex flex-col gap-5", Se.panel),
|
|
733
|
+
style: z,
|
|
734
|
+
children: [e?.type == null ? /* @__PURE__ */ M(D, {
|
|
733
735
|
colors: B,
|
|
734
|
-
children:
|
|
735
|
-
}) : /* @__PURE__ */
|
|
736
|
+
children: ke
|
|
737
|
+
}) : /* @__PURE__ */ M(D, {
|
|
736
738
|
item: {
|
|
737
739
|
type: e.type,
|
|
738
740
|
name: e.title,
|
|
739
741
|
version: e.version ?? "",
|
|
740
742
|
iconUrl: e.iconUrl
|
|
741
743
|
},
|
|
742
|
-
versionLabel:
|
|
744
|
+
versionLabel: de,
|
|
743
745
|
colors: B
|
|
744
|
-
}), /* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
className:
|
|
747
|
-
children:
|
|
746
|
+
}), /* @__PURE__ */ N("div", { children: [
|
|
747
|
+
/* @__PURE__ */ M("div", {
|
|
748
|
+
className: A("mb-2", ie, Ce.sectionHeading),
|
|
749
|
+
children: se
|
|
748
750
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ M("div", {
|
|
750
752
|
role: "search",
|
|
751
753
|
className: "mb-3",
|
|
752
|
-
children: /* @__PURE__ */
|
|
753
|
-
value:
|
|
754
|
-
onChange:
|
|
755
|
-
placeholder:
|
|
756
|
-
clearLabel:
|
|
757
|
-
"aria-label":
|
|
754
|
+
children: /* @__PURE__ */ M(S, {
|
|
755
|
+
value: _e,
|
|
756
|
+
onChange: be,
|
|
757
|
+
placeholder: fe,
|
|
758
|
+
clearLabel: X,
|
|
759
|
+
"aria-label": fe
|
|
758
760
|
})
|
|
759
761
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ M(xe, {
|
|
761
763
|
items: i,
|
|
762
764
|
selectedPath: o,
|
|
763
765
|
onSelectedPathChange: c,
|
|
@@ -765,114 +767,115 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
765
767
|
expandedPaths: u,
|
|
766
768
|
onExpandedPathsChange: d,
|
|
767
769
|
loadingPaths: f,
|
|
768
|
-
searchQuery:
|
|
769
|
-
disabled:
|
|
770
|
+
searchQuery: _e,
|
|
771
|
+
disabled: g,
|
|
770
772
|
noResultsLabel: U,
|
|
771
773
|
addSiblingFolderLabel: W,
|
|
772
774
|
addChildFolderLabel: G,
|
|
773
775
|
cancelCreatingFolderLabel: K,
|
|
774
|
-
emptyFolderNameError:
|
|
775
|
-
invalidFolderNameError:
|
|
776
|
-
duplicateFolderNameError:
|
|
777
|
-
rootLabel:
|
|
778
|
-
styles:
|
|
776
|
+
emptyFolderNameError: le,
|
|
777
|
+
invalidFolderNameError: q,
|
|
778
|
+
duplicateFolderNameError: ue,
|
|
779
|
+
rootLabel: J,
|
|
780
|
+
styles: L
|
|
779
781
|
}),
|
|
780
|
-
|
|
782
|
+
Te.calloutKind !== F.None && Te.calloutKind !== F.Info && /* @__PURE__ */ M("div", {
|
|
781
783
|
className: "mt-3",
|
|
782
|
-
children: /* @__PURE__ */
|
|
783
|
-
type:
|
|
784
|
-
variant:
|
|
785
|
-
message:
|
|
784
|
+
children: /* @__PURE__ */ M(y, {
|
|
785
|
+
type: b.SectionMessage,
|
|
786
|
+
variant: Ee(Te.calloutKind),
|
|
787
|
+
message: Oe(Te.calloutKind, {
|
|
786
788
|
replaceWarning: V,
|
|
787
|
-
noAccessError:
|
|
789
|
+
noAccessError: ce,
|
|
788
790
|
submitError: H,
|
|
789
791
|
folderName: De,
|
|
790
|
-
version: e?.version
|
|
792
|
+
version: e?.version,
|
|
793
|
+
folderNameClassName: ae
|
|
791
794
|
})
|
|
792
795
|
})
|
|
793
796
|
}),
|
|
794
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ M("div", {
|
|
795
798
|
className: "mt-4",
|
|
796
|
-
children: /* @__PURE__ */
|
|
797
|
-
id:
|
|
799
|
+
children: /* @__PURE__ */ M(h, {
|
|
800
|
+
id: ye,
|
|
798
801
|
labelProps: { label: pe },
|
|
799
|
-
placeholder:
|
|
800
|
-
caption:
|
|
801
|
-
value:
|
|
802
|
+
placeholder: me,
|
|
803
|
+
caption: he,
|
|
804
|
+
value: x,
|
|
802
805
|
onChange: (e) => C(e ?? ""),
|
|
803
|
-
maxLength:
|
|
804
|
-
disabled:
|
|
806
|
+
maxLength: we,
|
|
807
|
+
disabled: g
|
|
805
808
|
})
|
|
806
809
|
}),
|
|
807
|
-
|
|
810
|
+
w != null && /* @__PURE__ */ M("div", {
|
|
808
811
|
className: "mt-4",
|
|
809
|
-
children: /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ M(s, {
|
|
810
813
|
labelProps: { label: Z },
|
|
811
|
-
caption:
|
|
814
|
+
caption: ge,
|
|
812
815
|
isSelected: ee,
|
|
813
|
-
onChange:
|
|
814
|
-
disabled:
|
|
816
|
+
onChange: w,
|
|
817
|
+
disabled: g
|
|
815
818
|
})
|
|
816
819
|
}),
|
|
817
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ M("div", {
|
|
818
821
|
className: "mt-4",
|
|
819
|
-
children: /* @__PURE__ */
|
|
820
|
-
rules:
|
|
821
|
-
onRulesChange:
|
|
822
|
-
sourceOptions:
|
|
823
|
-
folderName:
|
|
824
|
-
disabled:
|
|
825
|
-
isLoading:
|
|
826
|
-
hasLoadError:
|
|
827
|
-
labels:
|
|
828
|
-
styles:
|
|
822
|
+
children: /* @__PURE__ */ M(ve, {
|
|
823
|
+
rules: T,
|
|
824
|
+
onRulesChange: E,
|
|
825
|
+
sourceOptions: O,
|
|
826
|
+
folderName: $ ? De : void 0,
|
|
827
|
+
disabled: g,
|
|
828
|
+
isLoading: j,
|
|
829
|
+
hasLoadError: te,
|
|
830
|
+
labels: Y,
|
|
831
|
+
styles: R
|
|
829
832
|
})
|
|
830
833
|
})
|
|
831
834
|
] })]
|
|
832
835
|
});
|
|
833
|
-
},
|
|
834
|
-
let [
|
|
835
|
-
return
|
|
836
|
-
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
className:
|
|
836
|
+
}, Ee = (e) => e === F.ReplaceWarning ? x.Warning : x.Error, De = (e, t, n) => {
|
|
837
|
+
let [r, i, ...a] = e.split("{folder}");
|
|
838
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ N(j, { children: [
|
|
839
|
+
r,
|
|
840
|
+
/* @__PURE__ */ M("strong", {
|
|
841
|
+
className: n,
|
|
839
842
|
children: t
|
|
840
843
|
}),
|
|
841
|
-
|
|
844
|
+
i
|
|
842
845
|
] });
|
|
843
|
-
},
|
|
844
|
-
let
|
|
845
|
-
return /* @__PURE__ */
|
|
846
|
-
style:
|
|
847
|
-
className:
|
|
848
|
-
children: [/* @__PURE__ */
|
|
849
|
-
label:
|
|
846
|
+
}, Oe = (e, t) => e === F.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === F.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 }) => {
|
|
847
|
+
let u = k({ "--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;
|
|
848
|
+
return /* @__PURE__ */ N("div", {
|
|
849
|
+
style: u,
|
|
850
|
+
className: A("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),
|
|
851
|
+
children: [/* @__PURE__ */ M(f, {
|
|
852
|
+
label: d,
|
|
850
853
|
className: "mobile:flex-1",
|
|
851
|
-
disabled:
|
|
852
|
-
onClick:
|
|
853
|
-
}), /* @__PURE__ */
|
|
854
|
+
disabled: i,
|
|
855
|
+
onClick: a
|
|
856
|
+
}), /* @__PURE__ */ M(v, {
|
|
854
857
|
label: g,
|
|
855
858
|
className: "mobile:flex-1",
|
|
856
|
-
disabled:
|
|
857
|
-
iconBefore:
|
|
858
|
-
onClick:
|
|
859
|
+
disabled: r,
|
|
860
|
+
iconBefore: i ? /* @__PURE__ */ M(w, { size: c.SM }) : void 0,
|
|
861
|
+
onClick: o
|
|
859
862
|
})]
|
|
860
863
|
});
|
|
861
|
-
},
|
|
864
|
+
}, je = {
|
|
862
865
|
backdrop: "_backdrop_16jmd_6",
|
|
863
866
|
panel: "_panel_16jmd_10",
|
|
864
867
|
divider: "_divider_16jmd_15",
|
|
865
868
|
content: "_content_16jmd_19",
|
|
866
869
|
title: "_title_16jmd_24"
|
|
867
|
-
},
|
|
868
|
-
let
|
|
869
|
-
"--spp-backdrop-bg":
|
|
870
|
-
"--spp-panel-bg":
|
|
871
|
-
"--spp-panel-border":
|
|
872
|
-
"--spp-divider-border":
|
|
873
|
-
"--spp-scrollbar-thumb":
|
|
874
|
-
"--spp-title-text":
|
|
875
|
-
}), [
|
|
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: y, rules: b, onRulesChange: x, ruleSourceOptions: S, isRulesLoading: C = !1, hasRulesLoadError: w = !1, onClose: T, returnFocusRef: E, onSubmit: D, panelLabels: O, panelStyles: j, panelSummaryTitleClassName: te, panelHeadingClassName: ne, panelCalloutFolderNameClassName: re, footerLabels: ie, labels: ae = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
|
|
871
|
+
let I = k({
|
|
872
|
+
"--spp-backdrop-bg": F?.backdropBackground,
|
|
873
|
+
"--spp-panel-bg": F?.panelBackground,
|
|
874
|
+
"--spp-panel-border": F?.panelBorder,
|
|
875
|
+
"--spp-divider-border": F?.dividerBorder,
|
|
876
|
+
"--spp-scrollbar-thumb": F?.scrollbarThumb,
|
|
877
|
+
"--spp-title-text": F?.titleText
|
|
878
|
+
}), [L, R] = a(null), { title: z = "Publish", ariaLabel: B = "Publish", closeAriaLabel: se = "Close" } = ae, V = r(() => oe({
|
|
876
879
|
hasSelectedFolder: s != null,
|
|
877
880
|
hasExistingPublicationInFolder: p,
|
|
878
881
|
hasWriteAccess: m,
|
|
@@ -888,7 +891,7 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
888
891
|
_
|
|
889
892
|
]);
|
|
890
893
|
return t(() => {
|
|
891
|
-
let t =
|
|
894
|
+
let t = L?.closest("[role=\"dialog\"]");
|
|
892
895
|
if (!e || !t) return;
|
|
893
896
|
let n = () => t.focus({ preventScroll: !0 });
|
|
894
897
|
n();
|
|
@@ -898,36 +901,36 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
898
901
|
document.addEventListener("focusin", r);
|
|
899
902
|
let i = requestAnimationFrame(() => {
|
|
900
903
|
document.removeEventListener("focusin", r);
|
|
901
|
-
}), a =
|
|
904
|
+
}), a = E?.current;
|
|
902
905
|
return () => {
|
|
903
906
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
904
907
|
};
|
|
905
908
|
}, [
|
|
906
909
|
e,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
]), /* @__PURE__ */
|
|
910
|
+
L,
|
|
911
|
+
E
|
|
912
|
+
]), /* @__PURE__ */ N(ee, {
|
|
910
913
|
open: e,
|
|
911
914
|
onClose: T,
|
|
912
|
-
header: /* @__PURE__ */
|
|
913
|
-
className:
|
|
914
|
-
children:
|
|
915
|
+
header: /* @__PURE__ */ M("span", {
|
|
916
|
+
className: A("block truncate text-center", P, je.title),
|
|
917
|
+
children: z
|
|
915
918
|
}),
|
|
916
|
-
ariaLabel:
|
|
917
|
-
closeAriaLabel:
|
|
919
|
+
ariaLabel: B,
|
|
920
|
+
closeAriaLabel: se,
|
|
918
921
|
closeDisabled: h,
|
|
919
|
-
style:
|
|
920
|
-
overlayStyle:
|
|
921
|
-
className:
|
|
922
|
-
overlayClassName:
|
|
923
|
-
headerClassName:
|
|
922
|
+
style: I,
|
|
923
|
+
overlayStyle: I,
|
|
924
|
+
className: je.panel,
|
|
925
|
+
overlayClassName: je.backdrop,
|
|
926
|
+
headerClassName: A("px-[22px]", je.divider),
|
|
924
927
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
925
|
-
children: [/* @__PURE__ */
|
|
926
|
-
ref:
|
|
927
|
-
className:
|
|
928
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: [/* @__PURE__ */ M("div", {
|
|
929
|
+
ref: R,
|
|
930
|
+
className: A("min-h-0 flex-1 overflow-y-auto", je.content),
|
|
931
|
+
children: /* @__PURE__ */ M("div", {
|
|
929
932
|
className: "p-[22px]",
|
|
930
|
-
children: /* @__PURE__ */
|
|
933
|
+
children: /* @__PURE__ */ M(Te, {
|
|
931
934
|
resource: n,
|
|
932
935
|
renderSummary: i,
|
|
933
936
|
folderItems: o,
|
|
@@ -945,24 +948,28 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
945
948
|
author: v,
|
|
946
949
|
onAuthorChange: y,
|
|
947
950
|
rules: b,
|
|
948
|
-
onRulesChange:
|
|
949
|
-
ruleSourceOptions:
|
|
950
|
-
isRulesLoading:
|
|
951
|
+
onRulesChange: x,
|
|
952
|
+
ruleSourceOptions: S,
|
|
953
|
+
isRulesLoading: C,
|
|
951
954
|
hasRulesLoadError: w,
|
|
952
|
-
labels:
|
|
953
|
-
styles:
|
|
955
|
+
labels: O,
|
|
956
|
+
styles: j,
|
|
957
|
+
summaryTitleClassName: te,
|
|
958
|
+
headingClassName: ne,
|
|
959
|
+
calloutFolderNameClassName: re
|
|
954
960
|
})
|
|
955
961
|
})
|
|
956
|
-
}), /* @__PURE__ */
|
|
962
|
+
}), /* @__PURE__ */ M(Ae, {
|
|
957
963
|
version: n?.version,
|
|
958
964
|
hasExistingPublicationInFolder: p,
|
|
959
|
-
|
|
960
|
-
|
|
965
|
+
allowReplace: _,
|
|
966
|
+
isSubmitDisabled: V.isSubmitDisabled,
|
|
967
|
+
isSubmitLoading: V.isSubmitLoading,
|
|
961
968
|
onCancel: T,
|
|
962
|
-
onSubmit:
|
|
963
|
-
labels:
|
|
969
|
+
onSubmit: D,
|
|
970
|
+
labels: ie
|
|
964
971
|
})]
|
|
965
972
|
});
|
|
966
973
|
};
|
|
967
974
|
//#endregion
|
|
968
|
-
export {
|
|
975
|
+
export { Se as PUBLISH_PANEL_CLASS, P as PublicationRuleFunction, he as PublishAccessRuleEditor, ve as PublishAccessRules, F as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, ye as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, W as collectFolderKeys, oe as derivePublishState, se as filterFolderTree, L as formatPublishedDate, K as fromFolderPathKey, de as getSiblingFolderNames, J as getUniqueFolderName, U as mergeFolderPaths, ce as sortFolderTree, le as toDialFileTree, G as toFolderPathKey, B as usePublishFlow, ue as validateFolderName };
|