@epam/ai-dial-publish-panel 1.4.0-dev.5 → 1.4.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
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
2
|
import { BottomSheet as o, ButtonVariant as s, Checkbox as c, ConfirmationPopupVariant as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, DialFileNodeType as f, ElementSize as p, ErrorText as m, FolderName as h, GhostButton as g, GhostIconButton as _, Highlight as v, Input as ee, LinkButton as y, LiveRegion as b, LiveRegionElement as x, LiveRegionPoliteness as S, NeutralButton as C, Notification as w, NotificationType as T, NotificationVariant as E, PrimaryButton as D, RadioGroup as O, Search as k, Select as A, SideDrawer as j, Spinner as M, Tag as te, TagInput as N } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { ConfirmationDialog as P, ResourceSummary as F, TAG_INPUT_TAG_CLASS_NAME as I, buildCssVars as ne, mergeClasses as L, useIsMobile as R } from "@epam/ai-dial-chat-shared";
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { IconFolder as
|
|
6
|
-
import { DialFileNodeType as
|
|
4
|
+
import { Fragment as re, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
5
|
+
import { IconFolder as ie, IconFolderPlus as ae, IconPlus as oe, IconTrashX as se } from "@tabler/icons-react";
|
|
6
|
+
import { DialFileNodeType as ce, DialFoldersTree as V } from "@epam/ai-dial-react-file-manager";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var H = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), U = /* @__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
|
+
}({}), W = (e) => e.isSubmitting ? {
|
|
13
|
+
calloutKind: U.None,
|
|
14
14
|
isSubmitDisabled: !0,
|
|
15
15
|
isSubmitLoading: !0
|
|
16
16
|
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
|
|
17
|
-
calloutKind:
|
|
17
|
+
calloutKind: U.SubmitError,
|
|
18
18
|
isSubmitDisabled: !1,
|
|
19
19
|
isSubmitLoading: !1
|
|
20
20
|
} : e.hasExistingPublicationInFolder ? {
|
|
21
|
-
calloutKind:
|
|
21
|
+
calloutKind: U.ReplaceWarning,
|
|
22
22
|
isSubmitDisabled: e.allowReplace === !1,
|
|
23
23
|
isSubmitLoading: !1
|
|
24
24
|
} : {
|
|
25
|
-
calloutKind:
|
|
25
|
+
calloutKind: U.Info,
|
|
26
26
|
isSubmitDisabled: !1,
|
|
27
27
|
isSubmitLoading: !1
|
|
28
28
|
} : {
|
|
29
|
-
calloutKind:
|
|
29
|
+
calloutKind: U.NoAccess,
|
|
30
30
|
isSubmitDisabled: !0,
|
|
31
31
|
isSubmitLoading: !1
|
|
32
32
|
} : {
|
|
33
|
-
calloutKind:
|
|
33
|
+
calloutKind: U.None,
|
|
34
34
|
isSubmitDisabled: !0,
|
|
35
35
|
isSubmitLoading: !1
|
|
36
|
-
},
|
|
37
|
-
let r = Math.floor((t - e) /
|
|
36
|
+
}, le = 864e5, G = (e, t = Date.now(), n) => {
|
|
37
|
+
let r = Math.floor((t - e) / le);
|
|
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
|
+
}, ue = (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,17 +51,17 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
51
51
|
}]
|
|
52
52
|
} : {
|
|
53
53
|
...e,
|
|
54
|
-
children: e.children ?
|
|
55
|
-
}),
|
|
54
|
+
children: e.children ? ue(e.children, t, n) : e.children
|
|
55
|
+
}), K = (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 ? K(e.children, t, n) : e.children
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, de = ({ 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);
|
|
@@ -99,11 +99,11 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
99
99
|
n.version,
|
|
100
100
|
g
|
|
101
101
|
]), P = e(async (e, t) => {
|
|
102
|
-
h((n) =>
|
|
102
|
+
h((n) => ue(n, e, t));
|
|
103
103
|
try {
|
|
104
104
|
await l?.(e, t);
|
|
105
105
|
} catch {
|
|
106
|
-
h((n) =>
|
|
106
|
+
h((n) => K(n, e, t)), b(!0);
|
|
107
107
|
}
|
|
108
108
|
}, [l]), F = e(async () => {
|
|
109
109
|
if (!g) return !1;
|
|
@@ -147,93 +147,93 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
147
147
|
isRulesLoading: C,
|
|
148
148
|
hasRulesLoadError: T
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, q = /* @__PURE__ */ function(e) {
|
|
151
151
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
152
|
-
}({}),
|
|
153
|
-
let [i, o] = a(
|
|
152
|
+
}({}), fe = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
|
|
153
|
+
let [i, o] = a(q.Main), [s, c] = a();
|
|
154
154
|
return t(() => {
|
|
155
|
-
e && o(
|
|
155
|
+
e && o(q.Main);
|
|
156
156
|
}, [e]), {
|
|
157
157
|
view: i,
|
|
158
158
|
pendingFolderPath: s,
|
|
159
159
|
setPendingFolderPath: c,
|
|
160
160
|
openFolderView: () => {
|
|
161
|
-
c(n), o(
|
|
161
|
+
c(n), o(q.ChangeFolder);
|
|
162
162
|
},
|
|
163
|
-
backToMain: () => o(
|
|
163
|
+
backToMain: () => o(q.Main),
|
|
164
164
|
selectFolder: () => {
|
|
165
|
-
s != null && r(s), o(
|
|
165
|
+
s != null && r(s), o(q.Main);
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
},
|
|
168
|
+
}, J = (e, t) => {
|
|
169
169
|
let n = t.trim().toLowerCase();
|
|
170
170
|
return n ? e.reduce((e, r) => {
|
|
171
|
-
let i = r.children ?
|
|
171
|
+
let i = r.children ? J(r.children, t) : void 0;
|
|
172
172
|
return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
|
|
173
173
|
...r,
|
|
174
174
|
children: i
|
|
175
175
|
}), e;
|
|
176
176
|
}, []) : e;
|
|
177
|
-
},
|
|
177
|
+
}, Y = (e, t) => e.localeCompare(t, void 0, {
|
|
178
178
|
sensitivity: "base",
|
|
179
179
|
numeric: !0
|
|
180
|
-
}),
|
|
180
|
+
}), pe = (e) => [...e].sort((e, t) => Y(e.name, t.name)).map((e) => e.children ? {
|
|
181
181
|
...e,
|
|
182
|
-
children:
|
|
183
|
-
} : e),
|
|
182
|
+
children: pe(e.children)
|
|
183
|
+
} : e), X = (e, t, n) => {
|
|
184
184
|
let [r, ...i] = t;
|
|
185
185
|
if (r == null) return e;
|
|
186
186
|
let a = [...n, r], o = e.find((e) => e.name === r);
|
|
187
187
|
return o ? i.length ? e.map((e) => e === o ? {
|
|
188
188
|
...e,
|
|
189
|
-
children:
|
|
189
|
+
children: X(e.children ?? [], i, a)
|
|
190
190
|
} : e) : e : [...e, {
|
|
191
191
|
path: a,
|
|
192
192
|
name: r,
|
|
193
|
-
children: i.length ?
|
|
193
|
+
children: i.length ? X([], i, a) : void 0
|
|
194
194
|
}];
|
|
195
|
-
},
|
|
196
|
-
let t =
|
|
195
|
+
}, Z = (e, t) => t.reduce((e, t) => t.length ? X(e, t, []) : e, e), me = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? me(e.children) : []]), Q = (e) => e.join("/"), he = (e) => e.split("/").filter(Boolean), ge = (e, t) => he(e).at(-1) ?? t, _e = (e) => e.map((e) => {
|
|
196
|
+
let t = Q(e.path);
|
|
197
197
|
return {
|
|
198
198
|
path: t,
|
|
199
199
|
name: e.name,
|
|
200
200
|
folderId: t,
|
|
201
201
|
nodeType: f.FOLDER,
|
|
202
|
-
items: e.children ?
|
|
202
|
+
items: e.children ? _e(e.children) : void 0
|
|
203
203
|
};
|
|
204
|
-
}),
|
|
204
|
+
}), ve = /[/\\:;,={}&"]/, ye = (e, t, n) => {
|
|
205
205
|
let r = e.trim();
|
|
206
|
-
return r ? r.includes("..") ||
|
|
207
|
-
},
|
|
206
|
+
return r ? r.includes("..") || ve.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
|
|
207
|
+
}, be = (e, t) => {
|
|
208
208
|
let n = new Set(t.map((e) => e.toLowerCase()));
|
|
209
209
|
if (!n.has(e.toLowerCase())) return e;
|
|
210
210
|
let r = 2;
|
|
211
211
|
for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
|
|
212
212
|
return `${e} ${r}`;
|
|
213
|
-
},
|
|
213
|
+
}, xe = (e, t) => {
|
|
214
214
|
if (t.length === 0) return e.map((e) => e.name);
|
|
215
|
-
let n =
|
|
215
|
+
let n = Q(t), r = (e) => {
|
|
216
216
|
for (let t of e) {
|
|
217
|
-
if (
|
|
217
|
+
if (Q(t.path) === n) return t;
|
|
218
218
|
let e = t.children ? r(t.children) : void 0;
|
|
219
219
|
if (e) return e;
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
return (r(e)?.children ?? []).map((e) => e.name);
|
|
223
|
-
},
|
|
223
|
+
}, Se = {
|
|
224
224
|
sheet: "_sheet_1jbwn_3",
|
|
225
225
|
inline: "_inline_1jbwn_7",
|
|
226
226
|
selectField: "_selectField_1jbwn_21",
|
|
227
227
|
selectFieldOpen: "_selectFieldOpen_1jbwn_33"
|
|
228
|
-
},
|
|
228
|
+
}, Ce = 20, we = 200, Te = 8, Ee = (e) => {
|
|
229
229
|
let t = e.trim();
|
|
230
|
-
if (t.length === 0 || t.length >
|
|
230
|
+
if (t.length === 0 || t.length > we) return !1;
|
|
231
231
|
try {
|
|
232
232
|
return new RegExp(t) instanceof RegExp;
|
|
233
233
|
} catch {
|
|
234
234
|
return !1;
|
|
235
235
|
}
|
|
236
|
-
},
|
|
236
|
+
}, De = ({ sourceOptions: e, onSave: s, onCancel: c, disabled: l = !1, maxTargets: u = Ce, labels: d = {}, styles: f = {} }) => {
|
|
237
237
|
let p = R(), m = {
|
|
238
238
|
...ne({
|
|
239
239
|
"--pare-mobile-bg": f.colors?.mobileBackground,
|
|
@@ -244,145 +244,145 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
244
244
|
"--pare-select-border-focus": f.colors?.selectBorderFocus
|
|
245
245
|
}),
|
|
246
246
|
...f.cssVars
|
|
247
|
-
}, { sourceLabel: h = "Source", sourcePlaceholder: _ = "Select...", functionLabel: y = "Function", equalOptionLabel: b = "Equal", containOptionLabel: x = "Contain", regexOptionLabel: S = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: T = "Add a target", targetsHintLabel: E = "Press Enter or comma to add a target.", patternLabel: D = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: j = "This field is required.", targetsRequiredError: M = "Add at least one target.", saveLabel: te = "Save", cancelLabel: P = "Cancel", dialogAriaLabel: F = "Add access rule" } = d,
|
|
247
|
+
}, { sourceLabel: h = "Source", sourcePlaceholder: _ = "Select...", functionLabel: y = "Function", equalOptionLabel: b = "Equal", containOptionLabel: x = "Contain", regexOptionLabel: S = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: T = "Add a target", targetsHintLabel: E = "Press Enter or comma to add a target.", patternLabel: D = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: j = "This field is required.", targetsRequiredError: M = "Add at least one target.", saveLabel: te = "Save", cancelLabel: P = "Cancel", dialogAriaLabel: F = "Add access rule" } = d, ie = n(), ae = n(), oe = n(), se = n(), ce = i(null);
|
|
248
248
|
t(() => {
|
|
249
|
-
p ||
|
|
249
|
+
p || ce.current?.focus();
|
|
250
250
|
}, [p]);
|
|
251
|
-
let [
|
|
251
|
+
let [V, U] = a(), [W, le] = a(), [G, ue] = a([]), [K, de] = a(""), [q, fe] = a(!1), [J, Y] = a(""), [pe, X] = a(!1), [Z, me] = a(!1), Q = L(Se.selectField, q && Se.selectFieldOpen), he = L(Se.selectField, pe && Se.selectFieldOpen), ge = r(() => e.map((e) => ({
|
|
252
252
|
value: e,
|
|
253
253
|
label: e,
|
|
254
|
-
labelNode:
|
|
254
|
+
labelNode: J.trim() ? /* @__PURE__ */ z(v, {
|
|
255
255
|
text: e,
|
|
256
|
-
query:
|
|
256
|
+
query: J,
|
|
257
257
|
maxLines: 1
|
|
258
258
|
}) : void 0
|
|
259
|
-
})), [e,
|
|
259
|
+
})), [e, J]), _e = r(() => [
|
|
260
260
|
{
|
|
261
|
-
value:
|
|
261
|
+
value: H.Equal,
|
|
262
262
|
label: b
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
|
-
value:
|
|
265
|
+
value: H.Contain,
|
|
266
266
|
label: x
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
|
-
value:
|
|
269
|
+
value: H.Regex,
|
|
270
270
|
label: S
|
|
271
271
|
}
|
|
272
272
|
], [
|
|
273
273
|
b,
|
|
274
274
|
x,
|
|
275
275
|
S
|
|
276
|
-
]),
|
|
277
|
-
|
|
278
|
-
},
|
|
276
|
+
]), ve = W === H.Regex, ye = Ee(K), be = V != null && W != null && (ve ? ye : G.length > 0), xe = (e) => {
|
|
277
|
+
U(Array.isArray(e) ? e[0] : e), fe(!1);
|
|
278
|
+
}, we = (e) => {
|
|
279
279
|
let t = Array.isArray(e) ? e[0] : e;
|
|
280
|
-
|
|
281
|
-
},
|
|
280
|
+
W === H.Regex != (t === H.Regex) && (ue([]), de("")), le(t), X(!1);
|
|
281
|
+
}, De = (e) => {
|
|
282
282
|
let t = [];
|
|
283
283
|
for (let n of e) {
|
|
284
284
|
let e = n.trim();
|
|
285
285
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= u)) break;
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
!
|
|
290
|
-
source:
|
|
291
|
-
function:
|
|
292
|
-
targets:
|
|
287
|
+
ue(t);
|
|
288
|
+
}, $ = () => {
|
|
289
|
+
!be || V == null || W == null ? me(!0) : s({
|
|
290
|
+
source: V,
|
|
291
|
+
function: W,
|
|
292
|
+
targets: ve ? [K.trim()] : G
|
|
293
293
|
});
|
|
294
|
-
}, Oe = (
|
|
294
|
+
}, Oe = (K.length > 0 || Z) && !ye, ke = (e) => {
|
|
295
295
|
e.key === "Escape" && (e.stopPropagation(), c());
|
|
296
|
-
}, Ae = /* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
id:
|
|
296
|
+
}, Ae = /* @__PURE__ */ B(re, { children: [
|
|
297
|
+
/* @__PURE__ */ z(A, {
|
|
298
|
+
id: ae,
|
|
299
299
|
labelProps: { label: h },
|
|
300
|
-
options:
|
|
301
|
-
value:
|
|
302
|
-
onChange:
|
|
300
|
+
options: ge,
|
|
301
|
+
value: V,
|
|
302
|
+
onChange: xe,
|
|
303
303
|
placeholder: _,
|
|
304
|
-
searchable: e.length >
|
|
304
|
+
searchable: e.length > Te,
|
|
305
305
|
searchPlaceholder: _,
|
|
306
|
-
onSearchQueryChange:
|
|
306
|
+
onSearchQueryChange: Y,
|
|
307
307
|
disabled: l,
|
|
308
|
-
open:
|
|
309
|
-
onOpenChange:
|
|
310
|
-
fieldClassName:
|
|
311
|
-
invalid:
|
|
312
|
-
error:
|
|
308
|
+
open: q,
|
|
309
|
+
onOpenChange: fe,
|
|
310
|
+
fieldClassName: Q,
|
|
311
|
+
invalid: Z && V == null,
|
|
312
|
+
error: Z && V == null ? j : void 0
|
|
313
313
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ z(A, {
|
|
315
315
|
labelProps: { label: y },
|
|
316
|
-
id:
|
|
317
|
-
options:
|
|
318
|
-
value:
|
|
319
|
-
onChange:
|
|
316
|
+
id: oe,
|
|
317
|
+
options: _e,
|
|
318
|
+
value: W,
|
|
319
|
+
onChange: we,
|
|
320
320
|
placeholder: y,
|
|
321
321
|
disabled: l,
|
|
322
|
-
open:
|
|
323
|
-
onOpenChange:
|
|
324
|
-
fieldClassName:
|
|
325
|
-
invalid:
|
|
326
|
-
error:
|
|
322
|
+
open: pe,
|
|
323
|
+
onOpenChange: X,
|
|
324
|
+
fieldClassName: he,
|
|
325
|
+
invalid: Z && W == null,
|
|
326
|
+
error: Z && W == null ? j : void 0
|
|
327
327
|
}),
|
|
328
|
-
|
|
329
|
-
id:
|
|
328
|
+
ve ? /* @__PURE__ */ z(ee, {
|
|
329
|
+
id: ie,
|
|
330
330
|
labelProps: { label: D },
|
|
331
331
|
placeholder: O,
|
|
332
|
-
value:
|
|
333
|
-
onChange: (e) =>
|
|
332
|
+
value: K,
|
|
333
|
+
onChange: (e) => de(e ?? ""),
|
|
334
334
|
error: Oe ? k : void 0,
|
|
335
335
|
disabled: l
|
|
336
|
-
}) : /* @__PURE__ */
|
|
337
|
-
id:
|
|
336
|
+
}) : /* @__PURE__ */ z(N, {
|
|
337
|
+
id: se,
|
|
338
338
|
labelProps: { label: w },
|
|
339
339
|
placeholder: T,
|
|
340
|
-
caption:
|
|
341
|
-
error:
|
|
342
|
-
invalid:
|
|
343
|
-
value:
|
|
344
|
-
onChange:
|
|
340
|
+
caption: Z && G.length === 0 ? void 0 : E,
|
|
341
|
+
error: Z && G.length === 0 ? M : void 0,
|
|
342
|
+
invalid: Z && G.length === 0,
|
|
343
|
+
value: G,
|
|
344
|
+
onChange: De,
|
|
345
345
|
disabled: l,
|
|
346
346
|
tagClassName: I
|
|
347
347
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ B("div", {
|
|
349
349
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ z(g, {
|
|
351
351
|
label: P,
|
|
352
352
|
onClick: c,
|
|
353
353
|
disabled: l
|
|
354
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ z(C, {
|
|
355
355
|
label: te,
|
|
356
|
-
onClick:
|
|
356
|
+
onClick: $,
|
|
357
357
|
disabled: l
|
|
358
358
|
})]
|
|
359
359
|
})
|
|
360
360
|
] });
|
|
361
|
-
return p ? /* @__PURE__ */
|
|
361
|
+
return p ? /* @__PURE__ */ z(o, {
|
|
362
362
|
open: !0,
|
|
363
363
|
onClose: c,
|
|
364
364
|
ariaLabel: F,
|
|
365
365
|
style: m,
|
|
366
|
-
className:
|
|
366
|
+
className: Se.sheet,
|
|
367
367
|
bodyClassName: "flex flex-col gap-3 p-4",
|
|
368
368
|
children: Ae
|
|
369
|
-
}) : /* @__PURE__ */
|
|
370
|
-
ref:
|
|
369
|
+
}) : /* @__PURE__ */ z("div", {
|
|
370
|
+
ref: ce,
|
|
371
371
|
role: "group",
|
|
372
372
|
"aria-label": F,
|
|
373
373
|
tabIndex: -1,
|
|
374
374
|
onKeyDown: ke,
|
|
375
375
|
style: m,
|
|
376
|
-
className: L("flex flex-none flex-col gap-3 rounded-lg p-3",
|
|
376
|
+
className: L("flex flex-none flex-col gap-3 rounded-lg p-3", Se.inline),
|
|
377
377
|
children: Ae
|
|
378
378
|
});
|
|
379
|
-
},
|
|
379
|
+
}, $ = {
|
|
380
380
|
ruleRow: "_ruleRow_nx0en_1",
|
|
381
381
|
heading: "_heading_nx0en_5",
|
|
382
382
|
hint: "_hint_nx0en_9",
|
|
383
383
|
loading: "_loading_nx0en_13",
|
|
384
384
|
ruleText: "_ruleText_nx0en_17"
|
|
385
|
-
}, Oe = 20, ke = (e, t) => e ===
|
|
385
|
+
}, Oe = 20, ke = (e, t) => e === H.Equal ? t.equal : e === H.Contain ? t.contain : t.regex, Ae = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: c, disabled: l = !1, isLoading: f = !1, hasLoadError: p = !1, maxRules: m = Oe, maxTargetsPerRule: h, labels: v = {}, headingClassName: ee = "dial-body-semi-text", hintClassName: y = "dial-small-text", loadingClassName: S = "dial-small-text", ruleTextClassName: C = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: O = {} }) => {
|
|
386
386
|
let k = {
|
|
387
387
|
...ne({
|
|
388
388
|
"--par-rule-bg": O.colors?.ruleBackground,
|
|
@@ -392,135 +392,135 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
392
392
|
"--par-rule-text": O.colors?.ruleText
|
|
393
393
|
}),
|
|
394
394
|
...O.cssVars
|
|
395
|
-
}, { heading: A = "Allow access if all match", folderScopeHint: j = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: te = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: N = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: P = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: F = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate:
|
|
395
|
+
}, { heading: A = "Allow access if all match", folderScopeHint: j = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: te = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: N = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: P = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: F = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate: re = "Remove rule for {source}: {targets}", equalFunctionLabel: ie = "Equal", containFunctionLabel: ae = "Contain", regexFunctionLabel: ce = "Regex", loadingLabel: V = "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: le = "All rules cleared.", rulesLoadedAnnouncement: G = "Existing rules loaded for the selected folder.", editorLabels: ue } = v, K = n(), [de, q] = a(!1), [fe, J] = a(""), Y = i(null), pe = i(f);
|
|
396
396
|
t(() => {
|
|
397
|
-
|
|
397
|
+
pe.current && !f && e.length > 0 && J(G), pe.current = f;
|
|
398
398
|
}, [
|
|
399
399
|
f,
|
|
400
400
|
e,
|
|
401
|
-
|
|
401
|
+
G
|
|
402
402
|
]);
|
|
403
|
-
let
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
r([...e, t]),
|
|
409
|
-
},
|
|
410
|
-
r(e.filter((e, n) => n !== t)),
|
|
411
|
-
},
|
|
412
|
-
r([]),
|
|
413
|
-
},
|
|
414
|
-
equal:
|
|
415
|
-
contain:
|
|
416
|
-
regex:
|
|
417
|
-
},
|
|
418
|
-
return /* @__PURE__ */
|
|
403
|
+
let X = () => {
|
|
404
|
+
Y.current = document.activeElement, q(!0);
|
|
405
|
+
}, Z = () => {
|
|
406
|
+
q(!1), Y.current?.focus?.();
|
|
407
|
+
}, me = (t) => {
|
|
408
|
+
r([...e, t]), J(U), Z();
|
|
409
|
+
}, Q = (t) => {
|
|
410
|
+
r(e.filter((e, n) => n !== t)), J(W);
|
|
411
|
+
}, he = () => {
|
|
412
|
+
r([]), J(le);
|
|
413
|
+
}, ge = {
|
|
414
|
+
equal: ie,
|
|
415
|
+
contain: ae,
|
|
416
|
+
regex: ce
|
|
417
|
+
}, _e = e.length >= m, ve = l || _e, ye = c != null && c !== "";
|
|
418
|
+
return /* @__PURE__ */ B("div", {
|
|
419
419
|
role: "group",
|
|
420
|
-
"aria-labelledby":
|
|
420
|
+
"aria-labelledby": K,
|
|
421
421
|
style: k,
|
|
422
422
|
className: L(l && "pointer-events-none opacity-60"),
|
|
423
423
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ z(b, {
|
|
425
425
|
visuallyHidden: !0,
|
|
426
426
|
as: x.Span,
|
|
427
|
-
children:
|
|
427
|
+
children: fe
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ B("div", {
|
|
430
430
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
432
|
-
id:
|
|
433
|
-
className: L(ee,
|
|
431
|
+
children: [/* @__PURE__ */ z("div", {
|
|
432
|
+
id: K,
|
|
433
|
+
className: L(ee, $.heading),
|
|
434
434
|
children: A
|
|
435
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
435
|
+
}), e.length > 0 && /* @__PURE__ */ z(g, {
|
|
436
436
|
variant: s.Primary,
|
|
437
437
|
label: I,
|
|
438
|
-
onClick:
|
|
438
|
+
onClick: he,
|
|
439
439
|
disabled: l
|
|
440
440
|
})]
|
|
441
441
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
className: L("mb-2", y,
|
|
444
|
-
children:
|
|
442
|
+
/* @__PURE__ */ z("p", {
|
|
443
|
+
className: L("mb-2", y, $.hint),
|
|
444
|
+
children: ye ? j.replace("{folder}", c) : te
|
|
445
445
|
}),
|
|
446
|
-
e.length > 0 && !
|
|
446
|
+
e.length > 0 && !ye && /* @__PURE__ */ z("div", {
|
|
447
447
|
className: "mb-2",
|
|
448
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ z(w, {
|
|
449
449
|
type: T.SectionMessage,
|
|
450
450
|
variant: E.Warning,
|
|
451
451
|
message: N
|
|
452
452
|
})
|
|
453
453
|
}),
|
|
454
|
-
f && /* @__PURE__ */
|
|
455
|
-
className: L("mb-2 flex items-center gap-2", S,
|
|
456
|
-
children: [/* @__PURE__ */
|
|
454
|
+
f && /* @__PURE__ */ B("div", {
|
|
455
|
+
className: L("mb-2 flex items-center gap-2", S, $.loading),
|
|
456
|
+
children: [/* @__PURE__ */ z(M, {
|
|
457
457
|
size: 16,
|
|
458
|
-
ariaLabel:
|
|
459
|
-
}), /* @__PURE__ */
|
|
458
|
+
ariaLabel: V
|
|
459
|
+
}), /* @__PURE__ */ z("span", { children: V })]
|
|
460
460
|
}),
|
|
461
|
-
p && /* @__PURE__ */
|
|
461
|
+
p && /* @__PURE__ */ z("div", {
|
|
462
462
|
className: "mb-2",
|
|
463
|
-
children: /* @__PURE__ */
|
|
463
|
+
children: /* @__PURE__ */ z(w, {
|
|
464
464
|
type: T.SectionMessage,
|
|
465
465
|
variant: E.Warning,
|
|
466
|
-
message:
|
|
466
|
+
message: H
|
|
467
467
|
})
|
|
468
468
|
}),
|
|
469
|
-
e.length > 0 && /* @__PURE__ */
|
|
469
|
+
e.length > 0 && /* @__PURE__ */ z("ul", {
|
|
470
470
|
className: "mb-3 flex flex-col gap-2",
|
|
471
471
|
children: e.map((e, t) => {
|
|
472
|
-
let n = e.targets.join(` ${R} `), r =
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
476
|
-
className: L("truncate", C,
|
|
472
|
+
let n = e.targets.join(` ${R} `), r = re.replace("{source}", e.source).replace("{targets}", n);
|
|
473
|
+
return /* @__PURE__ */ B("li", {
|
|
474
|
+
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2", $.ruleRow),
|
|
475
|
+
children: [/* @__PURE__ */ B("span", {
|
|
476
|
+
className: L("truncate", C, $.ruleText),
|
|
477
477
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ z("span", {
|
|
479
479
|
className: D,
|
|
480
480
|
children: e.source
|
|
481
481
|
}),
|
|
482
482
|
" ",
|
|
483
|
-
ke(e.function,
|
|
483
|
+
ke(e.function, ge),
|
|
484
484
|
": ",
|
|
485
485
|
n
|
|
486
486
|
]
|
|
487
|
-
}), /* @__PURE__ */
|
|
488
|
-
icon: /* @__PURE__ */
|
|
487
|
+
}), /* @__PURE__ */ z(_, {
|
|
488
|
+
icon: /* @__PURE__ */ z(se, {
|
|
489
489
|
size: u.SM,
|
|
490
490
|
"aria-hidden": !0,
|
|
491
491
|
stroke: d
|
|
492
492
|
}),
|
|
493
493
|
"aria-label": r,
|
|
494
|
-
onClick: () =>
|
|
494
|
+
onClick: () => Q(t),
|
|
495
495
|
disabled: l
|
|
496
496
|
})]
|
|
497
497
|
}, t);
|
|
498
498
|
})
|
|
499
499
|
}),
|
|
500
|
-
|
|
500
|
+
de && /* @__PURE__ */ z(De, {
|
|
501
501
|
sourceOptions: o,
|
|
502
|
-
onSave:
|
|
503
|
-
onCancel:
|
|
502
|
+
onSave: me,
|
|
503
|
+
onCancel: Z,
|
|
504
504
|
disabled: l,
|
|
505
505
|
maxTargets: h,
|
|
506
|
-
labels:
|
|
506
|
+
labels: ue,
|
|
507
507
|
styles: O.editor
|
|
508
508
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ z("div", {
|
|
510
510
|
className: "flex flex-wrap items-center gap-2",
|
|
511
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ z(g, {
|
|
512
512
|
label: F,
|
|
513
|
-
iconBefore: /* @__PURE__ */
|
|
513
|
+
iconBefore: /* @__PURE__ */ z(oe, {
|
|
514
514
|
size: u.SM,
|
|
515
515
|
"aria-hidden": !0,
|
|
516
516
|
stroke: d
|
|
517
517
|
}),
|
|
518
|
-
onClick:
|
|
519
|
-
disabled:
|
|
518
|
+
onClick: X,
|
|
519
|
+
disabled: ve
|
|
520
520
|
})
|
|
521
521
|
}),
|
|
522
|
-
|
|
523
|
-
className: L("mt-2", y,
|
|
522
|
+
_e && /* @__PURE__ */ z("p", {
|
|
523
|
+
className: L("mt-2", y, $.hint),
|
|
524
524
|
children: P.replace("{max}", String(m))
|
|
525
525
|
})
|
|
526
526
|
]
|
|
@@ -547,22 +547,22 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
547
547
|
}), h = L(f, je.emptyState);
|
|
548
548
|
if (n || r || e.length === 0) {
|
|
549
549
|
let e = s;
|
|
550
|
-
return n ? e = c : r && (e = l), /* @__PURE__ */
|
|
550
|
+
return n ? e = c : r && (e = l), /* @__PURE__ */ z(b, {
|
|
551
551
|
as: x.P,
|
|
552
552
|
style: m,
|
|
553
553
|
className: h,
|
|
554
554
|
children: e
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ z("ul", {
|
|
558
558
|
style: m,
|
|
559
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
559
|
+
children: e.map((e, n) => /* @__PURE__ */ B("li", {
|
|
560
560
|
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && je.stripedRow),
|
|
561
|
-
children: [/* @__PURE__ */
|
|
561
|
+
children: [/* @__PURE__ */ B("span", {
|
|
562
562
|
className: "flex min-w-0 items-center gap-2",
|
|
563
563
|
style: m,
|
|
564
564
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ B("span", {
|
|
566
566
|
className: L(u, je.version),
|
|
567
567
|
children: [
|
|
568
568
|
i,
|
|
@@ -570,18 +570,18 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
570
570
|
e.version
|
|
571
571
|
]
|
|
572
572
|
}),
|
|
573
|
-
e.version === t && /* @__PURE__ */
|
|
573
|
+
e.version === t && /* @__PURE__ */ z(te, {
|
|
574
574
|
label: a,
|
|
575
575
|
className: L("shrink-0 whitespace-nowrap", je.currentBadge)
|
|
576
576
|
}),
|
|
577
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
577
|
+
e.publishCredentials === !0 && /* @__PURE__ */ z(te, {
|
|
578
578
|
label: o,
|
|
579
579
|
className: L("shrink-0 whitespace-nowrap", je.sharedCredentialsBadge)
|
|
580
580
|
})
|
|
581
581
|
]
|
|
582
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ z("span", {
|
|
583
583
|
className: L(d, je.date),
|
|
584
|
-
children:
|
|
584
|
+
children: G(e.publishedAt)
|
|
585
585
|
})]
|
|
586
586
|
}, `${e.version}-${n}`))
|
|
587
587
|
});
|
|
@@ -600,7 +600,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
600
600
|
return {
|
|
601
601
|
path: [t],
|
|
602
602
|
name: e.label,
|
|
603
|
-
children: Re(
|
|
603
|
+
children: Re(pe(e.items), t)
|
|
604
604
|
};
|
|
605
605
|
}), Be = (e) => e.map((e) => Pe(e.key)), Ve = (e, t) => {
|
|
606
606
|
let n = /* @__PURE__ */ new Set();
|
|
@@ -613,7 +613,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
613
613
|
let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
|
|
614
614
|
for (let e of t) {
|
|
615
615
|
let [t, ...r] = e.split("/"), i = Fe(t);
|
|
616
|
-
i != null && r.length !== 0 && n.get(i)?.add(
|
|
616
|
+
i != null && r.length !== 0 && n.get(i)?.add(Q(r));
|
|
617
617
|
}
|
|
618
618
|
return n;
|
|
619
619
|
}, Ue = {
|
|
@@ -631,7 +631,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
631
631
|
j && (P = l ? Ie(l) : void 0);
|
|
632
632
|
let F = (e) => {
|
|
633
633
|
j ? f?.(e ? Le(e) : void 0) : o?.(e);
|
|
634
|
-
}, [I, R] = a(() => new Set(P?.map((e, t) =>
|
|
634
|
+
}, [I, R] = a(() => new Set(P?.map((e, t) => Q(P.slice(0, t + 1))) ?? [])), re = r(() => c ? /* @__PURE__ */ new Set([...I, ...Ve(c, (e) => e.expandedPaths)]) : void 0, [c, I]) ?? E ?? I, ie = r(() => c ? Ve(c, (e) => e.loadingPaths) : O, [c, O]), se = (e) => {
|
|
635
635
|
let t = new Set(e);
|
|
636
636
|
for (let e of N) t.delete(e);
|
|
637
637
|
if (c) {
|
|
@@ -639,140 +639,142 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
639
639
|
let e = He(c, t);
|
|
640
640
|
for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
|
|
641
641
|
} else D ? D(t) : R(t);
|
|
642
|
-
}, [
|
|
642
|
+
}, [H, U] = a(null), [W, le] = a(b), G = i(null), ue = i(!1);
|
|
643
643
|
t(() => {
|
|
644
644
|
let e = (e) => {
|
|
645
|
-
e.target instanceof Element && e.target.closest(`[${We}]`) && (
|
|
645
|
+
e.target instanceof Element && e.target.closest(`[${We}]`) && (ue.current = !0);
|
|
646
646
|
};
|
|
647
647
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
648
648
|
}, []);
|
|
649
|
-
let
|
|
650
|
-
let e =
|
|
651
|
-
return j ? e :
|
|
649
|
+
let K = m.trim(), de = H != null, q = r(() => J(M, m), [M, m]), fe = K.length > 0 && q.length === 0, Y = !de && K.length > 0, X = r(() => {
|
|
650
|
+
let e = Y ? q : M;
|
|
651
|
+
return j ? e : pe(e);
|
|
652
652
|
}, [
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
Y,
|
|
654
|
+
q,
|
|
655
655
|
M,
|
|
656
656
|
j
|
|
657
|
-
]),
|
|
657
|
+
]), Z = r(() => /* @__PURE__ */ new Set([...N, ...me(X)]), [N, X]), ge = r(() => /* @__PURE__ */ new Set([...N, ...Y ? Z : re]), [
|
|
658
658
|
N,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
]),
|
|
659
|
+
Y,
|
|
660
|
+
Z,
|
|
661
|
+
re
|
|
662
|
+
]), ve = r(() => _e(X), [X]), Se = r(() => Y && ve.length === 0 ? [] : j ? ve : [{
|
|
663
663
|
path: Ge,
|
|
664
664
|
name: T,
|
|
665
665
|
folderId: Ge,
|
|
666
|
-
nodeType:
|
|
667
|
-
items:
|
|
666
|
+
nodeType: ce.FOLDER,
|
|
667
|
+
items: ve
|
|
668
668
|
}], [
|
|
669
|
-
|
|
669
|
+
ve,
|
|
670
670
|
T,
|
|
671
|
-
|
|
671
|
+
Y,
|
|
672
672
|
j
|
|
673
|
-
]),
|
|
673
|
+
]), Ce = H ? Q(H) : null, we = {
|
|
674
674
|
empty: S,
|
|
675
675
|
invalid: C,
|
|
676
676
|
duplicate: w
|
|
677
|
-
},
|
|
677
|
+
}, Te = (e) => {
|
|
678
678
|
if (!c) return !0;
|
|
679
679
|
let t = Le(e), n = c.find((e) => e.key === t?.rootKey);
|
|
680
680
|
return n != null && n.canCreateFolders !== !1;
|
|
681
|
-
},
|
|
681
|
+
}, Ee = (() => {
|
|
682
682
|
if (!c) return P ?? [];
|
|
683
|
-
if (P &&
|
|
683
|
+
if (P && Te(P)) return P;
|
|
684
684
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
685
685
|
return e ? Ie({
|
|
686
686
|
rootKey: e.key,
|
|
687
687
|
path: []
|
|
688
688
|
}) : void 0;
|
|
689
|
-
})(),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
|
|
697
|
-
|
|
689
|
+
})(), De = (e) => be(fe && ye(K, [], we) == null ? K : b, xe(M, e)), [$, Oe] = a(null);
|
|
690
|
+
$ != null && !ie?.has(Q($)) && (Oe(null), U($), le(De($)));
|
|
691
|
+
let ke = (e) => {
|
|
692
|
+
U(null), Oe(e), G.current = null, ue.current = !1;
|
|
693
|
+
let t = Q(e);
|
|
694
|
+
t && se(new Set(re).add(t));
|
|
695
|
+
}, Ae = () => {
|
|
696
|
+
Ee && ke(Ee);
|
|
697
|
+
}, je = (e) => {
|
|
698
|
+
let t = he(e.path);
|
|
699
|
+
if (!Te(t)) return [];
|
|
698
700
|
let n = [{
|
|
699
701
|
key: "add-child",
|
|
700
702
|
label: y,
|
|
701
|
-
icon: /* @__PURE__ */
|
|
703
|
+
icon: /* @__PURE__ */ z(ae, {
|
|
702
704
|
size: u.SM,
|
|
703
705
|
"aria-hidden": !0,
|
|
704
706
|
stroke: d
|
|
705
707
|
}),
|
|
706
|
-
onClick: () =>
|
|
708
|
+
onClick: () => ke(t)
|
|
707
709
|
}];
|
|
708
710
|
return N.includes(e.path) || n.push({
|
|
709
711
|
key: "add-sibling",
|
|
710
712
|
label: ee,
|
|
711
|
-
icon: /* @__PURE__ */
|
|
713
|
+
icon: /* @__PURE__ */ z(oe, {
|
|
712
714
|
size: u.SM,
|
|
713
715
|
"aria-hidden": !0,
|
|
714
716
|
stroke: d
|
|
715
717
|
}),
|
|
716
|
-
onClick: () =>
|
|
718
|
+
onClick: () => ke(t.slice(0, -1))
|
|
717
719
|
}), n;
|
|
718
|
-
},
|
|
719
|
-
if (!
|
|
720
|
-
let t =
|
|
721
|
-
return
|
|
722
|
-
},
|
|
723
|
-
if (!
|
|
724
|
-
let t = e.trim(), n =
|
|
725
|
-
if (!(
|
|
726
|
-
let e = c ? Le(
|
|
727
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
720
|
+
}, Me = (e) => {
|
|
721
|
+
if (!H) return null;
|
|
722
|
+
let t = ye(e, xe(te.current, H), we);
|
|
723
|
+
return G.current = t, t;
|
|
724
|
+
}, Ne = (e) => {
|
|
725
|
+
if (!H || ue.current) return;
|
|
726
|
+
let t = e.trim(), n = G.current;
|
|
727
|
+
if (!(Me(e) ?? n)) {
|
|
728
|
+
let e = c ? Le(H) : void 0;
|
|
729
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(H, t), F([...H, t]);
|
|
728
730
|
}
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
return /* @__PURE__ */
|
|
731
|
+
U(null);
|
|
732
|
+
}, Pe = () => U(null);
|
|
733
|
+
return /* @__PURE__ */ B("div", {
|
|
732
734
|
style: A,
|
|
733
735
|
className: L(h && "pointer-events-none opacity-60", k.className),
|
|
734
736
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ z("div", {
|
|
736
738
|
className: L("w-full max-w-full min-w-0", Ue.tree),
|
|
737
|
-
children: /* @__PURE__ */
|
|
738
|
-
items:
|
|
739
|
+
children: /* @__PURE__ */ z(V, {
|
|
740
|
+
items: Se,
|
|
739
741
|
showFiles: !1,
|
|
740
|
-
selectedPath: P == null ? void 0 :
|
|
741
|
-
expandedPaths:
|
|
742
|
-
onExpandedPathsChange:
|
|
743
|
-
loadingPaths:
|
|
742
|
+
selectedPath: P == null ? void 0 : Q(P),
|
|
743
|
+
expandedPaths: ge,
|
|
744
|
+
onExpandedPathsChange: se,
|
|
745
|
+
loadingPaths: ie,
|
|
744
746
|
onItemClick: (e) => {
|
|
745
|
-
let t = P != null &&
|
|
746
|
-
F(t ? void 0 :
|
|
747
|
+
let t = P != null && Q(P) === e.path;
|
|
748
|
+
F(t ? void 0 : he(e.path));
|
|
747
749
|
},
|
|
748
|
-
getContextMenuItems:
|
|
749
|
-
createdFolderPath:
|
|
750
|
-
newFolderDefaultName:
|
|
751
|
-
onCreateFolderSave:
|
|
752
|
-
onCreateFolderCancel:
|
|
753
|
-
onRenameValidate: (e) =>
|
|
754
|
-
searchQuery:
|
|
755
|
-
emptyStateTitle:
|
|
750
|
+
getContextMenuItems: je,
|
|
751
|
+
createdFolderPath: Ce,
|
|
752
|
+
newFolderDefaultName: W,
|
|
753
|
+
onCreateFolderSave: Ne,
|
|
754
|
+
onCreateFolderCancel: Pe,
|
|
755
|
+
onRenameValidate: (e) => Me(e),
|
|
756
|
+
searchQuery: Y ? K : void 0,
|
|
757
|
+
emptyStateTitle: Y ? x.replace("{query}", K) : void 0
|
|
756
758
|
})
|
|
757
759
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ z("div", {
|
|
759
761
|
className: L("my-2 h-px", Ue.divider),
|
|
760
762
|
"aria-hidden": !0
|
|
761
763
|
}),
|
|
762
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ B("div", {
|
|
763
765
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
764
|
-
children: [/* @__PURE__ */
|
|
765
|
-
onClick:
|
|
766
|
+
children: [/* @__PURE__ */ z(g, {
|
|
767
|
+
onClick: Ae,
|
|
766
768
|
label: _,
|
|
767
|
-
iconBefore: /* @__PURE__ */
|
|
769
|
+
iconBefore: /* @__PURE__ */ z(oe, {
|
|
768
770
|
size: u.SM,
|
|
769
771
|
"aria-hidden": !0,
|
|
770
772
|
stroke: d
|
|
771
773
|
}),
|
|
772
|
-
disabled: h ||
|
|
773
|
-
}),
|
|
774
|
+
disabled: h || de || !Ee
|
|
775
|
+
}), de && /* @__PURE__ */ z(g, {
|
|
774
776
|
label: v,
|
|
775
|
-
onClick:
|
|
777
|
+
onClick: Pe,
|
|
776
778
|
disabled: h,
|
|
777
779
|
[We]: ""
|
|
778
780
|
})]
|
|
@@ -783,24 +785,24 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
783
785
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
784
786
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
785
787
|
destination: "_destination_zj3gd_9"
|
|
786
|
-
}, Xe = 200, Ze = ({ view: e =
|
|
787
|
-
let { colors:
|
|
788
|
+
}, Xe = 200, Ze = ({ view: e = q.Main, onChangeFolderClick: o, resource: s, renderSummary: l, folderItems: f, selectedFolderPath: m, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: y, expandedPaths: b, onExpandedPathsChange: x, loadingPaths: S, hasExistingPublicationInFolder: C, hasWriteAccess: E, isSubmitting: D, hasSubmitError: O = !1, allowReplace: A = !0, author: j, onAuthorChange: M, publishCredentials: te = !1, onPublishCredentialsChange: N, rules: P, onRulesChange: I, ruleSourceOptions: R, isRulesLoading: re = !1, hasRulesLoadError: ae = !1, labels: oe = {}, summaryTitleClassName: se = "dial-body-semi-text", headingClassName: ce = "dial-body-semi-text", destinationClassName: V = "dial-small-semi-text", calloutFolderNameClassName: H = "dial-small-paragraph-semi-text", styles: le = {} }) => {
|
|
789
|
+
let { colors: G, folderTree: ue, accessRules: K } = le, de = {
|
|
788
790
|
...ne({
|
|
789
|
-
"--pp-summary-title-text":
|
|
790
|
-
"--pp-heading-text":
|
|
791
|
-
"--pp-destination-text":
|
|
791
|
+
"--pp-summary-title-text": G?.summaryTitleText,
|
|
792
|
+
"--pp-heading-text": G?.headingText,
|
|
793
|
+
"--pp-destination-text": G?.destinationText
|
|
792
794
|
}),
|
|
793
|
-
...
|
|
794
|
-
},
|
|
795
|
-
border:
|
|
796
|
-
background:
|
|
797
|
-
}, { folderLabel:
|
|
795
|
+
...le.cssVars
|
|
796
|
+
}, fe = {
|
|
797
|
+
border: G?.summaryBorder,
|
|
798
|
+
background: G?.summaryBackground
|
|
799
|
+
}, { folderLabel: J = "Publish to folder", destinationAriaLabel: Y = "Destination folder", noFolderSelectedLabel: pe = "No folder selected", changeFolderLabel: X = "Change", chooseFolderLabel: Z = "Choose", replaceWarning: me = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: Q = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: he = "Publishing failed. Please try again.", folderEmptyStateLabel: ge, addSiblingFolderLabel: _e, addChildFolderLabel: ve, cancelCreatingFolderLabel: ye, createFolderEmptyNameError: be, createFolderInvalidNameError: xe, createFolderDuplicateNameError: Se, rootFolderLabel: Ce = "Organization", accessRulesLabels: we, searchPlaceholder: Te, clearSearchAriaLabel: Ee, authorLabel: De = "Author", authorPlaceholder: $ = "Author name", authorHint: Oe = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ke = "Publish with my credentials", credentialsHint: je = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Me, Ne] = a(""), Pe = n(), Fe = i(null), Ie = i(null), Le = (e) => {
|
|
798
800
|
Ne(e ?? "");
|
|
799
801
|
}, Re = i(e);
|
|
800
802
|
t(() => {
|
|
801
|
-
Re.current !== e && (Re.current = e, e ===
|
|
803
|
+
Re.current !== e && (Re.current = e, e === q.ChangeFolder ? Ie.current?.focus({ preventScroll: !0 }) : Fe.current?.focus({ preventScroll: !0 }));
|
|
802
804
|
}, [e]);
|
|
803
|
-
let ze = m != null, Be = r(() =>
|
|
805
|
+
let ze = m != null, Be = r(() => W({
|
|
804
806
|
hasSelectedFolder: ze,
|
|
805
807
|
hasExistingPublicationInFolder: C,
|
|
806
808
|
hasWriteAccess: E,
|
|
@@ -814,27 +816,27 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
814
816
|
D,
|
|
815
817
|
O,
|
|
816
818
|
A
|
|
817
|
-
]), Ve = ze ? m[m.length - 1] ??
|
|
818
|
-
className: L("truncate",
|
|
819
|
+
]), Ve = ze ? m[m.length - 1] ?? Ce : "", He = l ? l() : /* @__PURE__ */ z("span", {
|
|
820
|
+
className: L("truncate", se, Ye.summaryTitle),
|
|
819
821
|
children: s?.title
|
|
820
822
|
});
|
|
821
|
-
if (e ===
|
|
823
|
+
if (e === q.ChangeFolder) return /* @__PURE__ */ B("div", {
|
|
822
824
|
ref: Ie,
|
|
823
825
|
tabIndex: -1,
|
|
824
826
|
role: "group",
|
|
825
|
-
"aria-label":
|
|
827
|
+
"aria-label": J,
|
|
826
828
|
className: L("flex flex-col gap-3 outline-none", Je.panel),
|
|
827
|
-
style:
|
|
828
|
-
children: [/* @__PURE__ */
|
|
829
|
+
style: de,
|
|
830
|
+
children: [/* @__PURE__ */ z("div", {
|
|
829
831
|
role: "search",
|
|
830
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ z(k, {
|
|
831
833
|
value: Me,
|
|
832
834
|
onChange: Le,
|
|
833
|
-
placeholder:
|
|
834
|
-
clearLabel:
|
|
835
|
-
"aria-label":
|
|
835
|
+
placeholder: Te,
|
|
836
|
+
clearLabel: Ee,
|
|
837
|
+
"aria-label": Te
|
|
836
838
|
})
|
|
837
|
-
}), /* @__PURE__ */
|
|
839
|
+
}), /* @__PURE__ */ z(qe, {
|
|
838
840
|
items: f,
|
|
839
841
|
selectedPath: _,
|
|
840
842
|
onSelectedPathChange: v,
|
|
@@ -844,25 +846,25 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
844
846
|
loadingPaths: S,
|
|
845
847
|
searchQuery: Me,
|
|
846
848
|
disabled: D,
|
|
847
|
-
noResultsLabel:
|
|
848
|
-
addSiblingFolderLabel:
|
|
849
|
-
addChildFolderLabel:
|
|
850
|
-
cancelCreatingFolderLabel:
|
|
851
|
-
emptyFolderNameError:
|
|
852
|
-
invalidFolderNameError:
|
|
853
|
-
duplicateFolderNameError:
|
|
854
|
-
rootLabel:
|
|
855
|
-
styles:
|
|
849
|
+
noResultsLabel: ge,
|
|
850
|
+
addSiblingFolderLabel: _e,
|
|
851
|
+
addChildFolderLabel: ve,
|
|
852
|
+
cancelCreatingFolderLabel: ye,
|
|
853
|
+
emptyFolderNameError: be,
|
|
854
|
+
invalidFolderNameError: xe,
|
|
855
|
+
duplicateFolderNameError: Se,
|
|
856
|
+
rootLabel: Ce,
|
|
857
|
+
styles: ue
|
|
856
858
|
})]
|
|
857
859
|
});
|
|
858
|
-
let Ue = L(
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
+
let Ue = L(V, Ye.destination);
|
|
861
|
+
return /* @__PURE__ */ B("div", {
|
|
860
862
|
className: L("flex flex-col gap-5", Je.panel),
|
|
861
|
-
style:
|
|
862
|
-
children: [s?.type == null ? /* @__PURE__ */
|
|
863
|
-
colors:
|
|
863
|
+
style: de,
|
|
864
|
+
children: [s?.type == null ? /* @__PURE__ */ z(F, {
|
|
865
|
+
colors: fe,
|
|
864
866
|
children: He
|
|
865
|
-
}) : /* @__PURE__ */
|
|
867
|
+
}) : /* @__PURE__ */ z(F, {
|
|
866
868
|
item: {
|
|
867
869
|
type: s.type,
|
|
868
870
|
name: s.title,
|
|
@@ -870,30 +872,30 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
870
872
|
iconUrl: s.iconUrl
|
|
871
873
|
},
|
|
872
874
|
hasVersionTag: !1,
|
|
873
|
-
colors:
|
|
874
|
-
}), /* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
className: L("mb-2",
|
|
877
|
-
children:
|
|
875
|
+
colors: fe
|
|
876
|
+
}), /* @__PURE__ */ B("section", { children: [
|
|
877
|
+
/* @__PURE__ */ z("h2", {
|
|
878
|
+
className: L("mb-2", ce, Ye.sectionHeading),
|
|
879
|
+
children: J
|
|
878
880
|
}),
|
|
879
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ B("div", {
|
|
880
882
|
className: "flex min-w-0 items-center gap-2",
|
|
881
|
-
children: [/* @__PURE__ */
|
|
883
|
+
children: [/* @__PURE__ */ z("div", {
|
|
882
884
|
role: "group",
|
|
883
|
-
"aria-label":
|
|
885
|
+
"aria-label": Y,
|
|
884
886
|
className: "min-w-0 flex-1",
|
|
885
|
-
children: ze ? /* @__PURE__ */
|
|
886
|
-
name: [
|
|
887
|
+
children: ze ? /* @__PURE__ */ z(h, {
|
|
888
|
+
name: [Ce, ...m].join(" / "),
|
|
887
889
|
nameClassName: Ue
|
|
888
|
-
}) : /* @__PURE__ */
|
|
890
|
+
}) : /* @__PURE__ */ z("span", {
|
|
889
891
|
className: L("block truncate", Ue),
|
|
890
|
-
children:
|
|
892
|
+
children: pe
|
|
891
893
|
})
|
|
892
|
-
}), /* @__PURE__ */
|
|
894
|
+
}), /* @__PURE__ */ z(g, {
|
|
893
895
|
ref: Fe,
|
|
894
896
|
size: p.Small,
|
|
895
|
-
label: ze ?
|
|
896
|
-
iconBefore: /* @__PURE__ */
|
|
897
|
+
label: ze ? X : Z,
|
|
898
|
+
iconBefore: /* @__PURE__ */ z(ie, {
|
|
897
899
|
size: u.SM,
|
|
898
900
|
stroke: d,
|
|
899
901
|
"aria-hidden": !0
|
|
@@ -902,27 +904,27 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
902
904
|
onClick: o
|
|
903
905
|
})]
|
|
904
906
|
}),
|
|
905
|
-
Be.calloutKind !==
|
|
907
|
+
Be.calloutKind !== U.None && Be.calloutKind !== U.Info && /* @__PURE__ */ z("div", {
|
|
906
908
|
className: "mt-3",
|
|
907
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ z(w, {
|
|
908
910
|
type: T.SectionMessage,
|
|
909
911
|
variant: Qe(Be.calloutKind),
|
|
910
912
|
message: et(Be.calloutKind, {
|
|
911
|
-
replaceWarning:
|
|
912
|
-
noAccessError:
|
|
913
|
-
submitError:
|
|
913
|
+
replaceWarning: me,
|
|
914
|
+
noAccessError: Q,
|
|
915
|
+
submitError: he,
|
|
914
916
|
folderName: Ve,
|
|
915
917
|
version: s?.version,
|
|
916
|
-
folderNameClassName:
|
|
918
|
+
folderNameClassName: H
|
|
917
919
|
})
|
|
918
920
|
})
|
|
919
921
|
}),
|
|
920
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ z("div", {
|
|
921
923
|
className: "mt-4",
|
|
922
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ z(ee, {
|
|
923
925
|
id: Pe,
|
|
924
|
-
labelProps: { label:
|
|
925
|
-
placeholder:
|
|
926
|
+
labelProps: { label: De },
|
|
927
|
+
placeholder: $,
|
|
926
928
|
caption: Oe,
|
|
927
929
|
value: j,
|
|
928
930
|
onChange: (e) => M(e ?? ""),
|
|
@@ -930,9 +932,9 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
930
932
|
disabled: D
|
|
931
933
|
})
|
|
932
934
|
}),
|
|
933
|
-
N != null && /* @__PURE__ */
|
|
935
|
+
N != null && /* @__PURE__ */ z("div", {
|
|
934
936
|
className: "mt-4",
|
|
935
|
-
children: /* @__PURE__ */
|
|
937
|
+
children: /* @__PURE__ */ z(c, {
|
|
936
938
|
labelProps: { label: ke },
|
|
937
939
|
caption: je,
|
|
938
940
|
isSelected: te,
|
|
@@ -940,54 +942,54 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
940
942
|
disabled: D
|
|
941
943
|
})
|
|
942
944
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ z("div", {
|
|
944
946
|
className: "mt-4",
|
|
945
|
-
children: /* @__PURE__ */
|
|
947
|
+
children: /* @__PURE__ */ z(Ae, {
|
|
946
948
|
rules: P,
|
|
947
949
|
onRulesChange: I,
|
|
948
950
|
sourceOptions: R,
|
|
949
951
|
folderName: ze ? Ve : void 0,
|
|
950
952
|
disabled: D,
|
|
951
|
-
isLoading:
|
|
952
|
-
hasLoadError:
|
|
953
|
-
labels:
|
|
954
|
-
styles:
|
|
953
|
+
isLoading: re,
|
|
954
|
+
hasLoadError: ae,
|
|
955
|
+
labels: we,
|
|
956
|
+
styles: K
|
|
955
957
|
})
|
|
956
958
|
})
|
|
957
959
|
] })]
|
|
958
960
|
});
|
|
959
|
-
}, Qe = (e) => e ===
|
|
961
|
+
}, Qe = (e) => e === U.ReplaceWarning ? E.Warning : E.Error, $e = (e, t, n) => {
|
|
960
962
|
let [r, i, ...a] = e.split("{folder}");
|
|
961
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
963
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ B(re, { children: [
|
|
962
964
|
r,
|
|
963
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ z("strong", {
|
|
964
966
|
className: n,
|
|
965
967
|
children: t
|
|
966
968
|
}),
|
|
967
969
|
i
|
|
968
970
|
] });
|
|
969
|
-
}, et = (e, t) => e ===
|
|
970
|
-
let p = ne({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: _ = "Update version {version}", publishingInProgressLabel: v = "Publishing…", selectFolderLabel: ee = "Select" } = d, y = s ===
|
|
971
|
-
return /* @__PURE__ */
|
|
971
|
+
}, et = (e, t) => e === U.ReplaceWarning ? $e(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === U.NoAccess ? $e(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, tt = { footer: "_footer_dks1v_1" }, nt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = q.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: d = {}, colors: f }) => {
|
|
972
|
+
let p = ne({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: _ = "Update version {version}", publishingInProgressLabel: v = "Publishing…", selectFolderLabel: ee = "Select" } = d, y = s === q.ChangeFolder, b = i ? v : n && t && e != null ? _.replace("{version}", e) : h;
|
|
973
|
+
return /* @__PURE__ */ B("div", {
|
|
972
974
|
style: p,
|
|
973
975
|
className: L("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", tt.footer),
|
|
974
|
-
children: [/* @__PURE__ */
|
|
976
|
+
children: [/* @__PURE__ */ z(g, {
|
|
975
977
|
label: m,
|
|
976
978
|
className: "mobile:flex-1",
|
|
977
979
|
disabled: i,
|
|
978
980
|
onClick: a
|
|
979
|
-
}), y ? /* @__PURE__ */
|
|
981
|
+
}), y ? /* @__PURE__ */ z(C, {
|
|
980
982
|
label: ee,
|
|
981
983
|
className: "mobile:flex-1",
|
|
982
984
|
disabled: l,
|
|
983
985
|
onClick: c
|
|
984
|
-
}) : /* @__PURE__ */
|
|
986
|
+
}) : /* @__PURE__ */ z(C, {
|
|
985
987
|
label: b,
|
|
986
988
|
className: "mobile:flex-1",
|
|
987
989
|
disabled: r,
|
|
988
|
-
iconBefore: i ? /* @__PURE__ */
|
|
990
|
+
iconBefore: i ? /* @__PURE__ */ z("span", {
|
|
989
991
|
"aria-hidden": !0,
|
|
990
|
-
children: /* @__PURE__ */
|
|
992
|
+
children: /* @__PURE__ */ z(M, { size: u.SM })
|
|
991
993
|
}) : void 0,
|
|
992
994
|
onClick: o
|
|
993
995
|
})]
|
|
@@ -1006,11 +1008,11 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1006
1008
|
"--spp-divider-border": F?.dividerBorder,
|
|
1007
1009
|
"--spp-scrollbar-thumb": F?.scrollbarThumb,
|
|
1008
1010
|
"--spp-title-text": F?.titleText
|
|
1009
|
-
}), [R,
|
|
1011
|
+
}), [R, re] = a(null), { title: ie = "Publish", changeFolderTitle: ae = "Change folder", backAriaLabel: oe = "Back", ariaLabel: se = "Publish", closeAriaLabel: ce = "Close" } = N, V = fe({
|
|
1010
1012
|
isOpen: e,
|
|
1011
1013
|
selectedFolderPath: s,
|
|
1012
1014
|
onSelectedFolderPathChange: c
|
|
1013
|
-
}),
|
|
1015
|
+
}), H = V.view === q.ChangeFolder, U = r(() => W({
|
|
1014
1016
|
hasSelectedFolder: s != null,
|
|
1015
1017
|
hasExistingPublicationInFolder: p,
|
|
1016
1018
|
hasWriteAccess: m,
|
|
@@ -1044,18 +1046,18 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1044
1046
|
e,
|
|
1045
1047
|
R,
|
|
1046
1048
|
T
|
|
1047
|
-
]), /* @__PURE__ */
|
|
1049
|
+
]), /* @__PURE__ */ B(j, {
|
|
1048
1050
|
open: e,
|
|
1049
1051
|
onClose: w,
|
|
1050
|
-
header: /* @__PURE__ */
|
|
1052
|
+
header: /* @__PURE__ */ z("span", {
|
|
1051
1053
|
className: L("block truncate text-center", P, rt.title),
|
|
1052
|
-
children:
|
|
1054
|
+
children: H ? ae : ie
|
|
1053
1055
|
}),
|
|
1054
|
-
ariaLabel:
|
|
1055
|
-
onBack:
|
|
1056
|
-
backAriaLabel:
|
|
1056
|
+
ariaLabel: se,
|
|
1057
|
+
onBack: H ? V.backToMain : void 0,
|
|
1058
|
+
backAriaLabel: oe,
|
|
1057
1059
|
backDisabled: h,
|
|
1058
|
-
closeAriaLabel:
|
|
1060
|
+
closeAriaLabel: ce,
|
|
1059
1061
|
closeDisabled: h,
|
|
1060
1062
|
style: I,
|
|
1061
1063
|
overlayStyle: I,
|
|
@@ -1063,20 +1065,20 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1063
1065
|
overlayClassName: rt.backdrop,
|
|
1064
1066
|
headerClassName: L("px-[22px]", rt.divider),
|
|
1065
1067
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1066
|
-
children: [/* @__PURE__ */
|
|
1067
|
-
ref:
|
|
1068
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1069
|
+
ref: re,
|
|
1068
1070
|
className: L("min-h-0 flex-1 overflow-y-auto", rt.content),
|
|
1069
|
-
children: /* @__PURE__ */
|
|
1071
|
+
children: /* @__PURE__ */ z("div", {
|
|
1070
1072
|
className: "p-[22px]",
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1073
|
+
children: /* @__PURE__ */ z(Ze, {
|
|
1072
1074
|
resource: n,
|
|
1073
1075
|
renderSummary: i,
|
|
1074
|
-
view:
|
|
1075
|
-
onChangeFolderClick:
|
|
1076
|
+
view: V.view,
|
|
1077
|
+
onChangeFolderClick: V.openFolderView,
|
|
1076
1078
|
folderItems: o,
|
|
1077
1079
|
selectedFolderPath: s,
|
|
1078
|
-
pendingFolderPath:
|
|
1079
|
-
onPendingFolderPathChange:
|
|
1080
|
+
pendingFolderPath: V.pendingFolderPath,
|
|
1081
|
+
onPendingFolderPathChange: V.setPendingFolderPath,
|
|
1080
1082
|
onCreateFolder: l,
|
|
1081
1083
|
expandedPaths: u,
|
|
1082
1084
|
onExpandedPathsChange: d,
|
|
@@ -1100,23 +1102,23 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1100
1102
|
calloutFolderNameClassName: M
|
|
1101
1103
|
})
|
|
1102
1104
|
})
|
|
1103
|
-
}), /* @__PURE__ */
|
|
1105
|
+
}), /* @__PURE__ */ z(nt, {
|
|
1104
1106
|
version: n?.version,
|
|
1105
1107
|
hasExistingPublicationInFolder: p,
|
|
1106
1108
|
allowReplace: _,
|
|
1107
|
-
isSubmitDisabled:
|
|
1108
|
-
isSubmitLoading:
|
|
1109
|
-
onCancel:
|
|
1109
|
+
isSubmitDisabled: U.isSubmitDisabled,
|
|
1110
|
+
isSubmitLoading: U.isSubmitLoading,
|
|
1111
|
+
onCancel: H ? V.backToMain : w,
|
|
1110
1112
|
onSubmit: E,
|
|
1111
|
-
view:
|
|
1112
|
-
onSelectFolder:
|
|
1113
|
-
isSelectFolderDisabled:
|
|
1113
|
+
view: V.view,
|
|
1114
|
+
onSelectFolder: V.selectFolder,
|
|
1115
|
+
isSelectFolderDisabled: V.pendingFolderPath == null,
|
|
1114
1116
|
labels: te
|
|
1115
1117
|
})]
|
|
1116
1118
|
});
|
|
1117
1119
|
}, at = { option: "_option_skygm_1" }, ot = (e, t) => `Unpublish "${e}" from "${t}"?`, st = (e) => `Choose which folder to unpublish "${e}" from.`, ct = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: u, onClose: d }) => {
|
|
1118
1120
|
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = ot, selectFolderMessage: ee = st } = o ?? {}, y = n.length > 1;
|
|
1119
|
-
return /* @__PURE__ */
|
|
1121
|
+
return /* @__PURE__ */ z(P, {
|
|
1120
1122
|
open: e,
|
|
1121
1123
|
title: f,
|
|
1122
1124
|
confirmLabel: p,
|
|
@@ -1125,23 +1127,23 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1125
1127
|
isLoading: a,
|
|
1126
1128
|
isConfirmDisabled: y && r == null,
|
|
1127
1129
|
loadingStatusLabel: _,
|
|
1128
|
-
message: /* @__PURE__ */
|
|
1130
|
+
message: /* @__PURE__ */ z("span", {
|
|
1129
1131
|
className: "wrap-break-word",
|
|
1130
|
-
children: y ? ee(t) : v(t,
|
|
1132
|
+
children: y ? ee(t) : v(t, ge(n[0] ?? "", h))
|
|
1131
1133
|
}),
|
|
1132
1134
|
onConfirm: u,
|
|
1133
1135
|
onClose: d,
|
|
1134
|
-
children: y && /* @__PURE__ */
|
|
1136
|
+
children: y && /* @__PURE__ */ z("div", {
|
|
1135
1137
|
className: "mt-3",
|
|
1136
1138
|
style: ne({ "--ucd-option-text": c?.optionText }),
|
|
1137
|
-
children: /* @__PURE__ */
|
|
1139
|
+
children: /* @__PURE__ */ z(O, {
|
|
1138
1140
|
ariaLabel: g,
|
|
1139
1141
|
value: r ?? void 0,
|
|
1140
1142
|
onChange: i,
|
|
1141
1143
|
disabled: a,
|
|
1142
1144
|
items: n.map((e) => ({
|
|
1143
1145
|
value: e,
|
|
1144
|
-
label:
|
|
1146
|
+
label: ge(e, h)
|
|
1145
1147
|
})),
|
|
1146
1148
|
radioClassName: L(s, at.option)
|
|
1147
1149
|
})
|
|
@@ -1155,64 +1157,64 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1155
1157
|
heading: "_heading_vk731_1",
|
|
1156
1158
|
destination: "_destination_vk731_5"
|
|
1157
1159
|
}, ft = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, onChangeFolderClick: c, changeFolderButtonRef: l, pendingDestination: f, onPendingDestinationChange: _, version: v, accessRules: x, isSubmitting: C = !1, submitError: w, foldersError: T, onRetryFolders: E, panelLabels: D = {}, panelStyles: A = {}, headingClassName: j = "dial-body-semi-text", destinationClassName: M = "dial-small-semi-text" }) => {
|
|
1158
|
-
let { saveToFolderHeading: te = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: I = "Version", keepVersionLabel: R = "Keep version {version}", saveAsNewVersionLabel:
|
|
1160
|
+
let { saveToFolderHeading: te = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: I = "Version", keepVersionLabel: R = "Keep version {version}", saveAsNewVersionLabel: re = "Save as new version", newVersionLabel: ae = "Version", newVersionPlaceholder: oe = "Enter new version", searchPlaceholder: se = "Search folders", clearSearchAriaLabel: ce = "Clear search", folderEmptyStateLabel: V, createFolderLabel: H, cancelCreatingFolderLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: le, createFolderEmptyNameError: G, createFolderInvalidNameError: ue, createFolderDuplicateNameError: K, retryLabel: de = "Retry" } = D, { colors: q, folderTree: fe } = A, J = {
|
|
1159
1161
|
...ne({
|
|
1160
|
-
"--stf-heading-text":
|
|
1161
|
-
"--stf-destination-text":
|
|
1162
|
+
"--stf-heading-text": q?.headingText,
|
|
1163
|
+
"--stf-destination-text": q?.destinationText
|
|
1162
1164
|
}),
|
|
1163
1165
|
...A.cssVars
|
|
1164
|
-
},
|
|
1165
|
-
border:
|
|
1166
|
-
background:
|
|
1167
|
-
}, [
|
|
1168
|
-
if (e === ut.ChangeFolder) return /* @__PURE__ */
|
|
1166
|
+
}, Y = {
|
|
1167
|
+
border: q?.summaryBorder,
|
|
1168
|
+
background: q?.summaryBackground
|
|
1169
|
+
}, [pe, X] = a(""), Z = n(), me = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), Q = i.find((e) => e.key === f?.rootKey), he = f ? f.path[f.path.length - 1] ?? Q?.label : void 0, ge = L(j, dt.heading);
|
|
1170
|
+
if (e === ut.ChangeFolder) return /* @__PURE__ */ B("div", {
|
|
1169
1171
|
className: "flex flex-col gap-3",
|
|
1170
|
-
style:
|
|
1172
|
+
style: J,
|
|
1171
1173
|
children: [
|
|
1172
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ z("div", {
|
|
1173
1175
|
role: "search",
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1175
|
-
value:
|
|
1176
|
-
onChange: (e) =>
|
|
1177
|
-
placeholder:
|
|
1178
|
-
clearLabel:
|
|
1179
|
-
"aria-label":
|
|
1176
|
+
children: /* @__PURE__ */ z(k, {
|
|
1177
|
+
value: pe,
|
|
1178
|
+
onChange: (e) => X(e ?? ""),
|
|
1179
|
+
placeholder: se,
|
|
1180
|
+
clearLabel: ce,
|
|
1181
|
+
"aria-label": se
|
|
1180
1182
|
})
|
|
1181
1183
|
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ z(b, {
|
|
1183
1185
|
politeness: S.Assertive,
|
|
1184
|
-
children: T && /* @__PURE__ */
|
|
1186
|
+
children: T && /* @__PURE__ */ B("div", {
|
|
1185
1187
|
className: "flex flex-wrap items-center gap-2",
|
|
1186
|
-
children: [/* @__PURE__ */
|
|
1187
|
-
label:
|
|
1188
|
+
children: [/* @__PURE__ */ z(m, { text: T }), E && /* @__PURE__ */ z(y, {
|
|
1189
|
+
label: de,
|
|
1188
1190
|
onClick: E
|
|
1189
1191
|
})]
|
|
1190
1192
|
})
|
|
1191
1193
|
}),
|
|
1192
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ z(qe, {
|
|
1193
1195
|
roots: i,
|
|
1194
1196
|
destination: f,
|
|
1195
1197
|
onDestinationChange: _,
|
|
1196
1198
|
onCreateDestinationFolder: s,
|
|
1197
|
-
searchQuery:
|
|
1199
|
+
searchQuery: pe,
|
|
1198
1200
|
disabled: C,
|
|
1199
|
-
noResultsLabel:
|
|
1200
|
-
createFolderLabel:
|
|
1201
|
-
cancelCreatingFolderLabel:
|
|
1202
|
-
addSiblingFolderLabel:
|
|
1203
|
-
addChildFolderLabel:
|
|
1204
|
-
emptyFolderNameError:
|
|
1205
|
-
invalidFolderNameError:
|
|
1206
|
-
duplicateFolderNameError:
|
|
1207
|
-
styles:
|
|
1201
|
+
noResultsLabel: V,
|
|
1202
|
+
createFolderLabel: H,
|
|
1203
|
+
cancelCreatingFolderLabel: U,
|
|
1204
|
+
addSiblingFolderLabel: W,
|
|
1205
|
+
addChildFolderLabel: le,
|
|
1206
|
+
emptyFolderNameError: G,
|
|
1207
|
+
invalidFolderNameError: ue,
|
|
1208
|
+
duplicateFolderNameError: K,
|
|
1209
|
+
styles: fe
|
|
1208
1210
|
}),
|
|
1209
|
-
x &&
|
|
1211
|
+
x && Q?.hasAccessRules && /* @__PURE__ */ z("div", {
|
|
1210
1212
|
className: "mt-1",
|
|
1211
|
-
children: /* @__PURE__ */
|
|
1213
|
+
children: /* @__PURE__ */ z(Ae, {
|
|
1212
1214
|
rules: x.rules,
|
|
1213
1215
|
onRulesChange: x.onRulesChange,
|
|
1214
1216
|
sourceOptions: x.sourceOptions,
|
|
1215
|
-
folderName:
|
|
1217
|
+
folderName: he,
|
|
1216
1218
|
disabled: C,
|
|
1217
1219
|
isLoading: x.isLoading,
|
|
1218
1220
|
hasLoadError: x.hasLoadError,
|
|
@@ -1222,38 +1224,38 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1222
1224
|
})
|
|
1223
1225
|
]
|
|
1224
1226
|
});
|
|
1225
|
-
let
|
|
1227
|
+
let _e = v ? [{
|
|
1226
1228
|
value: lt.Keep,
|
|
1227
1229
|
label: R.replace("{version}", v.currentVersion)
|
|
1228
1230
|
}, {
|
|
1229
1231
|
value: lt.New,
|
|
1230
|
-
label:
|
|
1231
|
-
content: /* @__PURE__ */
|
|
1232
|
-
id:
|
|
1232
|
+
label: re,
|
|
1233
|
+
content: /* @__PURE__ */ z(ee, {
|
|
1234
|
+
id: Z,
|
|
1233
1235
|
value: v.newVersion,
|
|
1234
1236
|
onChange: (e) => v.onNewVersionChange(e ?? ""),
|
|
1235
1237
|
onBlur: v.onNewVersionBlur,
|
|
1236
1238
|
labelProps: {
|
|
1237
|
-
label:
|
|
1239
|
+
label: ae,
|
|
1238
1240
|
required: !0
|
|
1239
1241
|
},
|
|
1240
|
-
placeholder:
|
|
1242
|
+
placeholder: oe,
|
|
1241
1243
|
error: v.newVersionError,
|
|
1242
1244
|
invalid: !!v.newVersionError,
|
|
1243
1245
|
disabled: C
|
|
1244
1246
|
})
|
|
1245
1247
|
}] : [];
|
|
1246
|
-
return /* @__PURE__ */
|
|
1248
|
+
return /* @__PURE__ */ B("div", {
|
|
1247
1249
|
className: "flex flex-col gap-5",
|
|
1248
|
-
style:
|
|
1250
|
+
style: J,
|
|
1249
1251
|
children: [
|
|
1250
|
-
t.type == null ? /* @__PURE__ */
|
|
1251
|
-
colors:
|
|
1252
|
-
children: /* @__PURE__ */
|
|
1253
|
-
className: L("truncate",
|
|
1252
|
+
t.type == null ? /* @__PURE__ */ z(F, {
|
|
1253
|
+
colors: Y,
|
|
1254
|
+
children: /* @__PURE__ */ z("span", {
|
|
1255
|
+
className: L("truncate", ge),
|
|
1254
1256
|
children: t.title
|
|
1255
1257
|
})
|
|
1256
|
-
}) : /* @__PURE__ */
|
|
1258
|
+
}) : /* @__PURE__ */ z(F, {
|
|
1257
1259
|
item: {
|
|
1258
1260
|
type: t.type,
|
|
1259
1261
|
name: t.title,
|
|
@@ -1261,28 +1263,28 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1261
1263
|
iconUrl: t.iconUrl
|
|
1262
1264
|
},
|
|
1263
1265
|
hasVersionTag: !1,
|
|
1264
|
-
colors:
|
|
1266
|
+
colors: Y
|
|
1265
1267
|
}),
|
|
1266
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ B("section", {
|
|
1267
1269
|
className: "flex flex-col gap-2",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1269
|
-
className:
|
|
1270
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1271
|
+
className: ge,
|
|
1270
1272
|
children: te
|
|
1271
|
-
}), /* @__PURE__ */
|
|
1273
|
+
}), /* @__PURE__ */ B("div", {
|
|
1272
1274
|
className: "flex min-w-0 items-center gap-2",
|
|
1273
|
-
children: [/* @__PURE__ */
|
|
1275
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1274
1276
|
role: "group",
|
|
1275
1277
|
"aria-label": P,
|
|
1276
1278
|
className: "min-w-0 flex-1",
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1278
|
-
name:
|
|
1279
|
+
children: /* @__PURE__ */ z(h, {
|
|
1280
|
+
name: me.join(" / "),
|
|
1279
1281
|
nameClassName: L(M, dt.destination)
|
|
1280
1282
|
})
|
|
1281
|
-
}), /* @__PURE__ */
|
|
1283
|
+
}), /* @__PURE__ */ z(g, {
|
|
1282
1284
|
ref: l,
|
|
1283
1285
|
size: p.Small,
|
|
1284
1286
|
label: N,
|
|
1285
|
-
iconBefore: /* @__PURE__ */
|
|
1287
|
+
iconBefore: /* @__PURE__ */ z(ie, {
|
|
1286
1288
|
size: u.SM,
|
|
1287
1289
|
stroke: d,
|
|
1288
1290
|
"aria-hidden": !0
|
|
@@ -1292,22 +1294,22 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1292
1294
|
})]
|
|
1293
1295
|
})]
|
|
1294
1296
|
}),
|
|
1295
|
-
v && /* @__PURE__ */
|
|
1297
|
+
v && /* @__PURE__ */ B("section", {
|
|
1296
1298
|
className: "flex flex-col gap-2",
|
|
1297
|
-
children: [/* @__PURE__ */
|
|
1298
|
-
className:
|
|
1299
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1300
|
+
className: ge,
|
|
1299
1301
|
children: I
|
|
1300
|
-
}), /* @__PURE__ */
|
|
1302
|
+
}), /* @__PURE__ */ z(O, {
|
|
1301
1303
|
ariaLabel: I,
|
|
1302
1304
|
value: v.versionMode,
|
|
1303
1305
|
onChange: (e) => v.onVersionModeChange(e),
|
|
1304
|
-
items:
|
|
1306
|
+
items: _e,
|
|
1305
1307
|
disabled: C
|
|
1306
1308
|
})]
|
|
1307
1309
|
}),
|
|
1308
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ z(b, {
|
|
1309
1311
|
politeness: S.Assertive,
|
|
1310
|
-
children: w && /* @__PURE__ */
|
|
1312
|
+
children: w && /* @__PURE__ */ z(m, { text: w })
|
|
1311
1313
|
})
|
|
1312
1314
|
]
|
|
1313
1315
|
});
|
|
@@ -1339,26 +1341,26 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1339
1341
|
let t = I.current;
|
|
1340
1342
|
I.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1341
1343
|
}, [e, s]);
|
|
1342
|
-
let R = O === ut.ChangeFolder,
|
|
1344
|
+
let R = O === ut.ChangeFolder, re = (e) => {
|
|
1343
1345
|
te(e), h?.(e);
|
|
1344
|
-
}, re = () => {
|
|
1345
|
-
z(f), k(ut.ChangeFolder);
|
|
1346
1346
|
}, ie = () => {
|
|
1347
|
-
|
|
1347
|
+
re(f), k(ut.ChangeFolder);
|
|
1348
1348
|
}, ae = () => {
|
|
1349
|
+
h?.(f), k(ut.Main);
|
|
1350
|
+
}, oe = () => {
|
|
1349
1351
|
A && p(A), k(ut.Main);
|
|
1350
1352
|
};
|
|
1351
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ B(j, {
|
|
1352
1354
|
open: e,
|
|
1353
1355
|
onClose: n,
|
|
1354
|
-
header: /* @__PURE__ */
|
|
1356
|
+
header: /* @__PURE__ */ z("span", {
|
|
1355
1357
|
ref: N,
|
|
1356
1358
|
tabIndex: -1,
|
|
1357
1359
|
className: L("block truncate outline-none", d, pt.title),
|
|
1358
1360
|
children: R ? ee : v
|
|
1359
1361
|
}),
|
|
1360
1362
|
ariaLabel: v,
|
|
1361
|
-
onBack: R ?
|
|
1363
|
+
onBack: R ? ae : void 0,
|
|
1362
1364
|
backAriaLabel: b,
|
|
1363
1365
|
backDisabled: m,
|
|
1364
1366
|
closeAriaLabel: y,
|
|
@@ -1369,38 +1371,38 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1369
1371
|
overlayClassName: pt.backdrop,
|
|
1370
1372
|
headerClassName: L("px-[22px]", pt.divider),
|
|
1371
1373
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1372
|
-
children: [/* @__PURE__ */
|
|
1374
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1373
1375
|
className: L("min-h-0 flex-1 overflow-y-auto p-[22px]", pt.content),
|
|
1374
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ z(ft, {
|
|
1375
1377
|
..._,
|
|
1376
1378
|
view: O,
|
|
1377
1379
|
destination: f,
|
|
1378
1380
|
onDestinationChange: p,
|
|
1379
1381
|
isSubmitting: m,
|
|
1380
|
-
onChangeFolderClick:
|
|
1382
|
+
onChangeFolderClick: ie,
|
|
1381
1383
|
changeFolderButtonRef: P,
|
|
1382
1384
|
pendingDestination: A,
|
|
1383
|
-
onPendingDestinationChange:
|
|
1385
|
+
onPendingDestinationChange: re
|
|
1384
1386
|
})
|
|
1385
|
-
}), /* @__PURE__ */
|
|
1387
|
+
}), /* @__PURE__ */ B("div", {
|
|
1386
1388
|
className: L("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", pt.footer),
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1389
|
+
children: [/* @__PURE__ */ z(g, {
|
|
1388
1390
|
label: x,
|
|
1389
1391
|
className: "mobile:flex-1",
|
|
1390
1392
|
disabled: m,
|
|
1391
|
-
onClick: R ?
|
|
1392
|
-
}), R ? /* @__PURE__ */
|
|
1393
|
+
onClick: R ? ae : n
|
|
1394
|
+
}), R ? /* @__PURE__ */ z(C, {
|
|
1393
1395
|
label: T,
|
|
1394
1396
|
className: "mobile:flex-1",
|
|
1395
1397
|
disabled: A == null,
|
|
1396
|
-
onClick:
|
|
1397
|
-
}) : /* @__PURE__ */
|
|
1398
|
+
onClick: oe
|
|
1399
|
+
}) : /* @__PURE__ */ z(D, {
|
|
1398
1400
|
label: m ? w : S,
|
|
1399
1401
|
className: "mobile:flex-1",
|
|
1400
1402
|
disabled: o || m,
|
|
1401
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1403
|
+
iconBefore: m ? /* @__PURE__ */ z("span", {
|
|
1402
1404
|
"aria-hidden": !0,
|
|
1403
|
-
children: /* @__PURE__ */
|
|
1405
|
+
children: /* @__PURE__ */ z(M, { size: u.SM })
|
|
1404
1406
|
}) : void 0,
|
|
1405
1407
|
onClick: r
|
|
1406
1408
|
})]
|
|
@@ -1408,4 +1410,4 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1408
1410
|
});
|
|
1409
1411
|
};
|
|
1410
1412
|
//#endregion
|
|
1411
|
-
export { Je as PUBLISH_PANEL_CLASS,
|
|
1413
|
+
export { Je as PUBLISH_PANEL_CLASS, H as PublicationRuleFunction, De as PublishAccessRuleEditor, Ae as PublishAccessRules, U as PublishCalloutKind, qe as PublishFoldersTree, nt as PublishFooter, Me as PublishHistoryList, Ze as PublishPanel, q as PublishPanelView, ft as SaveToFolderPanel, ut as SaveToFolderView, lt as SaveVersionMode, it as StandalonePublishPanel, mt as StandaloneSaveToFolderPanel, ct as UnpublishConfirmationDialog, me as collectFolderKeys, W as derivePublishState, J as filterFolderTree, G as formatPublishedDate, he as fromFolderPathKey, xe as getSiblingFolderNames, be as getUniqueFolderName, Z as mergeFolderPaths, pe as sortFolderTree, _e as toDialFileTree, Q as toFolderPathKey, de as usePublishFlow, fe as usePublishFolderView, ye as validateFolderName };
|