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