@epam/ai-dial-publish-panel 1.4.0-dev.12 → 1.4.0-dev.122
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/PublishDependenciesList/PublishDependenciesList.d.ts +10 -0
- package/components/PublishDependenciesList/PublishDependenciesList.d.ts.map +1 -0
- package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +1 -1
- package/components/PublishPanel/PublishFooter.d.ts.map +1 -1
- package/components/PublishPanel/PublishPanel.d.ts +47 -9
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +20 -7
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -1
- package/components/VersionHistorySection/VersionHistorySection.d.ts +5 -0
- package/components/VersionHistorySection/VersionHistorySection.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +6 -0
- package/constants/public-class-names.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -1
- package/index.js +1186 -843
- package/models/publish-dependencies-list.d.ts +68 -0
- package/models/publish-dependencies-list.d.ts.map +1 -0
- package/models/publish-dependency.d.ts +30 -0
- package/models/publish-dependency.d.ts.map +1 -0
- package/models/publish-folders-tree.d.ts +4 -0
- package/models/publish-folders-tree.d.ts.map +1 -1
- package/models/publish-panel-styles.d.ts +3 -0
- package/models/publish-panel-styles.d.ts.map +1 -1
- package/models/publish.d.ts +6 -0
- package/models/publish.d.ts.map +1 -1
- package/models/save-to-folder-panel.d.ts +9 -0
- package/models/save-to-folder-panel.d.ts.map +1 -1
- package/models/version-history.d.ts +92 -0
- package/models/version-history.d.ts.map +1 -0
- package/package.json +3 -3
- package/utils/publish-folder-tree.d.ts +4 -2
- package/utils/publish-folder-tree.d.ts.map +1 -1
- package/utils/publish-state.d.ts.map +1 -1
- package/utils/use-publish-flow.d.ts +32 -1
- package/utils/use-publish-flow.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,46 +1,58 @@
|
|
|
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 {
|
|
3
|
-
import { ConfirmationDialog as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { IconFolder as
|
|
6
|
-
import { DialFileNodeType as
|
|
2
|
+
import { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as w, LiveRegionElement as T, LiveRegionPoliteness as E, NeutralButton as D, Notification as O, NotificationType as k, NotificationVariant as A, PrimaryButton as j, RadioGroup as te, Search as M, Select as N, SideDrawer as ne, Skeleton as P, SkeletonVariant as F, Spinner as I, Tag as re, TagInput as ie } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { ConfirmationDialog as L, DeploymentIcon as R, ResourceSummary as ae, TAG_INPUT_TAG_CLASS_NAME as z, buildCssVars as B, mergeClasses as V, useIsMobile as oe } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { Fragment as se, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
5
|
+
import { IconFolder as W, IconFolderPlus as ce, IconPlus as le, IconTrashX as G } from "@tabler/icons-react";
|
|
6
|
+
import { DialFileNodeType as ue, DialFoldersTree as de } from "@epam/ai-dial-react-file-manager";
|
|
7
7
|
//#region src/models/publish.ts
|
|
8
|
-
var
|
|
8
|
+
var K = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
|
|
10
|
-
}({}),
|
|
11
|
-
return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
|
|
12
|
-
}({}),
|
|
13
|
-
|
|
10
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.TargetTaken = "targetTaken", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
|
|
12
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
13
|
+
return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
|
|
14
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
15
|
+
return e.Warning = "warning", e.Published = "published", e;
|
|
16
|
+
}({}), fe = (e) => e.isSubmitting ? {
|
|
17
|
+
calloutKind: q.None,
|
|
14
18
|
isSubmitDisabled: !0,
|
|
15
19
|
isSubmitLoading: !0
|
|
16
|
-
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.
|
|
17
|
-
calloutKind:
|
|
20
|
+
} : e.hasSelectedFolder ? e.hasWriteAccess ? e.isTargetChecking ? {
|
|
21
|
+
calloutKind: q.None,
|
|
22
|
+
isSubmitDisabled: !0,
|
|
23
|
+
isSubmitLoading: !1
|
|
24
|
+
} : e.hasSubmitError ? {
|
|
25
|
+
calloutKind: q.SubmitError,
|
|
18
26
|
isSubmitDisabled: !1,
|
|
19
27
|
isSubmitLoading: !1
|
|
20
28
|
} : e.hasExistingPublicationInFolder ? {
|
|
21
|
-
calloutKind:
|
|
29
|
+
calloutKind: q.ReplaceWarning,
|
|
22
30
|
isSubmitDisabled: e.allowReplace === !1,
|
|
23
31
|
isSubmitLoading: !1
|
|
32
|
+
} : e.isTargetTaken ? {
|
|
33
|
+
calloutKind: q.TargetTaken,
|
|
34
|
+
isSubmitDisabled: !0,
|
|
35
|
+
isSubmitLoading: !1
|
|
24
36
|
} : {
|
|
25
|
-
calloutKind:
|
|
37
|
+
calloutKind: q.Info,
|
|
26
38
|
isSubmitDisabled: !1,
|
|
27
39
|
isSubmitLoading: !1
|
|
28
40
|
} : {
|
|
29
|
-
calloutKind:
|
|
41
|
+
calloutKind: q.NoAccess,
|
|
30
42
|
isSubmitDisabled: !0,
|
|
31
43
|
isSubmitLoading: !1
|
|
32
44
|
} : {
|
|
33
|
-
calloutKind:
|
|
45
|
+
calloutKind: q.None,
|
|
34
46
|
isSubmitDisabled: !0,
|
|
35
47
|
isSubmitLoading: !1
|
|
36
|
-
},
|
|
37
|
-
let r = Math.floor((t - e) /
|
|
48
|
+
}, X = 864e5, pe = (e, t = Date.now(), n) => {
|
|
49
|
+
let r = Math.floor((t - e) / X);
|
|
38
50
|
return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
|
|
39
51
|
month: "short",
|
|
40
52
|
day: "numeric",
|
|
41
53
|
year: "numeric"
|
|
42
54
|
});
|
|
43
|
-
},
|
|
55
|
+
}, Z = (e, t, n) => t.length === 0 ? [...e, {
|
|
44
56
|
path: [n],
|
|
45
57
|
name: n
|
|
46
58
|
}] : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
@@ -51,191 +63,220 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
51
63
|
}]
|
|
52
64
|
} : {
|
|
53
65
|
...e,
|
|
54
|
-
children: e.children ?
|
|
55
|
-
}),
|
|
66
|
+
children: e.children ? Z(e.children, t, n) : e.children
|
|
67
|
+
}), me = (e, t, n) => {
|
|
56
68
|
let r = [...t, n].join("/");
|
|
57
69
|
return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
|
|
58
70
|
...e,
|
|
59
71
|
children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
|
|
60
72
|
} : {
|
|
61
73
|
...e,
|
|
62
|
-
children: e.children ?
|
|
74
|
+
children: e.children ? me(e.children, t, n) : e.children
|
|
63
75
|
});
|
|
64
|
-
},
|
|
65
|
-
let [
|
|
76
|
+
}, he = ({ item: n, history: o, folderItems: s, hasWriteAccess: c = () => !0, defaultAuthor: l = "", onCreateFolder: u, onPublish: d, onPublishSuccess: f, onPublishError: p, onFetchExistingRules: m, onCheckTargetExists: h, isTargetTakenError: g }) => {
|
|
77
|
+
let [_, v] = a(s);
|
|
66
78
|
t(() => {
|
|
67
|
-
|
|
68
|
-
}, [
|
|
69
|
-
let [
|
|
79
|
+
v(s);
|
|
80
|
+
}, [s]);
|
|
81
|
+
let [y, b] = a(), [x, S] = a(!1), [ee, C] = a(!1), [w, T] = a([]), [E, D] = a(!1), [O, k] = a(!1), [A, j] = a(l), [te, M] = a(!1), [N, ne] = a(!1);
|
|
70
82
|
t(() => {
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
let
|
|
74
|
-
|
|
83
|
+
N || j(l);
|
|
84
|
+
}, [l, N]);
|
|
85
|
+
let P = e((e) => {
|
|
86
|
+
ne(!0), j(e);
|
|
75
87
|
}, []);
|
|
76
88
|
t(() => {
|
|
77
|
-
if (
|
|
78
|
-
|
|
89
|
+
if (y == null) {
|
|
90
|
+
T([]), k(!1);
|
|
79
91
|
return;
|
|
80
92
|
}
|
|
81
|
-
if (!
|
|
93
|
+
if (!m) return;
|
|
82
94
|
let e = !1;
|
|
83
|
-
return
|
|
84
|
-
e ||
|
|
95
|
+
return D(!0), k(!1), m(y).then((t) => {
|
|
96
|
+
e || T(t);
|
|
85
97
|
}).catch(() => {
|
|
86
|
-
e ||
|
|
98
|
+
e || k(!0);
|
|
87
99
|
}).finally(() => {
|
|
88
|
-
e ||
|
|
100
|
+
e || D(!1);
|
|
89
101
|
}), () => {
|
|
90
102
|
e = !0;
|
|
91
103
|
};
|
|
92
|
-
}, [
|
|
93
|
-
let
|
|
94
|
-
if (!
|
|
95
|
-
let e =
|
|
96
|
-
return
|
|
104
|
+
}, [y]);
|
|
105
|
+
let F = r(() => {
|
|
106
|
+
if (!y) return !1;
|
|
107
|
+
let e = y.join("/");
|
|
108
|
+
return o.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
|
|
97
109
|
}, [
|
|
98
|
-
|
|
110
|
+
o,
|
|
99
111
|
n.version,
|
|
100
|
-
|
|
101
|
-
]),
|
|
102
|
-
|
|
112
|
+
y
|
|
113
|
+
]), I = i(/* @__PURE__ */ new Set()), [re, ie] = a(), [L, R] = a(), [ae, z] = a(!1), B = y == null ? void 0 : `${n.id ?? ""}\u0000${y.join("/")}\u0000${n.version ?? ""}`, V = B != null && (re === B || L === B);
|
|
114
|
+
t(() => {
|
|
115
|
+
if (y == null || B == null || !h || F) {
|
|
116
|
+
z(!1);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let e = y.join("/");
|
|
120
|
+
if ([...I.current].some((t) => e === t || e.startsWith(`${t}/`))) {
|
|
121
|
+
z(!1);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let t = !1;
|
|
125
|
+
return z(!0), h(n, y).then((e) => {
|
|
126
|
+
t || ie((t) => e ? B : t === B ? void 0 : t);
|
|
127
|
+
}).catch(() => void 0).finally(() => {
|
|
128
|
+
t || z(!1);
|
|
129
|
+
}), () => {
|
|
130
|
+
t = !0;
|
|
131
|
+
};
|
|
132
|
+
}, [
|
|
133
|
+
B,
|
|
134
|
+
F,
|
|
135
|
+
h == null
|
|
136
|
+
]);
|
|
137
|
+
let oe = e(async (e, t) => {
|
|
138
|
+
let n = [...e, t].join("/");
|
|
139
|
+
I.current.add(n), v((n) => Z(n, e, t));
|
|
103
140
|
try {
|
|
104
|
-
await
|
|
141
|
+
await u?.(e, t);
|
|
105
142
|
} catch {
|
|
106
|
-
|
|
143
|
+
I.current.delete(n), v((n) => me(n, e, t)), C(!0);
|
|
107
144
|
}
|
|
108
|
-
}, [
|
|
109
|
-
if (!
|
|
110
|
-
|
|
145
|
+
}, [u]), se = e(async () => {
|
|
146
|
+
if (!y) return !1;
|
|
147
|
+
S(!0), C(!1);
|
|
111
148
|
try {
|
|
112
|
-
return await
|
|
149
|
+
return await d(n, y, w, A.trim(), te), f?.(n, y), !0;
|
|
113
150
|
} catch (e) {
|
|
114
|
-
return
|
|
151
|
+
return g?.(e) && B != null ? R(B) : C(!0), p?.(n, y, e), !1;
|
|
115
152
|
} finally {
|
|
116
|
-
|
|
153
|
+
S(!1);
|
|
117
154
|
}
|
|
118
155
|
}, [
|
|
119
|
-
|
|
156
|
+
A,
|
|
157
|
+
g,
|
|
120
158
|
n,
|
|
121
|
-
u,
|
|
122
|
-
f,
|
|
123
159
|
d,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
160
|
+
p,
|
|
161
|
+
f,
|
|
162
|
+
te,
|
|
163
|
+
w,
|
|
164
|
+
y,
|
|
165
|
+
B
|
|
166
|
+
]), H = e(() => {
|
|
167
|
+
v(s), b(void 0), C(!1), T([]), k(!1), j(l), ne(!1), M(!1), I.current.clear(), ie(void 0), R(void 0), z(!1);
|
|
168
|
+
}, [l, s]);
|
|
130
169
|
return {
|
|
131
|
-
folderItems:
|
|
132
|
-
selectedFolderPath:
|
|
133
|
-
setSelectedFolderPath:
|
|
134
|
-
handleCreateFolder:
|
|
135
|
-
hasExistingPublicationInFolder:
|
|
136
|
-
hasWriteAccess: !
|
|
137
|
-
isSubmitting:
|
|
138
|
-
hasSubmitError:
|
|
139
|
-
handleSubmit:
|
|
140
|
-
reset:
|
|
141
|
-
rules:
|
|
142
|
-
setRules:
|
|
143
|
-
author:
|
|
144
|
-
setAuthor:
|
|
145
|
-
publishCredentials:
|
|
146
|
-
setPublishCredentials:
|
|
147
|
-
|
|
148
|
-
|
|
170
|
+
folderItems: _,
|
|
171
|
+
selectedFolderPath: y,
|
|
172
|
+
setSelectedFolderPath: b,
|
|
173
|
+
handleCreateFolder: oe,
|
|
174
|
+
hasExistingPublicationInFolder: F,
|
|
175
|
+
hasWriteAccess: !y || c(y),
|
|
176
|
+
isSubmitting: x,
|
|
177
|
+
hasSubmitError: ee,
|
|
178
|
+
handleSubmit: se,
|
|
179
|
+
reset: H,
|
|
180
|
+
rules: w,
|
|
181
|
+
setRules: T,
|
|
182
|
+
author: A,
|
|
183
|
+
setAuthor: P,
|
|
184
|
+
publishCredentials: te,
|
|
185
|
+
setPublishCredentials: M,
|
|
186
|
+
isTargetTaken: V,
|
|
187
|
+
isTargetChecking: ae,
|
|
188
|
+
isRulesLoading: E,
|
|
189
|
+
hasRulesLoadError: O
|
|
149
190
|
};
|
|
150
|
-
},
|
|
191
|
+
}, Q = /* @__PURE__ */ function(e) {
|
|
151
192
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
152
|
-
}({}),
|
|
153
|
-
let [i, o] = a(
|
|
193
|
+
}({}), ge = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
|
|
194
|
+
let [i, o] = a(Q.Main), [s, c] = a();
|
|
154
195
|
return t(() => {
|
|
155
|
-
e && o(
|
|
196
|
+
e && o(Q.Main);
|
|
156
197
|
}, [e]), {
|
|
157
198
|
view: i,
|
|
158
199
|
pendingFolderPath: s,
|
|
159
200
|
setPendingFolderPath: c,
|
|
160
201
|
openFolderView: () => {
|
|
161
|
-
c(n), o(
|
|
202
|
+
c(n), o(Q.ChangeFolder);
|
|
162
203
|
},
|
|
163
|
-
backToMain: () => o(
|
|
204
|
+
backToMain: () => o(Q.Main),
|
|
164
205
|
selectFolder: () => {
|
|
165
|
-
s != null && r(s), o(
|
|
206
|
+
s != null && r(s), o(Q.Main);
|
|
166
207
|
}
|
|
167
208
|
};
|
|
168
|
-
},
|
|
209
|
+
}, _e = (e, t) => {
|
|
169
210
|
let n = t.trim().toLowerCase();
|
|
170
211
|
return n ? e.reduce((e, r) => {
|
|
171
|
-
let i = r.children ?
|
|
212
|
+
let i = r.children ? _e(r.children, t) : void 0;
|
|
172
213
|
return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
|
|
173
214
|
...r,
|
|
174
215
|
children: i
|
|
175
216
|
}), e;
|
|
176
217
|
}, []) : e;
|
|
177
|
-
},
|
|
218
|
+
}, ve = (e, t) => e.localeCompare(t, void 0, {
|
|
178
219
|
sensitivity: "base",
|
|
179
220
|
numeric: !0
|
|
180
|
-
}),
|
|
221
|
+
}), ye = (e) => [...e].sort((e, t) => ve(e.name, t.name)).map((e) => e.children ? {
|
|
181
222
|
...e,
|
|
182
|
-
children:
|
|
183
|
-
} : e),
|
|
223
|
+
children: ye(e.children)
|
|
224
|
+
} : e), be = (e, t, n) => {
|
|
184
225
|
let [r, ...i] = t;
|
|
185
226
|
if (r == null) return e;
|
|
186
227
|
let a = [...n, r], o = e.find((e) => e.name === r);
|
|
187
228
|
return o ? i.length ? e.map((e) => e === o ? {
|
|
188
229
|
...e,
|
|
189
|
-
children:
|
|
230
|
+
children: be(e.children ?? [], i, a)
|
|
190
231
|
} : e) : e : [...e, {
|
|
191
232
|
path: a,
|
|
192
233
|
name: r,
|
|
193
|
-
children: i.length ?
|
|
234
|
+
children: i.length ? be([], i, a) : void 0
|
|
194
235
|
}];
|
|
195
|
-
},
|
|
196
|
-
let t =
|
|
236
|
+
}, xe = (e, t) => t.reduce((e, t) => t.length ? be(e, t, []) : e, e), Se = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? Se(e.children) : []]), $ = (e) => e.join("/"), Ce = (e) => e.split("/").filter(Boolean), we = (e, t) => Ce(e).at(-1) ?? t, Te = (e) => e.map((e) => {
|
|
237
|
+
let t = $(e.path);
|
|
197
238
|
return {
|
|
198
239
|
path: t,
|
|
199
240
|
name: e.name,
|
|
200
241
|
folderId: t,
|
|
201
|
-
nodeType:
|
|
202
|
-
items: e.children ?
|
|
242
|
+
nodeType: p.FOLDER,
|
|
243
|
+
items: e.children ? Te(e.children) : void 0
|
|
203
244
|
};
|
|
204
|
-
}),
|
|
205
|
-
let
|
|
206
|
-
return
|
|
207
|
-
},
|
|
245
|
+
}), Ee = /[/\\:;,={}&"]/, De = (e, t, n, r) => {
|
|
246
|
+
let i = e.trim();
|
|
247
|
+
return i ? i.includes("..") || Ee.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
|
|
248
|
+
}, Oe = (e, t) => {
|
|
208
249
|
let n = new Set(t.map((e) => e.toLowerCase()));
|
|
209
250
|
if (!n.has(e.toLowerCase())) return e;
|
|
210
251
|
let r = 2;
|
|
211
252
|
for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
|
|
212
253
|
return `${e} ${r}`;
|
|
213
|
-
},
|
|
254
|
+
}, ke = (e, t) => {
|
|
214
255
|
if (t.length === 0) return e.map((e) => e.name);
|
|
215
|
-
let n =
|
|
256
|
+
let n = $(t), r = (e) => {
|
|
216
257
|
for (let t of e) {
|
|
217
|
-
if (
|
|
258
|
+
if ($(t.path) === n) return t;
|
|
218
259
|
let e = t.children ? r(t.children) : void 0;
|
|
219
260
|
if (e) return e;
|
|
220
261
|
}
|
|
221
262
|
};
|
|
222
263
|
return (r(e)?.children ?? []).map((e) => e.name);
|
|
223
|
-
},
|
|
264
|
+
}, Ae = {
|
|
224
265
|
sheet: "_sheet_1jbwn_3",
|
|
225
266
|
inline: "_inline_1jbwn_7",
|
|
226
267
|
selectField: "_selectField_1jbwn_21",
|
|
227
268
|
selectFieldOpen: "_selectFieldOpen_1jbwn_33"
|
|
228
|
-
},
|
|
269
|
+
}, je = 20, Me = 200, Ne = 8, Pe = (e) => {
|
|
229
270
|
let t = e.trim();
|
|
230
|
-
if (t.length === 0 || t.length >
|
|
271
|
+
if (t.length === 0 || t.length > Me) return !1;
|
|
231
272
|
try {
|
|
232
273
|
return new RegExp(t) instanceof RegExp;
|
|
233
274
|
} catch {
|
|
234
275
|
return !1;
|
|
235
276
|
}
|
|
236
|
-
},
|
|
237
|
-
let p =
|
|
238
|
-
...
|
|
277
|
+
}, Fe = ({ sourceOptions: e, onSave: o, onCancel: c, disabled: l = !1, maxTargets: u = je, labels: d = {}, styles: f = {} }) => {
|
|
278
|
+
let p = oe(), m = {
|
|
279
|
+
...B({
|
|
239
280
|
"--pare-mobile-bg": f.colors?.mobileBackground,
|
|
240
281
|
"--pare-bg": f.colors?.background,
|
|
241
282
|
"--pare-select-border": f.colors?.selectBorder,
|
|
@@ -244,296 +285,530 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
244
285
|
"--pare-select-border-focus": f.colors?.selectBorderFocus
|
|
245
286
|
}),
|
|
246
287
|
...f.cssVars
|
|
247
|
-
}, { sourceLabel: h = "Source", sourcePlaceholder:
|
|
288
|
+
}, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: w = "Add a target", targetsHintLabel: T = "Press Enter or comma to add a target.", patternLabel: E = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: A = "This field is required.", targetsRequiredError: j = "Add at least one target.", saveLabel: te = "Save", cancelLabel: M = "Cancel", dialogAriaLabel: ne = "Add access rule" } = d, P = n(), F = n(), I = n(), re = n(), L = i(null);
|
|
248
289
|
t(() => {
|
|
249
|
-
p ||
|
|
290
|
+
p || L.current?.focus();
|
|
250
291
|
}, [p]);
|
|
251
|
-
let [
|
|
292
|
+
let [R, ae] = a(), [W, ce] = a(), [le, G] = a([]), [ue, de] = a(""), [q, J] = a(!1), [Y, fe] = a(""), [X, pe] = a(!1), [Z, me] = a(!1), he = V(Ae.selectField, q && Ae.selectFieldOpen), Q = V(Ae.selectField, X && Ae.selectFieldOpen), ge = r(() => e.map((e) => ({
|
|
252
293
|
value: e,
|
|
253
294
|
label: e,
|
|
254
|
-
labelNode:
|
|
295
|
+
labelNode: Y.trim() ? /* @__PURE__ */ H(S, {
|
|
255
296
|
text: e,
|
|
256
|
-
query:
|
|
297
|
+
query: Y,
|
|
257
298
|
maxLines: 1
|
|
258
299
|
}) : void 0
|
|
259
|
-
})), [e,
|
|
300
|
+
})), [e, Y]), _e = r(() => [
|
|
260
301
|
{
|
|
261
|
-
value:
|
|
262
|
-
label:
|
|
302
|
+
value: K.Equal,
|
|
303
|
+
label: v
|
|
263
304
|
},
|
|
264
305
|
{
|
|
265
|
-
value:
|
|
266
|
-
label:
|
|
306
|
+
value: K.Contain,
|
|
307
|
+
label: y
|
|
267
308
|
},
|
|
268
309
|
{
|
|
269
|
-
value:
|
|
270
|
-
label:
|
|
310
|
+
value: K.Regex,
|
|
311
|
+
label: x
|
|
271
312
|
}
|
|
272
313
|
], [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
]), ve = W ===
|
|
277
|
-
|
|
278
|
-
},
|
|
314
|
+
v,
|
|
315
|
+
y,
|
|
316
|
+
x
|
|
317
|
+
]), ve = W === K.Regex, ye = Pe(ue), be = R != null && W != null && (ve ? ye : le.length > 0), xe = (e) => {
|
|
318
|
+
ae(Array.isArray(e) ? e[0] : e), J(!1);
|
|
319
|
+
}, Se = (e) => {
|
|
279
320
|
let t = Array.isArray(e) ? e[0] : e;
|
|
280
|
-
W ===
|
|
281
|
-
},
|
|
321
|
+
W === K.Regex != (t === K.Regex) && (G([]), de("")), ce(t), pe(!1);
|
|
322
|
+
}, $ = (e) => {
|
|
282
323
|
let t = [];
|
|
283
324
|
for (let n of e) {
|
|
284
325
|
let e = n.trim();
|
|
285
326
|
if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= u)) break;
|
|
286
327
|
}
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
!be ||
|
|
290
|
-
source:
|
|
328
|
+
G(t);
|
|
329
|
+
}, Ce = () => {
|
|
330
|
+
!be || R == null || W == null ? me(!0) : o({
|
|
331
|
+
source: R,
|
|
291
332
|
function: W,
|
|
292
|
-
targets: ve ? [
|
|
333
|
+
targets: ve ? [ue.trim()] : le
|
|
293
334
|
});
|
|
294
|
-
},
|
|
335
|
+
}, we = (ue.length > 0 || Z) && !ye, Te = (e) => {
|
|
295
336
|
e.key === "Escape" && (e.stopPropagation(), c());
|
|
296
|
-
},
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
id:
|
|
337
|
+
}, Ee = /* @__PURE__ */ U(se, { children: [
|
|
338
|
+
/* @__PURE__ */ H(N, {
|
|
339
|
+
id: F,
|
|
299
340
|
labelProps: { label: h },
|
|
300
341
|
options: ge,
|
|
301
|
-
value:
|
|
342
|
+
value: R,
|
|
302
343
|
onChange: xe,
|
|
303
|
-
placeholder:
|
|
304
|
-
searchable: e.length >
|
|
305
|
-
searchPlaceholder:
|
|
306
|
-
onSearchQueryChange:
|
|
344
|
+
placeholder: g,
|
|
345
|
+
searchable: e.length > Ne,
|
|
346
|
+
searchPlaceholder: g,
|
|
347
|
+
onSearchQueryChange: fe,
|
|
307
348
|
disabled: l,
|
|
308
349
|
open: q,
|
|
309
|
-
onOpenChange:
|
|
310
|
-
fieldClassName:
|
|
311
|
-
invalid: Z &&
|
|
312
|
-
error: Z &&
|
|
350
|
+
onOpenChange: J,
|
|
351
|
+
fieldClassName: he,
|
|
352
|
+
invalid: Z && R == null,
|
|
353
|
+
error: Z && R == null ? A : void 0
|
|
313
354
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
labelProps: { label:
|
|
316
|
-
id:
|
|
355
|
+
/* @__PURE__ */ H(N, {
|
|
356
|
+
labelProps: { label: _ },
|
|
357
|
+
id: I,
|
|
317
358
|
options: _e,
|
|
318
359
|
value: W,
|
|
319
|
-
onChange:
|
|
320
|
-
placeholder:
|
|
360
|
+
onChange: Se,
|
|
361
|
+
placeholder: _,
|
|
321
362
|
disabled: l,
|
|
322
|
-
open:
|
|
323
|
-
onOpenChange:
|
|
324
|
-
fieldClassName:
|
|
363
|
+
open: X,
|
|
364
|
+
onOpenChange: pe,
|
|
365
|
+
fieldClassName: Q,
|
|
325
366
|
invalid: Z && W == null,
|
|
326
|
-
error: Z && W == null ?
|
|
367
|
+
error: Z && W == null ? A : void 0
|
|
327
368
|
}),
|
|
328
|
-
ve ? /* @__PURE__ */
|
|
329
|
-
id:
|
|
330
|
-
labelProps: { label:
|
|
369
|
+
ve ? /* @__PURE__ */ H(ee, {
|
|
370
|
+
id: P,
|
|
371
|
+
labelProps: { label: E },
|
|
331
372
|
placeholder: O,
|
|
332
|
-
value:
|
|
373
|
+
value: ue,
|
|
333
374
|
onChange: (e) => de(e ?? ""),
|
|
334
|
-
error:
|
|
375
|
+
error: we ? k : void 0,
|
|
335
376
|
disabled: l
|
|
336
|
-
}) : /* @__PURE__ */
|
|
337
|
-
id:
|
|
338
|
-
labelProps: { label:
|
|
339
|
-
placeholder:
|
|
340
|
-
caption: Z &&
|
|
341
|
-
error: Z &&
|
|
342
|
-
invalid: Z &&
|
|
343
|
-
value:
|
|
344
|
-
onChange:
|
|
377
|
+
}) : /* @__PURE__ */ H(ie, {
|
|
378
|
+
id: re,
|
|
379
|
+
labelProps: { label: C },
|
|
380
|
+
placeholder: w,
|
|
381
|
+
caption: Z && le.length === 0 ? void 0 : T,
|
|
382
|
+
error: Z && le.length === 0 ? j : void 0,
|
|
383
|
+
invalid: Z && le.length === 0,
|
|
384
|
+
value: le,
|
|
385
|
+
onChange: $,
|
|
345
386
|
disabled: l,
|
|
346
|
-
tagClassName:
|
|
387
|
+
tagClassName: z
|
|
347
388
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ U("div", {
|
|
349
390
|
className: "mt-auto flex justify-end gap-2 desktop:mt-2",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
-
label:
|
|
391
|
+
children: [/* @__PURE__ */ H(b, {
|
|
392
|
+
label: M,
|
|
352
393
|
onClick: c,
|
|
353
394
|
disabled: l
|
|
354
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ H(D, {
|
|
355
396
|
label: te,
|
|
356
|
-
onClick:
|
|
397
|
+
onClick: Ce,
|
|
357
398
|
disabled: l
|
|
358
399
|
})]
|
|
359
400
|
})
|
|
360
401
|
] });
|
|
361
|
-
return p ? /* @__PURE__ */
|
|
402
|
+
return p ? /* @__PURE__ */ H(s, {
|
|
362
403
|
open: !0,
|
|
363
404
|
onClose: c,
|
|
364
|
-
ariaLabel:
|
|
405
|
+
ariaLabel: ne,
|
|
365
406
|
style: m,
|
|
366
|
-
className:
|
|
407
|
+
className: Ae.sheet,
|
|
367
408
|
bodyClassName: "flex flex-col gap-3 p-4",
|
|
368
|
-
children:
|
|
369
|
-
}) : /* @__PURE__ */
|
|
370
|
-
ref:
|
|
409
|
+
children: Ee
|
|
410
|
+
}) : /* @__PURE__ */ H("div", {
|
|
411
|
+
ref: L,
|
|
371
412
|
role: "group",
|
|
372
|
-
"aria-label":
|
|
413
|
+
"aria-label": ne,
|
|
373
414
|
tabIndex: -1,
|
|
374
|
-
onKeyDown:
|
|
415
|
+
onKeyDown: Te,
|
|
375
416
|
style: m,
|
|
376
|
-
className:
|
|
377
|
-
children:
|
|
417
|
+
className: V("flex flex-none flex-col gap-3 rounded-lg p-3", Ae.inline),
|
|
418
|
+
children: Ee
|
|
378
419
|
});
|
|
379
|
-
},
|
|
420
|
+
}, Ie = {
|
|
380
421
|
ruleRow: "_ruleRow_nx0en_1",
|
|
381
422
|
heading: "_heading_nx0en_5",
|
|
382
423
|
hint: "_hint_nx0en_9",
|
|
383
424
|
loading: "_loading_nx0en_13",
|
|
384
425
|
ruleText: "_ruleText_nx0en_17"
|
|
385
|
-
},
|
|
386
|
-
let
|
|
387
|
-
...
|
|
388
|
-
"--par-rule-bg":
|
|
389
|
-
"--par-heading-text":
|
|
390
|
-
"--par-hint-text":
|
|
391
|
-
"--par-loading-text":
|
|
392
|
-
"--par-rule-text":
|
|
426
|
+
}, Le = 20, Re = (e, t) => e === K.Equal ? t.equal : e === K.Contain ? t.contain : t.regex, ze = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: s, disabled: l = !1, isLoading: u = !1, hasLoadError: p = !1, maxRules: m = Le, maxTargetsPerRule: h, labels: g = {}, headingClassName: _ = "dial-body-semi-text", hintClassName: v = "dial-small-text", loadingClassName: y = "dial-small-text", ruleTextClassName: S = "dial-small-text", ruleSourceClassName: ee = "dial-small-semi-text", styles: C = {} }) => {
|
|
427
|
+
let E = {
|
|
428
|
+
...B({
|
|
429
|
+
"--par-rule-bg": C.colors?.ruleBackground,
|
|
430
|
+
"--par-heading-text": C.colors?.headingText,
|
|
431
|
+
"--par-hint-text": C.colors?.hintText,
|
|
432
|
+
"--par-loading-text": C.colors?.loadingText,
|
|
433
|
+
"--par-rule-text": C.colors?.ruleText
|
|
393
434
|
}),
|
|
394
|
-
...
|
|
395
|
-
}, { heading:
|
|
435
|
+
...C.cssVars
|
|
436
|
+
}, { heading: D = "Allow access if all match", folderScopeHint: j = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: te = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: M = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: N = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: ne = "Add rule", clearAllLabel: P = "Clear all", orSeparatorLabel: F = "Or", removeRuleAriaLabelTemplate: re = "Remove rule for {source}: {targets}", equalFunctionLabel: ie = "Equal", containFunctionLabel: L = "Contain", regexFunctionLabel: R = "Regex", loadingLabel: ae = "Loading existing rules…", loadErrorLabel: z = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: oe = "Rule added.", ruleRemovedAnnouncement: se = "Rule removed.", rulesClearedAnnouncement: W = "All rules cleared.", rulesLoadedAnnouncement: ce = "Existing rules loaded for the selected folder.", editorLabels: ue } = g, de = n(), [K, q] = a(!1), [J, Y] = a(""), fe = i(null), X = i(u);
|
|
396
437
|
t(() => {
|
|
397
|
-
|
|
438
|
+
X.current && !u && e.length > 0 && Y(ce), X.current = u;
|
|
398
439
|
}, [
|
|
399
|
-
|
|
440
|
+
u,
|
|
400
441
|
e,
|
|
401
|
-
|
|
442
|
+
ce
|
|
402
443
|
]);
|
|
403
|
-
let
|
|
404
|
-
|
|
444
|
+
let pe = () => {
|
|
445
|
+
fe.current = document.activeElement, q(!0);
|
|
405
446
|
}, Z = () => {
|
|
406
|
-
q(!1),
|
|
447
|
+
q(!1), fe.current?.focus?.();
|
|
407
448
|
}, me = (t) => {
|
|
408
|
-
r([...e, t]),
|
|
409
|
-
},
|
|
410
|
-
r(e.filter((e, n) => n !== t)),
|
|
411
|
-
},
|
|
412
|
-
r([]),
|
|
449
|
+
r([...e, t]), Y(oe), Z();
|
|
450
|
+
}, he = (t) => {
|
|
451
|
+
r(e.filter((e, n) => n !== t)), Y(se);
|
|
452
|
+
}, Q = () => {
|
|
453
|
+
r([]), Y(W);
|
|
413
454
|
}, ge = {
|
|
414
455
|
equal: ie,
|
|
415
|
-
contain:
|
|
416
|
-
regex:
|
|
417
|
-
}, _e = e.length >= m, ve = l || _e, ye =
|
|
418
|
-
return /* @__PURE__ */
|
|
456
|
+
contain: L,
|
|
457
|
+
regex: R
|
|
458
|
+
}, _e = e.length >= m, ve = l || _e, ye = s != null && s !== "";
|
|
459
|
+
return /* @__PURE__ */ U("div", {
|
|
419
460
|
role: "group",
|
|
420
|
-
"aria-labelledby":
|
|
421
|
-
style:
|
|
422
|
-
className:
|
|
461
|
+
"aria-labelledby": de,
|
|
462
|
+
style: E,
|
|
463
|
+
className: V(l && "pointer-events-none opacity-60"),
|
|
423
464
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ H(w, {
|
|
425
466
|
visuallyHidden: !0,
|
|
426
|
-
as:
|
|
427
|
-
children:
|
|
467
|
+
as: T.Span,
|
|
468
|
+
children: J
|
|
428
469
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ U("div", {
|
|
430
471
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
432
|
-
id:
|
|
433
|
-
className:
|
|
434
|
-
children:
|
|
435
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
436
|
-
variant:
|
|
437
|
-
label:
|
|
438
|
-
onClick:
|
|
472
|
+
children: [/* @__PURE__ */ H("div", {
|
|
473
|
+
id: de,
|
|
474
|
+
className: V(_, Ie.heading),
|
|
475
|
+
children: D
|
|
476
|
+
}), e.length > 0 && /* @__PURE__ */ H(b, {
|
|
477
|
+
variant: c.Primary,
|
|
478
|
+
label: P,
|
|
479
|
+
onClick: Q,
|
|
439
480
|
disabled: l
|
|
440
481
|
})]
|
|
441
482
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
className:
|
|
444
|
-
children: ye ? j.replace("{folder}",
|
|
483
|
+
/* @__PURE__ */ H("p", {
|
|
484
|
+
className: V("mb-2", v, Ie.hint),
|
|
485
|
+
children: ye ? j.replace("{folder}", s) : te
|
|
445
486
|
}),
|
|
446
|
-
e.length > 0 && !ye && /* @__PURE__ */
|
|
487
|
+
e.length > 0 && !ye && /* @__PURE__ */ H("div", {
|
|
447
488
|
className: "mb-2",
|
|
448
|
-
children: /* @__PURE__ */
|
|
449
|
-
type:
|
|
450
|
-
variant:
|
|
451
|
-
message:
|
|
489
|
+
children: /* @__PURE__ */ H(O, {
|
|
490
|
+
type: k.SectionMessage,
|
|
491
|
+
variant: A.Warning,
|
|
492
|
+
message: M
|
|
452
493
|
})
|
|
453
494
|
}),
|
|
454
|
-
|
|
455
|
-
className:
|
|
456
|
-
children: [/* @__PURE__ */
|
|
495
|
+
u && /* @__PURE__ */ U("div", {
|
|
496
|
+
className: V("mb-2 flex items-center gap-2", y, Ie.loading),
|
|
497
|
+
children: [/* @__PURE__ */ H(I, {
|
|
457
498
|
size: 16,
|
|
458
|
-
ariaLabel:
|
|
459
|
-
}), /* @__PURE__ */
|
|
499
|
+
ariaLabel: ae
|
|
500
|
+
}), /* @__PURE__ */ H("span", { children: ae })]
|
|
460
501
|
}),
|
|
461
|
-
p && /* @__PURE__ */
|
|
502
|
+
p && /* @__PURE__ */ H("div", {
|
|
462
503
|
className: "mb-2",
|
|
463
|
-
children: /* @__PURE__ */
|
|
464
|
-
type:
|
|
465
|
-
variant:
|
|
466
|
-
message:
|
|
504
|
+
children: /* @__PURE__ */ H(O, {
|
|
505
|
+
type: k.SectionMessage,
|
|
506
|
+
variant: A.Warning,
|
|
507
|
+
message: z
|
|
467
508
|
})
|
|
468
509
|
}),
|
|
469
|
-
e.length > 0 && /* @__PURE__ */
|
|
510
|
+
e.length > 0 && /* @__PURE__ */ H("ul", {
|
|
470
511
|
className: "mb-3 flex flex-col gap-2",
|
|
471
512
|
children: e.map((e, t) => {
|
|
472
|
-
let n = e.targets.join(` ${
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
className:
|
|
475
|
-
children: [/* @__PURE__ */
|
|
476
|
-
className:
|
|
513
|
+
let n = e.targets.join(` ${F} `), r = re.replace("{source}", e.source).replace("{targets}", n);
|
|
514
|
+
return /* @__PURE__ */ U("li", {
|
|
515
|
+
className: V("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Ie.ruleRow),
|
|
516
|
+
children: [/* @__PURE__ */ U("span", {
|
|
517
|
+
className: V("truncate", S, Ie.ruleText),
|
|
477
518
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
className:
|
|
519
|
+
/* @__PURE__ */ H("span", {
|
|
520
|
+
className: ee,
|
|
480
521
|
children: e.source
|
|
481
522
|
}),
|
|
482
523
|
" ",
|
|
483
|
-
|
|
524
|
+
Re(e.function, ge),
|
|
484
525
|
": ",
|
|
485
526
|
n
|
|
486
527
|
]
|
|
487
|
-
}), /* @__PURE__ */
|
|
488
|
-
icon: /* @__PURE__ */
|
|
489
|
-
size:
|
|
528
|
+
}), /* @__PURE__ */ H(x, {
|
|
529
|
+
icon: /* @__PURE__ */ H(G, {
|
|
530
|
+
size: d.SM,
|
|
490
531
|
"aria-hidden": !0,
|
|
491
|
-
stroke:
|
|
532
|
+
stroke: f
|
|
492
533
|
}),
|
|
493
534
|
"aria-label": r,
|
|
494
|
-
onClick: () =>
|
|
535
|
+
onClick: () => he(t),
|
|
495
536
|
disabled: l
|
|
496
537
|
})]
|
|
497
538
|
}, t);
|
|
498
539
|
})
|
|
499
540
|
}),
|
|
500
|
-
|
|
541
|
+
K && /* @__PURE__ */ H(Fe, {
|
|
501
542
|
sourceOptions: o,
|
|
502
543
|
onSave: me,
|
|
503
544
|
onCancel: Z,
|
|
504
545
|
disabled: l,
|
|
505
546
|
maxTargets: h,
|
|
506
547
|
labels: ue,
|
|
507
|
-
styles:
|
|
548
|
+
styles: C.editor
|
|
508
549
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ H("div", {
|
|
510
551
|
className: "flex flex-wrap items-center gap-2",
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
-
label:
|
|
513
|
-
iconBefore: /* @__PURE__ */
|
|
514
|
-
size:
|
|
552
|
+
children: /* @__PURE__ */ H(b, {
|
|
553
|
+
label: ne,
|
|
554
|
+
iconBefore: /* @__PURE__ */ H(le, {
|
|
555
|
+
size: d.SM,
|
|
515
556
|
"aria-hidden": !0,
|
|
516
|
-
stroke:
|
|
557
|
+
stroke: f
|
|
517
558
|
}),
|
|
518
|
-
onClick:
|
|
559
|
+
onClick: pe,
|
|
519
560
|
disabled: ve
|
|
520
561
|
})
|
|
521
562
|
}),
|
|
522
|
-
_e && /* @__PURE__ */
|
|
523
|
-
className:
|
|
524
|
-
children:
|
|
563
|
+
_e && /* @__PURE__ */ H("p", {
|
|
564
|
+
className: V("mt-2", v, Ie.hint),
|
|
565
|
+
children: N.replace("{max}", String(m))
|
|
525
566
|
})
|
|
526
567
|
]
|
|
527
568
|
});
|
|
528
|
-
},
|
|
569
|
+
}, Be = /* @__PURE__ */ function(e) {
|
|
570
|
+
return e.NotPublished = "not-published", e.InReview = "in-review", e.Published = "published", e.Unknown = "unknown", e;
|
|
571
|
+
}({}), Ve = {
|
|
572
|
+
skeletonColor: "var(--pp-vh-skeleton, var(--bg-control-disable-primary, #dce0e8))",
|
|
573
|
+
heading: "_heading_s0cgn_2",
|
|
574
|
+
version: "_version_s0cgn_6",
|
|
575
|
+
date: "_date_s0cgn_10",
|
|
576
|
+
meta: "_meta_s0cgn_15",
|
|
577
|
+
row: "_row_s0cgn_19"
|
|
578
|
+
}, He = {
|
|
579
|
+
heading: "Versions history",
|
|
580
|
+
inReviewLabel: "In review",
|
|
581
|
+
publishedLabel: "Published",
|
|
582
|
+
unknownLabel: "Status unavailable",
|
|
583
|
+
loadingLabel: "Loading publication statuses…",
|
|
584
|
+
emptyLabel: "No saved versions yet.",
|
|
585
|
+
errorLabel: "Could not load publication statuses.",
|
|
586
|
+
retryLabel: "Retry"
|
|
587
|
+
}, Ue = (e, t) => {
|
|
588
|
+
switch (e.status) {
|
|
589
|
+
case Be.InReview: return t.inReviewLabel;
|
|
590
|
+
case Be.Unknown: return t.unknownLabel;
|
|
591
|
+
case Be.Published: return t.publishedLabel;
|
|
592
|
+
default: return;
|
|
593
|
+
}
|
|
594
|
+
}, We = ({ rows: e, isLoading: r = !1, hasError: i = !1, onRetry: s, labels: c = {}, headingClassName: l = "dial-body-semi-text", versionClassName: u = "dial-small-semi-text", dateClassName: d = "dial-small-text", metaClassName: f = "dial-tiny-text", styles: p = {} }) => {
|
|
595
|
+
let m = n(), [v, b] = a(!1);
|
|
596
|
+
t(() => b(!0), []);
|
|
597
|
+
let x = {
|
|
598
|
+
...He,
|
|
599
|
+
...c
|
|
600
|
+
}, { colors: S } = p, ee = {
|
|
601
|
+
...B({
|
|
602
|
+
"--pp-vh-heading-text": S?.headingText,
|
|
603
|
+
"--pp-vh-version-text": S?.versionText,
|
|
604
|
+
"--pp-vh-date-text": S?.dateText,
|
|
605
|
+
"--pp-vh-skeleton": S?.skeleton,
|
|
606
|
+
"--pp-vh-meta-text": S?.metaText,
|
|
607
|
+
"--pp-vh-row-border": S?.rowBorder
|
|
608
|
+
}),
|
|
609
|
+
...p.cssVars
|
|
610
|
+
};
|
|
611
|
+
return /* @__PURE__ */ U("section", {
|
|
612
|
+
"aria-labelledby": m,
|
|
613
|
+
className: "flex flex-col gap-2",
|
|
614
|
+
style: ee,
|
|
615
|
+
children: [
|
|
616
|
+
/* @__PURE__ */ H("h2", {
|
|
617
|
+
id: m,
|
|
618
|
+
className: V(l, Ve.heading),
|
|
619
|
+
children: x.heading
|
|
620
|
+
}),
|
|
621
|
+
/* @__PURE__ */ H(w, {
|
|
622
|
+
visuallyHidden: !0,
|
|
623
|
+
politeness: E.Polite,
|
|
624
|
+
children: v && r && !i ? x.loadingLabel : ""
|
|
625
|
+
}),
|
|
626
|
+
/* @__PURE__ */ H(w, {
|
|
627
|
+
politeness: E.Assertive,
|
|
628
|
+
children: i && /* @__PURE__ */ U("div", {
|
|
629
|
+
className: "flex flex-wrap items-center gap-2",
|
|
630
|
+
children: [/* @__PURE__ */ H(_, { text: x.errorLabel }), s && /* @__PURE__ */ H(C, {
|
|
631
|
+
label: x.retryLabel,
|
|
632
|
+
size: h.Small,
|
|
633
|
+
onClick: s
|
|
634
|
+
})]
|
|
635
|
+
})
|
|
636
|
+
}),
|
|
637
|
+
e.length === 0 ? /* @__PURE__ */ H("p", {
|
|
638
|
+
className: V(f, Ve.meta),
|
|
639
|
+
children: x.emptyLabel
|
|
640
|
+
}) : /* @__PURE__ */ H("ul", { children: e.map((e) => {
|
|
641
|
+
let t = Ue(e, x), n = e.status == null && r && !i;
|
|
642
|
+
return /* @__PURE__ */ U("li", {
|
|
643
|
+
className: V("flex flex-col gap-1 py-2", Ve.row),
|
|
644
|
+
children: [/* @__PURE__ */ U("div", {
|
|
645
|
+
className: "flex min-h-6 min-w-0 items-center gap-2",
|
|
646
|
+
children: [
|
|
647
|
+
/* @__PURE__ */ H(g, {
|
|
648
|
+
text: e.version,
|
|
649
|
+
className: V("flex-initial!", u, Ve.version)
|
|
650
|
+
}),
|
|
651
|
+
t && /* @__PURE__ */ H(o, { label: t }),
|
|
652
|
+
n && /* @__PURE__ */ H("span", {
|
|
653
|
+
"aria-hidden": !0,
|
|
654
|
+
className: "shrink-0",
|
|
655
|
+
children: /* @__PURE__ */ H(P, {
|
|
656
|
+
variant: F.Text,
|
|
657
|
+
width: "84px",
|
|
658
|
+
height: "24px",
|
|
659
|
+
color: Ve.skeletonColor
|
|
660
|
+
})
|
|
661
|
+
}),
|
|
662
|
+
e.modifiedAt && /* @__PURE__ */ H("span", {
|
|
663
|
+
className: V("ms-auto shrink-0", d, Ve.date),
|
|
664
|
+
children: e.modifiedAt
|
|
665
|
+
})
|
|
666
|
+
]
|
|
667
|
+
}), (e.folder || e.author) && /* @__PURE__ */ U("div", {
|
|
668
|
+
className: "flex min-w-0 items-center justify-between gap-2",
|
|
669
|
+
children: [e.folder && /* @__PURE__ */ H(y, {
|
|
670
|
+
name: e.folder,
|
|
671
|
+
nameClassName: V(f, Ve.meta)
|
|
672
|
+
}), e.author && /* @__PURE__ */ H("span", {
|
|
673
|
+
className: V("ms-auto shrink-0", f, Ve.meta),
|
|
674
|
+
children: e.author
|
|
675
|
+
})]
|
|
676
|
+
})]
|
|
677
|
+
}, e.id);
|
|
678
|
+
}) })
|
|
679
|
+
]
|
|
680
|
+
});
|
|
681
|
+
}, Ge = {
|
|
682
|
+
panel: "dial-publish-panel-panel",
|
|
683
|
+
dependencies: "dial-publish-panel-dependencies",
|
|
684
|
+
dependenciesList: "dial-publish-panel-dependencies-list",
|
|
685
|
+
dependenciesItem: "dial-publish-panel-dependencies-item"
|
|
686
|
+
}, Ke = {
|
|
687
|
+
heading: "_heading_18b5e_1",
|
|
688
|
+
name: "_name_18b5e_5",
|
|
689
|
+
meta: "_meta_18b5e_9",
|
|
690
|
+
caption: "_caption_18b5e_13",
|
|
691
|
+
type: "_type_18b5e_17",
|
|
692
|
+
row: "_row_18b5e_21"
|
|
693
|
+
}, qe = {
|
|
694
|
+
[J.Application]: "Application",
|
|
695
|
+
[J.Toolset]: "Toolset",
|
|
696
|
+
[J.Prompt]: "Prompt",
|
|
697
|
+
[J.Skill]: "Skill",
|
|
698
|
+
[J.File]: "File"
|
|
699
|
+
}, Je = 32, Ye = 24, Xe = 40, Ze = 32, Qe = (e, t) => {
|
|
700
|
+
let n = t ? Xe : Je;
|
|
701
|
+
return /* @__PURE__ */ H("span", {
|
|
702
|
+
"aria-hidden": "true",
|
|
703
|
+
className: "shrink-0",
|
|
704
|
+
children: e.type === J.File ? /* @__PURE__ */ H("span", {
|
|
705
|
+
className: "flex items-center justify-center",
|
|
706
|
+
style: {
|
|
707
|
+
width: n,
|
|
708
|
+
height: n
|
|
709
|
+
},
|
|
710
|
+
children: /* @__PURE__ */ H(v, {
|
|
711
|
+
decorative: !0,
|
|
712
|
+
size: t ? Ze : Ye,
|
|
713
|
+
name: e.name,
|
|
714
|
+
type: e.isFolder ? m.Folder : m.File
|
|
715
|
+
})
|
|
716
|
+
}) : /* @__PURE__ */ H(R, {
|
|
717
|
+
size: n,
|
|
718
|
+
src: e.iconUrl,
|
|
719
|
+
initialsName: e.name,
|
|
720
|
+
styles: { badgeClassName: t ? "rounded-xl" : "rounded-lg" }
|
|
721
|
+
})
|
|
722
|
+
});
|
|
723
|
+
}, $e = "Private dependencies", et = "This item depends on personal private resources (listed below). After publishing, other users may not be able to use it fully, or may run into problems.", tt = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, nt = ({ dependencies: e, labels: t = {}, headingClassName: r = "dial-body-semi-text", nameClassName: i, metaClassName: a = "dial-small-text", captionClassName: o = "dial-tiny-text", typeClassName: s = "dial-tiny-lead-semi-text", styles: c = {} }) => {
|
|
724
|
+
let l = n(), { title: u = $e, description: d = et, appearance: f = Y.Warning, typeLabels: p = {}, getAnnouncement: m = tt } = t, h = f === Y.Published, g = i ?? (h ? "dial-body-semi-text" : "dial-small-semi-text"), { colors: _ } = c, v = {
|
|
725
|
+
...B({
|
|
726
|
+
"--pp-dependencies-heading-text": _?.headingText,
|
|
727
|
+
"--pp-dependencies-name-text": _?.nameText,
|
|
728
|
+
"--pp-dependencies-meta-text": _?.metaText,
|
|
729
|
+
"--pp-dependencies-caption-text": _?.captionText,
|
|
730
|
+
"--pp-dependencies-type-text": _?.typeText,
|
|
731
|
+
"--pp-dependencies-divider": _?.divider
|
|
732
|
+
}),
|
|
733
|
+
...c.cssVars
|
|
734
|
+
}, y = e.length;
|
|
735
|
+
return /* @__PURE__ */ U(se, { children: [/* @__PURE__ */ H(w, {
|
|
736
|
+
visuallyHidden: !0,
|
|
737
|
+
as: T.Span,
|
|
738
|
+
children: y > 0 ? m(y) : ""
|
|
739
|
+
}), y > 0 && /* @__PURE__ */ U("section", {
|
|
740
|
+
"aria-labelledby": l,
|
|
741
|
+
className: V("flex flex-col", h ? "gap-2" : "gap-3", Ge.dependencies),
|
|
742
|
+
style: v,
|
|
743
|
+
children: [
|
|
744
|
+
/* @__PURE__ */ H("h2", {
|
|
745
|
+
id: l,
|
|
746
|
+
className: V(r, Ke.heading),
|
|
747
|
+
children: u
|
|
748
|
+
}),
|
|
749
|
+
h ? /* @__PURE__ */ H("p", {
|
|
750
|
+
className: V(o, Ke.caption),
|
|
751
|
+
children: d
|
|
752
|
+
}) : /* @__PURE__ */ H(O, {
|
|
753
|
+
type: k.SectionMessage,
|
|
754
|
+
variant: A.Warning,
|
|
755
|
+
message: d,
|
|
756
|
+
role: "note"
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ H("ul", {
|
|
759
|
+
className: Ge.dependenciesList,
|
|
760
|
+
children: e.map(h ? (e) => {
|
|
761
|
+
let t = p[e.type] ?? qe[e.type];
|
|
762
|
+
return /* @__PURE__ */ U("li", {
|
|
763
|
+
className: V("flex items-center gap-3 py-3", Ke.row, Ge.dependenciesItem),
|
|
764
|
+
children: [Qe(e, !0), /* @__PURE__ */ U("div", {
|
|
765
|
+
className: "flex min-w-0 flex-col",
|
|
766
|
+
children: [/* @__PURE__ */ U("span", {
|
|
767
|
+
className: V("truncate", s, Ke.type),
|
|
768
|
+
children: [t, e.location && /* @__PURE__ */ H("span", {
|
|
769
|
+
className: V("ms-1 normal-case", a, Ke.meta),
|
|
770
|
+
children: `· ${e.location}`
|
|
771
|
+
})]
|
|
772
|
+
}), /* @__PURE__ */ U("span", {
|
|
773
|
+
className: V("truncate", g, Ke.name),
|
|
774
|
+
children: [e.name, e.version != null && /* @__PURE__ */ H("span", {
|
|
775
|
+
className: V("ms-2", a, Ke.meta),
|
|
776
|
+
children: e.version
|
|
777
|
+
})]
|
|
778
|
+
})]
|
|
779
|
+
})]
|
|
780
|
+
}, e.id);
|
|
781
|
+
} : (e) => {
|
|
782
|
+
let t = p[e.type] ?? qe[e.type];
|
|
783
|
+
return /* @__PURE__ */ U("li", {
|
|
784
|
+
className: V("flex items-center gap-3 py-2", Ge.dependenciesItem),
|
|
785
|
+
children: [Qe(e, !1), /* @__PURE__ */ U("div", {
|
|
786
|
+
className: "flex min-w-0 flex-col",
|
|
787
|
+
children: [/* @__PURE__ */ U("span", {
|
|
788
|
+
className: V("truncate", g, Ke.name),
|
|
789
|
+
children: [e.name, e.version != null && /* @__PURE__ */ H("span", {
|
|
790
|
+
className: V("ms-2", a, Ke.meta),
|
|
791
|
+
children: e.version
|
|
792
|
+
})]
|
|
793
|
+
}), /* @__PURE__ */ H("span", {
|
|
794
|
+
className: V("truncate", a, Ke.meta),
|
|
795
|
+
children: e.location ? `${t} · ${e.location}` : t
|
|
796
|
+
})]
|
|
797
|
+
})]
|
|
798
|
+
}, e.id);
|
|
799
|
+
})
|
|
800
|
+
})
|
|
801
|
+
]
|
|
802
|
+
})] });
|
|
803
|
+
}, rt = {
|
|
529
804
|
currentBadge: "_currentBadge_d0adf_1",
|
|
530
805
|
sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
|
|
531
806
|
version: "_version_d0adf_13",
|
|
532
807
|
date: "_date_d0adf_17",
|
|
533
808
|
emptyState: "_emptyState_d0adf_21",
|
|
534
809
|
stripedRow: "_stripedRow_d0adf_25"
|
|
535
|
-
},
|
|
536
|
-
let m =
|
|
810
|
+
}, it = ({ 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 }) => {
|
|
811
|
+
let m = B({
|
|
537
812
|
"--phl-badge-border": p?.currentBadgeBorder,
|
|
538
813
|
"--phl-badge-bg": p?.currentBadgeBackground,
|
|
539
814
|
"--phl-badge-text": p?.currentBadgeText,
|
|
@@ -544,491 +819,544 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
544
819
|
"--phl-date-text": p?.dateText,
|
|
545
820
|
"--phl-empty-text": p?.emptyStateText,
|
|
546
821
|
"--phl-striped-bg": p?.stripedBackground
|
|
547
|
-
}), h =
|
|
822
|
+
}), h = V(f, rt.emptyState);
|
|
548
823
|
if (n || r || e.length === 0) {
|
|
549
824
|
let e = s;
|
|
550
|
-
return n ? e = c : r && (e = l), /* @__PURE__ */
|
|
551
|
-
as:
|
|
825
|
+
return n ? e = c : r && (e = l), /* @__PURE__ */ H(w, {
|
|
826
|
+
as: T.P,
|
|
552
827
|
style: m,
|
|
553
828
|
className: h,
|
|
554
829
|
children: e
|
|
555
830
|
});
|
|
556
831
|
}
|
|
557
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ H("ul", {
|
|
558
833
|
style: m,
|
|
559
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
560
|
-
className:
|
|
561
|
-
children: [/* @__PURE__ */
|
|
834
|
+
children: e.map((e, n) => /* @__PURE__ */ U("li", {
|
|
835
|
+
className: V("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && rt.stripedRow),
|
|
836
|
+
children: [/* @__PURE__ */ U("span", {
|
|
562
837
|
className: "flex min-w-0 items-center gap-2",
|
|
563
838
|
style: m,
|
|
564
839
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
className:
|
|
840
|
+
/* @__PURE__ */ U("span", {
|
|
841
|
+
className: V(u, rt.version),
|
|
567
842
|
children: [
|
|
568
843
|
i,
|
|
569
844
|
" ",
|
|
570
845
|
e.version
|
|
571
846
|
]
|
|
572
847
|
}),
|
|
573
|
-
e.version === t && /* @__PURE__ */
|
|
848
|
+
e.version === t && /* @__PURE__ */ H(re, {
|
|
574
849
|
label: a,
|
|
575
|
-
className:
|
|
850
|
+
className: V("shrink-0 whitespace-nowrap", rt.currentBadge)
|
|
576
851
|
}),
|
|
577
|
-
e.publishCredentials === !0 && /* @__PURE__ */
|
|
852
|
+
e.publishCredentials === !0 && /* @__PURE__ */ H(re, {
|
|
578
853
|
label: o,
|
|
579
|
-
className:
|
|
854
|
+
className: V("shrink-0 whitespace-nowrap", rt.sharedCredentialsBadge)
|
|
580
855
|
})
|
|
581
856
|
]
|
|
582
|
-
}), /* @__PURE__ */
|
|
583
|
-
className:
|
|
584
|
-
children:
|
|
857
|
+
}), /* @__PURE__ */ H("span", {
|
|
858
|
+
className: V(d, rt.date),
|
|
859
|
+
children: pe(e.publishedAt)
|
|
585
860
|
})]
|
|
586
861
|
}, `${e.version}-${n}`))
|
|
587
862
|
});
|
|
588
|
-
},
|
|
589
|
-
let [t, ...n] = e, r =
|
|
863
|
+
}, at = ":", ot = (e) => `${at}${e}`, st = (e) => e?.startsWith(at) ? e.slice(1) : void 0, ct = (e) => [ot(e.rootKey), ...e.path], lt = (e) => {
|
|
864
|
+
let [t, ...n] = e, r = st(t);
|
|
590
865
|
return r == null ? void 0 : {
|
|
591
866
|
rootKey: r,
|
|
592
867
|
path: n
|
|
593
868
|
};
|
|
594
|
-
},
|
|
869
|
+
}, ut = (e, t) => e.map((e) => ({
|
|
595
870
|
...e,
|
|
596
871
|
path: [t, ...e.path],
|
|
597
|
-
children: e.children ?
|
|
598
|
-
})),
|
|
599
|
-
let t =
|
|
872
|
+
children: e.children ? ut(e.children, t) : void 0
|
|
873
|
+
})), dt = (e) => e.map((e) => {
|
|
874
|
+
let t = ot(e.key);
|
|
600
875
|
return {
|
|
601
876
|
path: [t],
|
|
602
877
|
name: e.label,
|
|
603
|
-
children:
|
|
878
|
+
children: ut(ye(e.items), t)
|
|
604
879
|
};
|
|
605
|
-
}),
|
|
880
|
+
}), ft = (e) => e.map((e) => ot(e.key)), pt = (e, t) => {
|
|
606
881
|
let n = /* @__PURE__ */ new Set();
|
|
607
882
|
for (let r of e) {
|
|
608
|
-
let e =
|
|
883
|
+
let e = ot(r.key);
|
|
609
884
|
for (let i of t(r) ?? []) n.add(i ? `${e}/${i}` : e);
|
|
610
885
|
}
|
|
611
886
|
return n;
|
|
612
|
-
},
|
|
887
|
+
}, mt = (e, t) => {
|
|
613
888
|
let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
|
|
614
889
|
for (let e of t) {
|
|
615
|
-
let [t, ...r] = e.split("/"), i =
|
|
616
|
-
i != null && r.length !== 0 && n.get(i)?.add(
|
|
890
|
+
let [t, ...r] = e.split("/"), i = st(t);
|
|
891
|
+
i != null && r.length !== 0 && n.get(i)?.add($(r));
|
|
617
892
|
}
|
|
618
893
|
return n;
|
|
619
|
-
},
|
|
894
|
+
}, ht = {
|
|
620
895
|
divider: "_divider_1gs31_1",
|
|
621
896
|
tree: "_tree_1gs31_17"
|
|
622
|
-
},
|
|
623
|
-
let
|
|
624
|
-
...
|
|
625
|
-
...
|
|
626
|
-
},
|
|
897
|
+
}, gt = "data-cancel-creating-folder", _t = "", vt = [], yt = ({ items: e = vt, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: y = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: C = "Folder name cannot be empty.", invalidFolderNameError: w = "Folder name contains invalid characters.", duplicateFolderNameError: T = "A folder with this name already exists.", sameAsParentFolderNameError: E = "A folder cannot have the same name as its parent folder.", rootLabel: D = "Organization", expandedPaths: O, onExpandedPathsChange: k, loadingPaths: A, styles: j = {} }) => {
|
|
898
|
+
let te = {
|
|
899
|
+
...B({ "--pft-divider": j.colors?.divider }),
|
|
900
|
+
...j.cssVars
|
|
901
|
+
}, M = c != null, N = r(() => c ? dt(c) : e, [c, e]), ne = i(N);
|
|
627
902
|
t(() => {
|
|
628
|
-
|
|
629
|
-
}, [
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
let
|
|
633
|
-
|
|
634
|
-
}, [
|
|
903
|
+
ne.current = N;
|
|
904
|
+
}, [N]);
|
|
905
|
+
let P = r(() => c ? ft(c) : [_t], [c]), F = n;
|
|
906
|
+
M && (F = l ? ct(l) : void 0);
|
|
907
|
+
let I = (e) => {
|
|
908
|
+
M ? u?.(e ? lt(e) : void 0) : o?.(e);
|
|
909
|
+
}, [re, ie] = a(() => new Set(F?.map((e, t) => $(F.slice(0, t + 1))) ?? [])), L = r(() => c ? /* @__PURE__ */ new Set([...re, ...pt(c, (e) => e.expandedPaths)]) : void 0, [c, re]) ?? O ?? re, R = r(() => c ? pt(c, (e) => e.loadingPaths) : A, [c, A]), ae = (e) => {
|
|
635
910
|
let t = new Set(e);
|
|
636
|
-
for (let e of
|
|
911
|
+
for (let e of P) t.delete(e);
|
|
637
912
|
if (c) {
|
|
638
|
-
|
|
639
|
-
let e =
|
|
913
|
+
ie(t);
|
|
914
|
+
let e = mt(c, t);
|
|
640
915
|
for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
|
|
641
|
-
} else
|
|
642
|
-
}, [
|
|
916
|
+
} else k ? k(t) : ie(t);
|
|
917
|
+
}, [z, oe] = a(null), [se, W] = a(S), G = i(null), K = i(!1);
|
|
643
918
|
t(() => {
|
|
644
919
|
let e = (e) => {
|
|
645
|
-
e.target instanceof Element && e.target.closest(`[${
|
|
920
|
+
e.target instanceof Element && e.target.closest(`[${gt}]`) && (K.current = !0);
|
|
646
921
|
};
|
|
647
922
|
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
648
923
|
}, []);
|
|
649
|
-
let
|
|
650
|
-
let e =
|
|
651
|
-
return
|
|
924
|
+
let q = m.trim(), J = z != null, Y = r(() => _e(N, m), [N, m]), fe = q.length > 0 && Y.length === 0, X = !J && q.length > 0, pe = r(() => {
|
|
925
|
+
let e = X ? Y : N;
|
|
926
|
+
return M ? e : ye(e);
|
|
652
927
|
}, [
|
|
928
|
+
X,
|
|
653
929
|
Y,
|
|
654
|
-
q,
|
|
655
|
-
M,
|
|
656
|
-
j
|
|
657
|
-
]), Z = r(() => /* @__PURE__ */ new Set([...N, ...me(X)]), [N, X]), ge = r(() => /* @__PURE__ */ new Set([...N, ...Y ? Z : re]), [
|
|
658
930
|
N,
|
|
659
|
-
|
|
931
|
+
M
|
|
932
|
+
]), Z = r(() => /* @__PURE__ */ new Set([...P, ...Se(pe)]), [P, pe]), me = r(() => /* @__PURE__ */ new Set([...P, ...X ? Z : L]), [
|
|
933
|
+
P,
|
|
934
|
+
X,
|
|
660
935
|
Z,
|
|
661
|
-
|
|
662
|
-
]),
|
|
663
|
-
path:
|
|
664
|
-
name:
|
|
665
|
-
folderId:
|
|
666
|
-
nodeType:
|
|
667
|
-
items:
|
|
936
|
+
L
|
|
937
|
+
]), he = r(() => Te(pe), [pe]), Q = r(() => X && he.length === 0 ? [] : M ? he : [{
|
|
938
|
+
path: _t,
|
|
939
|
+
name: D,
|
|
940
|
+
folderId: _t,
|
|
941
|
+
nodeType: ue.FOLDER,
|
|
942
|
+
items: he
|
|
668
943
|
}], [
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
]),
|
|
674
|
-
empty:
|
|
675
|
-
invalid:
|
|
676
|
-
duplicate:
|
|
677
|
-
|
|
944
|
+
he,
|
|
945
|
+
D,
|
|
946
|
+
X,
|
|
947
|
+
M
|
|
948
|
+
]), ge = z ? $(z) : null, ve = {
|
|
949
|
+
empty: C,
|
|
950
|
+
invalid: w,
|
|
951
|
+
duplicate: T,
|
|
952
|
+
sameAsParent: E
|
|
953
|
+
}, be = (e) => P.includes($(e)) ? void 0 : e.at(-1), xe = (e) => c ? lt(e) : {
|
|
954
|
+
rootKey: _t,
|
|
955
|
+
path: e
|
|
956
|
+
}, we = (e) => {
|
|
957
|
+
if (!h) return;
|
|
958
|
+
let t = xe(Ce(e.path));
|
|
959
|
+
return t && h(t) || void 0;
|
|
960
|
+
}, Ee = (e) => {
|
|
961
|
+
let t = xe(e);
|
|
962
|
+
return t != null && !!h?.(t);
|
|
963
|
+
}, Ae = (e) => {
|
|
964
|
+
if (Ee(e)) return !1;
|
|
678
965
|
if (!c) return !0;
|
|
679
|
-
let t =
|
|
966
|
+
let t = lt(e), n = c.find((e) => e.key === t?.rootKey);
|
|
680
967
|
return n != null && n.canCreateFolders !== !1;
|
|
681
|
-
},
|
|
682
|
-
if (!c)
|
|
683
|
-
|
|
968
|
+
}, je = (() => {
|
|
969
|
+
if (!c) {
|
|
970
|
+
let e = F ?? [];
|
|
971
|
+
return Ae(e) ? e : void 0;
|
|
972
|
+
}
|
|
973
|
+
if (F && Ae(F)) return F;
|
|
684
974
|
let e = c.find((e) => e.canCreateFolders !== !1);
|
|
685
|
-
return e ?
|
|
975
|
+
return e ? ct({
|
|
686
976
|
rootKey: e.key,
|
|
687
977
|
path: []
|
|
688
978
|
}) : void 0;
|
|
689
|
-
})(),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
979
|
+
})(), Me = (e) => {
|
|
980
|
+
let t = fe && De(q, [], ve) == null, n = be(e);
|
|
981
|
+
return Oe(t ? q : S, [...ke(N, e), ...n ? [n] : []]);
|
|
982
|
+
}, [Ne, Pe] = a(null);
|
|
983
|
+
Ne != null && !R?.has($(Ne)) && (Pe(null), oe(Ne), W(Me(Ne)));
|
|
984
|
+
let Fe = (e) => {
|
|
985
|
+
oe(null), Pe(e), G.current = null, K.current = !1;
|
|
986
|
+
let t = $(e);
|
|
987
|
+
t && ae(new Set(L).add(t));
|
|
988
|
+
}, Ie = () => {
|
|
989
|
+
je && Fe(je);
|
|
990
|
+
}, Le = (e) => {
|
|
991
|
+
let t = Ce(e.path);
|
|
992
|
+
if (!Ae(t)) return [];
|
|
700
993
|
let n = [{
|
|
701
994
|
key: "add-child",
|
|
702
|
-
label:
|
|
703
|
-
icon: /* @__PURE__ */
|
|
704
|
-
size:
|
|
995
|
+
label: x,
|
|
996
|
+
icon: /* @__PURE__ */ H(ce, {
|
|
997
|
+
size: d.SM,
|
|
705
998
|
"aria-hidden": !0,
|
|
706
|
-
stroke:
|
|
999
|
+
stroke: f
|
|
707
1000
|
}),
|
|
708
|
-
onClick: () =>
|
|
1001
|
+
onClick: () => Fe(t)
|
|
709
1002
|
}];
|
|
710
|
-
return
|
|
1003
|
+
return P.includes(e.path) || n.push({
|
|
711
1004
|
key: "add-sibling",
|
|
712
|
-
label:
|
|
713
|
-
icon: /* @__PURE__ */
|
|
714
|
-
size:
|
|
1005
|
+
label: y,
|
|
1006
|
+
icon: /* @__PURE__ */ H(le, {
|
|
1007
|
+
size: d.SM,
|
|
715
1008
|
"aria-hidden": !0,
|
|
716
|
-
stroke:
|
|
1009
|
+
stroke: f
|
|
717
1010
|
}),
|
|
718
|
-
onClick: () =>
|
|
1011
|
+
onClick: () => Fe(t.slice(0, -1))
|
|
719
1012
|
}), n;
|
|
720
|
-
},
|
|
721
|
-
if (!
|
|
722
|
-
let t =
|
|
1013
|
+
}, Re = (e) => {
|
|
1014
|
+
if (!z) return null;
|
|
1015
|
+
let t = De(e, ke(ne.current, z), ve, be(z));
|
|
723
1016
|
return G.current = t, t;
|
|
724
|
-
},
|
|
725
|
-
if (!
|
|
1017
|
+
}, ze = (e) => {
|
|
1018
|
+
if (!z || K.current) return;
|
|
726
1019
|
let t = e.trim(), n = G.current;
|
|
727
|
-
if (!(
|
|
728
|
-
let e = c ?
|
|
729
|
-
e ? p?.(e.rootKey, e.path, t) : s?.(
|
|
1020
|
+
if (!(Re(e) ?? n)) {
|
|
1021
|
+
let e = c ? lt(z) : void 0;
|
|
1022
|
+
e ? p?.(e.rootKey, e.path, t) : s?.(z, t), I([...z, t]);
|
|
730
1023
|
}
|
|
731
|
-
|
|
732
|
-
},
|
|
733
|
-
return /* @__PURE__ */
|
|
734
|
-
style:
|
|
735
|
-
className:
|
|
1024
|
+
oe(null);
|
|
1025
|
+
}, Be = () => oe(null);
|
|
1026
|
+
return /* @__PURE__ */ U("div", {
|
|
1027
|
+
style: te,
|
|
1028
|
+
className: V(g && "pointer-events-none opacity-60", j.className),
|
|
736
1029
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
className:
|
|
739
|
-
children: /* @__PURE__ */
|
|
740
|
-
items:
|
|
1030
|
+
/* @__PURE__ */ H("div", {
|
|
1031
|
+
className: V("w-full max-w-full min-w-0", ht.tree),
|
|
1032
|
+
children: /* @__PURE__ */ H(de, {
|
|
1033
|
+
items: Q,
|
|
741
1034
|
showFiles: !1,
|
|
742
|
-
selectedPath:
|
|
743
|
-
expandedPaths:
|
|
744
|
-
onExpandedPathsChange:
|
|
745
|
-
loadingPaths:
|
|
1035
|
+
selectedPath: F == null ? void 0 : $(F),
|
|
1036
|
+
expandedPaths: me,
|
|
1037
|
+
onExpandedPathsChange: ae,
|
|
1038
|
+
loadingPaths: R,
|
|
746
1039
|
onItemClick: (e) => {
|
|
747
|
-
|
|
748
|
-
|
|
1040
|
+
if (g || we(e)) return;
|
|
1041
|
+
let t = F != null && $(F) === e.path;
|
|
1042
|
+
I(t ? void 0 : Ce(e.path));
|
|
749
1043
|
},
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1044
|
+
getDisabledTooltip: h ? we : void 0,
|
|
1045
|
+
getContextMenuItems: Le,
|
|
1046
|
+
createdFolderPath: ge,
|
|
1047
|
+
newFolderDefaultName: se,
|
|
1048
|
+
onCreateFolderSave: ze,
|
|
1049
|
+
onCreateFolderCancel: Be,
|
|
1050
|
+
onRenameValidate: (e) => Re(e),
|
|
1051
|
+
searchQuery: X ? q : void 0,
|
|
1052
|
+
emptyStateTitle: X ? ee.replace("{query}", q) : void 0
|
|
758
1053
|
})
|
|
759
1054
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
className:
|
|
1055
|
+
/* @__PURE__ */ H("div", {
|
|
1056
|
+
className: V("my-2 h-px", ht.divider),
|
|
762
1057
|
"aria-hidden": !0
|
|
763
1058
|
}),
|
|
764
|
-
/* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ U("div", {
|
|
765
1060
|
className: "mb-4 flex flex-wrap items-center gap-2",
|
|
766
|
-
children: [/* @__PURE__ */
|
|
767
|
-
onClick:
|
|
1061
|
+
children: [/* @__PURE__ */ H(b, {
|
|
1062
|
+
onClick: Ie,
|
|
768
1063
|
label: _,
|
|
769
|
-
iconBefore: /* @__PURE__ */
|
|
770
|
-
size:
|
|
1064
|
+
iconBefore: /* @__PURE__ */ H(le, {
|
|
1065
|
+
size: d.SM,
|
|
771
1066
|
"aria-hidden": !0,
|
|
772
|
-
stroke:
|
|
1067
|
+
stroke: f
|
|
773
1068
|
}),
|
|
774
|
-
disabled:
|
|
775
|
-
}),
|
|
1069
|
+
disabled: g || J || !je
|
|
1070
|
+
}), J && /* @__PURE__ */ H(b, {
|
|
776
1071
|
label: v,
|
|
777
|
-
onClick:
|
|
778
|
-
disabled:
|
|
779
|
-
[
|
|
1072
|
+
onClick: Be,
|
|
1073
|
+
disabled: g,
|
|
1074
|
+
[gt]: ""
|
|
780
1075
|
})]
|
|
781
1076
|
})
|
|
782
1077
|
]
|
|
783
1078
|
});
|
|
784
|
-
},
|
|
1079
|
+
}, bt = {
|
|
785
1080
|
summaryTitle: "_summaryTitle_zj3gd_1",
|
|
786
1081
|
sectionHeading: "_sectionHeading_zj3gd_5",
|
|
787
1082
|
destination: "_destination_zj3gd_9"
|
|
788
|
-
},
|
|
789
|
-
let { colors:
|
|
790
|
-
...
|
|
791
|
-
"--pp-summary-title-text":
|
|
792
|
-
"--pp-heading-text":
|
|
793
|
-
"--pp-destination-text":
|
|
1083
|
+
}, xt = 200, St = [], Ct = [], wt = ({ view: e = Q.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, getDisabledReason: S, expandedPaths: C, onExpandedPathsChange: w, loadingPaths: T, hasExistingPublicationInFolder: E, hasWriteAccess: D, isSubmitting: j, hasSubmitError: te = !1, isTargetTaken: N = !1, isTargetChecking: ne = !1, allowReplace: P = !0, author: F = "", onAuthorChange: I, publishCredentials: re = !1, onPublishCredentialsChange: ie, rules: L = St, onRulesChange: R, ruleSourceOptions: z = Ct, isRulesLoading: oe = !1, hasRulesLoadError: se = !1, labels: ce = {}, summaryTitleClassName: le = "dial-body-semi-text", headingClassName: G = "dial-body-semi-text", destinationClassName: ue = "dial-small-semi-text", calloutFolderNameClassName: de = "dial-small-paragraph-semi-text", styles: K = {} }) => {
|
|
1084
|
+
let { colors: J, folderTree: Y, accessRules: X, dependencies: pe } = K, Z = {
|
|
1085
|
+
...B({
|
|
1086
|
+
"--pp-summary-title-text": J?.summaryTitleText,
|
|
1087
|
+
"--pp-heading-text": J?.headingText,
|
|
1088
|
+
"--pp-destination-text": J?.destinationText
|
|
794
1089
|
}),
|
|
795
|
-
...
|
|
796
|
-
},
|
|
797
|
-
border:
|
|
798
|
-
background:
|
|
799
|
-
}, { folderLabel:
|
|
800
|
-
|
|
801
|
-
},
|
|
1090
|
+
...K.cssVars
|
|
1091
|
+
}, me = {
|
|
1092
|
+
border: J?.summaryBorder,
|
|
1093
|
+
background: J?.summaryBackground
|
|
1094
|
+
}, { folderLabel: he = "Publish to folder", destinationAriaLabel: ge = "Destination folder", noFolderSelectedLabel: _e = "No folder selected", changeFolderLabel: ve = "Change", chooseFolderLabel: ye = "Choose", replaceWarning: be = "Version {version} is already published in {folder}. Publishing will replace it.", targetTakenLabel: xe = "A resource with this name already exists in {folder}. Rename it or choose another folder.", targetTakenVersionedLabel: Se = "Version {version} of a resource with this name already exists in {folder}. Rename it, change its version or choose another folder.", noAccessError: $ = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: Ce = "Publishing failed. Please try again.", adminApprovalTitle: we = "Admin approval required", adminApprovalMessage: Te = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Ee, addSiblingFolderLabel: De, addChildFolderLabel: Oe, cancelCreatingFolderLabel: ke, createFolderEmptyNameError: Ae, createFolderInvalidNameError: je, createFolderDuplicateNameError: Me, createFolderSameAsParentNameError: Ne, rootFolderLabel: Pe = "Organization", accessRulesLabels: Fe, dependenciesLabels: Ie, searchPlaceholder: Le, clearSearchAriaLabel: Re, authorLabel: Be = "Author", authorPlaceholder: Ve = "Author name", authorHint: He = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Ue = "Publish with my credentials", credentialsHint: Ke = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ce, [qe, Je] = a(""), Ye = n(), Xe = i(null), Ze = i(null), Qe = (e) => {
|
|
1095
|
+
Je(e ?? "");
|
|
1096
|
+
}, $e = i(e);
|
|
802
1097
|
t(() => {
|
|
803
|
-
|
|
1098
|
+
$e.current !== e && ($e.current = e, e === Q.ChangeFolder ? Ze.current?.focus({ preventScroll: !0 }) : Xe.current?.focus({ preventScroll: !0 }));
|
|
804
1099
|
}, [e]);
|
|
805
|
-
let
|
|
806
|
-
hasSelectedFolder:
|
|
807
|
-
hasExistingPublicationInFolder:
|
|
808
|
-
hasWriteAccess:
|
|
809
|
-
isSubmitting:
|
|
810
|
-
hasSubmitError:
|
|
811
|
-
|
|
1100
|
+
let et = g != null, tt = r(() => fe({
|
|
1101
|
+
hasSelectedFolder: et,
|
|
1102
|
+
hasExistingPublicationInFolder: E,
|
|
1103
|
+
hasWriteAccess: D,
|
|
1104
|
+
isSubmitting: j,
|
|
1105
|
+
hasSubmitError: te,
|
|
1106
|
+
isTargetTaken: N,
|
|
1107
|
+
isTargetChecking: ne,
|
|
1108
|
+
allowReplace: P
|
|
812
1109
|
}), [
|
|
813
|
-
|
|
814
|
-
C,
|
|
1110
|
+
et,
|
|
815
1111
|
E,
|
|
816
1112
|
D,
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
1113
|
+
j,
|
|
1114
|
+
te,
|
|
1115
|
+
N,
|
|
1116
|
+
ne,
|
|
1117
|
+
P
|
|
1118
|
+
]), rt = et ? g[g.length - 1] ?? Pe : "", it = c ? c() : /* @__PURE__ */ H("span", {
|
|
1119
|
+
className: V("truncate", le, bt.summaryTitle),
|
|
821
1120
|
children: s?.title
|
|
822
1121
|
});
|
|
823
|
-
if (e ===
|
|
824
|
-
ref:
|
|
1122
|
+
if (e === Q.ChangeFolder) return /* @__PURE__ */ U("div", {
|
|
1123
|
+
ref: Ze,
|
|
825
1124
|
tabIndex: -1,
|
|
826
1125
|
role: "group",
|
|
827
|
-
"aria-label":
|
|
828
|
-
className:
|
|
829
|
-
style:
|
|
830
|
-
children: [/* @__PURE__ */
|
|
1126
|
+
"aria-label": he,
|
|
1127
|
+
className: V("flex flex-col gap-3 outline-none", Ge.panel),
|
|
1128
|
+
style: Z,
|
|
1129
|
+
children: [/* @__PURE__ */ H("div", {
|
|
831
1130
|
role: "search",
|
|
832
|
-
children: /* @__PURE__ */
|
|
833
|
-
value:
|
|
834
|
-
onChange:
|
|
835
|
-
placeholder:
|
|
836
|
-
clearLabel:
|
|
837
|
-
"aria-label":
|
|
1131
|
+
children: /* @__PURE__ */ H(M, {
|
|
1132
|
+
value: qe,
|
|
1133
|
+
onChange: Qe,
|
|
1134
|
+
placeholder: Le,
|
|
1135
|
+
clearLabel: Re,
|
|
1136
|
+
"aria-label": Le
|
|
838
1137
|
})
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
-
items:
|
|
1138
|
+
}), /* @__PURE__ */ H(yt, {
|
|
1139
|
+
items: m,
|
|
841
1140
|
selectedPath: _,
|
|
842
1141
|
onSelectedPathChange: v,
|
|
843
|
-
onCreateFolder:
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
1142
|
+
onCreateFolder: x,
|
|
1143
|
+
getDisabledReason: S,
|
|
1144
|
+
expandedPaths: C,
|
|
1145
|
+
onExpandedPathsChange: w,
|
|
1146
|
+
loadingPaths: T,
|
|
1147
|
+
searchQuery: qe,
|
|
1148
|
+
disabled: j,
|
|
1149
|
+
noResultsLabel: Ee,
|
|
1150
|
+
addSiblingFolderLabel: De,
|
|
1151
|
+
addChildFolderLabel: Oe,
|
|
1152
|
+
cancelCreatingFolderLabel: ke,
|
|
1153
|
+
emptyFolderNameError: Ae,
|
|
1154
|
+
invalidFolderNameError: je,
|
|
1155
|
+
duplicateFolderNameError: Me,
|
|
1156
|
+
sameAsParentFolderNameError: Ne,
|
|
1157
|
+
rootLabel: Pe,
|
|
1158
|
+
styles: Y
|
|
858
1159
|
})]
|
|
859
1160
|
});
|
|
860
|
-
let
|
|
861
|
-
return /* @__PURE__ */
|
|
862
|
-
className:
|
|
863
|
-
style:
|
|
864
|
-
children: [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
/* @__PURE__ */ z("h2", {
|
|
878
|
-
className: L("mb-2", ce, Ye.sectionHeading),
|
|
879
|
-
children: J
|
|
1161
|
+
let at = V(ue, bt.destination);
|
|
1162
|
+
return /* @__PURE__ */ U("div", {
|
|
1163
|
+
className: V("flex flex-col gap-5", Ge.panel),
|
|
1164
|
+
style: Z,
|
|
1165
|
+
children: [
|
|
1166
|
+
s?.type == null ? /* @__PURE__ */ H(ae, {
|
|
1167
|
+
colors: me,
|
|
1168
|
+
children: it
|
|
1169
|
+
}) : /* @__PURE__ */ H(ae, {
|
|
1170
|
+
item: {
|
|
1171
|
+
type: s.type,
|
|
1172
|
+
name: s.title,
|
|
1173
|
+
version: s.version ?? "",
|
|
1174
|
+
iconUrl: s.iconUrl
|
|
1175
|
+
},
|
|
1176
|
+
hasVersionTag: !1,
|
|
1177
|
+
colors: me
|
|
880
1178
|
}),
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
className:
|
|
892
|
-
children:
|
|
1179
|
+
/* @__PURE__ */ U("section", { children: [
|
|
1180
|
+
/* @__PURE__ */ H("h2", {
|
|
1181
|
+
className: V("mb-2", G, bt.sectionHeading),
|
|
1182
|
+
children: he
|
|
1183
|
+
}),
|
|
1184
|
+
/* @__PURE__ */ U("div", {
|
|
1185
|
+
className: "flex min-w-0 items-center gap-2",
|
|
1186
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1187
|
+
role: "group",
|
|
1188
|
+
"aria-label": ge,
|
|
1189
|
+
className: "min-w-0 flex-1",
|
|
1190
|
+
children: et ? /* @__PURE__ */ H(y, {
|
|
1191
|
+
name: [Pe, ...g].join(" / "),
|
|
1192
|
+
nameClassName: at
|
|
1193
|
+
}) : /* @__PURE__ */ H("span", {
|
|
1194
|
+
className: V("block truncate", at),
|
|
1195
|
+
children: _e
|
|
1196
|
+
})
|
|
1197
|
+
}), /* @__PURE__ */ H(b, {
|
|
1198
|
+
ref: Xe,
|
|
1199
|
+
size: h.Small,
|
|
1200
|
+
label: et ? ve : ye,
|
|
1201
|
+
iconBefore: /* @__PURE__ */ H(W, {
|
|
1202
|
+
size: d.SM,
|
|
1203
|
+
stroke: f,
|
|
1204
|
+
"aria-hidden": !0
|
|
1205
|
+
}),
|
|
1206
|
+
disabled: j,
|
|
1207
|
+
onClick: o
|
|
1208
|
+
})]
|
|
1209
|
+
}),
|
|
1210
|
+
tt.calloutKind === q.Info && /* @__PURE__ */ H("div", {
|
|
1211
|
+
className: "my-4",
|
|
1212
|
+
children: /* @__PURE__ */ H(O, {
|
|
1213
|
+
type: k.SectionMessage,
|
|
1214
|
+
variant: A.Info,
|
|
1215
|
+
title: we,
|
|
1216
|
+
message: Te
|
|
893
1217
|
})
|
|
894
|
-
}),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1218
|
+
}),
|
|
1219
|
+
tt.calloutKind !== q.None && tt.calloutKind !== q.Info && /* @__PURE__ */ H("div", {
|
|
1220
|
+
className: "mt-3",
|
|
1221
|
+
children: /* @__PURE__ */ H(O, {
|
|
1222
|
+
type: k.SectionMessage,
|
|
1223
|
+
variant: Tt(tt.calloutKind),
|
|
1224
|
+
message: Dt(tt.calloutKind, {
|
|
1225
|
+
replaceWarning: be,
|
|
1226
|
+
targetTaken: s?.version ? Se : xe,
|
|
1227
|
+
noAccessError: $,
|
|
1228
|
+
submitError: Ce,
|
|
1229
|
+
folderName: rt,
|
|
1230
|
+
version: s?.version,
|
|
1231
|
+
folderNameClassName: de
|
|
1232
|
+
})
|
|
1233
|
+
})
|
|
1234
|
+
}),
|
|
1235
|
+
I != null && /* @__PURE__ */ H("div", {
|
|
1236
|
+
className: "mt-4",
|
|
1237
|
+
children: /* @__PURE__ */ H(ee, {
|
|
1238
|
+
id: Ye,
|
|
1239
|
+
labelProps: { label: Be },
|
|
1240
|
+
placeholder: Ve,
|
|
1241
|
+
caption: He,
|
|
1242
|
+
value: F,
|
|
1243
|
+
onChange: (e) => I(e ?? ""),
|
|
1244
|
+
maxLength: xt,
|
|
1245
|
+
disabled: j
|
|
1246
|
+
})
|
|
1247
|
+
}),
|
|
1248
|
+
ie != null && /* @__PURE__ */ H("div", {
|
|
1249
|
+
className: "mt-4",
|
|
1250
|
+
children: /* @__PURE__ */ H(l, {
|
|
1251
|
+
labelProps: { label: Ue },
|
|
1252
|
+
caption: Ke,
|
|
1253
|
+
isSelected: re,
|
|
1254
|
+
onChange: ie,
|
|
1255
|
+
disabled: j
|
|
1256
|
+
})
|
|
1257
|
+
}),
|
|
1258
|
+
R != null && /* @__PURE__ */ H("div", {
|
|
1259
|
+
className: "mt-4",
|
|
1260
|
+
children: /* @__PURE__ */ H(ze, {
|
|
1261
|
+
rules: L,
|
|
1262
|
+
onRulesChange: R,
|
|
1263
|
+
sourceOptions: z,
|
|
1264
|
+
folderName: et ? rt : void 0,
|
|
1265
|
+
disabled: j,
|
|
1266
|
+
isLoading: oe,
|
|
1267
|
+
hasLoadError: se,
|
|
1268
|
+
labels: Fe,
|
|
1269
|
+
styles: X
|
|
919
1270
|
})
|
|
920
1271
|
})
|
|
1272
|
+
] }),
|
|
1273
|
+
u != null && /* @__PURE__ */ H(nt, {
|
|
1274
|
+
dependencies: u,
|
|
1275
|
+
labels: Ie,
|
|
1276
|
+
headingClassName: G,
|
|
1277
|
+
styles: pe
|
|
921
1278
|
}),
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
id: Pe,
|
|
926
|
-
labelProps: { label: De },
|
|
927
|
-
placeholder: $,
|
|
928
|
-
caption: Oe,
|
|
929
|
-
value: j,
|
|
930
|
-
onChange: (e) => M(e ?? ""),
|
|
931
|
-
maxLength: Xe,
|
|
932
|
-
disabled: D
|
|
933
|
-
})
|
|
934
|
-
}),
|
|
935
|
-
N != null && /* @__PURE__ */ z("div", {
|
|
936
|
-
className: "mt-4",
|
|
937
|
-
children: /* @__PURE__ */ z(c, {
|
|
938
|
-
labelProps: { label: ke },
|
|
939
|
-
caption: je,
|
|
940
|
-
isSelected: te,
|
|
941
|
-
onChange: N,
|
|
942
|
-
disabled: D
|
|
943
|
-
})
|
|
944
|
-
}),
|
|
945
|
-
/* @__PURE__ */ z("div", {
|
|
946
|
-
className: "mt-4",
|
|
947
|
-
children: /* @__PURE__ */ z(Ae, {
|
|
948
|
-
rules: P,
|
|
949
|
-
onRulesChange: I,
|
|
950
|
-
sourceOptions: R,
|
|
951
|
-
folderName: ze ? Ve : void 0,
|
|
952
|
-
disabled: D,
|
|
953
|
-
isLoading: re,
|
|
954
|
-
hasLoadError: ae,
|
|
955
|
-
labels: we,
|
|
956
|
-
styles: K
|
|
957
|
-
})
|
|
1279
|
+
p != null && /* @__PURE__ */ H(We, {
|
|
1280
|
+
headingClassName: G,
|
|
1281
|
+
...p
|
|
958
1282
|
})
|
|
959
|
-
]
|
|
1283
|
+
]
|
|
960
1284
|
});
|
|
961
|
-
},
|
|
1285
|
+
}, Tt = (e) => e === q.ReplaceWarning || e === q.TargetTaken ? A.Warning : A.Error, Et = (e, t, n) => {
|
|
962
1286
|
let [r, i, ...a] = e.split("{folder}");
|
|
963
|
-
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */
|
|
1287
|
+
return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ U(se, { children: [
|
|
964
1288
|
r,
|
|
965
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ H("strong", {
|
|
966
1290
|
className: n,
|
|
967
1291
|
children: t
|
|
968
1292
|
}),
|
|
969
1293
|
i
|
|
970
1294
|
] });
|
|
971
|
-
},
|
|
972
|
-
let p =
|
|
973
|
-
return /* @__PURE__ */
|
|
1295
|
+
}, Dt = (e, t) => e === q.ReplaceWarning ? Et(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === q.TargetTaken ? Et(t.targetTaken.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === q.NoAccess ? Et(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Ot = { footer: "_footer_dks1v_1" }, kt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = Q.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: u = {}, colors: f }) => {
|
|
1296
|
+
let p = B({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: v = "Select" } = u, y = s === Q.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
|
|
1297
|
+
return /* @__PURE__ */ U("div", {
|
|
974
1298
|
style: p,
|
|
975
|
-
className:
|
|
976
|
-
children: [/* @__PURE__ */
|
|
1299
|
+
className: V("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Ot.footer),
|
|
1300
|
+
children: [/* @__PURE__ */ H(b, {
|
|
977
1301
|
label: m,
|
|
978
1302
|
className: "mobile:flex-1",
|
|
979
1303
|
disabled: i,
|
|
980
1304
|
onClick: a
|
|
981
|
-
}), y ? /* @__PURE__ */
|
|
982
|
-
label:
|
|
1305
|
+
}), y ? /* @__PURE__ */ H(D, {
|
|
1306
|
+
label: v,
|
|
983
1307
|
className: "mobile:flex-1",
|
|
984
1308
|
disabled: l,
|
|
985
1309
|
onClick: c
|
|
986
|
-
}) : /* @__PURE__ */
|
|
987
|
-
label:
|
|
1310
|
+
}) : /* @__PURE__ */ H(j, {
|
|
1311
|
+
label: x,
|
|
988
1312
|
className: "mobile:flex-1",
|
|
989
1313
|
disabled: r,
|
|
990
|
-
iconBefore: i ? /* @__PURE__ */
|
|
1314
|
+
iconBefore: i ? /* @__PURE__ */ H("span", {
|
|
991
1315
|
"aria-hidden": !0,
|
|
992
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ H(I, { size: d.SM })
|
|
993
1317
|
}) : void 0,
|
|
994
1318
|
onClick: o
|
|
995
1319
|
})]
|
|
996
1320
|
});
|
|
997
|
-
},
|
|
1321
|
+
}, At = {
|
|
998
1322
|
backdrop: "_backdrop_16jmd_6",
|
|
999
1323
|
panel: "_panel_16jmd_10",
|
|
1000
1324
|
divider: "_divider_16jmd_15",
|
|
1001
1325
|
content: "_content_16jmd_19",
|
|
1002
1326
|
title: "_title_16jmd_24"
|
|
1003
|
-
},
|
|
1004
|
-
let
|
|
1005
|
-
"--spp-backdrop-bg":
|
|
1006
|
-
"--spp-panel-bg":
|
|
1007
|
-
"--spp-panel-border":
|
|
1008
|
-
"--spp-divider-border":
|
|
1009
|
-
"--spp-scrollbar-thumb":
|
|
1010
|
-
"--spp-title-text":
|
|
1011
|
-
}), [
|
|
1327
|
+
}, jt = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, isTargetTaken: b = !1, isTargetChecking: x = !1, allowReplace: S = !0, author: ee, onAuthorChange: C, rules: w, onRulesChange: T, ruleSourceOptions: E, isRulesLoading: D = !1, hasRulesLoadError: O = !1, onClose: k, returnFocusRef: A, onSubmit: j, panelLabels: te, panelStyles: M, panelSummaryTitleClassName: N, panelHeadingClassName: P, panelCalloutFolderNameClassName: F, footerLabels: I, labels: re = {}, titleClassName: ie = "dial-body-semi-text", colors: L }) => {
|
|
1328
|
+
let R = B({
|
|
1329
|
+
"--spp-backdrop-bg": L?.backdropBackground,
|
|
1330
|
+
"--spp-panel-bg": L?.panelBackground,
|
|
1331
|
+
"--spp-panel-border": L?.panelBorder,
|
|
1332
|
+
"--spp-divider-border": L?.dividerBorder,
|
|
1333
|
+
"--spp-scrollbar-thumb": L?.scrollbarThumb,
|
|
1334
|
+
"--spp-title-text": L?.titleText
|
|
1335
|
+
}), [ae, z] = a(null), { title: oe = "Publish", changeFolderTitle: se = "Change folder", backAriaLabel: W = "Back", ariaLabel: ce = "Publish", closeAriaLabel: le = "Close" } = re, G = ge({
|
|
1012
1336
|
isOpen: e,
|
|
1013
|
-
selectedFolderPath:
|
|
1014
|
-
onSelectedFolderPathChange:
|
|
1015
|
-
}),
|
|
1016
|
-
hasSelectedFolder:
|
|
1017
|
-
hasExistingPublicationInFolder:
|
|
1018
|
-
hasWriteAccess:
|
|
1019
|
-
isSubmitting:
|
|
1020
|
-
hasSubmitError:
|
|
1021
|
-
|
|
1337
|
+
selectedFolderPath: l,
|
|
1338
|
+
onSelectedFolderPathChange: u
|
|
1339
|
+
}), ue = G.view === Q.ChangeFolder, de = r(() => fe({
|
|
1340
|
+
hasSelectedFolder: l != null,
|
|
1341
|
+
hasExistingPublicationInFolder: g,
|
|
1342
|
+
hasWriteAccess: _,
|
|
1343
|
+
isSubmitting: v,
|
|
1344
|
+
hasSubmitError: y,
|
|
1345
|
+
isTargetTaken: b,
|
|
1346
|
+
isTargetChecking: x,
|
|
1347
|
+
allowReplace: S
|
|
1022
1348
|
}), [
|
|
1023
|
-
|
|
1024
|
-
p,
|
|
1025
|
-
m,
|
|
1026
|
-
h,
|
|
1349
|
+
l,
|
|
1027
1350
|
g,
|
|
1028
|
-
_
|
|
1351
|
+
_,
|
|
1352
|
+
v,
|
|
1353
|
+
y,
|
|
1354
|
+
b,
|
|
1355
|
+
x,
|
|
1356
|
+
S
|
|
1029
1357
|
]);
|
|
1030
1358
|
return t(() => {
|
|
1031
|
-
let t =
|
|
1359
|
+
let t = ae?.closest("[role=\"dialog\"]");
|
|
1032
1360
|
if (!e || !t) return;
|
|
1033
1361
|
let n = () => t.focus({ preventScroll: !0 });
|
|
1034
1362
|
n();
|
|
@@ -1038,224 +1366,231 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1038
1366
|
document.addEventListener("focusin", r);
|
|
1039
1367
|
let i = requestAnimationFrame(() => {
|
|
1040
1368
|
document.removeEventListener("focusin", r);
|
|
1041
|
-
}), a =
|
|
1369
|
+
}), a = A?.current;
|
|
1042
1370
|
return () => {
|
|
1043
1371
|
cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
|
|
1044
1372
|
};
|
|
1045
1373
|
}, [
|
|
1046
1374
|
e,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
]), /* @__PURE__ */
|
|
1375
|
+
ae,
|
|
1376
|
+
A
|
|
1377
|
+
]), /* @__PURE__ */ U(ne, {
|
|
1050
1378
|
open: e,
|
|
1051
|
-
onClose:
|
|
1052
|
-
header: /* @__PURE__ */
|
|
1053
|
-
className:
|
|
1054
|
-
children:
|
|
1379
|
+
onClose: k,
|
|
1380
|
+
header: /* @__PURE__ */ H("span", {
|
|
1381
|
+
className: V("block truncate text-center", ie, At.title),
|
|
1382
|
+
children: ue ? se : oe
|
|
1055
1383
|
}),
|
|
1056
|
-
ariaLabel:
|
|
1057
|
-
onBack:
|
|
1058
|
-
backAriaLabel:
|
|
1059
|
-
backDisabled:
|
|
1060
|
-
closeAriaLabel:
|
|
1061
|
-
closeDisabled:
|
|
1062
|
-
style:
|
|
1063
|
-
overlayStyle:
|
|
1064
|
-
className:
|
|
1065
|
-
overlayClassName:
|
|
1066
|
-
headerClassName:
|
|
1384
|
+
ariaLabel: ce,
|
|
1385
|
+
onBack: ue ? G.backToMain : void 0,
|
|
1386
|
+
backAriaLabel: W,
|
|
1387
|
+
backDisabled: v,
|
|
1388
|
+
closeAriaLabel: le,
|
|
1389
|
+
closeDisabled: v,
|
|
1390
|
+
style: R,
|
|
1391
|
+
overlayStyle: R,
|
|
1392
|
+
className: V(At.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1393
|
+
overlayClassName: At.backdrop,
|
|
1394
|
+
headerClassName: V("px-[22px]", At.divider),
|
|
1067
1395
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1069
|
-
ref:
|
|
1070
|
-
className:
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1396
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1397
|
+
ref: z,
|
|
1398
|
+
className: V("min-h-0 flex-1 overflow-y-auto", At.content),
|
|
1399
|
+
children: /* @__PURE__ */ H("div", {
|
|
1072
1400
|
className: "p-[22px]",
|
|
1073
|
-
children: /* @__PURE__ */
|
|
1401
|
+
children: /* @__PURE__ */ H(wt, {
|
|
1074
1402
|
resource: n,
|
|
1075
1403
|
renderSummary: i,
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1404
|
+
dependencies: o,
|
|
1405
|
+
versionHistory: s,
|
|
1406
|
+
view: G.view,
|
|
1407
|
+
onChangeFolderClick: G.openFolderView,
|
|
1408
|
+
folderItems: c,
|
|
1409
|
+
selectedFolderPath: l,
|
|
1410
|
+
pendingFolderPath: G.pendingFolderPath,
|
|
1411
|
+
onPendingFolderPathChange: G.setPendingFolderPath,
|
|
1412
|
+
onCreateFolder: d,
|
|
1413
|
+
getDisabledReason: f,
|
|
1414
|
+
expandedPaths: p,
|
|
1415
|
+
onExpandedPathsChange: m,
|
|
1416
|
+
loadingPaths: h,
|
|
1417
|
+
hasExistingPublicationInFolder: g,
|
|
1418
|
+
hasWriteAccess: _,
|
|
1419
|
+
isSubmitting: v,
|
|
1420
|
+
hasSubmitError: y,
|
|
1421
|
+
isTargetTaken: b,
|
|
1422
|
+
isTargetChecking: x,
|
|
1423
|
+
allowReplace: S,
|
|
1424
|
+
author: ee,
|
|
1425
|
+
onAuthorChange: C,
|
|
1426
|
+
rules: w,
|
|
1427
|
+
onRulesChange: T,
|
|
1428
|
+
ruleSourceOptions: E,
|
|
1429
|
+
isRulesLoading: D,
|
|
1430
|
+
hasRulesLoadError: O,
|
|
1431
|
+
labels: te,
|
|
1432
|
+
styles: M,
|
|
1433
|
+
summaryTitleClassName: N,
|
|
1434
|
+
headingClassName: P,
|
|
1435
|
+
calloutFolderNameClassName: F
|
|
1103
1436
|
})
|
|
1104
1437
|
})
|
|
1105
|
-
}), /* @__PURE__ */
|
|
1438
|
+
}), /* @__PURE__ */ H(kt, {
|
|
1106
1439
|
version: n?.version,
|
|
1107
|
-
hasExistingPublicationInFolder:
|
|
1108
|
-
allowReplace:
|
|
1109
|
-
isSubmitDisabled:
|
|
1110
|
-
isSubmitLoading:
|
|
1111
|
-
onCancel:
|
|
1112
|
-
onSubmit:
|
|
1113
|
-
view:
|
|
1114
|
-
onSelectFolder:
|
|
1115
|
-
isSelectFolderDisabled:
|
|
1116
|
-
labels:
|
|
1440
|
+
hasExistingPublicationInFolder: g,
|
|
1441
|
+
allowReplace: S,
|
|
1442
|
+
isSubmitDisabled: de.isSubmitDisabled,
|
|
1443
|
+
isSubmitLoading: de.isSubmitLoading,
|
|
1444
|
+
onCancel: ue ? G.backToMain : k,
|
|
1445
|
+
onSubmit: j,
|
|
1446
|
+
view: G.view,
|
|
1447
|
+
onSelectFolder: G.selectFolder,
|
|
1448
|
+
isSelectFolderDisabled: G.pendingFolderPath == null,
|
|
1449
|
+
labels: I
|
|
1117
1450
|
})]
|
|
1118
1451
|
});
|
|
1119
|
-
},
|
|
1120
|
-
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v =
|
|
1121
|
-
return /* @__PURE__ */
|
|
1452
|
+
}, Mt = { option: "_option_skygm_1" }, Nt = (e, t) => `Unpublish "${e}" from "${t}"?`, Pt = (e) => `Choose which folder to unpublish "${e}" from.`, Ft = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: l, onClose: d }) => {
|
|
1453
|
+
let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = Nt, selectFolderMessage: y = Pt } = o ?? {}, b = n.length > 1;
|
|
1454
|
+
return /* @__PURE__ */ H(L, {
|
|
1122
1455
|
open: e,
|
|
1123
1456
|
title: f,
|
|
1124
1457
|
confirmLabel: p,
|
|
1125
1458
|
cancelLabel: m,
|
|
1126
|
-
variant:
|
|
1459
|
+
variant: u.Danger,
|
|
1127
1460
|
isLoading: a,
|
|
1128
|
-
isConfirmDisabled:
|
|
1461
|
+
isConfirmDisabled: b && r == null,
|
|
1129
1462
|
loadingStatusLabel: _,
|
|
1130
|
-
message: /* @__PURE__ */
|
|
1463
|
+
message: /* @__PURE__ */ H("span", {
|
|
1131
1464
|
className: "wrap-break-word",
|
|
1132
|
-
children:
|
|
1465
|
+
children: b ? y(t) : v(t, we(n[0] ?? "", h))
|
|
1133
1466
|
}),
|
|
1134
|
-
onConfirm:
|
|
1467
|
+
onConfirm: l,
|
|
1135
1468
|
onClose: d,
|
|
1136
|
-
children:
|
|
1469
|
+
children: b && /* @__PURE__ */ H("div", {
|
|
1137
1470
|
className: "mt-3",
|
|
1138
|
-
style:
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1471
|
+
style: B({ "--ucd-option-text": c?.optionText }),
|
|
1472
|
+
children: /* @__PURE__ */ H(te, {
|
|
1140
1473
|
ariaLabel: g,
|
|
1141
1474
|
value: r ?? void 0,
|
|
1142
1475
|
onChange: i,
|
|
1143
1476
|
disabled: a,
|
|
1144
1477
|
items: n.map((e) => ({
|
|
1145
1478
|
value: e,
|
|
1146
|
-
label:
|
|
1479
|
+
label: we(e, h)
|
|
1147
1480
|
})),
|
|
1148
|
-
radioClassName:
|
|
1481
|
+
radioClassName: V(s, Mt.option)
|
|
1149
1482
|
})
|
|
1150
1483
|
})
|
|
1151
1484
|
});
|
|
1152
|
-
},
|
|
1485
|
+
}, It = /* @__PURE__ */ function(e) {
|
|
1153
1486
|
return e.Keep = "keep", e.New = "new", e;
|
|
1154
|
-
}({}),
|
|
1487
|
+
}({}), Lt = /* @__PURE__ */ function(e) {
|
|
1155
1488
|
return e.Main = "main", e.ChangeFolder = "change-folder", e;
|
|
1156
|
-
}({}),
|
|
1489
|
+
}({}), Rt = {
|
|
1157
1490
|
heading: "_heading_vk731_1",
|
|
1158
1491
|
destination: "_destination_vk731_5"
|
|
1159
|
-
},
|
|
1160
|
-
let { saveToFolderHeading:
|
|
1161
|
-
...
|
|
1162
|
-
"--stf-heading-text":
|
|
1163
|
-
"--stf-destination-text":
|
|
1492
|
+
}, zt = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: l, changeFolderButtonRef: u, pendingDestination: p, onPendingDestinationChange: m, version: g, accessRules: v, versionHistory: x, isSubmitting: S = !1, submitError: T, foldersError: D, onRetryFolders: O, panelLabels: k = {}, panelStyles: A = {}, headingClassName: j = "dial-body-semi-text", destinationClassName: N = "dial-small-semi-text" }) => {
|
|
1493
|
+
let { saveToFolderHeading: ne = "Save to folder", changeFolderLabel: P = "Change", destinationAriaLabel: F = "Destination folder", versionHeading: I = "Version", keepVersionLabel: re = "Keep version {version}", saveAsNewVersionLabel: ie = "Save as new version", newVersionLabel: L = "Version", newVersionPlaceholder: R = "Enter new version", searchPlaceholder: z = "Search folders", clearSearchAriaLabel: oe = "Clear search", folderEmptyStateLabel: se, createFolderLabel: ce, cancelCreatingFolderLabel: le, addSiblingFolderLabel: G, addChildFolderLabel: ue, createFolderEmptyNameError: de, createFolderInvalidNameError: K, createFolderDuplicateNameError: q, createFolderSameAsParentNameError: J, retryLabel: Y = "Retry" } = k, { colors: fe, folderTree: X } = A, pe = {
|
|
1494
|
+
...B({
|
|
1495
|
+
"--stf-heading-text": fe?.headingText,
|
|
1496
|
+
"--stf-destination-text": fe?.destinationText
|
|
1164
1497
|
}),
|
|
1165
1498
|
...A.cssVars
|
|
1166
|
-
},
|
|
1167
|
-
border:
|
|
1168
|
-
background:
|
|
1169
|
-
}, [
|
|
1170
|
-
if (e ===
|
|
1499
|
+
}, Z = {
|
|
1500
|
+
border: fe?.summaryBorder,
|
|
1501
|
+
background: fe?.summaryBackground
|
|
1502
|
+
}, [me, he] = a(""), Q = n(), ge = n(), _e = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), ve = i.find((e) => e.key === p?.rootKey), ye = p ? p.path[p.path.length - 1] ?? ve?.label : void 0, be = V(j, Rt.heading), xe = c?.(o);
|
|
1503
|
+
if (e === Lt.ChangeFolder) return /* @__PURE__ */ U("div", {
|
|
1171
1504
|
className: "flex flex-col gap-3",
|
|
1172
|
-
style:
|
|
1505
|
+
style: pe,
|
|
1173
1506
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ H("div", {
|
|
1175
1508
|
role: "search",
|
|
1176
|
-
children: /* @__PURE__ */
|
|
1177
|
-
value:
|
|
1178
|
-
onChange: (e) =>
|
|
1179
|
-
placeholder:
|
|
1180
|
-
clearLabel:
|
|
1181
|
-
"aria-label":
|
|
1509
|
+
children: /* @__PURE__ */ H(M, {
|
|
1510
|
+
value: me,
|
|
1511
|
+
onChange: (e) => he(e ?? ""),
|
|
1512
|
+
placeholder: z,
|
|
1513
|
+
clearLabel: oe,
|
|
1514
|
+
"aria-label": z
|
|
1182
1515
|
})
|
|
1183
1516
|
}),
|
|
1184
|
-
/* @__PURE__ */
|
|
1185
|
-
politeness:
|
|
1186
|
-
children:
|
|
1517
|
+
/* @__PURE__ */ H(w, {
|
|
1518
|
+
politeness: E.Assertive,
|
|
1519
|
+
children: D && /* @__PURE__ */ U("div", {
|
|
1187
1520
|
className: "flex flex-wrap items-center gap-2",
|
|
1188
|
-
children: [/* @__PURE__ */
|
|
1189
|
-
label:
|
|
1190
|
-
onClick:
|
|
1521
|
+
children: [/* @__PURE__ */ H(_, { text: D }), O && /* @__PURE__ */ H(C, {
|
|
1522
|
+
label: Y,
|
|
1523
|
+
onClick: O
|
|
1191
1524
|
})]
|
|
1192
1525
|
})
|
|
1193
1526
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ H(yt, {
|
|
1195
1528
|
roots: i,
|
|
1196
|
-
destination:
|
|
1197
|
-
onDestinationChange:
|
|
1529
|
+
destination: p,
|
|
1530
|
+
onDestinationChange: m,
|
|
1198
1531
|
onCreateDestinationFolder: s,
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1532
|
+
getDisabledReason: c,
|
|
1533
|
+
searchQuery: me,
|
|
1534
|
+
disabled: S,
|
|
1535
|
+
noResultsLabel: se,
|
|
1536
|
+
createFolderLabel: ce,
|
|
1537
|
+
cancelCreatingFolderLabel: le,
|
|
1538
|
+
addSiblingFolderLabel: G,
|
|
1539
|
+
addChildFolderLabel: ue,
|
|
1540
|
+
emptyFolderNameError: de,
|
|
1541
|
+
invalidFolderNameError: K,
|
|
1542
|
+
duplicateFolderNameError: q,
|
|
1543
|
+
sameAsParentFolderNameError: J,
|
|
1544
|
+
styles: X
|
|
1210
1545
|
}),
|
|
1211
|
-
|
|
1546
|
+
v && ve?.hasAccessRules && !(p && v.isHiddenFor?.(p)) && /* @__PURE__ */ H("div", {
|
|
1212
1547
|
className: "mt-1",
|
|
1213
|
-
children: /* @__PURE__ */
|
|
1214
|
-
rules:
|
|
1215
|
-
onRulesChange:
|
|
1216
|
-
sourceOptions:
|
|
1217
|
-
folderName:
|
|
1218
|
-
disabled:
|
|
1219
|
-
isLoading:
|
|
1220
|
-
hasLoadError:
|
|
1221
|
-
labels:
|
|
1222
|
-
styles:
|
|
1548
|
+
children: /* @__PURE__ */ H(ze, {
|
|
1549
|
+
rules: v.rules,
|
|
1550
|
+
onRulesChange: v.onRulesChange,
|
|
1551
|
+
sourceOptions: v.sourceOptions,
|
|
1552
|
+
folderName: ye,
|
|
1553
|
+
disabled: S,
|
|
1554
|
+
isLoading: v.isLoading,
|
|
1555
|
+
hasLoadError: v.hasLoadError,
|
|
1556
|
+
labels: v.labels,
|
|
1557
|
+
styles: v.styles
|
|
1223
1558
|
})
|
|
1224
1559
|
})
|
|
1225
1560
|
]
|
|
1226
1561
|
});
|
|
1227
|
-
let
|
|
1228
|
-
value:
|
|
1229
|
-
label:
|
|
1562
|
+
let Se = g ? [{
|
|
1563
|
+
value: It.Keep,
|
|
1564
|
+
label: re.replace("{version}", g.currentVersion)
|
|
1230
1565
|
}, {
|
|
1231
|
-
value:
|
|
1232
|
-
label:
|
|
1233
|
-
content: /* @__PURE__ */
|
|
1234
|
-
id:
|
|
1235
|
-
value:
|
|
1236
|
-
onChange: (e) =>
|
|
1237
|
-
onBlur:
|
|
1566
|
+
value: It.New,
|
|
1567
|
+
label: ie,
|
|
1568
|
+
content: /* @__PURE__ */ H(ee, {
|
|
1569
|
+
id: Q,
|
|
1570
|
+
value: g.newVersion,
|
|
1571
|
+
onChange: (e) => g.onNewVersionChange(e ?? ""),
|
|
1572
|
+
onBlur: g.onNewVersionBlur,
|
|
1238
1573
|
labelProps: {
|
|
1239
|
-
label:
|
|
1574
|
+
label: L,
|
|
1240
1575
|
required: !0
|
|
1241
1576
|
},
|
|
1242
|
-
placeholder:
|
|
1243
|
-
error:
|
|
1244
|
-
invalid: !!
|
|
1245
|
-
disabled:
|
|
1577
|
+
placeholder: R,
|
|
1578
|
+
error: g.newVersionError,
|
|
1579
|
+
invalid: !!g.newVersionError,
|
|
1580
|
+
disabled: S
|
|
1246
1581
|
})
|
|
1247
1582
|
}] : [];
|
|
1248
|
-
return /* @__PURE__ */
|
|
1583
|
+
return /* @__PURE__ */ U("div", {
|
|
1249
1584
|
className: "flex flex-col gap-5",
|
|
1250
|
-
style:
|
|
1585
|
+
style: pe,
|
|
1251
1586
|
children: [
|
|
1252
|
-
t.type == null ? /* @__PURE__ */
|
|
1253
|
-
colors:
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1255
|
-
className:
|
|
1587
|
+
t.type == null ? /* @__PURE__ */ H(ae, {
|
|
1588
|
+
colors: Z,
|
|
1589
|
+
children: /* @__PURE__ */ H("span", {
|
|
1590
|
+
className: V("truncate", be),
|
|
1256
1591
|
children: t.title
|
|
1257
1592
|
})
|
|
1258
|
-
}) : /* @__PURE__ */
|
|
1593
|
+
}) : /* @__PURE__ */ H(ae, {
|
|
1259
1594
|
item: {
|
|
1260
1595
|
type: t.type,
|
|
1261
1596
|
name: t.title,
|
|
@@ -1263,146 +1598,154 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1263
1598
|
iconUrl: t.iconUrl
|
|
1264
1599
|
},
|
|
1265
1600
|
hasVersionTag: !1,
|
|
1266
|
-
colors:
|
|
1601
|
+
colors: Z
|
|
1267
1602
|
}),
|
|
1268
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ U("section", {
|
|
1269
1604
|
className: "flex flex-col gap-2",
|
|
1270
|
-
children: [/* @__PURE__ */
|
|
1271
|
-
className:
|
|
1272
|
-
children:
|
|
1273
|
-
}), /* @__PURE__ */
|
|
1605
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
1606
|
+
className: be,
|
|
1607
|
+
children: ne
|
|
1608
|
+
}), /* @__PURE__ */ U("div", {
|
|
1274
1609
|
className: "flex min-w-0 items-center gap-2",
|
|
1275
|
-
children: [/* @__PURE__ */
|
|
1610
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1276
1611
|
role: "group",
|
|
1277
|
-
"aria-label":
|
|
1612
|
+
"aria-label": F,
|
|
1613
|
+
"aria-describedby": xe ? ge : void 0,
|
|
1278
1614
|
className: "min-w-0 flex-1",
|
|
1279
|
-
children: /* @__PURE__ */
|
|
1280
|
-
name:
|
|
1281
|
-
nameClassName:
|
|
1615
|
+
children: /* @__PURE__ */ H(y, {
|
|
1616
|
+
name: _e.join(" / "),
|
|
1617
|
+
nameClassName: V(N, Rt.destination)
|
|
1282
1618
|
})
|
|
1283
|
-
}), /* @__PURE__ */
|
|
1284
|
-
ref:
|
|
1285
|
-
size:
|
|
1286
|
-
label:
|
|
1287
|
-
iconBefore: /* @__PURE__ */
|
|
1288
|
-
size:
|
|
1289
|
-
stroke:
|
|
1619
|
+
}), /* @__PURE__ */ H(b, {
|
|
1620
|
+
ref: u,
|
|
1621
|
+
size: h.Small,
|
|
1622
|
+
label: P,
|
|
1623
|
+
iconBefore: /* @__PURE__ */ H(W, {
|
|
1624
|
+
size: d.SM,
|
|
1625
|
+
stroke: f,
|
|
1290
1626
|
"aria-hidden": !0
|
|
1291
1627
|
}),
|
|
1292
|
-
disabled:
|
|
1293
|
-
onClick:
|
|
1628
|
+
disabled: S,
|
|
1629
|
+
onClick: l
|
|
1294
1630
|
})]
|
|
1295
1631
|
})]
|
|
1296
1632
|
}),
|
|
1297
|
-
|
|
1633
|
+
g && /* @__PURE__ */ U("section", {
|
|
1298
1634
|
className: "flex flex-col gap-2",
|
|
1299
|
-
children: [/* @__PURE__ */
|
|
1300
|
-
className:
|
|
1635
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
1636
|
+
className: be,
|
|
1301
1637
|
children: I
|
|
1302
|
-
}), /* @__PURE__ */
|
|
1638
|
+
}), /* @__PURE__ */ H(te, {
|
|
1303
1639
|
ariaLabel: I,
|
|
1304
|
-
value:
|
|
1305
|
-
onChange: (e) =>
|
|
1306
|
-
items:
|
|
1307
|
-
disabled:
|
|
1640
|
+
value: g.versionMode,
|
|
1641
|
+
onChange: (e) => g.onVersionModeChange(e),
|
|
1642
|
+
items: Se,
|
|
1643
|
+
disabled: S
|
|
1308
1644
|
})]
|
|
1309
1645
|
}),
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
politeness:
|
|
1312
|
-
children:
|
|
1646
|
+
/* @__PURE__ */ U(w, {
|
|
1647
|
+
politeness: E.Assertive,
|
|
1648
|
+
children: [xe && /* @__PURE__ */ H(_, {
|
|
1649
|
+
id: ge,
|
|
1650
|
+
text: xe
|
|
1651
|
+
}), T && /* @__PURE__ */ H(_, { text: T })]
|
|
1652
|
+
}),
|
|
1653
|
+
x != null && /* @__PURE__ */ H(We, {
|
|
1654
|
+
headingClassName: j,
|
|
1655
|
+
...x
|
|
1313
1656
|
})
|
|
1314
1657
|
]
|
|
1315
1658
|
});
|
|
1316
|
-
},
|
|
1659
|
+
}, Bt = {
|
|
1317
1660
|
backdrop: "_backdrop_1ie8s_6",
|
|
1318
1661
|
panel: "_panel_1ie8s_10",
|
|
1319
1662
|
divider: "_divider_1ie8s_15",
|
|
1320
1663
|
footer: "_footer_1ie8s_19",
|
|
1321
1664
|
content: "_content_1ie8s_23",
|
|
1322
1665
|
title: "_title_1ie8s_28"
|
|
1323
|
-
},
|
|
1324
|
-
let { title:
|
|
1666
|
+
}, Vt = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: l, titleClassName: u = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ...g }) => {
|
|
1667
|
+
let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: w = "Select" } = c, T = B({
|
|
1325
1668
|
"--sstf-backdrop-bg": l?.backdropBackground,
|
|
1326
1669
|
"--sstf-panel-bg": l?.panelBackground,
|
|
1327
1670
|
"--sstf-panel-border": l?.panelBorder,
|
|
1328
1671
|
"--sstf-divider-border": l?.dividerBorder,
|
|
1329
1672
|
"--sstf-scrollbar-thumb": l?.scrollbarThumb,
|
|
1330
1673
|
"--sstf-title-text": l?.titleText
|
|
1331
|
-
}), [
|
|
1674
|
+
}), [E, O] = a(Lt.Main), [k, A] = a(f), te = i(null), M = i(null);
|
|
1332
1675
|
t(() => {
|
|
1333
|
-
e &&
|
|
1676
|
+
e && O(Lt.Main);
|
|
1334
1677
|
}, [e]);
|
|
1335
|
-
let
|
|
1678
|
+
let N = i(E);
|
|
1336
1679
|
t(() => {
|
|
1337
|
-
|
|
1338
|
-
}, [
|
|
1339
|
-
let
|
|
1680
|
+
N.current !== E && (N.current = E, E === Lt.ChangeFolder ? te.current?.focus({ preventScroll: !0 }) : M.current?.focus({ preventScroll: !0 }));
|
|
1681
|
+
}, [E]);
|
|
1682
|
+
let P = i(e);
|
|
1340
1683
|
t(() => {
|
|
1341
|
-
let t =
|
|
1342
|
-
|
|
1684
|
+
let t = P.current;
|
|
1685
|
+
P.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
|
|
1343
1686
|
}, [e, s]);
|
|
1344
|
-
let
|
|
1345
|
-
|
|
1687
|
+
let F = E === Lt.ChangeFolder, re = (e) => {
|
|
1688
|
+
A(e), h?.(e);
|
|
1346
1689
|
}, ie = () => {
|
|
1347
|
-
re(f),
|
|
1348
|
-
},
|
|
1349
|
-
h?.(f),
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1690
|
+
re(f), O(Lt.ChangeFolder);
|
|
1691
|
+
}, L = () => {
|
|
1692
|
+
h?.(f), O(Lt.Main);
|
|
1693
|
+
}, R = () => {
|
|
1694
|
+
k && p(k), O(Lt.Main);
|
|
1352
1695
|
};
|
|
1353
|
-
return /* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ U(ne, {
|
|
1354
1697
|
open: e,
|
|
1355
1698
|
onClose: n,
|
|
1356
|
-
header: /* @__PURE__ */
|
|
1357
|
-
ref:
|
|
1699
|
+
header: /* @__PURE__ */ H("span", {
|
|
1700
|
+
ref: te,
|
|
1358
1701
|
tabIndex: -1,
|
|
1359
|
-
className:
|
|
1360
|
-
children:
|
|
1702
|
+
className: V("block truncate outline-none", u, Bt.title),
|
|
1703
|
+
children: F ? v : _
|
|
1361
1704
|
}),
|
|
1362
|
-
ariaLabel:
|
|
1363
|
-
onBack:
|
|
1364
|
-
backAriaLabel:
|
|
1705
|
+
ariaLabel: _,
|
|
1706
|
+
onBack: F ? L : void 0,
|
|
1707
|
+
backAriaLabel: x,
|
|
1365
1708
|
backDisabled: m,
|
|
1366
1709
|
closeAriaLabel: y,
|
|
1367
1710
|
closeDisabled: m,
|
|
1368
|
-
style:
|
|
1369
|
-
overlayStyle:
|
|
1370
|
-
className:
|
|
1371
|
-
overlayClassName:
|
|
1372
|
-
headerClassName:
|
|
1711
|
+
style: T,
|
|
1712
|
+
overlayStyle: T,
|
|
1713
|
+
className: V(Bt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
|
|
1714
|
+
overlayClassName: Bt.backdrop,
|
|
1715
|
+
headerClassName: V("px-[22px]", Bt.divider),
|
|
1373
1716
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
1374
|
-
children: [/* @__PURE__ */
|
|
1375
|
-
className:
|
|
1376
|
-
children: /* @__PURE__ */
|
|
1377
|
-
...
|
|
1378
|
-
view:
|
|
1717
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1718
|
+
className: V("min-h-0 flex-1 overflow-y-auto p-[22px]", Bt.content),
|
|
1719
|
+
children: /* @__PURE__ */ H(zt, {
|
|
1720
|
+
...g,
|
|
1721
|
+
view: E,
|
|
1379
1722
|
destination: f,
|
|
1380
1723
|
onDestinationChange: p,
|
|
1381
1724
|
isSubmitting: m,
|
|
1382
1725
|
onChangeFolderClick: ie,
|
|
1383
|
-
changeFolderButtonRef:
|
|
1384
|
-
pendingDestination:
|
|
1726
|
+
changeFolderButtonRef: M,
|
|
1727
|
+
pendingDestination: k,
|
|
1385
1728
|
onPendingDestinationChange: re
|
|
1386
1729
|
})
|
|
1387
|
-
}), /* @__PURE__ */
|
|
1388
|
-
className:
|
|
1389
|
-
children: [/* @__PURE__ */
|
|
1390
|
-
label:
|
|
1730
|
+
}), /* @__PURE__ */ U("div", {
|
|
1731
|
+
className: V("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Bt.footer),
|
|
1732
|
+
children: [/* @__PURE__ */ H(b, {
|
|
1733
|
+
label: S,
|
|
1391
1734
|
className: "mobile:flex-1",
|
|
1392
1735
|
disabled: m,
|
|
1393
|
-
onClick:
|
|
1394
|
-
}),
|
|
1395
|
-
label:
|
|
1736
|
+
onClick: F ? L : n
|
|
1737
|
+
}), F ? /* @__PURE__ */ H(D, {
|
|
1738
|
+
label: w,
|
|
1396
1739
|
className: "mobile:flex-1",
|
|
1397
|
-
disabled:
|
|
1398
|
-
onClick:
|
|
1399
|
-
}) : /* @__PURE__ */
|
|
1400
|
-
label: m ?
|
|
1740
|
+
disabled: k == null,
|
|
1741
|
+
onClick: R
|
|
1742
|
+
}) : /* @__PURE__ */ H(j, {
|
|
1743
|
+
label: m ? C : ee,
|
|
1401
1744
|
className: "mobile:flex-1",
|
|
1402
1745
|
disabled: o || m,
|
|
1403
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1746
|
+
iconBefore: m ? /* @__PURE__ */ H("span", {
|
|
1404
1747
|
"aria-hidden": !0,
|
|
1405
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ H(I, { size: d.SM })
|
|
1406
1749
|
}) : void 0,
|
|
1407
1750
|
onClick: r
|
|
1408
1751
|
})]
|
|
@@ -1410,4 +1753,4 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
1410
1753
|
});
|
|
1411
1754
|
};
|
|
1412
1755
|
//#endregion
|
|
1413
|
-
export {
|
|
1756
|
+
export { Ge as PUBLISH_PANEL_CLASS, K as PublicationRuleFunction, Fe as PublishAccessRuleEditor, ze as PublishAccessRules, q as PublishCalloutKind, Y as PublishDependenciesAppearance, nt as PublishDependenciesList, J as PublishDependencyType, yt as PublishFoldersTree, kt as PublishFooter, it as PublishHistoryList, wt as PublishPanel, Q as PublishPanelView, zt as SaveToFolderPanel, Lt as SaveToFolderView, It as SaveVersionMode, jt as StandalonePublishPanel, Vt as StandaloneSaveToFolderPanel, Ft as UnpublishConfirmationDialog, We as VersionHistorySection, Be as VersionHistoryStatus, Se as collectFolderKeys, fe as derivePublishState, _e as filterFolderTree, pe as formatPublishedDate, Ce as fromFolderPathKey, ke as getSiblingFolderNames, Oe as getUniqueFolderName, xe as mergeFolderPaths, ye as sortFolderTree, Te as toDialFileTree, $ as toFolderPathKey, he as usePublishFlow, ge as usePublishFolderView, De as validateFolderName };
|