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