@epam/ai-dial-publish-panel 1.4.0-dev.12 → 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/PublishFoldersTree/PublishFoldersTree.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +11 -0
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +3 -0
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -1
- package/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 +903 -792
- 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-folders-tree.d.ts +2 -0
- package/models/publish-folders-tree.d.ts.map +1 -1
- package/models/publish-panel-styles.d.ts +3 -0
- package/models/publish-panel-styles.d.ts.map +1 -1
- package/models/save-to-folder-panel.d.ts +2 -0
- package/models/save-to-folder-panel.d.ts.map +1 -1
- package/package.json +2 -2
- package/utils/publish-folder-tree.d.ts +4 -2
- package/utils/publish-folder-tree.d.ts.map +1 -1
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,144 +100,144 @@ 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
154
|
}({}), fe = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
|
|
153
|
-
let [i, o] = a(
|
|
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
|
-
},
|
|
196
|
-
let t =
|
|
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) => {
|
|
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
|
-
}),
|
|
205
|
-
let
|
|
206
|
-
return
|
|
207
|
-
},
|
|
206
|
+
}), xe = /[/\\:;,={}&"]/, Se = (e, t, n, r) => {
|
|
207
|
+
let i = e.trim();
|
|
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
|
-
let n =
|
|
217
|
+
let n = $(t), r = (e) => {
|
|
216
218
|
for (let t of e) {
|
|
217
|
-
if (
|
|
219
|
+
if ($(t.path) === n) return t;
|
|
218
220
|
let e = t.children ? r(t.children) : void 0;
|
|
219
221
|
if (e) return 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
|
-
!
|
|
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
302
|
options: ge,
|
|
301
|
-
value:
|
|
302
|
-
onChange:
|
|
303
|
-
placeholder:
|
|
304
|
-
searchable: e.length >
|
|
305
|
-
searchPlaceholder:
|
|
306
|
-
onSearchQueryChange:
|
|
303
|
+
value: B,
|
|
304
|
+
onChange: be,
|
|
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:
|
|
312
|
-
error:
|
|
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:
|
|
316
|
+
/* @__PURE__ */ L(k, {
|
|
317
|
+
labelProps: { label: _ },
|
|
318
|
+
id: F,
|
|
317
319
|
options: _e,
|
|
318
|
-
value:
|
|
319
|
-
onChange:
|
|
320
|
-
placeholder:
|
|
320
|
+
value: H,
|
|
321
|
+
onChange: xe,
|
|
322
|
+
placeholder: _,
|
|
321
323
|
disabled: l,
|
|
322
|
-
open:
|
|
323
|
-
onOpenChange:
|
|
324
|
+
open: Z,
|
|
325
|
+
onOpenChange: fe,
|
|
324
326
|
fieldClassName: he,
|
|
325
|
-
invalid:
|
|
326
|
-
error:
|
|
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
|
-
onChange: (e) =>
|
|
334
|
-
error:
|
|
335
|
+
onChange: (e) => q(e ?? ""),
|
|
336
|
+
error: we ? D : void 0,
|
|
335
337
|
disabled: l
|
|
336
|
-
}) : /* @__PURE__ */
|
|
337
|
-
id:
|
|
338
|
-
labelProps: { label:
|
|
339
|
-
placeholder:
|
|
340
|
-
caption:
|
|
341
|
-
error:
|
|
342
|
-
invalid:
|
|
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
|
-
},
|
|
406
|
-
|
|
405
|
+
let fe = () => {
|
|
406
|
+
X.current = document.activeElement, de(!0);
|
|
407
|
+
}, Q = () => {
|
|
408
|
+
de(!1), X.current?.focus?.();
|
|
409
|
+
}, pe = (t) => {
|
|
410
|
+
r([...e, t]), Y(H), Q();
|
|
407
411
|
}, me = (t) => {
|
|
408
|
-
r(
|
|
409
|
-
}, Q = (t) => {
|
|
410
|
-
r(e.filter((e, n) => n !== t)), J(W);
|
|
412
|
+
r(e.filter((e, n) => n !== t)), Y(ue);
|
|
411
413
|
}, he = () => {
|
|
412
|
-
r([]),
|
|
414
|
+
r([]), Y(U);
|
|
413
415
|
}, ge = {
|
|
414
|
-
equal:
|
|
415
|
-
contain:
|
|
416
|
+
equal: ae,
|
|
417
|
+
contain: se,
|
|
416
418
|
regex: ce
|
|
417
|
-
}, _e = e.length >= m,
|
|
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:
|
|
439
|
+
label: N,
|
|
438
440
|
onClick: he,
|
|
439
441
|
disabled: l
|
|
440
442
|
})]
|
|
441
443
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
className:
|
|
444
|
-
children:
|
|
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 && !
|
|
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
|
-
|
|
502
|
+
q && /* @__PURE__ */ L(Ae, {
|
|
501
503
|
sourceOptions: o,
|
|
502
|
-
onSave:
|
|
503
|
-
onCancel:
|
|
504
|
+
onSave: pe,
|
|
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
|
-
_e && /* @__PURE__ */
|
|
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,491 +639,505 @@ 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 =
|
|
616
|
-
i != null && r.length !== 0 && n.get(i)?.add(
|
|
710
|
+
let [t, ...r] = e.split("/"), i = Xe(t);
|
|
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
|
|
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
|
-
|
|
770
|
+
invalid: te,
|
|
771
|
+
duplicate: ne,
|
|
772
|
+
sameAsParent: C
|
|
773
|
+
}, Te = (e) => j.includes($(e)) ? void 0 : e.at(-1), Ee = (e) => {
|
|
678
774
|
if (!c) return !0;
|
|
679
|
-
let t =
|
|
775
|
+
let t = Qe(e), n = c.find((e) => e.key === t?.rootKey);
|
|
680
776
|
return n != null && n.canCreateFolders !== !1;
|
|
681
|
-
},
|
|
682
|
-
if (!c) return
|
|
683
|
-
if (
|
|
777
|
+
}, De = (() => {
|
|
778
|
+
if (!c) return M ?? [];
|
|
779
|
+
if (M && Ee(M)) return M;
|
|
684
780
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
685
|
-
return e ?
|
|
781
|
+
return e ? Ze({
|
|
686
782
|
rootKey: e.key,
|
|
687
783
|
path: []
|
|
688
784
|
}) : void 0;
|
|
689
|
-
})(),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
785
|
+
})(), Oe = (e) => {
|
|
786
|
+
let t = Y && Se(q, [], xe) == null, n = Te(e);
|
|
787
|
+
return Ce(t ? q : x, [...we(A, e), ...n ? [n] : []]);
|
|
788
|
+
}, [ke, Ae] = a(null);
|
|
789
|
+
ke != null && !se?.has($(ke)) && (Ae(null), V(ke), W(Oe(ke)));
|
|
790
|
+
let je = (e) => {
|
|
791
|
+
V(null), Ae(e), G.current = null, K.current = !1;
|
|
792
|
+
let t = $(e);
|
|
793
|
+
t && ce(new Set(ae).add(t));
|
|
794
|
+
}, Me = () => {
|
|
795
|
+
De && je(De);
|
|
796
|
+
}, Ne = (e) => {
|
|
797
|
+
let t = ve(e.path);
|
|
798
|
+
if (!Ee(t)) return [];
|
|
700
799
|
let n = [{
|
|
701
800
|
key: "add-child",
|
|
702
|
-
label:
|
|
703
|
-
icon: /* @__PURE__ */
|
|
801
|
+
label: b,
|
|
802
|
+
icon: /* @__PURE__ */ L(le, {
|
|
704
803
|
size: u.SM,
|
|
705
804
|
"aria-hidden": !0,
|
|
706
805
|
stroke: d
|
|
707
806
|
}),
|
|
708
|
-
onClick: () =>
|
|
807
|
+
onClick: () => je(t)
|
|
709
808
|
}];
|
|
710
|
-
return
|
|
809
|
+
return j.includes(e.path) || n.push({
|
|
711
810
|
key: "add-sibling",
|
|
712
|
-
label:
|
|
713
|
-
icon: /* @__PURE__ */
|
|
811
|
+
label: y,
|
|
812
|
+
icon: /* @__PURE__ */ L(B, {
|
|
714
813
|
size: u.SM,
|
|
715
814
|
"aria-hidden": !0,
|
|
716
815
|
stroke: d
|
|
717
816
|
}),
|
|
718
|
-
onClick: () =>
|
|
817
|
+
onClick: () => je(t.slice(0, -1))
|
|
719
818
|
}), n;
|
|
720
|
-
},
|
|
721
|
-
if (!
|
|
722
|
-
let t =
|
|
819
|
+
}, Pe = (e) => {
|
|
820
|
+
if (!z) return null;
|
|
821
|
+
let t = Se(e, we(ie.current, z), xe, Te(z));
|
|
723
822
|
return G.current = t, t;
|
|
724
|
-
},
|
|
725
|
-
if (!
|
|
823
|
+
}, Fe = (e) => {
|
|
824
|
+
if (!z || K.current) return;
|
|
726
825
|
let t = e.trim(), n = G.current;
|
|
727
|
-
if (!(
|
|
728
|
-
let e = c ?
|
|
729
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
826
|
+
if (!(Pe(e) ?? n)) {
|
|
827
|
+
let e = c ? Qe(z) : void 0;
|
|
828
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(z, t), N([...z, t]);
|
|
730
829
|
}
|
|
731
|
-
|
|
732
|
-
},
|
|
733
|
-
return /* @__PURE__ */
|
|
734
|
-
style:
|
|
735
|
-
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),
|
|
736
835
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
className:
|
|
739
|
-
children: /* @__PURE__ */
|
|
740
|
-
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,
|
|
741
840
|
showFiles: !1,
|
|
742
|
-
selectedPath:
|
|
743
|
-
expandedPaths:
|
|
744
|
-
onExpandedPathsChange:
|
|
745
|
-
loadingPaths:
|
|
841
|
+
selectedPath: M == null ? void 0 : $(M),
|
|
842
|
+
expandedPaths: pe,
|
|
843
|
+
onExpandedPathsChange: ce,
|
|
844
|
+
loadingPaths: se,
|
|
746
845
|
onItemClick: (e) => {
|
|
747
|
-
let t =
|
|
748
|
-
|
|
846
|
+
let t = M != null && $(M) === e.path;
|
|
847
|
+
N(t ? void 0 : ve(e.path));
|
|
749
848
|
},
|
|
750
|
-
getContextMenuItems:
|
|
751
|
-
createdFolderPath:
|
|
752
|
-
newFolderDefaultName:
|
|
753
|
-
onCreateFolderSave:
|
|
754
|
-
onCreateFolderCancel:
|
|
755
|
-
onRenameValidate: (e) =>
|
|
756
|
-
searchQuery:
|
|
757
|
-
emptyStateTitle:
|
|
849
|
+
getContextMenuItems: Ne,
|
|
850
|
+
createdFolderPath: ye,
|
|
851
|
+
newFolderDefaultName: U,
|
|
852
|
+
onCreateFolderSave: Fe,
|
|
853
|
+
onCreateFolderCancel: Ie,
|
|
854
|
+
onRenameValidate: (e) => Pe(e),
|
|
855
|
+
searchQuery: X ? q : void 0,
|
|
856
|
+
emptyStateTitle: X ? ee.replace("{query}", q) : void 0
|
|
758
857
|
})
|
|
759
858
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
className:
|
|
859
|
+
/* @__PURE__ */ L("div", {
|
|
860
|
+
className: I("my-2 h-px", it.divider),
|
|
762
861
|
"aria-hidden": !0
|
|
763
862
|
}),
|
|
764
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ R("div", {
|
|
765
864
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
766
|
-
children: [/* @__PURE__ */
|
|
767
|
-
onClick:
|
|
768
|
-
label:
|
|
769
|
-
iconBefore: /* @__PURE__ */
|
|
865
|
+
children: [/* @__PURE__ */ L(v, {
|
|
866
|
+
onClick: Me,
|
|
867
|
+
label: g,
|
|
868
|
+
iconBefore: /* @__PURE__ */ L(B, {
|
|
770
869
|
size: u.SM,
|
|
771
870
|
"aria-hidden": !0,
|
|
772
871
|
stroke: d
|
|
773
872
|
}),
|
|
774
|
-
disabled: h || de || !
|
|
775
|
-
}), de && /* @__PURE__ */
|
|
776
|
-
label:
|
|
777
|
-
onClick:
|
|
873
|
+
disabled: h || de || !De
|
|
874
|
+
}), de && /* @__PURE__ */ L(v, {
|
|
875
|
+
label: _,
|
|
876
|
+
onClick: Ie,
|
|
778
877
|
disabled: h,
|
|
779
|
-
[
|
|
878
|
+
[at]: ""
|
|
780
879
|
})]
|
|
781
880
|
})
|
|
782
881
|
]
|
|
783
882
|
});
|
|
784
|
-
},
|
|
883
|
+
}, lt = {
|
|
785
884
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
786
885
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
787
886
|
destination: "_destination_zj3gd_9"
|
|
788
|
-
},
|
|
789
|
-
let { colors:
|
|
790
|
-
...
|
|
791
|
-
"--pp-summary-title-text":
|
|
792
|
-
"--pp-heading-text":
|
|
793
|
-
"--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
|
|
794
893
|
}),
|
|
795
|
-
...
|
|
796
|
-
},
|
|
797
|
-
border:
|
|
798
|
-
background:
|
|
799
|
-
}, { folderLabel:
|
|
800
|
-
|
|
801
|
-
},
|
|
894
|
+
...ue.cssVars
|
|
895
|
+
}, Y = {
|
|
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);
|
|
802
901
|
t(() => {
|
|
803
|
-
|
|
902
|
+
Ue.current !== e && (Ue.current = e, e === Z.ChangeFolder ? Ve.current?.focus({ preventScroll: !0 }) : Be.current?.focus({ preventScroll: !0 }));
|
|
804
903
|
}, [e]);
|
|
805
|
-
let
|
|
806
|
-
hasSelectedFolder:
|
|
807
|
-
hasExistingPublicationInFolder:
|
|
808
|
-
hasWriteAccess:
|
|
809
|
-
isSubmitting:
|
|
810
|
-
hasSubmitError:
|
|
811
|
-
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
|
|
812
911
|
}), [
|
|
813
|
-
|
|
912
|
+
We,
|
|
913
|
+
ne,
|
|
814
914
|
C,
|
|
815
915
|
E,
|
|
816
916
|
D,
|
|
817
|
-
O
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
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),
|
|
821
920
|
children: s?.title
|
|
822
921
|
});
|
|
823
|
-
if (e ===
|
|
824
|
-
ref:
|
|
922
|
+
if (e === Z.ChangeFolder) return /* @__PURE__ */ R("div", {
|
|
923
|
+
ref: Ve,
|
|
825
924
|
tabIndex: -1,
|
|
826
925
|
role: "group",
|
|
827
|
-
"aria-label":
|
|
828
|
-
className:
|
|
829
|
-
style:
|
|
830
|
-
children: [/* @__PURE__ */
|
|
926
|
+
"aria-label": X,
|
|
927
|
+
className: I("flex flex-col gap-3 outline-none", Fe.panel),
|
|
928
|
+
style: J,
|
|
929
|
+
children: [/* @__PURE__ */ L("div", {
|
|
831
930
|
role: "search",
|
|
832
|
-
children: /* @__PURE__ */
|
|
833
|
-
value:
|
|
834
|
-
onChange:
|
|
835
|
-
placeholder:
|
|
836
|
-
clearLabel:
|
|
837
|
-
"aria-label":
|
|
931
|
+
children: /* @__PURE__ */ L(re, {
|
|
932
|
+
value: Le,
|
|
933
|
+
onChange: He,
|
|
934
|
+
placeholder: Oe,
|
|
935
|
+
clearLabel: ke,
|
|
936
|
+
"aria-label": Oe
|
|
838
937
|
})
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
-
items:
|
|
841
|
-
selectedPath:
|
|
842
|
-
onSelectedPathChange:
|
|
843
|
-
onCreateFolder:
|
|
844
|
-
expandedPaths:
|
|
845
|
-
onExpandedPathsChange:
|
|
846
|
-
loadingPaths:
|
|
847
|
-
searchQuery:
|
|
848
|
-
disabled:
|
|
849
|
-
noResultsLabel:
|
|
850
|
-
addSiblingFolderLabel:
|
|
851
|
-
addChildFolderLabel:
|
|
852
|
-
cancelCreatingFolderLabel:
|
|
853
|
-
emptyFolderNameError:
|
|
854
|
-
invalidFolderNameError:
|
|
855
|
-
duplicateFolderNameError:
|
|
856
|
-
|
|
857
|
-
|
|
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
|
|
858
958
|
})]
|
|
859
959
|
});
|
|
860
|
-
let
|
|
861
|
-
return /* @__PURE__ */
|
|
862
|
-
className:
|
|
863
|
-
style:
|
|
864
|
-
children: [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
/* @__PURE__ */ z("h2", {
|
|
878
|
-
className: L("mb-2", ce, Ye.sectionHeading),
|
|
879
|
-
children: J
|
|
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
|
|
880
977
|
}),
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
className:
|
|
892
|
-
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
|
+
})
|
|
893
1022
|
})
|
|
894
|
-
}),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
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
|
|
919
1059
|
})
|
|
920
1060
|
})
|
|
921
|
-
}),
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
placeholder: $,
|
|
928
|
-
caption: Oe,
|
|
929
|
-
value: j,
|
|
930
|
-
onChange: (e) => M(e ?? ""),
|
|
931
|
-
maxLength: Xe,
|
|
932
|
-
disabled: D
|
|
933
|
-
})
|
|
934
|
-
}),
|
|
935
|
-
N != null && /* @__PURE__ */ z("div", {
|
|
936
|
-
className: "mt-4",
|
|
937
|
-
children: /* @__PURE__ */ z(c, {
|
|
938
|
-
labelProps: { label: ke },
|
|
939
|
-
caption: je,
|
|
940
|
-
isSelected: te,
|
|
941
|
-
onChange: N,
|
|
942
|
-
disabled: D
|
|
943
|
-
})
|
|
944
|
-
}),
|
|
945
|
-
/* @__PURE__ */ z("div", {
|
|
946
|
-
className: "mt-4",
|
|
947
|
-
children: /* @__PURE__ */ z(Ae, {
|
|
948
|
-
rules: P,
|
|
949
|
-
onRulesChange: I,
|
|
950
|
-
sourceOptions: R,
|
|
951
|
-
folderName: ze ? Ve : void 0,
|
|
952
|
-
disabled: D,
|
|
953
|
-
isLoading: re,
|
|
954
|
-
hasLoadError: ae,
|
|
955
|
-
labels: we,
|
|
956
|
-
styles: K
|
|
957
|
-
})
|
|
1061
|
+
] }),
|
|
1062
|
+
f != null && /* @__PURE__ */ L(Ge, {
|
|
1063
|
+
dependencies: f,
|
|
1064
|
+
labels: De,
|
|
1065
|
+
headingClassName: B,
|
|
1066
|
+
styles: de
|
|
958
1067
|
})
|
|
959
|
-
]
|
|
1068
|
+
]
|
|
960
1069
|
});
|
|
961
|
-
},
|
|
1070
|
+
}, ft = (e) => e === W.ReplaceWarning ? E.Warning : E.Error, pt = (e, t, n) => {
|
|
962
1071
|
let [r, i, ...a] = e.split("{folder}");
|
|
963
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
1072
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ R(ce, { children: [
|
|
964
1073
|
r,
|
|
965
|
-
/* @__PURE__ */
|
|
1074
|
+
/* @__PURE__ */ L("strong", {
|
|
966
1075
|
className: n,
|
|
967
1076
|
children: t
|
|
968
1077
|
}),
|
|
969
1078
|
i
|
|
970
1079
|
] });
|
|
971
|
-
},
|
|
972
|
-
let p =
|
|
973
|
-
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", {
|
|
974
1083
|
style: p,
|
|
975
|
-
className:
|
|
976
|
-
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, {
|
|
977
1086
|
label: m,
|
|
978
1087
|
className: "mobile:flex-1",
|
|
979
1088
|
disabled: i,
|
|
980
1089
|
onClick: a
|
|
981
|
-
}),
|
|
982
|
-
label:
|
|
1090
|
+
}), b ? /* @__PURE__ */ L(C, {
|
|
1091
|
+
label: y,
|
|
983
1092
|
className: "mobile:flex-1",
|
|
984
1093
|
disabled: l,
|
|
985
1094
|
onClick: c
|
|
986
|
-
}) : /* @__PURE__ */
|
|
987
|
-
label:
|
|
1095
|
+
}) : /* @__PURE__ */ L(C, {
|
|
1096
|
+
label: x,
|
|
988
1097
|
className: "mobile:flex-1",
|
|
989
1098
|
disabled: r,
|
|
990
|
-
iconBefore: i ? /* @__PURE__ */
|
|
1099
|
+
iconBefore: i ? /* @__PURE__ */ L("span", {
|
|
991
1100
|
"aria-hidden": !0,
|
|
992
|
-
children: /* @__PURE__ */
|
|
1101
|
+
children: /* @__PURE__ */ L(ie, { size: u.SM })
|
|
993
1102
|
}) : void 0,
|
|
994
1103
|
onClick: o
|
|
995
1104
|
})]
|
|
996
1105
|
});
|
|
997
|
-
},
|
|
1106
|
+
}, _t = {
|
|
998
1107
|
backdrop: "_backdrop_16jmd_6",
|
|
999
1108
|
panel: "_panel_16jmd_10",
|
|
1000
1109
|
divider: "_divider_16jmd_15",
|
|
1001
1110
|
content: "_content_16jmd_19",
|
|
1002
1111
|
title: "_title_16jmd_24"
|
|
1003
|
-
},
|
|
1004
|
-
let
|
|
1005
|
-
"--spp-backdrop-bg":
|
|
1006
|
-
"--spp-panel-bg":
|
|
1007
|
-
"--spp-panel-border":
|
|
1008
|
-
"--spp-divider-border":
|
|
1009
|
-
"--spp-scrollbar-thumb":
|
|
1010
|
-
"--spp-title-text":
|
|
1011
|
-
}), [
|
|
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({
|
|
1012
1121
|
isOpen: e,
|
|
1013
|
-
selectedFolderPath:
|
|
1014
|
-
onSelectedFolderPathChange:
|
|
1015
|
-
}), H = V.view ===
|
|
1016
|
-
hasSelectedFolder:
|
|
1017
|
-
hasExistingPublicationInFolder:
|
|
1018
|
-
hasWriteAccess:
|
|
1019
|
-
isSubmitting:
|
|
1020
|
-
hasSubmitError:
|
|
1021
|
-
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
|
|
1022
1131
|
}), [
|
|
1023
|
-
|
|
1024
|
-
p,
|
|
1132
|
+
c,
|
|
1025
1133
|
m,
|
|
1026
1134
|
h,
|
|
1027
1135
|
g,
|
|
1028
|
-
_
|
|
1136
|
+
_,
|
|
1137
|
+
v
|
|
1029
1138
|
]);
|
|
1030
1139
|
return t(() => {
|
|
1031
|
-
let t =
|
|
1140
|
+
let t = F?.closest("[role=\"dialog\"]");
|
|
1032
1141
|
if (!e || !t) return;
|
|
1033
1142
|
let n = () => t.focus({ preventScroll: !0 });
|
|
1034
1143
|
n();
|
|
@@ -1038,224 +1147,226 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1038
1147
|
document.addEventListener("focusin", r);
|
|
1039
1148
|
let i = requestAnimationFrame(() => {
|
|
1040
1149
|
document.removeEventListener("focusin", r);
|
|
1041
|
-
}), a =
|
|
1150
|
+
}), a = w?.current;
|
|
1042
1151
|
return () => {
|
|
1043
1152
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
1044
1153
|
};
|
|
1045
1154
|
}, [
|
|
1046
1155
|
e,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
]), /* @__PURE__ */
|
|
1156
|
+
F,
|
|
1157
|
+
w
|
|
1158
|
+
]), /* @__PURE__ */ R(A, {
|
|
1050
1159
|
open: e,
|
|
1051
|
-
onClose:
|
|
1052
|
-
header: /* @__PURE__ */
|
|
1053
|
-
className:
|
|
1054
|
-
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
|
|
1055
1164
|
}),
|
|
1056
|
-
ariaLabel:
|
|
1165
|
+
ariaLabel: le,
|
|
1057
1166
|
onBack: H ? V.backToMain : void 0,
|
|
1058
|
-
backAriaLabel:
|
|
1059
|
-
backDisabled:
|
|
1060
|
-
closeAriaLabel:
|
|
1061
|
-
closeDisabled:
|
|
1062
|
-
style:
|
|
1063
|
-
overlayStyle:
|
|
1064
|
-
className:
|
|
1065
|
-
overlayClassName:
|
|
1066
|
-
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),
|
|
1067
1176
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1069
|
-
ref:
|
|
1070
|
-
className:
|
|
1071
|
-
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", {
|
|
1072
1181
|
className: "p-[22px]",
|
|
1073
|
-
children: /* @__PURE__ */
|
|
1182
|
+
children: /* @__PURE__ */ L(dt, {
|
|
1074
1183
|
resource: n,
|
|
1075
1184
|
renderSummary: i,
|
|
1185
|
+
dependencies: o,
|
|
1076
1186
|
view: V.view,
|
|
1077
1187
|
onChangeFolderClick: V.openFolderView,
|
|
1078
|
-
folderItems:
|
|
1079
|
-
selectedFolderPath:
|
|
1188
|
+
folderItems: s,
|
|
1189
|
+
selectedFolderPath: c,
|
|
1080
1190
|
pendingFolderPath: V.pendingFolderPath,
|
|
1081
1191
|
onPendingFolderPathChange: V.setPendingFolderPath,
|
|
1082
|
-
onCreateFolder:
|
|
1083
|
-
expandedPaths:
|
|
1084
|
-
onExpandedPathsChange:
|
|
1085
|
-
loadingPaths:
|
|
1086
|
-
hasExistingPublicationInFolder:
|
|
1087
|
-
hasWriteAccess:
|
|
1088
|
-
isSubmitting:
|
|
1089
|
-
hasSubmitError:
|
|
1090
|
-
allowReplace:
|
|
1091
|
-
author:
|
|
1092
|
-
onAuthorChange:
|
|
1093
|
-
rules:
|
|
1094
|
-
onRulesChange:
|
|
1095
|
-
ruleSourceOptions:
|
|
1096
|
-
isRulesLoading:
|
|
1097
|
-
hasRulesLoadError:
|
|
1098
|
-
labels:
|
|
1099
|
-
styles:
|
|
1100
|
-
summaryTitleClassName:
|
|
1101
|
-
headingClassName:
|
|
1102
|
-
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
|
|
1103
1213
|
})
|
|
1104
1214
|
})
|
|
1105
|
-
}), /* @__PURE__ */
|
|
1215
|
+
}), /* @__PURE__ */ L(gt, {
|
|
1106
1216
|
version: n?.version,
|
|
1107
|
-
hasExistingPublicationInFolder:
|
|
1108
|
-
allowReplace:
|
|
1109
|
-
isSubmitDisabled:
|
|
1110
|
-
isSubmitLoading:
|
|
1111
|
-
onCancel: H ? V.backToMain :
|
|
1112
|
-
onSubmit:
|
|
1217
|
+
hasExistingPublicationInFolder: m,
|
|
1218
|
+
allowReplace: v,
|
|
1219
|
+
isSubmitDisabled: ue.isSubmitDisabled,
|
|
1220
|
+
isSubmitLoading: ue.isSubmitLoading,
|
|
1221
|
+
onCancel: H ? V.backToMain : C,
|
|
1222
|
+
onSubmit: T,
|
|
1113
1223
|
view: V.view,
|
|
1114
1224
|
onSelectFolder: V.selectFolder,
|
|
1115
1225
|
isSelectFolderDisabled: V.pendingFolderPath == null,
|
|
1116
|
-
labels:
|
|
1226
|
+
labels: ie
|
|
1117
1227
|
})]
|
|
1118
1228
|
});
|
|
1119
|
-
},
|
|
1120
|
-
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v =
|
|
1121
|
-
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, {
|
|
1122
1232
|
open: e,
|
|
1123
1233
|
title: f,
|
|
1124
1234
|
confirmLabel: p,
|
|
1125
1235
|
cancelLabel: m,
|
|
1126
1236
|
variant: l.Danger,
|
|
1127
1237
|
isLoading: a,
|
|
1128
|
-
isConfirmDisabled:
|
|
1238
|
+
isConfirmDisabled: b && r == null,
|
|
1129
1239
|
loadingStatusLabel: _,
|
|
1130
|
-
message: /* @__PURE__ */
|
|
1240
|
+
message: /* @__PURE__ */ L("span", {
|
|
1131
1241
|
className: "wrap-break-word",
|
|
1132
|
-
children:
|
|
1242
|
+
children: b ? y(t) : v(t, ye(n[0] ?? "", h))
|
|
1133
1243
|
}),
|
|
1134
1244
|
onConfirm: u,
|
|
1135
1245
|
onClose: d,
|
|
1136
|
-
children:
|
|
1246
|
+
children: b && /* @__PURE__ */ L("div", {
|
|
1137
1247
|
className: "mt-3",
|
|
1138
|
-
style:
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1248
|
+
style: oe({ "--ucd-option-text": c?.optionText }),
|
|
1249
|
+
children: /* @__PURE__ */ L(O, {
|
|
1140
1250
|
ariaLabel: g,
|
|
1141
1251
|
value: r ?? void 0,
|
|
1142
1252
|
onChange: i,
|
|
1143
1253
|
disabled: a,
|
|
1144
1254
|
items: n.map((e) => ({
|
|
1145
1255
|
value: e,
|
|
1146
|
-
label:
|
|
1256
|
+
label: ye(e, h)
|
|
1147
1257
|
})),
|
|
1148
|
-
radioClassName:
|
|
1258
|
+
radioClassName: I(s, yt.option)
|
|
1149
1259
|
})
|
|
1150
1260
|
})
|
|
1151
1261
|
});
|
|
1152
|
-
},
|
|
1262
|
+
}, Ct = /* @__PURE__ */ function(e) {
|
|
1153
1263
|
return e.Keep = "keep", e.New = "new", e;
|
|
1154
|
-
}({}),
|
|
1264
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
1155
1265
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
1156
|
-
}({}),
|
|
1266
|
+
}({}), Tt = {
|
|
1157
1267
|
heading: "_heading_vk731_1",
|
|
1158
1268
|
destination: "_destination_vk731_5"
|
|
1159
|
-
},
|
|
1160
|
-
let { saveToFolderHeading:
|
|
1161
|
-
...
|
|
1162
|
-
"--stf-heading-text":
|
|
1163
|
-
"--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
|
|
1164
1274
|
}),
|
|
1165
|
-
...
|
|
1166
|
-
},
|
|
1167
|
-
border:
|
|
1168
|
-
background:
|
|
1169
|
-
}, [
|
|
1170
|
-
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", {
|
|
1171
1281
|
className: "flex flex-col gap-3",
|
|
1172
|
-
style:
|
|
1282
|
+
style: X,
|
|
1173
1283
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ L("div", {
|
|
1175
1285
|
role: "search",
|
|
1176
|
-
children: /* @__PURE__ */
|
|
1177
|
-
value:
|
|
1178
|
-
onChange: (e) =>
|
|
1179
|
-
placeholder:
|
|
1180
|
-
clearLabel:
|
|
1181
|
-
"aria-label":
|
|
1286
|
+
children: /* @__PURE__ */ L(re, {
|
|
1287
|
+
value: fe,
|
|
1288
|
+
onChange: (e) => Q(e ?? ""),
|
|
1289
|
+
placeholder: ce,
|
|
1290
|
+
clearLabel: le,
|
|
1291
|
+
"aria-label": ce
|
|
1182
1292
|
})
|
|
1183
1293
|
}),
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
politeness:
|
|
1186
|
-
children:
|
|
1294
|
+
/* @__PURE__ */ L(S, {
|
|
1295
|
+
politeness: ne.Assertive,
|
|
1296
|
+
children: C && /* @__PURE__ */ R("div", {
|
|
1187
1297
|
className: "flex flex-wrap items-center gap-2",
|
|
1188
|
-
children: [/* @__PURE__ */
|
|
1298
|
+
children: [/* @__PURE__ */ L(h, { text: C }), w && /* @__PURE__ */ L(ee, {
|
|
1189
1299
|
label: de,
|
|
1190
|
-
onClick:
|
|
1300
|
+
onClick: w
|
|
1191
1301
|
})]
|
|
1192
1302
|
})
|
|
1193
1303
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ L(ct, {
|
|
1195
1305
|
roots: i,
|
|
1196
1306
|
destination: f,
|
|
1197
|
-
onDestinationChange:
|
|
1307
|
+
onDestinationChange: p,
|
|
1198
1308
|
onCreateDestinationFolder: s,
|
|
1199
|
-
searchQuery:
|
|
1200
|
-
disabled:
|
|
1201
|
-
noResultsLabel:
|
|
1202
|
-
createFolderLabel:
|
|
1203
|
-
cancelCreatingFolderLabel:
|
|
1204
|
-
addSiblingFolderLabel:
|
|
1205
|
-
addChildFolderLabel:
|
|
1206
|
-
emptyFolderNameError:
|
|
1207
|
-
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,
|
|
1208
1318
|
duplicateFolderNameError: K,
|
|
1209
|
-
|
|
1319
|
+
sameAsParentFolderNameError: q,
|
|
1320
|
+
styles: Y
|
|
1210
1321
|
}),
|
|
1211
|
-
|
|
1322
|
+
y && he?.hasAccessRules && /* @__PURE__ */ L("div", {
|
|
1212
1323
|
className: "mt-1",
|
|
1213
|
-
children: /* @__PURE__ */
|
|
1214
|
-
rules:
|
|
1215
|
-
onRulesChange:
|
|
1216
|
-
sourceOptions:
|
|
1217
|
-
folderName:
|
|
1218
|
-
disabled:
|
|
1219
|
-
isLoading:
|
|
1220
|
-
hasLoadError:
|
|
1221
|
-
labels:
|
|
1222
|
-
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
|
|
1223
1334
|
})
|
|
1224
1335
|
})
|
|
1225
1336
|
]
|
|
1226
1337
|
});
|
|
1227
|
-
let
|
|
1228
|
-
value:
|
|
1229
|
-
label:
|
|
1338
|
+
let $ = g ? [{
|
|
1339
|
+
value: Ct.Keep,
|
|
1340
|
+
label: N.replace("{version}", g.currentVersion)
|
|
1230
1341
|
}, {
|
|
1231
|
-
value:
|
|
1232
|
-
label:
|
|
1233
|
-
content: /* @__PURE__ */
|
|
1234
|
-
id:
|
|
1235
|
-
value:
|
|
1236
|
-
onChange: (e) =>
|
|
1237
|
-
onBlur:
|
|
1342
|
+
value: Ct.New,
|
|
1343
|
+
label: P,
|
|
1344
|
+
content: /* @__PURE__ */ L(x, {
|
|
1345
|
+
id: pe,
|
|
1346
|
+
value: g.newVersion,
|
|
1347
|
+
onChange: (e) => g.onNewVersionChange(e ?? ""),
|
|
1348
|
+
onBlur: g.onNewVersionBlur,
|
|
1238
1349
|
labelProps: {
|
|
1239
1350
|
label: ae,
|
|
1240
1351
|
required: !0
|
|
1241
1352
|
},
|
|
1242
|
-
placeholder:
|
|
1243
|
-
error:
|
|
1244
|
-
invalid: !!
|
|
1245
|
-
disabled:
|
|
1353
|
+
placeholder: se,
|
|
1354
|
+
error: g.newVersionError,
|
|
1355
|
+
invalid: !!g.newVersionError,
|
|
1356
|
+
disabled: b
|
|
1246
1357
|
})
|
|
1247
1358
|
}] : [];
|
|
1248
|
-
return /* @__PURE__ */
|
|
1359
|
+
return /* @__PURE__ */ R("div", {
|
|
1249
1360
|
className: "flex flex-col gap-5",
|
|
1250
|
-
style:
|
|
1361
|
+
style: X,
|
|
1251
1362
|
children: [
|
|
1252
|
-
t.type == null ? /* @__PURE__ */
|
|
1253
|
-
colors:
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1255
|
-
className:
|
|
1363
|
+
t.type == null ? /* @__PURE__ */ L(F, {
|
|
1364
|
+
colors: Z,
|
|
1365
|
+
children: /* @__PURE__ */ L("span", {
|
|
1366
|
+
className: I("truncate", _e),
|
|
1256
1367
|
children: t.title
|
|
1257
1368
|
})
|
|
1258
|
-
}) : /* @__PURE__ */
|
|
1369
|
+
}) : /* @__PURE__ */ L(F, {
|
|
1259
1370
|
item: {
|
|
1260
1371
|
type: t.type,
|
|
1261
1372
|
name: t.title,
|
|
@@ -1263,146 +1374,146 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1263
1374
|
iconUrl: t.iconUrl
|
|
1264
1375
|
},
|
|
1265
1376
|
hasVersionTag: !1,
|
|
1266
|
-
colors:
|
|
1377
|
+
colors: Z
|
|
1267
1378
|
}),
|
|
1268
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ R("section", {
|
|
1269
1380
|
className: "flex flex-col gap-2",
|
|
1270
|
-
children: [/* @__PURE__ */
|
|
1271
|
-
className:
|
|
1272
|
-
children:
|
|
1273
|
-
}), /* @__PURE__ */
|
|
1381
|
+
children: [/* @__PURE__ */ L("h2", {
|
|
1382
|
+
className: _e,
|
|
1383
|
+
children: A
|
|
1384
|
+
}), /* @__PURE__ */ R("div", {
|
|
1274
1385
|
className: "flex min-w-0 items-center gap-2",
|
|
1275
|
-
children: [/* @__PURE__ */
|
|
1386
|
+
children: [/* @__PURE__ */ L("div", {
|
|
1276
1387
|
role: "group",
|
|
1277
|
-
"aria-label":
|
|
1388
|
+
"aria-label": j,
|
|
1278
1389
|
className: "min-w-0 flex-1",
|
|
1279
|
-
children: /* @__PURE__ */
|
|
1390
|
+
children: /* @__PURE__ */ L(_, {
|
|
1280
1391
|
name: me.join(" / "),
|
|
1281
|
-
nameClassName:
|
|
1392
|
+
nameClassName: I(k, Tt.destination)
|
|
1282
1393
|
})
|
|
1283
|
-
}), /* @__PURE__ */
|
|
1394
|
+
}), /* @__PURE__ */ L(v, {
|
|
1284
1395
|
ref: l,
|
|
1285
|
-
size:
|
|
1286
|
-
label:
|
|
1287
|
-
iconBefore: /* @__PURE__ */ z
|
|
1396
|
+
size: m.Small,
|
|
1397
|
+
label: ie,
|
|
1398
|
+
iconBefore: /* @__PURE__ */ L(z, {
|
|
1288
1399
|
size: u.SM,
|
|
1289
1400
|
stroke: d,
|
|
1290
1401
|
"aria-hidden": !0
|
|
1291
1402
|
}),
|
|
1292
|
-
disabled:
|
|
1403
|
+
disabled: b,
|
|
1293
1404
|
onClick: c
|
|
1294
1405
|
})]
|
|
1295
1406
|
})]
|
|
1296
1407
|
}),
|
|
1297
|
-
|
|
1408
|
+
g && /* @__PURE__ */ R("section", {
|
|
1298
1409
|
className: "flex flex-col gap-2",
|
|
1299
|
-
children: [/* @__PURE__ */
|
|
1300
|
-
className:
|
|
1301
|
-
children:
|
|
1302
|
-
}), /* @__PURE__ */
|
|
1303
|
-
ariaLabel:
|
|
1304
|
-
value:
|
|
1305
|
-
onChange: (e) =>
|
|
1306
|
-
items:
|
|
1307
|
-
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
|
|
1308
1419
|
})]
|
|
1309
1420
|
}),
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
politeness:
|
|
1312
|
-
children:
|
|
1421
|
+
/* @__PURE__ */ L(S, {
|
|
1422
|
+
politeness: ne.Assertive,
|
|
1423
|
+
children: te && /* @__PURE__ */ L(h, { text: te })
|
|
1313
1424
|
})
|
|
1314
1425
|
]
|
|
1315
1426
|
});
|
|
1316
|
-
},
|
|
1427
|
+
}, Dt = {
|
|
1317
1428
|
backdrop: "_backdrop_1ie8s_6",
|
|
1318
1429
|
panel: "_panel_1ie8s_10",
|
|
1319
1430
|
divider: "_divider_1ie8s_15",
|
|
1320
1431
|
footer: "_footer_1ie8s_19",
|
|
1321
1432
|
content: "_content_1ie8s_23",
|
|
1322
1433
|
title: "_title_1ie8s_28"
|
|
1323
|
-
},
|
|
1324
|
-
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({
|
|
1325
1436
|
"--sstf-backdrop-bg": l?.backdropBackground,
|
|
1326
1437
|
"--sstf-panel-bg": l?.panelBackground,
|
|
1327
1438
|
"--sstf-panel-border": l?.panelBorder,
|
|
1328
1439
|
"--sstf-divider-border": l?.dividerBorder,
|
|
1329
1440
|
"--sstf-scrollbar-thumb": l?.scrollbarThumb,
|
|
1330
1441
|
"--sstf-title-text": l?.titleText
|
|
1331
|
-
}), [
|
|
1442
|
+
}), [T, E] = a(wt.Main), [O, re] = a(f), k = i(null), j = i(null);
|
|
1332
1443
|
t(() => {
|
|
1333
|
-
e &&
|
|
1444
|
+
e && E(wt.Main);
|
|
1334
1445
|
}, [e]);
|
|
1335
|
-
let
|
|
1446
|
+
let M = i(T);
|
|
1336
1447
|
t(() => {
|
|
1337
|
-
|
|
1338
|
-
}, [
|
|
1339
|
-
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);
|
|
1340
1451
|
t(() => {
|
|
1341
|
-
let t =
|
|
1342
|
-
|
|
1452
|
+
let t = N.current;
|
|
1453
|
+
N.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1343
1454
|
}, [e, s]);
|
|
1344
|
-
let
|
|
1345
|
-
|
|
1346
|
-
}, ie = () => {
|
|
1347
|
-
re(f), k(ut.ChangeFolder);
|
|
1455
|
+
let P = T === wt.ChangeFolder, F = (e) => {
|
|
1456
|
+
re(e), h?.(e);
|
|
1348
1457
|
}, ae = () => {
|
|
1349
|
-
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1458
|
+
F(f), E(wt.ChangeFolder);
|
|
1459
|
+
}, se = () => {
|
|
1460
|
+
h?.(f), E(wt.Main);
|
|
1461
|
+
}, ce = () => {
|
|
1462
|
+
O && p(O), E(wt.Main);
|
|
1352
1463
|
};
|
|
1353
|
-
return /* @__PURE__ */
|
|
1464
|
+
return /* @__PURE__ */ R(A, {
|
|
1354
1465
|
open: e,
|
|
1355
1466
|
onClose: n,
|
|
1356
|
-
header: /* @__PURE__ */
|
|
1357
|
-
ref:
|
|
1467
|
+
header: /* @__PURE__ */ L("span", {
|
|
1468
|
+
ref: k,
|
|
1358
1469
|
tabIndex: -1,
|
|
1359
|
-
className:
|
|
1360
|
-
children:
|
|
1470
|
+
className: I("block truncate outline-none", d, Dt.title),
|
|
1471
|
+
children: P ? y : _
|
|
1361
1472
|
}),
|
|
1362
|
-
ariaLabel:
|
|
1363
|
-
onBack:
|
|
1364
|
-
backAriaLabel:
|
|
1473
|
+
ariaLabel: _,
|
|
1474
|
+
onBack: P ? se : void 0,
|
|
1475
|
+
backAriaLabel: x,
|
|
1365
1476
|
backDisabled: m,
|
|
1366
|
-
closeAriaLabel:
|
|
1477
|
+
closeAriaLabel: b,
|
|
1367
1478
|
closeDisabled: m,
|
|
1368
|
-
style:
|
|
1369
|
-
overlayStyle:
|
|
1370
|
-
className:
|
|
1371
|
-
overlayClassName:
|
|
1372
|
-
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),
|
|
1373
1484
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1374
|
-
children: [/* @__PURE__ */
|
|
1375
|
-
className:
|
|
1376
|
-
children: /* @__PURE__ */
|
|
1377
|
-
...
|
|
1378
|
-
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,
|
|
1379
1490
|
destination: f,
|
|
1380
1491
|
onDestinationChange: p,
|
|
1381
1492
|
isSubmitting: m,
|
|
1382
|
-
onChangeFolderClick:
|
|
1383
|
-
changeFolderButtonRef:
|
|
1384
|
-
pendingDestination:
|
|
1385
|
-
onPendingDestinationChange:
|
|
1493
|
+
onChangeFolderClick: ae,
|
|
1494
|
+
changeFolderButtonRef: j,
|
|
1495
|
+
pendingDestination: O,
|
|
1496
|
+
onPendingDestinationChange: F
|
|
1386
1497
|
})
|
|
1387
|
-
}), /* @__PURE__ */
|
|
1388
|
-
className:
|
|
1389
|
-
children: [/* @__PURE__ */
|
|
1390
|
-
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,
|
|
1391
1502
|
className: "mobile:flex-1",
|
|
1392
1503
|
disabled: m,
|
|
1393
|
-
onClick:
|
|
1394
|
-
}),
|
|
1395
|
-
label:
|
|
1504
|
+
onClick: P ? se : n
|
|
1505
|
+
}), P ? /* @__PURE__ */ L(C, {
|
|
1506
|
+
label: ne,
|
|
1396
1507
|
className: "mobile:flex-1",
|
|
1397
|
-
disabled:
|
|
1398
|
-
onClick:
|
|
1399
|
-
}) : /* @__PURE__ */
|
|
1400
|
-
label: m ?
|
|
1508
|
+
disabled: O == null,
|
|
1509
|
+
onClick: ce
|
|
1510
|
+
}) : /* @__PURE__ */ L(D, {
|
|
1511
|
+
label: m ? te : S,
|
|
1401
1512
|
className: "mobile:flex-1",
|
|
1402
1513
|
disabled: o || m,
|
|
1403
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1514
|
+
iconBefore: m ? /* @__PURE__ */ L("span", {
|
|
1404
1515
|
"aria-hidden": !0,
|
|
1405
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ L(ie, { size: u.SM })
|
|
1406
1517
|
}) : void 0,
|
|
1407
1518
|
onClick: r
|
|
1408
1519
|
})]
|
|
@@ -1410,4 +1521,4 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1410
1521
|
});
|
|
1411
1522
|
};
|
|
1412
1523
|
//#endregion
|
|
1413
|
-
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 };
|