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