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