@epam/ai-dial-publish-panel 1.4.0-dev.12 → 1.4.0-dev.26
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/PublishFoldersTree/PublishFoldersTree.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +2 -0
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -1
- package/index.js +294 -288
- package/models/publish-folders-tree.d.ts +2 -0
- package/models/publish-folders-tree.d.ts.map +1 -1
- package/models/save-to-folder-panel.d.ts +2 -0
- package/models/save-to-folder-panel.d.ts.map +1 -1
- package/package.json +2 -2
- package/utils/publish-folder-tree.d.ts +4 -2
- package/utils/publish-folder-tree.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { 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
|
|
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 te, Spinner as j, Tag as M, 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
4
|
import { Fragment as re, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
5
5
|
import { IconFolder as ie, IconFolderPlus as ae, IconPlus as oe, IconTrashX as se } from "@tabler/icons-react";
|
|
@@ -61,17 +61,17 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
...e,
|
|
62
62
|
children: e.children ? K(e.children, t, n) : e.children
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, q = ({ 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, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [C, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [
|
|
69
|
+
let [g, _] = a(), [v, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [C, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [te, j] = a(!1);
|
|
70
70
|
t(() => {
|
|
71
|
-
|
|
72
|
-
}, [c,
|
|
73
|
-
let
|
|
74
|
-
|
|
71
|
+
te || O(c);
|
|
72
|
+
}, [c, te]);
|
|
73
|
+
let M = e((e) => {
|
|
74
|
+
j(!0), O(e);
|
|
75
75
|
}, []);
|
|
76
76
|
t(() => {
|
|
77
77
|
if (g == null) {
|
|
@@ -125,7 +125,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
125
125
|
x,
|
|
126
126
|
g
|
|
127
127
|
]), I = e(() => {
|
|
128
|
-
h(o), _(void 0), b(!1), S([]), E(!1), O(c),
|
|
128
|
+
h(o), _(void 0), b(!1), S([]), E(!1), O(c), j(!1), A(!1);
|
|
129
129
|
}, [c, o]);
|
|
130
130
|
return {
|
|
131
131
|
folderItems: m,
|
|
@@ -141,99 +141,99 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
141
141
|
rules: x,
|
|
142
142
|
setRules: S,
|
|
143
143
|
author: D,
|
|
144
|
-
setAuthor:
|
|
144
|
+
setAuthor: M,
|
|
145
145
|
publishCredentials: k,
|
|
146
146
|
setPublishCredentials: A,
|
|
147
147
|
isRulesLoading: C,
|
|
148
148
|
hasRulesLoadError: T
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, J = /* @__PURE__ */ function(e) {
|
|
151
151
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
152
|
-
}({}),
|
|
153
|
-
let [i, o] = a(
|
|
152
|
+
}({}), Y = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
|
|
153
|
+
let [i, o] = a(J.Main), [s, c] = a();
|
|
154
154
|
return t(() => {
|
|
155
|
-
e && o(
|
|
155
|
+
e && o(J.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(J.ChangeFolder);
|
|
162
162
|
},
|
|
163
|
-
backToMain: () => o(
|
|
163
|
+
backToMain: () => o(J.Main),
|
|
164
164
|
selectFolder: () => {
|
|
165
|
-
s != null && r(s), o(
|
|
165
|
+
s != null && r(s), o(J.Main);
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
},
|
|
168
|
+
}, X = (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 ? X(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
|
+
}, de = (e, t) => e.localeCompare(t, void 0, {
|
|
178
178
|
sensitivity: "base",
|
|
179
179
|
numeric: !0
|
|
180
|
-
}),
|
|
180
|
+
}), fe = (e) => [...e].sort((e, t) => de(e.name, t.name)).map((e) => e.children ? {
|
|
181
181
|
...e,
|
|
182
|
-
children:
|
|
183
|
-
} : e),
|
|
182
|
+
children: fe(e.children)
|
|
183
|
+
} : e), Z = (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: Z(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 ? Z([], i, a) : void 0
|
|
194
194
|
}];
|
|
195
|
-
},
|
|
196
|
-
let t =
|
|
195
|
+
}, Q = (e, t) => t.reduce((e, t) => t.length ? Z(e, t, []) : e, e), pe = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? pe(e.children) : []]), $ = (e) => e.join("/"), me = (e) => e.split("/").filter(Boolean), he = (e, t) => me(e).at(-1) ?? t, ge = (e) => e.map((e) => {
|
|
196
|
+
let t = $(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 ? ge(e.children) : void 0
|
|
203
203
|
};
|
|
204
|
-
}),
|
|
205
|
-
let
|
|
206
|
-
return
|
|
207
|
-
},
|
|
204
|
+
}), _e = /[/\\:;,={}&"]/, ve = (e, t, n, r) => {
|
|
205
|
+
let i = e.trim();
|
|
206
|
+
return i ? i.includes("..") || _e.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
|
|
207
|
+
}, ye = (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
|
+
}, be = (e, t) => {
|
|
214
214
|
if (t.length === 0) return e.map((e) => e.name);
|
|
215
|
-
let n =
|
|
215
|
+
let n = $(t), r = (e) => {
|
|
216
216
|
for (let t of e) {
|
|
217
|
-
if (
|
|
217
|
+
if ($(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
|
+
}, xe = {
|
|
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
|
+
}, Se = 20, Ce = 200, we = 8, Te = (e) => {
|
|
229
229
|
let t = e.trim();
|
|
230
|
-
if (t.length === 0 || t.length >
|
|
230
|
+
if (t.length === 0 || t.length > Ce) return !1;
|
|
231
231
|
try {
|
|
232
232
|
return new RegExp(t) instanceof RegExp;
|
|
233
233
|
} catch {
|
|
234
234
|
return !1;
|
|
235
235
|
}
|
|
236
|
-
},
|
|
236
|
+
}, Ee = ({ sourceOptions: e, onSave: s, onCancel: c, disabled: l = !1, maxTargets: u = Se, labels: d = {}, styles: f = {} }) => {
|
|
237
237
|
let p = R(), m = {
|
|
238
238
|
...ne({
|
|
239
239
|
"--pare-mobile-bg": f.colors?.mobileBackground,
|
|
@@ -244,19 +244,19 @@ var H = /* @__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:
|
|
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: te = "This field is required.", targetsRequiredError: j = "Add at least one target.", saveLabel: M = "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
249
|
p || ce.current?.focus();
|
|
250
250
|
}, [p]);
|
|
251
|
-
let [V, U] = a(), [W, le] = a(), [G, ue] = a([]), [K,
|
|
251
|
+
let [V, U] = a(), [W, le] = a(), [G, ue] = a([]), [K, q] = a(""), [J, Y] = a(!1), [X, de] = a(""), [fe, Z] = a(!1), [Q, pe] = a(!1), $ = L(xe.selectField, J && xe.selectFieldOpen), me = L(xe.selectField, fe && xe.selectFieldOpen), he = r(() => e.map((e) => ({
|
|
252
252
|
value: e,
|
|
253
253
|
label: e,
|
|
254
|
-
labelNode:
|
|
254
|
+
labelNode: X.trim() ? /* @__PURE__ */ z(v, {
|
|
255
255
|
text: e,
|
|
256
|
-
query:
|
|
256
|
+
query: X,
|
|
257
257
|
maxLines: 1
|
|
258
258
|
}) : void 0
|
|
259
|
-
})), [e,
|
|
259
|
+
})), [e, X]), ge = r(() => [
|
|
260
260
|
{
|
|
261
261
|
value: H.Equal,
|
|
262
262
|
label: b
|
|
@@ -273,75 +273,75 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
273
273
|
b,
|
|
274
274
|
x,
|
|
275
275
|
S
|
|
276
|
-
]),
|
|
277
|
-
U(Array.isArray(e) ? e[0] : e),
|
|
278
|
-
},
|
|
276
|
+
]), _e = W === H.Regex, ve = Te(K), ye = V != null && W != null && (_e ? ve : G.length > 0), be = (e) => {
|
|
277
|
+
U(Array.isArray(e) ? e[0] : e), Y(!1);
|
|
278
|
+
}, Ce = (e) => {
|
|
279
279
|
let t = Array.isArray(e) ? e[0] : e;
|
|
280
|
-
W === H.Regex != (t === H.Regex) && (ue([]),
|
|
281
|
-
},
|
|
280
|
+
W === H.Regex != (t === H.Regex) && (ue([]), q("")), le(t), Z(!1);
|
|
281
|
+
}, Ee = (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
287
|
ue(t);
|
|
288
|
-
},
|
|
289
|
-
!
|
|
288
|
+
}, De = () => {
|
|
289
|
+
!ye || V == null || W == null ? pe(!0) : s({
|
|
290
290
|
source: V,
|
|
291
291
|
function: W,
|
|
292
|
-
targets:
|
|
292
|
+
targets: _e ? [K.trim()] : G
|
|
293
293
|
});
|
|
294
|
-
}, Oe = (K.length > 0 ||
|
|
294
|
+
}, Oe = (K.length > 0 || Q) && !ve, ke = (e) => {
|
|
295
295
|
e.key === "Escape" && (e.stopPropagation(), c());
|
|
296
296
|
}, Ae = /* @__PURE__ */ B(re, { children: [
|
|
297
297
|
/* @__PURE__ */ z(A, {
|
|
298
298
|
id: ae,
|
|
299
299
|
labelProps: { label: h },
|
|
300
|
-
options:
|
|
300
|
+
options: he,
|
|
301
301
|
value: V,
|
|
302
|
-
onChange:
|
|
302
|
+
onChange: be,
|
|
303
303
|
placeholder: _,
|
|
304
|
-
searchable: e.length >
|
|
304
|
+
searchable: e.length > we,
|
|
305
305
|
searchPlaceholder: _,
|
|
306
|
-
onSearchQueryChange:
|
|
306
|
+
onSearchQueryChange: de,
|
|
307
307
|
disabled: l,
|
|
308
|
-
open:
|
|
309
|
-
onOpenChange:
|
|
310
|
-
fieldClassName:
|
|
311
|
-
invalid:
|
|
312
|
-
error:
|
|
308
|
+
open: J,
|
|
309
|
+
onOpenChange: Y,
|
|
310
|
+
fieldClassName: $,
|
|
311
|
+
invalid: Q && V == null,
|
|
312
|
+
error: Q && V == null ? te : void 0
|
|
313
313
|
}),
|
|
314
314
|
/* @__PURE__ */ z(A, {
|
|
315
315
|
labelProps: { label: y },
|
|
316
316
|
id: oe,
|
|
317
|
-
options:
|
|
317
|
+
options: ge,
|
|
318
318
|
value: W,
|
|
319
|
-
onChange:
|
|
319
|
+
onChange: Ce,
|
|
320
320
|
placeholder: y,
|
|
321
321
|
disabled: l,
|
|
322
|
-
open:
|
|
323
|
-
onOpenChange:
|
|
324
|
-
fieldClassName:
|
|
325
|
-
invalid:
|
|
326
|
-
error:
|
|
322
|
+
open: fe,
|
|
323
|
+
onOpenChange: Z,
|
|
324
|
+
fieldClassName: me,
|
|
325
|
+
invalid: Q && W == null,
|
|
326
|
+
error: Q && W == null ? te : void 0
|
|
327
327
|
}),
|
|
328
|
-
|
|
328
|
+
_e ? /* @__PURE__ */ z(ee, {
|
|
329
329
|
id: ie,
|
|
330
330
|
labelProps: { label: D },
|
|
331
331
|
placeholder: O,
|
|
332
332
|
value: K,
|
|
333
|
-
onChange: (e) =>
|
|
333
|
+
onChange: (e) => q(e ?? ""),
|
|
334
334
|
error: Oe ? k : void 0,
|
|
335
335
|
disabled: l
|
|
336
336
|
}) : /* @__PURE__ */ z(N, {
|
|
337
337
|
id: se,
|
|
338
338
|
labelProps: { label: w },
|
|
339
339
|
placeholder: T,
|
|
340
|
-
caption:
|
|
341
|
-
error:
|
|
342
|
-
invalid:
|
|
340
|
+
caption: Q && G.length === 0 ? void 0 : E,
|
|
341
|
+
error: Q && G.length === 0 ? j : void 0,
|
|
342
|
+
invalid: Q && G.length === 0,
|
|
343
343
|
value: G,
|
|
344
|
-
onChange:
|
|
344
|
+
onChange: Ee,
|
|
345
345
|
disabled: l,
|
|
346
346
|
tagClassName: I
|
|
347
347
|
}),
|
|
@@ -352,8 +352,8 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
352
352
|
onClick: c,
|
|
353
353
|
disabled: l
|
|
354
354
|
}), /* @__PURE__ */ z(C, {
|
|
355
|
-
label:
|
|
356
|
-
onClick:
|
|
355
|
+
label: M,
|
|
356
|
+
onClick: De,
|
|
357
357
|
disabled: l
|
|
358
358
|
})]
|
|
359
359
|
})
|
|
@@ -363,7 +363,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
363
363
|
onClose: c,
|
|
364
364
|
ariaLabel: F,
|
|
365
365
|
style: m,
|
|
366
|
-
className:
|
|
366
|
+
className: xe.sheet,
|
|
367
367
|
bodyClassName: "flex flex-col gap-3 p-4",
|
|
368
368
|
children: Ae
|
|
369
369
|
}) : /* @__PURE__ */ z("div", {
|
|
@@ -373,10 +373,10 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
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", xe.inline),
|
|
377
377
|
children: Ae
|
|
378
378
|
});
|
|
379
|
-
},
|
|
379
|
+
}, De = {
|
|
380
380
|
ruleRow: "_ruleRow_nx0en_1",
|
|
381
381
|
heading: "_heading_nx0en_5",
|
|
382
382
|
hint: "_hint_nx0en_9",
|
|
@@ -392,29 +392,29 @@ var H = /* @__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:
|
|
395
|
+
}, { heading: A = "Allow access if all match", folderScopeHint: te = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: M = "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(), [q, J] = a(!1), [Y, X] = a(""), de = i(null), fe = i(f);
|
|
396
396
|
t(() => {
|
|
397
|
-
|
|
397
|
+
fe.current && !f && e.length > 0 && X(G), fe.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
|
-
},
|
|
403
|
+
let Z = () => {
|
|
404
|
+
de.current = document.activeElement, J(!0);
|
|
405
|
+
}, Q = () => {
|
|
406
|
+
J(!1), de.current?.focus?.();
|
|
407
|
+
}, pe = (t) => {
|
|
408
|
+
r([...e, t]), X(U), Q();
|
|
409
|
+
}, $ = (t) => {
|
|
410
|
+
r(e.filter((e, n) => n !== t)), X(W);
|
|
411
|
+
}, me = () => {
|
|
412
|
+
r([]), X(le);
|
|
413
|
+
}, he = {
|
|
414
414
|
equal: ie,
|
|
415
415
|
contain: ae,
|
|
416
416
|
regex: ce
|
|
417
|
-
},
|
|
417
|
+
}, ge = e.length >= m, _e = l || ge, ve = c != null && c !== "";
|
|
418
418
|
return /* @__PURE__ */ B("div", {
|
|
419
419
|
role: "group",
|
|
420
420
|
"aria-labelledby": K,
|
|
@@ -424,26 +424,26 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
424
424
|
/* @__PURE__ */ z(b, {
|
|
425
425
|
visuallyHidden: !0,
|
|
426
426
|
as: x.Span,
|
|
427
|
-
children:
|
|
427
|
+
children: Y
|
|
428
428
|
}),
|
|
429
429
|
/* @__PURE__ */ B("div", {
|
|
430
430
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
431
431
|
children: [/* @__PURE__ */ z("div", {
|
|
432
432
|
id: K,
|
|
433
|
-
className: L(ee,
|
|
433
|
+
className: L(ee, De.heading),
|
|
434
434
|
children: A
|
|
435
435
|
}), e.length > 0 && /* @__PURE__ */ z(g, {
|
|
436
436
|
variant: s.Primary,
|
|
437
437
|
label: I,
|
|
438
|
-
onClick:
|
|
438
|
+
onClick: me,
|
|
439
439
|
disabled: l
|
|
440
440
|
})]
|
|
441
441
|
}),
|
|
442
442
|
/* @__PURE__ */ z("p", {
|
|
443
|
-
className: L("mb-2", y,
|
|
444
|
-
children:
|
|
443
|
+
className: L("mb-2", y, De.hint),
|
|
444
|
+
children: ve ? te.replace("{folder}", c) : M
|
|
445
445
|
}),
|
|
446
|
-
e.length > 0 && !
|
|
446
|
+
e.length > 0 && !ve && /* @__PURE__ */ z("div", {
|
|
447
447
|
className: "mb-2",
|
|
448
448
|
children: /* @__PURE__ */ z(w, {
|
|
449
449
|
type: T.SectionMessage,
|
|
@@ -452,8 +452,8 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
452
452
|
})
|
|
453
453
|
}),
|
|
454
454
|
f && /* @__PURE__ */ B("div", {
|
|
455
|
-
className: L("mb-2 flex items-center gap-2", S,
|
|
456
|
-
children: [/* @__PURE__ */ z(
|
|
455
|
+
className: L("mb-2 flex items-center gap-2", S, De.loading),
|
|
456
|
+
children: [/* @__PURE__ */ z(j, {
|
|
457
457
|
size: 16,
|
|
458
458
|
ariaLabel: V
|
|
459
459
|
}), /* @__PURE__ */ z("span", { children: V })]
|
|
@@ -471,16 +471,16 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
471
471
|
children: e.map((e, t) => {
|
|
472
472
|
let n = e.targets.join(` ${R} `), r = re.replace("{source}", e.source).replace("{targets}", n);
|
|
473
473
|
return /* @__PURE__ */ B("li", {
|
|
474
|
-
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2",
|
|
474
|
+
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2", De.ruleRow),
|
|
475
475
|
children: [/* @__PURE__ */ B("span", {
|
|
476
|
-
className: L("truncate", C,
|
|
476
|
+
className: L("truncate", C, De.ruleText),
|
|
477
477
|
children: [
|
|
478
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, he),
|
|
484
484
|
": ",
|
|
485
485
|
n
|
|
486
486
|
]
|
|
@@ -491,16 +491,16 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
491
491
|
stroke: d
|
|
492
492
|
}),
|
|
493
493
|
"aria-label": r,
|
|
494
|
-
onClick: () =>
|
|
494
|
+
onClick: () => $(t),
|
|
495
495
|
disabled: l
|
|
496
496
|
})]
|
|
497
497
|
}, t);
|
|
498
498
|
})
|
|
499
499
|
}),
|
|
500
|
-
|
|
500
|
+
q && /* @__PURE__ */ z(Ee, {
|
|
501
501
|
sourceOptions: o,
|
|
502
|
-
onSave:
|
|
503
|
-
onCancel:
|
|
502
|
+
onSave: pe,
|
|
503
|
+
onCancel: Q,
|
|
504
504
|
disabled: l,
|
|
505
505
|
maxTargets: h,
|
|
506
506
|
labels: ue,
|
|
@@ -515,12 +515,12 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
515
515
|
"aria-hidden": !0,
|
|
516
516
|
stroke: d
|
|
517
517
|
}),
|
|
518
|
-
onClick:
|
|
519
|
-
disabled:
|
|
518
|
+
onClick: Z,
|
|
519
|
+
disabled: _e
|
|
520
520
|
})
|
|
521
521
|
}),
|
|
522
|
-
|
|
523
|
-
className: L("mt-2", y,
|
|
522
|
+
ge && /* @__PURE__ */ z("p", {
|
|
523
|
+
className: L("mt-2", y, De.hint),
|
|
524
524
|
children: P.replace("{max}", String(m))
|
|
525
525
|
})
|
|
526
526
|
]
|
|
@@ -570,11 +570,11 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
570
570
|
e.version
|
|
571
571
|
]
|
|
572
572
|
}),
|
|
573
|
-
e.version === t && /* @__PURE__ */ z(
|
|
573
|
+
e.version === t && /* @__PURE__ */ z(M, {
|
|
574
574
|
label: a,
|
|
575
575
|
className: L("shrink-0 whitespace-nowrap", je.currentBadge)
|
|
576
576
|
}),
|
|
577
|
-
e.publishCredentials === !0 && /* @__PURE__ */ z(
|
|
577
|
+
e.publishCredentials === !0 && /* @__PURE__ */ z(M, {
|
|
578
578
|
label: o,
|
|
579
579
|
className: L("shrink-0 whitespace-nowrap", je.sharedCredentialsBadge)
|
|
580
580
|
})
|
|
@@ -600,7 +600,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
600
600
|
return {
|
|
601
601
|
path: [t],
|
|
602
602
|
name: e.label,
|
|
603
|
-
children: Re(
|
|
603
|
+
children: Re(fe(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,90 +613,94 @@ var H = /* @__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($(r));
|
|
617
617
|
}
|
|
618
618
|
return n;
|
|
619
619
|
}, Ue = {
|
|
620
620
|
divider: "_divider_1gs31_1",
|
|
621
621
|
tree: "_tree_1gs31_17"
|
|
622
|
-
}, We = "data-cancel-creating-folder", Ge = "", Ke = [], qe = ({ items: e = Ke, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: f, onCreateDestinationFolder: p, searchQuery: m, disabled: h = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: ee = "Add sibling", addChildFolderLabel: y = "Add child", newFolderDefaultName: b = "New folder", noResultsLabel: x = "No folders match \"{query}\".", emptyFolderNameError: S = "Folder name cannot be empty.", invalidFolderNameError: C = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.",
|
|
623
|
-
let
|
|
624
|
-
...ne({ "--pft-divider":
|
|
625
|
-
...
|
|
626
|
-
}, j = c != null, M = r(() => c ? ze(c) : e, [c, e]),
|
|
622
|
+
}, We = "data-cancel-creating-folder", Ge = "", Ke = [], qe = ({ items: e = Ke, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: f, onCreateDestinationFolder: p, searchQuery: m, disabled: h = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: ee = "Add sibling", addChildFolderLabel: y = "Add child", newFolderDefaultName: b = "New folder", noResultsLabel: x = "No folders match \"{query}\".", emptyFolderNameError: S = "Folder name cannot be empty.", invalidFolderNameError: C = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.", sameAsParentFolderNameError: T = "A folder cannot have the same name as its parent folder.", rootLabel: E = "Organization", expandedPaths: D, onExpandedPathsChange: O, loadingPaths: k, styles: A = {} }) => {
|
|
623
|
+
let te = {
|
|
624
|
+
...ne({ "--pft-divider": A.colors?.divider }),
|
|
625
|
+
...A.cssVars
|
|
626
|
+
}, j = c != null, M = r(() => c ? ze(c) : e, [c, e]), N = i(M);
|
|
627
627
|
t(() => {
|
|
628
|
-
|
|
628
|
+
N.current = M;
|
|
629
629
|
}, [M]);
|
|
630
|
-
let
|
|
631
|
-
j && (
|
|
632
|
-
let
|
|
630
|
+
let P = r(() => c ? Be(c) : [Ge], [c]), F = n;
|
|
631
|
+
j && (F = l ? Ie(l) : void 0);
|
|
632
|
+
let I = (e) => {
|
|
633
633
|
j ? f?.(e ? Le(e) : void 0) : o?.(e);
|
|
634
|
-
}, [
|
|
634
|
+
}, [R, re] = a(() => new Set(F?.map((e, t) => $(F.slice(0, t + 1))) ?? [])), ie = r(() => c ? /* @__PURE__ */ new Set([...R, ...Ve(c, (e) => e.expandedPaths)]) : void 0, [c, R]) ?? D ?? R, se = r(() => c ? Ve(c, (e) => e.loadingPaths) : k, [c, k]), H = (e) => {
|
|
635
635
|
let t = new Set(e);
|
|
636
|
-
for (let e of
|
|
636
|
+
for (let e of P) t.delete(e);
|
|
637
637
|
if (c) {
|
|
638
|
-
|
|
638
|
+
re(t);
|
|
639
639
|
let e = He(c, t);
|
|
640
640
|
for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
|
|
641
|
-
} else
|
|
642
|
-
}, [
|
|
641
|
+
} else O ? O(t) : re(t);
|
|
642
|
+
}, [U, W] = a(null), [le, G] = a(b), ue = i(null), K = 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}]`) && (K.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 q = m.trim(), J = U != null, Y = r(() => X(M, m), [M, m]), de = q.length > 0 && Y.length === 0, Z = !J && q.length > 0, Q = r(() => {
|
|
650
|
+
let e = Z ? Y : M;
|
|
651
|
+
return j ? e : fe(e);
|
|
652
652
|
}, [
|
|
653
|
+
Z,
|
|
653
654
|
Y,
|
|
654
|
-
q,
|
|
655
655
|
M,
|
|
656
656
|
j
|
|
657
|
-
]),
|
|
658
|
-
|
|
659
|
-
Y,
|
|
657
|
+
]), he = r(() => /* @__PURE__ */ new Set([...P, ...pe(Q)]), [P, Q]), _e = r(() => /* @__PURE__ */ new Set([...P, ...Z ? he : ie]), [
|
|
658
|
+
P,
|
|
660
659
|
Z,
|
|
661
|
-
|
|
662
|
-
|
|
660
|
+
he,
|
|
661
|
+
ie
|
|
662
|
+
]), xe = r(() => ge(Q), [Q]), Se = r(() => Z && xe.length === 0 ? [] : j ? xe : [{
|
|
663
663
|
path: Ge,
|
|
664
|
-
name:
|
|
664
|
+
name: E,
|
|
665
665
|
folderId: Ge,
|
|
666
666
|
nodeType: ce.FOLDER,
|
|
667
|
-
items:
|
|
667
|
+
items: xe
|
|
668
668
|
}], [
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
669
|
+
xe,
|
|
670
|
+
E,
|
|
671
|
+
Z,
|
|
672
672
|
j
|
|
673
|
-
]), Ce =
|
|
673
|
+
]), Ce = U ? $(U) : null, we = {
|
|
674
674
|
empty: S,
|
|
675
675
|
invalid: C,
|
|
676
|
-
duplicate: w
|
|
677
|
-
|
|
676
|
+
duplicate: w,
|
|
677
|
+
sameAsParent: T
|
|
678
|
+
}, Te = (e) => P.includes($(e)) ? void 0 : e.at(-1), Ee = (e) => {
|
|
678
679
|
if (!c) return !0;
|
|
679
680
|
let t = Le(e), n = c.find((e) => e.key === t?.rootKey);
|
|
680
681
|
return n != null && n.canCreateFolders !== !1;
|
|
681
|
-
},
|
|
682
|
-
if (!c) return
|
|
683
|
-
if (
|
|
682
|
+
}, De = (() => {
|
|
683
|
+
if (!c) return F ?? [];
|
|
684
|
+
if (F && Ee(F)) return F;
|
|
684
685
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
685
686
|
return e ? Ie({
|
|
686
687
|
rootKey: e.key,
|
|
687
688
|
path: []
|
|
688
689
|
}) : void 0;
|
|
689
|
-
})(),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
690
|
+
})(), Oe = (e) => {
|
|
691
|
+
let t = de && ve(q, [], we) == null, n = Te(e);
|
|
692
|
+
return ye(t ? q : b, [...be(M, e), ...n ? [n] : []]);
|
|
693
|
+
}, [ke, Ae] = a(null);
|
|
694
|
+
ke != null && !se?.has($(ke)) && (Ae(null), W(ke), G(Oe(ke)));
|
|
695
|
+
let je = (e) => {
|
|
696
|
+
W(null), Ae(e), ue.current = null, K.current = !1;
|
|
697
|
+
let t = $(e);
|
|
698
|
+
t && H(new Set(ie).add(t));
|
|
699
|
+
}, Me = () => {
|
|
700
|
+
De && je(De);
|
|
701
|
+
}, Ne = (e) => {
|
|
702
|
+
let t = me(e.path);
|
|
703
|
+
if (!Ee(t)) return [];
|
|
700
704
|
let n = [{
|
|
701
705
|
key: "add-child",
|
|
702
706
|
label: y,
|
|
@@ -705,9 +709,9 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
705
709
|
"aria-hidden": !0,
|
|
706
710
|
stroke: d
|
|
707
711
|
}),
|
|
708
|
-
onClick: () =>
|
|
712
|
+
onClick: () => je(t)
|
|
709
713
|
}];
|
|
710
|
-
return
|
|
714
|
+
return P.includes(e.path) || n.push({
|
|
711
715
|
key: "add-sibling",
|
|
712
716
|
label: ee,
|
|
713
717
|
icon: /* @__PURE__ */ z(oe, {
|
|
@@ -715,46 +719,46 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
715
719
|
"aria-hidden": !0,
|
|
716
720
|
stroke: d
|
|
717
721
|
}),
|
|
718
|
-
onClick: () =>
|
|
722
|
+
onClick: () => je(t.slice(0, -1))
|
|
719
723
|
}), n;
|
|
720
|
-
},
|
|
721
|
-
if (!
|
|
722
|
-
let t =
|
|
723
|
-
return
|
|
724
|
-
},
|
|
725
|
-
if (!
|
|
726
|
-
let t = e.trim(), n =
|
|
727
|
-
if (!(
|
|
728
|
-
let e = c ? Le(
|
|
729
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
724
|
+
}, Pe = (e) => {
|
|
725
|
+
if (!U) return null;
|
|
726
|
+
let t = ve(e, be(N.current, U), we, Te(U));
|
|
727
|
+
return ue.current = t, t;
|
|
728
|
+
}, Fe = (e) => {
|
|
729
|
+
if (!U || K.current) return;
|
|
730
|
+
let t = e.trim(), n = ue.current;
|
|
731
|
+
if (!(Pe(e) ?? n)) {
|
|
732
|
+
let e = c ? Le(U) : void 0;
|
|
733
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(U, t), I([...U, t]);
|
|
730
734
|
}
|
|
731
|
-
|
|
732
|
-
},
|
|
735
|
+
W(null);
|
|
736
|
+
}, Re = () => W(null);
|
|
733
737
|
return /* @__PURE__ */ B("div", {
|
|
734
|
-
style:
|
|
735
|
-
className: L(h && "pointer-events-none opacity-60",
|
|
738
|
+
style: te,
|
|
739
|
+
className: L(h && "pointer-events-none opacity-60", A.className),
|
|
736
740
|
children: [
|
|
737
741
|
/* @__PURE__ */ z("div", {
|
|
738
742
|
className: L("w-full max-w-full min-w-0", Ue.tree),
|
|
739
743
|
children: /* @__PURE__ */ z(V, {
|
|
740
744
|
items: Se,
|
|
741
745
|
showFiles: !1,
|
|
742
|
-
selectedPath:
|
|
743
|
-
expandedPaths:
|
|
744
|
-
onExpandedPathsChange:
|
|
745
|
-
loadingPaths:
|
|
746
|
+
selectedPath: F == null ? void 0 : $(F),
|
|
747
|
+
expandedPaths: _e,
|
|
748
|
+
onExpandedPathsChange: H,
|
|
749
|
+
loadingPaths: se,
|
|
746
750
|
onItemClick: (e) => {
|
|
747
|
-
let t =
|
|
748
|
-
|
|
751
|
+
let t = F != null && $(F) === e.path;
|
|
752
|
+
I(t ? void 0 : me(e.path));
|
|
749
753
|
},
|
|
750
|
-
getContextMenuItems:
|
|
754
|
+
getContextMenuItems: Ne,
|
|
751
755
|
createdFolderPath: Ce,
|
|
752
|
-
newFolderDefaultName:
|
|
753
|
-
onCreateFolderSave:
|
|
754
|
-
onCreateFolderCancel:
|
|
755
|
-
onRenameValidate: (e) =>
|
|
756
|
-
searchQuery:
|
|
757
|
-
emptyStateTitle:
|
|
756
|
+
newFolderDefaultName: le,
|
|
757
|
+
onCreateFolderSave: Fe,
|
|
758
|
+
onCreateFolderCancel: Re,
|
|
759
|
+
onRenameValidate: (e) => Pe(e),
|
|
760
|
+
searchQuery: Z ? q : void 0,
|
|
761
|
+
emptyStateTitle: Z ? x.replace("{query}", q) : void 0
|
|
758
762
|
})
|
|
759
763
|
}),
|
|
760
764
|
/* @__PURE__ */ z("div", {
|
|
@@ -764,17 +768,17 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
764
768
|
/* @__PURE__ */ B("div", {
|
|
765
769
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
766
770
|
children: [/* @__PURE__ */ z(g, {
|
|
767
|
-
onClick:
|
|
771
|
+
onClick: Me,
|
|
768
772
|
label: _,
|
|
769
773
|
iconBefore: /* @__PURE__ */ z(oe, {
|
|
770
774
|
size: u.SM,
|
|
771
775
|
"aria-hidden": !0,
|
|
772
776
|
stroke: d
|
|
773
777
|
}),
|
|
774
|
-
disabled: h ||
|
|
775
|
-
}),
|
|
778
|
+
disabled: h || J || !De
|
|
779
|
+
}), J && /* @__PURE__ */ z(g, {
|
|
776
780
|
label: v,
|
|
777
|
-
onClick:
|
|
781
|
+
onClick: Re,
|
|
778
782
|
disabled: h,
|
|
779
783
|
[We]: ""
|
|
780
784
|
})]
|
|
@@ -785,53 +789,53 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
785
789
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
786
790
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
787
791
|
destination: "_destination_zj3gd_9"
|
|
788
|
-
}, Xe = 200, Ze = ({ view: e =
|
|
789
|
-
let { colors: G, folderTree: ue, accessRules: K } = le,
|
|
792
|
+
}, Xe = 200, Ze = ({ view: e = J.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: te, onAuthorChange: j, publishCredentials: M = !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 = {} }) => {
|
|
793
|
+
let { colors: G, folderTree: ue, accessRules: K } = le, q = {
|
|
790
794
|
...ne({
|
|
791
795
|
"--pp-summary-title-text": G?.summaryTitleText,
|
|
792
796
|
"--pp-heading-text": G?.headingText,
|
|
793
797
|
"--pp-destination-text": G?.destinationText
|
|
794
798
|
}),
|
|
795
799
|
...le.cssVars
|
|
796
|
-
},
|
|
800
|
+
}, Y = {
|
|
797
801
|
border: G?.summaryBorder,
|
|
798
802
|
background: G?.summaryBackground
|
|
799
|
-
}, { folderLabel:
|
|
800
|
-
|
|
801
|
-
},
|
|
803
|
+
}, { folderLabel: X = "Publish to folder", destinationAriaLabel: de = "Destination folder", noFolderSelectedLabel: fe = "No folder selected", changeFolderLabel: Z = "Change", chooseFolderLabel: Q = "Choose", replaceWarning: pe = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: $ = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: me = "Publishing failed. Please try again.", folderEmptyStateLabel: he, addSiblingFolderLabel: ge, addChildFolderLabel: _e, cancelCreatingFolderLabel: ve, createFolderEmptyNameError: ye, createFolderInvalidNameError: be, createFolderDuplicateNameError: xe, createFolderSameAsParentNameError: Se, rootFolderLabel: Ce = "Organization", accessRulesLabels: we, searchPlaceholder: Te, clearSearchAriaLabel: Ee, authorLabel: De = "Author", authorPlaceholder: Oe = "Author name", authorHint: ke = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: je = "Publish with my credentials", credentialsHint: Me = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Ne, Pe] = a(""), Fe = n(), Ie = i(null), Le = i(null), Re = (e) => {
|
|
804
|
+
Pe(e ?? "");
|
|
805
|
+
}, ze = i(e);
|
|
802
806
|
t(() => {
|
|
803
|
-
|
|
807
|
+
ze.current !== e && (ze.current = e, e === J.ChangeFolder ? Le.current?.focus({ preventScroll: !0 }) : Ie.current?.focus({ preventScroll: !0 }));
|
|
804
808
|
}, [e]);
|
|
805
|
-
let
|
|
806
|
-
hasSelectedFolder:
|
|
809
|
+
let Be = m != null, Ve = r(() => W({
|
|
810
|
+
hasSelectedFolder: Be,
|
|
807
811
|
hasExistingPublicationInFolder: C,
|
|
808
812
|
hasWriteAccess: E,
|
|
809
813
|
isSubmitting: D,
|
|
810
814
|
hasSubmitError: O,
|
|
811
815
|
allowReplace: A
|
|
812
816
|
}), [
|
|
813
|
-
|
|
817
|
+
Be,
|
|
814
818
|
C,
|
|
815
819
|
E,
|
|
816
820
|
D,
|
|
817
821
|
O,
|
|
818
822
|
A
|
|
819
|
-
]),
|
|
823
|
+
]), He = Be ? m[m.length - 1] ?? Ce : "", Ue = l ? l() : /* @__PURE__ */ z("span", {
|
|
820
824
|
className: L("truncate", se, Ye.summaryTitle),
|
|
821
825
|
children: s?.title
|
|
822
826
|
});
|
|
823
|
-
if (e ===
|
|
824
|
-
ref:
|
|
827
|
+
if (e === J.ChangeFolder) return /* @__PURE__ */ B("div", {
|
|
828
|
+
ref: Le,
|
|
825
829
|
tabIndex: -1,
|
|
826
830
|
role: "group",
|
|
827
|
-
"aria-label":
|
|
831
|
+
"aria-label": X,
|
|
828
832
|
className: L("flex flex-col gap-3 outline-none", Je.panel),
|
|
829
|
-
style:
|
|
833
|
+
style: q,
|
|
830
834
|
children: [/* @__PURE__ */ z("div", {
|
|
831
835
|
role: "search",
|
|
832
836
|
children: /* @__PURE__ */ z(k, {
|
|
833
|
-
value:
|
|
834
|
-
onChange:
|
|
837
|
+
value: Ne,
|
|
838
|
+
onChange: Re,
|
|
835
839
|
placeholder: Te,
|
|
836
840
|
clearLabel: Ee,
|
|
837
841
|
"aria-label": Te
|
|
@@ -844,26 +848,27 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
844
848
|
expandedPaths: b,
|
|
845
849
|
onExpandedPathsChange: x,
|
|
846
850
|
loadingPaths: S,
|
|
847
|
-
searchQuery:
|
|
851
|
+
searchQuery: Ne,
|
|
848
852
|
disabled: D,
|
|
849
|
-
noResultsLabel:
|
|
850
|
-
addSiblingFolderLabel:
|
|
851
|
-
addChildFolderLabel:
|
|
852
|
-
cancelCreatingFolderLabel:
|
|
853
|
-
emptyFolderNameError:
|
|
854
|
-
invalidFolderNameError:
|
|
855
|
-
duplicateFolderNameError:
|
|
853
|
+
noResultsLabel: he,
|
|
854
|
+
addSiblingFolderLabel: ge,
|
|
855
|
+
addChildFolderLabel: _e,
|
|
856
|
+
cancelCreatingFolderLabel: ve,
|
|
857
|
+
emptyFolderNameError: ye,
|
|
858
|
+
invalidFolderNameError: be,
|
|
859
|
+
duplicateFolderNameError: xe,
|
|
860
|
+
sameAsParentFolderNameError: Se,
|
|
856
861
|
rootLabel: Ce,
|
|
857
862
|
styles: ue
|
|
858
863
|
})]
|
|
859
864
|
});
|
|
860
|
-
let
|
|
865
|
+
let We = L(V, Ye.destination);
|
|
861
866
|
return /* @__PURE__ */ B("div", {
|
|
862
867
|
className: L("flex flex-col gap-5", Je.panel),
|
|
863
|
-
style:
|
|
868
|
+
style: q,
|
|
864
869
|
children: [s?.type == null ? /* @__PURE__ */ z(F, {
|
|
865
|
-
colors:
|
|
866
|
-
children:
|
|
870
|
+
colors: Y,
|
|
871
|
+
children: Ue
|
|
867
872
|
}) : /* @__PURE__ */ z(F, {
|
|
868
873
|
item: {
|
|
869
874
|
type: s.type,
|
|
@@ -872,29 +877,29 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
872
877
|
iconUrl: s.iconUrl
|
|
873
878
|
},
|
|
874
879
|
hasVersionTag: !1,
|
|
875
|
-
colors:
|
|
880
|
+
colors: Y
|
|
876
881
|
}), /* @__PURE__ */ B("section", { children: [
|
|
877
882
|
/* @__PURE__ */ z("h2", {
|
|
878
883
|
className: L("mb-2", ce, Ye.sectionHeading),
|
|
879
|
-
children:
|
|
884
|
+
children: X
|
|
880
885
|
}),
|
|
881
886
|
/* @__PURE__ */ B("div", {
|
|
882
887
|
className: "flex min-w-0 items-center gap-2",
|
|
883
888
|
children: [/* @__PURE__ */ z("div", {
|
|
884
889
|
role: "group",
|
|
885
|
-
"aria-label":
|
|
890
|
+
"aria-label": de,
|
|
886
891
|
className: "min-w-0 flex-1",
|
|
887
|
-
children:
|
|
892
|
+
children: Be ? /* @__PURE__ */ z(h, {
|
|
888
893
|
name: [Ce, ...m].join(" / "),
|
|
889
|
-
nameClassName:
|
|
894
|
+
nameClassName: We
|
|
890
895
|
}) : /* @__PURE__ */ z("span", {
|
|
891
|
-
className: L("block truncate",
|
|
892
|
-
children:
|
|
896
|
+
className: L("block truncate", We),
|
|
897
|
+
children: fe
|
|
893
898
|
})
|
|
894
899
|
}), /* @__PURE__ */ z(g, {
|
|
895
|
-
ref:
|
|
900
|
+
ref: Ie,
|
|
896
901
|
size: p.Small,
|
|
897
|
-
label:
|
|
902
|
+
label: Be ? Z : Q,
|
|
898
903
|
iconBefore: /* @__PURE__ */ z(ie, {
|
|
899
904
|
size: u.SM,
|
|
900
905
|
stroke: d,
|
|
@@ -904,16 +909,16 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
904
909
|
onClick: o
|
|
905
910
|
})]
|
|
906
911
|
}),
|
|
907
|
-
|
|
912
|
+
Ve.calloutKind !== U.None && Ve.calloutKind !== U.Info && /* @__PURE__ */ z("div", {
|
|
908
913
|
className: "mt-3",
|
|
909
914
|
children: /* @__PURE__ */ z(w, {
|
|
910
915
|
type: T.SectionMessage,
|
|
911
|
-
variant: Qe(
|
|
912
|
-
message: et(
|
|
913
|
-
replaceWarning:
|
|
914
|
-
noAccessError:
|
|
915
|
-
submitError:
|
|
916
|
-
folderName:
|
|
916
|
+
variant: Qe(Ve.calloutKind),
|
|
917
|
+
message: et(Ve.calloutKind, {
|
|
918
|
+
replaceWarning: pe,
|
|
919
|
+
noAccessError: $,
|
|
920
|
+
submitError: me,
|
|
921
|
+
folderName: He,
|
|
917
922
|
version: s?.version,
|
|
918
923
|
folderNameClassName: H
|
|
919
924
|
})
|
|
@@ -922,12 +927,12 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
922
927
|
/* @__PURE__ */ z("div", {
|
|
923
928
|
className: "mt-4",
|
|
924
929
|
children: /* @__PURE__ */ z(ee, {
|
|
925
|
-
id:
|
|
930
|
+
id: Fe,
|
|
926
931
|
labelProps: { label: De },
|
|
927
|
-
placeholder:
|
|
928
|
-
caption:
|
|
929
|
-
value:
|
|
930
|
-
onChange: (e) =>
|
|
932
|
+
placeholder: Oe,
|
|
933
|
+
caption: ke,
|
|
934
|
+
value: te,
|
|
935
|
+
onChange: (e) => j(e ?? ""),
|
|
931
936
|
maxLength: Xe,
|
|
932
937
|
disabled: D
|
|
933
938
|
})
|
|
@@ -935,9 +940,9 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
935
940
|
N != null && /* @__PURE__ */ z("div", {
|
|
936
941
|
className: "mt-4",
|
|
937
942
|
children: /* @__PURE__ */ z(c, {
|
|
938
|
-
labelProps: { label:
|
|
939
|
-
caption:
|
|
940
|
-
isSelected:
|
|
943
|
+
labelProps: { label: je },
|
|
944
|
+
caption: Me,
|
|
945
|
+
isSelected: M,
|
|
941
946
|
onChange: N,
|
|
942
947
|
disabled: D
|
|
943
948
|
})
|
|
@@ -948,7 +953,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
948
953
|
rules: P,
|
|
949
954
|
onRulesChange: I,
|
|
950
955
|
sourceOptions: R,
|
|
951
|
-
folderName:
|
|
956
|
+
folderName: Be ? He : void 0,
|
|
952
957
|
disabled: D,
|
|
953
958
|
isLoading: re,
|
|
954
959
|
hasLoadError: ae,
|
|
@@ -968,8 +973,8 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
968
973
|
}),
|
|
969
974
|
i
|
|
970
975
|
] });
|
|
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 =
|
|
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 ===
|
|
976
|
+
}, 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 = J.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: d = {}, colors: f }) => {
|
|
977
|
+
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 === J.ChangeFolder, b = i ? v : n && t && e != null ? _.replace("{version}", e) : h;
|
|
973
978
|
return /* @__PURE__ */ B("div", {
|
|
974
979
|
style: p,
|
|
975
980
|
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),
|
|
@@ -989,7 +994,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
989
994
|
disabled: r,
|
|
990
995
|
iconBefore: i ? /* @__PURE__ */ z("span", {
|
|
991
996
|
"aria-hidden": !0,
|
|
992
|
-
children: /* @__PURE__ */ z(
|
|
997
|
+
children: /* @__PURE__ */ z(j, { size: u.SM })
|
|
993
998
|
}) : void 0,
|
|
994
999
|
onClick: o
|
|
995
1000
|
})]
|
|
@@ -1000,7 +1005,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1000
1005
|
divider: "_divider_16jmd_15",
|
|
1001
1006
|
content: "_content_16jmd_19",
|
|
1002
1007
|
title: "_title_16jmd_24"
|
|
1003
|
-
}, it = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: O, panelSummaryTitleClassName: k, panelHeadingClassName: A, panelCalloutFolderNameClassName:
|
|
1008
|
+
}, it = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: O, panelSummaryTitleClassName: k, panelHeadingClassName: A, panelCalloutFolderNameClassName: j, footerLabels: M, labels: N = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
|
|
1004
1009
|
let I = ne({
|
|
1005
1010
|
"--spp-backdrop-bg": F?.backdropBackground,
|
|
1006
1011
|
"--spp-panel-bg": F?.panelBackground,
|
|
@@ -1008,11 +1013,11 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1008
1013
|
"--spp-divider-border": F?.dividerBorder,
|
|
1009
1014
|
"--spp-scrollbar-thumb": F?.scrollbarThumb,
|
|
1010
1015
|
"--spp-title-text": F?.titleText
|
|
1011
|
-
}), [R, re] = a(null), { title: ie = "Publish", changeFolderTitle: ae = "Change folder", backAriaLabel: oe = "Back", ariaLabel: se = "Publish", closeAriaLabel: ce = "Close" } = N, V =
|
|
1016
|
+
}), [R, re] = a(null), { title: ie = "Publish", changeFolderTitle: ae = "Change folder", backAriaLabel: oe = "Back", ariaLabel: se = "Publish", closeAriaLabel: ce = "Close" } = N, V = Y({
|
|
1012
1017
|
isOpen: e,
|
|
1013
1018
|
selectedFolderPath: s,
|
|
1014
1019
|
onSelectedFolderPathChange: c
|
|
1015
|
-
}), H = V.view ===
|
|
1020
|
+
}), H = V.view === J.ChangeFolder, U = r(() => W({
|
|
1016
1021
|
hasSelectedFolder: s != null,
|
|
1017
1022
|
hasExistingPublicationInFolder: p,
|
|
1018
1023
|
hasWriteAccess: m,
|
|
@@ -1046,7 +1051,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1046
1051
|
e,
|
|
1047
1052
|
R,
|
|
1048
1053
|
T
|
|
1049
|
-
]), /* @__PURE__ */ B(
|
|
1054
|
+
]), /* @__PURE__ */ B(te, {
|
|
1050
1055
|
open: e,
|
|
1051
1056
|
onClose: w,
|
|
1052
1057
|
header: /* @__PURE__ */ z("span", {
|
|
@@ -1099,7 +1104,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1099
1104
|
styles: O,
|
|
1100
1105
|
summaryTitleClassName: k,
|
|
1101
1106
|
headingClassName: A,
|
|
1102
|
-
calloutFolderNameClassName:
|
|
1107
|
+
calloutFolderNameClassName: j
|
|
1103
1108
|
})
|
|
1104
1109
|
})
|
|
1105
1110
|
}), /* @__PURE__ */ z(nt, {
|
|
@@ -1113,7 +1118,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1113
1118
|
view: V.view,
|
|
1114
1119
|
onSelectFolder: V.selectFolder,
|
|
1115
1120
|
isSelectFolderDisabled: V.pendingFolderPath == null,
|
|
1116
|
-
labels:
|
|
1121
|
+
labels: M
|
|
1117
1122
|
})]
|
|
1118
1123
|
});
|
|
1119
1124
|
}, 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 }) => {
|
|
@@ -1129,7 +1134,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1129
1134
|
loadingStatusLabel: _,
|
|
1130
1135
|
message: /* @__PURE__ */ z("span", {
|
|
1131
1136
|
className: "wrap-break-word",
|
|
1132
|
-
children: y ? ee(t) : v(t,
|
|
1137
|
+
children: y ? ee(t) : v(t, he(n[0] ?? "", h))
|
|
1133
1138
|
}),
|
|
1134
1139
|
onConfirm: u,
|
|
1135
1140
|
onClose: d,
|
|
@@ -1143,7 +1148,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1143
1148
|
disabled: a,
|
|
1144
1149
|
items: n.map((e) => ({
|
|
1145
1150
|
value: e,
|
|
1146
|
-
label:
|
|
1151
|
+
label: he(e, h)
|
|
1147
1152
|
})),
|
|
1148
1153
|
radioClassName: L(s, at.option)
|
|
1149
1154
|
})
|
|
@@ -1156,26 +1161,26 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1156
1161
|
}({}), dt = {
|
|
1157
1162
|
heading: "_heading_vk731_1",
|
|
1158
1163
|
destination: "_destination_vk731_5"
|
|
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:
|
|
1160
|
-
let { saveToFolderHeading:
|
|
1164
|
+
}, 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: te = "dial-body-semi-text", destinationClassName: j = "dial-small-semi-text" }) => {
|
|
1165
|
+
let { saveToFolderHeading: M = "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, createFolderSameAsParentNameError: q, retryLabel: J = "Retry" } = D, { colors: Y, folderTree: X } = A, de = {
|
|
1161
1166
|
...ne({
|
|
1162
|
-
"--stf-heading-text":
|
|
1163
|
-
"--stf-destination-text":
|
|
1167
|
+
"--stf-heading-text": Y?.headingText,
|
|
1168
|
+
"--stf-destination-text": Y?.destinationText
|
|
1164
1169
|
}),
|
|
1165
1170
|
...A.cssVars
|
|
1166
|
-
},
|
|
1167
|
-
border:
|
|
1168
|
-
background:
|
|
1169
|
-
}, [
|
|
1171
|
+
}, fe = {
|
|
1172
|
+
border: Y?.summaryBorder,
|
|
1173
|
+
background: Y?.summaryBackground
|
|
1174
|
+
}, [Z, Q] = a(""), pe = n(), $ = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), me = i.find((e) => e.key === f?.rootKey), he = f ? f.path[f.path.length - 1] ?? me?.label : void 0, ge = L(te, dt.heading);
|
|
1170
1175
|
if (e === ut.ChangeFolder) return /* @__PURE__ */ B("div", {
|
|
1171
1176
|
className: "flex flex-col gap-3",
|
|
1172
|
-
style:
|
|
1177
|
+
style: de,
|
|
1173
1178
|
children: [
|
|
1174
1179
|
/* @__PURE__ */ z("div", {
|
|
1175
1180
|
role: "search",
|
|
1176
1181
|
children: /* @__PURE__ */ z(k, {
|
|
1177
|
-
value:
|
|
1178
|
-
onChange: (e) =>
|
|
1182
|
+
value: Z,
|
|
1183
|
+
onChange: (e) => Q(e ?? ""),
|
|
1179
1184
|
placeholder: se,
|
|
1180
1185
|
clearLabel: ce,
|
|
1181
1186
|
"aria-label": se
|
|
@@ -1186,7 +1191,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1186
1191
|
children: T && /* @__PURE__ */ B("div", {
|
|
1187
1192
|
className: "flex flex-wrap items-center gap-2",
|
|
1188
1193
|
children: [/* @__PURE__ */ z(m, { text: T }), E && /* @__PURE__ */ z(y, {
|
|
1189
|
-
label:
|
|
1194
|
+
label: J,
|
|
1190
1195
|
onClick: E
|
|
1191
1196
|
})]
|
|
1192
1197
|
})
|
|
@@ -1196,7 +1201,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1196
1201
|
destination: f,
|
|
1197
1202
|
onDestinationChange: _,
|
|
1198
1203
|
onCreateDestinationFolder: s,
|
|
1199
|
-
searchQuery:
|
|
1204
|
+
searchQuery: Z,
|
|
1200
1205
|
disabled: C,
|
|
1201
1206
|
noResultsLabel: V,
|
|
1202
1207
|
createFolderLabel: H,
|
|
@@ -1206,9 +1211,10 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1206
1211
|
emptyFolderNameError: G,
|
|
1207
1212
|
invalidFolderNameError: ue,
|
|
1208
1213
|
duplicateFolderNameError: K,
|
|
1209
|
-
|
|
1214
|
+
sameAsParentFolderNameError: q,
|
|
1215
|
+
styles: X
|
|
1210
1216
|
}),
|
|
1211
|
-
x &&
|
|
1217
|
+
x && me?.hasAccessRules && /* @__PURE__ */ z("div", {
|
|
1212
1218
|
className: "mt-1",
|
|
1213
1219
|
children: /* @__PURE__ */ z(Ae, {
|
|
1214
1220
|
rules: x.rules,
|
|
@@ -1231,7 +1237,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1231
1237
|
value: lt.New,
|
|
1232
1238
|
label: re,
|
|
1233
1239
|
content: /* @__PURE__ */ z(ee, {
|
|
1234
|
-
id:
|
|
1240
|
+
id: pe,
|
|
1235
1241
|
value: v.newVersion,
|
|
1236
1242
|
onChange: (e) => v.onNewVersionChange(e ?? ""),
|
|
1237
1243
|
onBlur: v.onNewVersionBlur,
|
|
@@ -1247,10 +1253,10 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1247
1253
|
}] : [];
|
|
1248
1254
|
return /* @__PURE__ */ B("div", {
|
|
1249
1255
|
className: "flex flex-col gap-5",
|
|
1250
|
-
style:
|
|
1256
|
+
style: de,
|
|
1251
1257
|
children: [
|
|
1252
1258
|
t.type == null ? /* @__PURE__ */ z(F, {
|
|
1253
|
-
colors:
|
|
1259
|
+
colors: fe,
|
|
1254
1260
|
children: /* @__PURE__ */ z("span", {
|
|
1255
1261
|
className: L("truncate", ge),
|
|
1256
1262
|
children: t.title
|
|
@@ -1263,13 +1269,13 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1263
1269
|
iconUrl: t.iconUrl
|
|
1264
1270
|
},
|
|
1265
1271
|
hasVersionTag: !1,
|
|
1266
|
-
colors:
|
|
1272
|
+
colors: fe
|
|
1267
1273
|
}),
|
|
1268
1274
|
/* @__PURE__ */ B("section", {
|
|
1269
1275
|
className: "flex flex-col gap-2",
|
|
1270
1276
|
children: [/* @__PURE__ */ z("h2", {
|
|
1271
1277
|
className: ge,
|
|
1272
|
-
children:
|
|
1278
|
+
children: M
|
|
1273
1279
|
}), /* @__PURE__ */ B("div", {
|
|
1274
1280
|
className: "flex min-w-0 items-center gap-2",
|
|
1275
1281
|
children: [/* @__PURE__ */ z("div", {
|
|
@@ -1277,8 +1283,8 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1277
1283
|
"aria-label": P,
|
|
1278
1284
|
className: "min-w-0 flex-1",
|
|
1279
1285
|
children: /* @__PURE__ */ z(h, {
|
|
1280
|
-
name:
|
|
1281
|
-
nameClassName: L(
|
|
1286
|
+
name: $.join(" / "),
|
|
1287
|
+
nameClassName: L(j, dt.destination)
|
|
1282
1288
|
})
|
|
1283
1289
|
}), /* @__PURE__ */ z(g, {
|
|
1284
1290
|
ref: l,
|
|
@@ -1328,7 +1334,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1328
1334
|
"--sstf-divider-border": l?.dividerBorder,
|
|
1329
1335
|
"--sstf-scrollbar-thumb": l?.scrollbarThumb,
|
|
1330
1336
|
"--sstf-title-text": l?.titleText
|
|
1331
|
-
}), [O, k] = a(ut.Main), [A,
|
|
1337
|
+
}), [O, k] = a(ut.Main), [A, M] = a(f), N = i(null), P = i(null);
|
|
1332
1338
|
t(() => {
|
|
1333
1339
|
e && k(ut.Main);
|
|
1334
1340
|
}, [e]);
|
|
@@ -1342,7 +1348,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1342
1348
|
I.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1343
1349
|
}, [e, s]);
|
|
1344
1350
|
let R = O === ut.ChangeFolder, re = (e) => {
|
|
1345
|
-
|
|
1351
|
+
M(e), h?.(e);
|
|
1346
1352
|
}, ie = () => {
|
|
1347
1353
|
re(f), k(ut.ChangeFolder);
|
|
1348
1354
|
}, ae = () => {
|
|
@@ -1350,7 +1356,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1350
1356
|
}, oe = () => {
|
|
1351
1357
|
A && p(A), k(ut.Main);
|
|
1352
1358
|
};
|
|
1353
|
-
return /* @__PURE__ */ B(
|
|
1359
|
+
return /* @__PURE__ */ B(te, {
|
|
1354
1360
|
open: e,
|
|
1355
1361
|
onClose: n,
|
|
1356
1362
|
header: /* @__PURE__ */ z("span", {
|
|
@@ -1402,7 +1408,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1402
1408
|
disabled: o || m,
|
|
1403
1409
|
iconBefore: m ? /* @__PURE__ */ z("span", {
|
|
1404
1410
|
"aria-hidden": !0,
|
|
1405
|
-
children: /* @__PURE__ */ z(
|
|
1411
|
+
children: /* @__PURE__ */ z(j, { size: u.SM })
|
|
1406
1412
|
}) : void 0,
|
|
1407
1413
|
onClick: r
|
|
1408
1414
|
})]
|
|
@@ -1410,4 +1416,4 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1410
1416
|
});
|
|
1411
1417
|
};
|
|
1412
1418
|
//#endregion
|
|
1413
|
-
export { Je as PUBLISH_PANEL_CLASS, H as PublicationRuleFunction,
|
|
1419
|
+
export { Je as PUBLISH_PANEL_CLASS, H as PublicationRuleFunction, Ee as PublishAccessRuleEditor, Ae as PublishAccessRules, U as PublishCalloutKind, qe as PublishFoldersTree, nt as PublishFooter, Me as PublishHistoryList, Ze as PublishPanel, J as PublishPanelView, ft as SaveToFolderPanel, ut as SaveToFolderView, lt as SaveVersionMode, it as StandalonePublishPanel, mt as StandaloneSaveToFolderPanel, ct as UnpublishConfirmationDialog, pe as collectFolderKeys, W as derivePublishState, X as filterFolderTree, G as formatPublishedDate, me as fromFolderPathKey, be as getSiblingFolderNames, ye as getUniqueFolderName, Q as mergeFolderPaths, fe as sortFolderTree, ge as toDialFileTree, $ as toFolderPathKey, q as usePublishFlow, Y as usePublishFolderView, ve as validateFolderName };
|