@epam/ai-dial-publish-panel 1.4.0-dev.6 → 1.4.0-dev.66
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/PublishFooter.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +15 -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 +897 -779
- package/models/publish-dependencies-list.d.ts +45 -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,15 +1,17 @@
|
|
|
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
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
|
-
}({}), G = (e)
|
|
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 ? {
|
|
13
15
|
calloutKind: W.None,
|
|
14
16
|
isSubmitDisabled: !0,
|
|
15
17
|
isSubmitLoading: !0
|
|
@@ -33,14 +35,14 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
33
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 U = /* @__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 U = /* @__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
|
-
}),
|
|
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
217
|
let n = $(t), r = (e) => {
|
|
216
218
|
for (let t of e) {
|
|
@@ -220,22 +222,22 @@ var U = /* @__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,385 @@ var U = /* @__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: Y.trim() ? /* @__PURE__ */
|
|
256
|
+
labelNode: Y.trim() ? /* @__PURE__ */ L(b, {
|
|
255
257
|
text: e,
|
|
256
258
|
query: Y,
|
|
257
259
|
maxLines: 1
|
|
258
260
|
}) : void 0
|
|
259
|
-
})), [e, Y]),
|
|
261
|
+
})), [e, Y]), _e = r(() => [
|
|
260
262
|
{
|
|
261
263
|
value: U.Equal,
|
|
262
|
-
label:
|
|
264
|
+
label: y
|
|
263
265
|
},
|
|
264
266
|
{
|
|
265
267
|
value: U.Contain,
|
|
266
|
-
label:
|
|
268
|
+
label: ee
|
|
267
269
|
},
|
|
268
270
|
{
|
|
269
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:
|
|
305
|
+
placeholder: g,
|
|
306
|
+
searchable: e.length > Oe,
|
|
307
|
+
searchPlaceholder: g,
|
|
306
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:
|
|
332
|
-
value: q,
|
|
333
|
-
onChange: (e) => ue(e ?? ""),
|
|
334
|
-
error: Oe ? k : void 0,
|
|
335
|
-
disabled: l
|
|
336
|
-
}) : /* @__PURE__ */ B(N, {
|
|
337
|
-
id: oe,
|
|
338
|
-
labelProps: { label: w },
|
|
339
|
-
placeholder: T,
|
|
340
|
-
caption: Q && K.length === 0 ? void 0 : E,
|
|
341
|
-
error: Q && K.length === 0 ? M : void 0,
|
|
342
|
-
invalid: Q && K.length === 0,
|
|
330
|
+
$ ? /* @__PURE__ */ L(x, {
|
|
331
|
+
id: N,
|
|
332
|
+
labelProps: { label: T },
|
|
333
|
+
placeholder: E,
|
|
343
334
|
value: K,
|
|
344
|
-
onChange:
|
|
335
|
+
onChange: (e) => q(e ?? ""),
|
|
336
|
+
error: we ? D : void 0,
|
|
337
|
+
disabled: l
|
|
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
|
-
X.current = document.activeElement,
|
|
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]), Y(
|
|
409
|
-
},
|
|
410
|
-
r(e.filter((e, n) => n !== t)), Y(
|
|
411
|
-
},
|
|
412
|
-
r([]), Y(
|
|
413
|
-
},
|
|
414
|
-
equal:
|
|
415
|
-
contain:
|
|
416
|
-
regex:
|
|
417
|
-
},
|
|
418
|
-
return /* @__PURE__ */
|
|
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,
|
|
418
|
+
regex: ce
|
|
419
|
+
}, _e = e.length >= m, $ = l || _e, ve = c != null && c !== "";
|
|
420
|
+
return /* @__PURE__ */ R("div", {
|
|
419
421
|
role: "group",
|
|
420
|
-
"aria-labelledby":
|
|
421
|
-
style:
|
|
422
|
-
className:
|
|
422
|
+
"aria-labelledby": K,
|
|
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__ */
|
|
432
|
-
id:
|
|
433
|
-
className:
|
|
434
|
-
children:
|
|
435
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ L("div", {
|
|
434
|
+
id: K,
|
|
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
|
-
|
|
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__ */ B
|
|
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 = "This item depends on personal private resources (listed below). After publishing, other users may not be able to use it fully, or may run into problems.", Ue = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, We = ({ 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, typeLabels: u = {}, getAnnouncement: d = Ue } = t, { colors: f } = o, p = {
|
|
568
|
+
...oe({
|
|
569
|
+
"--pp-dependencies-heading-text": f?.headingText,
|
|
570
|
+
"--pp-dependencies-name-text": f?.nameText,
|
|
571
|
+
"--pp-dependencies-meta-text": f?.metaText
|
|
572
|
+
}),
|
|
573
|
+
...o.cssVars
|
|
574
|
+
}, m = e.length;
|
|
575
|
+
return /* @__PURE__ */ R(ce, { children: [/* @__PURE__ */ L(S, {
|
|
576
|
+
visuallyHidden: !0,
|
|
577
|
+
as: te.Span,
|
|
578
|
+
children: m > 0 ? d(m) : ""
|
|
579
|
+
}), m > 0 && /* @__PURE__ */ R("section", {
|
|
580
|
+
"aria-labelledby": s,
|
|
581
|
+
className: I("flex flex-col gap-3", Fe.dependencies),
|
|
582
|
+
style: p,
|
|
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 = u[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__ */ L("span", {
|
|
610
|
+
className: I("truncate", a, Ie.meta),
|
|
611
|
+
children: e.location ? `${t} · ${e.location}` : t
|
|
612
|
+
})]
|
|
613
|
+
})]
|
|
614
|
+
}, e.id);
|
|
615
|
+
})
|
|
616
|
+
})
|
|
617
|
+
]
|
|
618
|
+
})] });
|
|
619
|
+
}, Ge = {
|
|
529
620
|
currentBadge: "_currentBadge_d0adf_1",
|
|
530
621
|
sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
|
|
531
622
|
version: "_version_d0adf_13",
|
|
532
623
|
date: "_date_d0adf_17",
|
|
533
624
|
emptyState: "_emptyState_d0adf_21",
|
|
534
625
|
stripedRow: "_stripedRow_d0adf_25"
|
|
535
|
-
},
|
|
536
|
-
let m =
|
|
626
|
+
}, Ke = ({ 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 }) => {
|
|
627
|
+
let m = oe({
|
|
537
628
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
538
629
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
539
630
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -544,489 +635,514 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
544
635
|
"--phl-date-text": p?.dateText,
|
|
545
636
|
"--phl-empty-text": p?.emptyStateText,
|
|
546
637
|
"--phl-striped-bg": p?.stripedBackground
|
|
547
|
-
}), h =
|
|
638
|
+
}), h = I(f, Ge.emptyState);
|
|
548
639
|
if (n || r || e.length === 0) {
|
|
549
640
|
let e = s;
|
|
550
|
-
return n ? e = c : r && (e = l), /* @__PURE__ */
|
|
551
|
-
as:
|
|
641
|
+
return n ? e = c : r && (e = l), /* @__PURE__ */ L(S, {
|
|
642
|
+
as: te.P,
|
|
552
643
|
style: m,
|
|
553
644
|
className: h,
|
|
554
645
|
children: e
|
|
555
646
|
});
|
|
556
647
|
}
|
|
557
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ L("ul", {
|
|
558
649
|
style: m,
|
|
559
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
560
|
-
className:
|
|
561
|
-
children: [/* @__PURE__ */
|
|
650
|
+
children: e.map((e, n) => /* @__PURE__ */ R("li", {
|
|
651
|
+
className: I("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Ge.stripedRow),
|
|
652
|
+
children: [/* @__PURE__ */ R("span", {
|
|
562
653
|
className: "flex min-w-0 items-center gap-2",
|
|
563
654
|
style: m,
|
|
564
655
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
className:
|
|
656
|
+
/* @__PURE__ */ R("span", {
|
|
657
|
+
className: I(u, Ge.version),
|
|
567
658
|
children: [
|
|
568
659
|
i,
|
|
569
660
|
" ",
|
|
570
661
|
e.version
|
|
571
662
|
]
|
|
572
663
|
}),
|
|
573
|
-
e.version === t && /* @__PURE__ */
|
|
664
|
+
e.version === t && /* @__PURE__ */ L(j, {
|
|
574
665
|
label: a,
|
|
575
|
-
className:
|
|
666
|
+
className: I("shrink-0 whitespace-nowrap", Ge.currentBadge)
|
|
576
667
|
}),
|
|
577
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
668
|
+
e.publishCredentials === !0 && /* @__PURE__ */ L(j, {
|
|
578
669
|
label: o,
|
|
579
|
-
className:
|
|
670
|
+
className: I("shrink-0 whitespace-nowrap", Ge.sharedCredentialsBadge)
|
|
580
671
|
})
|
|
581
672
|
]
|
|
582
|
-
}), /* @__PURE__ */
|
|
583
|
-
className:
|
|
584
|
-
children:
|
|
673
|
+
}), /* @__PURE__ */ L("span", {
|
|
674
|
+
className: I(d, Ge.date),
|
|
675
|
+
children: de(e.publishedAt)
|
|
585
676
|
})]
|
|
586
677
|
}, `${e.version}-${n}`))
|
|
587
678
|
});
|
|
588
|
-
},
|
|
589
|
-
let [t, ...n] = e, r =
|
|
679
|
+
}, qe = ":", Je = (e) => `${qe}${e}`, Ye = (e) => e?.startsWith(qe) ? e.slice(1) : void 0, Xe = (e) => [Je(e.rootKey), ...e.path], Ze = (e) => {
|
|
680
|
+
let [t, ...n] = e, r = Ye(t);
|
|
590
681
|
return r == null ? void 0 : {
|
|
591
682
|
rootKey: r,
|
|
592
683
|
path: n
|
|
593
684
|
};
|
|
594
|
-
},
|
|
685
|
+
}, Qe = (e, t) => e.map((e) => ({
|
|
595
686
|
...e,
|
|
596
687
|
path: [t, ...e.path],
|
|
597
|
-
children: e.children ?
|
|
598
|
-
})),
|
|
599
|
-
let t =
|
|
688
|
+
children: e.children ? Qe(e.children, t) : void 0
|
|
689
|
+
})), $e = (e) => e.map((e) => {
|
|
690
|
+
let t = Je(e.key);
|
|
600
691
|
return {
|
|
601
692
|
path: [t],
|
|
602
693
|
name: e.label,
|
|
603
|
-
children:
|
|
694
|
+
children: Qe(me(e.items), t)
|
|
604
695
|
};
|
|
605
|
-
}),
|
|
696
|
+
}), et = (e) => e.map((e) => Je(e.key)), tt = (e, t) => {
|
|
606
697
|
let n = /* @__PURE__ */ new Set();
|
|
607
698
|
for (let r of e) {
|
|
608
|
-
let e =
|
|
699
|
+
let e = Je(r.key);
|
|
609
700
|
for (let i of t(r) ?? []) n.add(i ? `${e}/${i}` : e);
|
|
610
701
|
}
|
|
611
702
|
return n;
|
|
612
|
-
},
|
|
703
|
+
}, nt = (e, t) => {
|
|
613
704
|
let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
|
|
614
705
|
for (let e of t) {
|
|
615
|
-
let [t, ...r] = e.split("/"), i =
|
|
706
|
+
let [t, ...r] = e.split("/"), i = Ye(t);
|
|
616
707
|
i != null && r.length !== 0 && n.get(i)?.add($(r));
|
|
617
708
|
}
|
|
618
709
|
return n;
|
|
619
|
-
},
|
|
710
|
+
}, rt = {
|
|
620
711
|
divider: "_divider_1gs31_1",
|
|
621
712
|
tree: "_tree_1gs31_17"
|
|
622
|
-
},
|
|
623
|
-
let
|
|
624
|
-
...
|
|
625
|
-
...
|
|
626
|
-
},
|
|
713
|
+
}, it = "data-cancel-creating-folder", at = "", ot = [], st = ({ items: e = ot, 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 = {} }) => {
|
|
714
|
+
let re = {
|
|
715
|
+
...oe({ "--pft-divider": O.colors?.divider }),
|
|
716
|
+
...O.cssVars
|
|
717
|
+
}, k = c != null, A = r(() => c ? $e(c) : e, [c, e]), ie = i(A);
|
|
627
718
|
t(() => {
|
|
628
|
-
|
|
629
|
-
}, [
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
let
|
|
633
|
-
|
|
634
|
-
}, [
|
|
719
|
+
ie.current = A;
|
|
720
|
+
}, [A]);
|
|
721
|
+
let j = r(() => c ? et(c) : [at], [c]), M = n;
|
|
722
|
+
k && (M = l ? Xe(l) : void 0);
|
|
723
|
+
let N = (e) => {
|
|
724
|
+
k ? f?.(e ? Ze(e) : void 0) : o?.(e);
|
|
725
|
+
}, [P, F] = a(() => new Set(M?.map((e, t) => $(M.slice(0, t + 1))) ?? [])), ae = r(() => c ? /* @__PURE__ */ new Set([...P, ...tt(c, (e) => e.expandedPaths)]) : void 0, [c, P]) ?? T ?? P, se = r(() => c ? tt(c, (e) => e.loadingPaths) : D, [c, D]), ce = (e) => {
|
|
635
726
|
let t = new Set(e);
|
|
636
|
-
for (let e of
|
|
727
|
+
for (let e of j) t.delete(e);
|
|
637
728
|
if (c) {
|
|
638
|
-
|
|
639
|
-
let e =
|
|
729
|
+
F(t);
|
|
730
|
+
let e = nt(c, t);
|
|
640
731
|
for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
|
|
641
|
-
} else
|
|
642
|
-
}, [
|
|
732
|
+
} else E ? E(t) : F(t);
|
|
733
|
+
}, [z, V] = a(null), [U, W] = a(x), G = i(null), K = i(!1);
|
|
643
734
|
t(() => {
|
|
644
735
|
let e = (e) => {
|
|
645
|
-
e.target instanceof Element && e.target.closest(`[${
|
|
736
|
+
e.target instanceof Element && e.target.closest(`[${it}]`) && (K.current = !0);
|
|
646
737
|
};
|
|
647
738
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
648
739
|
}, []);
|
|
649
|
-
let q = m.trim(),
|
|
650
|
-
let e = X ? J :
|
|
651
|
-
return
|
|
740
|
+
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(() => {
|
|
741
|
+
let e = X ? J : A;
|
|
742
|
+
return k ? e : me(e);
|
|
652
743
|
}, [
|
|
653
744
|
X,
|
|
654
745
|
J,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
]),
|
|
658
|
-
|
|
746
|
+
A,
|
|
747
|
+
k
|
|
748
|
+
]), fe = r(() => /* @__PURE__ */ new Set([...j, ..._e(Z)]), [j, Z]), pe = r(() => /* @__PURE__ */ new Set([...j, ...X ? fe : ae]), [
|
|
749
|
+
j,
|
|
659
750
|
X,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
]),
|
|
663
|
-
path:
|
|
664
|
-
name:
|
|
665
|
-
folderId:
|
|
666
|
-
nodeType:
|
|
667
|
-
items:
|
|
751
|
+
fe,
|
|
752
|
+
ae
|
|
753
|
+
]), he = r(() => be(Z), [Z]), ge = r(() => X && he.length === 0 ? [] : k ? he : [{
|
|
754
|
+
path: at,
|
|
755
|
+
name: w,
|
|
756
|
+
folderId: at,
|
|
757
|
+
nodeType: H.FOLDER,
|
|
758
|
+
items: he
|
|
668
759
|
}], [
|
|
669
|
-
|
|
670
|
-
|
|
760
|
+
he,
|
|
761
|
+
w,
|
|
671
762
|
X,
|
|
672
|
-
|
|
673
|
-
]),
|
|
763
|
+
k
|
|
764
|
+
]), ye = z ? $(z) : null, xe = {
|
|
674
765
|
empty: S,
|
|
675
|
-
invalid:
|
|
676
|
-
duplicate:
|
|
677
|
-
|
|
766
|
+
invalid: te,
|
|
767
|
+
duplicate: ne,
|
|
768
|
+
sameAsParent: C
|
|
769
|
+
}, Te = (e) => j.includes($(e)) ? void 0 : e.at(-1), Ee = (e) => {
|
|
678
770
|
if (!c) return !0;
|
|
679
|
-
let t =
|
|
771
|
+
let t = Ze(e), n = c.find((e) => e.key === t?.rootKey);
|
|
680
772
|
return n != null && n.canCreateFolders !== !1;
|
|
681
|
-
},
|
|
682
|
-
if (!c) return
|
|
683
|
-
if (
|
|
773
|
+
}, De = (() => {
|
|
774
|
+
if (!c) return M ?? [];
|
|
775
|
+
if (M && Ee(M)) return M;
|
|
684
776
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
685
|
-
return e ?
|
|
777
|
+
return e ? Xe({
|
|
686
778
|
rootKey: e.key,
|
|
687
779
|
path: []
|
|
688
780
|
}) : void 0;
|
|
689
|
-
})(),
|
|
690
|
-
|
|
781
|
+
})(), Oe = (e) => {
|
|
782
|
+
let t = Y && Se(q, [], xe) == null, n = Te(e);
|
|
783
|
+
return Ce(t ? q : x, [...we(A, e), ...n ? [n] : []]);
|
|
784
|
+
}, [ke, Ae] = a(null);
|
|
785
|
+
ke != null && !se?.has($(ke)) && (Ae(null), V(ke), W(Oe(ke)));
|
|
786
|
+
let je = (e) => {
|
|
787
|
+
V(null), Ae(e), G.current = null, K.current = !1;
|
|
691
788
|
let t = $(e);
|
|
692
|
-
t &&
|
|
693
|
-
},
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
let t =
|
|
697
|
-
if (!
|
|
789
|
+
t && ce(new Set(ae).add(t));
|
|
790
|
+
}, Me = () => {
|
|
791
|
+
De && je(De);
|
|
792
|
+
}, Ne = (e) => {
|
|
793
|
+
let t = ve(e.path);
|
|
794
|
+
if (!Ee(t)) return [];
|
|
698
795
|
let n = [{
|
|
699
796
|
key: "add-child",
|
|
700
|
-
label:
|
|
701
|
-
icon: /* @__PURE__ */
|
|
797
|
+
label: b,
|
|
798
|
+
icon: /* @__PURE__ */ L(le, {
|
|
702
799
|
size: u.SM,
|
|
703
800
|
"aria-hidden": !0,
|
|
704
801
|
stroke: d
|
|
705
802
|
}),
|
|
706
|
-
onClick: () =>
|
|
803
|
+
onClick: () => je(t)
|
|
707
804
|
}];
|
|
708
|
-
return
|
|
805
|
+
return j.includes(e.path) || n.push({
|
|
709
806
|
key: "add-sibling",
|
|
710
|
-
label:
|
|
711
|
-
icon: /* @__PURE__ */ B
|
|
807
|
+
label: y,
|
|
808
|
+
icon: /* @__PURE__ */ L(B, {
|
|
712
809
|
size: u.SM,
|
|
713
810
|
"aria-hidden": !0,
|
|
714
811
|
stroke: d
|
|
715
812
|
}),
|
|
716
|
-
onClick: () =>
|
|
813
|
+
onClick: () => je(t.slice(0, -1))
|
|
717
814
|
}), n;
|
|
718
|
-
},
|
|
719
|
-
if (!
|
|
720
|
-
let t =
|
|
721
|
-
return
|
|
722
|
-
},
|
|
723
|
-
if (!
|
|
724
|
-
let t = e.trim(), n =
|
|
725
|
-
if (!(
|
|
726
|
-
let e = c ?
|
|
727
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
815
|
+
}, Pe = (e) => {
|
|
816
|
+
if (!z) return null;
|
|
817
|
+
let t = Se(e, we(ie.current, z), xe, Te(z));
|
|
818
|
+
return G.current = t, t;
|
|
819
|
+
}, Fe = (e) => {
|
|
820
|
+
if (!z || K.current) return;
|
|
821
|
+
let t = e.trim(), n = G.current;
|
|
822
|
+
if (!(Pe(e) ?? n)) {
|
|
823
|
+
let e = c ? Ze(z) : void 0;
|
|
824
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(z, t), N([...z, t]);
|
|
728
825
|
}
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
style:
|
|
733
|
-
className:
|
|
826
|
+
V(null);
|
|
827
|
+
}, Ie = () => V(null);
|
|
828
|
+
return /* @__PURE__ */ R("div", {
|
|
829
|
+
style: re,
|
|
830
|
+
className: I(h && "pointer-events-none opacity-60", O.className),
|
|
734
831
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
className:
|
|
737
|
-
children: /* @__PURE__ */
|
|
738
|
-
items:
|
|
832
|
+
/* @__PURE__ */ L("div", {
|
|
833
|
+
className: I("w-full max-w-full min-w-0", rt.tree),
|
|
834
|
+
children: /* @__PURE__ */ L(ue, {
|
|
835
|
+
items: ge,
|
|
739
836
|
showFiles: !1,
|
|
740
|
-
selectedPath:
|
|
741
|
-
expandedPaths:
|
|
742
|
-
onExpandedPathsChange:
|
|
743
|
-
loadingPaths:
|
|
837
|
+
selectedPath: M == null ? void 0 : $(M),
|
|
838
|
+
expandedPaths: pe,
|
|
839
|
+
onExpandedPathsChange: ce,
|
|
840
|
+
loadingPaths: se,
|
|
744
841
|
onItemClick: (e) => {
|
|
745
|
-
let t =
|
|
746
|
-
|
|
842
|
+
let t = M != null && $(M) === e.path;
|
|
843
|
+
N(t ? void 0 : ve(e.path));
|
|
747
844
|
},
|
|
748
|
-
getContextMenuItems:
|
|
749
|
-
createdFolderPath:
|
|
750
|
-
newFolderDefaultName:
|
|
751
|
-
onCreateFolderSave:
|
|
752
|
-
onCreateFolderCancel:
|
|
753
|
-
onRenameValidate: (e) =>
|
|
845
|
+
getContextMenuItems: Ne,
|
|
846
|
+
createdFolderPath: ye,
|
|
847
|
+
newFolderDefaultName: U,
|
|
848
|
+
onCreateFolderSave: Fe,
|
|
849
|
+
onCreateFolderCancel: Ie,
|
|
850
|
+
onRenameValidate: (e) => Pe(e),
|
|
754
851
|
searchQuery: X ? q : void 0,
|
|
755
|
-
emptyStateTitle: X ?
|
|
852
|
+
emptyStateTitle: X ? ee.replace("{query}", q) : void 0
|
|
756
853
|
})
|
|
757
854
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
className:
|
|
855
|
+
/* @__PURE__ */ L("div", {
|
|
856
|
+
className: I("my-2 h-px", rt.divider),
|
|
760
857
|
"aria-hidden": !0
|
|
761
858
|
}),
|
|
762
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ R("div", {
|
|
763
860
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
764
|
-
children: [/* @__PURE__ */
|
|
765
|
-
onClick:
|
|
766
|
-
label:
|
|
767
|
-
iconBefore: /* @__PURE__ */ B
|
|
861
|
+
children: [/* @__PURE__ */ L(v, {
|
|
862
|
+
onClick: Me,
|
|
863
|
+
label: g,
|
|
864
|
+
iconBefore: /* @__PURE__ */ L(B, {
|
|
768
865
|
size: u.SM,
|
|
769
866
|
"aria-hidden": !0,
|
|
770
867
|
stroke: d
|
|
771
868
|
}),
|
|
772
|
-
disabled: h ||
|
|
773
|
-
}),
|
|
774
|
-
label:
|
|
775
|
-
onClick:
|
|
869
|
+
disabled: h || de || !De
|
|
870
|
+
}), de && /* @__PURE__ */ L(v, {
|
|
871
|
+
label: _,
|
|
872
|
+
onClick: Ie,
|
|
776
873
|
disabled: h,
|
|
777
|
-
[
|
|
874
|
+
[it]: ""
|
|
778
875
|
})]
|
|
779
876
|
})
|
|
780
877
|
]
|
|
781
878
|
});
|
|
782
|
-
},
|
|
879
|
+
}, ct = {
|
|
783
880
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
784
881
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
785
882
|
destination: "_destination_zj3gd_9"
|
|
786
|
-
},
|
|
787
|
-
let { colors:
|
|
788
|
-
...
|
|
789
|
-
"--pp-summary-title-text":
|
|
790
|
-
"--pp-heading-text":
|
|
791
|
-
"--pp-destination-text":
|
|
883
|
+
}, lt = 200, ut = ({ 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: D, hasSubmitError: O = !1, allowReplace: k = !0, author: A, onAuthorChange: ie, publishCredentials: j = !1, onPublishCredentialsChange: M, rules: N, onRulesChange: P, ruleSourceOptions: ae, isRulesLoading: se = !1, hasRulesLoadError: ce = !1, labels: le = {}, summaryTitleClassName: B = "dial-body-semi-text", headingClassName: V = "dial-body-semi-text", destinationClassName: H = "dial-small-semi-text", calloutFolderNameClassName: ue = "dial-small-paragraph-semi-text", styles: U = {} }) => {
|
|
884
|
+
let { colors: G, folderTree: q, accessRules: de, dependencies: J } = U, Y = {
|
|
885
|
+
...oe({
|
|
886
|
+
"--pp-summary-title-text": G?.summaryTitleText,
|
|
887
|
+
"--pp-heading-text": G?.headingText,
|
|
888
|
+
"--pp-destination-text": G?.destinationText
|
|
792
889
|
}),
|
|
793
|
-
...
|
|
794
|
-
},
|
|
795
|
-
border:
|
|
796
|
-
background:
|
|
797
|
-
}, { folderLabel:
|
|
798
|
-
|
|
799
|
-
},
|
|
890
|
+
...U.cssVars
|
|
891
|
+
}, X = {
|
|
892
|
+
border: G?.summaryBorder,
|
|
893
|
+
background: G?.summaryBackground
|
|
894
|
+
}, { folderLabel: fe = "Publish to folder", destinationAriaLabel: Q = "Destination folder", noFolderSelectedLabel: pe = "No folder selected", changeFolderLabel: me = "Change", chooseFolderLabel: he = "Choose", replaceWarning: ge = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: _e = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: $ = "Publishing failed. Please try again.", adminApprovalTitle: ve = "Admin approval required", adminApprovalMessage: ye = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: be, addSiblingFolderLabel: xe, addChildFolderLabel: Se, cancelCreatingFolderLabel: Ce, createFolderEmptyNameError: we, createFolderInvalidNameError: Te, createFolderDuplicateNameError: Ee, createFolderSameAsParentNameError: De, rootFolderLabel: Oe = "Organization", accessRulesLabels: ke, dependenciesLabels: Ae, searchPlaceholder: je, clearSearchAriaLabel: Me, authorLabel: Ne = "Author", authorPlaceholder: Ie = "Author name", authorHint: Le = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Re = "Publish with my credentials", credentialsHint: ze = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = le, [Be, Ve] = a(""), He = n(), Ue = i(null), Ge = i(null), Ke = (e) => {
|
|
895
|
+
Ve(e ?? "");
|
|
896
|
+
}, qe = i(e);
|
|
800
897
|
t(() => {
|
|
801
|
-
|
|
898
|
+
qe.current !== e && (qe.current = e, e === Z.ChangeFolder ? Ge.current?.focus({ preventScroll: !0 }) : Ue.current?.focus({ preventScroll: !0 }));
|
|
802
899
|
}, [e]);
|
|
803
|
-
let
|
|
804
|
-
hasSelectedFolder:
|
|
805
|
-
hasExistingPublicationInFolder:
|
|
806
|
-
hasWriteAccess:
|
|
900
|
+
let Je = h != null, Ye = r(() => K({
|
|
901
|
+
hasSelectedFolder: Je,
|
|
902
|
+
hasExistingPublicationInFolder: ne,
|
|
903
|
+
hasWriteAccess: C,
|
|
807
904
|
isSubmitting: D,
|
|
808
905
|
hasSubmitError: O,
|
|
809
|
-
allowReplace:
|
|
906
|
+
allowReplace: k
|
|
810
907
|
}), [
|
|
811
|
-
|
|
908
|
+
Je,
|
|
909
|
+
ne,
|
|
812
910
|
C,
|
|
813
|
-
E,
|
|
814
911
|
D,
|
|
815
912
|
O,
|
|
816
|
-
|
|
817
|
-
]),
|
|
818
|
-
className:
|
|
913
|
+
k
|
|
914
|
+
]), Xe = Je ? h[h.length - 1] ?? Oe : "", Ze = l ? l() : /* @__PURE__ */ L("span", {
|
|
915
|
+
className: I("truncate", B, ct.summaryTitle),
|
|
819
916
|
children: s?.title
|
|
820
917
|
});
|
|
821
|
-
if (e ===
|
|
822
|
-
ref:
|
|
918
|
+
if (e === Z.ChangeFolder) return /* @__PURE__ */ R("div", {
|
|
919
|
+
ref: Ge,
|
|
823
920
|
tabIndex: -1,
|
|
824
921
|
role: "group",
|
|
825
|
-
"aria-label":
|
|
826
|
-
className:
|
|
827
|
-
style:
|
|
828
|
-
children: [/* @__PURE__ */
|
|
922
|
+
"aria-label": fe,
|
|
923
|
+
className: I("flex flex-col gap-3 outline-none", Fe.panel),
|
|
924
|
+
style: Y,
|
|
925
|
+
children: [/* @__PURE__ */ L("div", {
|
|
829
926
|
role: "search",
|
|
830
|
-
children: /* @__PURE__ */
|
|
831
|
-
value:
|
|
832
|
-
onChange:
|
|
833
|
-
placeholder:
|
|
834
|
-
clearLabel:
|
|
835
|
-
"aria-label":
|
|
927
|
+
children: /* @__PURE__ */ L(re, {
|
|
928
|
+
value: Be,
|
|
929
|
+
onChange: Ke,
|
|
930
|
+
placeholder: je,
|
|
931
|
+
clearLabel: Me,
|
|
932
|
+
"aria-label": je
|
|
836
933
|
})
|
|
837
|
-
}), /* @__PURE__ */
|
|
838
|
-
items:
|
|
839
|
-
selectedPath:
|
|
840
|
-
onSelectedPathChange:
|
|
841
|
-
onCreateFolder:
|
|
842
|
-
expandedPaths:
|
|
843
|
-
onExpandedPathsChange:
|
|
844
|
-
loadingPaths:
|
|
845
|
-
searchQuery:
|
|
934
|
+
}), /* @__PURE__ */ L(st, {
|
|
935
|
+
items: p,
|
|
936
|
+
selectedPath: g,
|
|
937
|
+
onSelectedPathChange: y,
|
|
938
|
+
onCreateFolder: b,
|
|
939
|
+
expandedPaths: ee,
|
|
940
|
+
onExpandedPathsChange: S,
|
|
941
|
+
loadingPaths: te,
|
|
942
|
+
searchQuery: Be,
|
|
846
943
|
disabled: D,
|
|
847
|
-
noResultsLabel:
|
|
848
|
-
addSiblingFolderLabel:
|
|
849
|
-
addChildFolderLabel:
|
|
850
|
-
cancelCreatingFolderLabel:
|
|
851
|
-
emptyFolderNameError:
|
|
852
|
-
invalidFolderNameError:
|
|
853
|
-
duplicateFolderNameError:
|
|
854
|
-
|
|
855
|
-
|
|
944
|
+
noResultsLabel: be,
|
|
945
|
+
addSiblingFolderLabel: xe,
|
|
946
|
+
addChildFolderLabel: Se,
|
|
947
|
+
cancelCreatingFolderLabel: Ce,
|
|
948
|
+
emptyFolderNameError: we,
|
|
949
|
+
invalidFolderNameError: Te,
|
|
950
|
+
duplicateFolderNameError: Ee,
|
|
951
|
+
sameAsParentFolderNameError: De,
|
|
952
|
+
rootLabel: Oe,
|
|
953
|
+
styles: q
|
|
856
954
|
})]
|
|
857
955
|
});
|
|
858
|
-
let
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
-
className:
|
|
861
|
-
style:
|
|
862
|
-
children: [
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
/* @__PURE__ */ B("h2", {
|
|
876
|
-
className: L("mb-2", se, Ye.sectionHeading),
|
|
877
|
-
children: Y
|
|
956
|
+
let Qe = I(H, ct.destination);
|
|
957
|
+
return /* @__PURE__ */ R("div", {
|
|
958
|
+
className: I("flex flex-col gap-5", Fe.panel),
|
|
959
|
+
style: Y,
|
|
960
|
+
children: [
|
|
961
|
+
s?.type == null ? /* @__PURE__ */ L(F, {
|
|
962
|
+
colors: X,
|
|
963
|
+
children: Ze
|
|
964
|
+
}) : /* @__PURE__ */ L(F, {
|
|
965
|
+
item: {
|
|
966
|
+
type: s.type,
|
|
967
|
+
name: s.title,
|
|
968
|
+
version: s.version ?? "",
|
|
969
|
+
iconUrl: s.iconUrl
|
|
970
|
+
},
|
|
971
|
+
hasVersionTag: !1,
|
|
972
|
+
colors: X
|
|
878
973
|
}),
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
className:
|
|
890
|
-
children:
|
|
974
|
+
/* @__PURE__ */ R("section", { children: [
|
|
975
|
+
/* @__PURE__ */ L("h2", {
|
|
976
|
+
className: I("mb-2", V, ct.sectionHeading),
|
|
977
|
+
children: fe
|
|
978
|
+
}),
|
|
979
|
+
/* @__PURE__ */ R("div", {
|
|
980
|
+
className: "flex min-w-0 items-center gap-2",
|
|
981
|
+
children: [/* @__PURE__ */ L("div", {
|
|
982
|
+
role: "group",
|
|
983
|
+
"aria-label": Q,
|
|
984
|
+
className: "min-w-0 flex-1",
|
|
985
|
+
children: Je ? /* @__PURE__ */ L(_, {
|
|
986
|
+
name: [Oe, ...h].join(" / "),
|
|
987
|
+
nameClassName: Qe
|
|
988
|
+
}) : /* @__PURE__ */ L("span", {
|
|
989
|
+
className: I("block truncate", Qe),
|
|
990
|
+
children: pe
|
|
991
|
+
})
|
|
992
|
+
}), /* @__PURE__ */ L(v, {
|
|
993
|
+
ref: Ue,
|
|
994
|
+
size: m.Small,
|
|
995
|
+
label: Je ? me : he,
|
|
996
|
+
iconBefore: /* @__PURE__ */ L(z, {
|
|
997
|
+
size: u.SM,
|
|
998
|
+
stroke: d,
|
|
999
|
+
"aria-hidden": !0
|
|
1000
|
+
}),
|
|
1001
|
+
disabled: D,
|
|
1002
|
+
onClick: o
|
|
1003
|
+
})]
|
|
1004
|
+
}),
|
|
1005
|
+
Ye.calloutKind === W.Info && /* @__PURE__ */ L("div", {
|
|
1006
|
+
className: "my-4",
|
|
1007
|
+
children: /* @__PURE__ */ L(w, {
|
|
1008
|
+
type: T.SectionMessage,
|
|
1009
|
+
variant: E.Info,
|
|
1010
|
+
title: ve,
|
|
1011
|
+
message: ye
|
|
891
1012
|
})
|
|
892
|
-
}),
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1013
|
+
}),
|
|
1014
|
+
Ye.calloutKind !== W.None && Ye.calloutKind !== W.Info && /* @__PURE__ */ L("div", {
|
|
1015
|
+
className: "mt-3",
|
|
1016
|
+
children: /* @__PURE__ */ L(w, {
|
|
1017
|
+
type: T.SectionMessage,
|
|
1018
|
+
variant: dt(Ye.calloutKind),
|
|
1019
|
+
message: pt(Ye.calloutKind, {
|
|
1020
|
+
replaceWarning: ge,
|
|
1021
|
+
noAccessError: _e,
|
|
1022
|
+
submitError: $,
|
|
1023
|
+
folderName: Xe,
|
|
1024
|
+
version: s?.version,
|
|
1025
|
+
folderNameClassName: ue
|
|
1026
|
+
})
|
|
1027
|
+
})
|
|
1028
|
+
}),
|
|
1029
|
+
/* @__PURE__ */ L("div", {
|
|
1030
|
+
className: "mt-4",
|
|
1031
|
+
children: /* @__PURE__ */ L(x, {
|
|
1032
|
+
id: He,
|
|
1033
|
+
labelProps: { label: Ne },
|
|
1034
|
+
placeholder: Ie,
|
|
1035
|
+
caption: Le,
|
|
1036
|
+
value: A,
|
|
1037
|
+
onChange: (e) => ie(e ?? ""),
|
|
1038
|
+
maxLength: lt,
|
|
1039
|
+
disabled: D
|
|
1040
|
+
})
|
|
1041
|
+
}),
|
|
1042
|
+
M != null && /* @__PURE__ */ L("div", {
|
|
1043
|
+
className: "mt-4",
|
|
1044
|
+
children: /* @__PURE__ */ L(c, {
|
|
1045
|
+
labelProps: { label: Re },
|
|
1046
|
+
caption: ze,
|
|
1047
|
+
isSelected: j,
|
|
1048
|
+
onChange: M,
|
|
1049
|
+
disabled: D
|
|
1050
|
+
})
|
|
1051
|
+
}),
|
|
1052
|
+
/* @__PURE__ */ L("div", {
|
|
1053
|
+
className: "mt-4",
|
|
1054
|
+
children: /* @__PURE__ */ L(Pe, {
|
|
1055
|
+
rules: N,
|
|
1056
|
+
onRulesChange: P,
|
|
1057
|
+
sourceOptions: ae,
|
|
1058
|
+
folderName: Je ? Xe : void 0,
|
|
1059
|
+
disabled: D,
|
|
1060
|
+
isLoading: se,
|
|
1061
|
+
hasLoadError: ce,
|
|
1062
|
+
labels: ke,
|
|
1063
|
+
styles: de
|
|
917
1064
|
})
|
|
918
1065
|
})
|
|
919
|
-
}),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
placeholder: De,
|
|
926
|
-
caption: Oe,
|
|
927
|
-
value: j,
|
|
928
|
-
onChange: (e) => M(e ?? ""),
|
|
929
|
-
maxLength: Xe,
|
|
930
|
-
disabled: D
|
|
931
|
-
})
|
|
932
|
-
}),
|
|
933
|
-
N != null && /* @__PURE__ */ B("div", {
|
|
934
|
-
className: "mt-4",
|
|
935
|
-
children: /* @__PURE__ */ B(c, {
|
|
936
|
-
labelProps: { label: ke },
|
|
937
|
-
caption: je,
|
|
938
|
-
isSelected: te,
|
|
939
|
-
onChange: N,
|
|
940
|
-
disabled: D
|
|
941
|
-
})
|
|
942
|
-
}),
|
|
943
|
-
/* @__PURE__ */ B("div", {
|
|
944
|
-
className: "mt-4",
|
|
945
|
-
children: /* @__PURE__ */ B(Ae, {
|
|
946
|
-
rules: P,
|
|
947
|
-
onRulesChange: I,
|
|
948
|
-
sourceOptions: R,
|
|
949
|
-
folderName: ze ? Ve : void 0,
|
|
950
|
-
disabled: D,
|
|
951
|
-
isLoading: z,
|
|
952
|
-
hasLoadError: ie,
|
|
953
|
-
labels: Ce,
|
|
954
|
-
styles: q
|
|
955
|
-
})
|
|
1066
|
+
] }),
|
|
1067
|
+
f != null && /* @__PURE__ */ L(We, {
|
|
1068
|
+
dependencies: f,
|
|
1069
|
+
labels: Ae,
|
|
1070
|
+
headingClassName: V,
|
|
1071
|
+
styles: J
|
|
956
1072
|
})
|
|
957
|
-
]
|
|
1073
|
+
]
|
|
958
1074
|
});
|
|
959
|
-
},
|
|
1075
|
+
}, dt = (e) => e === W.ReplaceWarning ? E.Warning : E.Error, ft = (e, t, n) => {
|
|
960
1076
|
let [r, i, ...a] = e.split("{folder}");
|
|
961
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
1077
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ R(ce, { children: [
|
|
962
1078
|
r,
|
|
963
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ L("strong", {
|
|
964
1080
|
className: n,
|
|
965
1081
|
children: t
|
|
966
1082
|
}),
|
|
967
1083
|
i
|
|
968
1084
|
] });
|
|
969
|
-
},
|
|
970
|
-
let p =
|
|
971
|
-
return /* @__PURE__ */
|
|
1085
|
+
}, pt = (e, t) => e === W.ReplaceWarning ? ft(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === W.NoAccess ? ft(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, mt = { footer: "_footer_dks1v_1" }, ht = ({ 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 }) => {
|
|
1086
|
+
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;
|
|
1087
|
+
return /* @__PURE__ */ R("div", {
|
|
972
1088
|
style: p,
|
|
973
|
-
className:
|
|
974
|
-
children: [/* @__PURE__ */
|
|
1089
|
+
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", mt.footer),
|
|
1090
|
+
children: [/* @__PURE__ */ L(v, {
|
|
975
1091
|
label: m,
|
|
976
1092
|
className: "mobile:flex-1",
|
|
977
1093
|
disabled: i,
|
|
978
1094
|
onClick: a
|
|
979
|
-
}),
|
|
980
|
-
label:
|
|
1095
|
+
}), b ? /* @__PURE__ */ L(C, {
|
|
1096
|
+
label: y,
|
|
981
1097
|
className: "mobile:flex-1",
|
|
982
1098
|
disabled: l,
|
|
983
1099
|
onClick: c
|
|
984
|
-
}) : /* @__PURE__ */
|
|
985
|
-
label:
|
|
1100
|
+
}) : /* @__PURE__ */ L(D, {
|
|
1101
|
+
label: x,
|
|
986
1102
|
className: "mobile:flex-1",
|
|
987
1103
|
disabled: r,
|
|
988
|
-
iconBefore: i ? /* @__PURE__ */
|
|
1104
|
+
iconBefore: i ? /* @__PURE__ */ L("span", {
|
|
989
1105
|
"aria-hidden": !0,
|
|
990
|
-
children: /* @__PURE__ */
|
|
1106
|
+
children: /* @__PURE__ */ L(ie, { size: u.SM })
|
|
991
1107
|
}) : void 0,
|
|
992
1108
|
onClick: o
|
|
993
1109
|
})]
|
|
994
1110
|
});
|
|
995
|
-
},
|
|
1111
|
+
}, gt = {
|
|
996
1112
|
backdrop: "_backdrop_16jmd_6",
|
|
997
1113
|
panel: "_panel_16jmd_10",
|
|
998
1114
|
divider: "_divider_16jmd_15",
|
|
999
1115
|
content: "_content_16jmd_19",
|
|
1000
1116
|
title: "_title_16jmd_24"
|
|
1001
|
-
},
|
|
1002
|
-
let
|
|
1003
|
-
"--spp-backdrop-bg":
|
|
1004
|
-
"--spp-panel-bg":
|
|
1005
|
-
"--spp-panel-border":
|
|
1006
|
-
"--spp-divider-border":
|
|
1007
|
-
"--spp-scrollbar-thumb":
|
|
1008
|
-
"--spp-title-text":
|
|
1009
|
-
}), [
|
|
1117
|
+
}, _t = ({ 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 }) => {
|
|
1118
|
+
let P = oe({
|
|
1119
|
+
"--spp-backdrop-bg": N?.backdropBackground,
|
|
1120
|
+
"--spp-panel-bg": N?.panelBackground,
|
|
1121
|
+
"--spp-panel-border": N?.panelBorder,
|
|
1122
|
+
"--spp-divider-border": N?.dividerBorder,
|
|
1123
|
+
"--spp-scrollbar-thumb": N?.scrollbarThumb,
|
|
1124
|
+
"--spp-title-text": N?.titleText
|
|
1125
|
+
}), [F, ae] = a(null), { title: se = "Publish", changeFolderTitle: ce = "Change folder", backAriaLabel: z = "Back", ariaLabel: le = "Publish", closeAriaLabel: B = "Close" } = j, V = fe({
|
|
1010
1126
|
isOpen: e,
|
|
1011
|
-
selectedFolderPath:
|
|
1012
|
-
onSelectedFolderPathChange:
|
|
1013
|
-
}),
|
|
1014
|
-
hasSelectedFolder:
|
|
1015
|
-
hasExistingPublicationInFolder:
|
|
1016
|
-
hasWriteAccess:
|
|
1017
|
-
isSubmitting:
|
|
1018
|
-
hasSubmitError:
|
|
1019
|
-
allowReplace:
|
|
1127
|
+
selectedFolderPath: c,
|
|
1128
|
+
onSelectedFolderPathChange: l
|
|
1129
|
+
}), H = V.view === Z.ChangeFolder, ue = r(() => K({
|
|
1130
|
+
hasSelectedFolder: c != null,
|
|
1131
|
+
hasExistingPublicationInFolder: m,
|
|
1132
|
+
hasWriteAccess: h,
|
|
1133
|
+
isSubmitting: g,
|
|
1134
|
+
hasSubmitError: _,
|
|
1135
|
+
allowReplace: v
|
|
1020
1136
|
}), [
|
|
1021
|
-
|
|
1022
|
-
p,
|
|
1137
|
+
c,
|
|
1023
1138
|
m,
|
|
1024
1139
|
h,
|
|
1025
1140
|
g,
|
|
1026
|
-
_
|
|
1141
|
+
_,
|
|
1142
|
+
v
|
|
1027
1143
|
]);
|
|
1028
1144
|
return t(() => {
|
|
1029
|
-
let t =
|
|
1145
|
+
let t = F?.closest("[role=\"dialog\"]");
|
|
1030
1146
|
if (!e || !t) return;
|
|
1031
1147
|
let n = () => t.focus({ preventScroll: !0 });
|
|
1032
1148
|
n();
|
|
@@ -1036,224 +1152,226 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1036
1152
|
document.addEventListener("focusin", r);
|
|
1037
1153
|
let i = requestAnimationFrame(() => {
|
|
1038
1154
|
document.removeEventListener("focusin", r);
|
|
1039
|
-
}), a =
|
|
1155
|
+
}), a = w?.current;
|
|
1040
1156
|
return () => {
|
|
1041
1157
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
1042
1158
|
};
|
|
1043
1159
|
}, [
|
|
1044
1160
|
e,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
]), /* @__PURE__ */
|
|
1161
|
+
F,
|
|
1162
|
+
w
|
|
1163
|
+
]), /* @__PURE__ */ R(A, {
|
|
1048
1164
|
open: e,
|
|
1049
|
-
onClose:
|
|
1050
|
-
header: /* @__PURE__ */
|
|
1051
|
-
className:
|
|
1052
|
-
children:
|
|
1165
|
+
onClose: C,
|
|
1166
|
+
header: /* @__PURE__ */ L("span", {
|
|
1167
|
+
className: I("block truncate text-center", M, gt.title),
|
|
1168
|
+
children: H ? ce : se
|
|
1053
1169
|
}),
|
|
1054
|
-
ariaLabel:
|
|
1055
|
-
onBack:
|
|
1056
|
-
backAriaLabel:
|
|
1057
|
-
backDisabled:
|
|
1058
|
-
closeAriaLabel:
|
|
1059
|
-
closeDisabled:
|
|
1060
|
-
style:
|
|
1061
|
-
overlayStyle:
|
|
1062
|
-
className:
|
|
1063
|
-
overlayClassName:
|
|
1064
|
-
headerClassName:
|
|
1170
|
+
ariaLabel: le,
|
|
1171
|
+
onBack: H ? V.backToMain : void 0,
|
|
1172
|
+
backAriaLabel: z,
|
|
1173
|
+
backDisabled: g,
|
|
1174
|
+
closeAriaLabel: B,
|
|
1175
|
+
closeDisabled: g,
|
|
1176
|
+
style: P,
|
|
1177
|
+
overlayStyle: P,
|
|
1178
|
+
className: I(gt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1179
|
+
overlayClassName: gt.backdrop,
|
|
1180
|
+
headerClassName: I("px-[22px]", gt.divider),
|
|
1065
1181
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1066
|
-
children: [/* @__PURE__ */
|
|
1067
|
-
ref:
|
|
1068
|
-
className:
|
|
1069
|
-
children: /* @__PURE__ */
|
|
1182
|
+
children: [/* @__PURE__ */ L("div", {
|
|
1183
|
+
ref: ae,
|
|
1184
|
+
className: I("min-h-0 flex-1 overflow-y-auto", gt.content),
|
|
1185
|
+
children: /* @__PURE__ */ L("div", {
|
|
1070
1186
|
className: "p-[22px]",
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1187
|
+
children: /* @__PURE__ */ L(ut, {
|
|
1072
1188
|
resource: n,
|
|
1073
1189
|
renderSummary: i,
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1190
|
+
dependencies: o,
|
|
1191
|
+
view: V.view,
|
|
1192
|
+
onChangeFolderClick: V.openFolderView,
|
|
1193
|
+
folderItems: s,
|
|
1194
|
+
selectedFolderPath: c,
|
|
1195
|
+
pendingFolderPath: V.pendingFolderPath,
|
|
1196
|
+
onPendingFolderPathChange: V.setPendingFolderPath,
|
|
1197
|
+
onCreateFolder: u,
|
|
1198
|
+
expandedPaths: d,
|
|
1199
|
+
onExpandedPathsChange: f,
|
|
1200
|
+
loadingPaths: p,
|
|
1201
|
+
hasExistingPublicationInFolder: m,
|
|
1202
|
+
hasWriteAccess: h,
|
|
1203
|
+
isSubmitting: g,
|
|
1204
|
+
hasSubmitError: _,
|
|
1205
|
+
allowReplace: v,
|
|
1206
|
+
author: y,
|
|
1207
|
+
onAuthorChange: b,
|
|
1208
|
+
rules: x,
|
|
1209
|
+
onRulesChange: ee,
|
|
1210
|
+
ruleSourceOptions: S,
|
|
1211
|
+
isRulesLoading: te,
|
|
1212
|
+
hasRulesLoadError: ne,
|
|
1213
|
+
labels: E,
|
|
1214
|
+
styles: D,
|
|
1215
|
+
summaryTitleClassName: O,
|
|
1216
|
+
headingClassName: re,
|
|
1217
|
+
calloutFolderNameClassName: k
|
|
1101
1218
|
})
|
|
1102
1219
|
})
|
|
1103
|
-
}), /* @__PURE__ */
|
|
1220
|
+
}), /* @__PURE__ */ L(ht, {
|
|
1104
1221
|
version: n?.version,
|
|
1105
|
-
hasExistingPublicationInFolder:
|
|
1106
|
-
allowReplace:
|
|
1107
|
-
isSubmitDisabled:
|
|
1108
|
-
isSubmitLoading:
|
|
1109
|
-
onCancel:
|
|
1110
|
-
onSubmit:
|
|
1111
|
-
view:
|
|
1112
|
-
onSelectFolder:
|
|
1113
|
-
isSelectFolderDisabled:
|
|
1114
|
-
labels:
|
|
1222
|
+
hasExistingPublicationInFolder: m,
|
|
1223
|
+
allowReplace: v,
|
|
1224
|
+
isSubmitDisabled: ue.isSubmitDisabled,
|
|
1225
|
+
isSubmitLoading: ue.isSubmitLoading,
|
|
1226
|
+
onCancel: H ? V.backToMain : C,
|
|
1227
|
+
onSubmit: T,
|
|
1228
|
+
view: V.view,
|
|
1229
|
+
onSelectFolder: V.selectFolder,
|
|
1230
|
+
isSelectFolderDisabled: V.pendingFolderPath == null,
|
|
1231
|
+
labels: ie
|
|
1115
1232
|
})]
|
|
1116
1233
|
});
|
|
1117
|
-
},
|
|
1118
|
-
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v =
|
|
1119
|
-
return /* @__PURE__ */
|
|
1234
|
+
}, vt = { option: "_option_skygm_1" }, yt = (e, t) => `Unpublish "${e}" from "${t}"?`, bt = (e) => `Choose which folder to unpublish "${e}" from.`, xt = ({ 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 }) => {
|
|
1235
|
+
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = yt, selectFolderMessage: y = bt } = o ?? {}, b = n.length > 1;
|
|
1236
|
+
return /* @__PURE__ */ L(N, {
|
|
1120
1237
|
open: e,
|
|
1121
1238
|
title: f,
|
|
1122
1239
|
confirmLabel: p,
|
|
1123
1240
|
cancelLabel: m,
|
|
1124
1241
|
variant: l.Danger,
|
|
1125
1242
|
isLoading: a,
|
|
1126
|
-
isConfirmDisabled:
|
|
1243
|
+
isConfirmDisabled: b && r == null,
|
|
1127
1244
|
loadingStatusLabel: _,
|
|
1128
|
-
message: /* @__PURE__ */
|
|
1245
|
+
message: /* @__PURE__ */ L("span", {
|
|
1129
1246
|
className: "wrap-break-word",
|
|
1130
|
-
children:
|
|
1247
|
+
children: b ? y(t) : v(t, ye(n[0] ?? "", h))
|
|
1131
1248
|
}),
|
|
1132
1249
|
onConfirm: u,
|
|
1133
1250
|
onClose: d,
|
|
1134
|
-
children:
|
|
1251
|
+
children: b && /* @__PURE__ */ L("div", {
|
|
1135
1252
|
className: "mt-3",
|
|
1136
|
-
style:
|
|
1137
|
-
children: /* @__PURE__ */
|
|
1253
|
+
style: oe({ "--ucd-option-text": c?.optionText }),
|
|
1254
|
+
children: /* @__PURE__ */ L(O, {
|
|
1138
1255
|
ariaLabel: g,
|
|
1139
1256
|
value: r ?? void 0,
|
|
1140
1257
|
onChange: i,
|
|
1141
1258
|
disabled: a,
|
|
1142
1259
|
items: n.map((e) => ({
|
|
1143
1260
|
value: e,
|
|
1144
|
-
label:
|
|
1261
|
+
label: ye(e, h)
|
|
1145
1262
|
})),
|
|
1146
|
-
radioClassName:
|
|
1263
|
+
radioClassName: I(s, vt.option)
|
|
1147
1264
|
})
|
|
1148
1265
|
})
|
|
1149
1266
|
});
|
|
1150
|
-
},
|
|
1267
|
+
}, St = /* @__PURE__ */ function(e) {
|
|
1151
1268
|
return e.Keep = "keep", e.New = "new", e;
|
|
1152
|
-
}({}),
|
|
1269
|
+
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
1153
1270
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
1154
|
-
}({}),
|
|
1271
|
+
}({}), wt = {
|
|
1155
1272
|
heading: "_heading_vk731_1",
|
|
1156
1273
|
destination: "_destination_vk731_5"
|
|
1157
|
-
},
|
|
1158
|
-
let { saveToFolderHeading:
|
|
1159
|
-
...
|
|
1274
|
+
}, Tt = ({ 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" }) => {
|
|
1275
|
+
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 = {
|
|
1276
|
+
...oe({
|
|
1160
1277
|
"--stf-heading-text": J?.headingText,
|
|
1161
1278
|
"--stf-destination-text": J?.destinationText
|
|
1162
1279
|
}),
|
|
1163
|
-
...
|
|
1164
|
-
},
|
|
1280
|
+
...E.cssVars
|
|
1281
|
+
}, Z = {
|
|
1165
1282
|
border: J?.summaryBorder,
|
|
1166
1283
|
background: J?.summaryBackground
|
|
1167
|
-
}, [fe,
|
|
1168
|
-
if (e ===
|
|
1284
|
+
}, [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, wt.heading);
|
|
1285
|
+
if (e === Ct.ChangeFolder) return /* @__PURE__ */ R("div", {
|
|
1169
1286
|
className: "flex flex-col gap-3",
|
|
1170
|
-
style:
|
|
1287
|
+
style: X,
|
|
1171
1288
|
children: [
|
|
1172
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ L("div", {
|
|
1173
1290
|
role: "search",
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1291
|
+
children: /* @__PURE__ */ L(re, {
|
|
1175
1292
|
value: fe,
|
|
1176
|
-
onChange: (e) =>
|
|
1177
|
-
placeholder:
|
|
1178
|
-
clearLabel:
|
|
1179
|
-
"aria-label":
|
|
1293
|
+
onChange: (e) => Q(e ?? ""),
|
|
1294
|
+
placeholder: ce,
|
|
1295
|
+
clearLabel: le,
|
|
1296
|
+
"aria-label": ce
|
|
1180
1297
|
})
|
|
1181
1298
|
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
politeness:
|
|
1184
|
-
children:
|
|
1299
|
+
/* @__PURE__ */ L(S, {
|
|
1300
|
+
politeness: ne.Assertive,
|
|
1301
|
+
children: C && /* @__PURE__ */ R("div", {
|
|
1185
1302
|
className: "flex flex-wrap items-center gap-2",
|
|
1186
|
-
children: [/* @__PURE__ */
|
|
1187
|
-
label:
|
|
1188
|
-
onClick:
|
|
1303
|
+
children: [/* @__PURE__ */ L(h, { text: C }), w && /* @__PURE__ */ L(ee, {
|
|
1304
|
+
label: de,
|
|
1305
|
+
onClick: w
|
|
1189
1306
|
})]
|
|
1190
1307
|
})
|
|
1191
1308
|
}),
|
|
1192
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ L(st, {
|
|
1193
1310
|
roots: i,
|
|
1194
1311
|
destination: f,
|
|
1195
|
-
onDestinationChange:
|
|
1312
|
+
onDestinationChange: p,
|
|
1196
1313
|
onCreateDestinationFolder: s,
|
|
1197
1314
|
searchQuery: fe,
|
|
1198
|
-
disabled:
|
|
1199
|
-
noResultsLabel:
|
|
1200
|
-
createFolderLabel:
|
|
1201
|
-
cancelCreatingFolderLabel:
|
|
1202
|
-
addSiblingFolderLabel:
|
|
1203
|
-
addChildFolderLabel:
|
|
1204
|
-
emptyFolderNameError:
|
|
1205
|
-
invalidFolderNameError:
|
|
1206
|
-
duplicateFolderNameError:
|
|
1207
|
-
|
|
1315
|
+
disabled: b,
|
|
1316
|
+
noResultsLabel: B,
|
|
1317
|
+
createFolderLabel: V,
|
|
1318
|
+
cancelCreatingFolderLabel: H,
|
|
1319
|
+
addSiblingFolderLabel: ue,
|
|
1320
|
+
addChildFolderLabel: U,
|
|
1321
|
+
emptyFolderNameError: W,
|
|
1322
|
+
invalidFolderNameError: G,
|
|
1323
|
+
duplicateFolderNameError: K,
|
|
1324
|
+
sameAsParentFolderNameError: q,
|
|
1325
|
+
styles: Y
|
|
1208
1326
|
}),
|
|
1209
|
-
|
|
1327
|
+
y && he?.hasAccessRules && /* @__PURE__ */ L("div", {
|
|
1210
1328
|
className: "mt-1",
|
|
1211
|
-
children: /* @__PURE__ */
|
|
1212
|
-
rules:
|
|
1213
|
-
onRulesChange:
|
|
1214
|
-
sourceOptions:
|
|
1215
|
-
folderName:
|
|
1216
|
-
disabled:
|
|
1217
|
-
isLoading:
|
|
1218
|
-
hasLoadError:
|
|
1219
|
-
labels:
|
|
1220
|
-
styles:
|
|
1329
|
+
children: /* @__PURE__ */ L(Pe, {
|
|
1330
|
+
rules: y.rules,
|
|
1331
|
+
onRulesChange: y.onRulesChange,
|
|
1332
|
+
sourceOptions: y.sourceOptions,
|
|
1333
|
+
folderName: ge,
|
|
1334
|
+
disabled: b,
|
|
1335
|
+
isLoading: y.isLoading,
|
|
1336
|
+
hasLoadError: y.hasLoadError,
|
|
1337
|
+
labels: y.labels,
|
|
1338
|
+
styles: y.styles
|
|
1221
1339
|
})
|
|
1222
1340
|
})
|
|
1223
1341
|
]
|
|
1224
1342
|
});
|
|
1225
|
-
let
|
|
1226
|
-
value:
|
|
1227
|
-
label:
|
|
1343
|
+
let $ = g ? [{
|
|
1344
|
+
value: St.Keep,
|
|
1345
|
+
label: N.replace("{version}", g.currentVersion)
|
|
1228
1346
|
}, {
|
|
1229
|
-
value:
|
|
1230
|
-
label:
|
|
1231
|
-
content: /* @__PURE__ */
|
|
1232
|
-
id:
|
|
1233
|
-
value:
|
|
1234
|
-
onChange: (e) =>
|
|
1235
|
-
onBlur:
|
|
1347
|
+
value: St.New,
|
|
1348
|
+
label: P,
|
|
1349
|
+
content: /* @__PURE__ */ L(x, {
|
|
1350
|
+
id: pe,
|
|
1351
|
+
value: g.newVersion,
|
|
1352
|
+
onChange: (e) => g.onNewVersionChange(e ?? ""),
|
|
1353
|
+
onBlur: g.onNewVersionBlur,
|
|
1236
1354
|
labelProps: {
|
|
1237
|
-
label:
|
|
1355
|
+
label: ae,
|
|
1238
1356
|
required: !0
|
|
1239
1357
|
},
|
|
1240
|
-
placeholder:
|
|
1241
|
-
error:
|
|
1242
|
-
invalid: !!
|
|
1243
|
-
disabled:
|
|
1358
|
+
placeholder: se,
|
|
1359
|
+
error: g.newVersionError,
|
|
1360
|
+
invalid: !!g.newVersionError,
|
|
1361
|
+
disabled: b
|
|
1244
1362
|
})
|
|
1245
1363
|
}] : [];
|
|
1246
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ R("div", {
|
|
1247
1365
|
className: "flex flex-col gap-5",
|
|
1248
|
-
style:
|
|
1366
|
+
style: X,
|
|
1249
1367
|
children: [
|
|
1250
|
-
t.type == null ? /* @__PURE__ */
|
|
1251
|
-
colors:
|
|
1252
|
-
children: /* @__PURE__ */
|
|
1253
|
-
className:
|
|
1368
|
+
t.type == null ? /* @__PURE__ */ L(F, {
|
|
1369
|
+
colors: Z,
|
|
1370
|
+
children: /* @__PURE__ */ L("span", {
|
|
1371
|
+
className: I("truncate", _e),
|
|
1254
1372
|
children: t.title
|
|
1255
1373
|
})
|
|
1256
|
-
}) : /* @__PURE__ */
|
|
1374
|
+
}) : /* @__PURE__ */ L(F, {
|
|
1257
1375
|
item: {
|
|
1258
1376
|
type: t.type,
|
|
1259
1377
|
name: t.title,
|
|
@@ -1261,146 +1379,146 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1261
1379
|
iconUrl: t.iconUrl
|
|
1262
1380
|
},
|
|
1263
1381
|
hasVersionTag: !1,
|
|
1264
|
-
colors:
|
|
1382
|
+
colors: Z
|
|
1265
1383
|
}),
|
|
1266
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ R("section", {
|
|
1267
1385
|
className: "flex flex-col gap-2",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1269
|
-
className:
|
|
1270
|
-
children:
|
|
1271
|
-
}), /* @__PURE__ */
|
|
1386
|
+
children: [/* @__PURE__ */ L("h2", {
|
|
1387
|
+
className: _e,
|
|
1388
|
+
children: A
|
|
1389
|
+
}), /* @__PURE__ */ R("div", {
|
|
1272
1390
|
className: "flex min-w-0 items-center gap-2",
|
|
1273
|
-
children: [/* @__PURE__ */
|
|
1391
|
+
children: [/* @__PURE__ */ L("div", {
|
|
1274
1392
|
role: "group",
|
|
1275
|
-
"aria-label":
|
|
1393
|
+
"aria-label": j,
|
|
1276
1394
|
className: "min-w-0 flex-1",
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1278
|
-
name:
|
|
1279
|
-
nameClassName:
|
|
1395
|
+
children: /* @__PURE__ */ L(_, {
|
|
1396
|
+
name: me.join(" / "),
|
|
1397
|
+
nameClassName: I(k, wt.destination)
|
|
1280
1398
|
})
|
|
1281
|
-
}), /* @__PURE__ */
|
|
1399
|
+
}), /* @__PURE__ */ L(v, {
|
|
1282
1400
|
ref: l,
|
|
1283
|
-
size:
|
|
1284
|
-
label:
|
|
1285
|
-
iconBefore: /* @__PURE__ */
|
|
1401
|
+
size: m.Small,
|
|
1402
|
+
label: ie,
|
|
1403
|
+
iconBefore: /* @__PURE__ */ L(z, {
|
|
1286
1404
|
size: u.SM,
|
|
1287
1405
|
stroke: d,
|
|
1288
1406
|
"aria-hidden": !0
|
|
1289
1407
|
}),
|
|
1290
|
-
disabled:
|
|
1408
|
+
disabled: b,
|
|
1291
1409
|
onClick: c
|
|
1292
1410
|
})]
|
|
1293
1411
|
})]
|
|
1294
1412
|
}),
|
|
1295
|
-
|
|
1413
|
+
g && /* @__PURE__ */ R("section", {
|
|
1296
1414
|
className: "flex flex-col gap-2",
|
|
1297
|
-
children: [/* @__PURE__ */
|
|
1298
|
-
className:
|
|
1299
|
-
children:
|
|
1300
|
-
}), /* @__PURE__ */
|
|
1301
|
-
ariaLabel:
|
|
1302
|
-
value:
|
|
1303
|
-
onChange: (e) =>
|
|
1304
|
-
items:
|
|
1305
|
-
disabled:
|
|
1415
|
+
children: [/* @__PURE__ */ L("h2", {
|
|
1416
|
+
className: _e,
|
|
1417
|
+
children: M
|
|
1418
|
+
}), /* @__PURE__ */ L(O, {
|
|
1419
|
+
ariaLabel: M,
|
|
1420
|
+
value: g.versionMode,
|
|
1421
|
+
onChange: (e) => g.onVersionModeChange(e),
|
|
1422
|
+
items: $,
|
|
1423
|
+
disabled: b
|
|
1306
1424
|
})]
|
|
1307
1425
|
}),
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
politeness:
|
|
1310
|
-
children:
|
|
1426
|
+
/* @__PURE__ */ L(S, {
|
|
1427
|
+
politeness: ne.Assertive,
|
|
1428
|
+
children: te && /* @__PURE__ */ L(h, { text: te })
|
|
1311
1429
|
})
|
|
1312
1430
|
]
|
|
1313
1431
|
});
|
|
1314
|
-
},
|
|
1432
|
+
}, Et = {
|
|
1315
1433
|
backdrop: "_backdrop_1ie8s_6",
|
|
1316
1434
|
panel: "_panel_1ie8s_10",
|
|
1317
1435
|
divider: "_divider_1ie8s_15",
|
|
1318
1436
|
footer: "_footer_1ie8s_19",
|
|
1319
1437
|
content: "_content_1ie8s_23",
|
|
1320
1438
|
title: "_title_1ie8s_28"
|
|
1321
|
-
},
|
|
1322
|
-
let { title:
|
|
1439
|
+
}, Dt = ({ 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 }) => {
|
|
1440
|
+
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({
|
|
1323
1441
|
"--sstf-backdrop-bg": l?.backdropBackground,
|
|
1324
1442
|
"--sstf-panel-bg": l?.panelBackground,
|
|
1325
1443
|
"--sstf-panel-border": l?.panelBorder,
|
|
1326
1444
|
"--sstf-divider-border": l?.dividerBorder,
|
|
1327
1445
|
"--sstf-scrollbar-thumb": l?.scrollbarThumb,
|
|
1328
1446
|
"--sstf-title-text": l?.titleText
|
|
1329
|
-
}), [
|
|
1447
|
+
}), [T, E] = a(Ct.Main), [O, re] = a(f), k = i(null), j = i(null);
|
|
1330
1448
|
t(() => {
|
|
1331
|
-
e &&
|
|
1449
|
+
e && E(Ct.Main);
|
|
1332
1450
|
}, [e]);
|
|
1333
|
-
let
|
|
1451
|
+
let M = i(T);
|
|
1334
1452
|
t(() => {
|
|
1335
|
-
|
|
1336
|
-
}, [
|
|
1337
|
-
let
|
|
1453
|
+
M.current !== T && (M.current = T, T === Ct.ChangeFolder ? k.current?.focus({ preventScroll: !0 }) : j.current?.focus({ preventScroll: !0 }));
|
|
1454
|
+
}, [T]);
|
|
1455
|
+
let N = i(e);
|
|
1338
1456
|
t(() => {
|
|
1339
|
-
let t =
|
|
1340
|
-
|
|
1457
|
+
let t = N.current;
|
|
1458
|
+
N.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1341
1459
|
}, [e, s]);
|
|
1342
|
-
let
|
|
1343
|
-
|
|
1344
|
-
}, re = () => {
|
|
1345
|
-
z(f), k(ut.ChangeFolder);
|
|
1346
|
-
}, ie = () => {
|
|
1347
|
-
h?.(f), k(ut.Main);
|
|
1460
|
+
let P = T === Ct.ChangeFolder, F = (e) => {
|
|
1461
|
+
re(e), h?.(e);
|
|
1348
1462
|
}, ae = () => {
|
|
1349
|
-
|
|
1463
|
+
F(f), E(Ct.ChangeFolder);
|
|
1464
|
+
}, se = () => {
|
|
1465
|
+
h?.(f), E(Ct.Main);
|
|
1466
|
+
}, ce = () => {
|
|
1467
|
+
O && p(O), E(Ct.Main);
|
|
1350
1468
|
};
|
|
1351
|
-
return /* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ R(A, {
|
|
1352
1470
|
open: e,
|
|
1353
1471
|
onClose: n,
|
|
1354
|
-
header: /* @__PURE__ */
|
|
1355
|
-
ref:
|
|
1472
|
+
header: /* @__PURE__ */ L("span", {
|
|
1473
|
+
ref: k,
|
|
1356
1474
|
tabIndex: -1,
|
|
1357
|
-
className:
|
|
1358
|
-
children:
|
|
1475
|
+
className: I("block truncate outline-none", d, Et.title),
|
|
1476
|
+
children: P ? y : _
|
|
1359
1477
|
}),
|
|
1360
|
-
ariaLabel:
|
|
1361
|
-
onBack:
|
|
1362
|
-
backAriaLabel:
|
|
1478
|
+
ariaLabel: _,
|
|
1479
|
+
onBack: P ? se : void 0,
|
|
1480
|
+
backAriaLabel: x,
|
|
1363
1481
|
backDisabled: m,
|
|
1364
|
-
closeAriaLabel:
|
|
1482
|
+
closeAriaLabel: b,
|
|
1365
1483
|
closeDisabled: m,
|
|
1366
|
-
style:
|
|
1367
|
-
overlayStyle:
|
|
1368
|
-
className:
|
|
1369
|
-
overlayClassName:
|
|
1370
|
-
headerClassName:
|
|
1484
|
+
style: w,
|
|
1485
|
+
overlayStyle: w,
|
|
1486
|
+
className: I(Et.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1487
|
+
overlayClassName: Et.backdrop,
|
|
1488
|
+
headerClassName: I("px-[22px]", Et.divider),
|
|
1371
1489
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1372
|
-
children: [/* @__PURE__ */
|
|
1373
|
-
className:
|
|
1374
|
-
children: /* @__PURE__ */
|
|
1375
|
-
...
|
|
1376
|
-
view:
|
|
1490
|
+
children: [/* @__PURE__ */ L("div", {
|
|
1491
|
+
className: I("min-h-0 flex-1 overflow-y-auto p-[22px]", Et.content),
|
|
1492
|
+
children: /* @__PURE__ */ L(Tt, {
|
|
1493
|
+
...g,
|
|
1494
|
+
view: T,
|
|
1377
1495
|
destination: f,
|
|
1378
1496
|
onDestinationChange: p,
|
|
1379
1497
|
isSubmitting: m,
|
|
1380
|
-
onChangeFolderClick:
|
|
1381
|
-
changeFolderButtonRef:
|
|
1382
|
-
pendingDestination:
|
|
1383
|
-
onPendingDestinationChange:
|
|
1498
|
+
onChangeFolderClick: ae,
|
|
1499
|
+
changeFolderButtonRef: j,
|
|
1500
|
+
pendingDestination: O,
|
|
1501
|
+
onPendingDestinationChange: F
|
|
1384
1502
|
})
|
|
1385
|
-
}), /* @__PURE__ */
|
|
1386
|
-
className:
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1388
|
-
label:
|
|
1503
|
+
}), /* @__PURE__ */ R("div", {
|
|
1504
|
+
className: I("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Et.footer),
|
|
1505
|
+
children: [/* @__PURE__ */ L(v, {
|
|
1506
|
+
label: ee,
|
|
1389
1507
|
className: "mobile:flex-1",
|
|
1390
1508
|
disabled: m,
|
|
1391
|
-
onClick:
|
|
1392
|
-
}),
|
|
1393
|
-
label:
|
|
1509
|
+
onClick: P ? se : n
|
|
1510
|
+
}), P ? /* @__PURE__ */ L(C, {
|
|
1511
|
+
label: ne,
|
|
1394
1512
|
className: "mobile:flex-1",
|
|
1395
|
-
disabled:
|
|
1396
|
-
onClick:
|
|
1397
|
-
}) : /* @__PURE__ */
|
|
1398
|
-
label: m ?
|
|
1513
|
+
disabled: O == null,
|
|
1514
|
+
onClick: ce
|
|
1515
|
+
}) : /* @__PURE__ */ L(D, {
|
|
1516
|
+
label: m ? te : S,
|
|
1399
1517
|
className: "mobile:flex-1",
|
|
1400
1518
|
disabled: o || m,
|
|
1401
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1519
|
+
iconBefore: m ? /* @__PURE__ */ L("span", {
|
|
1402
1520
|
"aria-hidden": !0,
|
|
1403
|
-
children: /* @__PURE__ */
|
|
1521
|
+
children: /* @__PURE__ */ L(ie, { size: u.SM })
|
|
1404
1522
|
}) : void 0,
|
|
1405
1523
|
onClick: r
|
|
1406
1524
|
})]
|
|
@@ -1408,4 +1526,4 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
1408
1526
|
});
|
|
1409
1527
|
};
|
|
1410
1528
|
//#endregion
|
|
1411
|
-
export {
|
|
1529
|
+
export { Fe as PUBLISH_PANEL_CLASS, U as PublicationRuleFunction, Ae as PublishAccessRuleEditor, Pe as PublishAccessRules, W as PublishCalloutKind, We as PublishDependenciesList, G as PublishDependencyType, st as PublishFoldersTree, ht as PublishFooter, Ke as PublishHistoryList, ut as PublishPanel, Z as PublishPanelView, Tt as SaveToFolderPanel, Ct as SaveToFolderView, St as SaveVersionMode, _t as StandalonePublishPanel, Dt as StandaloneSaveToFolderPanel, xt 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 };
|