@epam/ai-dial-publish-panel 1.4.0-dev.107 → 1.4.0-dev.115
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/PublishPanel/PublishPanel.d.ts +8 -0
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +4 -0
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/index.js +727 -679
- package/models/publish.d.ts +6 -0
- package/models/publish.d.ts.map +1 -1
- package/package.json +2 -2
- package/utils/publish-state.d.ts.map +1 -1
- package/utils/use-publish-flow.d.ts +32 -1
- package/utils/use-publish-flow.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,48 +1,56 @@
|
|
|
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 { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as w, LiveRegionElement as
|
|
3
|
-
import { ConfirmationDialog as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { IconFolder as
|
|
6
|
-
import { DialFileNodeType as
|
|
2
|
+
import { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as w, LiveRegionElement as T, LiveRegionPoliteness as E, NeutralButton as D, Notification as O, NotificationType as k, NotificationVariant as A, PrimaryButton as j, RadioGroup as te, Search as M, Select as N, SideDrawer as ne, Skeleton as P, SkeletonVariant as F, Spinner as I, Tag as L, TagInput as re } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { ConfirmationDialog as R, DeploymentIcon as z, ResourceSummary as ie, TAG_INPUT_TAG_CLASS_NAME as B, buildCssVars as V, mergeClasses as H, useIsMobile as ae } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { Fragment as oe, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
5
|
+
import { IconFolder as se, IconFolderPlus as ce, IconPlus as le, IconTrashX as G } from "@tabler/icons-react";
|
|
6
|
+
import { DialFileNodeType as ue, DialFoldersTree as de } from "@epam/ai-dial-react-file-manager";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var K = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
|
|
10
|
-
}({}), K = /* @__PURE__ */ function(e) {
|
|
11
|
-
return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
|
|
12
10
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.TargetTaken = "targetTaken", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
|
|
12
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
|
|
14
|
-
}({}),
|
|
15
|
-
calloutKind:
|
|
14
|
+
}({}), Y = (e) => e.isSubmitting ? {
|
|
15
|
+
calloutKind: q.None,
|
|
16
16
|
isSubmitDisabled: !0,
|
|
17
17
|
isSubmitLoading: !0
|
|
18
|
-
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.
|
|
19
|
-
calloutKind:
|
|
18
|
+
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.isTargetChecking ? {
|
|
19
|
+
calloutKind: q.None,
|
|
20
|
+
isSubmitDisabled: !0,
|
|
21
|
+
isSubmitLoading: !1
|
|
22
|
+
} : e.hasSubmitError ? {
|
|
23
|
+
calloutKind: q.SubmitError,
|
|
20
24
|
isSubmitDisabled: !1,
|
|
21
25
|
isSubmitLoading: !1
|
|
22
26
|
} : e.hasExistingPublicationInFolder ? {
|
|
23
|
-
calloutKind:
|
|
27
|
+
calloutKind: q.ReplaceWarning,
|
|
24
28
|
isSubmitDisabled: e.allowReplace === !1,
|
|
25
29
|
isSubmitLoading: !1
|
|
30
|
+
} : e.isTargetTaken ? {
|
|
31
|
+
calloutKind: q.TargetTaken,
|
|
32
|
+
isSubmitDisabled: !0,
|
|
33
|
+
isSubmitLoading: !1
|
|
26
34
|
} : {
|
|
27
|
-
calloutKind:
|
|
35
|
+
calloutKind: q.Info,
|
|
28
36
|
isSubmitDisabled: !1,
|
|
29
37
|
isSubmitLoading: !1
|
|
30
38
|
} : {
|
|
31
|
-
calloutKind:
|
|
39
|
+
calloutKind: q.NoAccess,
|
|
32
40
|
isSubmitDisabled: !0,
|
|
33
41
|
isSubmitLoading: !1
|
|
34
42
|
} : {
|
|
35
|
-
calloutKind:
|
|
43
|
+
calloutKind: q.None,
|
|
36
44
|
isSubmitDisabled: !0,
|
|
37
45
|
isSubmitLoading: !1
|
|
38
|
-
},
|
|
39
|
-
let r = Math.floor((t - e) /
|
|
46
|
+
}, fe = 864e5, X = (e, t = Date.now(), n) => {
|
|
47
|
+
let r = Math.floor((t - e) / fe);
|
|
40
48
|
return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
|
|
41
49
|
month: "short",
|
|
42
50
|
day: "numeric",
|
|
43
51
|
year: "numeric"
|
|
44
52
|
});
|
|
45
|
-
},
|
|
53
|
+
}, pe = (e, t, n) => t.length === 0 ? [...e, {
|
|
46
54
|
path: [n],
|
|
47
55
|
name: n
|
|
48
56
|
}] : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
@@ -53,7 +61,7 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
53
61
|
}]
|
|
54
62
|
} : {
|
|
55
63
|
...e,
|
|
56
|
-
children: e.children ?
|
|
64
|
+
children: e.children ? pe(e.children, t, n) : e.children
|
|
57
65
|
}), Z = (e, t, n) => {
|
|
58
66
|
let r = [...t, n].join("/");
|
|
59
67
|
return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
@@ -63,91 +71,120 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
63
71
|
...e,
|
|
64
72
|
children: e.children ? Z(e.children, t, n) : e.children
|
|
65
73
|
});
|
|
66
|
-
}, me = ({ item: n, history:
|
|
67
|
-
let [
|
|
74
|
+
}, me = ({ item: n, history: o, folderItems: s, hasWriteAccess: c = () => !0, defaultAuthor: l = "", onCreateFolder: u, onPublish: d, onPublishSuccess: f, onPublishError: p, onFetchExistingRules: m, onCheckTargetExists: h, isTargetTakenError: g }) => {
|
|
75
|
+
let [_, v] = a(s);
|
|
68
76
|
t(() => {
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
let [
|
|
77
|
+
v(s);
|
|
78
|
+
}, [s]);
|
|
79
|
+
let [y, b] = a(), [x, S] = a(!1), [ee, C] = a(!1), [w, T] = a([]), [E, D] = a(!1), [O, k] = a(!1), [A, j] = a(l), [te, M] = a(!1), [N, ne] = a(!1);
|
|
72
80
|
t(() => {
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
let
|
|
76
|
-
ne(!0),
|
|
81
|
+
N || j(l);
|
|
82
|
+
}, [l, N]);
|
|
83
|
+
let P = e((e) => {
|
|
84
|
+
ne(!0), j(e);
|
|
77
85
|
}, []);
|
|
78
86
|
t(() => {
|
|
79
|
-
if (
|
|
80
|
-
|
|
87
|
+
if (y == null) {
|
|
88
|
+
T([]), k(!1);
|
|
81
89
|
return;
|
|
82
90
|
}
|
|
83
|
-
if (!
|
|
91
|
+
if (!m) return;
|
|
84
92
|
let e = !1;
|
|
85
|
-
return
|
|
86
|
-
e ||
|
|
93
|
+
return D(!0), k(!1), m(y).then((t) => {
|
|
94
|
+
e || T(t);
|
|
87
95
|
}).catch(() => {
|
|
88
|
-
e ||
|
|
96
|
+
e || k(!0);
|
|
89
97
|
}).finally(() => {
|
|
90
|
-
e ||
|
|
98
|
+
e || D(!1);
|
|
91
99
|
}), () => {
|
|
92
100
|
e = !0;
|
|
93
101
|
};
|
|
94
|
-
}, [
|
|
95
|
-
let
|
|
96
|
-
if (!
|
|
97
|
-
let e =
|
|
98
|
-
return
|
|
102
|
+
}, [y]);
|
|
103
|
+
let F = r(() => {
|
|
104
|
+
if (!y) return !1;
|
|
105
|
+
let e = y.join("/");
|
|
106
|
+
return o.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
|
|
99
107
|
}, [
|
|
100
|
-
|
|
108
|
+
o,
|
|
101
109
|
n.version,
|
|
102
|
-
|
|
103
|
-
]), re =
|
|
104
|
-
|
|
110
|
+
y
|
|
111
|
+
]), I = i(/* @__PURE__ */ new Set()), [L, re] = a(), [R, z] = a(), [ie, B] = a(!1), V = y == null ? void 0 : `${n.id ?? ""}\u0000${y.join("/")}\u0000${n.version ?? ""}`, H = V != null && (L === V || R === V);
|
|
112
|
+
t(() => {
|
|
113
|
+
if (y == null || V == null || !h || F) {
|
|
114
|
+
B(!1);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let e = y.join("/");
|
|
118
|
+
if ([...I.current].some((t) => e === t || e.startsWith(`${t}/`))) {
|
|
119
|
+
B(!1);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
let t = !1;
|
|
123
|
+
return B(!0), h(n, y).then((e) => {
|
|
124
|
+
t || re((t) => e ? V : t === V ? void 0 : t);
|
|
125
|
+
}).catch(() => void 0).finally(() => {
|
|
126
|
+
t || B(!1);
|
|
127
|
+
}), () => {
|
|
128
|
+
t = !0;
|
|
129
|
+
};
|
|
130
|
+
}, [
|
|
131
|
+
V,
|
|
132
|
+
F,
|
|
133
|
+
h == null
|
|
134
|
+
]);
|
|
135
|
+
let ae = e(async (e, t) => {
|
|
136
|
+
let n = [...e, t].join("/");
|
|
137
|
+
I.current.add(n), v((n) => pe(n, e, t));
|
|
105
138
|
try {
|
|
106
|
-
await
|
|
139
|
+
await u?.(e, t);
|
|
107
140
|
} catch {
|
|
108
|
-
|
|
141
|
+
I.current.delete(n), v((n) => Z(n, e, t)), C(!0);
|
|
109
142
|
}
|
|
110
|
-
}, [
|
|
111
|
-
if (!
|
|
112
|
-
|
|
143
|
+
}, [u]), oe = e(async () => {
|
|
144
|
+
if (!y) return !1;
|
|
145
|
+
S(!0), C(!1);
|
|
113
146
|
try {
|
|
114
|
-
return await
|
|
147
|
+
return await d(n, y, w, A.trim(), te), f?.(n, y), !0;
|
|
115
148
|
} catch (e) {
|
|
116
|
-
return
|
|
149
|
+
return g?.(e) && V != null ? z(V) : C(!0), p?.(n, y, e), !1;
|
|
117
150
|
} finally {
|
|
118
|
-
|
|
151
|
+
S(!1);
|
|
119
152
|
}
|
|
120
153
|
}, [
|
|
121
|
-
|
|
154
|
+
A,
|
|
155
|
+
g,
|
|
122
156
|
n,
|
|
123
|
-
u,
|
|
124
|
-
f,
|
|
125
157
|
d,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
158
|
+
p,
|
|
159
|
+
f,
|
|
160
|
+
te,
|
|
161
|
+
w,
|
|
162
|
+
y,
|
|
163
|
+
V
|
|
164
|
+
]), U = e(() => {
|
|
165
|
+
v(s), b(void 0), C(!1), T([]), k(!1), j(l), ne(!1), M(!1), I.current.clear(), re(void 0), z(void 0), B(!1);
|
|
166
|
+
}, [l, s]);
|
|
132
167
|
return {
|
|
133
|
-
folderItems:
|
|
134
|
-
selectedFolderPath:
|
|
135
|
-
setSelectedFolderPath:
|
|
136
|
-
handleCreateFolder:
|
|
137
|
-
hasExistingPublicationInFolder:
|
|
138
|
-
hasWriteAccess: !
|
|
139
|
-
isSubmitting:
|
|
140
|
-
hasSubmitError:
|
|
141
|
-
handleSubmit:
|
|
142
|
-
reset:
|
|
143
|
-
rules:
|
|
144
|
-
setRules:
|
|
145
|
-
author:
|
|
146
|
-
setAuthor:
|
|
147
|
-
publishCredentials:
|
|
148
|
-
setPublishCredentials:
|
|
149
|
-
|
|
150
|
-
|
|
168
|
+
folderItems: _,
|
|
169
|
+
selectedFolderPath: y,
|
|
170
|
+
setSelectedFolderPath: b,
|
|
171
|
+
handleCreateFolder: ae,
|
|
172
|
+
hasExistingPublicationInFolder: F,
|
|
173
|
+
hasWriteAccess: !y || c(y),
|
|
174
|
+
isSubmitting: x,
|
|
175
|
+
hasSubmitError: ee,
|
|
176
|
+
handleSubmit: oe,
|
|
177
|
+
reset: U,
|
|
178
|
+
rules: w,
|
|
179
|
+
setRules: T,
|
|
180
|
+
author: A,
|
|
181
|
+
setAuthor: P,
|
|
182
|
+
publishCredentials: te,
|
|
183
|
+
setPublishCredentials: M,
|
|
184
|
+
isTargetTaken: H,
|
|
185
|
+
isTargetChecking: ie,
|
|
186
|
+
isRulesLoading: E,
|
|
187
|
+
hasRulesLoadError: O
|
|
151
188
|
};
|
|
152
189
|
}, Q = /* @__PURE__ */ function(e) {
|
|
153
190
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
@@ -236,8 +273,8 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
236
273
|
return !1;
|
|
237
274
|
}
|
|
238
275
|
}, Pe = ({ sourceOptions: e, onSave: o, onCancel: c, disabled: l = !1, maxTargets: u = Ae, labels: d = {}, styles: f = {} }) => {
|
|
239
|
-
let p =
|
|
240
|
-
...
|
|
276
|
+
let p = ae(), m = {
|
|
277
|
+
...V({
|
|
241
278
|
"--pare-mobile-bg": f.colors?.mobileBackground,
|
|
242
279
|
"--pare-bg": f.colors?.background,
|
|
243
280
|
"--pare-select-border": f.colors?.selectBorder,
|
|
@@ -246,136 +283,136 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
246
283
|
"--pare-select-border-focus": f.colors?.selectBorderFocus
|
|
247
284
|
}),
|
|
248
285
|
...f.cssVars
|
|
249
|
-
}, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: w = "Add a target", targetsHintLabel:
|
|
286
|
+
}, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: w = "Add a target", targetsHintLabel: T = "Press Enter or comma to add a target.", patternLabel: E = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: A = "This field is required.", targetsRequiredError: j = "Add at least one target.", saveLabel: te = "Save", cancelLabel: M = "Cancel", dialogAriaLabel: ne = "Add access rule" } = d, P = n(), F = n(), I = n(), L = n(), R = i(null);
|
|
250
287
|
t(() => {
|
|
251
|
-
p ||
|
|
288
|
+
p || R.current?.focus();
|
|
252
289
|
}, [p]);
|
|
253
|
-
let [
|
|
290
|
+
let [z, ie] = a(), [se, ce] = a(), [le, G] = a([]), [ue, de] = a(""), [q, J] = a(!1), [Y, fe] = a(""), [X, pe] = a(!1), [Z, me] = a(!1), Q = H(ke.selectField, q && ke.selectFieldOpen), he = H(ke.selectField, X && ke.selectFieldOpen), ge = r(() => e.map((e) => ({
|
|
254
291
|
value: e,
|
|
255
292
|
label: e,
|
|
256
|
-
labelNode:
|
|
293
|
+
labelNode: Y.trim() ? /* @__PURE__ */ U(S, {
|
|
257
294
|
text: e,
|
|
258
|
-
query:
|
|
295
|
+
query: Y,
|
|
259
296
|
maxLines: 1
|
|
260
297
|
}) : void 0
|
|
261
|
-
})), [e,
|
|
298
|
+
})), [e, Y]), _e = r(() => [
|
|
262
299
|
{
|
|
263
|
-
value:
|
|
300
|
+
value: K.Equal,
|
|
264
301
|
label: v
|
|
265
302
|
},
|
|
266
303
|
{
|
|
267
|
-
value:
|
|
304
|
+
value: K.Contain,
|
|
268
305
|
label: y
|
|
269
306
|
},
|
|
270
307
|
{
|
|
271
|
-
value:
|
|
308
|
+
value: K.Regex,
|
|
272
309
|
label: x
|
|
273
310
|
}
|
|
274
311
|
], [
|
|
275
312
|
v,
|
|
276
313
|
y,
|
|
277
314
|
x
|
|
278
|
-
]), ve =
|
|
279
|
-
|
|
315
|
+
]), ve = se === K.Regex, ye = Ne(ue), be = z != null && se != null && (ve ? ye : le.length > 0), xe = (e) => {
|
|
316
|
+
ie(Array.isArray(e) ? e[0] : e), J(!1);
|
|
280
317
|
}, $ = (e) => {
|
|
281
318
|
let t = Array.isArray(e) ? e[0] : e;
|
|
282
|
-
|
|
319
|
+
se === K.Regex != (t === K.Regex) && (G([]), de("")), ce(t), pe(!1);
|
|
283
320
|
}, Se = (e) => {
|
|
284
321
|
let t = [];
|
|
285
322
|
for (let n of e) {
|
|
286
323
|
let e = n.trim();
|
|
287
324
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= u)) break;
|
|
288
325
|
}
|
|
289
|
-
|
|
326
|
+
G(t);
|
|
290
327
|
}, Ce = () => {
|
|
291
|
-
!be ||
|
|
292
|
-
source:
|
|
293
|
-
function:
|
|
294
|
-
targets: ve ? [
|
|
328
|
+
!be || z == null || se == null ? me(!0) : o({
|
|
329
|
+
source: z,
|
|
330
|
+
function: se,
|
|
331
|
+
targets: ve ? [ue.trim()] : le
|
|
295
332
|
});
|
|
296
|
-
}, we = (
|
|
333
|
+
}, we = (ue.length > 0 || Z) && !ye, Te = (e) => {
|
|
297
334
|
e.key === "Escape" && (e.stopPropagation(), c());
|
|
298
|
-
}, Ee = /* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
id:
|
|
335
|
+
}, Ee = /* @__PURE__ */ W(oe, { children: [
|
|
336
|
+
/* @__PURE__ */ U(N, {
|
|
337
|
+
id: F,
|
|
301
338
|
labelProps: { label: h },
|
|
302
339
|
options: ge,
|
|
303
|
-
value:
|
|
340
|
+
value: z,
|
|
304
341
|
onChange: xe,
|
|
305
342
|
placeholder: g,
|
|
306
343
|
searchable: e.length > Me,
|
|
307
344
|
searchPlaceholder: g,
|
|
308
|
-
onSearchQueryChange:
|
|
345
|
+
onSearchQueryChange: fe,
|
|
309
346
|
disabled: l,
|
|
310
|
-
open:
|
|
311
|
-
onOpenChange:
|
|
347
|
+
open: q,
|
|
348
|
+
onOpenChange: J,
|
|
312
349
|
fieldClassName: Q,
|
|
313
|
-
invalid: Z &&
|
|
314
|
-
error: Z &&
|
|
350
|
+
invalid: Z && z == null,
|
|
351
|
+
error: Z && z == null ? A : void 0
|
|
315
352
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ U(N, {
|
|
317
354
|
labelProps: { label: _ },
|
|
318
|
-
id:
|
|
355
|
+
id: I,
|
|
319
356
|
options: _e,
|
|
320
|
-
value:
|
|
357
|
+
value: se,
|
|
321
358
|
onChange: $,
|
|
322
359
|
placeholder: _,
|
|
323
360
|
disabled: l,
|
|
324
|
-
open:
|
|
325
|
-
onOpenChange:
|
|
361
|
+
open: X,
|
|
362
|
+
onOpenChange: pe,
|
|
326
363
|
fieldClassName: he,
|
|
327
|
-
invalid: Z &&
|
|
328
|
-
error: Z &&
|
|
364
|
+
invalid: Z && se == null,
|
|
365
|
+
error: Z && se == null ? A : void 0
|
|
329
366
|
}),
|
|
330
|
-
ve ? /* @__PURE__ */
|
|
331
|
-
id:
|
|
332
|
-
labelProps: { label:
|
|
333
|
-
placeholder:
|
|
334
|
-
value:
|
|
335
|
-
onChange: (e) =>
|
|
336
|
-
error: we ?
|
|
367
|
+
ve ? /* @__PURE__ */ U(ee, {
|
|
368
|
+
id: P,
|
|
369
|
+
labelProps: { label: E },
|
|
370
|
+
placeholder: O,
|
|
371
|
+
value: ue,
|
|
372
|
+
onChange: (e) => de(e ?? ""),
|
|
373
|
+
error: we ? k : void 0,
|
|
337
374
|
disabled: l
|
|
338
|
-
}) : /* @__PURE__ */
|
|
339
|
-
id:
|
|
375
|
+
}) : /* @__PURE__ */ U(re, {
|
|
376
|
+
id: L,
|
|
340
377
|
labelProps: { label: C },
|
|
341
378
|
placeholder: w,
|
|
342
|
-
caption: Z &&
|
|
343
|
-
error: Z &&
|
|
344
|
-
invalid: Z &&
|
|
345
|
-
value:
|
|
379
|
+
caption: Z && le.length === 0 ? void 0 : T,
|
|
380
|
+
error: Z && le.length === 0 ? j : void 0,
|
|
381
|
+
invalid: Z && le.length === 0,
|
|
382
|
+
value: le,
|
|
346
383
|
onChange: Se,
|
|
347
384
|
disabled: l,
|
|
348
|
-
tagClassName:
|
|
385
|
+
tagClassName: B
|
|
349
386
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ W("div", {
|
|
351
388
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
label:
|
|
389
|
+
children: [/* @__PURE__ */ U(b, {
|
|
390
|
+
label: M,
|
|
354
391
|
onClick: c,
|
|
355
392
|
disabled: l
|
|
356
|
-
}), /* @__PURE__ */
|
|
357
|
-
label:
|
|
393
|
+
}), /* @__PURE__ */ U(D, {
|
|
394
|
+
label: te,
|
|
358
395
|
onClick: Ce,
|
|
359
396
|
disabled: l
|
|
360
397
|
})]
|
|
361
398
|
})
|
|
362
399
|
] });
|
|
363
|
-
return p ? /* @__PURE__ */
|
|
400
|
+
return p ? /* @__PURE__ */ U(s, {
|
|
364
401
|
open: !0,
|
|
365
402
|
onClose: c,
|
|
366
|
-
ariaLabel:
|
|
403
|
+
ariaLabel: ne,
|
|
367
404
|
style: m,
|
|
368
405
|
className: ke.sheet,
|
|
369
406
|
bodyClassName: "flex flex-col gap-3 p-4",
|
|
370
407
|
children: Ee
|
|
371
|
-
}) : /* @__PURE__ */
|
|
372
|
-
ref:
|
|
408
|
+
}) : /* @__PURE__ */ U("div", {
|
|
409
|
+
ref: R,
|
|
373
410
|
role: "group",
|
|
374
|
-
"aria-label":
|
|
411
|
+
"aria-label": ne,
|
|
375
412
|
tabIndex: -1,
|
|
376
413
|
onKeyDown: Te,
|
|
377
414
|
style: m,
|
|
378
|
-
className:
|
|
415
|
+
className: H("flex flex-none flex-col gap-3 rounded-lg p-3", ke.inline),
|
|
379
416
|
children: Ee
|
|
380
417
|
});
|
|
381
418
|
}, Fe = {
|
|
@@ -384,9 +421,9 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
384
421
|
hint: "_hint_nx0en_9",
|
|
385
422
|
loading: "_loading_nx0en_13",
|
|
386
423
|
ruleText: "_ruleText_nx0en_17"
|
|
387
|
-
}, Ie = 20, Le = (e, t) => e ===
|
|
388
|
-
let
|
|
389
|
-
...
|
|
424
|
+
}, Ie = 20, Le = (e, t) => e === K.Equal ? t.equal : e === K.Contain ? t.contain : t.regex, Re = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: s, disabled: l = !1, isLoading: u = !1, hasLoadError: p = !1, maxRules: m = Ie, maxTargetsPerRule: h, labels: g = {}, headingClassName: _ = "dial-body-semi-text", hintClassName: v = "dial-small-text", loadingClassName: y = "dial-small-text", ruleTextClassName: S = "dial-small-text", ruleSourceClassName: ee = "dial-small-semi-text", styles: C = {} }) => {
|
|
425
|
+
let E = {
|
|
426
|
+
...V({
|
|
390
427
|
"--par-rule-bg": C.colors?.ruleBackground,
|
|
391
428
|
"--par-heading-text": C.colors?.headingText,
|
|
392
429
|
"--par-hint-text": C.colors?.hintText,
|
|
@@ -394,90 +431,90 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
394
431
|
"--par-rule-text": C.colors?.ruleText
|
|
395
432
|
}),
|
|
396
433
|
...C.cssVars
|
|
397
|
-
}, { heading:
|
|
434
|
+
}, { heading: D = "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: M = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: N = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: ne = "Add rule", clearAllLabel: P = "Clear all", orSeparatorLabel: F = "Or", removeRuleAriaLabelTemplate: L = "Remove rule for {source}: {targets}", equalFunctionLabel: re = "Equal", containFunctionLabel: R = "Contain", regexFunctionLabel: z = "Regex", loadingLabel: ie = "Loading existing rules…", loadErrorLabel: B = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: ae = "Rule added.", ruleRemovedAnnouncement: oe = "Rule removed.", rulesClearedAnnouncement: se = "All rules cleared.", rulesLoadedAnnouncement: ce = "Existing rules loaded for the selected folder.", editorLabels: ue } = g, de = n(), [K, q] = a(!1), [J, Y] = a(""), fe = i(null), X = i(u);
|
|
398
435
|
t(() => {
|
|
399
|
-
|
|
436
|
+
X.current && !u && e.length > 0 && Y(ce), X.current = u;
|
|
400
437
|
}, [
|
|
401
438
|
u,
|
|
402
439
|
e,
|
|
403
|
-
|
|
440
|
+
ce
|
|
404
441
|
]);
|
|
405
|
-
let
|
|
406
|
-
|
|
442
|
+
let pe = () => {
|
|
443
|
+
fe.current = document.activeElement, q(!0);
|
|
407
444
|
}, Z = () => {
|
|
408
|
-
|
|
445
|
+
q(!1), fe.current?.focus?.();
|
|
409
446
|
}, me = (t) => {
|
|
410
|
-
r([...e, t]),
|
|
447
|
+
r([...e, t]), Y(ae), Z();
|
|
411
448
|
}, Q = (t) => {
|
|
412
|
-
r(e.filter((e, n) => n !== t)),
|
|
449
|
+
r(e.filter((e, n) => n !== t)), Y(oe);
|
|
413
450
|
}, he = () => {
|
|
414
|
-
r([]),
|
|
451
|
+
r([]), Y(se);
|
|
415
452
|
}, ge = {
|
|
416
|
-
equal:
|
|
417
|
-
contain:
|
|
418
|
-
regex:
|
|
453
|
+
equal: re,
|
|
454
|
+
contain: R,
|
|
455
|
+
regex: z
|
|
419
456
|
}, _e = e.length >= m, ve = l || _e, ye = s != null && s !== "";
|
|
420
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ W("div", {
|
|
421
458
|
role: "group",
|
|
422
|
-
"aria-labelledby":
|
|
423
|
-
style:
|
|
424
|
-
className:
|
|
459
|
+
"aria-labelledby": de,
|
|
460
|
+
style: E,
|
|
461
|
+
className: H(l && "pointer-events-none opacity-60"),
|
|
425
462
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ U(w, {
|
|
427
464
|
visuallyHidden: !0,
|
|
428
|
-
as:
|
|
429
|
-
children:
|
|
465
|
+
as: T.Span,
|
|
466
|
+
children: J
|
|
430
467
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ W("div", {
|
|
432
469
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
-
id:
|
|
435
|
-
className:
|
|
436
|
-
children:
|
|
437
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ U("div", {
|
|
471
|
+
id: de,
|
|
472
|
+
className: H(_, Fe.heading),
|
|
473
|
+
children: D
|
|
474
|
+
}), e.length > 0 && /* @__PURE__ */ U(b, {
|
|
438
475
|
variant: c.Primary,
|
|
439
|
-
label:
|
|
476
|
+
label: P,
|
|
440
477
|
onClick: he,
|
|
441
478
|
disabled: l
|
|
442
479
|
})]
|
|
443
480
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
className:
|
|
446
|
-
children: ye ?
|
|
481
|
+
/* @__PURE__ */ U("p", {
|
|
482
|
+
className: H("mb-2", v, Fe.hint),
|
|
483
|
+
children: ye ? j.replace("{folder}", s) : te
|
|
447
484
|
}),
|
|
448
|
-
e.length > 0 && !ye && /* @__PURE__ */
|
|
485
|
+
e.length > 0 && !ye && /* @__PURE__ */ U("div", {
|
|
449
486
|
className: "mb-2",
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
-
type:
|
|
452
|
-
variant:
|
|
453
|
-
message:
|
|
487
|
+
children: /* @__PURE__ */ U(O, {
|
|
488
|
+
type: k.SectionMessage,
|
|
489
|
+
variant: A.Warning,
|
|
490
|
+
message: M
|
|
454
491
|
})
|
|
455
492
|
}),
|
|
456
|
-
u && /* @__PURE__ */
|
|
457
|
-
className:
|
|
458
|
-
children: [/* @__PURE__ */
|
|
493
|
+
u && /* @__PURE__ */ W("div", {
|
|
494
|
+
className: H("mb-2 flex items-center gap-2", y, Fe.loading),
|
|
495
|
+
children: [/* @__PURE__ */ U(I, {
|
|
459
496
|
size: 16,
|
|
460
|
-
ariaLabel:
|
|
461
|
-
}), /* @__PURE__ */
|
|
497
|
+
ariaLabel: ie
|
|
498
|
+
}), /* @__PURE__ */ U("span", { children: ie })]
|
|
462
499
|
}),
|
|
463
|
-
p && /* @__PURE__ */
|
|
500
|
+
p && /* @__PURE__ */ U("div", {
|
|
464
501
|
className: "mb-2",
|
|
465
|
-
children: /* @__PURE__ */
|
|
466
|
-
type:
|
|
467
|
-
variant:
|
|
468
|
-
message:
|
|
502
|
+
children: /* @__PURE__ */ U(O, {
|
|
503
|
+
type: k.SectionMessage,
|
|
504
|
+
variant: A.Warning,
|
|
505
|
+
message: B
|
|
469
506
|
})
|
|
470
507
|
}),
|
|
471
|
-
e.length > 0 && /* @__PURE__ */
|
|
508
|
+
e.length > 0 && /* @__PURE__ */ U("ul", {
|
|
472
509
|
className: "mb-3 flex flex-col gap-2",
|
|
473
510
|
children: e.map((e, t) => {
|
|
474
|
-
let n = e.targets.join(` ${
|
|
475
|
-
return /* @__PURE__ */
|
|
476
|
-
className:
|
|
477
|
-
children: [/* @__PURE__ */
|
|
478
|
-
className:
|
|
511
|
+
let n = e.targets.join(` ${F} `), r = L.replace("{source}", e.source).replace("{targets}", n);
|
|
512
|
+
return /* @__PURE__ */ W("li", {
|
|
513
|
+
className: H("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Fe.ruleRow),
|
|
514
|
+
children: [/* @__PURE__ */ W("span", {
|
|
515
|
+
className: H("truncate", S, Fe.ruleText),
|
|
479
516
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ U("span", {
|
|
481
518
|
className: ee,
|
|
482
519
|
children: e.source
|
|
483
520
|
}),
|
|
@@ -486,8 +523,8 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
486
523
|
": ",
|
|
487
524
|
n
|
|
488
525
|
]
|
|
489
|
-
}), /* @__PURE__ */
|
|
490
|
-
icon: /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ U(x, {
|
|
527
|
+
icon: /* @__PURE__ */ U(G, {
|
|
491
528
|
size: d.SM,
|
|
492
529
|
"aria-hidden": !0,
|
|
493
530
|
stroke: f
|
|
@@ -499,31 +536,31 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
499
536
|
}, t);
|
|
500
537
|
})
|
|
501
538
|
}),
|
|
502
|
-
|
|
539
|
+
K && /* @__PURE__ */ U(Pe, {
|
|
503
540
|
sourceOptions: o,
|
|
504
541
|
onSave: me,
|
|
505
542
|
onCancel: Z,
|
|
506
543
|
disabled: l,
|
|
507
544
|
maxTargets: h,
|
|
508
|
-
labels:
|
|
545
|
+
labels: ue,
|
|
509
546
|
styles: C.editor
|
|
510
547
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ U("div", {
|
|
512
549
|
className: "flex flex-wrap items-center gap-2",
|
|
513
|
-
children: /* @__PURE__ */
|
|
514
|
-
label:
|
|
515
|
-
iconBefore: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ U(b, {
|
|
551
|
+
label: ne,
|
|
552
|
+
iconBefore: /* @__PURE__ */ U(le, {
|
|
516
553
|
size: d.SM,
|
|
517
554
|
"aria-hidden": !0,
|
|
518
555
|
stroke: f
|
|
519
556
|
}),
|
|
520
|
-
onClick:
|
|
557
|
+
onClick: pe,
|
|
521
558
|
disabled: ve
|
|
522
559
|
})
|
|
523
560
|
}),
|
|
524
|
-
_e && /* @__PURE__ */
|
|
525
|
-
className:
|
|
526
|
-
children:
|
|
561
|
+
_e && /* @__PURE__ */ U("p", {
|
|
562
|
+
className: H("mt-2", v, Fe.hint),
|
|
563
|
+
children: N.replace("{max}", String(m))
|
|
527
564
|
})
|
|
528
565
|
]
|
|
529
566
|
});
|
|
@@ -559,7 +596,7 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
559
596
|
...Ve,
|
|
560
597
|
...c
|
|
561
598
|
}, { colors: S } = p, ee = {
|
|
562
|
-
...
|
|
599
|
+
...V({
|
|
563
600
|
"--pp-vh-heading-text": S?.headingText,
|
|
564
601
|
"--pp-vh-version-text": S?.versionText,
|
|
565
602
|
"--pp-vh-date-text": S?.dateText,
|
|
@@ -569,69 +606,69 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
569
606
|
}),
|
|
570
607
|
...p.cssVars
|
|
571
608
|
};
|
|
572
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ W("section", {
|
|
573
610
|
"aria-labelledby": m,
|
|
574
611
|
className: "flex flex-col gap-2",
|
|
575
612
|
style: ee,
|
|
576
613
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ U("h2", {
|
|
578
615
|
id: m,
|
|
579
|
-
className:
|
|
616
|
+
className: H(l, Be.heading),
|
|
580
617
|
children: x.heading
|
|
581
618
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ U(w, {
|
|
583
620
|
visuallyHidden: !0,
|
|
584
|
-
politeness:
|
|
621
|
+
politeness: E.Polite,
|
|
585
622
|
children: v && r && !i ? x.loadingLabel : ""
|
|
586
623
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
politeness:
|
|
589
|
-
children: i && /* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ U(w, {
|
|
625
|
+
politeness: E.Assertive,
|
|
626
|
+
children: i && /* @__PURE__ */ W("div", {
|
|
590
627
|
className: "flex flex-wrap items-center gap-2",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ U(_, { text: x.errorLabel }), s && /* @__PURE__ */ U(C, {
|
|
592
629
|
label: x.retryLabel,
|
|
593
630
|
size: h.Small,
|
|
594
631
|
onClick: s
|
|
595
632
|
})]
|
|
596
633
|
})
|
|
597
634
|
}),
|
|
598
|
-
e.length === 0 ? /* @__PURE__ */
|
|
599
|
-
className:
|
|
635
|
+
e.length === 0 ? /* @__PURE__ */ U("p", {
|
|
636
|
+
className: H(f, Be.meta),
|
|
600
637
|
children: x.emptyLabel
|
|
601
|
-
}) : /* @__PURE__ */
|
|
638
|
+
}) : /* @__PURE__ */ U("ul", { children: e.map((e) => {
|
|
602
639
|
let t = He(e, x), n = e.status == null && r && !i;
|
|
603
|
-
return /* @__PURE__ */
|
|
604
|
-
className:
|
|
605
|
-
children: [/* @__PURE__ */
|
|
640
|
+
return /* @__PURE__ */ W("li", {
|
|
641
|
+
className: H("flex flex-col gap-1 py-2", Be.row),
|
|
642
|
+
children: [/* @__PURE__ */ W("div", {
|
|
606
643
|
className: "flex min-h-6 min-w-0 items-center gap-2",
|
|
607
644
|
children: [
|
|
608
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ U(g, {
|
|
609
646
|
text: e.version,
|
|
610
|
-
className:
|
|
647
|
+
className: H("flex-initial!", u, Be.version)
|
|
611
648
|
}),
|
|
612
|
-
t && /* @__PURE__ */
|
|
613
|
-
n && /* @__PURE__ */
|
|
649
|
+
t && /* @__PURE__ */ U(o, { label: t }),
|
|
650
|
+
n && /* @__PURE__ */ U("span", {
|
|
614
651
|
"aria-hidden": !0,
|
|
615
652
|
className: "shrink-0",
|
|
616
|
-
children: /* @__PURE__ */
|
|
617
|
-
variant:
|
|
653
|
+
children: /* @__PURE__ */ U(P, {
|
|
654
|
+
variant: F.Text,
|
|
618
655
|
width: "84px",
|
|
619
656
|
height: "24px",
|
|
620
657
|
color: Be.skeletonColor
|
|
621
658
|
})
|
|
622
659
|
}),
|
|
623
|
-
e.modifiedAt && /* @__PURE__ */
|
|
624
|
-
className:
|
|
660
|
+
e.modifiedAt && /* @__PURE__ */ U("span", {
|
|
661
|
+
className: H("ms-auto shrink-0", d, Be.date),
|
|
625
662
|
children: e.modifiedAt
|
|
626
663
|
})
|
|
627
664
|
]
|
|
628
|
-
}), (e.folder || e.author) && /* @__PURE__ */
|
|
665
|
+
}), (e.folder || e.author) && /* @__PURE__ */ W("div", {
|
|
629
666
|
className: "flex min-w-0 items-center justify-between gap-2",
|
|
630
|
-
children: [e.folder && /* @__PURE__ */
|
|
667
|
+
children: [e.folder && /* @__PURE__ */ U(y, {
|
|
631
668
|
name: e.folder,
|
|
632
|
-
nameClassName:
|
|
633
|
-
}), e.author && /* @__PURE__ */
|
|
634
|
-
className:
|
|
669
|
+
nameClassName: H(f, Be.meta)
|
|
670
|
+
}), e.author && /* @__PURE__ */ U("span", {
|
|
671
|
+
className: H("ms-auto shrink-0", f, Be.meta),
|
|
635
672
|
children: e.author
|
|
636
673
|
})]
|
|
637
674
|
})]
|
|
@@ -649,27 +686,27 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
649
686
|
name: "_name_k0m34_5",
|
|
650
687
|
meta: "_meta_k0m34_9"
|
|
651
688
|
}, Ke = {
|
|
652
|
-
[
|
|
653
|
-
[
|
|
654
|
-
[
|
|
655
|
-
[
|
|
656
|
-
[
|
|
657
|
-
}, qe = 32, Je = 24, Ye = (e) => /* @__PURE__ */
|
|
689
|
+
[J.Application]: "Application",
|
|
690
|
+
[J.Toolset]: "Toolset",
|
|
691
|
+
[J.Prompt]: "Prompt",
|
|
692
|
+
[J.Skill]: "Skill",
|
|
693
|
+
[J.File]: "File"
|
|
694
|
+
}, qe = 32, Je = 24, Ye = (e) => /* @__PURE__ */ U("span", {
|
|
658
695
|
"aria-hidden": "true",
|
|
659
696
|
className: "shrink-0",
|
|
660
|
-
children: e.type ===
|
|
697
|
+
children: e.type === J.File ? /* @__PURE__ */ U("span", {
|
|
661
698
|
className: "flex items-center justify-center",
|
|
662
699
|
style: {
|
|
663
700
|
width: qe,
|
|
664
701
|
height: qe
|
|
665
702
|
},
|
|
666
|
-
children: /* @__PURE__ */
|
|
703
|
+
children: /* @__PURE__ */ U(v, {
|
|
667
704
|
decorative: !0,
|
|
668
705
|
size: Je,
|
|
669
706
|
name: e.name,
|
|
670
707
|
type: e.isFolder ? m.Folder : m.File
|
|
671
708
|
})
|
|
672
|
-
}) : /* @__PURE__ */
|
|
709
|
+
}) : /* @__PURE__ */ U(z, {
|
|
673
710
|
size: qe,
|
|
674
711
|
src: e.iconUrl,
|
|
675
712
|
initialsName: e.name,
|
|
@@ -677,49 +714,49 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
677
714
|
})
|
|
678
715
|
}), Xe = "Private dependencies", Ze = "This item depends on personal private resources (listed below). After publishing, other users may not be able to use it fully, or may run into problems.", Qe = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, $e = ({ dependencies: e, labels: t = {}, headingClassName: r = "dial-body-semi-text", nameClassName: i = "dial-small-semi-text", metaClassName: a = "dial-small-text", styles: o = {} }) => {
|
|
679
716
|
let s = n(), { title: c = Xe, description: l = Ze, typeLabels: u = {}, getAnnouncement: d = Qe } = t, { colors: f } = o, p = {
|
|
680
|
-
...
|
|
717
|
+
...V({
|
|
681
718
|
"--pp-dependencies-heading-text": f?.headingText,
|
|
682
719
|
"--pp-dependencies-name-text": f?.nameText,
|
|
683
720
|
"--pp-dependencies-meta-text": f?.metaText
|
|
684
721
|
}),
|
|
685
722
|
...o.cssVars
|
|
686
723
|
}, m = e.length;
|
|
687
|
-
return /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ W(oe, { children: [/* @__PURE__ */ U(w, {
|
|
688
725
|
visuallyHidden: !0,
|
|
689
|
-
as:
|
|
726
|
+
as: T.Span,
|
|
690
727
|
children: m > 0 ? d(m) : ""
|
|
691
|
-
}), m > 0 && /* @__PURE__ */
|
|
728
|
+
}), m > 0 && /* @__PURE__ */ W("section", {
|
|
692
729
|
"aria-labelledby": s,
|
|
693
|
-
className:
|
|
730
|
+
className: H("flex flex-col gap-3", We.dependencies),
|
|
694
731
|
style: p,
|
|
695
732
|
children: [
|
|
696
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ U("h2", {
|
|
697
734
|
id: s,
|
|
698
|
-
className:
|
|
735
|
+
className: H(r, Ge.heading),
|
|
699
736
|
children: c
|
|
700
737
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
type:
|
|
703
|
-
variant:
|
|
738
|
+
/* @__PURE__ */ U(O, {
|
|
739
|
+
type: k.SectionMessage,
|
|
740
|
+
variant: A.Warning,
|
|
704
741
|
message: l,
|
|
705
742
|
role: "note"
|
|
706
743
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ U("ul", {
|
|
708
745
|
className: We.dependenciesList,
|
|
709
746
|
children: e.map((e) => {
|
|
710
747
|
let t = u[e.type] ?? Ke[e.type];
|
|
711
|
-
return /* @__PURE__ */
|
|
712
|
-
className:
|
|
713
|
-
children: [Ye(e), /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ W("li", {
|
|
749
|
+
className: H("flex items-center gap-3 py-2", We.dependenciesItem),
|
|
750
|
+
children: [Ye(e), /* @__PURE__ */ W("div", {
|
|
714
751
|
className: "flex min-w-0 flex-col",
|
|
715
|
-
children: [/* @__PURE__ */
|
|
716
|
-
className:
|
|
717
|
-
children: [e.name, e.version != null && /* @__PURE__ */
|
|
718
|
-
className:
|
|
752
|
+
children: [/* @__PURE__ */ W("span", {
|
|
753
|
+
className: H("truncate", i, Ge.name),
|
|
754
|
+
children: [e.name, e.version != null && /* @__PURE__ */ U("span", {
|
|
755
|
+
className: H("ms-2", a, Ge.meta),
|
|
719
756
|
children: e.version
|
|
720
757
|
})]
|
|
721
|
-
}), /* @__PURE__ */
|
|
722
|
-
className:
|
|
758
|
+
}), /* @__PURE__ */ U("span", {
|
|
759
|
+
className: H("truncate", a, Ge.meta),
|
|
723
760
|
children: e.location ? `${t} · ${e.location}` : t
|
|
724
761
|
})]
|
|
725
762
|
})]
|
|
@@ -736,7 +773,7 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
736
773
|
emptyState: "_emptyState_d0adf_21",
|
|
737
774
|
stripedRow: "_stripedRow_d0adf_25"
|
|
738
775
|
}, tt = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
|
|
739
|
-
let m =
|
|
776
|
+
let m = V({
|
|
740
777
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
741
778
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
742
779
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -747,44 +784,44 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
747
784
|
"--phl-date-text": p?.dateText,
|
|
748
785
|
"--phl-empty-text": p?.emptyStateText,
|
|
749
786
|
"--phl-striped-bg": p?.stripedBackground
|
|
750
|
-
}), h =
|
|
787
|
+
}), h = H(f, et.emptyState);
|
|
751
788
|
if (n || r || e.length === 0) {
|
|
752
789
|
let e = s;
|
|
753
|
-
return n ? e = c : r && (e = l), /* @__PURE__ */
|
|
754
|
-
as:
|
|
790
|
+
return n ? e = c : r && (e = l), /* @__PURE__ */ U(w, {
|
|
791
|
+
as: T.P,
|
|
755
792
|
style: m,
|
|
756
793
|
className: h,
|
|
757
794
|
children: e
|
|
758
795
|
});
|
|
759
796
|
}
|
|
760
|
-
return /* @__PURE__ */
|
|
797
|
+
return /* @__PURE__ */ U("ul", {
|
|
761
798
|
style: m,
|
|
762
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
763
|
-
className:
|
|
764
|
-
children: [/* @__PURE__ */
|
|
799
|
+
children: e.map((e, n) => /* @__PURE__ */ W("li", {
|
|
800
|
+
className: H("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && et.stripedRow),
|
|
801
|
+
children: [/* @__PURE__ */ W("span", {
|
|
765
802
|
className: "flex min-w-0 items-center gap-2",
|
|
766
803
|
style: m,
|
|
767
804
|
children: [
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
className:
|
|
805
|
+
/* @__PURE__ */ W("span", {
|
|
806
|
+
className: H(u, et.version),
|
|
770
807
|
children: [
|
|
771
808
|
i,
|
|
772
809
|
" ",
|
|
773
810
|
e.version
|
|
774
811
|
]
|
|
775
812
|
}),
|
|
776
|
-
e.version === t && /* @__PURE__ */
|
|
813
|
+
e.version === t && /* @__PURE__ */ U(L, {
|
|
777
814
|
label: a,
|
|
778
|
-
className:
|
|
815
|
+
className: H("shrink-0 whitespace-nowrap", et.currentBadge)
|
|
779
816
|
}),
|
|
780
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
817
|
+
e.publishCredentials === !0 && /* @__PURE__ */ U(L, {
|
|
781
818
|
label: o,
|
|
782
|
-
className:
|
|
819
|
+
className: H("shrink-0 whitespace-nowrap", et.sharedCredentialsBadge)
|
|
783
820
|
})
|
|
784
821
|
]
|
|
785
|
-
}), /* @__PURE__ */
|
|
786
|
-
className:
|
|
787
|
-
children:
|
|
822
|
+
}), /* @__PURE__ */ U("span", {
|
|
823
|
+
className: H(d, et.date),
|
|
824
|
+
children: X(e.publishedAt)
|
|
788
825
|
})]
|
|
789
826
|
}, `${e.version}-${n}`))
|
|
790
827
|
});
|
|
@@ -822,63 +859,63 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
822
859
|
}, ft = {
|
|
823
860
|
divider: "_divider_1gs31_1",
|
|
824
861
|
tree: "_tree_1gs31_17"
|
|
825
|
-
}, pt = "data-cancel-creating-folder", mt = "", ht = [], gt = ({ items: e = ht, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: y = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: C = "Folder name cannot be empty.", invalidFolderNameError: w = "Folder name contains invalid characters.", duplicateFolderNameError:
|
|
826
|
-
let
|
|
827
|
-
...
|
|
828
|
-
...
|
|
829
|
-
},
|
|
862
|
+
}, pt = "data-cancel-creating-folder", mt = "", ht = [], gt = ({ items: e = ht, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: y = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: C = "Folder name cannot be empty.", invalidFolderNameError: w = "Folder name contains invalid characters.", duplicateFolderNameError: T = "A folder with this name already exists.", sameAsParentFolderNameError: E = "A folder cannot have the same name as its parent folder.", rootLabel: D = "Organization", expandedPaths: O, onExpandedPathsChange: k, loadingPaths: A, styles: j = {} }) => {
|
|
863
|
+
let te = {
|
|
864
|
+
...V({ "--pft-divider": j.colors?.divider }),
|
|
865
|
+
...j.cssVars
|
|
866
|
+
}, M = c != null, N = r(() => c ? ct(c) : e, [c, e]), ne = i(N);
|
|
830
867
|
t(() => {
|
|
831
|
-
|
|
832
|
-
}, [
|
|
833
|
-
let
|
|
834
|
-
|
|
835
|
-
let
|
|
836
|
-
|
|
837
|
-
}, [
|
|
868
|
+
ne.current = N;
|
|
869
|
+
}, [N]);
|
|
870
|
+
let P = r(() => c ? lt(c) : [mt], [c]), F = n;
|
|
871
|
+
M && (F = l ? at(l) : void 0);
|
|
872
|
+
let I = (e) => {
|
|
873
|
+
M ? u?.(e ? ot(e) : void 0) : o?.(e);
|
|
874
|
+
}, [L, re] = a(() => new Set(F?.map((e, t) => $(F.slice(0, t + 1))) ?? [])), R = r(() => c ? /* @__PURE__ */ new Set([...L, ...ut(c, (e) => e.expandedPaths)]) : void 0, [c, L]) ?? O ?? L, z = r(() => c ? ut(c, (e) => e.loadingPaths) : A, [c, A]), ie = (e) => {
|
|
838
875
|
let t = new Set(e);
|
|
839
|
-
for (let e of
|
|
876
|
+
for (let e of P) t.delete(e);
|
|
840
877
|
if (c) {
|
|
841
|
-
|
|
878
|
+
re(t);
|
|
842
879
|
let e = dt(c, t);
|
|
843
880
|
for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
|
|
844
|
-
} else
|
|
845
|
-
}, [
|
|
881
|
+
} else k ? k(t) : re(t);
|
|
882
|
+
}, [B, ae] = a(null), [oe, se] = a(S), G = i(null), K = i(!1);
|
|
846
883
|
t(() => {
|
|
847
884
|
let e = (e) => {
|
|
848
|
-
e.target instanceof Element && e.target.closest(`[${pt}]`) && (
|
|
885
|
+
e.target instanceof Element && e.target.closest(`[${pt}]`) && (K.current = !0);
|
|
849
886
|
};
|
|
850
887
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
851
888
|
}, []);
|
|
852
|
-
let
|
|
853
|
-
let e =
|
|
854
|
-
return
|
|
889
|
+
let q = m.trim(), J = B != null, Y = r(() => ge(N, m), [N, m]), fe = q.length > 0 && Y.length === 0, X = !J && q.length > 0, pe = r(() => {
|
|
890
|
+
let e = X ? Y : N;
|
|
891
|
+
return M ? e : ve(e);
|
|
855
892
|
}, [
|
|
893
|
+
X,
|
|
856
894
|
Y,
|
|
857
|
-
J,
|
|
858
|
-
M,
|
|
859
|
-
j
|
|
860
|
-
]), Z = r(() => /* @__PURE__ */ new Set([...N, ...xe(X)]), [N, X]), me = r(() => /* @__PURE__ */ new Set([...N, ...Y ? Z : I]), [
|
|
861
895
|
N,
|
|
862
|
-
|
|
896
|
+
M
|
|
897
|
+
]), Z = r(() => /* @__PURE__ */ new Set([...P, ...xe(pe)]), [P, pe]), me = r(() => /* @__PURE__ */ new Set([...P, ...X ? Z : R]), [
|
|
898
|
+
P,
|
|
899
|
+
X,
|
|
863
900
|
Z,
|
|
864
|
-
|
|
865
|
-
]), Q = r(() => we(
|
|
901
|
+
R
|
|
902
|
+
]), Q = r(() => we(pe), [pe]), he = r(() => X && Q.length === 0 ? [] : M ? Q : [{
|
|
866
903
|
path: mt,
|
|
867
|
-
name:
|
|
904
|
+
name: D,
|
|
868
905
|
folderId: mt,
|
|
869
|
-
nodeType:
|
|
906
|
+
nodeType: ue.FOLDER,
|
|
870
907
|
items: Q
|
|
871
908
|
}], [
|
|
872
909
|
Q,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
]), _e =
|
|
910
|
+
D,
|
|
911
|
+
X,
|
|
912
|
+
M
|
|
913
|
+
]), _e = B ? $(B) : null, ye = {
|
|
877
914
|
empty: C,
|
|
878
915
|
invalid: w,
|
|
879
|
-
duplicate:
|
|
880
|
-
sameAsParent:
|
|
881
|
-
}, be = (e) =>
|
|
916
|
+
duplicate: T,
|
|
917
|
+
sameAsParent: E
|
|
918
|
+
}, be = (e) => P.includes($(e)) ? void 0 : e.at(-1), Ce = (e) => c ? ot(e) : {
|
|
882
919
|
rootKey: mt,
|
|
883
920
|
path: e
|
|
884
921
|
}, Te = (e) => {
|
|
@@ -895,24 +932,24 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
895
932
|
return n != null && n.canCreateFolders !== !1;
|
|
896
933
|
}, je = (() => {
|
|
897
934
|
if (!c) {
|
|
898
|
-
let e =
|
|
935
|
+
let e = F ?? [];
|
|
899
936
|
return Ae(e) ? e : void 0;
|
|
900
937
|
}
|
|
901
|
-
if (
|
|
938
|
+
if (F && Ae(F)) return F;
|
|
902
939
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
903
940
|
return e ? at({
|
|
904
941
|
rootKey: e.key,
|
|
905
942
|
path: []
|
|
906
943
|
}) : void 0;
|
|
907
944
|
})(), Me = (e) => {
|
|
908
|
-
let t =
|
|
909
|
-
return De(t ?
|
|
945
|
+
let t = fe && Ee(q, [], ye) == null, n = be(e);
|
|
946
|
+
return De(t ? q : S, [...Oe(N, e), ...n ? [n] : []]);
|
|
910
947
|
}, [Ne, Pe] = a(null);
|
|
911
|
-
Ne != null && !
|
|
948
|
+
Ne != null && !z?.has($(Ne)) && (Pe(null), ae(Ne), se(Me(Ne)));
|
|
912
949
|
let Fe = (e) => {
|
|
913
|
-
|
|
950
|
+
ae(null), Pe(e), G.current = null, K.current = !1;
|
|
914
951
|
let t = $(e);
|
|
915
|
-
t &&
|
|
952
|
+
t && ie(new Set(R).add(t));
|
|
916
953
|
}, Ie = () => {
|
|
917
954
|
je && Fe(je);
|
|
918
955
|
}, Le = (e) => {
|
|
@@ -921,17 +958,17 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
921
958
|
let n = [{
|
|
922
959
|
key: "add-child",
|
|
923
960
|
label: x,
|
|
924
|
-
icon: /* @__PURE__ */
|
|
961
|
+
icon: /* @__PURE__ */ U(ce, {
|
|
925
962
|
size: d.SM,
|
|
926
963
|
"aria-hidden": !0,
|
|
927
964
|
stroke: f
|
|
928
965
|
}),
|
|
929
966
|
onClick: () => Fe(t)
|
|
930
967
|
}];
|
|
931
|
-
return
|
|
968
|
+
return P.includes(e.path) || n.push({
|
|
932
969
|
key: "add-sibling",
|
|
933
970
|
label: y,
|
|
934
|
-
icon: /* @__PURE__ */
|
|
971
|
+
icon: /* @__PURE__ */ U(le, {
|
|
935
972
|
size: d.SM,
|
|
936
973
|
"aria-hidden": !0,
|
|
937
974
|
stroke: f
|
|
@@ -939,63 +976,63 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
939
976
|
onClick: () => Fe(t.slice(0, -1))
|
|
940
977
|
}), n;
|
|
941
978
|
}, Re = (e) => {
|
|
942
|
-
if (!
|
|
943
|
-
let t = Ee(e, Oe(
|
|
944
|
-
return
|
|
979
|
+
if (!B) return null;
|
|
980
|
+
let t = Ee(e, Oe(ne.current, B), ye, be(B));
|
|
981
|
+
return G.current = t, t;
|
|
945
982
|
}, ze = (e) => {
|
|
946
|
-
if (!
|
|
947
|
-
let t = e.trim(), n =
|
|
983
|
+
if (!B || K.current) return;
|
|
984
|
+
let t = e.trim(), n = G.current;
|
|
948
985
|
if (!(Re(e) ?? n)) {
|
|
949
|
-
let e = c ? ot(
|
|
950
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
986
|
+
let e = c ? ot(B) : void 0;
|
|
987
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(B, t), I([...B, t]);
|
|
951
988
|
}
|
|
952
|
-
|
|
953
|
-
}, Be = () =>
|
|
954
|
-
return /* @__PURE__ */
|
|
955
|
-
style:
|
|
956
|
-
className:
|
|
989
|
+
ae(null);
|
|
990
|
+
}, Be = () => ae(null);
|
|
991
|
+
return /* @__PURE__ */ W("div", {
|
|
992
|
+
style: te,
|
|
993
|
+
className: H(g && "pointer-events-none opacity-60", j.className),
|
|
957
994
|
children: [
|
|
958
|
-
/* @__PURE__ */
|
|
959
|
-
className:
|
|
960
|
-
children: /* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ U("div", {
|
|
996
|
+
className: H("w-full max-w-full min-w-0", ft.tree),
|
|
997
|
+
children: /* @__PURE__ */ U(de, {
|
|
961
998
|
items: he,
|
|
962
999
|
showFiles: !1,
|
|
963
|
-
selectedPath:
|
|
1000
|
+
selectedPath: F == null ? void 0 : $(F),
|
|
964
1001
|
expandedPaths: me,
|
|
965
|
-
onExpandedPathsChange:
|
|
966
|
-
loadingPaths:
|
|
1002
|
+
onExpandedPathsChange: ie,
|
|
1003
|
+
loadingPaths: z,
|
|
967
1004
|
onItemClick: (e) => {
|
|
968
1005
|
if (g || Te(e)) return;
|
|
969
|
-
let t =
|
|
970
|
-
|
|
1006
|
+
let t = F != null && $(F) === e.path;
|
|
1007
|
+
I(t ? void 0 : Se(e.path));
|
|
971
1008
|
},
|
|
972
1009
|
getDisabledTooltip: h ? Te : void 0,
|
|
973
1010
|
getContextMenuItems: Le,
|
|
974
1011
|
createdFolderPath: _e,
|
|
975
|
-
newFolderDefaultName:
|
|
1012
|
+
newFolderDefaultName: oe,
|
|
976
1013
|
onCreateFolderSave: ze,
|
|
977
1014
|
onCreateFolderCancel: Be,
|
|
978
1015
|
onRenameValidate: (e) => Re(e),
|
|
979
|
-
searchQuery:
|
|
980
|
-
emptyStateTitle:
|
|
1016
|
+
searchQuery: X ? q : void 0,
|
|
1017
|
+
emptyStateTitle: X ? ee.replace("{query}", q) : void 0
|
|
981
1018
|
})
|
|
982
1019
|
}),
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
className:
|
|
1020
|
+
/* @__PURE__ */ U("div", {
|
|
1021
|
+
className: H("my-2 h-px", ft.divider),
|
|
985
1022
|
"aria-hidden": !0
|
|
986
1023
|
}),
|
|
987
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ W("div", {
|
|
988
1025
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
989
|
-
children: [/* @__PURE__ */
|
|
1026
|
+
children: [/* @__PURE__ */ U(b, {
|
|
990
1027
|
onClick: Ie,
|
|
991
1028
|
label: _,
|
|
992
|
-
iconBefore: /* @__PURE__ */
|
|
1029
|
+
iconBefore: /* @__PURE__ */ U(le, {
|
|
993
1030
|
size: d.SM,
|
|
994
1031
|
"aria-hidden": !0,
|
|
995
1032
|
stroke: f
|
|
996
1033
|
}),
|
|
997
|
-
disabled: g ||
|
|
998
|
-
}),
|
|
1034
|
+
disabled: g || J || !je
|
|
1035
|
+
}), J && /* @__PURE__ */ U(b, {
|
|
999
1036
|
label: v,
|
|
1000
1037
|
onClick: Be,
|
|
1001
1038
|
disabled: g,
|
|
@@ -1008,58 +1045,62 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1008
1045
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
1009
1046
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
1010
1047
|
destination: "_destination_zj3gd_9"
|
|
1011
|
-
}, vt = 200, yt = [], bt = [], xt = ({ view: e = Q.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, getDisabledReason: S, expandedPaths: C, onExpandedPathsChange: w, loadingPaths:
|
|
1012
|
-
let { colors:
|
|
1013
|
-
...
|
|
1014
|
-
"--pp-summary-title-text":
|
|
1015
|
-
"--pp-heading-text":
|
|
1016
|
-
"--pp-destination-text":
|
|
1048
|
+
}, vt = 200, yt = [], bt = [], xt = ({ view: e = Q.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, getDisabledReason: S, expandedPaths: C, onExpandedPathsChange: w, loadingPaths: T, hasExistingPublicationInFolder: E, hasWriteAccess: D, isSubmitting: j, hasSubmitError: te = !1, isTargetTaken: N = !1, isTargetChecking: ne = !1, allowReplace: P = !0, author: F = "", onAuthorChange: I, publishCredentials: L = !1, onPublishCredentialsChange: re, rules: R = yt, onRulesChange: z, ruleSourceOptions: B = bt, isRulesLoading: ae = !1, hasRulesLoadError: oe = !1, labels: ce = {}, summaryTitleClassName: le = "dial-body-semi-text", headingClassName: G = "dial-body-semi-text", destinationClassName: ue = "dial-small-semi-text", calloutFolderNameClassName: de = "dial-small-paragraph-semi-text", styles: K = {} }) => {
|
|
1049
|
+
let { colors: J, folderTree: fe, accessRules: X, dependencies: pe } = K, Z = {
|
|
1050
|
+
...V({
|
|
1051
|
+
"--pp-summary-title-text": J?.summaryTitleText,
|
|
1052
|
+
"--pp-heading-text": J?.headingText,
|
|
1053
|
+
"--pp-destination-text": J?.destinationText
|
|
1017
1054
|
}),
|
|
1018
|
-
...
|
|
1019
|
-
},
|
|
1020
|
-
border:
|
|
1021
|
-
background:
|
|
1022
|
-
}, { folderLabel:
|
|
1023
|
-
|
|
1024
|
-
},
|
|
1055
|
+
...K.cssVars
|
|
1056
|
+
}, me = {
|
|
1057
|
+
border: J?.summaryBorder,
|
|
1058
|
+
background: J?.summaryBackground
|
|
1059
|
+
}, { folderLabel: he = "Publish to folder", destinationAriaLabel: ge = "Destination folder", noFolderSelectedLabel: _e = "No folder selected", changeFolderLabel: ve = "Change", chooseFolderLabel: ye = "Choose", replaceWarning: be = "Version {version} is already published in {folder}. Publishing will replace it.", targetTakenLabel: xe = "A resource with this name already exists in {folder}. Rename it or choose another folder.", targetTakenVersionedLabel: $ = "Version {version} of a resource with this name already exists in {folder}. Rename it, change its version or choose another folder.", noAccessError: Se = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: Ce = "Publishing failed. Please try again.", adminApprovalTitle: we = "Admin approval required", adminApprovalMessage: Te = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Ee, addSiblingFolderLabel: De, addChildFolderLabel: Oe, cancelCreatingFolderLabel: ke, createFolderEmptyNameError: Ae, createFolderInvalidNameError: je, createFolderDuplicateNameError: Me, createFolderSameAsParentNameError: Ne, rootFolderLabel: Pe = "Organization", accessRulesLabels: Fe, dependenciesLabels: Ie, searchPlaceholder: Le, clearSearchAriaLabel: ze, authorLabel: Be = "Author", authorPlaceholder: Ve = "Author name", authorHint: He = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Ge = "Publish with my credentials", credentialsHint: Ke = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ce, [qe, Je] = a(""), Ye = n(), Xe = i(null), Ze = i(null), Qe = (e) => {
|
|
1060
|
+
Je(e ?? "");
|
|
1061
|
+
}, et = i(e);
|
|
1025
1062
|
t(() => {
|
|
1026
|
-
|
|
1063
|
+
et.current !== e && (et.current = e, e === Q.ChangeFolder ? Ze.current?.focus({ preventScroll: !0 }) : Xe.current?.focus({ preventScroll: !0 }));
|
|
1027
1064
|
}, [e]);
|
|
1028
|
-
let
|
|
1029
|
-
hasSelectedFolder:
|
|
1030
|
-
hasExistingPublicationInFolder:
|
|
1031
|
-
hasWriteAccess:
|
|
1032
|
-
isSubmitting:
|
|
1033
|
-
hasSubmitError:
|
|
1034
|
-
|
|
1065
|
+
let tt = g != null, nt = r(() => Y({
|
|
1066
|
+
hasSelectedFolder: tt,
|
|
1067
|
+
hasExistingPublicationInFolder: E,
|
|
1068
|
+
hasWriteAccess: D,
|
|
1069
|
+
isSubmitting: j,
|
|
1070
|
+
hasSubmitError: te,
|
|
1071
|
+
isTargetTaken: N,
|
|
1072
|
+
isTargetChecking: ne,
|
|
1073
|
+
allowReplace: P
|
|
1035
1074
|
}), [
|
|
1036
|
-
|
|
1037
|
-
T,
|
|
1075
|
+
tt,
|
|
1038
1076
|
E,
|
|
1039
|
-
|
|
1077
|
+
D,
|
|
1078
|
+
j,
|
|
1079
|
+
te,
|
|
1080
|
+
N,
|
|
1040
1081
|
ne,
|
|
1041
|
-
|
|
1042
|
-
]),
|
|
1043
|
-
className:
|
|
1082
|
+
P
|
|
1083
|
+
]), rt = tt ? g[g.length - 1] ?? Pe : "", it = c ? c() : /* @__PURE__ */ U("span", {
|
|
1084
|
+
className: H("truncate", le, _t.summaryTitle),
|
|
1044
1085
|
children: s?.title
|
|
1045
1086
|
});
|
|
1046
|
-
if (e === Q.ChangeFolder) return /* @__PURE__ */
|
|
1047
|
-
ref:
|
|
1087
|
+
if (e === Q.ChangeFolder) return /* @__PURE__ */ W("div", {
|
|
1088
|
+
ref: Ze,
|
|
1048
1089
|
tabIndex: -1,
|
|
1049
1090
|
role: "group",
|
|
1050
|
-
"aria-label":
|
|
1051
|
-
className:
|
|
1052
|
-
style:
|
|
1053
|
-
children: [/* @__PURE__ */
|
|
1091
|
+
"aria-label": he,
|
|
1092
|
+
className: H("flex flex-col gap-3 outline-none", We.panel),
|
|
1093
|
+
style: Z,
|
|
1094
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1054
1095
|
role: "search",
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1056
|
-
value:
|
|
1057
|
-
onChange:
|
|
1058
|
-
placeholder:
|
|
1059
|
-
clearLabel:
|
|
1060
|
-
"aria-label":
|
|
1096
|
+
children: /* @__PURE__ */ U(M, {
|
|
1097
|
+
value: qe,
|
|
1098
|
+
onChange: Qe,
|
|
1099
|
+
placeholder: Le,
|
|
1100
|
+
clearLabel: ze,
|
|
1101
|
+
"aria-label": Le
|
|
1061
1102
|
})
|
|
1062
|
-
}), /* @__PURE__ */
|
|
1103
|
+
}), /* @__PURE__ */ U(gt, {
|
|
1063
1104
|
items: m,
|
|
1064
1105
|
selectedPath: _,
|
|
1065
1106
|
onSelectedPathChange: v,
|
|
@@ -1067,30 +1108,30 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1067
1108
|
getDisabledReason: S,
|
|
1068
1109
|
expandedPaths: C,
|
|
1069
1110
|
onExpandedPathsChange: w,
|
|
1070
|
-
loadingPaths:
|
|
1071
|
-
searchQuery:
|
|
1072
|
-
disabled:
|
|
1073
|
-
noResultsLabel:
|
|
1074
|
-
addSiblingFolderLabel:
|
|
1075
|
-
addChildFolderLabel:
|
|
1076
|
-
cancelCreatingFolderLabel:
|
|
1077
|
-
emptyFolderNameError:
|
|
1078
|
-
invalidFolderNameError:
|
|
1079
|
-
duplicateFolderNameError:
|
|
1080
|
-
sameAsParentFolderNameError:
|
|
1081
|
-
rootLabel:
|
|
1082
|
-
styles:
|
|
1111
|
+
loadingPaths: T,
|
|
1112
|
+
searchQuery: qe,
|
|
1113
|
+
disabled: j,
|
|
1114
|
+
noResultsLabel: Ee,
|
|
1115
|
+
addSiblingFolderLabel: De,
|
|
1116
|
+
addChildFolderLabel: Oe,
|
|
1117
|
+
cancelCreatingFolderLabel: ke,
|
|
1118
|
+
emptyFolderNameError: Ae,
|
|
1119
|
+
invalidFolderNameError: je,
|
|
1120
|
+
duplicateFolderNameError: Me,
|
|
1121
|
+
sameAsParentFolderNameError: Ne,
|
|
1122
|
+
rootLabel: Pe,
|
|
1123
|
+
styles: fe
|
|
1083
1124
|
})]
|
|
1084
1125
|
});
|
|
1085
|
-
let
|
|
1086
|
-
return /* @__PURE__ */
|
|
1087
|
-
className:
|
|
1088
|
-
style:
|
|
1126
|
+
let at = H(ue, _t.destination);
|
|
1127
|
+
return /* @__PURE__ */ W("div", {
|
|
1128
|
+
className: H("flex flex-col gap-5", We.panel),
|
|
1129
|
+
style: Z,
|
|
1089
1130
|
children: [
|
|
1090
|
-
s?.type == null ? /* @__PURE__ */
|
|
1091
|
-
colors:
|
|
1092
|
-
children:
|
|
1093
|
-
}) : /* @__PURE__ */
|
|
1131
|
+
s?.type == null ? /* @__PURE__ */ U(ie, {
|
|
1132
|
+
colors: me,
|
|
1133
|
+
children: it
|
|
1134
|
+
}) : /* @__PURE__ */ U(ie, {
|
|
1094
1135
|
item: {
|
|
1095
1136
|
type: s.type,
|
|
1096
1137
|
name: s.title,
|
|
@@ -1098,145 +1139,146 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1098
1139
|
iconUrl: s.iconUrl
|
|
1099
1140
|
},
|
|
1100
1141
|
hasVersionTag: !1,
|
|
1101
|
-
colors:
|
|
1142
|
+
colors: me
|
|
1102
1143
|
}),
|
|
1103
|
-
/* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
className:
|
|
1106
|
-
children:
|
|
1144
|
+
/* @__PURE__ */ W("section", { children: [
|
|
1145
|
+
/* @__PURE__ */ U("h2", {
|
|
1146
|
+
className: H("mb-2", G, _t.sectionHeading),
|
|
1147
|
+
children: he
|
|
1107
1148
|
}),
|
|
1108
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ W("div", {
|
|
1109
1150
|
className: "flex min-w-0 items-center gap-2",
|
|
1110
|
-
children: [/* @__PURE__ */
|
|
1151
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1111
1152
|
role: "group",
|
|
1112
|
-
"aria-label":
|
|
1153
|
+
"aria-label": ge,
|
|
1113
1154
|
className: "min-w-0 flex-1",
|
|
1114
|
-
children:
|
|
1115
|
-
name: [
|
|
1116
|
-
nameClassName:
|
|
1117
|
-
}) : /* @__PURE__ */
|
|
1118
|
-
className:
|
|
1119
|
-
children:
|
|
1155
|
+
children: tt ? /* @__PURE__ */ U(y, {
|
|
1156
|
+
name: [Pe, ...g].join(" / "),
|
|
1157
|
+
nameClassName: at
|
|
1158
|
+
}) : /* @__PURE__ */ U("span", {
|
|
1159
|
+
className: H("block truncate", at),
|
|
1160
|
+
children: _e
|
|
1120
1161
|
})
|
|
1121
|
-
}), /* @__PURE__ */
|
|
1122
|
-
ref:
|
|
1162
|
+
}), /* @__PURE__ */ U(b, {
|
|
1163
|
+
ref: Xe,
|
|
1123
1164
|
size: h.Small,
|
|
1124
|
-
label:
|
|
1125
|
-
iconBefore: /* @__PURE__ */
|
|
1165
|
+
label: tt ? ve : ye,
|
|
1166
|
+
iconBefore: /* @__PURE__ */ U(se, {
|
|
1126
1167
|
size: d.SM,
|
|
1127
1168
|
stroke: f,
|
|
1128
1169
|
"aria-hidden": !0
|
|
1129
1170
|
}),
|
|
1130
|
-
disabled:
|
|
1171
|
+
disabled: j,
|
|
1131
1172
|
onClick: o
|
|
1132
1173
|
})]
|
|
1133
1174
|
}),
|
|
1134
|
-
|
|
1175
|
+
nt.calloutKind === q.Info && /* @__PURE__ */ U("div", {
|
|
1135
1176
|
className: "my-4",
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1137
|
-
type:
|
|
1138
|
-
variant:
|
|
1139
|
-
title:
|
|
1140
|
-
message:
|
|
1177
|
+
children: /* @__PURE__ */ U(O, {
|
|
1178
|
+
type: k.SectionMessage,
|
|
1179
|
+
variant: A.Info,
|
|
1180
|
+
title: we,
|
|
1181
|
+
message: Te
|
|
1141
1182
|
})
|
|
1142
1183
|
}),
|
|
1143
|
-
|
|
1184
|
+
nt.calloutKind !== q.None && nt.calloutKind !== q.Info && /* @__PURE__ */ U("div", {
|
|
1144
1185
|
className: "mt-3",
|
|
1145
|
-
children: /* @__PURE__ */
|
|
1146
|
-
type:
|
|
1147
|
-
variant: St(
|
|
1148
|
-
message: wt(
|
|
1149
|
-
replaceWarning:
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1186
|
+
children: /* @__PURE__ */ U(O, {
|
|
1187
|
+
type: k.SectionMessage,
|
|
1188
|
+
variant: St(nt.calloutKind),
|
|
1189
|
+
message: wt(nt.calloutKind, {
|
|
1190
|
+
replaceWarning: be,
|
|
1191
|
+
targetTaken: s?.version ? $ : xe,
|
|
1192
|
+
noAccessError: Se,
|
|
1193
|
+
submitError: Ce,
|
|
1194
|
+
folderName: rt,
|
|
1153
1195
|
version: s?.version,
|
|
1154
|
-
folderNameClassName:
|
|
1196
|
+
folderNameClassName: de
|
|
1155
1197
|
})
|
|
1156
1198
|
})
|
|
1157
1199
|
}),
|
|
1158
|
-
|
|
1200
|
+
I != null && /* @__PURE__ */ U("div", {
|
|
1159
1201
|
className: "mt-4",
|
|
1160
|
-
children: /* @__PURE__ */
|
|
1161
|
-
id:
|
|
1162
|
-
labelProps: { label:
|
|
1163
|
-
placeholder:
|
|
1164
|
-
caption:
|
|
1165
|
-
value:
|
|
1166
|
-
onChange: (e) =>
|
|
1202
|
+
children: /* @__PURE__ */ U(ee, {
|
|
1203
|
+
id: Ye,
|
|
1204
|
+
labelProps: { label: Be },
|
|
1205
|
+
placeholder: Ve,
|
|
1206
|
+
caption: He,
|
|
1207
|
+
value: F,
|
|
1208
|
+
onChange: (e) => I(e ?? ""),
|
|
1167
1209
|
maxLength: vt,
|
|
1168
|
-
disabled:
|
|
1210
|
+
disabled: j
|
|
1169
1211
|
})
|
|
1170
1212
|
}),
|
|
1171
|
-
|
|
1213
|
+
re != null && /* @__PURE__ */ U("div", {
|
|
1172
1214
|
className: "mt-4",
|
|
1173
|
-
children: /* @__PURE__ */
|
|
1174
|
-
labelProps: { label:
|
|
1175
|
-
caption:
|
|
1176
|
-
isSelected:
|
|
1177
|
-
onChange:
|
|
1178
|
-
disabled:
|
|
1215
|
+
children: /* @__PURE__ */ U(l, {
|
|
1216
|
+
labelProps: { label: Ge },
|
|
1217
|
+
caption: Ke,
|
|
1218
|
+
isSelected: L,
|
|
1219
|
+
onChange: re,
|
|
1220
|
+
disabled: j
|
|
1179
1221
|
})
|
|
1180
1222
|
}),
|
|
1181
|
-
|
|
1223
|
+
z != null && /* @__PURE__ */ U("div", {
|
|
1182
1224
|
className: "mt-4",
|
|
1183
|
-
children: /* @__PURE__ */
|
|
1184
|
-
rules:
|
|
1185
|
-
onRulesChange:
|
|
1186
|
-
sourceOptions:
|
|
1187
|
-
folderName:
|
|
1188
|
-
disabled:
|
|
1189
|
-
isLoading:
|
|
1190
|
-
hasLoadError:
|
|
1191
|
-
labels:
|
|
1192
|
-
styles:
|
|
1225
|
+
children: /* @__PURE__ */ U(Re, {
|
|
1226
|
+
rules: R,
|
|
1227
|
+
onRulesChange: z,
|
|
1228
|
+
sourceOptions: B,
|
|
1229
|
+
folderName: tt ? rt : void 0,
|
|
1230
|
+
disabled: j,
|
|
1231
|
+
isLoading: ae,
|
|
1232
|
+
hasLoadError: oe,
|
|
1233
|
+
labels: Fe,
|
|
1234
|
+
styles: X
|
|
1193
1235
|
})
|
|
1194
1236
|
})
|
|
1195
1237
|
] }),
|
|
1196
|
-
u != null && /* @__PURE__ */
|
|
1238
|
+
u != null && /* @__PURE__ */ U($e, {
|
|
1197
1239
|
dependencies: u,
|
|
1198
|
-
labels:
|
|
1199
|
-
headingClassName:
|
|
1240
|
+
labels: Ie,
|
|
1241
|
+
headingClassName: G,
|
|
1200
1242
|
styles: pe
|
|
1201
1243
|
}),
|
|
1202
|
-
p != null && /* @__PURE__ */
|
|
1203
|
-
headingClassName:
|
|
1244
|
+
p != null && /* @__PURE__ */ U(Ue, {
|
|
1245
|
+
headingClassName: G,
|
|
1204
1246
|
...p
|
|
1205
1247
|
})
|
|
1206
1248
|
]
|
|
1207
1249
|
});
|
|
1208
|
-
}, St = (e) => e ===
|
|
1250
|
+
}, St = (e) => e === q.ReplaceWarning || e === q.TargetTaken ? A.Warning : A.Error, Ct = (e, t, n) => {
|
|
1209
1251
|
let [r, i, ...a] = e.split("{folder}");
|
|
1210
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
1252
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ W(oe, { children: [
|
|
1211
1253
|
r,
|
|
1212
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ U("strong", {
|
|
1213
1255
|
className: n,
|
|
1214
1256
|
children: t
|
|
1215
1257
|
}),
|
|
1216
1258
|
i
|
|
1217
1259
|
] });
|
|
1218
|
-
}, wt = (e, t) => e ===
|
|
1219
|
-
let p =
|
|
1220
|
-
return /* @__PURE__ */
|
|
1260
|
+
}, wt = (e, t) => e === q.ReplaceWarning ? Ct(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === q.TargetTaken ? Ct(t.targetTaken.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === q.NoAccess ? Ct(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Tt = { footer: "_footer_dks1v_1" }, Et = ({ 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: u = {}, colors: f }) => {
|
|
1261
|
+
let p = V({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: v = "Select" } = u, y = s === Q.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
|
|
1262
|
+
return /* @__PURE__ */ W("div", {
|
|
1221
1263
|
style: p,
|
|
1222
|
-
className:
|
|
1223
|
-
children: [/* @__PURE__ */
|
|
1264
|
+
className: H("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),
|
|
1265
|
+
children: [/* @__PURE__ */ U(b, {
|
|
1224
1266
|
label: m,
|
|
1225
1267
|
className: "mobile:flex-1",
|
|
1226
1268
|
disabled: i,
|
|
1227
1269
|
onClick: a
|
|
1228
|
-
}), y ? /* @__PURE__ */
|
|
1270
|
+
}), y ? /* @__PURE__ */ U(D, {
|
|
1229
1271
|
label: v,
|
|
1230
1272
|
className: "mobile:flex-1",
|
|
1231
1273
|
disabled: l,
|
|
1232
1274
|
onClick: c
|
|
1233
|
-
}) : /* @__PURE__ */
|
|
1275
|
+
}) : /* @__PURE__ */ U(j, {
|
|
1234
1276
|
label: x,
|
|
1235
1277
|
className: "mobile:flex-1",
|
|
1236
1278
|
disabled: r,
|
|
1237
|
-
iconBefore: i ? /* @__PURE__ */
|
|
1279
|
+
iconBefore: i ? /* @__PURE__ */ U("span", {
|
|
1238
1280
|
"aria-hidden": !0,
|
|
1239
|
-
children: /* @__PURE__ */
|
|
1281
|
+
children: /* @__PURE__ */ U(I, { size: d.SM })
|
|
1240
1282
|
}) : void 0,
|
|
1241
1283
|
onClick: o
|
|
1242
1284
|
})]
|
|
@@ -1247,35 +1289,39 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1247
1289
|
divider: "_divider_16jmd_15",
|
|
1248
1290
|
content: "_content_16jmd_19",
|
|
1249
1291
|
title: "_title_16jmd_24"
|
|
1250
|
-
}, Ot = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1,
|
|
1251
|
-
let
|
|
1252
|
-
"--spp-backdrop-bg":
|
|
1253
|
-
"--spp-panel-bg":
|
|
1254
|
-
"--spp-panel-border":
|
|
1255
|
-
"--spp-divider-border":
|
|
1256
|
-
"--spp-scrollbar-thumb":
|
|
1257
|
-
"--spp-title-text":
|
|
1258
|
-
}), [
|
|
1292
|
+
}, Ot = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, isTargetTaken: b = !1, isTargetChecking: x = !1, allowReplace: S = !0, author: ee, onAuthorChange: C, rules: w, onRulesChange: T, ruleSourceOptions: E, isRulesLoading: D = !1, hasRulesLoadError: O = !1, onClose: k, returnFocusRef: A, onSubmit: j, panelLabels: te, panelStyles: M, panelSummaryTitleClassName: N, panelHeadingClassName: P, panelCalloutFolderNameClassName: F, footerLabels: I, labels: L = {}, titleClassName: re = "dial-body-semi-text", colors: R }) => {
|
|
1293
|
+
let z = V({
|
|
1294
|
+
"--spp-backdrop-bg": R?.backdropBackground,
|
|
1295
|
+
"--spp-panel-bg": R?.panelBackground,
|
|
1296
|
+
"--spp-panel-border": R?.panelBorder,
|
|
1297
|
+
"--spp-divider-border": R?.dividerBorder,
|
|
1298
|
+
"--spp-scrollbar-thumb": R?.scrollbarThumb,
|
|
1299
|
+
"--spp-title-text": R?.titleText
|
|
1300
|
+
}), [ie, B] = a(null), { title: ae = "Publish", changeFolderTitle: oe = "Change folder", backAriaLabel: se = "Back", ariaLabel: ce = "Publish", closeAriaLabel: le = "Close" } = L, G = he({
|
|
1259
1301
|
isOpen: e,
|
|
1260
1302
|
selectedFolderPath: l,
|
|
1261
1303
|
onSelectedFolderPathChange: u
|
|
1262
|
-
}),
|
|
1304
|
+
}), ue = G.view === Q.ChangeFolder, de = r(() => Y({
|
|
1263
1305
|
hasSelectedFolder: l != null,
|
|
1264
1306
|
hasExistingPublicationInFolder: g,
|
|
1265
1307
|
hasWriteAccess: _,
|
|
1266
1308
|
isSubmitting: v,
|
|
1267
1309
|
hasSubmitError: y,
|
|
1268
|
-
|
|
1310
|
+
isTargetTaken: b,
|
|
1311
|
+
isTargetChecking: x,
|
|
1312
|
+
allowReplace: S
|
|
1269
1313
|
}), [
|
|
1270
1314
|
l,
|
|
1271
1315
|
g,
|
|
1272
1316
|
_,
|
|
1273
1317
|
v,
|
|
1274
1318
|
y,
|
|
1275
|
-
b
|
|
1319
|
+
b,
|
|
1320
|
+
x,
|
|
1321
|
+
S
|
|
1276
1322
|
]);
|
|
1277
1323
|
return t(() => {
|
|
1278
|
-
let t =
|
|
1324
|
+
let t = ie?.closest("[role=\"dialog\"]");
|
|
1279
1325
|
if (!e || !t) return;
|
|
1280
1326
|
let n = () => t.focus({ preventScroll: !0 });
|
|
1281
1327
|
n();
|
|
@@ -1285,49 +1331,49 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1285
1331
|
document.addEventListener("focusin", r);
|
|
1286
1332
|
let i = requestAnimationFrame(() => {
|
|
1287
1333
|
document.removeEventListener("focusin", r);
|
|
1288
|
-
}), a =
|
|
1334
|
+
}), a = A?.current;
|
|
1289
1335
|
return () => {
|
|
1290
1336
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
1291
1337
|
};
|
|
1292
1338
|
}, [
|
|
1293
1339
|
e,
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
]), /* @__PURE__ */
|
|
1340
|
+
ie,
|
|
1341
|
+
A
|
|
1342
|
+
]), /* @__PURE__ */ W(ne, {
|
|
1297
1343
|
open: e,
|
|
1298
|
-
onClose:
|
|
1299
|
-
header: /* @__PURE__ */
|
|
1300
|
-
className:
|
|
1301
|
-
children:
|
|
1344
|
+
onClose: k,
|
|
1345
|
+
header: /* @__PURE__ */ U("span", {
|
|
1346
|
+
className: H("block truncate text-center", re, Dt.title),
|
|
1347
|
+
children: ue ? oe : ae
|
|
1302
1348
|
}),
|
|
1303
|
-
ariaLabel:
|
|
1304
|
-
onBack:
|
|
1305
|
-
backAriaLabel:
|
|
1349
|
+
ariaLabel: ce,
|
|
1350
|
+
onBack: ue ? G.backToMain : void 0,
|
|
1351
|
+
backAriaLabel: se,
|
|
1306
1352
|
backDisabled: v,
|
|
1307
|
-
closeAriaLabel:
|
|
1353
|
+
closeAriaLabel: le,
|
|
1308
1354
|
closeDisabled: v,
|
|
1309
|
-
style:
|
|
1310
|
-
overlayStyle:
|
|
1311
|
-
className:
|
|
1355
|
+
style: z,
|
|
1356
|
+
overlayStyle: z,
|
|
1357
|
+
className: H(Dt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1312
1358
|
overlayClassName: Dt.backdrop,
|
|
1313
|
-
headerClassName:
|
|
1359
|
+
headerClassName: H("px-[22px]", Dt.divider),
|
|
1314
1360
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1315
|
-
children: [/* @__PURE__ */
|
|
1316
|
-
ref:
|
|
1317
|
-
className:
|
|
1318
|
-
children: /* @__PURE__ */
|
|
1361
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1362
|
+
ref: B,
|
|
1363
|
+
className: H("min-h-0 flex-1 overflow-y-auto", Dt.content),
|
|
1364
|
+
children: /* @__PURE__ */ U("div", {
|
|
1319
1365
|
className: "p-[22px]",
|
|
1320
|
-
children: /* @__PURE__ */
|
|
1366
|
+
children: /* @__PURE__ */ U(xt, {
|
|
1321
1367
|
resource: n,
|
|
1322
1368
|
renderSummary: i,
|
|
1323
1369
|
dependencies: o,
|
|
1324
1370
|
versionHistory: s,
|
|
1325
|
-
view:
|
|
1326
|
-
onChangeFolderClick:
|
|
1371
|
+
view: G.view,
|
|
1372
|
+
onChangeFolderClick: G.openFolderView,
|
|
1327
1373
|
folderItems: c,
|
|
1328
1374
|
selectedFolderPath: l,
|
|
1329
|
-
pendingFolderPath:
|
|
1330
|
-
onPendingFolderPathChange:
|
|
1375
|
+
pendingFolderPath: G.pendingFolderPath,
|
|
1376
|
+
onPendingFolderPathChange: G.setPendingFolderPath,
|
|
1331
1377
|
onCreateFolder: d,
|
|
1332
1378
|
getDisabledReason: f,
|
|
1333
1379
|
expandedPaths: p,
|
|
@@ -1337,38 +1383,40 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1337
1383
|
hasWriteAccess: _,
|
|
1338
1384
|
isSubmitting: v,
|
|
1339
1385
|
hasSubmitError: y,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1386
|
+
isTargetTaken: b,
|
|
1387
|
+
isTargetChecking: x,
|
|
1388
|
+
allowReplace: S,
|
|
1389
|
+
author: ee,
|
|
1390
|
+
onAuthorChange: C,
|
|
1391
|
+
rules: w,
|
|
1392
|
+
onRulesChange: T,
|
|
1393
|
+
ruleSourceOptions: E,
|
|
1394
|
+
isRulesLoading: D,
|
|
1395
|
+
hasRulesLoadError: O,
|
|
1396
|
+
labels: te,
|
|
1397
|
+
styles: M,
|
|
1398
|
+
summaryTitleClassName: N,
|
|
1399
|
+
headingClassName: P,
|
|
1400
|
+
calloutFolderNameClassName: F
|
|
1353
1401
|
})
|
|
1354
1402
|
})
|
|
1355
|
-
}), /* @__PURE__ */
|
|
1403
|
+
}), /* @__PURE__ */ U(Et, {
|
|
1356
1404
|
version: n?.version,
|
|
1357
1405
|
hasExistingPublicationInFolder: g,
|
|
1358
|
-
allowReplace:
|
|
1359
|
-
isSubmitDisabled:
|
|
1360
|
-
isSubmitLoading:
|
|
1361
|
-
onCancel:
|
|
1362
|
-
onSubmit:
|
|
1363
|
-
view:
|
|
1364
|
-
onSelectFolder:
|
|
1365
|
-
isSelectFolderDisabled:
|
|
1366
|
-
labels:
|
|
1406
|
+
allowReplace: S,
|
|
1407
|
+
isSubmitDisabled: de.isSubmitDisabled,
|
|
1408
|
+
isSubmitLoading: de.isSubmitLoading,
|
|
1409
|
+
onCancel: ue ? G.backToMain : k,
|
|
1410
|
+
onSubmit: j,
|
|
1411
|
+
view: G.view,
|
|
1412
|
+
onSelectFolder: G.selectFolder,
|
|
1413
|
+
isSelectFolderDisabled: G.pendingFolderPath == null,
|
|
1414
|
+
labels: I
|
|
1367
1415
|
})]
|
|
1368
1416
|
});
|
|
1369
1417
|
}, kt = { option: "_option_skygm_1" }, At = (e, t) => `Unpublish "${e}" from "${t}"?`, jt = (e) => `Choose which folder to unpublish "${e}" from.`, Mt = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: l, onClose: d }) => {
|
|
1370
1418
|
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = At, selectFolderMessage: y = jt } = o ?? {}, b = n.length > 1;
|
|
1371
|
-
return /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ U(R, {
|
|
1372
1420
|
open: e,
|
|
1373
1421
|
title: f,
|
|
1374
1422
|
confirmLabel: p,
|
|
@@ -1377,16 +1425,16 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1377
1425
|
isLoading: a,
|
|
1378
1426
|
isConfirmDisabled: b && r == null,
|
|
1379
1427
|
loadingStatusLabel: _,
|
|
1380
|
-
message: /* @__PURE__ */
|
|
1428
|
+
message: /* @__PURE__ */ U("span", {
|
|
1381
1429
|
className: "wrap-break-word",
|
|
1382
1430
|
children: b ? y(t) : v(t, Ce(n[0] ?? "", h))
|
|
1383
1431
|
}),
|
|
1384
1432
|
onConfirm: l,
|
|
1385
1433
|
onClose: d,
|
|
1386
|
-
children: b && /* @__PURE__ */
|
|
1434
|
+
children: b && /* @__PURE__ */ U("div", {
|
|
1387
1435
|
className: "mt-3",
|
|
1388
|
-
style:
|
|
1389
|
-
children: /* @__PURE__ */
|
|
1436
|
+
style: V({ "--ucd-option-text": c?.optionText }),
|
|
1437
|
+
children: /* @__PURE__ */ U(te, {
|
|
1390
1438
|
ariaLabel: g,
|
|
1391
1439
|
value: r ?? void 0,
|
|
1392
1440
|
onChange: i,
|
|
@@ -1395,7 +1443,7 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1395
1443
|
value: e,
|
|
1396
1444
|
label: Ce(e, h)
|
|
1397
1445
|
})),
|
|
1398
|
-
radioClassName:
|
|
1446
|
+
radioClassName: H(s, kt.option)
|
|
1399
1447
|
})
|
|
1400
1448
|
})
|
|
1401
1449
|
});
|
|
@@ -1406,42 +1454,42 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1406
1454
|
}({}), Ft = {
|
|
1407
1455
|
heading: "_heading_vk731_1",
|
|
1408
1456
|
destination: "_destination_vk731_5"
|
|
1409
|
-
}, It = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: l, changeFolderButtonRef: u, pendingDestination: p, onPendingDestinationChange: m, version: g, accessRules: v, versionHistory: x, isSubmitting: S = !1, submitError:
|
|
1410
|
-
let { saveToFolderHeading:
|
|
1411
|
-
...
|
|
1412
|
-
"--stf-heading-text":
|
|
1413
|
-
"--stf-destination-text":
|
|
1457
|
+
}, It = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: l, changeFolderButtonRef: u, pendingDestination: p, onPendingDestinationChange: m, version: g, accessRules: v, versionHistory: x, isSubmitting: S = !1, submitError: T, foldersError: D, onRetryFolders: O, panelLabels: k = {}, panelStyles: A = {}, headingClassName: j = "dial-body-semi-text", destinationClassName: N = "dial-small-semi-text" }) => {
|
|
1458
|
+
let { saveToFolderHeading: ne = "Save to folder", changeFolderLabel: P = "Change", destinationAriaLabel: F = "Destination folder", versionHeading: I = "Version", keepVersionLabel: L = "Keep version {version}", saveAsNewVersionLabel: re = "Save as new version", newVersionLabel: R = "Version", newVersionPlaceholder: z = "Enter new version", searchPlaceholder: B = "Search folders", clearSearchAriaLabel: ae = "Clear search", folderEmptyStateLabel: oe, createFolderLabel: ce, cancelCreatingFolderLabel: le, addSiblingFolderLabel: G, addChildFolderLabel: ue, createFolderEmptyNameError: de, createFolderInvalidNameError: K, createFolderDuplicateNameError: q, createFolderSameAsParentNameError: J, retryLabel: Y = "Retry" } = k, { colors: fe, folderTree: X } = A, pe = {
|
|
1459
|
+
...V({
|
|
1460
|
+
"--stf-heading-text": fe?.headingText,
|
|
1461
|
+
"--stf-destination-text": fe?.destinationText
|
|
1414
1462
|
}),
|
|
1415
|
-
...
|
|
1463
|
+
...A.cssVars
|
|
1416
1464
|
}, Z = {
|
|
1417
|
-
border:
|
|
1418
|
-
background:
|
|
1419
|
-
}, [me, Q] = a(""), he = n(), ge = n(), _e = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), ve = i.find((e) => e.key === p?.rootKey), ye = p ? p.path[p.path.length - 1] ?? ve?.label : void 0, be =
|
|
1420
|
-
if (e === Pt.ChangeFolder) return /* @__PURE__ */
|
|
1465
|
+
border: fe?.summaryBorder,
|
|
1466
|
+
background: fe?.summaryBackground
|
|
1467
|
+
}, [me, Q] = a(""), he = n(), ge = n(), _e = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), ve = i.find((e) => e.key === p?.rootKey), ye = p ? p.path[p.path.length - 1] ?? ve?.label : void 0, be = H(j, Ft.heading), xe = c?.(o);
|
|
1468
|
+
if (e === Pt.ChangeFolder) return /* @__PURE__ */ W("div", {
|
|
1421
1469
|
className: "flex flex-col gap-3",
|
|
1422
|
-
style:
|
|
1470
|
+
style: pe,
|
|
1423
1471
|
children: [
|
|
1424
|
-
/* @__PURE__ */
|
|
1472
|
+
/* @__PURE__ */ U("div", {
|
|
1425
1473
|
role: "search",
|
|
1426
|
-
children: /* @__PURE__ */
|
|
1474
|
+
children: /* @__PURE__ */ U(M, {
|
|
1427
1475
|
value: me,
|
|
1428
1476
|
onChange: (e) => Q(e ?? ""),
|
|
1429
|
-
placeholder:
|
|
1430
|
-
clearLabel:
|
|
1431
|
-
"aria-label":
|
|
1477
|
+
placeholder: B,
|
|
1478
|
+
clearLabel: ae,
|
|
1479
|
+
"aria-label": B
|
|
1432
1480
|
})
|
|
1433
1481
|
}),
|
|
1434
|
-
/* @__PURE__ */
|
|
1435
|
-
politeness:
|
|
1436
|
-
children:
|
|
1482
|
+
/* @__PURE__ */ U(w, {
|
|
1483
|
+
politeness: E.Assertive,
|
|
1484
|
+
children: D && /* @__PURE__ */ W("div", {
|
|
1437
1485
|
className: "flex flex-wrap items-center gap-2",
|
|
1438
|
-
children: [/* @__PURE__ */
|
|
1439
|
-
label:
|
|
1440
|
-
onClick:
|
|
1486
|
+
children: [/* @__PURE__ */ U(_, { text: D }), O && /* @__PURE__ */ U(C, {
|
|
1487
|
+
label: Y,
|
|
1488
|
+
onClick: O
|
|
1441
1489
|
})]
|
|
1442
1490
|
})
|
|
1443
1491
|
}),
|
|
1444
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ U(gt, {
|
|
1445
1493
|
roots: i,
|
|
1446
1494
|
destination: p,
|
|
1447
1495
|
onDestinationChange: m,
|
|
@@ -1449,20 +1497,20 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1449
1497
|
getDisabledReason: c,
|
|
1450
1498
|
searchQuery: me,
|
|
1451
1499
|
disabled: S,
|
|
1452
|
-
noResultsLabel:
|
|
1453
|
-
createFolderLabel:
|
|
1454
|
-
cancelCreatingFolderLabel:
|
|
1455
|
-
addSiblingFolderLabel:
|
|
1456
|
-
addChildFolderLabel:
|
|
1457
|
-
emptyFolderNameError:
|
|
1458
|
-
invalidFolderNameError:
|
|
1459
|
-
duplicateFolderNameError:
|
|
1460
|
-
sameAsParentFolderNameError:
|
|
1461
|
-
styles:
|
|
1500
|
+
noResultsLabel: oe,
|
|
1501
|
+
createFolderLabel: ce,
|
|
1502
|
+
cancelCreatingFolderLabel: le,
|
|
1503
|
+
addSiblingFolderLabel: G,
|
|
1504
|
+
addChildFolderLabel: ue,
|
|
1505
|
+
emptyFolderNameError: de,
|
|
1506
|
+
invalidFolderNameError: K,
|
|
1507
|
+
duplicateFolderNameError: q,
|
|
1508
|
+
sameAsParentFolderNameError: J,
|
|
1509
|
+
styles: X
|
|
1462
1510
|
}),
|
|
1463
|
-
v && ve?.hasAccessRules && !(p && v.isHiddenFor?.(p)) && /* @__PURE__ */
|
|
1511
|
+
v && ve?.hasAccessRules && !(p && v.isHiddenFor?.(p)) && /* @__PURE__ */ U("div", {
|
|
1464
1512
|
className: "mt-1",
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1513
|
+
children: /* @__PURE__ */ U(Re, {
|
|
1466
1514
|
rules: v.rules,
|
|
1467
1515
|
onRulesChange: v.onRulesChange,
|
|
1468
1516
|
sourceOptions: v.sourceOptions,
|
|
@@ -1478,36 +1526,36 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1478
1526
|
});
|
|
1479
1527
|
let $ = g ? [{
|
|
1480
1528
|
value: Nt.Keep,
|
|
1481
|
-
label:
|
|
1529
|
+
label: L.replace("{version}", g.currentVersion)
|
|
1482
1530
|
}, {
|
|
1483
1531
|
value: Nt.New,
|
|
1484
|
-
label:
|
|
1485
|
-
content: /* @__PURE__ */
|
|
1532
|
+
label: re,
|
|
1533
|
+
content: /* @__PURE__ */ U(ee, {
|
|
1486
1534
|
id: he,
|
|
1487
1535
|
value: g.newVersion,
|
|
1488
1536
|
onChange: (e) => g.onNewVersionChange(e ?? ""),
|
|
1489
1537
|
onBlur: g.onNewVersionBlur,
|
|
1490
1538
|
labelProps: {
|
|
1491
|
-
label:
|
|
1539
|
+
label: R,
|
|
1492
1540
|
required: !0
|
|
1493
1541
|
},
|
|
1494
|
-
placeholder:
|
|
1542
|
+
placeholder: z,
|
|
1495
1543
|
error: g.newVersionError,
|
|
1496
1544
|
invalid: !!g.newVersionError,
|
|
1497
1545
|
disabled: S
|
|
1498
1546
|
})
|
|
1499
1547
|
}] : [];
|
|
1500
|
-
return /* @__PURE__ */
|
|
1548
|
+
return /* @__PURE__ */ W("div", {
|
|
1501
1549
|
className: "flex flex-col gap-5",
|
|
1502
|
-
style:
|
|
1550
|
+
style: pe,
|
|
1503
1551
|
children: [
|
|
1504
|
-
t.type == null ? /* @__PURE__ */
|
|
1552
|
+
t.type == null ? /* @__PURE__ */ U(ie, {
|
|
1505
1553
|
colors: Z,
|
|
1506
|
-
children: /* @__PURE__ */
|
|
1507
|
-
className:
|
|
1554
|
+
children: /* @__PURE__ */ U("span", {
|
|
1555
|
+
className: H("truncate", be),
|
|
1508
1556
|
children: t.title
|
|
1509
1557
|
})
|
|
1510
|
-
}) : /* @__PURE__ */
|
|
1558
|
+
}) : /* @__PURE__ */ U(ie, {
|
|
1511
1559
|
item: {
|
|
1512
1560
|
type: t.type,
|
|
1513
1561
|
name: t.title,
|
|
@@ -1517,27 +1565,27 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1517
1565
|
hasVersionTag: !1,
|
|
1518
1566
|
colors: Z
|
|
1519
1567
|
}),
|
|
1520
|
-
/* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ W("section", {
|
|
1521
1569
|
className: "flex flex-col gap-2",
|
|
1522
|
-
children: [/* @__PURE__ */
|
|
1570
|
+
children: [/* @__PURE__ */ U("h2", {
|
|
1523
1571
|
className: be,
|
|
1524
|
-
children:
|
|
1525
|
-
}), /* @__PURE__ */
|
|
1572
|
+
children: ne
|
|
1573
|
+
}), /* @__PURE__ */ W("div", {
|
|
1526
1574
|
className: "flex min-w-0 items-center gap-2",
|
|
1527
|
-
children: [/* @__PURE__ */
|
|
1575
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1528
1576
|
role: "group",
|
|
1529
|
-
"aria-label":
|
|
1577
|
+
"aria-label": F,
|
|
1530
1578
|
"aria-describedby": xe ? ge : void 0,
|
|
1531
1579
|
className: "min-w-0 flex-1",
|
|
1532
|
-
children: /* @__PURE__ */
|
|
1580
|
+
children: /* @__PURE__ */ U(y, {
|
|
1533
1581
|
name: _e.join(" / "),
|
|
1534
|
-
nameClassName:
|
|
1582
|
+
nameClassName: H(N, Ft.destination)
|
|
1535
1583
|
})
|
|
1536
|
-
}), /* @__PURE__ */
|
|
1584
|
+
}), /* @__PURE__ */ U(b, {
|
|
1537
1585
|
ref: u,
|
|
1538
1586
|
size: h.Small,
|
|
1539
|
-
label:
|
|
1540
|
-
iconBefore: /* @__PURE__ */
|
|
1587
|
+
label: P,
|
|
1588
|
+
iconBefore: /* @__PURE__ */ U(se, {
|
|
1541
1589
|
size: d.SM,
|
|
1542
1590
|
stroke: f,
|
|
1543
1591
|
"aria-hidden": !0
|
|
@@ -1547,28 +1595,28 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1547
1595
|
})]
|
|
1548
1596
|
})]
|
|
1549
1597
|
}),
|
|
1550
|
-
g && /* @__PURE__ */
|
|
1598
|
+
g && /* @__PURE__ */ W("section", {
|
|
1551
1599
|
className: "flex flex-col gap-2",
|
|
1552
|
-
children: [/* @__PURE__ */
|
|
1600
|
+
children: [/* @__PURE__ */ U("h2", {
|
|
1553
1601
|
className: be,
|
|
1554
|
-
children:
|
|
1555
|
-
}), /* @__PURE__ */
|
|
1556
|
-
ariaLabel:
|
|
1602
|
+
children: I
|
|
1603
|
+
}), /* @__PURE__ */ U(te, {
|
|
1604
|
+
ariaLabel: I,
|
|
1557
1605
|
value: g.versionMode,
|
|
1558
1606
|
onChange: (e) => g.onVersionModeChange(e),
|
|
1559
1607
|
items: $,
|
|
1560
1608
|
disabled: S
|
|
1561
1609
|
})]
|
|
1562
1610
|
}),
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
politeness:
|
|
1565
|
-
children: [xe && /* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ W(w, {
|
|
1612
|
+
politeness: E.Assertive,
|
|
1613
|
+
children: [xe && /* @__PURE__ */ U(_, {
|
|
1566
1614
|
id: ge,
|
|
1567
1615
|
text: xe
|
|
1568
|
-
}),
|
|
1616
|
+
}), T && /* @__PURE__ */ U(_, { text: T })]
|
|
1569
1617
|
}),
|
|
1570
|
-
x != null && /* @__PURE__ */
|
|
1571
|
-
headingClassName:
|
|
1618
|
+
x != null && /* @__PURE__ */ U(Ue, {
|
|
1619
|
+
headingClassName: j,
|
|
1572
1620
|
...x
|
|
1573
1621
|
})
|
|
1574
1622
|
]
|
|
@@ -1581,88 +1629,88 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1581
1629
|
content: "_content_1ie8s_23",
|
|
1582
1630
|
title: "_title_1ie8s_28"
|
|
1583
1631
|
}, Rt = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: l, titleClassName: u = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ...g }) => {
|
|
1584
|
-
let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: w = "Select" } = c,
|
|
1632
|
+
let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: w = "Select" } = c, T = V({
|
|
1585
1633
|
"--sstf-backdrop-bg": l?.backdropBackground,
|
|
1586
1634
|
"--sstf-panel-bg": l?.panelBackground,
|
|
1587
1635
|
"--sstf-panel-border": l?.panelBorder,
|
|
1588
1636
|
"--sstf-divider-border": l?.dividerBorder,
|
|
1589
1637
|
"--sstf-scrollbar-thumb": l?.scrollbarThumb,
|
|
1590
1638
|
"--sstf-title-text": l?.titleText
|
|
1591
|
-
}), [
|
|
1639
|
+
}), [E, O] = a(Pt.Main), [k, A] = a(f), te = i(null), M = i(null);
|
|
1592
1640
|
t(() => {
|
|
1593
|
-
e &&
|
|
1641
|
+
e && O(Pt.Main);
|
|
1594
1642
|
}, [e]);
|
|
1595
|
-
let
|
|
1643
|
+
let N = i(E);
|
|
1596
1644
|
t(() => {
|
|
1597
|
-
|
|
1598
|
-
}, [
|
|
1599
|
-
let
|
|
1645
|
+
N.current !== E && (N.current = E, E === Pt.ChangeFolder ? te.current?.focus({ preventScroll: !0 }) : M.current?.focus({ preventScroll: !0 }));
|
|
1646
|
+
}, [E]);
|
|
1647
|
+
let P = i(e);
|
|
1600
1648
|
t(() => {
|
|
1601
|
-
let t =
|
|
1602
|
-
|
|
1649
|
+
let t = P.current;
|
|
1650
|
+
P.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1603
1651
|
}, [e, s]);
|
|
1604
|
-
let
|
|
1605
|
-
|
|
1606
|
-
},
|
|
1607
|
-
|
|
1608
|
-
},
|
|
1609
|
-
h?.(f),
|
|
1610
|
-
},
|
|
1611
|
-
|
|
1652
|
+
let F = E === Pt.ChangeFolder, L = (e) => {
|
|
1653
|
+
A(e), h?.(e);
|
|
1654
|
+
}, re = () => {
|
|
1655
|
+
L(f), O(Pt.ChangeFolder);
|
|
1656
|
+
}, R = () => {
|
|
1657
|
+
h?.(f), O(Pt.Main);
|
|
1658
|
+
}, z = () => {
|
|
1659
|
+
k && p(k), O(Pt.Main);
|
|
1612
1660
|
};
|
|
1613
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ W(ne, {
|
|
1614
1662
|
open: e,
|
|
1615
1663
|
onClose: n,
|
|
1616
|
-
header: /* @__PURE__ */
|
|
1617
|
-
ref:
|
|
1664
|
+
header: /* @__PURE__ */ U("span", {
|
|
1665
|
+
ref: te,
|
|
1618
1666
|
tabIndex: -1,
|
|
1619
|
-
className:
|
|
1620
|
-
children:
|
|
1667
|
+
className: H("block truncate outline-none", u, Lt.title),
|
|
1668
|
+
children: F ? v : _
|
|
1621
1669
|
}),
|
|
1622
1670
|
ariaLabel: _,
|
|
1623
|
-
onBack:
|
|
1671
|
+
onBack: F ? R : void 0,
|
|
1624
1672
|
backAriaLabel: x,
|
|
1625
1673
|
backDisabled: m,
|
|
1626
1674
|
closeAriaLabel: y,
|
|
1627
1675
|
closeDisabled: m,
|
|
1628
|
-
style:
|
|
1629
|
-
overlayStyle:
|
|
1630
|
-
className:
|
|
1676
|
+
style: T,
|
|
1677
|
+
overlayStyle: T,
|
|
1678
|
+
className: H(Lt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1631
1679
|
overlayClassName: Lt.backdrop,
|
|
1632
|
-
headerClassName:
|
|
1680
|
+
headerClassName: H("px-[22px]", Lt.divider),
|
|
1633
1681
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1634
|
-
children: [/* @__PURE__ */
|
|
1635
|
-
className:
|
|
1636
|
-
children: /* @__PURE__ */
|
|
1682
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1683
|
+
className: H("min-h-0 flex-1 overflow-y-auto p-[22px]", Lt.content),
|
|
1684
|
+
children: /* @__PURE__ */ U(It, {
|
|
1637
1685
|
...g,
|
|
1638
|
-
view:
|
|
1686
|
+
view: E,
|
|
1639
1687
|
destination: f,
|
|
1640
1688
|
onDestinationChange: p,
|
|
1641
1689
|
isSubmitting: m,
|
|
1642
|
-
onChangeFolderClick:
|
|
1643
|
-
changeFolderButtonRef:
|
|
1644
|
-
pendingDestination:
|
|
1645
|
-
onPendingDestinationChange:
|
|
1690
|
+
onChangeFolderClick: re,
|
|
1691
|
+
changeFolderButtonRef: M,
|
|
1692
|
+
pendingDestination: k,
|
|
1693
|
+
onPendingDestinationChange: L
|
|
1646
1694
|
})
|
|
1647
|
-
}), /* @__PURE__ */
|
|
1648
|
-
className:
|
|
1649
|
-
children: [/* @__PURE__ */
|
|
1695
|
+
}), /* @__PURE__ */ W("div", {
|
|
1696
|
+
className: H("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Lt.footer),
|
|
1697
|
+
children: [/* @__PURE__ */ U(b, {
|
|
1650
1698
|
label: S,
|
|
1651
1699
|
className: "mobile:flex-1",
|
|
1652
1700
|
disabled: m,
|
|
1653
|
-
onClick:
|
|
1654
|
-
}),
|
|
1701
|
+
onClick: F ? R : n
|
|
1702
|
+
}), F ? /* @__PURE__ */ U(D, {
|
|
1655
1703
|
label: w,
|
|
1656
1704
|
className: "mobile:flex-1",
|
|
1657
|
-
disabled:
|
|
1658
|
-
onClick:
|
|
1659
|
-
}) : /* @__PURE__ */
|
|
1705
|
+
disabled: k == null,
|
|
1706
|
+
onClick: z
|
|
1707
|
+
}) : /* @__PURE__ */ U(j, {
|
|
1660
1708
|
label: m ? C : ee,
|
|
1661
1709
|
className: "mobile:flex-1",
|
|
1662
1710
|
disabled: o || m,
|
|
1663
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1711
|
+
iconBefore: m ? /* @__PURE__ */ U("span", {
|
|
1664
1712
|
"aria-hidden": !0,
|
|
1665
|
-
children: /* @__PURE__ */
|
|
1713
|
+
children: /* @__PURE__ */ U(I, { size: d.SM })
|
|
1666
1714
|
}) : void 0,
|
|
1667
1715
|
onClick: r
|
|
1668
1716
|
})]
|
|
@@ -1670,4 +1718,4 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1670
1718
|
});
|
|
1671
1719
|
};
|
|
1672
1720
|
//#endregion
|
|
1673
|
-
export { We as PUBLISH_PANEL_CLASS,
|
|
1721
|
+
export { We as PUBLISH_PANEL_CLASS, K as PublicationRuleFunction, Pe as PublishAccessRuleEditor, Re as PublishAccessRules, q as PublishCalloutKind, $e as PublishDependenciesList, J as PublishDependencyType, gt as PublishFoldersTree, Et as PublishFooter, tt as PublishHistoryList, xt as PublishPanel, Q as PublishPanelView, It as SaveToFolderPanel, Pt as SaveToFolderView, Nt as SaveVersionMode, Ot as StandalonePublishPanel, Rt as StandaloneSaveToFolderPanel, Mt as UnpublishConfirmationDialog, Ue as VersionHistorySection, ze as VersionHistoryStatus, xe as collectFolderKeys, Y as derivePublishState, ge as filterFolderTree, X as formatPublishedDate, Se as fromFolderPathKey, Oe as getSiblingFolderNames, De as getUniqueFolderName, be as mergeFolderPaths, ve as sortFolderTree, we as toDialFileTree, $ as toFolderPathKey, me as usePublishFlow, he as usePublishFolderView, Ee as validateFolderName };
|