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