@epam/ai-dial-publish-panel 1.2.0-dev.99 → 1.3.0-dev.5
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/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +8 -24
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +2 -8
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.js +436 -487
- package/package.json +4 -4
- package/test-setup.d.ts +1 -0
- package/utils/focus.d.ts +0 -3
- package/utils/focus.d.ts.map +0 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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,
|
|
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
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
4
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
5
|
-
import { IconFolderPlus as
|
|
6
|
-
import { DialFileNodeType as
|
|
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";
|
|
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;
|
|
@@ -40,7 +40,7 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
40
40
|
day: "numeric",
|
|
41
41
|
year: "numeric"
|
|
42
42
|
});
|
|
43
|
-
},
|
|
43
|
+
}, L = (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 ? L(e.children, t, n) : e.children
|
|
55
|
+
}), R = (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 ? R(e.children, t, n) : e.children
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, z = ({ 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), [b, x] = a(!1), [S, C] = a([]), [
|
|
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);
|
|
70
70
|
t(() => {
|
|
71
|
-
|
|
72
|
-
}, [c,
|
|
73
|
-
let
|
|
74
|
-
|
|
71
|
+
j || O(c);
|
|
72
|
+
}, [c, j]);
|
|
73
|
+
let ne = e((e) => {
|
|
74
|
+
te(!0), O(e);
|
|
75
75
|
}, []);
|
|
76
76
|
t(() => {
|
|
77
77
|
if (g == null) {
|
|
78
|
-
C([]),
|
|
78
|
+
C([]), E(!1);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
if (!p) return;
|
|
82
82
|
let e = !1;
|
|
83
|
-
return
|
|
83
|
+
return w(!0), E(!1), p(g).then((t) => {
|
|
84
84
|
e || C(t);
|
|
85
85
|
}).catch(() => {
|
|
86
|
-
e ||
|
|
86
|
+
e || E(!0);
|
|
87
87
|
}).finally(() => {
|
|
88
|
-
e ||
|
|
88
|
+
e || w(!1);
|
|
89
89
|
}), () => {
|
|
90
90
|
e = !0;
|
|
91
91
|
};
|
|
@@ -98,59 +98,59 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
98
98
|
i,
|
|
99
99
|
n.version,
|
|
100
100
|
g
|
|
101
|
-
]),
|
|
102
|
-
h((n) =>
|
|
101
|
+
]), ie = e(async (e, t) => {
|
|
102
|
+
h((n) => L(n, e, t));
|
|
103
103
|
try {
|
|
104
104
|
await l?.(e, t);
|
|
105
105
|
} catch {
|
|
106
|
-
h((n) =>
|
|
106
|
+
h((n) => R(n, e, t)), x(!0);
|
|
107
107
|
}
|
|
108
|
-
}, [l]),
|
|
108
|
+
}, [l]), M = e(async () => {
|
|
109
109
|
if (!g) return !1;
|
|
110
110
|
y(!0), x(!1);
|
|
111
111
|
try {
|
|
112
|
-
return await u(n, g, S,
|
|
112
|
+
return await u(n, g, S, D.trim(), k), d?.(n, g), !0;
|
|
113
113
|
} catch (e) {
|
|
114
114
|
return x(!0), f?.(n, g, e), !1;
|
|
115
115
|
} finally {
|
|
116
116
|
y(!1);
|
|
117
117
|
}
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
D,
|
|
120
120
|
n,
|
|
121
121
|
u,
|
|
122
122
|
f,
|
|
123
123
|
d,
|
|
124
|
-
|
|
124
|
+
k,
|
|
125
125
|
S,
|
|
126
126
|
g
|
|
127
|
-
]),
|
|
128
|
-
h(o), _(void 0), x(!1), C([]),
|
|
127
|
+
]), N = e(() => {
|
|
128
|
+
h(o), _(void 0), x(!1), C([]), E(!1), O(c), te(!1), A(!1);
|
|
129
129
|
}, [c, o]);
|
|
130
130
|
return {
|
|
131
131
|
folderItems: m,
|
|
132
132
|
selectedFolderPath: g,
|
|
133
133
|
setSelectedFolderPath: _,
|
|
134
|
-
handleCreateFolder:
|
|
134
|
+
handleCreateFolder: ie,
|
|
135
135
|
hasExistingPublicationInFolder: re,
|
|
136
136
|
hasWriteAccess: g ? s(g) : !0,
|
|
137
137
|
isSubmitting: v,
|
|
138
138
|
hasSubmitError: b,
|
|
139
|
-
handleSubmit:
|
|
140
|
-
reset:
|
|
139
|
+
handleSubmit: M,
|
|
140
|
+
reset: N,
|
|
141
141
|
rules: S,
|
|
142
142
|
setRules: C,
|
|
143
|
-
author:
|
|
144
|
-
setAuthor:
|
|
145
|
-
publishCredentials:
|
|
146
|
-
setPublishCredentials:
|
|
147
|
-
isRulesLoading:
|
|
148
|
-
hasRulesLoadError:
|
|
143
|
+
author: D,
|
|
144
|
+
setAuthor: ne,
|
|
145
|
+
publishCredentials: k,
|
|
146
|
+
setPublishCredentials: A,
|
|
147
|
+
isRulesLoading: ee,
|
|
148
|
+
hasRulesLoadError: T
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, ae = (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 ? ae(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
|
|
@@ -159,196 +159,202 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
159
159
|
}, B = (e, t) => e.localeCompare(t, void 0, {
|
|
160
160
|
sensitivity: "base",
|
|
161
161
|
numeric: !0
|
|
162
|
-
}),
|
|
162
|
+
}), oe = (e) => [...e].sort((e, t) => B(e.name, t.name)).map((e) => e.children ? {
|
|
163
163
|
...e,
|
|
164
|
-
children:
|
|
165
|
-
} : e),
|
|
164
|
+
children: oe(e.children)
|
|
165
|
+
} : e), V = (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: V(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 ? V([], i, a) : void 0
|
|
176
176
|
}];
|
|
177
|
-
},
|
|
178
|
-
let t =
|
|
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);
|
|
179
179
|
return {
|
|
180
180
|
path: t,
|
|
181
181
|
name: e.name,
|
|
182
182
|
folderId: t,
|
|
183
|
-
nodeType:
|
|
184
|
-
items: e.children ?
|
|
183
|
+
nodeType: u.FOLDER,
|
|
184
|
+
items: e.children ? G(e.children) : void 0
|
|
185
185
|
};
|
|
186
|
-
}),
|
|
186
|
+
}), K = /[/\\:;,={}&"]/, q = (e, t, n) => {
|
|
187
187
|
let r = e.trim();
|
|
188
|
-
return r ? r.includes("..") ||
|
|
189
|
-
},
|
|
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) => {
|
|
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
|
+
}, J = (e, t) => {
|
|
196
196
|
if (t.length === 0) return e.map((e) => e.name);
|
|
197
|
-
let n =
|
|
197
|
+
let n = U(t), r = (e) => {
|
|
198
198
|
for (let t of e) {
|
|
199
|
-
if (
|
|
199
|
+
if (U(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
|
+
}, Y = {
|
|
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
|
-
}, le = 20,
|
|
210
|
+
}, le = 20, ue = 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 > ue) return !1;
|
|
213
213
|
try {
|
|
214
214
|
return new RegExp(t) instanceof RegExp;
|
|
215
215
|
} catch {
|
|
216
216
|
return !1;
|
|
217
217
|
}
|
|
218
|
-
},
|
|
219
|
-
let
|
|
218
|
+
}, pe = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = le, labels: u = {}, errorClassName: f = "dial-small-text", styles: g = {} }) => {
|
|
219
|
+
let _ = {
|
|
220
220
|
...E({
|
|
221
|
-
"--pare-mobile-bg":
|
|
222
|
-
"--pare-bg":
|
|
223
|
-
"--pare-error-text":
|
|
224
|
-
"--pare-select-border":
|
|
225
|
-
"--pare-select-border-hover":
|
|
226
|
-
"--pare-select-border-open":
|
|
227
|
-
"--pare-select-border-focus":
|
|
221
|
+
"--pare-mobile-bg": g.colors?.mobileBackground,
|
|
222
|
+
"--pare-bg": g.colors?.background,
|
|
223
|
+
"--pare-error-text": g.colors?.errorText,
|
|
224
|
+
"--pare-select-border": g.colors?.selectBorder,
|
|
225
|
+
"--pare-select-border-hover": g.colors?.selectBorderHover,
|
|
226
|
+
"--pare-select-border-open": g.colors?.selectBorderOpen,
|
|
227
|
+
"--pare-select-border-focus": g.colors?.selectBorderFocus
|
|
228
228
|
}),
|
|
229
|
-
...
|
|
230
|
-
}, { sourceLabel:
|
|
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);
|
|
231
231
|
t(() => {
|
|
232
|
-
|
|
232
|
+
oe.current?.focus();
|
|
233
233
|
}, []);
|
|
234
|
-
let [
|
|
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) => ({
|
|
235
235
|
value: e,
|
|
236
|
-
label: e
|
|
237
|
-
|
|
236
|
+
label: e,
|
|
237
|
+
labelNode: ue.trim() ? /* @__PURE__ */ k(p, {
|
|
238
|
+
text: e,
|
|
239
|
+
query: ue,
|
|
240
|
+
maxLines: 1
|
|
241
|
+
}) : void 0
|
|
242
|
+
})), [e, ue]), ve = r(() => [
|
|
238
243
|
{
|
|
239
244
|
value: M.Equal,
|
|
240
|
-
label:
|
|
245
|
+
label: S
|
|
241
246
|
},
|
|
242
247
|
{
|
|
243
248
|
value: M.Contain,
|
|
244
|
-
label:
|
|
249
|
+
label: C
|
|
245
250
|
},
|
|
246
251
|
{
|
|
247
252
|
value: M.Regex,
|
|
248
253
|
label: w
|
|
249
254
|
}
|
|
250
255
|
], [
|
|
251
|
-
x,
|
|
252
256
|
S,
|
|
257
|
+
C,
|
|
253
258
|
w
|
|
254
|
-
]),
|
|
259
|
+
]), $ = H === M.Regex, ye = fe(K), be = V != null && H != null && ($ ? ye : W.length > 0);
|
|
255
260
|
return /* @__PURE__ */ A("div", {
|
|
256
|
-
ref:
|
|
261
|
+
ref: oe,
|
|
257
262
|
role: "dialog",
|
|
258
263
|
"aria-modal": "true",
|
|
259
|
-
"aria-label":
|
|
264
|
+
"aria-label": L,
|
|
260
265
|
tabIndex: -1,
|
|
261
266
|
onKeyDown: (e) => {
|
|
262
267
|
e.key === "Escape" && (e.stopPropagation(), s());
|
|
263
268
|
},
|
|
264
|
-
style:
|
|
265
|
-
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",
|
|
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),
|
|
266
271
|
children: [
|
|
267
272
|
/* @__PURE__ */ k(b, {
|
|
268
|
-
id:
|
|
269
|
-
labelProps: { label:
|
|
270
|
-
options:
|
|
271
|
-
value:
|
|
273
|
+
id: z,
|
|
274
|
+
labelProps: { label: v },
|
|
275
|
+
options: _e,
|
|
276
|
+
value: V,
|
|
272
277
|
onChange: (e) => {
|
|
273
|
-
|
|
278
|
+
se(Array.isArray(e) ? e[0] : e), J(!1);
|
|
274
279
|
},
|
|
275
|
-
placeholder:
|
|
276
|
-
searchable: e.length >
|
|
277
|
-
searchPlaceholder:
|
|
280
|
+
placeholder: y,
|
|
281
|
+
searchable: e.length > de,
|
|
282
|
+
searchPlaceholder: y,
|
|
283
|
+
onSearchQueryChange: pe,
|
|
278
284
|
disabled: c,
|
|
279
|
-
open:
|
|
280
|
-
onOpenChange:
|
|
281
|
-
fieldClassName:
|
|
282
|
-
invalid:
|
|
283
|
-
error:
|
|
285
|
+
open: ce,
|
|
286
|
+
onOpenChange: J,
|
|
287
|
+
fieldClassName: Q,
|
|
288
|
+
invalid: Z && V == null,
|
|
289
|
+
error: Z && V == null ? N : void 0
|
|
284
290
|
}),
|
|
285
291
|
/* @__PURE__ */ k(b, {
|
|
286
|
-
labelProps: { label:
|
|
287
|
-
id:
|
|
288
|
-
options:
|
|
289
|
-
value:
|
|
292
|
+
labelProps: { label: x },
|
|
293
|
+
id: ae,
|
|
294
|
+
options: ve,
|
|
295
|
+
value: H,
|
|
290
296
|
onChange: (e) => {
|
|
291
297
|
let t = Array.isArray(e) ? e[0] : e;
|
|
292
|
-
|
|
298
|
+
H === M.Regex != (t === M.Regex) && (G([]), q("")), U(t), me(!1);
|
|
293
299
|
},
|
|
294
|
-
placeholder:
|
|
300
|
+
placeholder: x,
|
|
295
301
|
disabled: c,
|
|
296
|
-
open:
|
|
297
|
-
onOpenChange:
|
|
298
|
-
fieldClassName:
|
|
299
|
-
invalid:
|
|
300
|
-
error:
|
|
302
|
+
open: X,
|
|
303
|
+
onOpenChange: me,
|
|
304
|
+
fieldClassName: ge,
|
|
305
|
+
invalid: Z && H == null,
|
|
306
|
+
error: Z && H == null ? N : void 0
|
|
301
307
|
}),
|
|
302
|
-
|
|
303
|
-
id: `${
|
|
308
|
+
$ ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(m, {
|
|
309
|
+
id: `${R}-input`,
|
|
304
310
|
labelProps: { label: ne },
|
|
305
|
-
placeholder:
|
|
306
|
-
value:
|
|
307
|
-
onChange: (e) =>
|
|
308
|
-
invalid: (
|
|
309
|
-
"aria-describedby": (
|
|
311
|
+
placeholder: re,
|
|
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,
|
|
310
316
|
disabled: c
|
|
311
|
-
}), (
|
|
312
|
-
id:
|
|
317
|
+
}), (K.length > 0 || Z) && !ye && /* @__PURE__ */ k("span", {
|
|
318
|
+
id: R,
|
|
313
319
|
role: "alert",
|
|
314
|
-
className: D("mt-1 block",
|
|
315
|
-
children:
|
|
316
|
-
})] }) : /* @__PURE__ */ k(
|
|
320
|
+
className: D("mt-1 block", f, Y.error),
|
|
321
|
+
children: ie
|
|
322
|
+
})] }) : /* @__PURE__ */ k(ee, {
|
|
317
323
|
id: B,
|
|
318
324
|
labelProps: { label: O },
|
|
319
|
-
placeholder:
|
|
320
|
-
caption:
|
|
321
|
-
error:
|
|
322
|
-
invalid:
|
|
323
|
-
value:
|
|
325
|
+
placeholder: j,
|
|
326
|
+
caption: Z && W.length === 0 ? void 0 : te,
|
|
327
|
+
error: Z && W.length === 0 ? P : void 0,
|
|
328
|
+
invalid: Z && W.length === 0,
|
|
329
|
+
value: W,
|
|
324
330
|
onChange: (e) => {
|
|
325
331
|
let t = [];
|
|
326
332
|
for (let n of e) {
|
|
327
333
|
let e = n.trim();
|
|
328
334
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= l)) break;
|
|
329
335
|
}
|
|
330
|
-
|
|
336
|
+
G(t);
|
|
331
337
|
},
|
|
332
338
|
disabled: c,
|
|
333
339
|
tagClassName: T
|
|
334
340
|
}),
|
|
335
341
|
/* @__PURE__ */ A("div", {
|
|
336
342
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
337
|
-
children: [/* @__PURE__ */ k(
|
|
343
|
+
children: [/* @__PURE__ */ k(d, {
|
|
338
344
|
label: I,
|
|
339
345
|
onClick: s,
|
|
340
346
|
disabled: c
|
|
341
347
|
}), /* @__PURE__ */ k(h, {
|
|
342
348
|
label: F,
|
|
343
349
|
onClick: () => {
|
|
344
|
-
if (!
|
|
345
|
-
|
|
350
|
+
if (!be || V == null || H == null) {
|
|
351
|
+
he(!0);
|
|
346
352
|
return;
|
|
347
353
|
}
|
|
348
354
|
o({
|
|
349
|
-
source:
|
|
350
|
-
function:
|
|
351
|
-
targets:
|
|
355
|
+
source: V,
|
|
356
|
+
function: H,
|
|
357
|
+
targets: $ ? [K.trim()] : W
|
|
352
358
|
});
|
|
353
359
|
},
|
|
354
360
|
disabled: c
|
|
@@ -362,7 +368,7 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
362
368
|
hint: "_hint_nx0en_9",
|
|
363
369
|
loading: "_loading_nx0en_13",
|
|
364
370
|
ruleText: "_ruleText_nx0en_17"
|
|
365
|
-
},
|
|
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 = {} }) => {
|
|
366
372
|
let re = {
|
|
367
373
|
...E({
|
|
368
374
|
"--par-rule-bg": j.colors?.ruleBackground,
|
|
@@ -372,79 +378,79 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
372
378
|
"--par-rule-text": j.colors?.ruleText
|
|
373
379
|
}),
|
|
374
380
|
...j.cssVars
|
|
375
|
-
}, { heading:
|
|
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);
|
|
376
382
|
t(() => {
|
|
377
|
-
de.current && !m && e.length > 0 &&
|
|
383
|
+
de.current && !m && e.length > 0 && le(G), de.current = m;
|
|
378
384
|
}, [
|
|
379
385
|
m,
|
|
380
386
|
e,
|
|
381
|
-
|
|
387
|
+
G
|
|
382
388
|
]);
|
|
383
|
-
let
|
|
389
|
+
let fe = () => {
|
|
384
390
|
ue.current = document.activeElement, J(!0);
|
|
385
|
-
},
|
|
391
|
+
}, he = () => {
|
|
386
392
|
J(!1), ue.current?.focus?.();
|
|
393
|
+
}, Q = (t) => {
|
|
394
|
+
r([...e, t]), le(H), he();
|
|
387
395
|
}, ge = (t) => {
|
|
388
|
-
r(
|
|
389
|
-
}, _e = (
|
|
390
|
-
r(
|
|
391
|
-
}, Q = () => {
|
|
392
|
-
r([]), Y(ae);
|
|
396
|
+
r(e.filter((e, n) => n !== t)), le(U);
|
|
397
|
+
}, _e = () => {
|
|
398
|
+
r([]), le(W);
|
|
393
399
|
}, ve = {
|
|
394
|
-
equal:
|
|
395
|
-
contain:
|
|
396
|
-
regex:
|
|
397
|
-
},
|
|
400
|
+
equal: ae,
|
|
401
|
+
contain: B,
|
|
402
|
+
regex: oe
|
|
403
|
+
}, $ = e.length >= y, ye = p || $, be = u != null && u !== "";
|
|
398
404
|
return /* @__PURE__ */ A("div", {
|
|
399
405
|
role: "group",
|
|
400
|
-
"aria-labelledby":
|
|
406
|
+
"aria-labelledby": q,
|
|
401
407
|
style: re,
|
|
402
|
-
className: D(
|
|
408
|
+
className: D(p && "pointer-events-none opacity-60"),
|
|
403
409
|
children: [
|
|
404
410
|
/* @__PURE__ */ k("span", {
|
|
405
411
|
role: "status",
|
|
406
412
|
"aria-live": "polite",
|
|
407
413
|
className: "sr-only",
|
|
408
|
-
children:
|
|
414
|
+
children: Y
|
|
409
415
|
}),
|
|
410
416
|
/* @__PURE__ */ A("div", {
|
|
411
417
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
412
418
|
children: [/* @__PURE__ */ k("div", {
|
|
413
|
-
id:
|
|
419
|
+
id: q,
|
|
414
420
|
className: D(C, X.heading),
|
|
415
|
-
children:
|
|
416
|
-
}), e.length > 0 && /* @__PURE__ */ k(
|
|
421
|
+
children: ie
|
|
422
|
+
}), e.length > 0 && /* @__PURE__ */ k(d, {
|
|
417
423
|
variant: o.Primary,
|
|
418
424
|
label: L,
|
|
419
|
-
onClick:
|
|
420
|
-
disabled:
|
|
425
|
+
onClick: _e,
|
|
426
|
+
disabled: p
|
|
421
427
|
})]
|
|
422
428
|
}),
|
|
423
429
|
/* @__PURE__ */ k("p", {
|
|
424
|
-
className: D("mb-2",
|
|
425
|
-
children:
|
|
430
|
+
className: D("mb-2", ee, X.hint),
|
|
431
|
+
children: be ? M.replace("{folder}", u) : N
|
|
426
432
|
}),
|
|
427
|
-
e.length > 0 && !
|
|
433
|
+
e.length > 0 && !be && /* @__PURE__ */ k("div", {
|
|
428
434
|
className: "mb-2",
|
|
429
435
|
children: /* @__PURE__ */ k(g, {
|
|
430
436
|
type: _.SectionMessage,
|
|
431
437
|
variant: v.Warning,
|
|
432
|
-
message:
|
|
438
|
+
message: P
|
|
433
439
|
})
|
|
434
440
|
}),
|
|
435
441
|
m && /* @__PURE__ */ A("div", {
|
|
436
|
-
className: D("mb-2 flex items-center gap-2",
|
|
437
|
-
children: [/* @__PURE__ */ k(
|
|
442
|
+
className: D("mb-2 flex items-center gap-2", w, X.loading),
|
|
443
|
+
children: [/* @__PURE__ */ k(S, {
|
|
438
444
|
size: 16,
|
|
439
|
-
ariaLabel:
|
|
440
|
-
}), /* @__PURE__ */ k("span", { children:
|
|
445
|
+
ariaLabel: V
|
|
446
|
+
}), /* @__PURE__ */ k("span", { children: V })]
|
|
441
447
|
}),
|
|
442
448
|
h && /* @__PURE__ */ k("div", {
|
|
443
449
|
className: "mb-2",
|
|
444
450
|
children: /* @__PURE__ */ k(g, {
|
|
445
451
|
type: _.SectionMessage,
|
|
446
452
|
variant: v.Warning,
|
|
447
|
-
message:
|
|
453
|
+
message: se
|
|
448
454
|
})
|
|
449
455
|
}),
|
|
450
456
|
e.length > 0 && /* @__PURE__ */ k("ul", {
|
|
@@ -454,59 +460,59 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
454
460
|
return /* @__PURE__ */ A("li", {
|
|
455
461
|
className: D("flex items-center justify-between gap-2 rounded-lg px-3 py-2", X.ruleRow),
|
|
456
462
|
children: [/* @__PURE__ */ A("span", {
|
|
457
|
-
className: D("truncate",
|
|
463
|
+
className: D("truncate", T, X.ruleText),
|
|
458
464
|
children: [
|
|
459
465
|
/* @__PURE__ */ k("span", {
|
|
460
|
-
className:
|
|
466
|
+
className: O,
|
|
461
467
|
children: e.source
|
|
462
468
|
}),
|
|
463
469
|
" ",
|
|
464
|
-
|
|
470
|
+
Z(e.function, ve),
|
|
465
471
|
": ",
|
|
466
472
|
n
|
|
467
473
|
]
|
|
468
|
-
}), /* @__PURE__ */ k(
|
|
474
|
+
}), /* @__PURE__ */ k(f, {
|
|
469
475
|
icon: /* @__PURE__ */ k(ne, {
|
|
470
|
-
size:
|
|
476
|
+
size: c.SM,
|
|
471
477
|
"aria-hidden": !0,
|
|
472
|
-
stroke:
|
|
478
|
+
stroke: l
|
|
473
479
|
}),
|
|
474
480
|
"aria-label": r,
|
|
475
|
-
onClick: () =>
|
|
476
|
-
disabled:
|
|
481
|
+
onClick: () => ge(t),
|
|
482
|
+
disabled: p
|
|
477
483
|
})]
|
|
478
484
|
}, t);
|
|
479
485
|
})
|
|
480
486
|
}),
|
|
481
|
-
ce && /* @__PURE__ */ k(
|
|
487
|
+
ce && /* @__PURE__ */ k(pe, {
|
|
482
488
|
sourceOptions: s,
|
|
483
|
-
onSave:
|
|
484
|
-
onCancel:
|
|
485
|
-
disabled:
|
|
489
|
+
onSave: Q,
|
|
490
|
+
onCancel: he,
|
|
491
|
+
disabled: p,
|
|
486
492
|
maxTargets: b,
|
|
487
|
-
labels:
|
|
493
|
+
labels: K,
|
|
488
494
|
styles: j.editor
|
|
489
495
|
}),
|
|
490
496
|
/* @__PURE__ */ k("div", {
|
|
491
497
|
className: "flex flex-wrap items-center gap-2",
|
|
492
|
-
children: /* @__PURE__ */ k(
|
|
493
|
-
label:
|
|
498
|
+
children: /* @__PURE__ */ k(d, {
|
|
499
|
+
label: I,
|
|
494
500
|
iconBefore: /* @__PURE__ */ k(te, {
|
|
495
|
-
size:
|
|
501
|
+
size: c.SM,
|
|
496
502
|
"aria-hidden": !0,
|
|
497
|
-
stroke:
|
|
503
|
+
stroke: l
|
|
498
504
|
}),
|
|
499
|
-
onClick:
|
|
500
|
-
disabled:
|
|
505
|
+
onClick: fe,
|
|
506
|
+
disabled: ye
|
|
501
507
|
})
|
|
502
508
|
}),
|
|
503
|
-
|
|
504
|
-
className: D("mt-2",
|
|
505
|
-
children:
|
|
509
|
+
$ && /* @__PURE__ */ k("p", {
|
|
510
|
+
className: D("mt-2", ee, X.hint),
|
|
511
|
+
children: F.replace("{max}", String(y))
|
|
506
512
|
})
|
|
507
513
|
]
|
|
508
514
|
});
|
|
509
|
-
},
|
|
515
|
+
}, Q = {
|
|
510
516
|
currentBadge: "_currentBadge_d0adf_1",
|
|
511
517
|
sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
|
|
512
518
|
version: "_version_d0adf_13",
|
|
@@ -525,7 +531,7 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
525
531
|
"--phl-date-text": p?.dateText,
|
|
526
532
|
"--phl-empty-text": p?.emptyStateText,
|
|
527
533
|
"--phl-striped-bg": p?.stripedBackground
|
|
528
|
-
}), h = D(f,
|
|
534
|
+
}), h = D(f, Q.emptyState);
|
|
529
535
|
return n ? /* @__PURE__ */ k("p", {
|
|
530
536
|
style: m,
|
|
531
537
|
className: h,
|
|
@@ -542,30 +548,30 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
542
548
|
}) : /* @__PURE__ */ k("ul", {
|
|
543
549
|
style: m,
|
|
544
550
|
children: e.map((e, n) => /* @__PURE__ */ A("li", {
|
|
545
|
-
className: D("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 &&
|
|
551
|
+
className: D("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
|
|
546
552
|
children: [/* @__PURE__ */ A("span", {
|
|
547
553
|
className: "flex min-w-0 items-center gap-2",
|
|
548
554
|
style: m,
|
|
549
555
|
children: [
|
|
550
556
|
/* @__PURE__ */ A("span", {
|
|
551
|
-
className: D(u,
|
|
557
|
+
className: D(u, Q.version),
|
|
552
558
|
children: [
|
|
553
559
|
i,
|
|
554
560
|
" ",
|
|
555
561
|
e.version
|
|
556
562
|
]
|
|
557
563
|
}),
|
|
558
|
-
e.version === t && /* @__PURE__ */ k(
|
|
564
|
+
e.version === t && /* @__PURE__ */ k(C, {
|
|
559
565
|
label: a,
|
|
560
|
-
className: D("shrink-0 whitespace-nowrap",
|
|
566
|
+
className: D("shrink-0 whitespace-nowrap", Q.currentBadge)
|
|
561
567
|
}),
|
|
562
|
-
e.publishCredentials === !0 && /* @__PURE__ */ k(
|
|
568
|
+
e.publishCredentials === !0 && /* @__PURE__ */ k(C, {
|
|
563
569
|
label: o,
|
|
564
|
-
className: D("shrink-0 whitespace-nowrap",
|
|
570
|
+
className: D("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
|
|
565
571
|
})
|
|
566
572
|
]
|
|
567
573
|
}), /* @__PURE__ */ k("span", {
|
|
568
|
-
className: D(d,
|
|
574
|
+
className: D(d, Q.date),
|
|
569
575
|
children: I(e.publishedAt)
|
|
570
576
|
})]
|
|
571
577
|
}, `${e.version}-${n}`))
|
|
@@ -573,92 +579,92 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
573
579
|
}, _e = {
|
|
574
580
|
divider: "_divider_1gs31_1",
|
|
575
581
|
tree: "_tree_1gs31_17"
|
|
576
|
-
},
|
|
577
|
-
let
|
|
578
|
-
...E({ "--pft-divider":
|
|
579
|
-
...
|
|
580
|
-
}, [
|
|
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 = {} }) => {
|
|
583
|
+
let T = {
|
|
584
|
+
...E({ "--pft-divider": w.colors?.divider }),
|
|
585
|
+
...w.cssVars
|
|
586
|
+
}, [O, ne] = a(() => new Set(t?.map((e, n) => U(t.slice(0, n + 1))) ?? [])), M = S ?? O, N = (e) => {
|
|
581
587
|
let t = new Set(e);
|
|
582
|
-
t.delete(""), C ? C(t) :
|
|
583
|
-
}, [
|
|
584
|
-
|
|
585
|
-
|
|
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,
|
|
591
|
+
V,
|
|
586
592
|
e
|
|
587
|
-
]),
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
]), de = r(() =>
|
|
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 ? [] : [{
|
|
592
598
|
path: "",
|
|
593
599
|
name: x,
|
|
594
600
|
folderId: "",
|
|
595
|
-
nodeType:
|
|
601
|
+
nodeType: re.FOLDER,
|
|
596
602
|
items: de
|
|
597
603
|
}], [
|
|
598
604
|
de,
|
|
599
605
|
x,
|
|
600
|
-
|
|
601
|
-
]),
|
|
606
|
+
K
|
|
607
|
+
]), pe = P ? U(P) : null, X = {
|
|
602
608
|
empty: v,
|
|
603
609
|
invalid: y,
|
|
604
610
|
duplicate: b
|
|
605
|
-
}, me = (t) => se
|
|
606
|
-
|
|
607
|
-
let t =
|
|
608
|
-
t &&
|
|
609
|
-
},
|
|
610
|
-
let t =
|
|
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 = [{
|
|
611
617
|
key: "add-child",
|
|
612
618
|
label: h,
|
|
613
|
-
icon: /* @__PURE__ */ k(
|
|
614
|
-
size:
|
|
619
|
+
icon: /* @__PURE__ */ k(j, {
|
|
620
|
+
size: c.SM,
|
|
615
621
|
"aria-hidden": !0,
|
|
616
|
-
stroke:
|
|
622
|
+
stroke: l
|
|
617
623
|
}),
|
|
618
|
-
onClick: () =>
|
|
624
|
+
onClick: () => Z(t)
|
|
619
625
|
}];
|
|
620
626
|
return e.path !== "" && n.push({
|
|
621
627
|
key: "add-sibling",
|
|
622
628
|
label: m,
|
|
623
629
|
icon: /* @__PURE__ */ k(te, {
|
|
624
|
-
size:
|
|
630
|
+
size: c.SM,
|
|
625
631
|
"aria-hidden": !0,
|
|
626
|
-
stroke:
|
|
632
|
+
stroke: l
|
|
627
633
|
}),
|
|
628
|
-
onClick: () =>
|
|
634
|
+
onClick: () => Z(t.slice(0, -1))
|
|
629
635
|
}), n;
|
|
630
|
-
},
|
|
631
|
-
if (!
|
|
632
|
-
let n =
|
|
636
|
+
}, ge = (t) => {
|
|
637
|
+
if (!P) return null;
|
|
638
|
+
let n = q(t, J(e, P), X);
|
|
633
639
|
return R.current = n, n;
|
|
634
640
|
}, ve = (e) => {
|
|
635
|
-
if (!
|
|
641
|
+
if (!P) return;
|
|
636
642
|
let t = e.trim(), r = R.current;
|
|
637
|
-
(
|
|
638
|
-
},
|
|
643
|
+
(ge(e) ?? r) || (o(P, t), n([...P, t])), F(null);
|
|
644
|
+
}, $ = () => F(null);
|
|
639
645
|
return /* @__PURE__ */ A("div", {
|
|
640
|
-
style:
|
|
641
|
-
className: D(
|
|
646
|
+
style: T,
|
|
647
|
+
className: D(u && "pointer-events-none opacity-60", w.className),
|
|
642
648
|
children: [
|
|
643
649
|
/* @__PURE__ */ k("div", {
|
|
644
650
|
className: D("w-full min-w-0 max-w-full", _e.tree),
|
|
645
|
-
children: /* @__PURE__ */ k(
|
|
651
|
+
children: /* @__PURE__ */ k(ie, {
|
|
646
652
|
items: fe,
|
|
647
653
|
showFiles: !1,
|
|
648
|
-
selectedPath: t == null ? void 0 :
|
|
654
|
+
selectedPath: t == null ? void 0 : U(t),
|
|
649
655
|
expandedPaths: ue,
|
|
650
|
-
onExpandedPathsChange:
|
|
651
|
-
loadingPaths:
|
|
656
|
+
onExpandedPathsChange: N,
|
|
657
|
+
loadingPaths: ee,
|
|
652
658
|
onItemClick: (e) => {
|
|
653
|
-
n(t != null &&
|
|
659
|
+
n(t != null && U(t) === e.path ? void 0 : W(e.path));
|
|
654
660
|
},
|
|
655
|
-
getContextMenuItems:
|
|
656
|
-
createdFolderPath:
|
|
657
|
-
newFolderDefaultName:
|
|
661
|
+
getContextMenuItems: Q,
|
|
662
|
+
createdFolderPath: pe,
|
|
663
|
+
newFolderDefaultName: I,
|
|
658
664
|
onCreateFolderSave: ve,
|
|
659
|
-
onCreateFolderCancel:
|
|
660
|
-
onRenameValidate: (e) =>
|
|
661
|
-
emptyStateTitle:
|
|
665
|
+
onCreateFolderCancel: $,
|
|
666
|
+
onRenameValidate: (e) => ge(e),
|
|
667
|
+
emptyStateTitle: K ? _.replace("{query}", z) : void 0
|
|
662
668
|
})
|
|
663
669
|
}),
|
|
664
670
|
/* @__PURE__ */ k("div", {
|
|
@@ -667,65 +673,65 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
667
673
|
}),
|
|
668
674
|
/* @__PURE__ */ A("div", {
|
|
669
675
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
670
|
-
children: [/* @__PURE__ */ k(
|
|
671
|
-
onClick:
|
|
672
|
-
label:
|
|
676
|
+
children: [/* @__PURE__ */ k(d, {
|
|
677
|
+
onClick: he,
|
|
678
|
+
label: f,
|
|
673
679
|
iconBefore: /* @__PURE__ */ k(te, {
|
|
674
|
-
size:
|
|
680
|
+
size: c.SM,
|
|
675
681
|
"aria-hidden": !0,
|
|
676
|
-
stroke:
|
|
682
|
+
stroke: l
|
|
677
683
|
}),
|
|
678
|
-
disabled:
|
|
679
|
-
}),
|
|
684
|
+
disabled: u || B
|
|
685
|
+
}), B && /* @__PURE__ */ k(d, {
|
|
680
686
|
label: p,
|
|
681
|
-
onClick:
|
|
682
|
-
disabled:
|
|
687
|
+
onClick: $,
|
|
688
|
+
disabled: u
|
|
683
689
|
})]
|
|
684
690
|
})
|
|
685
691
|
]
|
|
686
692
|
});
|
|
687
|
-
},
|
|
693
|
+
}, $ = { panel: "dial-publish-panel-panel" }, ye = {
|
|
688
694
|
summaryTitle: "_summaryTitle_tf20a_1",
|
|
689
695
|
sectionHeading: "_sectionHeading_tf20a_5"
|
|
690
|
-
}, be = 200, xe = ({ resource: e, renderSummary: t,
|
|
691
|
-
let { colors:
|
|
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 = {
|
|
692
698
|
...E({
|
|
693
|
-
"--pp-summary-title-text":
|
|
694
|
-
"--pp-heading-text":
|
|
699
|
+
"--pp-summary-title-text": L?.summaryTitleText,
|
|
700
|
+
"--pp-heading-text": L?.headingText
|
|
695
701
|
}),
|
|
696
|
-
...
|
|
697
|
-
},
|
|
698
|
-
border:
|
|
699
|
-
background:
|
|
700
|
-
versionTagBorder:
|
|
701
|
-
versionTagBackground:
|
|
702
|
-
versionTagText:
|
|
703
|
-
}, { folderLabel:
|
|
704
|
-
|
|
705
|
-
},
|
|
706
|
-
hasSelectedFolder:
|
|
707
|
-
hasExistingPublicationInFolder:
|
|
708
|
-
hasWriteAccess:
|
|
709
|
-
isSubmitting:
|
|
710
|
-
hasSubmitError:
|
|
711
|
-
allowReplace:
|
|
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,
|
|
713
|
+
hasExistingPublicationInFolder: p,
|
|
714
|
+
hasWriteAccess: h,
|
|
715
|
+
isSubmitting: v,
|
|
716
|
+
hasSubmitError: b,
|
|
717
|
+
allowReplace: x
|
|
712
718
|
}), [
|
|
713
|
-
|
|
719
|
+
Te,
|
|
720
|
+
p,
|
|
721
|
+
h,
|
|
722
|
+
v,
|
|
714
723
|
b,
|
|
715
|
-
x
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
T
|
|
719
|
-
]), Ae = ke ? u[u.length - 1] ?? de : "", je = t ? t() : /* @__PURE__ */ k("span", {
|
|
720
|
-
className: D("truncate", L, ye.summaryTitle),
|
|
724
|
+
x
|
|
725
|
+
]), De = Te ? o[o.length - 1] ?? Y : "", Oe = t ? t() : /* @__PURE__ */ k("span", {
|
|
726
|
+
className: D("truncate", M, ye.summaryTitle),
|
|
721
727
|
children: e?.title
|
|
722
728
|
});
|
|
723
729
|
return /* @__PURE__ */ A("div", {
|
|
724
|
-
className: D("flex flex-col gap-5",
|
|
725
|
-
style:
|
|
730
|
+
className: D("flex flex-col gap-5", $.panel),
|
|
731
|
+
style: ae,
|
|
726
732
|
children: [e?.type == null ? /* @__PURE__ */ k(w, {
|
|
727
|
-
colors:
|
|
728
|
-
children:
|
|
733
|
+
colors: B,
|
|
734
|
+
children: Oe
|
|
729
735
|
}) : /* @__PURE__ */ k(w, {
|
|
730
736
|
item: {
|
|
731
737
|
type: e.type,
|
|
@@ -733,54 +739,54 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
733
739
|
version: e.version ?? "",
|
|
734
740
|
iconUrl: e.iconUrl
|
|
735
741
|
},
|
|
736
|
-
versionLabel:
|
|
737
|
-
colors:
|
|
742
|
+
versionLabel: le,
|
|
743
|
+
colors: B
|
|
738
744
|
}), /* @__PURE__ */ A("div", { children: [
|
|
739
745
|
/* @__PURE__ */ k("div", {
|
|
740
|
-
className: D("mb-2",
|
|
741
|
-
children:
|
|
746
|
+
className: D("mb-2", F, ye.sectionHeading),
|
|
747
|
+
children: oe
|
|
742
748
|
}),
|
|
743
749
|
/* @__PURE__ */ k("div", {
|
|
744
750
|
role: "search",
|
|
745
751
|
className: "mb-3",
|
|
746
752
|
children: /* @__PURE__ */ k(y, {
|
|
747
|
-
value:
|
|
748
|
-
onChange:
|
|
749
|
-
placeholder:
|
|
750
|
-
clearLabel:
|
|
751
|
-
"aria-label":
|
|
753
|
+
value: ge,
|
|
754
|
+
onChange: Ce,
|
|
755
|
+
placeholder: de,
|
|
756
|
+
clearLabel: fe,
|
|
757
|
+
"aria-label": de
|
|
752
758
|
})
|
|
753
759
|
}),
|
|
754
|
-
/* @__PURE__ */ k(
|
|
755
|
-
items:
|
|
756
|
-
selectedPath:
|
|
757
|
-
onSelectedPathChange:
|
|
758
|
-
onCreateFolder:
|
|
759
|
-
expandedPaths:
|
|
760
|
-
onExpandedPathsChange:
|
|
761
|
-
loadingPaths:
|
|
762
|
-
searchQuery:
|
|
763
|
-
disabled:
|
|
764
|
-
noResultsLabel:
|
|
765
|
-
addSiblingFolderLabel:
|
|
766
|
-
addChildFolderLabel:
|
|
767
|
-
cancelCreatingFolderLabel:
|
|
768
|
-
emptyFolderNameError:
|
|
769
|
-
invalidFolderNameError:
|
|
770
|
-
duplicateFolderNameError:
|
|
771
|
-
rootLabel:
|
|
772
|
-
styles:
|
|
760
|
+
/* @__PURE__ */ k(ve, {
|
|
761
|
+
items: i,
|
|
762
|
+
selectedPath: o,
|
|
763
|
+
onSelectedPathChange: c,
|
|
764
|
+
onCreateFolder: l,
|
|
765
|
+
expandedPaths: u,
|
|
766
|
+
onExpandedPathsChange: d,
|
|
767
|
+
loadingPaths: f,
|
|
768
|
+
searchQuery: ge,
|
|
769
|
+
disabled: v,
|
|
770
|
+
noResultsLabel: U,
|
|
771
|
+
addSiblingFolderLabel: W,
|
|
772
|
+
addChildFolderLabel: G,
|
|
773
|
+
cancelCreatingFolderLabel: K,
|
|
774
|
+
emptyFolderNameError: q,
|
|
775
|
+
invalidFolderNameError: ce,
|
|
776
|
+
duplicateFolderNameError: J,
|
|
777
|
+
rootLabel: Y,
|
|
778
|
+
styles: R
|
|
773
779
|
}),
|
|
774
|
-
|
|
780
|
+
Ee.calloutKind !== N.None && Ee.calloutKind !== N.Info && /* @__PURE__ */ k("div", {
|
|
775
781
|
className: "mt-3",
|
|
776
782
|
children: /* @__PURE__ */ k(g, {
|
|
777
783
|
type: _.SectionMessage,
|
|
778
|
-
variant: Se(
|
|
779
|
-
message: we(
|
|
780
|
-
replaceWarning:
|
|
781
|
-
noAccessError:
|
|
782
|
-
submitError:
|
|
783
|
-
folderName:
|
|
784
|
+
variant: Se(Ee.calloutKind),
|
|
785
|
+
message: we(Ee.calloutKind, {
|
|
786
|
+
replaceWarning: V,
|
|
787
|
+
noAccessError: se,
|
|
788
|
+
submitError: H,
|
|
789
|
+
folderName: De,
|
|
784
790
|
version: e?.version
|
|
785
791
|
})
|
|
786
792
|
})
|
|
@@ -788,38 +794,38 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
788
794
|
/* @__PURE__ */ k("div", {
|
|
789
795
|
className: "mt-4",
|
|
790
796
|
children: /* @__PURE__ */ k(m, {
|
|
791
|
-
id:
|
|
792
|
-
labelProps: { label:
|
|
793
|
-
placeholder:
|
|
794
|
-
caption:
|
|
795
|
-
value:
|
|
796
|
-
onChange: (e) =>
|
|
797
|
+
id: xe,
|
|
798
|
+
labelProps: { label: pe },
|
|
799
|
+
placeholder: X,
|
|
800
|
+
caption: me,
|
|
801
|
+
value: S,
|
|
802
|
+
onChange: (e) => C(e ?? ""),
|
|
797
803
|
maxLength: be,
|
|
798
|
-
disabled:
|
|
804
|
+
disabled: v
|
|
799
805
|
})
|
|
800
806
|
}),
|
|
801
|
-
|
|
807
|
+
T != null && /* @__PURE__ */ k("div", {
|
|
802
808
|
className: "mt-4",
|
|
803
809
|
children: /* @__PURE__ */ k(s, {
|
|
804
|
-
labelProps: { label:
|
|
805
|
-
caption:
|
|
806
|
-
isSelected:
|
|
807
|
-
onChange:
|
|
808
|
-
disabled:
|
|
810
|
+
labelProps: { label: Z },
|
|
811
|
+
caption: Q,
|
|
812
|
+
isSelected: ee,
|
|
813
|
+
onChange: T,
|
|
814
|
+
disabled: v
|
|
809
815
|
})
|
|
810
816
|
}),
|
|
811
817
|
/* @__PURE__ */ k("div", {
|
|
812
818
|
className: "mt-4",
|
|
813
819
|
children: /* @__PURE__ */ k(he, {
|
|
814
|
-
rules:
|
|
815
|
-
onRulesChange:
|
|
816
|
-
sourceOptions:
|
|
817
|
-
folderName:
|
|
818
|
-
disabled:
|
|
819
|
-
isLoading:
|
|
820
|
-
hasLoadError:
|
|
821
|
-
labels:
|
|
822
|
-
styles:
|
|
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
|
|
823
829
|
})
|
|
824
830
|
})
|
|
825
831
|
] })]
|
|
@@ -835,64 +841,53 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
835
841
|
r
|
|
836
842
|
] });
|
|
837
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 }) => {
|
|
838
|
-
let
|
|
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;
|
|
839
845
|
return /* @__PURE__ */ A("div", {
|
|
840
|
-
style:
|
|
846
|
+
style: l,
|
|
841
847
|
className: D("flex items-center justify-end gap-2 border-t px-3.5 py-4 rtl:flex-row-reverse rtl:justify-start", Te.footer),
|
|
842
|
-
children: [/* @__PURE__ */ k(
|
|
848
|
+
children: [/* @__PURE__ */ k(d, {
|
|
843
849
|
label: u,
|
|
844
850
|
disabled: r,
|
|
845
851
|
onClick: i
|
|
846
852
|
}), /* @__PURE__ */ k(h, {
|
|
847
853
|
label: g,
|
|
848
854
|
disabled: n,
|
|
849
|
-
iconBefore: r ? /* @__PURE__ */ k(
|
|
855
|
+
iconBefore: r ? /* @__PURE__ */ k(S, { size: c.SM }) : void 0,
|
|
850
856
|
onClick: a
|
|
851
857
|
})]
|
|
852
858
|
});
|
|
853
|
-
}, De =
|
|
854
|
-
"
|
|
855
|
-
"
|
|
856
|
-
"
|
|
857
|
-
"
|
|
858
|
-
"
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
"--spp-divider-border": R?.dividerBorder,
|
|
875
|
-
"--spp-scrollbar-thumb": R?.scrollbarThumb,
|
|
876
|
-
"--spp-title-text": R?.titleText
|
|
877
|
-
}), B = i(null), { title: V = "Publish", ariaLabel: H = "Publish", closeAriaLabel: U = "Close" } = ie, W = r(() => P({
|
|
878
|
-
hasSelectedFolder: d != null,
|
|
879
|
-
hasExistingPublicationInFolder: _,
|
|
880
|
-
hasWriteAccess: v,
|
|
881
|
-
isSubmitting: y,
|
|
882
|
-
hasSubmitError: b,
|
|
883
|
-
allowReplace: x
|
|
859
|
+
}, De = {
|
|
860
|
+
backdrop: "_backdrop_16jmd_6",
|
|
861
|
+
panel: "_panel_16jmd_10",
|
|
862
|
+
divider: "_divider_16jmd_15",
|
|
863
|
+
content: "_content_16jmd_19",
|
|
864
|
+
title: "_title_16jmd_24"
|
|
865
|
+
}, 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 }) => {
|
|
866
|
+
let F = E({
|
|
867
|
+
"--spp-backdrop-bg": N?.backdropBackground,
|
|
868
|
+
"--spp-panel-bg": N?.panelBackground,
|
|
869
|
+
"--spp-panel-border": N?.panelBorder,
|
|
870
|
+
"--spp-divider-border": N?.dividerBorder,
|
|
871
|
+
"--spp-scrollbar-thumb": N?.scrollbarThumb,
|
|
872
|
+
"--spp-title-text": N?.titleText
|
|
873
|
+
}), [I, L] = a(null), { title: R = "Publish", ariaLabel: z = "Publish", closeAriaLabel: ae = "Close" } = ie, B = r(() => P({
|
|
874
|
+
hasSelectedFolder: s != null,
|
|
875
|
+
hasExistingPublicationInFolder: p,
|
|
876
|
+
hasWriteAccess: m,
|
|
877
|
+
isSubmitting: h,
|
|
878
|
+
hasSubmitError: g,
|
|
879
|
+
allowReplace: _
|
|
884
880
|
}), [
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
881
|
+
s,
|
|
882
|
+
p,
|
|
883
|
+
m,
|
|
884
|
+
h,
|
|
885
|
+
g,
|
|
886
|
+
_
|
|
891
887
|
]);
|
|
892
888
|
return t(() => {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
if (!t) return;
|
|
889
|
+
let t = I?.closest("[role=\"dialog\"]");
|
|
890
|
+
if (!e || !t) return;
|
|
896
891
|
let n = () => t.focus({ preventScroll: !0 });
|
|
897
892
|
n();
|
|
898
893
|
let r = (e) => {
|
|
@@ -901,117 +896,71 @@ var M = /* @__PURE__ */ function(e) {
|
|
|
901
896
|
document.addEventListener("focusin", r);
|
|
902
897
|
let i = requestAnimationFrame(() => {
|
|
903
898
|
document.removeEventListener("focusin", r);
|
|
904
|
-
}), a =
|
|
899
|
+
}), a = O?.current;
|
|
905
900
|
return () => {
|
|
906
901
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
907
902
|
};
|
|
908
|
-
}, [
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
children: V
|
|
958
|
-
}),
|
|
959
|
-
/* @__PURE__ */ k("div", {
|
|
960
|
-
className: "flex flex-1 justify-end",
|
|
961
|
-
children: /* @__PURE__ */ k(c, {
|
|
962
|
-
onClose: j,
|
|
963
|
-
ariaLabel: U,
|
|
964
|
-
disabled: y
|
|
965
|
-
})
|
|
966
|
-
})
|
|
967
|
-
]
|
|
968
|
-
}),
|
|
969
|
-
/* @__PURE__ */ k("div", { className: D("shrink-0", $.divider) }),
|
|
970
|
-
/* @__PURE__ */ k("div", {
|
|
971
|
-
className: D("min-h-0 flex-1 overflow-y-auto", $.content),
|
|
972
|
-
children: /* @__PURE__ */ k("div", {
|
|
973
|
-
className: "p-[22px]",
|
|
974
|
-
children: /* @__PURE__ */ k(xe, {
|
|
975
|
-
resource: n,
|
|
976
|
-
renderSummary: a,
|
|
977
|
-
history: o,
|
|
978
|
-
isHistoryLoading: s,
|
|
979
|
-
hasHistoryError: l,
|
|
980
|
-
folderItems: u,
|
|
981
|
-
selectedFolderPath: d,
|
|
982
|
-
onSelectedFolderPathChange: f,
|
|
983
|
-
onCreateFolder: p,
|
|
984
|
-
expandedPaths: m,
|
|
985
|
-
onExpandedPathsChange: h,
|
|
986
|
-
loadingPaths: g,
|
|
987
|
-
hasExistingPublicationInFolder: _,
|
|
988
|
-
hasWriteAccess: v,
|
|
989
|
-
isSubmitting: y,
|
|
990
|
-
hasSubmitError: b,
|
|
991
|
-
allowReplace: x,
|
|
992
|
-
author: S,
|
|
993
|
-
onAuthorChange: C,
|
|
994
|
-
rules: w,
|
|
995
|
-
onRulesChange: T,
|
|
996
|
-
ruleSourceOptions: ee,
|
|
997
|
-
isRulesLoading: te,
|
|
998
|
-
hasRulesLoadError: ne,
|
|
999
|
-
labels: N,
|
|
1000
|
-
styles: F
|
|
1001
|
-
})
|
|
903
|
+
}, [
|
|
904
|
+
e,
|
|
905
|
+
I,
|
|
906
|
+
O
|
|
907
|
+
]), /* @__PURE__ */ A(x, {
|
|
908
|
+
open: e,
|
|
909
|
+
onClose: T,
|
|
910
|
+
header: /* @__PURE__ */ k("span", {
|
|
911
|
+
className: D("block truncate text-center", M, De.title),
|
|
912
|
+
children: R
|
|
913
|
+
}),
|
|
914
|
+
ariaLabel: z,
|
|
915
|
+
closeAriaLabel: ae,
|
|
916
|
+
closeDisabled: h,
|
|
917
|
+
style: F,
|
|
918
|
+
overlayStyle: F,
|
|
919
|
+
className: De.panel,
|
|
920
|
+
overlayClassName: De.backdrop,
|
|
921
|
+
headerClassName: D("px-[22px]", De.divider),
|
|
922
|
+
bodyClassName: "flex flex-col overflow-hidden",
|
|
923
|
+
children: [/* @__PURE__ */ k("div", {
|
|
924
|
+
ref: L,
|
|
925
|
+
className: D("min-h-0 flex-1 overflow-y-auto", De.content),
|
|
926
|
+
children: /* @__PURE__ */ k("div", {
|
|
927
|
+
className: "p-[22px]",
|
|
928
|
+
children: /* @__PURE__ */ k(xe, {
|
|
929
|
+
resource: n,
|
|
930
|
+
renderSummary: i,
|
|
931
|
+
folderItems: o,
|
|
932
|
+
selectedFolderPath: s,
|
|
933
|
+
onSelectedFolderPathChange: c,
|
|
934
|
+
onCreateFolder: l,
|
|
935
|
+
expandedPaths: u,
|
|
936
|
+
onExpandedPathsChange: d,
|
|
937
|
+
loadingPaths: f,
|
|
938
|
+
hasExistingPublicationInFolder: p,
|
|
939
|
+
hasWriteAccess: m,
|
|
940
|
+
isSubmitting: h,
|
|
941
|
+
hasSubmitError: g,
|
|
942
|
+
allowReplace: _,
|
|
943
|
+
author: v,
|
|
944
|
+
onAuthorChange: y,
|
|
945
|
+
rules: b,
|
|
946
|
+
onRulesChange: S,
|
|
947
|
+
ruleSourceOptions: C,
|
|
948
|
+
isRulesLoading: ee,
|
|
949
|
+
hasRulesLoadError: w,
|
|
950
|
+
labels: te,
|
|
951
|
+
styles: ne
|
|
1002
952
|
})
|
|
1003
|
-
}),
|
|
1004
|
-
/* @__PURE__ */ k(Ee, {
|
|
1005
|
-
version: n?.version,
|
|
1006
|
-
hasExistingPublicationInFolder: _,
|
|
1007
|
-
isSubmitDisabled: W.isSubmitDisabled,
|
|
1008
|
-
isSubmitLoading: W.isSubmitLoading,
|
|
1009
|
-
onCancel: j,
|
|
1010
|
-
onSubmit: M,
|
|
1011
|
-
labels: I
|
|
1012
953
|
})
|
|
1013
|
-
|
|
1014
|
-
|
|
954
|
+
}), /* @__PURE__ */ k(Ee, {
|
|
955
|
+
version: n?.version,
|
|
956
|
+
hasExistingPublicationInFolder: p,
|
|
957
|
+
isSubmitDisabled: B.isSubmitDisabled,
|
|
958
|
+
isSubmitLoading: B.isSubmitLoading,
|
|
959
|
+
onCancel: T,
|
|
960
|
+
onSubmit: j,
|
|
961
|
+
labels: re
|
|
962
|
+
})]
|
|
963
|
+
});
|
|
1015
964
|
};
|
|
1016
965
|
//#endregion
|
|
1017
|
-
export {
|
|
966
|
+
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 };
|