@epam/ai-dial-publish-panel 1.4.0-dev.178 → 1.4.0-dev.182
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 +2 -0
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +2 -0
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/components/SaveToFolderPanel/StandaloneSaveToFolderPanel.d.ts.map +1 -1
- package/index.js +510 -507
- 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/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 O, RadioGroup as k, SideDrawer as ee, Skeleton as A, SkeletonVariant as
|
|
3
|
-
import { ConfirmationDialog as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { FolderDestinationPanel as
|
|
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 j, Spinner as M, Tag as N } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { ConfirmationDialog as P, DeploymentIcon as te, EntityHeader as ne, ResourceSummary as F, buildCssVars as I, mergeClasses as L } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
5
|
+
import { FolderDestinationPanel as re, FolderDestinationPanelBody as ie, FolderDestinationView as ae } from "@epam/ai-dial-react-file-manager";
|
|
6
|
+
import { IconFolder as oe } from "@tabler/icons-react";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var V = /* @__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
|
-
}({}), V = /* @__PURE__ */ function(e) {
|
|
11
|
-
return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
|
|
12
10
|
}({}), H = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
|
|
12
|
+
}({}), U = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.Warning = "warning", e.Published = "published", e;
|
|
14
|
-
}({}),
|
|
15
|
-
calloutKind:
|
|
14
|
+
}({}), se = (e) => e.isSubmitting ? {
|
|
15
|
+
calloutKind: V.None,
|
|
16
16
|
isSubmitDisabled: !0,
|
|
17
17
|
isSubmitLoading: !0
|
|
18
18
|
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.isTargetChecking ? {
|
|
19
|
-
calloutKind:
|
|
19
|
+
calloutKind: V.None,
|
|
20
20
|
isSubmitDisabled: !0,
|
|
21
21
|
isSubmitLoading: !1
|
|
22
22
|
} : e.hasSubmitError ? {
|
|
23
|
-
calloutKind:
|
|
23
|
+
calloutKind: V.SubmitError,
|
|
24
24
|
isSubmitDisabled: !1,
|
|
25
25
|
isSubmitLoading: !1
|
|
26
26
|
} : e.hasExistingPublicationInFolder ? {
|
|
27
|
-
calloutKind:
|
|
27
|
+
calloutKind: V.ReplaceWarning,
|
|
28
28
|
isSubmitDisabled: e.allowReplace === !1,
|
|
29
29
|
isSubmitLoading: !1
|
|
30
30
|
} : e.isTargetTaken ? {
|
|
31
|
-
calloutKind:
|
|
31
|
+
calloutKind: V.TargetTaken,
|
|
32
32
|
isSubmitDisabled: !0,
|
|
33
33
|
isSubmitLoading: !1
|
|
34
34
|
} : {
|
|
35
|
-
calloutKind:
|
|
35
|
+
calloutKind: V.Info,
|
|
36
36
|
isSubmitDisabled: !1,
|
|
37
37
|
isSubmitLoading: !1
|
|
38
38
|
} : {
|
|
39
|
-
calloutKind:
|
|
39
|
+
calloutKind: V.NoAccess,
|
|
40
40
|
isSubmitDisabled: !0,
|
|
41
41
|
isSubmitLoading: !1
|
|
42
42
|
} : {
|
|
43
|
-
calloutKind:
|
|
43
|
+
calloutKind: V.None,
|
|
44
44
|
isSubmitDisabled: !0,
|
|
45
45
|
isSubmitLoading: !1
|
|
46
|
-
},
|
|
47
|
-
let r = Math.floor((t - e) /
|
|
46
|
+
}, W = 864e5, G = (e, t = Date.now(), n) => {
|
|
47
|
+
let r = Math.floor((t - e) / W);
|
|
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
|
+
}, ce = (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,17 +61,17 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
}]
|
|
62
62
|
} : {
|
|
63
63
|
...e,
|
|
64
|
-
children: e.children ?
|
|
65
|
-
}),
|
|
64
|
+
children: e.children ? ce(e.children, t, n) : e.children
|
|
65
|
+
}), le = (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 ? le(e.children, t, n) : e.children
|
|
73
73
|
});
|
|
74
|
-
},
|
|
74
|
+
}, ue = ({ 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);
|
|
@@ -80,66 +80,66 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
80
80
|
t(() => {
|
|
81
81
|
ee || D(l);
|
|
82
82
|
}, [l, ee]);
|
|
83
|
-
let
|
|
83
|
+
let j = e((e) => {
|
|
84
84
|
A(!0), D(e);
|
|
85
|
-
}, []),
|
|
85
|
+
}, []), M = b != null && g != null && _ != null && g(b);
|
|
86
86
|
t(() => {
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
let
|
|
90
|
-
if (!b ||
|
|
87
|
+
M && k(!1);
|
|
88
|
+
}, [M]);
|
|
89
|
+
let N = r(() => {
|
|
90
|
+
if (!b || M) return !1;
|
|
91
91
|
let e = b.join("/");
|
|
92
92
|
return o.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
|
|
93
93
|
}, [
|
|
94
94
|
o,
|
|
95
|
-
|
|
95
|
+
M,
|
|
96
96
|
n.version,
|
|
97
97
|
b
|
|
98
|
-
]),
|
|
98
|
+
]), P = i(/* @__PURE__ */ new Set()), [te, ne] = a(), [F, I] = a(), [L, R] = a(!1), z = b == null ? void 0 : `${n.id ?? ""}\u0000${b.join("/")}\u0000${n.version ?? ""}`, B = z != null && (te === z || F === z);
|
|
99
99
|
t(() => {
|
|
100
|
-
if (b == null ||
|
|
101
|
-
|
|
100
|
+
if (b == null || z == null || !m || N) {
|
|
101
|
+
R(!1);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
let e = b.join("/");
|
|
105
|
-
if ([...
|
|
106
|
-
|
|
105
|
+
if ([...P.current].some((t) => e === t || e.startsWith(`${t}/`))) {
|
|
106
|
+
R(!1);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
let t = !1;
|
|
110
|
-
return
|
|
111
|
-
t ||
|
|
110
|
+
return R(!0), m(n, b).then((e) => {
|
|
111
|
+
t || ne((t) => e ? z : t === z ? void 0 : t);
|
|
112
112
|
}).catch(() => void 0).finally(() => {
|
|
113
|
-
t ||
|
|
113
|
+
t || R(!1);
|
|
114
114
|
}), () => {
|
|
115
115
|
t = !0;
|
|
116
116
|
};
|
|
117
117
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
z,
|
|
119
|
+
N,
|
|
120
120
|
m == null
|
|
121
121
|
]);
|
|
122
|
-
let
|
|
122
|
+
let re = e(async (e, t) => {
|
|
123
123
|
let n = [...e, t].join("/");
|
|
124
|
-
|
|
124
|
+
P.current.add(n), y((n) => ce(n, e, t));
|
|
125
125
|
try {
|
|
126
126
|
await u?.(e, t);
|
|
127
127
|
} catch {
|
|
128
|
-
|
|
128
|
+
P.current.delete(n), y((n) => le(n, e, t)), T(!0);
|
|
129
129
|
}
|
|
130
|
-
}, [u]),
|
|
130
|
+
}, [u]), ie = e(async () => {
|
|
131
131
|
if (!b) return !1;
|
|
132
132
|
C(!0), T(!1);
|
|
133
133
|
try {
|
|
134
|
-
return
|
|
134
|
+
return M && _ ? await _(n, b) : await d(n, b, E.trim(), O), f?.(n, b, M), !0;
|
|
135
135
|
} catch (e) {
|
|
136
|
-
return h?.(e) &&
|
|
136
|
+
return h?.(e) && z != null ? I(z) : T(!0), p?.(n, b, e), !1;
|
|
137
137
|
} finally {
|
|
138
138
|
C(!1);
|
|
139
139
|
}
|
|
140
140
|
}, [
|
|
141
141
|
E,
|
|
142
|
-
|
|
142
|
+
M,
|
|
143
143
|
h,
|
|
144
144
|
n,
|
|
145
145
|
d,
|
|
@@ -148,112 +148,112 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
148
148
|
f,
|
|
149
149
|
O,
|
|
150
150
|
b,
|
|
151
|
-
|
|
152
|
-
]),
|
|
153
|
-
y(s), x(void 0), T(!1), D(l), A(!1), k(!1),
|
|
151
|
+
z
|
|
152
|
+
]), ae = e(() => {
|
|
153
|
+
y(s), x(void 0), T(!1), D(l), A(!1), k(!1), P.current.clear(), ne(void 0), I(void 0), R(!1);
|
|
154
154
|
}, [l, s]);
|
|
155
155
|
return {
|
|
156
156
|
folderItems: v,
|
|
157
157
|
selectedFolderPath: b,
|
|
158
158
|
setSelectedFolderPath: x,
|
|
159
|
-
handleCreateFolder:
|
|
160
|
-
hasExistingPublicationInFolder:
|
|
159
|
+
handleCreateFolder: re,
|
|
160
|
+
hasExistingPublicationInFolder: N,
|
|
161
161
|
hasWriteAccess: !b || c(b),
|
|
162
162
|
isSubmitting: S,
|
|
163
163
|
hasSubmitError: w,
|
|
164
|
-
handleSubmit:
|
|
165
|
-
reset:
|
|
164
|
+
handleSubmit: ie,
|
|
165
|
+
reset: ae,
|
|
166
166
|
author: E,
|
|
167
|
-
setAuthor:
|
|
167
|
+
setAuthor: j,
|
|
168
168
|
publishCredentials: O,
|
|
169
169
|
setPublishCredentials: k,
|
|
170
|
-
isTargetTaken:
|
|
171
|
-
isTargetChecking:
|
|
172
|
-
isDirectWrite:
|
|
170
|
+
isTargetTaken: B,
|
|
171
|
+
isTargetChecking: L,
|
|
172
|
+
isDirectWrite: M
|
|
173
173
|
};
|
|
174
|
-
},
|
|
174
|
+
}, K = /* @__PURE__ */ function(e) {
|
|
175
175
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
176
|
-
}({}),
|
|
177
|
-
let [i, o] = a(
|
|
176
|
+
}({}), de = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
|
|
177
|
+
let [i, o] = a(K.Main), [s, c] = a();
|
|
178
178
|
return t(() => {
|
|
179
|
-
e && o(
|
|
179
|
+
e && o(K.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(K.ChangeFolder);
|
|
186
186
|
},
|
|
187
|
-
backToMain: () => o(
|
|
187
|
+
backToMain: () => o(K.Main),
|
|
188
188
|
selectFolder: () => {
|
|
189
|
-
s != null && r(s), o(
|
|
189
|
+
s != null && r(s), o(K.Main);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
},
|
|
192
|
+
}, fe = (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 ? fe(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
|
+
}, pe = (e, t) => e.localeCompare(t, void 0, {
|
|
202
202
|
sensitivity: "base",
|
|
203
203
|
numeric: !0
|
|
204
|
-
}),
|
|
204
|
+
}), q = (e) => [...e].sort((e, t) => pe(e.name, t.name)).map((e) => e.children ? {
|
|
205
205
|
...e,
|
|
206
|
-
children:
|
|
207
|
-
} : e),
|
|
206
|
+
children: q(e.children)
|
|
207
|
+
} : e), me = (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: me(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 ? me([], i, a) : void 0
|
|
218
218
|
}];
|
|
219
|
-
},
|
|
220
|
-
let t =
|
|
219
|
+
}, he = (e, t) => t.reduce((e, t) => t.length ? me(e, t, []) : e, e), J = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? J(e.children) : []]), Y = (e) => e.join("/"), ge = (e) => e.split("/").filter(Boolean), _e = (e, t) => ge(e).at(-1) ?? t, ve = (e) => e.map((e) => {
|
|
220
|
+
let t = Y(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 ? ve(e.children) : void 0
|
|
227
227
|
};
|
|
228
|
-
}),
|
|
228
|
+
}), ye = /[/\\:;,={}&"]/, be = (e, t, n, r) => {
|
|
229
229
|
let i = e.trim();
|
|
230
|
-
return i ? i.includes("..") ||
|
|
231
|
-
},
|
|
230
|
+
return i ? i.includes("..") || ye.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
|
+
}, xe = (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
|
+
}, Se = (e, t) => {
|
|
238
238
|
if (t.length === 0) return e.map((e) => e.name);
|
|
239
|
-
let n =
|
|
239
|
+
let n = Y(t), r = (e) => {
|
|
240
240
|
for (let t of e) {
|
|
241
|
-
if (
|
|
241
|
+
if (Y(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
|
+
}, Ce = /* @__PURE__ */ function(e) {
|
|
248
248
|
return e.NotPublished = "not-published", e.InReview = "in-review", e.Published = "published", e.Unknown = "unknown", e;
|
|
249
|
-
}({}),
|
|
249
|
+
}({}), X = {
|
|
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
|
+
}, we = {
|
|
257
257
|
heading: "Versions history",
|
|
258
258
|
inReviewLabel: "In review",
|
|
259
259
|
publishedLabel: "Published",
|
|
@@ -262,21 +262,21 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
262
262
|
emptyLabel: "No saved versions yet.",
|
|
263
263
|
errorLabel: "Could not load publication statuses.",
|
|
264
264
|
retryLabel: "Retry"
|
|
265
|
-
},
|
|
265
|
+
}, Te = (e, t) => {
|
|
266
266
|
switch (e.status) {
|
|
267
|
-
case
|
|
268
|
-
case
|
|
269
|
-
case
|
|
267
|
+
case Ce.InReview: return t.inReviewLabel;
|
|
268
|
+
case Ce.Unknown: return t.unknownLabel;
|
|
269
|
+
case Ce.Published: return t.publishedLabel;
|
|
270
270
|
default: return;
|
|
271
271
|
}
|
|
272
|
-
},
|
|
272
|
+
}, Ee = ({ 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
|
+
...we,
|
|
277
277
|
...c
|
|
278
278
|
}, { colors: T } = g, E = {
|
|
279
|
-
...
|
|
279
|
+
...I({
|
|
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 B = /* @__PURE__ */ function(e) {
|
|
|
286
286
|
}),
|
|
287
287
|
...g.cssVars
|
|
288
288
|
};
|
|
289
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ B("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__ */ z("h2", {
|
|
295
295
|
id: v,
|
|
296
|
-
className:
|
|
296
|
+
className: L(l, X.heading),
|
|
297
297
|
children: w.heading
|
|
298
298
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ z(x, {
|
|
300
300
|
visuallyHidden: !0,
|
|
301
301
|
politeness: C.Polite,
|
|
302
302
|
children: y && r && !i ? w.loadingLabel : ""
|
|
303
303
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ z(x, {
|
|
305
305
|
politeness: C.Assertive,
|
|
306
|
-
children: i && /* @__PURE__ */
|
|
306
|
+
children: i && /* @__PURE__ */ B("div", {
|
|
307
307
|
className: "flex flex-wrap items-center gap-2",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ z(h, { text: w.errorLabel }), s && /* @__PURE__ */ z(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__ */ z("p", {
|
|
316
|
+
className: L(f, X.meta),
|
|
317
317
|
children: w.emptyLabel
|
|
318
|
-
}) : /* @__PURE__ */
|
|
319
|
-
let t =
|
|
320
|
-
return /* @__PURE__ */
|
|
321
|
-
className:
|
|
322
|
-
children: [/* @__PURE__ */
|
|
318
|
+
}) : /* @__PURE__ */ z("ul", { children: e.map((e) => {
|
|
319
|
+
let t = Te(e, w), n = e.status == null && r && !i;
|
|
320
|
+
return /* @__PURE__ */ B("li", {
|
|
321
|
+
className: L("flex flex-col gap-1 py-2", X.row),
|
|
322
|
+
children: [/* @__PURE__ */ B("div", {
|
|
323
323
|
className: "flex min-h-6 min-w-0 items-center gap-2",
|
|
324
324
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ z(m, {
|
|
326
326
|
text: e.version,
|
|
327
|
-
className:
|
|
327
|
+
className: L("flex-initial!", u, X.version)
|
|
328
328
|
}),
|
|
329
|
-
t && /* @__PURE__ */
|
|
330
|
-
n && /* @__PURE__ */
|
|
329
|
+
t && /* @__PURE__ */ z(o, { label: t }),
|
|
330
|
+
n && /* @__PURE__ */ z("span", {
|
|
331
331
|
"aria-hidden": !0,
|
|
332
332
|
className: "shrink-0",
|
|
333
|
-
children: /* @__PURE__ */
|
|
334
|
-
variant:
|
|
333
|
+
children: /* @__PURE__ */ z(A, {
|
|
334
|
+
variant: j.Text,
|
|
335
335
|
width: "84px",
|
|
336
336
|
height: "24px",
|
|
337
|
-
color:
|
|
337
|
+
color: X.skeletonColor
|
|
338
338
|
})
|
|
339
339
|
}),
|
|
340
|
-
e.modifiedAt && /* @__PURE__ */
|
|
341
|
-
className:
|
|
340
|
+
e.modifiedAt && /* @__PURE__ */ z("span", {
|
|
341
|
+
className: L("ms-auto shrink-0", d, X.date),
|
|
342
342
|
children: e.modifiedAt
|
|
343
343
|
})
|
|
344
344
|
]
|
|
345
|
-
}), (e.folder || e.author) && /* @__PURE__ */
|
|
345
|
+
}), (e.folder || e.author) && /* @__PURE__ */ B("div", {
|
|
346
346
|
className: "flex min-w-0 items-center justify-between gap-2",
|
|
347
|
-
children: [e.folder && /* @__PURE__ */
|
|
347
|
+
children: [e.folder && /* @__PURE__ */ z(_, {
|
|
348
348
|
name: e.folder,
|
|
349
|
-
nameClassName:
|
|
350
|
-
}), e.author && /* @__PURE__ */
|
|
351
|
-
className:
|
|
349
|
+
nameClassName: L(f, X.meta)
|
|
350
|
+
}), e.author && /* @__PURE__ */ z("span", {
|
|
351
|
+
className: L("ms-auto shrink-0", f, X.meta),
|
|
352
352
|
children: e.author
|
|
353
353
|
})]
|
|
354
354
|
})]
|
|
@@ -356,51 +356,51 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
356
356
|
}) })
|
|
357
357
|
]
|
|
358
358
|
});
|
|
359
|
-
},
|
|
359
|
+
}, Z = {
|
|
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
|
+
}, De = "Private dependencies", Q = {
|
|
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
|
+
}, Oe = {
|
|
372
|
+
[H.Application]: "Application",
|
|
373
|
+
[H.Toolset]: "Toolset",
|
|
374
|
+
[H.Prompt]: "Prompt",
|
|
375
|
+
[H.Skill]: "Skill",
|
|
376
|
+
[H.File]: "File"
|
|
377
|
+
}, ke = 32, Ae = 24, je = 40, Me = 32, Ne = (e, t) => {
|
|
378
|
+
let n = t ? je : ke;
|
|
379
|
+
return /* @__PURE__ */ z("span", {
|
|
380
380
|
"aria-hidden": "true",
|
|
381
381
|
className: "shrink-0",
|
|
382
|
-
children: e.type ===
|
|
382
|
+
children: e.type === H.File ? /* @__PURE__ */ z("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__ */ z(g, {
|
|
389
389
|
decorative: !0,
|
|
390
|
-
size: t ?
|
|
390
|
+
size: t ? Me : Ae,
|
|
391
391
|
name: e.name,
|
|
392
392
|
type: e.isFolder ? f.Folder : f.File
|
|
393
393
|
})
|
|
394
|
-
}) : /* @__PURE__ */
|
|
394
|
+
}) : /* @__PURE__ */ z(te, {
|
|
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
|
+
}, Pe = "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.", Fe = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, Ie = ({ 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 = De, description: d = Pe, appearance: f = U.Warning, typeLabels: p = {}, getAnnouncement: m = Fe } = t, h = f === U.Published, g = i ?? (h ? "dial-body-semi-text" : "dial-small-semi-text"), { colors: _ } = c, v = {
|
|
403
|
+
...I({
|
|
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 B = /* @__PURE__ */ function(e) {
|
|
|
410
410
|
}),
|
|
411
411
|
...c.cssVars
|
|
412
412
|
}, y = e.length;
|
|
413
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(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__ */ B("section", {
|
|
418
418
|
"aria-labelledby": l,
|
|
419
|
-
className:
|
|
419
|
+
className: L("flex flex-col", h ? "gap-2" : "gap-3", Z.dependencies),
|
|
420
420
|
style: v,
|
|
421
421
|
children: [
|
|
422
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ z("h2", {
|
|
423
423
|
id: l,
|
|
424
|
-
className:
|
|
424
|
+
className: L(r, Q.heading),
|
|
425
425
|
children: u
|
|
426
426
|
}),
|
|
427
|
-
h ? /* @__PURE__ */
|
|
428
|
-
className:
|
|
427
|
+
h ? /* @__PURE__ */ z("p", {
|
|
428
|
+
className: L(o, Q.caption),
|
|
429
429
|
children: d
|
|
430
|
-
}) : /* @__PURE__ */
|
|
430
|
+
}) : /* @__PURE__ */ z(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__ */ z("ul", {
|
|
437
|
+
className: Z.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] ?? Oe[e.type];
|
|
440
|
+
return /* @__PURE__ */ B("li", {
|
|
441
|
+
className: L("flex items-center gap-3 py-3", Q.row, Z.dependenciesItem),
|
|
442
|
+
children: [Ne(e, !0), /* @__PURE__ */ B("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__ */ B("span", {
|
|
445
|
+
className: L("truncate", s, Q.type),
|
|
446
|
+
children: [t, e.location && /* @__PURE__ */ z("span", {
|
|
447
|
+
className: L("ms-1 normal-case", a, Q.meta),
|
|
448
448
|
children: `· ${e.location}`
|
|
449
449
|
})]
|
|
450
|
-
}), /* @__PURE__ */
|
|
451
|
-
className:
|
|
452
|
-
children: [e.name, e.version != null && /* @__PURE__ */
|
|
453
|
-
className:
|
|
450
|
+
}), /* @__PURE__ */ B("span", {
|
|
451
|
+
className: L("truncate", g, Q.name),
|
|
452
|
+
children: [e.name, e.version != null && /* @__PURE__ */ z("span", {
|
|
453
|
+
className: L("ms-2", a, Q.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] ?? Oe[e.type];
|
|
461
|
+
return /* @__PURE__ */ B("li", {
|
|
462
|
+
className: L("flex items-center gap-3 py-2", Z.dependenciesItem),
|
|
463
|
+
children: [Ne(e, !1), /* @__PURE__ */ B("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__ */ B("span", {
|
|
466
|
+
className: L("truncate", g, Q.name),
|
|
467
|
+
children: [e.name, e.version != null && /* @__PURE__ */ z("span", {
|
|
468
|
+
className: L("ms-2", a, Q.meta),
|
|
469
469
|
children: e.version
|
|
470
470
|
})]
|
|
471
|
-
}), /* @__PURE__ */
|
|
472
|
-
className:
|
|
471
|
+
}), /* @__PURE__ */ z("span", {
|
|
472
|
+
className: L("truncate", a, Q.meta),
|
|
473
473
|
children: e.location ? `${t} · ${e.location}` : t
|
|
474
474
|
})]
|
|
475
475
|
})]
|
|
@@ -478,15 +478,15 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
478
478
|
})
|
|
479
479
|
]
|
|
480
480
|
})] });
|
|
481
|
-
},
|
|
481
|
+
}, Le = {
|
|
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
|
+
}, Re = ({ 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 = I({
|
|
490
490
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
491
491
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
492
492
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -497,163 +497,164 @@ var B = /* @__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 = L(f, Le.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__ */ z(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__ */ z("ul", {
|
|
511
511
|
style: m,
|
|
512
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
513
|
-
className:
|
|
514
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: e.map((e, n) => /* @__PURE__ */ B("li", {
|
|
513
|
+
className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Le.stripedRow),
|
|
514
|
+
children: [/* @__PURE__ */ B("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__ */ B("span", {
|
|
519
|
+
className: L(u, Le.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__ */ z(N, {
|
|
527
527
|
label: a,
|
|
528
|
-
className:
|
|
528
|
+
className: L("shrink-0 whitespace-nowrap", Le.currentBadge)
|
|
529
529
|
}),
|
|
530
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
530
|
+
e.publishCredentials === !0 && /* @__PURE__ */ z(N, {
|
|
531
531
|
label: o,
|
|
532
|
-
className:
|
|
532
|
+
className: L("shrink-0 whitespace-nowrap", Le.sharedCredentialsBadge)
|
|
533
533
|
})
|
|
534
534
|
]
|
|
535
|
-
}), /* @__PURE__ */
|
|
536
|
-
className:
|
|
537
|
-
children:
|
|
535
|
+
}), /* @__PURE__ */ z("span", {
|
|
536
|
+
className: L(d, Le.date),
|
|
537
|
+
children: G(e.publishedAt)
|
|
538
538
|
})]
|
|
539
539
|
}, `${e.version}-${n}`))
|
|
540
540
|
});
|
|
541
|
-
},
|
|
541
|
+
}, ze = {
|
|
542
542
|
summaryTitle: "_summaryTitle_hp97x_1",
|
|
543
543
|
sectionHeading: "_sectionHeading_hp97x_5",
|
|
544
544
|
destination: "_destination_hp97x_9",
|
|
545
545
|
directNote: "_directNote_hp97x_13"
|
|
546
|
-
},
|
|
547
|
-
rootKey:
|
|
546
|
+
}, Be = "", Ve = () => void 0, He = (e) => e == null ? void 0 : {
|
|
547
|
+
rootKey: Be,
|
|
548
548
|
path: e
|
|
549
|
-
},
|
|
550
|
-
let { colors:
|
|
551
|
-
...
|
|
552
|
-
"--pp-summary-title-text":
|
|
553
|
-
"--pp-heading-text":
|
|
554
|
-
"--pp-destination-text":
|
|
555
|
-
"--pp-direct-note-text":
|
|
549
|
+
}, Ue = 200, We = ({ view: e = K.Main, onChangeFolderClick: a, resource: o, renderSummary: c, dependencies: d, versionHistory: f, folderItems: m, selectedFolderPath: h, pendingFolderPath: g, onPendingFolderPathChange: b, onCreateFolder: x, getDisabledReason: S, canCreateFolderIn: C, expandedPaths: w, onExpandedPathsChange: O, loadingPaths: k, hasExistingPublicationInFolder: ee, hasWriteAccess: A, isSubmitting: j, hasSubmitError: M = !1, isTargetTaken: N = !1, isTargetChecking: P = !1, allowReplace: te = !0, author: ne = "", onAuthorChange: R, publishCredentials: re = !1, onPublishCredentialsChange: H, isDirectWrite: U = !1, directUnavailableNote: W, labels: G = {}, summaryTitleClassName: ce = "dial-body-semi-text", headingClassName: le = "dial-body-semi-text", directNoteClassName: ue = "dial-small-text", destinationClassName: de = "dial-small-semi-text", calloutFolderNameClassName: fe = "dial-small-paragraph-semi-text", styles: pe = {} }) => {
|
|
550
|
+
let { colors: q, folderTree: me, dependencies: he } = pe, J = {
|
|
551
|
+
...I({
|
|
552
|
+
"--pp-summary-title-text": q?.summaryTitleText,
|
|
553
|
+
"--pp-heading-text": q?.headingText,
|
|
554
|
+
"--pp-destination-text": q?.destinationText,
|
|
555
|
+
"--pp-direct-note-text": q?.directNoteText
|
|
556
556
|
}),
|
|
557
|
-
...
|
|
558
|
-
},
|
|
559
|
-
border:
|
|
560
|
-
background:
|
|
561
|
-
}, { folderLabel:
|
|
557
|
+
...pe.cssVars
|
|
558
|
+
}, Y = {
|
|
559
|
+
border: q?.summaryBorder,
|
|
560
|
+
background: q?.summaryBackground
|
|
561
|
+
}, { folderLabel: ge = "Publish to folder", destinationAriaLabel: _e = "Destination folder", noFolderSelectedLabel: ve = "No folder selected", changeFolderLabel: ye = "Change", chooseFolderLabel: be = "Choose", replaceWarning: xe = "Version {version} is already published in {folder}. Publishing will replace it.", targetTakenLabel: Se = "A resource with this name already exists in {folder}. Rename it or choose another folder.", targetTakenVersionedLabel: Ce = "Version {version} of a resource with this name already exists in {folder}. Rename it, change its version or choose another folder.", noAccessError: X = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: we = "Publishing failed. Please try again.", adminApprovalTitle: Te = "Admin approval required", adminApprovalMessage: De = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Q, addSiblingFolderLabel: Oe, addChildFolderLabel: ke, cancelCreatingFolderLabel: Ae, createFolderEmptyNameError: je, createFolderInvalidNameError: Me, createFolderDuplicateNameError: Ne, createFolderSameAsParentNameError: Pe, rootFolderLabel: Fe = "Organization", dependenciesLabels: Le, searchPlaceholder: Re, clearSearchAriaLabel: We, authorLabel: Ke = "Author", authorPlaceholder: Je = "Author name", authorHint: Ye = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Xe = "Publish with my credentials", directWriteNote: Ze, credentialsHint: Qe = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = G, $e = n(), et = i(null), tt = i(null), nt = i(e);
|
|
562
562
|
t(() => {
|
|
563
|
-
nt.current !== e && (nt.current = e, e ===
|
|
563
|
+
nt.current !== e && (nt.current = e, e === K.ChangeFolder ? tt.current?.focus({ preventScroll: !0 }) : et.current?.focus({ preventScroll: !0 }));
|
|
564
564
|
}, [e]);
|
|
565
|
-
let
|
|
566
|
-
hasSelectedFolder:
|
|
567
|
-
hasExistingPublicationInFolder:
|
|
568
|
-
hasWriteAccess:
|
|
569
|
-
isSubmitting:
|
|
570
|
-
hasSubmitError:
|
|
571
|
-
isTargetTaken:
|
|
572
|
-
isTargetChecking:
|
|
573
|
-
allowReplace:
|
|
565
|
+
let rt = h != null, $ = r(() => se({
|
|
566
|
+
hasSelectedFolder: rt,
|
|
567
|
+
hasExistingPublicationInFolder: ee,
|
|
568
|
+
hasWriteAccess: A,
|
|
569
|
+
isSubmitting: j,
|
|
570
|
+
hasSubmitError: M,
|
|
571
|
+
isTargetTaken: N,
|
|
572
|
+
isTargetChecking: P,
|
|
573
|
+
allowReplace: te
|
|
574
574
|
}), [
|
|
575
|
-
|
|
576
|
-
k,
|
|
575
|
+
rt,
|
|
577
576
|
ee,
|
|
578
577
|
A,
|
|
579
|
-
te,
|
|
580
578
|
j,
|
|
581
579
|
M,
|
|
582
|
-
N
|
|
583
|
-
|
|
584
|
-
|
|
580
|
+
N,
|
|
581
|
+
P,
|
|
582
|
+
te
|
|
583
|
+
]), it = rt ? h[h.length - 1] ?? Fe : "", at = c ? c() : /* @__PURE__ */ z("span", {
|
|
584
|
+
className: L("truncate", ce, ze.summaryTitle),
|
|
585
585
|
children: o?.title
|
|
586
|
-
}),
|
|
587
|
-
key:
|
|
588
|
-
label:
|
|
586
|
+
}), ot = r(() => [{
|
|
587
|
+
key: Be,
|
|
588
|
+
label: Fe,
|
|
589
589
|
items: m,
|
|
590
|
-
expandedPaths:
|
|
591
|
-
onExpandedPathsChange:
|
|
592
|
-
loadingPaths:
|
|
590
|
+
expandedPaths: w,
|
|
591
|
+
onExpandedPathsChange: O,
|
|
592
|
+
loadingPaths: k
|
|
593
593
|
}], [
|
|
594
|
-
|
|
594
|
+
Fe,
|
|
595
595
|
m,
|
|
596
|
-
C,
|
|
597
596
|
w,
|
|
598
|
-
O
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
597
|
+
O,
|
|
598
|
+
k
|
|
599
|
+
]), st = r(() => ({
|
|
600
|
+
searchPlaceholder: Re,
|
|
601
|
+
clearSearchAriaLabel: We,
|
|
602
|
+
folderEmptyStateLabel: Q,
|
|
603
|
+
addSiblingFolderLabel: Oe,
|
|
604
|
+
addChildFolderLabel: ke,
|
|
605
|
+
cancelCreatingFolderLabel: Ae,
|
|
606
|
+
createFolderEmptyNameError: je,
|
|
607
|
+
createFolderInvalidNameError: Me,
|
|
608
|
+
createFolderDuplicateNameError: Ne,
|
|
609
|
+
createFolderSameAsParentNameError: Pe
|
|
610
610
|
}), [
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
Re,
|
|
612
|
+
We,
|
|
613
|
+
Q,
|
|
614
|
+
Oe,
|
|
615
|
+
ke,
|
|
613
616
|
Ae,
|
|
614
|
-
Y,
|
|
615
617
|
je,
|
|
616
618
|
Me,
|
|
617
619
|
Ne,
|
|
618
|
-
Pe
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
]), st = (e) => b(e?.path), ct = (e, t, n) => x(t, n);
|
|
622
|
-
if (e === U.ChangeFolder) return /* @__PURE__ */ R("div", {
|
|
620
|
+
Pe
|
|
621
|
+
]), ct = (e) => b(e?.path), lt = (e, t, n) => x(t, n);
|
|
622
|
+
if (e === K.ChangeFolder) return /* @__PURE__ */ z("div", {
|
|
623
623
|
ref: tt,
|
|
624
624
|
tabIndex: -1,
|
|
625
625
|
role: "group",
|
|
626
|
-
"aria-label":
|
|
627
|
-
className:
|
|
628
|
-
style:
|
|
629
|
-
children: /* @__PURE__ */
|
|
630
|
-
view:
|
|
626
|
+
"aria-label": ge,
|
|
627
|
+
className: L("flex flex-col gap-3 outline-none", Z.panel),
|
|
628
|
+
style: J,
|
|
629
|
+
children: /* @__PURE__ */ z(ie, {
|
|
630
|
+
view: ae.ChangeFolder,
|
|
631
631
|
item: { title: o?.title ?? "" },
|
|
632
|
-
roots:
|
|
632
|
+
roots: ot,
|
|
633
633
|
destination: {
|
|
634
|
-
rootKey:
|
|
634
|
+
rootKey: Be,
|
|
635
635
|
path: h ?? []
|
|
636
636
|
},
|
|
637
|
-
onDestinationChange:
|
|
638
|
-
onChangeFolderClick:
|
|
639
|
-
pendingDestination:
|
|
640
|
-
onPendingDestinationChange:
|
|
641
|
-
onCreateFolder:
|
|
637
|
+
onDestinationChange: Ve,
|
|
638
|
+
onChangeFolderClick: Ve,
|
|
639
|
+
pendingDestination: He(g),
|
|
640
|
+
onPendingDestinationChange: ct,
|
|
641
|
+
onCreateFolder: lt,
|
|
642
642
|
getDisabledReason: S,
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
canCreateFolderIn: C,
|
|
644
|
+
isSubmitting: j,
|
|
645
|
+
panelLabels: st,
|
|
646
|
+
panelStyles: { folderTree: me }
|
|
646
647
|
})
|
|
647
648
|
});
|
|
648
|
-
let
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
className:
|
|
651
|
-
style:
|
|
649
|
+
let ut = L(de, ze.destination);
|
|
650
|
+
return /* @__PURE__ */ B("div", {
|
|
651
|
+
className: L("flex flex-col gap-5", Z.panel),
|
|
652
|
+
style: J,
|
|
652
653
|
children: [
|
|
653
|
-
o?.type == null ? /* @__PURE__ */
|
|
654
|
-
colors:
|
|
655
|
-
children:
|
|
656
|
-
}) : /* @__PURE__ */
|
|
654
|
+
o?.type == null ? /* @__PURE__ */ z(F, {
|
|
655
|
+
colors: Y,
|
|
656
|
+
children: at
|
|
657
|
+
}) : /* @__PURE__ */ z(F, {
|
|
657
658
|
item: {
|
|
658
659
|
type: o.type,
|
|
659
660
|
name: o.title,
|
|
@@ -661,187 +662,187 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
661
662
|
iconUrl: o.iconUrl
|
|
662
663
|
},
|
|
663
664
|
hasVersionTag: !1,
|
|
664
|
-
colors:
|
|
665
|
+
colors: Y
|
|
665
666
|
}),
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
className:
|
|
669
|
-
children:
|
|
667
|
+
/* @__PURE__ */ B("section", { children: [
|
|
668
|
+
/* @__PURE__ */ z("h2", {
|
|
669
|
+
className: L("mb-2", le, ze.sectionHeading),
|
|
670
|
+
children: ge
|
|
670
671
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ B("div", {
|
|
672
673
|
className: "flex min-w-0 items-center gap-2",
|
|
673
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ z("div", {
|
|
674
675
|
role: "group",
|
|
675
|
-
"aria-label":
|
|
676
|
+
"aria-label": _e,
|
|
676
677
|
className: "min-w-0 flex-1",
|
|
677
|
-
children:
|
|
678
|
-
name: [
|
|
679
|
-
nameClassName:
|
|
680
|
-
}) : /* @__PURE__ */
|
|
681
|
-
className:
|
|
682
|
-
children:
|
|
678
|
+
children: rt ? /* @__PURE__ */ z(_, {
|
|
679
|
+
name: [Fe, ...h].join(" / "),
|
|
680
|
+
nameClassName: ut
|
|
681
|
+
}) : /* @__PURE__ */ z("span", {
|
|
682
|
+
className: L("block truncate", ut),
|
|
683
|
+
children: ve
|
|
683
684
|
})
|
|
684
|
-
}), /* @__PURE__ */
|
|
685
|
+
}), /* @__PURE__ */ z(v, {
|
|
685
686
|
ref: et,
|
|
686
687
|
size: p.Small,
|
|
687
|
-
label:
|
|
688
|
-
iconBefore: /* @__PURE__ */
|
|
688
|
+
label: rt ? ye : be,
|
|
689
|
+
iconBefore: /* @__PURE__ */ z(oe, {
|
|
689
690
|
size: l.SM,
|
|
690
691
|
stroke: u,
|
|
691
692
|
"aria-hidden": !0
|
|
692
693
|
}),
|
|
693
|
-
disabled:
|
|
694
|
+
disabled: j,
|
|
694
695
|
onClick: a
|
|
695
696
|
})]
|
|
696
697
|
}),
|
|
697
|
-
$.calloutKind ===
|
|
698
|
+
$.calloutKind === V.Info && !U && /* @__PURE__ */ z("div", {
|
|
698
699
|
className: "my-4",
|
|
699
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ z(T, {
|
|
700
701
|
type: E.SectionMessage,
|
|
701
702
|
variant: D.Info,
|
|
702
|
-
title:
|
|
703
|
-
message:
|
|
703
|
+
title: Te,
|
|
704
|
+
message: W == null ? De : `${De} ${W}`
|
|
704
705
|
})
|
|
705
706
|
}),
|
|
706
|
-
$.calloutKind !==
|
|
707
|
+
$.calloutKind !== V.None && $.calloutKind !== V.Info && /* @__PURE__ */ z("div", {
|
|
707
708
|
className: "mt-3",
|
|
708
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ z(T, {
|
|
709
710
|
type: E.SectionMessage,
|
|
710
|
-
variant:
|
|
711
|
-
message:
|
|
712
|
-
replaceWarning:
|
|
713
|
-
targetTaken: o?.version ?
|
|
714
|
-
noAccessError:
|
|
715
|
-
submitError:
|
|
716
|
-
folderName:
|
|
711
|
+
variant: Ge($.calloutKind),
|
|
712
|
+
message: qe($.calloutKind, {
|
|
713
|
+
replaceWarning: xe,
|
|
714
|
+
targetTaken: o?.version ? Ce : Se,
|
|
715
|
+
noAccessError: X,
|
|
716
|
+
submitError: we,
|
|
717
|
+
folderName: it,
|
|
717
718
|
version: o?.version,
|
|
718
|
-
folderNameClassName:
|
|
719
|
+
folderNameClassName: fe
|
|
719
720
|
})
|
|
720
721
|
})
|
|
721
722
|
}),
|
|
722
|
-
|
|
723
|
+
W != null && !U && $.calloutKind !== V.Info && !$.isSubmitDisabled && /* @__PURE__ */ z("div", {
|
|
723
724
|
className: "mt-4",
|
|
724
|
-
children: /* @__PURE__ */
|
|
725
|
+
children: /* @__PURE__ */ z(T, {
|
|
725
726
|
type: E.SectionMessage,
|
|
726
727
|
variant: D.Info,
|
|
727
|
-
message:
|
|
728
|
+
message: W
|
|
728
729
|
})
|
|
729
730
|
}),
|
|
730
|
-
|
|
731
|
+
R != null && !U && /* @__PURE__ */ z("div", {
|
|
731
732
|
className: "mt-4",
|
|
732
|
-
children: /* @__PURE__ */
|
|
733
|
+
children: /* @__PURE__ */ z(y, {
|
|
733
734
|
id: $e,
|
|
734
735
|
labelProps: { label: Ke },
|
|
735
736
|
placeholder: Je,
|
|
736
|
-
caption:
|
|
737
|
+
caption: Ye,
|
|
737
738
|
value: ne,
|
|
738
|
-
onChange: (e) =>
|
|
739
|
-
maxLength:
|
|
740
|
-
disabled:
|
|
739
|
+
onChange: (e) => R(e ?? ""),
|
|
740
|
+
maxLength: Ue,
|
|
741
|
+
disabled: j
|
|
741
742
|
})
|
|
742
743
|
}),
|
|
743
|
-
|
|
744
|
-
className:
|
|
745
|
-
children:
|
|
744
|
+
U && Ze != null && /* @__PURE__ */ z("p", {
|
|
745
|
+
className: L("mt-4", ze.directNote, ue),
|
|
746
|
+
children: Ze
|
|
746
747
|
}),
|
|
747
|
-
|
|
748
|
+
H != null && !U && /* @__PURE__ */ z("div", {
|
|
748
749
|
className: "mt-4",
|
|
749
|
-
children: /* @__PURE__ */
|
|
750
|
-
labelProps: { label:
|
|
750
|
+
children: /* @__PURE__ */ z(s, {
|
|
751
|
+
labelProps: { label: Xe },
|
|
751
752
|
caption: Qe,
|
|
752
|
-
isSelected:
|
|
753
|
-
onChange:
|
|
754
|
-
disabled:
|
|
753
|
+
isSelected: re,
|
|
754
|
+
onChange: H,
|
|
755
|
+
disabled: j
|
|
755
756
|
})
|
|
756
757
|
})
|
|
757
758
|
] }),
|
|
758
|
-
d != null && /* @__PURE__ */
|
|
759
|
+
d != null && /* @__PURE__ */ z(Ie, {
|
|
759
760
|
dependencies: d,
|
|
760
|
-
labels:
|
|
761
|
-
headingClassName:
|
|
762
|
-
styles:
|
|
761
|
+
labels: Le,
|
|
762
|
+
headingClassName: le,
|
|
763
|
+
styles: he
|
|
763
764
|
}),
|
|
764
|
-
f != null && /* @__PURE__ */
|
|
765
|
-
headingClassName:
|
|
765
|
+
f != null && /* @__PURE__ */ z(Ee, {
|
|
766
|
+
headingClassName: le,
|
|
766
767
|
...f
|
|
767
768
|
})
|
|
768
769
|
]
|
|
769
770
|
});
|
|
770
|
-
},
|
|
771
|
+
}, Ge = (e) => e === V.ReplaceWarning || e === V.TargetTaken ? D.Warning : D.Error, Ke = (e, t, n) => {
|
|
771
772
|
let [r, i, ...a] = e.split("{folder}");
|
|
772
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
773
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ B(R, { children: [
|
|
773
774
|
r,
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ z("strong", {
|
|
775
776
|
className: n,
|
|
776
777
|
children: t
|
|
777
778
|
}),
|
|
778
779
|
i
|
|
779
780
|
] });
|
|
780
|
-
},
|
|
781
|
-
let p =
|
|
782
|
-
return /* @__PURE__ */
|
|
781
|
+
}, qe = (e, t) => e === V.ReplaceWarning ? Ke(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === V.TargetTaken ? Ke(t.targetTaken.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === V.NoAccess ? Ke(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Je = { footer: "_footer_dks1v_1" }, Ye = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = K.Main, onSelectFolder: c, isSelectFolderDisabled: u = !1, labels: d = {}, colors: f }) => {
|
|
782
|
+
let p = I({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: y = "Select" } = d, b = s === K.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
|
|
783
|
+
return /* @__PURE__ */ B("div", {
|
|
783
784
|
style: p,
|
|
784
|
-
className:
|
|
785
|
-
children: [/* @__PURE__ */
|
|
785
|
+
className: L("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Je.footer),
|
|
786
|
+
children: [/* @__PURE__ */ z(v, {
|
|
786
787
|
label: m,
|
|
787
788
|
className: "mobile:flex-1",
|
|
788
789
|
disabled: i,
|
|
789
790
|
onClick: a
|
|
790
|
-
}), b ? /* @__PURE__ */
|
|
791
|
+
}), b ? /* @__PURE__ */ z(w, {
|
|
791
792
|
label: y,
|
|
792
793
|
className: "mobile:flex-1",
|
|
793
794
|
disabled: u,
|
|
794
795
|
onClick: c
|
|
795
|
-
}) : /* @__PURE__ */
|
|
796
|
+
}) : /* @__PURE__ */ z(O, {
|
|
796
797
|
label: x,
|
|
797
798
|
className: "mobile:flex-1",
|
|
798
799
|
disabled: r,
|
|
799
|
-
iconBefore: i ? /* @__PURE__ */
|
|
800
|
+
iconBefore: i ? /* @__PURE__ */ z("span", {
|
|
800
801
|
"aria-hidden": !0,
|
|
801
|
-
children: /* @__PURE__ */
|
|
802
|
+
children: /* @__PURE__ */ z(M, { size: l.SM })
|
|
802
803
|
}) : void 0,
|
|
803
804
|
onClick: o
|
|
804
805
|
})]
|
|
805
806
|
});
|
|
806
|
-
},
|
|
807
|
+
}, Xe = {
|
|
807
808
|
backdrop: "_backdrop_16jmd_6",
|
|
808
809
|
panel: "_panel_16jmd_10",
|
|
809
810
|
divider: "_divider_16jmd_15",
|
|
810
811
|
content: "_content_16jmd_19",
|
|
811
812
|
title: "_title_16jmd_24"
|
|
812
|
-
},
|
|
813
|
-
let
|
|
814
|
-
"--spp-backdrop-bg":
|
|
815
|
-
"--spp-panel-bg":
|
|
816
|
-
"--spp-panel-border":
|
|
817
|
-
"--spp-divider-border":
|
|
818
|
-
"--spp-scrollbar-thumb":
|
|
819
|
-
"--spp-title-text":
|
|
820
|
-
}), [
|
|
813
|
+
}, Ze = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, canCreateFolderIn: p, expandedPaths: m, onExpandedPathsChange: h, loadingPaths: g, hasExistingPublicationInFolder: _, hasWriteAccess: v, isSubmitting: y, hasSubmitError: b = !1, isTargetTaken: x = !1, isTargetChecking: S = !1, allowReplace: C = !0, author: w, onAuthorChange: T, onClose: E, returnFocusRef: D, onSubmit: O, panelLabels: k, panelStyles: A, panelSummaryTitleClassName: j, panelHeadingClassName: M, panelCalloutFolderNameClassName: N, footerLabels: P, labels: te = {}, titleClassName: ne = "dial-body-semi-text", colors: F }) => {
|
|
814
|
+
let R = I({
|
|
815
|
+
"--spp-backdrop-bg": F?.backdropBackground,
|
|
816
|
+
"--spp-panel-bg": F?.panelBackground,
|
|
817
|
+
"--spp-panel-border": F?.panelBorder,
|
|
818
|
+
"--spp-divider-border": F?.dividerBorder,
|
|
819
|
+
"--spp-scrollbar-thumb": F?.scrollbarThumb,
|
|
820
|
+
"--spp-title-text": F?.titleText
|
|
821
|
+
}), [re, ie] = a(null), { title: ae = "Publish", changeFolderTitle: oe = "Change folder", backAriaLabel: V = "Back", ariaLabel: H = "Publish", closeAriaLabel: U = "Close" } = te, W = de({
|
|
821
822
|
isOpen: e,
|
|
822
823
|
selectedFolderPath: l,
|
|
823
824
|
onSelectedFolderPathChange: u
|
|
824
|
-
}),
|
|
825
|
+
}), G = W.view === K.ChangeFolder, ce = r(() => se({
|
|
825
826
|
hasSelectedFolder: l != null,
|
|
826
|
-
hasExistingPublicationInFolder:
|
|
827
|
-
hasWriteAccess:
|
|
828
|
-
isSubmitting:
|
|
829
|
-
hasSubmitError:
|
|
830
|
-
isTargetTaken:
|
|
831
|
-
isTargetChecking:
|
|
832
|
-
allowReplace:
|
|
827
|
+
hasExistingPublicationInFolder: _,
|
|
828
|
+
hasWriteAccess: v,
|
|
829
|
+
isSubmitting: y,
|
|
830
|
+
hasSubmitError: b,
|
|
831
|
+
isTargetTaken: x,
|
|
832
|
+
isTargetChecking: S,
|
|
833
|
+
allowReplace: C
|
|
833
834
|
}), [
|
|
834
835
|
l,
|
|
835
|
-
g,
|
|
836
836
|
_,
|
|
837
837
|
v,
|
|
838
838
|
y,
|
|
839
839
|
b,
|
|
840
840
|
x,
|
|
841
|
-
S
|
|
841
|
+
S,
|
|
842
|
+
C
|
|
842
843
|
]);
|
|
843
844
|
return t(() => {
|
|
844
|
-
let t =
|
|
845
|
+
let t = re?.closest("[role=\"dialog\"]");
|
|
845
846
|
if (!e || !t) return;
|
|
846
847
|
let n = () => t.focus({ preventScroll: !0 });
|
|
847
848
|
n();
|
|
@@ -851,87 +852,88 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
851
852
|
document.addEventListener("focusin", r);
|
|
852
853
|
let i = requestAnimationFrame(() => {
|
|
853
854
|
document.removeEventListener("focusin", r);
|
|
854
|
-
}), a =
|
|
855
|
+
}), a = D?.current;
|
|
855
856
|
return () => {
|
|
856
857
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
857
858
|
};
|
|
858
859
|
}, [
|
|
859
860
|
e,
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
]), /* @__PURE__ */
|
|
861
|
+
re,
|
|
862
|
+
D
|
|
863
|
+
]), /* @__PURE__ */ B(ee, {
|
|
863
864
|
open: e,
|
|
864
|
-
onClose:
|
|
865
|
-
header: /* @__PURE__ */
|
|
866
|
-
className:
|
|
867
|
-
children:
|
|
865
|
+
onClose: E,
|
|
866
|
+
header: /* @__PURE__ */ z("span", {
|
|
867
|
+
className: L("block truncate text-center", ne, Xe.title),
|
|
868
|
+
children: G ? oe : ae
|
|
868
869
|
}),
|
|
869
|
-
ariaLabel:
|
|
870
|
-
onBack:
|
|
871
|
-
backAriaLabel:
|
|
872
|
-
backDisabled:
|
|
873
|
-
closeAriaLabel:
|
|
874
|
-
closeDisabled:
|
|
875
|
-
style:
|
|
876
|
-
overlayStyle:
|
|
877
|
-
className:
|
|
878
|
-
overlayClassName:
|
|
879
|
-
headerClassName:
|
|
870
|
+
ariaLabel: H,
|
|
871
|
+
onBack: G ? W.backToMain : void 0,
|
|
872
|
+
backAriaLabel: V,
|
|
873
|
+
backDisabled: y,
|
|
874
|
+
closeAriaLabel: U,
|
|
875
|
+
closeDisabled: y,
|
|
876
|
+
style: R,
|
|
877
|
+
overlayStyle: R,
|
|
878
|
+
className: L(Xe.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
879
|
+
overlayClassName: Xe.backdrop,
|
|
880
|
+
headerClassName: L("px-[22px]", Xe.divider),
|
|
880
881
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
881
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ z("div", {
|
|
882
883
|
ref: ie,
|
|
883
|
-
className:
|
|
884
|
-
children: /* @__PURE__ */
|
|
884
|
+
className: L("min-h-0 flex-1 overflow-y-auto", Xe.content),
|
|
885
|
+
children: /* @__PURE__ */ z("div", {
|
|
885
886
|
className: "p-[22px]",
|
|
886
|
-
children: /* @__PURE__ */
|
|
887
|
+
children: /* @__PURE__ */ z(We, {
|
|
887
888
|
resource: n,
|
|
888
889
|
renderSummary: i,
|
|
889
890
|
dependencies: o,
|
|
890
891
|
versionHistory: s,
|
|
891
|
-
view:
|
|
892
|
-
onChangeFolderClick:
|
|
892
|
+
view: W.view,
|
|
893
|
+
onChangeFolderClick: W.openFolderView,
|
|
893
894
|
folderItems: c,
|
|
894
895
|
selectedFolderPath: l,
|
|
895
|
-
pendingFolderPath:
|
|
896
|
-
onPendingFolderPathChange:
|
|
896
|
+
pendingFolderPath: W.pendingFolderPath,
|
|
897
|
+
onPendingFolderPathChange: W.setPendingFolderPath,
|
|
897
898
|
onCreateFolder: d,
|
|
898
899
|
getDisabledReason: f,
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
900
|
+
canCreateFolderIn: p,
|
|
901
|
+
expandedPaths: m,
|
|
902
|
+
onExpandedPathsChange: h,
|
|
903
|
+
loadingPaths: g,
|
|
904
|
+
hasExistingPublicationInFolder: _,
|
|
905
|
+
hasWriteAccess: v,
|
|
906
|
+
isSubmitting: y,
|
|
907
|
+
hasSubmitError: b,
|
|
908
|
+
isTargetTaken: x,
|
|
909
|
+
isTargetChecking: S,
|
|
910
|
+
allowReplace: C,
|
|
911
|
+
author: w,
|
|
912
|
+
onAuthorChange: T,
|
|
913
|
+
labels: k,
|
|
914
|
+
styles: A,
|
|
915
|
+
summaryTitleClassName: j,
|
|
916
|
+
headingClassName: M,
|
|
917
|
+
calloutFolderNameClassName: N
|
|
916
918
|
})
|
|
917
919
|
})
|
|
918
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ z(Ye, {
|
|
919
921
|
version: n?.version,
|
|
920
|
-
hasExistingPublicationInFolder:
|
|
921
|
-
allowReplace:
|
|
922
|
-
isSubmitDisabled:
|
|
923
|
-
isSubmitLoading:
|
|
924
|
-
onCancel:
|
|
925
|
-
onSubmit:
|
|
926
|
-
view:
|
|
927
|
-
onSelectFolder:
|
|
928
|
-
isSelectFolderDisabled:
|
|
929
|
-
labels:
|
|
922
|
+
hasExistingPublicationInFolder: _,
|
|
923
|
+
allowReplace: C,
|
|
924
|
+
isSubmitDisabled: ce.isSubmitDisabled,
|
|
925
|
+
isSubmitLoading: ce.isSubmitLoading,
|
|
926
|
+
onCancel: G ? W.backToMain : E,
|
|
927
|
+
onSubmit: O,
|
|
928
|
+
view: W.view,
|
|
929
|
+
onSelectFolder: W.selectFolder,
|
|
930
|
+
isSelectFolderDisabled: W.pendingFolderPath == null,
|
|
931
|
+
labels: P
|
|
930
932
|
})]
|
|
931
933
|
});
|
|
932
|
-
},
|
|
933
|
-
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v =
|
|
934
|
-
return /* @__PURE__ */
|
|
934
|
+
}, Qe = { option: "_option_skygm_1" }, $e = (e, t) => `Unpublish "${e}" from "${t}"?`, et = (e) => `Choose which folder to unpublish "${e}" from.`, tt = ({ 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 }) => {
|
|
935
|
+
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = $e, selectFolderMessage: y = et } = o ?? {}, b = n.length > 1;
|
|
936
|
+
return /* @__PURE__ */ z(P, {
|
|
935
937
|
open: e,
|
|
936
938
|
title: f,
|
|
937
939
|
confirmLabel: p,
|
|
@@ -940,45 +942,45 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
940
942
|
isLoading: a,
|
|
941
943
|
isConfirmDisabled: b && r == null,
|
|
942
944
|
loadingStatusLabel: _,
|
|
943
|
-
message: /* @__PURE__ */
|
|
945
|
+
message: /* @__PURE__ */ z("span", {
|
|
944
946
|
className: "wrap-break-word",
|
|
945
|
-
children: b ? y(t) : v(t,
|
|
947
|
+
children: b ? y(t) : v(t, _e(n[0] ?? "", h))
|
|
946
948
|
}),
|
|
947
949
|
onConfirm: u,
|
|
948
950
|
onClose: d,
|
|
949
|
-
children: b && /* @__PURE__ */
|
|
951
|
+
children: b && /* @__PURE__ */ z("div", {
|
|
950
952
|
className: "mt-3",
|
|
951
|
-
style:
|
|
952
|
-
children: /* @__PURE__ */
|
|
953
|
+
style: I({ "--ucd-option-text": l?.optionText }),
|
|
954
|
+
children: /* @__PURE__ */ z(k, {
|
|
953
955
|
ariaLabel: g,
|
|
954
956
|
value: r ?? void 0,
|
|
955
957
|
onChange: i,
|
|
956
958
|
disabled: a,
|
|
957
959
|
items: n.map((e) => ({
|
|
958
960
|
value: e,
|
|
959
|
-
label:
|
|
961
|
+
label: _e(e, h)
|
|
960
962
|
})),
|
|
961
|
-
radioClassName:
|
|
963
|
+
radioClassName: L(s, Qe.option)
|
|
962
964
|
})
|
|
963
965
|
})
|
|
964
966
|
});
|
|
965
|
-
},
|
|
967
|
+
}, nt = /* @__PURE__ */ function(e) {
|
|
966
968
|
return e.Keep = "keep", e.New = "new", e;
|
|
967
|
-
}({}),
|
|
969
|
+
}({}), rt = {
|
|
968
970
|
heading: "_heading_jh4a2_1",
|
|
969
971
|
note: "_note_jh4a2_5"
|
|
970
|
-
},
|
|
971
|
-
let { title:
|
|
972
|
-
...
|
|
973
|
-
"--stf-heading-text":
|
|
974
|
-
"--stf-note-text":
|
|
972
|
+
}, $ = ({ 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, canCreateFolderIn: g, onCreateFolder: _, onCreateFolderError: v, version: b, dependencies: x, dependenciesLabels: S, dependenciesStyles: C, dependenciesNote: w, destinationNote: T, noteClassName: E = "dial-small-text", versionHistory: D, isSubmitting: O = !1, submitError: ee, foldersError: A, onRetryFolders: j, panelLabels: M = {}, panelStyles: N = {}, headingClassName: P = "dial-body-semi-text", destinationClassName: te = "dial-small-semi-text" }) => {
|
|
973
|
+
let { title: F = "Save", changeFolderTitle: R = "Change folder", closeAriaLabel: ie = "Close", backAriaLabel: ae = "Back", cancelLabel: oe = "Cancel", saveLabel: V = "Save", savingLabel: H = "Saving…", selectLabel: U = "Select" } = c, { saveToFolderHeading: se = "Save to folder", versionHeading: W = "Version", keepVersionLabel: G = "Keep version {version}", saveAsNewVersionLabel: ce = "Save as new version", newVersionLabel: le = "Version", newVersionPlaceholder: ue = "Enter new version", createFolderFailedMessage: K = "Failed to create the folder. Please try again.", ...de } = M, { colors: fe, folderTree: pe, cssVars: q } = N, me = {
|
|
974
|
+
...I({
|
|
975
|
+
"--stf-heading-text": fe?.headingText,
|
|
976
|
+
"--stf-note-text": fe?.noteText
|
|
975
977
|
}),
|
|
976
|
-
...
|
|
977
|
-
}, [
|
|
978
|
-
|
|
979
|
-
}, [
|
|
980
|
-
|
|
981
|
-
}, [p]),
|
|
978
|
+
...q
|
|
979
|
+
}, [he, J] = a(), Y = e((e, t, n) => (J(void 0), _(e, t, n)), [_]), ge = e((e) => {
|
|
980
|
+
J(K), v?.(e);
|
|
981
|
+
}, [K, v]), _e = e((e) => {
|
|
982
|
+
J(void 0), p(e);
|
|
983
|
+
}, [p]), ve = n(), ye = n(), be = L(P, rt.heading), xe = L(E, rt.note), Se = !!w && (x?.length ?? 0) === 0, Ce = u.type == null ? void 0 : /* @__PURE__ */ z(ne, {
|
|
982
984
|
item: {
|
|
983
985
|
type: u.type,
|
|
984
986
|
name: u.title,
|
|
@@ -988,114 +990,115 @@ var B = /* @__PURE__ */ function(e) {
|
|
|
988
990
|
iconSize: 40,
|
|
989
991
|
hasFeaturedTag: !1,
|
|
990
992
|
showVersion: !0
|
|
991
|
-
}),
|
|
992
|
-
value:
|
|
993
|
-
label:
|
|
993
|
+
}), X = b ? [{
|
|
994
|
+
value: nt.Keep,
|
|
995
|
+
label: G.replace("{version}", b.currentVersion)
|
|
994
996
|
}, {
|
|
995
|
-
value:
|
|
996
|
-
label:
|
|
997
|
-
content: /* @__PURE__ */
|
|
998
|
-
id:
|
|
999
|
-
value:
|
|
1000
|
-
onChange: (e) =>
|
|
1001
|
-
onBlur:
|
|
997
|
+
value: nt.New,
|
|
998
|
+
label: ce,
|
|
999
|
+
content: /* @__PURE__ */ z(y, {
|
|
1000
|
+
id: ve,
|
|
1001
|
+
value: b.newVersion,
|
|
1002
|
+
onChange: (e) => b.onNewVersionChange(e ?? ""),
|
|
1003
|
+
onBlur: b.onNewVersionBlur,
|
|
1002
1004
|
labelProps: {
|
|
1003
|
-
label:
|
|
1005
|
+
label: le,
|
|
1004
1006
|
required: !0
|
|
1005
1007
|
},
|
|
1006
|
-
placeholder:
|
|
1007
|
-
error:
|
|
1008
|
-
invalid: !!
|
|
1009
|
-
disabled:
|
|
1008
|
+
placeholder: ue,
|
|
1009
|
+
error: b.newVersionError,
|
|
1010
|
+
invalid: !!b.newVersionError,
|
|
1011
|
+
disabled: O
|
|
1010
1012
|
})
|
|
1011
|
-
}] : [],
|
|
1013
|
+
}] : [], we = /* @__PURE__ */ B("div", {
|
|
1012
1014
|
className: "flex flex-col gap-5",
|
|
1013
|
-
style:
|
|
1015
|
+
style: me,
|
|
1014
1016
|
children: [
|
|
1015
|
-
|
|
1016
|
-
className:
|
|
1017
|
-
children:
|
|
1017
|
+
T && /* @__PURE__ */ z("p", {
|
|
1018
|
+
className: xe,
|
|
1019
|
+
children: T
|
|
1018
1020
|
}),
|
|
1019
|
-
|
|
1021
|
+
b && /* @__PURE__ */ B("section", {
|
|
1020
1022
|
className: "flex flex-col gap-2",
|
|
1021
|
-
children: [/* @__PURE__ */
|
|
1022
|
-
className:
|
|
1023
|
-
children:
|
|
1024
|
-
}), /* @__PURE__ */
|
|
1025
|
-
ariaLabel:
|
|
1026
|
-
value:
|
|
1027
|
-
onChange: (e) =>
|
|
1028
|
-
items:
|
|
1029
|
-
disabled:
|
|
1023
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1024
|
+
className: be,
|
|
1025
|
+
children: W
|
|
1026
|
+
}), /* @__PURE__ */ z(k, {
|
|
1027
|
+
ariaLabel: W,
|
|
1028
|
+
value: b.versionMode,
|
|
1029
|
+
onChange: (e) => b.onVersionModeChange(e),
|
|
1030
|
+
items: X,
|
|
1031
|
+
disabled: O
|
|
1030
1032
|
})]
|
|
1031
1033
|
}),
|
|
1032
|
-
|
|
1034
|
+
Se && /* @__PURE__ */ B("section", {
|
|
1033
1035
|
className: "flex flex-col gap-2",
|
|
1034
|
-
"aria-labelledby":
|
|
1035
|
-
children: [/* @__PURE__ */
|
|
1036
|
-
id:
|
|
1037
|
-
className:
|
|
1038
|
-
children:
|
|
1039
|
-
}), /* @__PURE__ */
|
|
1040
|
-
className:
|
|
1041
|
-
children:
|
|
1036
|
+
"aria-labelledby": ye,
|
|
1037
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1038
|
+
id: ye,
|
|
1039
|
+
className: be,
|
|
1040
|
+
children: S?.title ?? "Private dependencies"
|
|
1041
|
+
}), /* @__PURE__ */ z("p", {
|
|
1042
|
+
className: xe,
|
|
1043
|
+
children: w
|
|
1042
1044
|
})]
|
|
1043
1045
|
}),
|
|
1044
|
-
!
|
|
1045
|
-
dependencies:
|
|
1046
|
-
labels:
|
|
1047
|
-
headingClassName:
|
|
1048
|
-
styles:
|
|
1046
|
+
!Se && x != null && /* @__PURE__ */ z(Ie, {
|
|
1047
|
+
dependencies: x,
|
|
1048
|
+
labels: S,
|
|
1049
|
+
headingClassName: P,
|
|
1050
|
+
styles: C
|
|
1049
1051
|
}),
|
|
1050
|
-
|
|
1051
|
-
headingClassName:
|
|
1052
|
-
...
|
|
1052
|
+
D != null && /* @__PURE__ */ z(Ee, {
|
|
1053
|
+
headingClassName: P,
|
|
1054
|
+
...D
|
|
1053
1055
|
})
|
|
1054
1056
|
]
|
|
1055
1057
|
});
|
|
1056
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ z(re, {
|
|
1057
1059
|
isOpen: t,
|
|
1058
1060
|
onClose: r,
|
|
1059
1061
|
returnFocusRef: s,
|
|
1060
1062
|
onPendingDestinationChange: m,
|
|
1061
1063
|
labels: {
|
|
1062
|
-
title:
|
|
1063
|
-
changeFolderTitle:
|
|
1064
|
-
closeAriaLabel:
|
|
1064
|
+
title: F,
|
|
1065
|
+
changeFolderTitle: R,
|
|
1066
|
+
closeAriaLabel: ie,
|
|
1065
1067
|
backAriaLabel: ae,
|
|
1066
1068
|
cancelLabel: oe,
|
|
1067
|
-
selectLabel:
|
|
1069
|
+
selectLabel: U
|
|
1068
1070
|
},
|
|
1069
1071
|
titleClassName: l,
|
|
1070
1072
|
action: {
|
|
1071
|
-
label:
|
|
1072
|
-
busyLabel:
|
|
1073
|
+
label: V,
|
|
1074
|
+
busyLabel: H,
|
|
1073
1075
|
isDisabled: o,
|
|
1074
1076
|
onClick: i
|
|
1075
1077
|
},
|
|
1076
1078
|
item: {
|
|
1077
1079
|
title: u.title,
|
|
1078
|
-
summary:
|
|
1080
|
+
summary: Ce
|
|
1079
1081
|
},
|
|
1080
1082
|
roots: d,
|
|
1081
1083
|
destination: f,
|
|
1082
|
-
onDestinationChange:
|
|
1083
|
-
onCreateFolder:
|
|
1084
|
-
onCreateFolderError:
|
|
1084
|
+
onDestinationChange: _e,
|
|
1085
|
+
onCreateFolder: Y,
|
|
1086
|
+
onCreateFolderError: ge,
|
|
1085
1087
|
getDisabledReason: h,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1088
|
+
canCreateFolderIn: g,
|
|
1089
|
+
mainSections: we,
|
|
1090
|
+
isSubmitting: O,
|
|
1091
|
+
submitError: ee ?? he,
|
|
1092
|
+
foldersError: A,
|
|
1093
|
+
onRetryFolders: j,
|
|
1091
1094
|
panelLabels: {
|
|
1092
|
-
destinationHeading:
|
|
1093
|
-
...
|
|
1095
|
+
destinationHeading: se,
|
|
1096
|
+
...de
|
|
1094
1097
|
},
|
|
1095
|
-
panelStyles: { folderTree:
|
|
1096
|
-
headingClassName:
|
|
1097
|
-
destinationClassName:
|
|
1098
|
+
panelStyles: { folderTree: pe },
|
|
1099
|
+
headingClassName: P,
|
|
1100
|
+
destinationClassName: te
|
|
1098
1101
|
});
|
|
1099
1102
|
};
|
|
1100
1103
|
//#endregion
|
|
1101
|
-
export {
|
|
1104
|
+
export { Z as PUBLISH_PANEL_CLASS, V as PublishCalloutKind, U as PublishDependenciesAppearance, Ie as PublishDependenciesList, H as PublishDependencyType, Ye as PublishFooter, Re as PublishHistoryList, We as PublishPanel, K as PublishPanelView, nt as SaveVersionMode, Ze as StandalonePublishPanel, $ as StandaloneSaveToFolderPanel, tt as UnpublishConfirmationDialog, Ee as VersionHistorySection, Ce as VersionHistoryStatus, J as collectFolderKeys, se as derivePublishState, fe as filterFolderTree, G as formatPublishedDate, ge as fromFolderPathKey, Se as getSiblingFolderNames, xe as getUniqueFolderName, he as mergeFolderPaths, q as sortFolderTree, ve as toDialFileTree, Y as toFolderPathKey, ue as usePublishFlow, de as usePublishFolderView, be as validateFolderName };
|