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