@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/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 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";
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 B = /* @__PURE__ */ function(e) {
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
- }({}), ce = (e) => e.isSubmitting ? {
15
- calloutKind: B.None,
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: B.None,
19
+ calloutKind: V.None,
20
20
  isSubmitDisabled: !0,
21
21
  isSubmitLoading: !1
22
22
  } : e.hasSubmitError ? {
23
- calloutKind: B.SubmitError,
23
+ calloutKind: V.SubmitError,
24
24
  isSubmitDisabled: !1,
25
25
  isSubmitLoading: !1
26
26
  } : e.hasExistingPublicationInFolder ? {
27
- calloutKind: B.ReplaceWarning,
27
+ calloutKind: V.ReplaceWarning,
28
28
  isSubmitDisabled: e.allowReplace === !1,
29
29
  isSubmitLoading: !1
30
30
  } : e.isTargetTaken ? {
31
- calloutKind: B.TargetTaken,
31
+ calloutKind: V.TargetTaken,
32
32
  isSubmitDisabled: !0,
33
33
  isSubmitLoading: !1
34
34
  } : {
35
- calloutKind: B.Info,
35
+ calloutKind: V.Info,
36
36
  isSubmitDisabled: !1,
37
37
  isSubmitLoading: !1
38
38
  } : {
39
- calloutKind: B.NoAccess,
39
+ calloutKind: V.NoAccess,
40
40
  isSubmitDisabled: !0,
41
41
  isSubmitLoading: !1
42
42
  } : {
43
- calloutKind: B.None,
43
+ calloutKind: V.None,
44
44
  isSubmitDisabled: !0,
45
45
  isSubmitLoading: !1
46
- }, le = 864e5, ue = (e, t = Date.now(), n) => {
47
- let r = Math.floor((t - e) / le);
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
- }, de = (e, t, n) => t.length === 0 ? [...e, {
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 ? de(e.children, t, n) : e.children
65
- }), fe = (e, t, n) => {
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 ? fe(e.children, t, n) : e.children
72
+ children: e.children ? le(e.children, t, n) : e.children
73
73
  });
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: _ }) => {
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 te = e((e) => {
83
+ let j = e((e) => {
84
84
  A(!0), D(e);
85
- }, []), j = b != null && g != null && _ != null && g(b);
85
+ }, []), M = b != null && g != null && _ != null && g(b);
86
86
  t(() => {
87
- j && k(!1);
88
- }, [j]);
89
- let M = r(() => {
90
- if (!b || j) return !1;
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
- j,
95
+ M,
96
96
  n.version,
97
97
  b
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);
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 || R == null || !m || M) {
101
- L(!1);
100
+ if (b == null || z == null || !m || N) {
101
+ R(!1);
102
102
  return;
103
103
  }
104
104
  let e = b.join("/");
105
- if ([...N.current].some((t) => e === t || e.startsWith(`${t}/`))) {
106
- L(!1);
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 L(!0), m(n, b).then((e) => {
111
- t || P((t) => e ? R : t === R ? void 0 : 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 || L(!1);
113
+ t || R(!1);
114
114
  }), () => {
115
115
  t = !0;
116
116
  };
117
117
  }, [
118
- R,
119
- M,
118
+ z,
119
+ N,
120
120
  m == null
121
121
  ]);
122
- let ie = e(async (e, t) => {
122
+ let re = e(async (e, t) => {
123
123
  let n = [...e, t].join("/");
124
- N.current.add(n), y((n) => de(n, e, t));
124
+ P.current.add(n), y((n) => ce(n, e, t));
125
125
  try {
126
126
  await u?.(e, t);
127
127
  } catch {
128
- N.current.delete(n), y((n) => fe(n, e, t)), T(!0);
128
+ P.current.delete(n), y((n) => le(n, e, t)), T(!0);
129
129
  }
130
- }, [u]), ae = e(async () => {
130
+ }, [u]), ie = 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(), O), f?.(n, b, j), !0;
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) && R != null ? F(R) : T(!0), p?.(n, b, e), !1;
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
- j,
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
- 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);
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: ie,
160
- hasExistingPublicationInFolder: M,
159
+ handleCreateFolder: re,
160
+ hasExistingPublicationInFolder: N,
161
161
  hasWriteAccess: !b || c(b),
162
162
  isSubmitting: S,
163
163
  hasSubmitError: w,
164
- handleSubmit: ae,
165
- reset: oe,
164
+ handleSubmit: ie,
165
+ reset: ae,
166
166
  author: E,
167
- setAuthor: te,
167
+ setAuthor: j,
168
168
  publishCredentials: O,
169
169
  setPublishCredentials: k,
170
- isTargetTaken: z,
171
- isTargetChecking: I,
172
- isDirectWrite: j
170
+ isTargetTaken: B,
171
+ isTargetChecking: L,
172
+ isDirectWrite: M
173
173
  };
174
- }, U = /* @__PURE__ */ function(e) {
174
+ }, K = /* @__PURE__ */ function(e) {
175
175
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
176
- }({}), me = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
177
- let [i, o] = a(U.Main), [s, c] = 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(U.Main);
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(U.ChangeFolder);
185
+ c(n), o(K.ChangeFolder);
186
186
  },
187
- backToMain: () => o(U.Main),
187
+ backToMain: () => o(K.Main),
188
188
  selectFolder: () => {
189
- s != null && r(s), o(U.Main);
189
+ s != null && r(s), o(K.Main);
190
190
  }
191
191
  };
192
- }, he = (e, t) => {
192
+ }, fe = (e, t) => {
193
193
  let n = t.trim().toLowerCase();
194
194
  return n ? e.reduce((e, r) => {
195
- let i = r.children ? he(r.children, t) : void 0;
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
- }, W = (e, t) => e.localeCompare(t, void 0, {
201
+ }, pe = (e, t) => e.localeCompare(t, void 0, {
202
202
  sensitivity: "base",
203
203
  numeric: !0
204
- }), ge = (e) => [...e].sort((e, t) => W(e.name, t.name)).map((e) => e.children ? {
204
+ }), q = (e) => [...e].sort((e, t) => pe(e.name, t.name)).map((e) => e.children ? {
205
205
  ...e,
206
- children: ge(e.children)
207
- } : e), _e = (e, t, n) => {
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: _e(e.children ?? [], i, a)
213
+ children: me(e.children ?? [], i, a)
214
214
  } : e) : e : [...e, {
215
215
  path: a,
216
216
  name: r,
217
- children: i.length ? _e([], i, a) : void 0
217
+ children: i.length ? me([], i, a) : void 0
218
218
  }];
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);
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 ? xe(e.children) : void 0
226
+ items: e.children ? ve(e.children) : void 0
227
227
  };
228
- }), Se = /[/\\:;,={}&"]/, Ce = (e, t, n, r) => {
228
+ }), ye = /[/\\:;,={}&"]/, be = (e, t, n, r) => {
229
229
  let i = e.trim();
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) => {
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
- }, Te = (e, t) => {
237
+ }, Se = (e, t) => {
238
238
  if (t.length === 0) return e.map((e) => e.name);
239
- let n = K(t), r = (e) => {
239
+ let n = Y(t), r = (e) => {
240
240
  for (let t of e) {
241
- if (K(t.path) === n) return t;
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
- }, Ee = /* @__PURE__ */ function(e) {
247
+ }, Ce = /* @__PURE__ */ function(e) {
248
248
  return e.NotPublished = "not-published", e.InReview = "in-review", e.Published = "published", e.Unknown = "unknown", e;
249
- }({}), q = {
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
- }, De = {
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
- }, Oe = (e, t) => {
265
+ }, Te = (e, t) => {
266
266
  switch (e.status) {
267
- case Ee.InReview: return t.inReviewLabel;
268
- case Ee.Unknown: return t.unknownLabel;
269
- case Ee.Published: return t.publishedLabel;
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
- }, 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 = {} }) => {
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
- ...De,
276
+ ...we,
277
277
  ...c
278
278
  }, { colors: T } = g, E = {
279
- ...F({
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__ */ z("section", {
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__ */ R("h2", {
294
+ /* @__PURE__ */ z("h2", {
295
295
  id: v,
296
- className: I(l, q.heading),
296
+ className: L(l, X.heading),
297
297
  children: w.heading
298
298
  }),
299
- /* @__PURE__ */ R(x, {
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__ */ R(x, {
304
+ /* @__PURE__ */ z(x, {
305
305
  politeness: C.Assertive,
306
- children: i && /* @__PURE__ */ z("div", {
306
+ children: i && /* @__PURE__ */ B("div", {
307
307
  className: "flex flex-wrap items-center gap-2",
308
- children: [/* @__PURE__ */ R(h, { text: w.errorLabel }), s && /* @__PURE__ */ R(b, {
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__ */ R("p", {
316
- className: I(f, q.meta),
315
+ e.length === 0 ? /* @__PURE__ */ z("p", {
316
+ className: L(f, X.meta),
317
317
  children: w.emptyLabel
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", {
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__ */ R(m, {
325
+ /* @__PURE__ */ z(m, {
326
326
  text: e.version,
327
- className: I("flex-initial!", u, q.version)
327
+ className: L("flex-initial!", u, X.version)
328
328
  }),
329
- t && /* @__PURE__ */ R(o, { label: t }),
330
- n && /* @__PURE__ */ R("span", {
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__ */ R(A, {
334
- variant: te.Text,
333
+ children: /* @__PURE__ */ z(A, {
334
+ variant: j.Text,
335
335
  width: "84px",
336
336
  height: "24px",
337
- color: q.skeletonColor
337
+ color: X.skeletonColor
338
338
  })
339
339
  }),
340
- e.modifiedAt && /* @__PURE__ */ R("span", {
341
- className: I("ms-auto shrink-0", d, q.date),
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__ */ z("div", {
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__ */ R(_, {
347
+ children: [e.folder && /* @__PURE__ */ z(_, {
348
348
  name: e.folder,
349
- nameClassName: I(f, q.meta)
350
- }), e.author && /* @__PURE__ */ R("span", {
351
- className: I("ms-auto shrink-0", f, q.meta),
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
- }, J = {
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
- }, Ae = "Private dependencies", Y = {
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
- }, 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", {
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 === V.File ? /* @__PURE__ */ R("span", {
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__ */ R(g, {
388
+ children: /* @__PURE__ */ z(g, {
389
389
  decorative: !0,
390
- size: t ? Fe : Ne,
390
+ size: t ? Me : Ae,
391
391
  name: e.name,
392
392
  type: e.isFolder ? f.Folder : f.File
393
393
  })
394
- }) : /* @__PURE__ */ R(ne, {
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
- }, 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({
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__ */ z(L, { children: [/* @__PURE__ */ R(x, {
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__ */ z("section", {
417
+ }), y > 0 && /* @__PURE__ */ B("section", {
418
418
  "aria-labelledby": l,
419
- className: I("flex flex-col", h ? "gap-2" : "gap-3", J.dependencies),
419
+ className: L("flex flex-col", h ? "gap-2" : "gap-3", Z.dependencies),
420
420
  style: v,
421
421
  children: [
422
- /* @__PURE__ */ R("h2", {
422
+ /* @__PURE__ */ z("h2", {
423
423
  id: l,
424
- className: I(r, Y.heading),
424
+ className: L(r, Q.heading),
425
425
  children: u
426
426
  }),
427
- h ? /* @__PURE__ */ R("p", {
428
- className: I(o, Y.caption),
427
+ h ? /* @__PURE__ */ z("p", {
428
+ className: L(o, Q.caption),
429
429
  children: d
430
- }) : /* @__PURE__ */ R(T, {
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__ */ R("ul", {
437
- className: J.dependenciesList,
436
+ /* @__PURE__ */ z("ul", {
437
+ className: Z.dependenciesList,
438
438
  children: e.map(h ? (e) => {
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", {
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__ */ 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),
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__ */ 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),
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] ?? 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", {
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__ */ 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),
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__ */ R("span", {
472
- className: I("truncate", a, Y.meta),
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
- }, X = {
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
- }, 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({
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 = I(f, X.emptyState);
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__ */ R(x, {
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__ */ R("ul", {
510
+ return /* @__PURE__ */ z("ul", {
511
511
  style: m,
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", {
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__ */ z("span", {
519
- className: I(u, X.version),
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__ */ R(M, {
526
+ e.version === t && /* @__PURE__ */ z(N, {
527
527
  label: a,
528
- className: I("shrink-0 whitespace-nowrap", X.currentBadge)
528
+ className: L("shrink-0 whitespace-nowrap", Le.currentBadge)
529
529
  }),
530
- e.publishCredentials === !0 && /* @__PURE__ */ R(M, {
530
+ e.publishCredentials === !0 && /* @__PURE__ */ z(N, {
531
531
  label: o,
532
- className: I("shrink-0 whitespace-nowrap", X.sharedCredentialsBadge)
532
+ className: L("shrink-0 whitespace-nowrap", Le.sharedCredentialsBadge)
533
533
  })
534
534
  ]
535
- }), /* @__PURE__ */ R("span", {
536
- className: I(d, X.date),
537
- children: ue(e.publishedAt)
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
- }, Ve = {
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
- }, He = "", Ue = () => void 0, We = (e) => e == null ? void 0 : {
547
- rootKey: He,
546
+ }, Be = "", Ve = () => void 0, He = (e) => e == null ? void 0 : {
547
+ rootKey: Be,
548
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
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
- ...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);
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 === U.ChangeFolder ? tt.current?.focus({ preventScroll: !0 }) : et.current?.focus({ preventScroll: !0 }));
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 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
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
- Q,
576
- k,
575
+ rt,
577
576
  ee,
578
577
  A,
579
- te,
580
578
  j,
581
579
  M,
582
- N
583
- ]), rt = Q ? h[h.length - 1] ?? Le : "", it = c ? c() : /* @__PURE__ */ R("span", {
584
- className: I("truncate", ue, Ve.summaryTitle),
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
- }), at = r(() => [{
587
- key: He,
588
- label: Le,
586
+ }), ot = r(() => [{
587
+ key: Be,
588
+ label: Fe,
589
589
  items: m,
590
- expandedPaths: C,
591
- onExpandedPathsChange: w,
592
- loadingPaths: O
590
+ expandedPaths: w,
591
+ onExpandedPathsChange: O,
592
+ loadingPaths: k
593
593
  }], [
594
- Le,
594
+ Fe,
595
595
  m,
596
- C,
597
596
  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
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
- X,
612
- Be,
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
- 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", {
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": 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,
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: at,
632
+ roots: ot,
633
633
  destination: {
634
- rootKey: He,
634
+ rootKey: Be,
635
635
  path: h ?? []
636
636
  },
637
- onDestinationChange: Ue,
638
- onChangeFolderClick: Ue,
639
- pendingDestination: We(g),
640
- onPendingDestinationChange: st,
641
- onCreateFolder: ct,
637
+ onDestinationChange: Ve,
638
+ onChangeFolderClick: Ve,
639
+ pendingDestination: He(g),
640
+ onPendingDestinationChange: ct,
641
+ onCreateFolder: lt,
642
642
  getDisabledReason: S,
643
- isSubmitting: A,
644
- panelLabels: ot,
645
- panelStyles: { folderTree: ge }
643
+ canCreateFolderIn: C,
644
+ isSubmitting: j,
645
+ panelLabels: st,
646
+ panelStyles: { folderTree: me }
646
647
  })
647
648
  });
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,
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__ */ R(re, {
654
- colors: ve,
655
- children: it
656
- }) : /* @__PURE__ */ R(re, {
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: ve
665
+ colors: Y
665
666
  }),
666
- /* @__PURE__ */ z("section", { children: [
667
- /* @__PURE__ */ R("h2", {
668
- className: I("mb-2", de, Ve.sectionHeading),
669
- children: K
667
+ /* @__PURE__ */ B("section", { children: [
668
+ /* @__PURE__ */ z("h2", {
669
+ className: L("mb-2", le, ze.sectionHeading),
670
+ children: ge
670
671
  }),
671
- /* @__PURE__ */ z("div", {
672
+ /* @__PURE__ */ B("div", {
672
673
  className: "flex min-w-0 items-center gap-2",
673
- children: [/* @__PURE__ */ R("div", {
674
+ children: [/* @__PURE__ */ z("div", {
674
675
  role: "group",
675
- "aria-label": ye,
676
+ "aria-label": _e,
676
677
  className: "min-w-0 flex-1",
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
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__ */ R(v, {
685
+ }), /* @__PURE__ */ z(v, {
685
686
  ref: et,
686
687
  size: p.Small,
687
- label: Q ? xe : Se,
688
- iconBefore: /* @__PURE__ */ R(se, {
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: A,
694
+ disabled: j,
694
695
  onClick: a
695
696
  })]
696
697
  }),
697
- $.calloutKind === B.Info && !V && /* @__PURE__ */ R("div", {
698
+ $.calloutKind === V.Info && !U && /* @__PURE__ */ z("div", {
698
699
  className: "my-4",
699
- children: /* @__PURE__ */ R(T, {
700
+ children: /* @__PURE__ */ z(T, {
700
701
  type: E.SectionMessage,
701
702
  variant: D.Info,
702
- title: De,
703
- message: H == null ? Oe : `${Oe} ${H}`
703
+ title: Te,
704
+ message: W == null ? De : `${De} ${W}`
704
705
  })
705
706
  }),
706
- $.calloutKind !== B.None && $.calloutKind !== B.Info && /* @__PURE__ */ R("div", {
707
+ $.calloutKind !== V.None && $.calloutKind !== V.Info && /* @__PURE__ */ z("div", {
707
708
  className: "mt-3",
708
- children: /* @__PURE__ */ R(T, {
709
+ children: /* @__PURE__ */ z(T, {
709
710
  type: E.SectionMessage,
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,
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: me
719
+ folderNameClassName: fe
719
720
  })
720
721
  })
721
722
  }),
722
- H != null && !V && $.calloutKind !== B.Info && !$.isSubmitDisabled && /* @__PURE__ */ R("div", {
723
+ W != null && !U && $.calloutKind !== V.Info && !$.isSubmitDisabled && /* @__PURE__ */ z("div", {
723
724
  className: "mt-4",
724
- children: /* @__PURE__ */ R(T, {
725
+ children: /* @__PURE__ */ z(T, {
725
726
  type: E.SectionMessage,
726
727
  variant: D.Info,
727
- message: H
728
+ message: W
728
729
  })
729
730
  }),
730
- P != null && !V && /* @__PURE__ */ R("div", {
731
+ R != null && !U && /* @__PURE__ */ z("div", {
731
732
  className: "mt-4",
732
- children: /* @__PURE__ */ R(y, {
733
+ children: /* @__PURE__ */ z(y, {
733
734
  id: $e,
734
735
  labelProps: { label: Ke },
735
736
  placeholder: Je,
736
- caption: Xe,
737
+ caption: Ye,
737
738
  value: ne,
738
- onChange: (e) => P(e ?? ""),
739
- maxLength: Ge,
740
- disabled: A
739
+ onChange: (e) => R(e ?? ""),
740
+ maxLength: Ue,
741
+ disabled: j
741
742
  })
742
743
  }),
743
- V && Z != null && /* @__PURE__ */ R("p", {
744
- className: I("mt-4", Ve.directNote, fe),
745
- children: Z
744
+ U && Ze != null && /* @__PURE__ */ z("p", {
745
+ className: L("mt-4", ze.directNote, ue),
746
+ children: Ze
746
747
  }),
747
- ie != null && !V && /* @__PURE__ */ R("div", {
748
+ H != null && !U && /* @__PURE__ */ z("div", {
748
749
  className: "mt-4",
749
- children: /* @__PURE__ */ R(s, {
750
- labelProps: { label: Ze },
750
+ children: /* @__PURE__ */ z(s, {
751
+ labelProps: { label: Xe },
751
752
  caption: Qe,
752
- isSelected: L,
753
- onChange: ie,
754
- disabled: A
753
+ isSelected: re,
754
+ onChange: H,
755
+ disabled: j
755
756
  })
756
757
  })
757
758
  ] }),
758
- d != null && /* @__PURE__ */ R(ze, {
759
+ d != null && /* @__PURE__ */ z(Ie, {
759
760
  dependencies: d,
760
- labels: Re,
761
- headingClassName: de,
762
- styles: _e
761
+ labels: Le,
762
+ headingClassName: le,
763
+ styles: he
763
764
  }),
764
- f != null && /* @__PURE__ */ R(ke, {
765
- headingClassName: de,
765
+ f != null && /* @__PURE__ */ z(Ee, {
766
+ headingClassName: le,
766
767
  ...f
767
768
  })
768
769
  ]
769
770
  });
770
- }, qe = (e) => e === B.ReplaceWarning || e === B.TargetTaken ? D.Warning : D.Error, Je = (e, t, n) => {
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__ */ z(L, { children: [
773
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ B(R, { children: [
773
774
  r,
774
- /* @__PURE__ */ R("strong", {
775
+ /* @__PURE__ */ z("strong", {
775
776
  className: n,
776
777
  children: t
777
778
  }),
778
779
  i
779
780
  ] });
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", {
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: 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, {
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__ */ R(w, {
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__ */ R(O, {
796
+ }) : /* @__PURE__ */ z(O, {
796
797
  label: x,
797
798
  className: "mobile:flex-1",
798
799
  disabled: r,
799
- iconBefore: i ? /* @__PURE__ */ R("span", {
800
+ iconBefore: i ? /* @__PURE__ */ z("span", {
800
801
  "aria-hidden": !0,
801
- children: /* @__PURE__ */ R(j, { size: l.SM })
802
+ children: /* @__PURE__ */ z(M, { size: l.SM })
802
803
  }) : void 0,
803
804
  onClick: o
804
805
  })]
805
806
  });
806
- }, Z = {
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
- }, 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({
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
- }), le = H.view === U.ChangeFolder, ue = r(() => ce({
825
+ }), G = W.view === K.ChangeFolder, ce = r(() => se({
825
826
  hasSelectedFolder: l != null,
826
- hasExistingPublicationInFolder: g,
827
- hasWriteAccess: _,
828
- isSubmitting: v,
829
- hasSubmitError: y,
830
- isTargetTaken: b,
831
- isTargetChecking: x,
832
- allowReplace: S
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 = L?.closest("[role=\"dialog\"]");
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 = E?.current;
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
- L,
861
- E
862
- ]), /* @__PURE__ */ z(ee, {
861
+ re,
862
+ D
863
+ ]), /* @__PURE__ */ B(ee, {
863
864
  open: e,
864
- onClose: T,
865
- header: /* @__PURE__ */ R("span", {
866
- className: I("block truncate text-center", ne, Z.title),
867
- children: le ? oe : ae
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: B,
870
- onBack: le ? H.backToMain : void 0,
871
- backAriaLabel: se,
872
- backDisabled: v,
873
- closeAriaLabel: V,
874
- closeDisabled: v,
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),
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__ */ R("div", {
882
+ children: [/* @__PURE__ */ z("div", {
882
883
  ref: ie,
883
- className: I("min-h-0 flex-1 overflow-y-auto", Z.content),
884
- children: /* @__PURE__ */ R("div", {
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__ */ R(Ke, {
887
+ children: /* @__PURE__ */ z(We, {
887
888
  resource: n,
888
889
  renderSummary: i,
889
890
  dependencies: o,
890
891
  versionHistory: s,
891
- view: H.view,
892
- onChangeFolderClick: H.openFolderView,
892
+ view: W.view,
893
+ onChangeFolderClick: W.openFolderView,
893
894
  folderItems: c,
894
895
  selectedFolderPath: l,
895
- pendingFolderPath: H.pendingFolderPath,
896
- onPendingFolderPathChange: H.setPendingFolderPath,
896
+ pendingFolderPath: W.pendingFolderPath,
897
+ onPendingFolderPathChange: W.setPendingFolderPath,
897
898
  onCreateFolder: d,
898
899
  getDisabledReason: f,
899
- expandedPaths: p,
900
- onExpandedPathsChange: m,
901
- loadingPaths: h,
902
- hasExistingPublicationInFolder: g,
903
- hasWriteAccess: _,
904
- isSubmitting: v,
905
- hasSubmitError: y,
906
- isTargetTaken: b,
907
- isTargetChecking: x,
908
- allowReplace: S,
909
- author: C,
910
- onAuthorChange: w,
911
- labels: O,
912
- styles: k,
913
- summaryTitleClassName: A,
914
- headingClassName: te,
915
- calloutFolderNameClassName: j
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__ */ R(Ze, {
920
+ }), /* @__PURE__ */ z(Ye, {
919
921
  version: n?.version,
920
- hasExistingPublicationInFolder: g,
921
- allowReplace: S,
922
- isSubmitDisabled: ue.isSubmitDisabled,
923
- isSubmitLoading: ue.isSubmitLoading,
924
- onCancel: le ? H.backToMain : T,
925
- onSubmit: D,
926
- view: H.view,
927
- onSelectFolder: H.selectFolder,
928
- isSelectFolderDisabled: H.pendingFolderPath == null,
929
- labels: M
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
- }, $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, {
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__ */ R("span", {
945
+ message: /* @__PURE__ */ z("span", {
944
946
  className: "wrap-break-word",
945
- children: b ? y(t) : v(t, be(n[0] ?? "", h))
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__ */ R("div", {
951
+ children: b && /* @__PURE__ */ z("div", {
950
952
  className: "mt-3",
951
- style: F({ "--ucd-option-text": l?.optionText }),
952
- children: /* @__PURE__ */ R(k, {
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: be(e, h)
961
+ label: _e(e, h)
960
962
  })),
961
- radioClassName: I(s, $e.option)
963
+ radioClassName: L(s, Qe.option)
962
964
  })
963
965
  })
964
966
  });
965
- }, Q = /* @__PURE__ */ function(e) {
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
- }, 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
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
- ...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, {
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
- }), Ee = v ? [{
992
- value: Q.Keep,
993
- label: le.replace("{version}", v.currentVersion)
993
+ }), X = b ? [{
994
+ value: nt.Keep,
995
+ label: G.replace("{version}", b.currentVersion)
994
996
  }, {
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,
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: de,
1005
+ label: le,
1004
1006
  required: !0
1005
1007
  },
1006
- placeholder: fe,
1007
- error: v.newVersionError,
1008
- invalid: !!v.newVersionError,
1009
- disabled: D
1008
+ placeholder: ue,
1009
+ error: b.newVersionError,
1010
+ invalid: !!b.newVersionError,
1011
+ disabled: O
1010
1012
  })
1011
- }] : [], q = /* @__PURE__ */ z("div", {
1013
+ }] : [], we = /* @__PURE__ */ B("div", {
1012
1014
  className: "flex flex-col gap-5",
1013
- style: ge,
1015
+ style: me,
1014
1016
  children: [
1015
- w && /* @__PURE__ */ R("p", {
1016
- className: Ce,
1017
- children: w
1017
+ T && /* @__PURE__ */ z("p", {
1018
+ className: xe,
1019
+ children: T
1018
1020
  }),
1019
- v && /* @__PURE__ */ z("section", {
1021
+ b && /* @__PURE__ */ B("section", {
1020
1022
  className: "flex flex-col gap-2",
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
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
- we && /* @__PURE__ */ z("section", {
1034
+ Se && /* @__PURE__ */ B("section", {
1033
1035
  className: "flex flex-col gap-2",
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
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
- !we && b != null && /* @__PURE__ */ R(ze, {
1045
- dependencies: b,
1046
- labels: x,
1047
- headingClassName: M,
1048
- styles: S
1046
+ !Se && x != null && /* @__PURE__ */ z(Ie, {
1047
+ dependencies: x,
1048
+ labels: S,
1049
+ headingClassName: P,
1050
+ styles: C
1049
1051
  }),
1050
- E != null && /* @__PURE__ */ R(ke, {
1051
- headingClassName: M,
1052
- ...E
1052
+ D != null && /* @__PURE__ */ z(Ee, {
1053
+ headingClassName: P,
1054
+ ...D
1053
1055
  })
1054
1056
  ]
1055
1057
  });
1056
- return /* @__PURE__ */ R(ie, {
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: ne,
1063
- changeFolderTitle: re,
1064
- closeAriaLabel: L,
1064
+ title: F,
1065
+ changeFolderTitle: R,
1066
+ closeAriaLabel: ie,
1065
1067
  backAriaLabel: ae,
1066
1068
  cancelLabel: oe,
1067
- selectLabel: V
1069
+ selectLabel: U
1068
1070
  },
1069
1071
  titleClassName: l,
1070
1072
  action: {
1071
- label: se,
1072
- busyLabel: B,
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: Te
1080
+ summary: Ce
1079
1081
  },
1080
1082
  roots: d,
1081
1083
  destination: f,
1082
- onDestinationChange: ye,
1083
- onCreateFolder: ve,
1084
- onCreateFolderError: K,
1084
+ onDestinationChange: _e,
1085
+ onCreateFolder: Y,
1086
+ onCreateFolderError: ge,
1085
1087
  getDisabledReason: h,
1086
- mainSections: q,
1087
- isSubmitting: D,
1088
- submitError: O ?? _e,
1089
- foldersError: ee,
1090
- onRetryFolders: A,
1088
+ canCreateFolderIn: g,
1089
+ mainSections: we,
1090
+ isSubmitting: O,
1091
+ submitError: ee ?? he,
1092
+ foldersError: A,
1093
+ onRetryFolders: j,
1091
1094
  panelLabels: {
1092
- destinationHeading: H,
1093
- ...U
1095
+ destinationHeading: se,
1096
+ ...de
1094
1097
  },
1095
- panelStyles: { folderTree: he },
1096
- headingClassName: M,
1097
- destinationClassName: N
1098
+ panelStyles: { folderTree: pe },
1099
+ headingClassName: P,
1100
+ destinationClassName: te
1098
1101
  });
1099
1102
  };
1100
1103
  //#endregion
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 };
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 };