@epam/ai-dial-publish-panel 1.3.0-dev.32 → 1.3.0-dev.321

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,39 +1,39 @@
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 { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, GhostButton as d, GhostIconButton as f, Highlight as p, Input as m, NeutralButton as h, Notification as g, NotificationType as _, NotificationVariant as v, Search as y, Select as b, SideDrawer as x, Spinner as S, Tag as C, TagInput as ee } from "@epam/ai-dial-ui-kit";
3
- import { ResourceSummary as w, TAG_INPUT_TAG_CLASS_NAME as T, buildCssVars as E, mergeClasses as D } from "@epam/ai-dial-chat-shared";
4
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
5
- import { IconFolderPlus as j, IconPlus as te, IconTrashX as ne } from "@tabler/icons-react";
6
- import { DialFileNodeType as re, DialFoldersTree as ie } from "@epam/ai-dial-react-file-manager";
2
+ import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, LiveRegion as g, LiveRegionElement as _, NeutralButton as v, Notification as ee, NotificationType as y, NotificationVariant as b, Search as x, Select as S, SideDrawer as te, Spinner as C, Tag as w, TagInput as T } from "@epam/ai-dial-ui-kit";
3
+ import { ResourceSummary as E, TAG_INPUT_TAG_CLASS_NAME as D, buildCssVars as O, mergeClasses as k } from "@epam/ai-dial-chat-shared";
4
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
5
+ import { IconFolderPlus as ne, IconPlus as re, IconTrashX as ie } from "@tabler/icons-react";
6
+ import { DialFileNodeType as ae, DialFoldersTree as oe } from "@epam/ai-dial-react-file-manager";
7
7
  //#region src/models/publish.ts
8
- var M = /* @__PURE__ */ function(e) {
8
+ var N = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), N = /* @__PURE__ */ function(e) {
10
+ }({}), P = /* @__PURE__ */ function(e) {
11
11
  return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
- }({}), P = (e) => e.isSubmitting ? {
13
- calloutKind: N.None,
12
+ }({}), se = (e) => e.isSubmitting ? {
13
+ calloutKind: P.None,
14
14
  isSubmitDisabled: !0,
15
15
  isSubmitLoading: !0
16
16
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
17
- calloutKind: N.SubmitError,
17
+ calloutKind: P.SubmitError,
18
18
  isSubmitDisabled: !1,
19
19
  isSubmitLoading: !1
20
20
  } : e.hasExistingPublicationInFolder ? {
21
- calloutKind: N.ReplaceWarning,
21
+ calloutKind: P.ReplaceWarning,
22
22
  isSubmitDisabled: e.allowReplace === !1,
23
23
  isSubmitLoading: !1
24
24
  } : {
25
- calloutKind: N.Info,
25
+ calloutKind: P.Info,
26
26
  isSubmitDisabled: !1,
27
27
  isSubmitLoading: !1
28
28
  } : {
29
- calloutKind: N.NoAccess,
29
+ calloutKind: P.NoAccess,
30
30
  isSubmitDisabled: !0,
31
31
  isSubmitLoading: !1
32
32
  } : {
33
- calloutKind: N.None,
33
+ calloutKind: P.None,
34
34
  isSubmitDisabled: !0,
35
35
  isSubmitLoading: !1
36
- }, F = 1440 * 60 * 1e3, I = (e, t = Date.now(), n) => {
36
+ }, F = 864e5, I = (e, t = Date.now(), n) => {
37
37
  let r = Math.floor((t - e) / F);
38
38
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
39
39
  month: "short",
@@ -66,137 +66,137 @@ var M = /* @__PURE__ */ function(e) {
66
66
  t(() => {
67
67
  h(o);
68
68
  }, [o]);
69
- let [g, _] = a(), [v, y] = a(!1), [b, x] = a(!1), [S, C] = a([]), [ee, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j, te] = a(!1);
69
+ let [g, _] = a(), [v, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [te, C] = a(!1), [w, T] = a(!1), [E, D] = a(c), [O, k] = a(!1), [A, j] = a(!1);
70
70
  t(() => {
71
- j || O(c);
72
- }, [c, j]);
73
- let ne = e((e) => {
74
- te(!0), O(e);
71
+ A || D(c);
72
+ }, [c, A]);
73
+ let M = e((e) => {
74
+ j(!0), D(e);
75
75
  }, []);
76
76
  t(() => {
77
77
  if (g == null) {
78
- C([]), E(!1);
78
+ S([]), T(!1);
79
79
  return;
80
80
  }
81
81
  if (!p) return;
82
82
  let e = !1;
83
- return w(!0), E(!1), p(g).then((t) => {
84
- e || C(t);
83
+ return C(!0), T(!1), p(g).then((t) => {
84
+ e || S(t);
85
85
  }).catch(() => {
86
- e || E(!0);
86
+ e || T(!0);
87
87
  }).finally(() => {
88
- e || w(!1);
88
+ e || C(!1);
89
89
  }), () => {
90
90
  e = !0;
91
91
  };
92
92
  }, [g]);
93
- let re = r(() => {
93
+ let ne = r(() => {
94
94
  if (!g) return !1;
95
95
  let e = g.join("/");
96
- return i.some((t) => t.folderPath.join("/") === e ? n.version == null ? !0 : t.version === n.version : !1);
96
+ return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
97
97
  }, [
98
98
  i,
99
99
  n.version,
100
100
  g
101
- ]), ie = e(async (e, t) => {
101
+ ]), re = e(async (e, t) => {
102
102
  h((n) => L(n, e, t));
103
103
  try {
104
104
  await l?.(e, t);
105
105
  } catch {
106
- h((n) => R(n, e, t)), x(!0);
106
+ h((n) => R(n, e, t)), b(!0);
107
107
  }
108
- }, [l]), M = e(async () => {
108
+ }, [l]), ie = e(async () => {
109
109
  if (!g) return !1;
110
- y(!0), x(!1);
110
+ ee(!0), b(!1);
111
111
  try {
112
- return await u(n, g, S, D.trim(), k), d?.(n, g), !0;
112
+ return await u(n, g, x, E.trim(), O), d?.(n, g), !0;
113
113
  } catch (e) {
114
- return x(!0), f?.(n, g, e), !1;
114
+ return b(!0), f?.(n, g, e), !1;
115
115
  } finally {
116
- y(!1);
116
+ ee(!1);
117
117
  }
118
118
  }, [
119
- D,
119
+ E,
120
120
  n,
121
121
  u,
122
122
  f,
123
123
  d,
124
- k,
125
- S,
124
+ O,
125
+ x,
126
126
  g
127
- ]), N = e(() => {
128
- h(o), _(void 0), x(!1), C([]), E(!1), O(c), te(!1), A(!1);
127
+ ]), ae = e(() => {
128
+ h(o), _(void 0), b(!1), S([]), T(!1), D(c), j(!1), k(!1);
129
129
  }, [c, o]);
130
130
  return {
131
131
  folderItems: m,
132
132
  selectedFolderPath: g,
133
133
  setSelectedFolderPath: _,
134
- handleCreateFolder: ie,
135
- hasExistingPublicationInFolder: re,
136
- hasWriteAccess: g ? s(g) : !0,
134
+ handleCreateFolder: re,
135
+ hasExistingPublicationInFolder: ne,
136
+ hasWriteAccess: !g || s(g),
137
137
  isSubmitting: v,
138
- hasSubmitError: b,
139
- handleSubmit: M,
140
- reset: N,
141
- rules: S,
142
- setRules: C,
143
- author: D,
144
- setAuthor: ne,
145
- publishCredentials: k,
146
- setPublishCredentials: A,
147
- isRulesLoading: ee,
148
- hasRulesLoadError: T
138
+ hasSubmitError: y,
139
+ handleSubmit: ie,
140
+ reset: ae,
141
+ rules: x,
142
+ setRules: S,
143
+ author: E,
144
+ setAuthor: M,
145
+ publishCredentials: O,
146
+ setPublishCredentials: k,
147
+ isRulesLoading: te,
148
+ hasRulesLoadError: w
149
149
  };
150
- }, ae = (e, t) => {
150
+ }, B = (e, t) => {
151
151
  let n = t.trim().toLowerCase();
152
152
  return n ? e.reduce((e, r) => {
153
- let i = r.children ? ae(r.children, t) : void 0;
153
+ let i = r.children ? B(r.children, t) : void 0;
154
154
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
155
155
  ...r,
156
156
  children: i
157
157
  }), e;
158
158
  }, []) : e;
159
- }, B = (e, t) => e.localeCompare(t, void 0, {
159
+ }, V = (e, t) => e.localeCompare(t, void 0, {
160
160
  sensitivity: "base",
161
161
  numeric: !0
162
- }), oe = (e) => [...e].sort((e, t) => B(e.name, t.name)).map((e) => e.children ? {
162
+ }), ce = (e) => [...e].sort((e, t) => V(e.name, t.name)).map((e) => e.children ? {
163
163
  ...e,
164
- children: oe(e.children)
165
- } : e), V = (e, t, n) => {
164
+ children: ce(e.children)
165
+ } : e), H = (e, t, n) => {
166
166
  let [r, ...i] = t;
167
167
  if (r == null) return e;
168
168
  let a = [...n, r], o = e.find((e) => e.name === r);
169
169
  return o ? i.length ? e.map((e) => e === o ? {
170
170
  ...e,
171
- children: V(e.children ?? [], i, a)
171
+ children: H(e.children ?? [], i, a)
172
172
  } : e) : e : [...e, {
173
173
  path: a,
174
174
  name: r,
175
- children: i.length ? V([], i, a) : void 0
175
+ children: i.length ? H([], i, a) : void 0
176
176
  }];
177
- }, se = (e, t) => t.reduce((e, t) => t.length ? V(e, t, []) : e, e), H = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? H(e.children) : []]), U = (e) => e.join("/"), W = (e) => e.split("/").filter(Boolean), G = (e) => e.map((e) => {
178
- let t = U(e.path);
177
+ }, U = (e, t) => t.reduce((e, t) => t.length ? H(e, t, []) : e, e), W = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? W(e.children) : []]), G = (e) => e.join("/"), K = (e) => e.split("/").filter(Boolean), le = (e) => e.map((e) => {
178
+ let t = G(e.path);
179
179
  return {
180
180
  path: t,
181
181
  name: e.name,
182
182
  folderId: t,
183
183
  nodeType: u.FOLDER,
184
- items: e.children ? G(e.children) : void 0
184
+ items: e.children ? le(e.children) : void 0
185
185
  };
186
- }), K = /[/\\:;,={}&"]/, q = (e, t, n) => {
186
+ }), q = /[/\\:;,={}&"]/, ue = (e, t, n) => {
187
187
  let r = e.trim();
188
- return r ? r.includes("..") || K.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
- }, ce = (e, t) => {
188
+ return r ? r.includes("..") || q.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
+ }, J = (e, t) => {
190
190
  let n = new Set(t.map((e) => e.toLowerCase()));
191
191
  if (!n.has(e.toLowerCase())) return e;
192
192
  let r = 2;
193
193
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
194
194
  return `${e} ${r}`;
195
- }, J = (e, t) => {
195
+ }, de = (e, t) => {
196
196
  if (t.length === 0) return e.map((e) => e.name);
197
- let n = U(t), r = (e) => {
197
+ let n = G(t), r = (e) => {
198
198
  for (let t of e) {
199
- if (U(t.path) === n) return t;
199
+ if (G(t.path) === n) return t;
200
200
  let e = t.children ? r(t.children) : void 0;
201
201
  if (e) return e;
202
202
  }
@@ -207,17 +207,17 @@ var M = /* @__PURE__ */ function(e) {
207
207
  error: "_error_jqcm2_14",
208
208
  selectField: "_selectField_jqcm2_28",
209
209
  selectFieldOpen: "_selectFieldOpen_jqcm2_40"
210
- }, le = 20, ue = 200, de = 8, fe = (e) => {
210
+ }, fe = 20, X = 200, pe = 8, me = (e) => {
211
211
  let t = e.trim();
212
- if (t.length === 0 || t.length > ue) return !1;
212
+ if (t.length === 0 || t.length > X) return !1;
213
213
  try {
214
214
  return new RegExp(t) instanceof RegExp;
215
215
  } catch {
216
216
  return !1;
217
217
  }
218
- }, pe = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = le, labels: u = {}, errorClassName: f = "dial-small-text", styles: g = {} }) => {
218
+ }, he = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = fe, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: g = {} }) => {
219
219
  let _ = {
220
- ...E({
220
+ ...O({
221
221
  "--pare-mobile-bg": g.colors?.mobileBackground,
222
222
  "--pare-bg": g.colors?.background,
223
223
  "--pare-error-text": g.colors?.errorText,
@@ -227,104 +227,103 @@ var M = /* @__PURE__ */ function(e) {
227
227
  "--pare-select-border-focus": g.colors?.selectBorderFocus
228
228
  }),
229
229
  ...g.cssVars
230
- }, { sourceLabel: v = "Source", sourcePlaceholder: y = "Select...", functionLabel: x = "Function", equalOptionLabel: S = "Equal", containOptionLabel: C = "Contain", regexOptionLabel: w = "Regex", targetsLabel: O = "Targets", targetsPlaceholder: j = "Add a target", targetsHintLabel: te = "Press Enter or comma to add a target.", patternLabel: ne = "Pattern", patternPlaceholder: re = "Enter a regular expression", invalidRegexError: ie = "Enter a valid regular expression.", requiredFieldError: N = "This field is required.", targetsRequiredError: P = "Add at least one target.", saveLabel: F = "Save", cancelLabel: I = "Cancel", dialogAriaLabel: L = "Add access rule" } = u, R = n(), z = n(), ae = n(), B = n(), oe = i(null);
230
+ }, { sourceLabel: ee = "Source", sourcePlaceholder: y = "Select...", functionLabel: b = "Function", equalOptionLabel: x = "Equal", containOptionLabel: te = "Contain", regexOptionLabel: C = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: E = "Add a target", targetsHintLabel: A = "Press Enter or comma to add a target.", patternLabel: ne = "Pattern", patternPlaceholder: re = "Enter a regular expression", invalidRegexError: ie = "Enter a valid regular expression.", requiredFieldError: ae = "This field is required.", targetsRequiredError: oe = "Add at least one target.", saveLabel: P = "Save", cancelLabel: se = "Cancel", dialogAriaLabel: F = "Add access rule" } = u, I = n(), L = n(), R = n(), z = n(), B = i(null);
231
231
  t(() => {
232
- oe.current?.focus();
232
+ B.current?.focus();
233
233
  }, []);
234
- let [V, se] = a(), [H, U] = a(), [W, G] = a([]), [K, q] = a(""), [ce, J] = a(!1), [ue, pe] = a(""), [X, me] = a(!1), [Z, he] = a(!1), Q = D(Y.selectField, ce && Y.selectFieldOpen), ge = D(Y.selectField, X && Y.selectFieldOpen), _e = r(() => e.map((e) => ({
234
+ let [V, ce] = a(), [H, U] = a(), [W, G] = a([]), [K, le] = a(""), [q, ue] = a(!1), [J, de] = a(""), [X, he] = a(!1), [Z, ge] = a(!1), _e = k(Y.selectField, q && Y.selectFieldOpen), ve = k(Y.selectField, X && Y.selectFieldOpen), Q = r(() => e.map((e) => ({
235
235
  value: e,
236
236
  label: e,
237
- labelNode: ue.trim() ? /* @__PURE__ */ k(p, {
237
+ labelNode: J.trim() ? /* @__PURE__ */ j(m, {
238
238
  text: e,
239
- query: ue,
239
+ query: J,
240
240
  maxLines: 1
241
241
  }) : void 0
242
- })), [e, ue]), ve = r(() => [
242
+ })), [e, J]), ye = r(() => [
243
243
  {
244
- value: M.Equal,
245
- label: S
244
+ value: N.Equal,
245
+ label: x
246
246
  },
247
247
  {
248
- value: M.Contain,
249
- label: C
248
+ value: N.Contain,
249
+ label: te
250
250
  },
251
251
  {
252
- value: M.Regex,
253
- label: w
252
+ value: N.Regex,
253
+ label: C
254
254
  }
255
255
  ], [
256
- S,
257
- C,
258
- w
259
- ]), $ = H === M.Regex, ye = fe(K), be = V != null && H != null && ($ ? ye : W.length > 0);
260
- return /* @__PURE__ */ A("div", {
261
- ref: oe,
256
+ x,
257
+ te,
258
+ C
259
+ ]), be = H === N.Regex, $ = me(K), xe = V != null && H != null && (be ? $ : W.length > 0);
260
+ return /* @__PURE__ */ M("div", {
261
+ ref: B,
262
262
  role: "dialog",
263
263
  "aria-modal": "true",
264
- "aria-label": L,
264
+ "aria-label": F,
265
265
  tabIndex: -1,
266
266
  onKeyDown: (e) => {
267
267
  e.key === "Escape" && (e.stopPropagation(), s());
268
268
  },
269
269
  style: _,
270
- className: D("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", Y.dialog),
270
+ className: k("fixed inset-0 z-60 flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", Y.dialog),
271
271
  children: [
272
- /* @__PURE__ */ k(b, {
273
- id: z,
274
- labelProps: { label: v },
275
- options: _e,
272
+ /* @__PURE__ */ j(S, {
273
+ id: L,
274
+ labelProps: { label: ee },
275
+ options: Q,
276
276
  value: V,
277
277
  onChange: (e) => {
278
- se(Array.isArray(e) ? e[0] : e), J(!1);
278
+ ce(Array.isArray(e) ? e[0] : e), ue(!1);
279
279
  },
280
280
  placeholder: y,
281
- searchable: e.length > de,
281
+ searchable: e.length > pe,
282
282
  searchPlaceholder: y,
283
- onSearchQueryChange: pe,
283
+ onSearchQueryChange: de,
284
284
  disabled: c,
285
- open: ce,
286
- onOpenChange: J,
287
- fieldClassName: Q,
285
+ open: q,
286
+ onOpenChange: ue,
287
+ fieldClassName: _e,
288
288
  invalid: Z && V == null,
289
- error: Z && V == null ? N : void 0
289
+ error: Z && V == null ? ae : void 0
290
290
  }),
291
- /* @__PURE__ */ k(b, {
292
- labelProps: { label: x },
293
- id: ae,
294
- options: ve,
291
+ /* @__PURE__ */ j(S, {
292
+ labelProps: { label: b },
293
+ id: R,
294
+ options: ye,
295
295
  value: H,
296
296
  onChange: (e) => {
297
297
  let t = Array.isArray(e) ? e[0] : e;
298
- H === M.Regex != (t === M.Regex) && (G([]), q("")), U(t), me(!1);
298
+ H === N.Regex != (t === N.Regex) && (G([]), le("")), U(t), he(!1);
299
299
  },
300
- placeholder: x,
300
+ placeholder: b,
301
301
  disabled: c,
302
302
  open: X,
303
- onOpenChange: me,
304
- fieldClassName: ge,
303
+ onOpenChange: he,
304
+ fieldClassName: ve,
305
305
  invalid: Z && H == null,
306
- error: Z && H == null ? N : void 0
306
+ error: Z && H == null ? ae : void 0
307
307
  }),
308
- $ ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(m, {
309
- id: `${R}-input`,
308
+ be ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(h, {
309
+ id: `${I}-input`,
310
310
  labelProps: { label: ne },
311
311
  placeholder: re,
312
312
  value: K,
313
- onChange: (e) => q(e ?? ""),
314
- invalid: (K.length > 0 || Z) && !ye,
315
- "aria-describedby": (K.length > 0 || Z) && !ye ? R : void 0,
313
+ onChange: (e) => le(e ?? ""),
314
+ invalid: (K.length > 0 || Z) && !$,
315
+ "aria-describedby": (K.length > 0 || Z) && !$ ? I : void 0,
316
316
  disabled: c
317
- }), (K.length > 0 || Z) && !ye && /* @__PURE__ */ k("span", {
318
- id: R,
319
- role: "alert",
320
- className: D("mt-1 block", f, Y.error),
321
- children: ie
322
- })] }) : /* @__PURE__ */ k(ee, {
323
- id: B,
324
- labelProps: { label: O },
325
- placeholder: j,
326
- caption: Z && W.length === 0 ? void 0 : te,
327
- error: Z && W.length === 0 ? P : void 0,
317
+ }), (K.length > 0 || Z) && !$ && /* @__PURE__ */ j(d, {
318
+ id: I,
319
+ className: k("mt-1 block", p, Y.error),
320
+ text: ie
321
+ })] }) : /* @__PURE__ */ j(T, {
322
+ id: z,
323
+ labelProps: { label: w },
324
+ placeholder: E,
325
+ caption: Z && W.length === 0 ? void 0 : A,
326
+ error: Z && W.length === 0 ? oe : void 0,
328
327
  invalid: Z && W.length === 0,
329
328
  value: W,
330
329
  onChange: (e) => {
@@ -336,25 +335,21 @@ var M = /* @__PURE__ */ function(e) {
336
335
  G(t);
337
336
  },
338
337
  disabled: c,
339
- tagClassName: T
338
+ tagClassName: D
340
339
  }),
341
- /* @__PURE__ */ A("div", {
340
+ /* @__PURE__ */ M("div", {
342
341
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
343
- children: [/* @__PURE__ */ k(d, {
344
- label: I,
342
+ children: [/* @__PURE__ */ j(f, {
343
+ label: se,
345
344
  onClick: s,
346
345
  disabled: c
347
- }), /* @__PURE__ */ k(h, {
348
- label: F,
346
+ }), /* @__PURE__ */ j(v, {
347
+ label: P,
349
348
  onClick: () => {
350
- if (!be || V == null || H == null) {
351
- he(!0);
352
- return;
353
- }
354
- o({
349
+ !xe || V == null || H == null ? ge(!0) : o({
355
350
  source: V,
356
351
  function: H,
357
- targets: $ ? [K.trim()] : W
352
+ targets: be ? [K.trim()] : W
358
353
  });
359
354
  },
360
355
  disabled: c
@@ -362,153 +357,152 @@ var M = /* @__PURE__ */ function(e) {
362
357
  })
363
358
  ]
364
359
  });
365
- }, X = {
360
+ }, Z = {
366
361
  ruleRow: "_ruleRow_nx0en_1",
367
362
  heading: "_heading_nx0en_5",
368
363
  hint: "_hint_nx0en_9",
369
364
  loading: "_loading_nx0en_13",
370
365
  ruleText: "_ruleText_nx0en_17"
371
- }, me = 20, Z = (e, t) => e === M.Equal ? t.equal : e === M.Contain ? t.contain : t.regex, he = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: p = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: y = me, maxTargetsPerRule: b, labels: x = {}, headingClassName: C = "dial-body-semi-text", hintClassName: ee = "dial-small-text", loadingClassName: w = "dial-small-text", ruleTextClassName: T = "dial-small-text", ruleSourceClassName: O = "dial-small-semi-text", styles: j = {} }) => {
372
- let re = {
373
- ...E({
374
- "--par-rule-bg": j.colors?.ruleBackground,
375
- "--par-heading-text": j.colors?.headingText,
376
- "--par-hint-text": j.colors?.hintText,
377
- "--par-loading-text": j.colors?.loadingText,
378
- "--par-rule-text": j.colors?.ruleText
366
+ }, ge = 20, _e = (e, t) => e === N.Equal ? t.equal : e === N.Contain ? t.contain : t.regex, ve = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: v = ge, maxTargetsPerRule: x, labels: S = {}, headingClassName: te = "dial-body-semi-text", hintClassName: w = "dial-small-text", loadingClassName: T = "dial-small-text", ruleTextClassName: E = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: A = {} }) => {
367
+ let ne = {
368
+ ...O({
369
+ "--par-rule-bg": A.colors?.ruleBackground,
370
+ "--par-heading-text": A.colors?.headingText,
371
+ "--par-hint-text": A.colors?.hintText,
372
+ "--par-loading-text": A.colors?.loadingText,
373
+ "--par-rule-text": A.colors?.ruleText
379
374
  }),
380
- ...j.cssVars
381
- }, { heading: ie = "Allow access if all match", folderScopeHint: M = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: N = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: P = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: F = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: I = "Add rule", clearAllLabel: L = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate: z = "Remove rule for {source}: {targets}", equalFunctionLabel: ae = "Equal", containFunctionLabel: B = "Contain", regexFunctionLabel: oe = "Regex", loadingLabel: V = "Loading existing rules…", loadErrorLabel: se = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: H = "Rule added.", ruleRemovedAnnouncement: U = "Rule removed.", rulesClearedAnnouncement: W = "All rules cleared.", rulesLoadedAnnouncement: G = "Existing rules loaded for the selected folder.", editorLabels: K } = x, q = n(), [ce, J] = a(!1), [Y, le] = a(""), ue = i(null), de = i(m);
375
+ ...A.cssVars
376
+ }, { heading: ae = "Allow access if all match", folderScopeHint: oe = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: N = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: P = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: se = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: F = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: L = "Or", removeRuleAriaLabelTemplate: R = "Remove rule for {source}: {targets}", equalFunctionLabel: z = "Equal", containFunctionLabel: B = "Contain", regexFunctionLabel: V = "Regex", loadingLabel: ce = "Loading existing rules…", loadErrorLabel: H = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: U = "Rule added.", ruleRemovedAnnouncement: W = "Rule removed.", rulesClearedAnnouncement: G = "All rules cleared.", rulesLoadedAnnouncement: K = "Existing rules loaded for the selected folder.", editorLabels: le } = S, q = n(), [ue, J] = a(!1), [de, Y] = a(""), fe = i(null), X = i(m);
382
377
  t(() => {
383
- de.current && !m && e.length > 0 && le(G), de.current = m;
378
+ X.current && !m && e.length > 0 && Y(K), X.current = m;
384
379
  }, [
385
380
  m,
386
381
  e,
387
- G
382
+ K
388
383
  ]);
389
- let fe = () => {
390
- ue.current = document.activeElement, J(!0);
391
- }, he = () => {
392
- J(!1), ue.current?.focus?.();
384
+ let pe = () => {
385
+ fe.current = document.activeElement, J(!0);
386
+ }, me = () => {
387
+ J(!1), fe.current?.focus?.();
388
+ }, ve = (t) => {
389
+ r([...e, t]), Y(U), me();
393
390
  }, Q = (t) => {
394
- r([...e, t]), le(H), he();
395
- }, ge = (t) => {
396
- r(e.filter((e, n) => n !== t)), le(U);
397
- }, _e = () => {
398
- r([]), le(W);
399
- }, ve = {
400
- equal: ae,
391
+ r(e.filter((e, n) => n !== t)), Y(W);
392
+ }, ye = () => {
393
+ r([]), Y(G);
394
+ }, be = {
395
+ equal: z,
401
396
  contain: B,
402
- regex: oe
403
- }, $ = e.length >= y, ye = p || $, be = u != null && u !== "";
404
- return /* @__PURE__ */ A("div", {
397
+ regex: V
398
+ }, $ = e.length >= v, xe = d || $, Se = u != null && u !== "";
399
+ return /* @__PURE__ */ M("div", {
405
400
  role: "group",
406
401
  "aria-labelledby": q,
407
- style: re,
408
- className: D(p && "pointer-events-none opacity-60"),
402
+ style: ne,
403
+ className: k(d && "pointer-events-none opacity-60"),
409
404
  children: [
410
- /* @__PURE__ */ k("span", {
411
- role: "status",
412
- "aria-live": "polite",
413
- className: "sr-only",
414
- children: Y
405
+ /* @__PURE__ */ j(g, {
406
+ visuallyHidden: !0,
407
+ as: _.Span,
408
+ children: de
415
409
  }),
416
- /* @__PURE__ */ A("div", {
410
+ /* @__PURE__ */ M("div", {
417
411
  className: "mb-1 flex items-center justify-between gap-2",
418
- children: [/* @__PURE__ */ k("div", {
412
+ children: [/* @__PURE__ */ j("div", {
419
413
  id: q,
420
- className: D(C, X.heading),
421
- children: ie
422
- }), e.length > 0 && /* @__PURE__ */ k(d, {
414
+ className: k(te, Z.heading),
415
+ children: ae
416
+ }), e.length > 0 && /* @__PURE__ */ j(f, {
423
417
  variant: o.Primary,
424
- label: L,
425
- onClick: _e,
426
- disabled: p
418
+ label: I,
419
+ onClick: ye,
420
+ disabled: d
427
421
  })]
428
422
  }),
429
- /* @__PURE__ */ k("p", {
430
- className: D("mb-2", ee, X.hint),
431
- children: be ? M.replace("{folder}", u) : N
423
+ /* @__PURE__ */ j("p", {
424
+ className: k("mb-2", w, Z.hint),
425
+ children: Se ? oe.replace("{folder}", u) : N
432
426
  }),
433
- e.length > 0 && !be && /* @__PURE__ */ k("div", {
427
+ e.length > 0 && !Se && /* @__PURE__ */ j("div", {
434
428
  className: "mb-2",
435
- children: /* @__PURE__ */ k(g, {
436
- type: _.SectionMessage,
437
- variant: v.Warning,
429
+ children: /* @__PURE__ */ j(ee, {
430
+ type: y.SectionMessage,
431
+ variant: b.Warning,
438
432
  message: P
439
433
  })
440
434
  }),
441
- m && /* @__PURE__ */ A("div", {
442
- className: D("mb-2 flex items-center gap-2", w, X.loading),
443
- children: [/* @__PURE__ */ k(S, {
435
+ m && /* @__PURE__ */ M("div", {
436
+ className: k("mb-2 flex items-center gap-2", T, Z.loading),
437
+ children: [/* @__PURE__ */ j(C, {
444
438
  size: 16,
445
- ariaLabel: V
446
- }), /* @__PURE__ */ k("span", { children: V })]
439
+ ariaLabel: ce
440
+ }), /* @__PURE__ */ j("span", { children: ce })]
447
441
  }),
448
- h && /* @__PURE__ */ k("div", {
442
+ h && /* @__PURE__ */ j("div", {
449
443
  className: "mb-2",
450
- children: /* @__PURE__ */ k(g, {
451
- type: _.SectionMessage,
452
- variant: v.Warning,
453
- message: se
444
+ children: /* @__PURE__ */ j(ee, {
445
+ type: y.SectionMessage,
446
+ variant: b.Warning,
447
+ message: H
454
448
  })
455
449
  }),
456
- e.length > 0 && /* @__PURE__ */ k("ul", {
450
+ e.length > 0 && /* @__PURE__ */ j("ul", {
457
451
  className: "mb-3 flex flex-col gap-2",
458
452
  children: e.map((e, t) => {
459
- let n = e.targets.join(` ${R} `), r = z.replace("{source}", e.source).replace("{targets}", n);
460
- return /* @__PURE__ */ A("li", {
461
- className: D("flex items-center justify-between gap-2 rounded-lg px-3 py-2", X.ruleRow),
462
- children: [/* @__PURE__ */ A("span", {
463
- className: D("truncate", T, X.ruleText),
453
+ let n = e.targets.join(` ${L} `), r = R.replace("{source}", e.source).replace("{targets}", n);
454
+ return /* @__PURE__ */ M("li", {
455
+ className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Z.ruleRow),
456
+ children: [/* @__PURE__ */ M("span", {
457
+ className: k("truncate", E, Z.ruleText),
464
458
  children: [
465
- /* @__PURE__ */ k("span", {
466
- className: O,
459
+ /* @__PURE__ */ j("span", {
460
+ className: D,
467
461
  children: e.source
468
462
  }),
469
463
  " ",
470
- Z(e.function, ve),
464
+ _e(e.function, be),
471
465
  ": ",
472
466
  n
473
467
  ]
474
- }), /* @__PURE__ */ k(f, {
475
- icon: /* @__PURE__ */ k(ne, {
468
+ }), /* @__PURE__ */ j(p, {
469
+ icon: /* @__PURE__ */ j(ie, {
476
470
  size: c.SM,
477
471
  "aria-hidden": !0,
478
472
  stroke: l
479
473
  }),
480
474
  "aria-label": r,
481
- onClick: () => ge(t),
482
- disabled: p
475
+ onClick: () => Q(t),
476
+ disabled: d
483
477
  })]
484
478
  }, t);
485
479
  })
486
480
  }),
487
- ce && /* @__PURE__ */ k(pe, {
481
+ ue && /* @__PURE__ */ j(he, {
488
482
  sourceOptions: s,
489
- onSave: Q,
490
- onCancel: he,
491
- disabled: p,
492
- maxTargets: b,
493
- labels: K,
494
- styles: j.editor
483
+ onSave: ve,
484
+ onCancel: me,
485
+ disabled: d,
486
+ maxTargets: x,
487
+ labels: le,
488
+ styles: A.editor
495
489
  }),
496
- /* @__PURE__ */ k("div", {
490
+ /* @__PURE__ */ j("div", {
497
491
  className: "flex flex-wrap items-center gap-2",
498
- children: /* @__PURE__ */ k(d, {
499
- label: I,
500
- iconBefore: /* @__PURE__ */ k(te, {
492
+ children: /* @__PURE__ */ j(f, {
493
+ label: F,
494
+ iconBefore: /* @__PURE__ */ j(re, {
501
495
  size: c.SM,
502
496
  "aria-hidden": !0,
503
497
  stroke: l
504
498
  }),
505
- onClick: fe,
506
- disabled: ye
499
+ onClick: pe,
500
+ disabled: xe
507
501
  })
508
502
  }),
509
- $ && /* @__PURE__ */ k("p", {
510
- className: D("mt-2", ee, X.hint),
511
- children: F.replace("{max}", String(y))
503
+ $ && /* @__PURE__ */ j("p", {
504
+ className: k("mt-2", w, Z.hint),
505
+ children: se.replace("{max}", String(v))
512
506
  })
513
507
  ]
514
508
  });
@@ -519,8 +513,8 @@ var M = /* @__PURE__ */ function(e) {
519
513
  date: "_date_d0adf_17",
520
514
  emptyState: "_emptyState_d0adf_21",
521
515
  stripedRow: "_stripedRow_d0adf_25"
522
- }, ge = ({ 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 }) => {
523
- let m = E({
516
+ }, ye = ({ 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 }) => {
517
+ let m = O({
524
518
  "--phl-badge-border": p?.currentBadgeBorder,
525
519
  "--phl-badge-bg": p?.currentBadgeBackground,
526
520
  "--phl-badge-text": p?.currentBadgeText,
@@ -531,233 +525,237 @@ var M = /* @__PURE__ */ function(e) {
531
525
  "--phl-date-text": p?.dateText,
532
526
  "--phl-empty-text": p?.emptyStateText,
533
527
  "--phl-striped-bg": p?.stripedBackground
534
- }), h = D(f, Q.emptyState);
535
- return n ? /* @__PURE__ */ k("p", {
536
- style: m,
537
- className: h,
538
- children: c
539
- }) : r ? /* @__PURE__ */ k("p", {
540
- style: m,
541
- className: h,
542
- role: "alert",
543
- children: l
544
- }) : e.length === 0 ? /* @__PURE__ */ k("p", {
545
- style: m,
546
- className: h,
547
- children: s
548
- }) : /* @__PURE__ */ k("ul", {
528
+ }), h = k(f, Q.emptyState);
529
+ if (n || r || e.length === 0) {
530
+ let e = s;
531
+ return n ? e = c : r && (e = l), /* @__PURE__ */ j(g, {
532
+ as: _.P,
533
+ style: m,
534
+ className: h,
535
+ children: e
536
+ });
537
+ }
538
+ return /* @__PURE__ */ j("ul", {
549
539
  style: m,
550
- children: e.map((e, n) => /* @__PURE__ */ A("li", {
551
- className: D("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
552
- children: [/* @__PURE__ */ A("span", {
540
+ children: e.map((e, n) => /* @__PURE__ */ M("li", {
541
+ className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
542
+ children: [/* @__PURE__ */ M("span", {
553
543
  className: "flex min-w-0 items-center gap-2",
554
544
  style: m,
555
545
  children: [
556
- /* @__PURE__ */ A("span", {
557
- className: D(u, Q.version),
546
+ /* @__PURE__ */ M("span", {
547
+ className: k(u, Q.version),
558
548
  children: [
559
549
  i,
560
550
  " ",
561
551
  e.version
562
552
  ]
563
553
  }),
564
- e.version === t && /* @__PURE__ */ k(C, {
554
+ e.version === t && /* @__PURE__ */ j(w, {
565
555
  label: a,
566
- className: D("shrink-0 whitespace-nowrap", Q.currentBadge)
556
+ className: k("shrink-0 whitespace-nowrap", Q.currentBadge)
567
557
  }),
568
- e.publishCredentials === !0 && /* @__PURE__ */ k(C, {
558
+ e.publishCredentials === !0 && /* @__PURE__ */ j(w, {
569
559
  label: o,
570
- className: D("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
560
+ className: k("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
571
561
  })
572
562
  ]
573
- }), /* @__PURE__ */ k("span", {
574
- className: D(d, Q.date),
563
+ }), /* @__PURE__ */ j("span", {
564
+ className: k(d, Q.date),
575
565
  children: I(e.publishedAt)
576
566
  })]
577
567
  }, `${e.version}-${n}`))
578
568
  });
579
- }, _e = {
569
+ }, be = {
580
570
  divider: "_divider_1gs31_1",
581
571
  tree: "_tree_1gs31_17"
582
- }, ve = ({ items: e, selectedPath: t, onSelectedPathChange: n, onCreateFolder: o, searchQuery: s, disabled: u = !1, createFolderLabel: f = "Create new folder", cancelCreatingFolderLabel: p = "Cancel", addSiblingFolderLabel: m = "Add sibling", addChildFolderLabel: h = "Add child", newFolderDefaultName: g = "New folder", noResultsLabel: _ = "No folders match \"{query}\".", emptyFolderNameError: v = "Folder name cannot be empty.", invalidFolderNameError: y = "Folder name contains invalid characters.", duplicateFolderNameError: b = "A folder with this name already exists.", rootLabel: x = "Organization", expandedPaths: S, onExpandedPathsChange: C, loadingPaths: ee, styles: w = {} }) => {
572
+ }, $ = "data-cancel-creating-folder", xe = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError: ee = "Folder name cannot be empty.", invalidFolderNameError: y = "Folder name contains invalid characters.", duplicateFolderNameError: b = "A folder with this name already exists.", rootLabel: x = "Organization", expandedPaths: S, onExpandedPathsChange: te, loadingPaths: C, styles: w = {} }) => {
583
573
  let T = {
584
- ...E({ "--pft-divider": w.colors?.divider }),
574
+ ...O({ "--pft-divider": w.colors?.divider }),
585
575
  ...w.cssVars
586
- }, [O, ne] = a(() => new Set(t?.map((e, n) => U(t.slice(0, n + 1))) ?? [])), M = S ?? O, N = (e) => {
576
+ }, [E, D] = a(() => new Set(n?.map((e, t) => G(n.slice(0, t + 1))) ?? [])), A = S ?? E, ie = (e) => {
587
577
  let t = new Set(e);
588
- t.delete(""), C ? C(t) : ne(t);
589
- }, [P, F] = a(null), [I, L] = a(g), R = i(null), z = s.trim(), B = P != null, V = r(() => ae(e, s), [e, s]), se = z.length > 0 && V.length === 0, K = !B && z.length > 0, Y = r(() => oe(K ? V : e), [
590
- K,
578
+ t.delete(""), te ? te(t) : D(t);
579
+ }, [N, P] = a(null), [se, F] = a(_), I = i(null), L = i(!1);
580
+ t(() => {
581
+ let e = (e) => {
582
+ e.target instanceof Element && e.target.closest(`[${$}]`) && (L.current = !0);
583
+ };
584
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
585
+ }, []);
586
+ let R = u.trim(), z = N != null, V = r(() => B(e, u), [e, u]), H = R.length > 0 && V.length === 0, U = !z && R.length > 0, q = r(() => ce(U ? V : e), [
587
+ U,
591
588
  V,
592
589
  e
593
- ]), le = r(() => new Set(["", ...H(Y)]), [Y]), ue = r(() => new Set(["", ...K ? le : M]), [
594
- K,
595
- le,
596
- M
597
- ]), de = r(() => G(Y), [Y]), fe = r(() => K && de.length === 0 ? [] : [{
590
+ ]), Y = r(() => /* @__PURE__ */ new Set(["", ...W(q)]), [q]), fe = r(() => /* @__PURE__ */ new Set(["", ...U ? Y : A]), [
591
+ U,
592
+ Y,
593
+ A
594
+ ]), X = r(() => le(q), [q]), pe = r(() => U && X.length === 0 ? [] : [{
598
595
  path: "",
599
596
  name: x,
600
597
  folderId: "",
601
- nodeType: re.FOLDER,
602
- items: de
598
+ nodeType: ae.FOLDER,
599
+ items: X
603
600
  }], [
604
- de,
601
+ X,
605
602
  x,
606
- K
607
- ]), pe = P ? U(P) : null, X = {
608
- empty: v,
603
+ U
604
+ ]), me = N ? G(N) : null, he = {
605
+ empty: ee,
609
606
  invalid: y,
610
607
  duplicate: b
611
- }, me = (t) => ce(se && q(z, [], X) == null ? z : g, J(e, t)), Z = (e) => {
612
- F(e), L(me(e)), R.current = null;
613
- let t = U(e);
614
- t && N(new Set(M).add(t));
615
- }, he = () => Z(t ?? []), Q = (e) => {
616
- let t = W(e.path), n = [{
608
+ }, Z = (t) => J(H && ue(R, [], he) == null ? R : _, de(e, t)), ge = (e) => {
609
+ P(e), F(Z(e)), I.current = null, L.current = !1;
610
+ let t = G(e);
611
+ t && ie(new Set(A).add(t));
612
+ }, _e = () => ge(n ?? []), ve = (e) => {
613
+ let t = K(e.path), n = [{
617
614
  key: "add-child",
618
- label: h,
619
- icon: /* @__PURE__ */ k(j, {
615
+ label: g,
616
+ icon: /* @__PURE__ */ j(ne, {
620
617
  size: c.SM,
621
618
  "aria-hidden": !0,
622
619
  stroke: l
623
620
  }),
624
- onClick: () => Z(t)
621
+ onClick: () => ge(t)
625
622
  }];
626
623
  return e.path !== "" && n.push({
627
624
  key: "add-sibling",
628
- label: m,
629
- icon: /* @__PURE__ */ k(te, {
625
+ label: h,
626
+ icon: /* @__PURE__ */ j(re, {
630
627
  size: c.SM,
631
628
  "aria-hidden": !0,
632
629
  stroke: l
633
630
  }),
634
- onClick: () => Z(t.slice(0, -1))
631
+ onClick: () => ge(t.slice(0, -1))
635
632
  }), n;
636
- }, ge = (t) => {
637
- if (!P) return null;
638
- let n = q(t, J(e, P), X);
639
- return R.current = n, n;
640
- }, ve = (e) => {
641
- if (!P) return;
642
- let t = e.trim(), r = R.current;
643
- (ge(e) ?? r) || (o(P, t), n([...P, t])), F(null);
644
- }, $ = () => F(null);
645
- return /* @__PURE__ */ A("div", {
633
+ }, Q = (t) => {
634
+ if (!N) return null;
635
+ let n = ue(t, de(e, N), he);
636
+ return I.current = n, n;
637
+ }, ye = (e) => {
638
+ if (!N || L.current) return;
639
+ let t = e.trim(), n = I.current;
640
+ (Q(e) ?? n) || (s(N, t), o([...N, t])), P(null);
641
+ }, xe = () => P(null);
642
+ return /* @__PURE__ */ M("div", {
646
643
  style: T,
647
- className: D(u && "pointer-events-none opacity-60", w.className),
644
+ className: k(d && "pointer-events-none opacity-60", w.className),
648
645
  children: [
649
- /* @__PURE__ */ k("div", {
650
- className: D("w-full min-w-0 max-w-full", _e.tree),
651
- children: /* @__PURE__ */ k(ie, {
652
- items: fe,
646
+ /* @__PURE__ */ j("div", {
647
+ className: k("w-full max-w-full min-w-0", be.tree),
648
+ children: /* @__PURE__ */ j(oe, {
649
+ items: pe,
653
650
  showFiles: !1,
654
- selectedPath: t == null ? void 0 : U(t),
655
- expandedPaths: ue,
656
- onExpandedPathsChange: N,
657
- loadingPaths: ee,
651
+ selectedPath: n == null ? void 0 : G(n),
652
+ expandedPaths: fe,
653
+ onExpandedPathsChange: ie,
654
+ loadingPaths: C,
658
655
  onItemClick: (e) => {
659
- n(t != null && U(t) === e.path ? void 0 : W(e.path));
656
+ o(n != null && G(n) === e.path ? void 0 : K(e.path));
660
657
  },
661
- getContextMenuItems: Q,
662
- createdFolderPath: pe,
663
- newFolderDefaultName: I,
664
- onCreateFolderSave: ve,
665
- onCreateFolderCancel: $,
666
- onRenameValidate: (e) => ge(e),
667
- emptyStateTitle: K ? _.replace("{query}", z) : void 0
658
+ getContextMenuItems: ve,
659
+ createdFolderPath: me,
660
+ newFolderDefaultName: se,
661
+ onCreateFolderSave: ye,
662
+ onCreateFolderCancel: xe,
663
+ onRenameValidate: (e) => Q(e),
664
+ emptyStateTitle: U ? v.replace("{query}", R) : void 0
668
665
  })
669
666
  }),
670
- /* @__PURE__ */ k("div", {
671
- className: D("my-2 h-px", _e.divider),
667
+ /* @__PURE__ */ j("div", {
668
+ className: k("my-2 h-px", be.divider),
672
669
  "aria-hidden": !0
673
670
  }),
674
- /* @__PURE__ */ A("div", {
671
+ /* @__PURE__ */ M("div", {
675
672
  className: "mb-4 flex flex-wrap items-center gap-2",
676
- children: [/* @__PURE__ */ k(d, {
677
- onClick: he,
678
- label: f,
679
- iconBefore: /* @__PURE__ */ k(te, {
673
+ children: [/* @__PURE__ */ j(f, {
674
+ onClick: _e,
675
+ label: p,
676
+ iconBefore: /* @__PURE__ */ j(re, {
680
677
  size: c.SM,
681
678
  "aria-hidden": !0,
682
679
  stroke: l
683
680
  }),
684
- disabled: u || B
685
- }), B && /* @__PURE__ */ k(d, {
686
- label: p,
687
- onClick: $,
688
- disabled: u
681
+ disabled: d || z
682
+ }), z && /* @__PURE__ */ j(f, {
683
+ label: m,
684
+ onClick: xe,
685
+ disabled: d,
686
+ [$]: ""
689
687
  })]
690
688
  })
691
689
  ]
692
690
  });
693
- }, $ = { panel: "dial-publish-panel-panel" }, ye = {
691
+ }, Se = { panel: "dial-publish-panel-panel" }, Ce = {
694
692
  summaryTitle: "_summaryTitle_tf20a_1",
695
693
  sectionHeading: "_sectionHeading_tf20a_5"
696
- }, be = 200, xe = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: h, isSubmitting: v, hasSubmitError: b = !1, allowReplace: x = !0, author: S, onAuthorChange: C, publishCredentials: ee = !1, onPublishCredentialsChange: T, rules: O, onRulesChange: j, ruleSourceOptions: te, isRulesLoading: ne = !1, hasRulesLoadError: re = !1, labels: ie = {}, summaryTitleClassName: M = "dial-body-semi-text", headingClassName: F = "dial-body-semi-text", styles: I = {} }) => {
697
- let { colors: L, folderTree: R, accessRules: z } = I, ae = {
698
- ...E({
699
- "--pp-summary-title-text": L?.summaryTitleText,
700
- "--pp-heading-text": L?.headingText
694
+ }, we = 200, Te = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: _ = !1, allowReplace: v = !0, author: b, onAuthorChange: S, publishCredentials: te = !1, onPublishCredentialsChange: C, rules: w, onRulesChange: T, ruleSourceOptions: D, isRulesLoading: A = !1, hasRulesLoadError: ne = !1, labels: re = {}, summaryTitleClassName: ie = "dial-body-semi-text", headingClassName: ae = "dial-body-semi-text", calloutFolderNameClassName: oe = "dial-small-paragraph-semi-text", styles: N = {} }) => {
695
+ let { colors: F, folderTree: I, accessRules: L } = N, R = {
696
+ ...O({
697
+ "--pp-summary-title-text": F?.summaryTitleText,
698
+ "--pp-heading-text": F?.headingText
701
699
  }),
702
- ...I.cssVars
703
- }, B = {
704
- border: L?.summaryBorder,
705
- background: L?.summaryBackground,
706
- versionTagBorder: L?.summaryVersionTagBorder,
707
- versionTagBackground: L?.summaryVersionTagBackground,
708
- versionTagText: L?.summaryVersionTagText
709
- }, { folderLabel: oe = "Publish to folder", replaceWarning: V = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: se = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: H = "Publishing failed. Please try again.", folderEmptyStateLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: G, cancelCreatingFolderLabel: K, createFolderEmptyNameError: q, createFolderInvalidNameError: ce, createFolderDuplicateNameError: J, rootFolderLabel: Y = "Organization", summaryVersionLabel: le, accessRulesLabels: ue, searchPlaceholder: de, clearSearchAriaLabel: fe, authorLabel: pe = "Author", authorPlaceholder: X = "Author name", authorHint: me = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Z = "Publish with my credentials", credentialsHint: Q = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ie, [ge, _e] = a(""), xe = n(), Ce = (e) => {
710
- _e(e ?? "");
711
- }, Te = o != null, Ee = r(() => P({
712
- hasSelectedFolder: Te,
700
+ ...N.cssVars
701
+ }, z = {
702
+ border: F?.summaryBorder,
703
+ background: F?.summaryBackground,
704
+ versionTagBorder: F?.summaryVersionTagBorder,
705
+ versionTagBackground: F?.summaryVersionTagBackground,
706
+ versionTagText: F?.summaryVersionTagText
707
+ }, { folderLabel: B = "Publish to folder", replaceWarning: V = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ce = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: H = "Publishing failed. Please try again.", folderEmptyStateLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: G, cancelCreatingFolderLabel: K, createFolderEmptyNameError: le, createFolderInvalidNameError: q, createFolderDuplicateNameError: ue, rootFolderLabel: J = "Organization", summaryVersionLabel: de, accessRulesLabels: Y, searchPlaceholder: fe, clearSearchAriaLabel: X, authorLabel: pe = "Author", authorPlaceholder: me = "Author name", authorHint: he = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Z = "Publish with my credentials", credentialsHint: ge = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = re, [_e, Q] = a(""), ye = n(), be = (e) => {
708
+ Q(e ?? "");
709
+ }, $ = o != null, Te = r(() => se({
710
+ hasSelectedFolder: $,
713
711
  hasExistingPublicationInFolder: p,
714
- hasWriteAccess: h,
715
- isSubmitting: v,
716
- hasSubmitError: b,
717
- allowReplace: x
712
+ hasWriteAccess: m,
713
+ isSubmitting: g,
714
+ hasSubmitError: _,
715
+ allowReplace: v
718
716
  }), [
719
- Te,
717
+ $,
720
718
  p,
721
- h,
722
- v,
723
- b,
724
- x
725
- ]), De = Te ? o[o.length - 1] ?? Y : "", Oe = t ? t() : /* @__PURE__ */ k("span", {
726
- className: D("truncate", M, ye.summaryTitle),
719
+ m,
720
+ g,
721
+ _,
722
+ v
723
+ ]), De = $ ? o[o.length - 1] ?? J : "", ke = t ? t() : /* @__PURE__ */ j("span", {
724
+ className: k("truncate", ie, Ce.summaryTitle),
727
725
  children: e?.title
728
726
  });
729
- return /* @__PURE__ */ A("div", {
730
- className: D("flex flex-col gap-5", $.panel),
731
- style: ae,
732
- children: [e?.type == null ? /* @__PURE__ */ k(w, {
733
- colors: B,
734
- children: Oe
735
- }) : /* @__PURE__ */ k(w, {
727
+ return /* @__PURE__ */ M("div", {
728
+ className: k("flex flex-col gap-5", Se.panel),
729
+ style: R,
730
+ children: [e?.type == null ? /* @__PURE__ */ j(E, {
731
+ colors: z,
732
+ children: ke
733
+ }) : /* @__PURE__ */ j(E, {
736
734
  item: {
737
735
  type: e.type,
738
736
  name: e.title,
739
737
  version: e.version ?? "",
740
738
  iconUrl: e.iconUrl
741
739
  },
742
- versionLabel: le,
743
- colors: B
744
- }), /* @__PURE__ */ A("div", { children: [
745
- /* @__PURE__ */ k("div", {
746
- className: D("mb-2", F, ye.sectionHeading),
747
- children: oe
740
+ versionLabel: de,
741
+ colors: z
742
+ }), /* @__PURE__ */ M("div", { children: [
743
+ /* @__PURE__ */ j("div", {
744
+ className: k("mb-2", ae, Ce.sectionHeading),
745
+ children: B
748
746
  }),
749
- /* @__PURE__ */ k("div", {
747
+ /* @__PURE__ */ j("div", {
750
748
  role: "search",
751
749
  className: "mb-3",
752
- children: /* @__PURE__ */ k(y, {
753
- value: ge,
754
- onChange: Ce,
755
- placeholder: de,
756
- clearLabel: fe,
757
- "aria-label": de
750
+ children: /* @__PURE__ */ j(x, {
751
+ value: _e,
752
+ onChange: be,
753
+ placeholder: fe,
754
+ clearLabel: X,
755
+ "aria-label": fe
758
756
  })
759
757
  }),
760
- /* @__PURE__ */ k(ve, {
758
+ /* @__PURE__ */ j(xe, {
761
759
  items: i,
762
760
  selectedPath: o,
763
761
  onSelectedPathChange: c,
@@ -765,114 +763,115 @@ var M = /* @__PURE__ */ function(e) {
765
763
  expandedPaths: u,
766
764
  onExpandedPathsChange: d,
767
765
  loadingPaths: f,
768
- searchQuery: ge,
769
- disabled: v,
766
+ searchQuery: _e,
767
+ disabled: g,
770
768
  noResultsLabel: U,
771
769
  addSiblingFolderLabel: W,
772
770
  addChildFolderLabel: G,
773
771
  cancelCreatingFolderLabel: K,
774
- emptyFolderNameError: q,
775
- invalidFolderNameError: ce,
776
- duplicateFolderNameError: J,
777
- rootLabel: Y,
778
- styles: R
772
+ emptyFolderNameError: le,
773
+ invalidFolderNameError: q,
774
+ duplicateFolderNameError: ue,
775
+ rootLabel: J,
776
+ styles: I
779
777
  }),
780
- Ee.calloutKind !== N.None && Ee.calloutKind !== N.Info && /* @__PURE__ */ k("div", {
778
+ Te.calloutKind !== P.None && Te.calloutKind !== P.Info && /* @__PURE__ */ j("div", {
781
779
  className: "mt-3",
782
- children: /* @__PURE__ */ k(g, {
783
- type: _.SectionMessage,
784
- variant: Se(Ee.calloutKind),
785
- message: we(Ee.calloutKind, {
780
+ children: /* @__PURE__ */ j(ee, {
781
+ type: y.SectionMessage,
782
+ variant: Ee(Te.calloutKind),
783
+ message: Oe(Te.calloutKind, {
786
784
  replaceWarning: V,
787
- noAccessError: se,
785
+ noAccessError: ce,
788
786
  submitError: H,
789
787
  folderName: De,
790
- version: e?.version
788
+ version: e?.version,
789
+ folderNameClassName: oe
791
790
  })
792
791
  })
793
792
  }),
794
- /* @__PURE__ */ k("div", {
793
+ /* @__PURE__ */ j("div", {
795
794
  className: "mt-4",
796
- children: /* @__PURE__ */ k(m, {
797
- id: xe,
795
+ children: /* @__PURE__ */ j(h, {
796
+ id: ye,
798
797
  labelProps: { label: pe },
799
- placeholder: X,
800
- caption: me,
801
- value: S,
802
- onChange: (e) => C(e ?? ""),
803
- maxLength: be,
804
- disabled: v
798
+ placeholder: me,
799
+ caption: he,
800
+ value: b,
801
+ onChange: (e) => S(e ?? ""),
802
+ maxLength: we,
803
+ disabled: g
805
804
  })
806
805
  }),
807
- T != null && /* @__PURE__ */ k("div", {
806
+ C != null && /* @__PURE__ */ j("div", {
808
807
  className: "mt-4",
809
- children: /* @__PURE__ */ k(s, {
808
+ children: /* @__PURE__ */ j(s, {
810
809
  labelProps: { label: Z },
811
- caption: Q,
812
- isSelected: ee,
813
- onChange: T,
814
- disabled: v
810
+ caption: ge,
811
+ isSelected: te,
812
+ onChange: C,
813
+ disabled: g
815
814
  })
816
815
  }),
817
- /* @__PURE__ */ k("div", {
816
+ /* @__PURE__ */ j("div", {
818
817
  className: "mt-4",
819
- children: /* @__PURE__ */ k(he, {
820
- rules: O,
821
- onRulesChange: j,
822
- sourceOptions: te,
823
- folderName: Te ? De : void 0,
824
- disabled: v,
825
- isLoading: ne,
826
- hasLoadError: re,
827
- labels: ue,
828
- styles: z
818
+ children: /* @__PURE__ */ j(ve, {
819
+ rules: w,
820
+ onRulesChange: T,
821
+ sourceOptions: D,
822
+ folderName: $ ? De : void 0,
823
+ disabled: g,
824
+ isLoading: A,
825
+ hasLoadError: ne,
826
+ labels: Y,
827
+ styles: L
829
828
  })
830
829
  })
831
830
  ] })]
832
831
  });
833
- }, Se = (e) => e === N.ReplaceWarning ? v.Warning : v.Error, Ce = (e, t) => {
834
- let [n, r, ...i] = e.split("{folder}");
835
- return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ A(O, { children: [
836
- n,
837
- /* @__PURE__ */ k("strong", {
838
- className: "font-semibold",
832
+ }, Ee = (e) => e === P.ReplaceWarning ? b.Warning : b.Error, De = (e, t, n) => {
833
+ let [r, i, ...a] = e.split("{folder}");
834
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ M(A, { children: [
835
+ r,
836
+ /* @__PURE__ */ j("strong", {
837
+ className: n,
839
838
  children: t
840
839
  }),
841
- r
840
+ i
842
841
  ] });
843
- }, we = (e, t) => e === N.ReplaceWarning ? Ce(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === N.NoAccess ? Ce(t.noAccessError, t.folderName) : t.submitError, Te = { footer: "_footer_dks1v_1" }, Ee = ({ version: e, hasExistingPublicationInFolder: t, isSubmitDisabled: n, isSubmitLoading: r, onCancel: i, onSubmit: a, labels: o = {}, colors: s }) => {
844
- let l = E({ "--pf-border": s?.border }), { cancelLabel: u = "Cancel", publishDefaultLabel: f = "Publish", updateLabel: p = "Update version {version}", publishingInProgressLabel: m = "Publishing…" } = o, g = r ? m : t && e != null ? p.replace("{version}", e) : f;
845
- return /* @__PURE__ */ A("div", {
846
- style: l,
847
- className: D("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5 rtl:flex-row-reverse rtl:justify-start", Te.footer),
848
- children: [/* @__PURE__ */ k(d, {
849
- label: u,
842
+ }, Oe = (e, t) => e === P.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === P.NoAccess ? De(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, ke = { footer: "_footer_dks1v_1" }, Ae = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
843
+ let u = O({ "--pf-border": l?.border }), { cancelLabel: d = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: h = "Publishing…" } = s, g = i ? h : n && t && e != null ? m.replace("{version}", e) : p;
844
+ return /* @__PURE__ */ M("div", {
845
+ style: u,
846
+ className: k("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", ke.footer),
847
+ children: [/* @__PURE__ */ j(f, {
848
+ label: d,
850
849
  className: "mobile:flex-1",
851
- disabled: r,
852
- onClick: i
853
- }), /* @__PURE__ */ k(h, {
850
+ disabled: i,
851
+ onClick: a
852
+ }), /* @__PURE__ */ j(v, {
854
853
  label: g,
855
854
  className: "mobile:flex-1",
856
- disabled: n,
857
- iconBefore: r ? /* @__PURE__ */ k(S, { size: c.SM }) : void 0,
858
- onClick: a
855
+ disabled: r,
856
+ iconBefore: i ? /* @__PURE__ */ j(C, { size: c.SM }) : void 0,
857
+ onClick: o
859
858
  })]
860
859
  });
861
- }, De = {
860
+ }, je = {
862
861
  backdrop: "_backdrop_16jmd_6",
863
862
  panel: "_panel_16jmd_10",
864
863
  divider: "_divider_16jmd_15",
865
864
  content: "_content_16jmd_19",
866
865
  title: "_title_16jmd_24"
867
- }, Oe = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: y, rules: b, onRulesChange: S, ruleSourceOptions: C, isRulesLoading: ee = !1, hasRulesLoadError: w = !1, onClose: T, returnFocusRef: O, onSubmit: j, panelLabels: te, panelStyles: ne, footerLabels: re, labels: ie = {}, titleClassName: M = "dial-body-semi-text", colors: N }) => {
868
- let F = E({
869
- "--spp-backdrop-bg": N?.backdropBackground,
870
- "--spp-panel-bg": N?.panelBackground,
871
- "--spp-panel-border": N?.panelBorder,
872
- "--spp-divider-border": N?.dividerBorder,
873
- "--spp-scrollbar-thumb": N?.scrollbarThumb,
874
- "--spp-title-text": N?.titleText
875
- }), [I, L] = a(null), { title: R = "Publish", ariaLabel: z = "Publish", closeAriaLabel: ae = "Close" } = ie, B = r(() => P({
866
+ }, Me = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: A, panelSummaryTitleClassName: ne, panelHeadingClassName: re, panelCalloutFolderNameClassName: ie, footerLabels: ae, labels: oe = {}, titleClassName: N = "dial-body-semi-text", colors: P }) => {
867
+ let F = O({
868
+ "--spp-backdrop-bg": P?.backdropBackground,
869
+ "--spp-panel-bg": P?.panelBackground,
870
+ "--spp-panel-border": P?.panelBorder,
871
+ "--spp-divider-border": P?.dividerBorder,
872
+ "--spp-scrollbar-thumb": P?.scrollbarThumb,
873
+ "--spp-title-text": P?.titleText
874
+ }), [I, L] = a(null), { title: R = "Publish", ariaLabel: z = "Publish", closeAriaLabel: B = "Close" } = oe, V = r(() => se({
876
875
  hasSelectedFolder: s != null,
877
876
  hasExistingPublicationInFolder: p,
878
877
  hasWriteAccess: m,
@@ -898,36 +897,36 @@ var M = /* @__PURE__ */ function(e) {
898
897
  document.addEventListener("focusin", r);
899
898
  let i = requestAnimationFrame(() => {
900
899
  document.removeEventListener("focusin", r);
901
- }), a = O?.current;
900
+ }), a = T?.current;
902
901
  return () => {
903
902
  cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
904
903
  };
905
904
  }, [
906
905
  e,
907
906
  I,
908
- O
909
- ]), /* @__PURE__ */ A(x, {
907
+ T
908
+ ]), /* @__PURE__ */ M(te, {
910
909
  open: e,
911
- onClose: T,
912
- header: /* @__PURE__ */ k("span", {
913
- className: D("block truncate text-center", M, De.title),
910
+ onClose: w,
911
+ header: /* @__PURE__ */ j("span", {
912
+ className: k("block truncate text-center", N, je.title),
914
913
  children: R
915
914
  }),
916
915
  ariaLabel: z,
917
- closeAriaLabel: ae,
916
+ closeAriaLabel: B,
918
917
  closeDisabled: h,
919
918
  style: F,
920
919
  overlayStyle: F,
921
- className: De.panel,
922
- overlayClassName: De.backdrop,
923
- headerClassName: D("px-[22px]", De.divider),
920
+ className: k(je.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
921
+ overlayClassName: je.backdrop,
922
+ headerClassName: k("px-[22px]", je.divider),
924
923
  bodyClassName: "flex flex-col overflow-hidden",
925
- children: [/* @__PURE__ */ k("div", {
924
+ children: [/* @__PURE__ */ j("div", {
926
925
  ref: L,
927
- className: D("min-h-0 flex-1 overflow-y-auto", De.content),
928
- children: /* @__PURE__ */ k("div", {
926
+ className: k("min-h-0 flex-1 overflow-y-auto", je.content),
927
+ children: /* @__PURE__ */ j("div", {
929
928
  className: "p-[22px]",
930
- children: /* @__PURE__ */ k(xe, {
929
+ children: /* @__PURE__ */ j(Te, {
931
930
  resource: n,
932
931
  renderSummary: i,
933
932
  folderItems: o,
@@ -943,26 +942,30 @@ var M = /* @__PURE__ */ function(e) {
943
942
  hasSubmitError: g,
944
943
  allowReplace: _,
945
944
  author: v,
946
- onAuthorChange: y,
947
- rules: b,
948
- onRulesChange: S,
949
- ruleSourceOptions: C,
950
- isRulesLoading: ee,
951
- hasRulesLoadError: w,
952
- labels: te,
953
- styles: ne
945
+ onAuthorChange: ee,
946
+ rules: y,
947
+ onRulesChange: b,
948
+ ruleSourceOptions: x,
949
+ isRulesLoading: S,
950
+ hasRulesLoadError: C,
951
+ labels: D,
952
+ styles: A,
953
+ summaryTitleClassName: ne,
954
+ headingClassName: re,
955
+ calloutFolderNameClassName: ie
954
956
  })
955
957
  })
956
- }), /* @__PURE__ */ k(Ee, {
958
+ }), /* @__PURE__ */ j(Ae, {
957
959
  version: n?.version,
958
960
  hasExistingPublicationInFolder: p,
959
- isSubmitDisabled: B.isSubmitDisabled,
960
- isSubmitLoading: B.isSubmitLoading,
961
- onCancel: T,
962
- onSubmit: j,
963
- labels: re
961
+ allowReplace: _,
962
+ isSubmitDisabled: V.isSubmitDisabled,
963
+ isSubmitLoading: V.isSubmitLoading,
964
+ onCancel: w,
965
+ onSubmit: E,
966
+ labels: ae
964
967
  })]
965
968
  });
966
969
  };
967
970
  //#endregion
968
- export { $ as PUBLISH_PANEL_CLASS, M as PublicationRuleFunction, pe as PublishAccessRuleEditor, he as PublishAccessRules, N as PublishCalloutKind, ve as PublishFoldersTree, Ee as PublishFooter, ge as PublishHistoryList, xe as PublishPanel, Oe as StandalonePublishPanel, H as collectFolderKeys, P as derivePublishState, ae as filterFolderTree, I as formatPublishedDate, W as fromFolderPathKey, J as getSiblingFolderNames, ce as getUniqueFolderName, se as mergeFolderPaths, oe as sortFolderTree, G as toDialFileTree, U as toFolderPathKey, z as usePublishFlow, q as validateFolderName };
971
+ export { Se as PUBLISH_PANEL_CLASS, N as PublicationRuleFunction, he as PublishAccessRuleEditor, ve as PublishAccessRules, P as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, ye as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, W as collectFolderKeys, se as derivePublishState, B as filterFolderTree, I as formatPublishedDate, K as fromFolderPathKey, de as getSiblingFolderNames, J as getUniqueFolderName, U as mergeFolderPaths, ce as sortFolderTree, le as toDialFileTree, G as toFolderPathKey, z as usePublishFlow, ue as validateFolderName };