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