@ynput/ayon-frontend-shared 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +105 -0
- package/dist/DetailsPanel.es.js +1088 -969
- package/dist/ListTable.es.js +70 -67
- package/dist/NewEntity.es.js +8 -5
- package/dist/ProjectTreeTable.es.js +4134 -3825
- package/dist/ProjectsTable.es.js +526 -0
- package/dist/Slicer.es.js +75 -73
- package/dist/Views.es.js +86 -84
- package/dist/chunks/Actions.es.js +4 -2
- package/dist/chunks/ColumnDropIndicator.es.js +21 -18
- package/dist/chunks/ColumnDropIndicator.styled.es.js +14 -13
- package/dist/chunks/ColumnHeaderMenuUI.es.js +9 -7
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +12 -11
- package/dist/chunks/EmptyPlaceholder.es.js +9 -8
- package/dist/chunks/EntityPath.es.js +15 -14
- package/dist/chunks/EntityPickerDialog.es.js +5 -3
- package/dist/chunks/EntityTooltip.es.js +10 -8
- package/dist/chunks/EntityUpdatesContext.es.js +13 -12
- package/dist/chunks/Feed.es.js +12 -11
- package/dist/chunks/FilterErrorActions.es.js +6 -4
- package/dist/chunks/GroupSettingsFallback.es.js +75 -0
- package/dist/chunks/JsonViewer.es.js +3 -2
- package/dist/chunks/Menu.es.js +105 -103
- package/dist/chunks/MetaWidget.es.js +278 -275
- package/dist/chunks/PlayableIcon.es.js +868 -862
- package/dist/chunks/ProjectContext.es.js +5 -4
- package/dist/chunks/RepresentationsList.es.js +3 -2
- package/dist/chunks/ReviewablesSelector.es.js +3471 -2067
- package/dist/chunks/SimpleTable.es.js +492 -402
- package/dist/chunks/Slicer.es.js +936 -896
- package/dist/chunks/TableExportContextInstance.es.js +437 -339
- package/dist/chunks/TableSettingsFallback.es.js +5 -3
- package/dist/chunks/ThumbnailSimple.es.js +15 -13
- package/dist/chunks/VideoPlayer.es.js +14 -12
- package/dist/chunks/Watchers.es.js +97 -95
- package/dist/chunks/getProjectDisplayName.es.js +4 -0
- package/dist/chunks/getUris.es.js +375 -374
- package/dist/chunks/useHierarchySelection.es.js +5 -3
- package/dist/chunks/useLoadModule.es.js +10 -8
- package/dist/chunks/viewUpdateHelper.es.js +12 -10
- package/dist/components.es.js +1488 -1186
- package/dist/context.es.js +589 -539
- package/dist/hooks.es.js +169 -212
- package/dist/index.es.js +17 -12
- package/dist/types/Actions.d.ts +3 -0
- package/dist/types/ContextMenu.d.ts +3 -0
- package/dist/types/DetailsPanel.d.ts +3 -0
- package/dist/types/EntityPickerDialog.d.ts +3 -0
- package/dist/types/Feed.d.ts +3 -0
- package/dist/types/ListTable.d.ts +3 -0
- package/dist/types/NewEntity.d.ts +3 -0
- package/dist/types/ProjectTreeTable.d.ts +735 -1
- package/dist/types/ProjectsTable.d.ts +228 -0
- package/dist/types/RepresentationsList.d.ts +3 -0
- package/dist/types/SimpleTable.d.ts +17 -0
- package/dist/types/Slicer.d.ts +4 -0
- package/dist/types/Views.d.ts +3 -0
- package/dist/types/api.d.ts +3 -0
- package/dist/types/components.d.ts +808 -11
- package/dist/types/context.d.ts +39 -1
- package/dist/types/hooks.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/util.d.ts +7 -0
- package/dist/util.es.js +152 -144
- package/package.json +16 -8
- /package/dist/{ContextMenuContextInstance.css → style.css} +0 -0
|
@@ -1,42 +1,135 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Button as $,
|
|
1
|
+
import { jsxs as x, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import J, { createContext as p, useContext as l, useState as b, useEffect as m, useRef as y, useCallback as L, useMemo as de, forwardRef as U } from "react";
|
|
3
|
+
import { Button as $, Icon as q, theme as Y, Dialog as le, InputText as G } from "@ynput/ayon-react-components";
|
|
4
4
|
import u from "styled-components";
|
|
5
|
-
import
|
|
6
|
-
import { a as
|
|
7
|
-
import { debounce as
|
|
8
|
-
import { confirmDialog as
|
|
5
|
+
import k from "clsx";
|
|
6
|
+
import { a as ue, K as W } from "./platform.es.js";
|
|
7
|
+
import { debounce as z, isEqual as pe } from "lodash";
|
|
8
|
+
import { confirmDialog as fe } from "primereact/confirmdialog";
|
|
9
9
|
import { toast as H } from "react-toastify";
|
|
10
10
|
import "uuid";
|
|
11
|
-
import { bp as
|
|
12
|
-
import
|
|
11
|
+
import { bp as D, a as ge } from "./searchTerms.es.js";
|
|
12
|
+
import "axios";
|
|
13
|
+
import { cU as he } from "./getUris.es.js";
|
|
13
14
|
import "@module-federation/enhanced/runtime";
|
|
15
|
+
import "@ynput/ayon-addon/host";
|
|
14
16
|
import "./ContextMenuContextInstance.es.js";
|
|
15
|
-
import { createPortal as
|
|
16
|
-
import { Dialog as
|
|
17
|
-
import
|
|
17
|
+
import { createPortal as me } from "react-dom";
|
|
18
|
+
import { Dialog as ve } from "primereact/dialog";
|
|
19
|
+
import we, { ReadyState as xe } from "react-use-websocket";
|
|
18
20
|
import "react-redux";
|
|
19
21
|
import "react-router-dom";
|
|
20
22
|
import "semver";
|
|
21
|
-
const
|
|
23
|
+
const Se = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
22
24
|
e,
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
] }),
|
|
25
|
+
/* @__PURE__ */ d($, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
|
|
26
|
+
] }), be = p(void 0), Jt = () => l(be) || {}, ye = p({
|
|
25
27
|
isLoading: !0,
|
|
26
28
|
modules: [],
|
|
27
|
-
remotesInitialized: !1
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
remotesInitialized: !1,
|
|
30
|
+
addonDev: { status: "off" }
|
|
31
|
+
}), Wt = () => {
|
|
32
|
+
const e = l(ye);
|
|
30
33
|
if (e === void 0)
|
|
31
34
|
throw new Error("useRemoteModules must be used within a RemoteModulesProvider");
|
|
32
35
|
return e;
|
|
33
|
-
},
|
|
34
|
-
|
|
36
|
+
}, K = "addonDev", O = "ayon-addon-dev", Ce = ["localhost", "127.0.0.1", "[::1]"], X = (e) => {
|
|
37
|
+
try {
|
|
38
|
+
const { protocol: t, hostname: o } = new URL(e);
|
|
39
|
+
return ["http:", "https:"].includes(t) && Ce.includes(o);
|
|
40
|
+
} catch {
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
}, Pe = (e) => {
|
|
44
|
+
const t = e.indexOf("@");
|
|
45
|
+
if (t <= 0) return null;
|
|
46
|
+
const o = e.slice(0, t), i = e.slice(t + 1).replace(/\/+$/, "");
|
|
47
|
+
return X(i) ? { addon: o, url: i } : null;
|
|
48
|
+
}, zt = () => {
|
|
49
|
+
const e = new URLSearchParams(window.location.search).get(K);
|
|
50
|
+
if (e === "off" || e === "")
|
|
51
|
+
return localStorage.removeItem(O), null;
|
|
52
|
+
if (e) {
|
|
53
|
+
const t = Pe(e);
|
|
54
|
+
return t ? (localStorage.setItem(O, JSON.stringify(t)), t) : (console.warn(`[addon dev] ignored ?${K}=${e}: use <addon>@http://localhost:<port>`), null);
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const t = JSON.parse(localStorage.getItem(O) || "null");
|
|
58
|
+
return t && X(t.url) ? t : null;
|
|
59
|
+
} catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}, Ee = () => localStorage.removeItem(O), Ie = async ({ url: e }) => {
|
|
63
|
+
const t = await fetch(`${e}/ayon-addon.json`, { cache: "no-store" });
|
|
64
|
+
if (!t.ok) throw new Error(`${e}/ayon-addon.json answered ${t.status}`);
|
|
65
|
+
return t.json();
|
|
66
|
+
}, Ht = (e) => !!e?.attrib?.developerMode || !!e?.data?.isService, Ae = u.div`
|
|
67
|
+
position: fixed;
|
|
68
|
+
left: 8px;
|
|
69
|
+
bottom: 8px;
|
|
70
|
+
z-index: 1000;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: 8px;
|
|
74
|
+
padding: 4px 4px 4px 12px;
|
|
75
|
+
border-radius: 8px;
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
78
|
+
background: var(--md-sys-color-tertiary-container);
|
|
79
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
80
|
+
|
|
81
|
+
&.error {
|
|
82
|
+
color: var(--md-sys-color-on-error-container);
|
|
83
|
+
background: var(--md-sys-color-error-container);
|
|
84
|
+
}
|
|
85
|
+
`, De = 2e3, Kt = ({ state: e }) => {
|
|
86
|
+
const [t, o] = b(!1), i = e.status === "active" ? e.info.buildId : void 0;
|
|
87
|
+
m(() => {
|
|
88
|
+
if (e.status !== "active") return;
|
|
89
|
+
const s = setInterval(() => {
|
|
90
|
+
Ie(e.override).then(
|
|
91
|
+
(c) => {
|
|
92
|
+
c.buildId !== i && (o(!0), window.location.reload());
|
|
93
|
+
},
|
|
94
|
+
() => {
|
|
95
|
+
}
|
|
96
|
+
// the dev server restarting; keep polling
|
|
97
|
+
);
|
|
98
|
+
}, De);
|
|
99
|
+
return () => clearInterval(s);
|
|
100
|
+
}, [e, i]);
|
|
101
|
+
const n = () => {
|
|
102
|
+
Ee();
|
|
103
|
+
const s = new URL(window.location.href);
|
|
104
|
+
s.searchParams.delete("addonDev"), window.location.href = s.toString();
|
|
105
|
+
}, { addon: a, url: r } = e.override;
|
|
106
|
+
return /* @__PURE__ */ x(Ae, { className: e.status === "error" ? "error" : void 0, "data-addon-dev": a, children: [
|
|
107
|
+
/* @__PURE__ */ d(q, { icon: e.status === "error" ? "error" : "code" }),
|
|
108
|
+
e.status === "error" ? /* @__PURE__ */ x("span", { children: [
|
|
109
|
+
"Addon dev: ",
|
|
110
|
+
a,
|
|
111
|
+
" could not load from ",
|
|
112
|
+
r,
|
|
113
|
+
" (",
|
|
114
|
+
e.error,
|
|
115
|
+
")"
|
|
116
|
+
] }) : /* @__PURE__ */ x("span", { children: [
|
|
117
|
+
"Addon dev: ",
|
|
118
|
+
/* @__PURE__ */ d("strong", { children: a }),
|
|
119
|
+
" from ",
|
|
120
|
+
r,
|
|
121
|
+
e.status === "active" && ` (${e.info.version}, build ${e.info.buildId})`,
|
|
122
|
+
t && ", reloading..."
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ d($, { variant: "text", icon: "close", onClick: n, "data-tooltip": "Stop: load the installed addon" })
|
|
125
|
+
] });
|
|
126
|
+
}, Te = p(void 0), qt = () => {
|
|
127
|
+
const e = l(Te);
|
|
35
128
|
if (e === void 0)
|
|
36
129
|
throw new Error("usePowerpack must be used within a PowerpackProvider");
|
|
37
130
|
return e;
|
|
38
|
-
},
|
|
39
|
-
const e =
|
|
131
|
+
}, Re = p(void 0), Yt = () => {
|
|
132
|
+
const e = l(Re);
|
|
40
133
|
if (e === void 0)
|
|
41
134
|
throw new Error("useURIContext must be used within a URIProvider");
|
|
42
135
|
return e;
|
|
@@ -47,14 +140,14 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
|
|
|
47
140
|
} catch {
|
|
48
141
|
return t;
|
|
49
142
|
}
|
|
50
|
-
},
|
|
143
|
+
}, Gt = (e, t) => {
|
|
51
144
|
if (typeof window > "u") return t;
|
|
52
145
|
try {
|
|
53
146
|
return _(sessionStorage.getItem(e), t);
|
|
54
147
|
} catch {
|
|
55
148
|
return t;
|
|
56
149
|
}
|
|
57
|
-
},
|
|
150
|
+
}, Xt = (e, t) => {
|
|
58
151
|
if (!(typeof window > "u"))
|
|
59
152
|
try {
|
|
60
153
|
sessionStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } }));
|
|
@@ -62,38 +155,38 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
|
|
|
62
155
|
console.error(o);
|
|
63
156
|
}
|
|
64
157
|
};
|
|
65
|
-
function
|
|
66
|
-
const o =
|
|
158
|
+
function ke(e, t) {
|
|
159
|
+
const o = y(t);
|
|
67
160
|
o.current = t;
|
|
68
|
-
const [i, n] =
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
n(_(
|
|
72
|
-
function
|
|
161
|
+
const [i, n] = b(() => typeof window > "u" ? t : _(sessionStorage.getItem(e), t));
|
|
162
|
+
m(() => {
|
|
163
|
+
const r = sessionStorage.getItem(e);
|
|
164
|
+
n(_(r, o.current)), r || sessionStorage.setItem(e, JSON.stringify(o.current));
|
|
165
|
+
function s(c) {
|
|
73
166
|
if ("key" in c && c.key && c.key !== e) return;
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
n(_(
|
|
167
|
+
const f = c.detail?.key;
|
|
168
|
+
if (f && f !== e) return;
|
|
169
|
+
const g = sessionStorage.getItem(e);
|
|
170
|
+
n(_(g, o.current));
|
|
78
171
|
}
|
|
79
|
-
return window.addEventListener("session-storage",
|
|
80
|
-
window.removeEventListener("session-storage",
|
|
172
|
+
return window.addEventListener("session-storage", s), window.addEventListener("storage", s), () => {
|
|
173
|
+
window.removeEventListener("session-storage", s), window.removeEventListener("storage", s);
|
|
81
174
|
};
|
|
82
175
|
}, [e]);
|
|
83
|
-
const
|
|
84
|
-
(
|
|
176
|
+
const a = L(
|
|
177
|
+
(r) => {
|
|
85
178
|
try {
|
|
86
|
-
n((
|
|
87
|
-
const c = typeof
|
|
179
|
+
n((s) => {
|
|
180
|
+
const c = typeof r == "function" ? r(s) : r;
|
|
88
181
|
return sessionStorage.setItem(e, JSON.stringify(c)), typeof window < "u" && window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } })), c;
|
|
89
182
|
});
|
|
90
|
-
} catch (
|
|
91
|
-
console.error(
|
|
183
|
+
} catch (s) {
|
|
184
|
+
console.error(s);
|
|
92
185
|
}
|
|
93
186
|
},
|
|
94
187
|
[e]
|
|
95
188
|
);
|
|
96
|
-
return [i,
|
|
189
|
+
return [i, a];
|
|
97
190
|
}
|
|
98
191
|
const N = (e, t = null) => {
|
|
99
192
|
if (!e) return t;
|
|
@@ -102,14 +195,14 @@ const N = (e, t = null) => {
|
|
|
102
195
|
} catch {
|
|
103
196
|
return t;
|
|
104
197
|
}
|
|
105
|
-
},
|
|
198
|
+
}, Oe = (e, t) => {
|
|
106
199
|
if (typeof window > "u") return t;
|
|
107
200
|
try {
|
|
108
201
|
return N(localStorage.getItem(e), t);
|
|
109
202
|
} catch {
|
|
110
203
|
return t;
|
|
111
204
|
}
|
|
112
|
-
},
|
|
205
|
+
}, _e = (e, t) => {
|
|
113
206
|
if (!(typeof window > "u"))
|
|
114
207
|
try {
|
|
115
208
|
localStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new Event("storage"));
|
|
@@ -117,97 +210,97 @@ const N = (e, t = null) => {
|
|
|
117
210
|
console.error(o);
|
|
118
211
|
}
|
|
119
212
|
};
|
|
120
|
-
function
|
|
121
|
-
const o =
|
|
213
|
+
function Zt(e, t) {
|
|
214
|
+
const o = y(t);
|
|
122
215
|
o.current = t;
|
|
123
|
-
const [i, n] =
|
|
124
|
-
const
|
|
125
|
-
return N(
|
|
216
|
+
const [i, n] = b(() => {
|
|
217
|
+
const r = localStorage.getItem(e);
|
|
218
|
+
return N(r, t);
|
|
126
219
|
});
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
n(N(
|
|
130
|
-
function
|
|
220
|
+
m(() => {
|
|
221
|
+
const r = localStorage.getItem(e);
|
|
222
|
+
n(N(r, o.current)), r || localStorage.setItem(e, JSON.stringify(o.current));
|
|
223
|
+
function s(c) {
|
|
131
224
|
if (c.key && c.key !== e) return;
|
|
132
|
-
const
|
|
133
|
-
n(N(
|
|
225
|
+
const f = localStorage.getItem(e);
|
|
226
|
+
n(N(f, o.current));
|
|
134
227
|
}
|
|
135
|
-
return window.addEventListener("storage",
|
|
136
|
-
window.removeEventListener("storage",
|
|
228
|
+
return window.addEventListener("storage", s), () => {
|
|
229
|
+
window.removeEventListener("storage", s);
|
|
137
230
|
};
|
|
138
231
|
}, [e]);
|
|
139
|
-
const
|
|
140
|
-
(
|
|
232
|
+
const a = L(
|
|
233
|
+
(r) => {
|
|
141
234
|
try {
|
|
142
|
-
n((
|
|
143
|
-
const c = typeof
|
|
235
|
+
n((s) => {
|
|
236
|
+
const c = typeof r == "function" ? r(s) : r;
|
|
144
237
|
return localStorage.setItem(e, JSON.stringify(c)), typeof window < "u" && setTimeout(() => {
|
|
145
238
|
window.dispatchEvent(new Event("storage"));
|
|
146
239
|
}, 0), c;
|
|
147
240
|
});
|
|
148
|
-
} catch (
|
|
149
|
-
console.error(
|
|
241
|
+
} catch (s) {
|
|
242
|
+
console.error(s);
|
|
150
243
|
}
|
|
151
244
|
},
|
|
152
245
|
[e]
|
|
153
246
|
);
|
|
154
|
-
return [i,
|
|
247
|
+
return [i, a];
|
|
155
248
|
}
|
|
156
|
-
const
|
|
249
|
+
const Ne = p(void 0), Le = ["feed", "subtasks", "details", "files"], $e = /^[^.\s]+\.[A-Za-z][A-Za-z0-9_]*$/, je = (e) => typeof e == "string" && $e.test(e), Me = (e) => typeof e == "string" && (Le.includes(e) || je(e)), Qt = (e) => {
|
|
157
250
|
const { startFrame: t, endFrame: o } = e.activityData || {}, i = e.origin?.id ?? e.entityId;
|
|
158
251
|
if (!Number.isSafeInteger(t) || !i) return null;
|
|
159
|
-
const n = t,
|
|
160
|
-
return { entityId: i, startFrame: n, endFrame:
|
|
161
|
-
},
|
|
162
|
-
const e =
|
|
252
|
+
const n = t, a = Number.isSafeInteger(o) ? Math.max(n, o) : n;
|
|
253
|
+
return { entityId: i, startFrame: n, endFrame: a };
|
|
254
|
+
}, Ue = () => {
|
|
255
|
+
const e = l(Ne);
|
|
163
256
|
if (e === void 0)
|
|
164
257
|
throw new Error("useDetailsPanel must be used within a DetailsPanelProvider");
|
|
165
258
|
return e;
|
|
166
|
-
},
|
|
167
|
-
const o =
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } =
|
|
171
|
-
(
|
|
172
|
-
|
|
259
|
+
}, M = "details/tabs-by-scope", eo = (e, t) => {
|
|
260
|
+
const o = Oe(M, {});
|
|
261
|
+
_e(M, { ...o, [e]: t });
|
|
262
|
+
}, to = (e) => {
|
|
263
|
+
const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } = Ue(), [n, a] = ke(M, {}), r = n[e], s = Me(r) ? r : i(e), c = L(
|
|
264
|
+
(g) => {
|
|
265
|
+
a((C) => ({ ...C, [e]: g }));
|
|
173
266
|
},
|
|
174
|
-
[e,
|
|
175
|
-
),
|
|
267
|
+
[e, a]
|
|
268
|
+
), f = s === "feed";
|
|
176
269
|
return {
|
|
177
270
|
isOpen: t(e),
|
|
178
|
-
setOpen: (
|
|
179
|
-
currentTab:
|
|
271
|
+
setOpen: (g) => o(e, g),
|
|
272
|
+
currentTab: s,
|
|
180
273
|
setTab: c,
|
|
181
|
-
isFeed:
|
|
274
|
+
isFeed: f
|
|
182
275
|
};
|
|
183
|
-
},
|
|
276
|
+
}, Fe = p(
|
|
184
277
|
void 0
|
|
185
|
-
),
|
|
186
|
-
const e =
|
|
278
|
+
), oo = () => {
|
|
279
|
+
const e = l(Fe);
|
|
187
280
|
if (!e)
|
|
188
281
|
throw new Error("useSubtasksModulesContext must be used within a SubtasksModulesProvider");
|
|
189
282
|
return e;
|
|
190
|
-
},
|
|
191
|
-
const e =
|
|
283
|
+
}, Ve = p({}), no = () => {
|
|
284
|
+
const e = l(Ve);
|
|
192
285
|
if (!e)
|
|
193
286
|
throw new Error("useThumbnailUploadContext must be used within a ThumbnailUploadProvider");
|
|
194
287
|
return e;
|
|
195
|
-
},
|
|
196
|
-
const e =
|
|
288
|
+
}, Be = p(void 0), ro = () => {
|
|
289
|
+
const e = l(Be);
|
|
197
290
|
if (e === void 0)
|
|
198
291
|
throw new Error("useSettingsPanel must be used within a SettingsPanelProvider");
|
|
199
292
|
return e;
|
|
200
|
-
},
|
|
201
|
-
function
|
|
202
|
-
const e =
|
|
293
|
+
}, Je = p(void 0);
|
|
294
|
+
function We() {
|
|
295
|
+
const e = l(Je);
|
|
203
296
|
if (e === void 0)
|
|
204
297
|
throw new Error("usePiPWindow must be used within a PiPContext");
|
|
205
298
|
return e;
|
|
206
299
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
300
|
+
function ze({ pipWindow: e, children: t }) {
|
|
301
|
+
return me(t, e.document.body);
|
|
209
302
|
}
|
|
210
|
-
const
|
|
303
|
+
const He = u(ve)`
|
|
211
304
|
width: 25vw;
|
|
212
305
|
height: 70vh;
|
|
213
306
|
border: solid 1px var(--md-sys-color-outline-variant);
|
|
@@ -220,7 +313,7 @@ const Le = u(fe)`
|
|
|
220
313
|
opacity: 1;
|
|
221
314
|
}
|
|
222
315
|
}
|
|
223
|
-
`,
|
|
316
|
+
`, Ke = u($)`
|
|
224
317
|
width: 26px;
|
|
225
318
|
height: 26px;
|
|
226
319
|
margin-left: auto;
|
|
@@ -236,12 +329,12 @@ const Le = u(fe)`
|
|
|
236
329
|
&:hover {
|
|
237
330
|
background-color: #3d3e40;
|
|
238
331
|
}
|
|
239
|
-
`,
|
|
240
|
-
const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } =
|
|
241
|
-
return !i && o ? /* @__PURE__ */
|
|
242
|
-
|
|
332
|
+
`, so = ({ children: e }) => {
|
|
333
|
+
const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } = We(), a = o && J.isValidElement(e) ? J.cloneElement(e, { id: o }) : e;
|
|
334
|
+
return !i && o ? /* @__PURE__ */ d(
|
|
335
|
+
He,
|
|
243
336
|
{
|
|
244
|
-
header: /* @__PURE__ */
|
|
337
|
+
header: /* @__PURE__ */ d(Ke, { icon: "close", className: "close", onClick: n }),
|
|
245
338
|
headerStyle: {
|
|
246
339
|
padding: 4,
|
|
247
340
|
backgroundColor: "#202124",
|
|
@@ -262,134 +355,134 @@ const Le = u(fe)`
|
|
|
262
355
|
},
|
|
263
356
|
onHide: n,
|
|
264
357
|
position: "right",
|
|
265
|
-
children:
|
|
358
|
+
children: a
|
|
266
359
|
}
|
|
267
|
-
) : t && /* @__PURE__ */
|
|
268
|
-
},
|
|
269
|
-
const e =
|
|
360
|
+
) : t && /* @__PURE__ */ d(ze, { pipWindow: t, children: /* @__PURE__ */ d("div", { className: "pipRoot", children: a }) });
|
|
361
|
+
}, qe = p(void 0), ao = () => {
|
|
362
|
+
const e = l(qe);
|
|
270
363
|
if (!e)
|
|
271
364
|
throw new Error("useAddonProjectContext must be used within a AddonProjectContext");
|
|
272
365
|
return e;
|
|
273
|
-
},
|
|
274
|
-
const e =
|
|
366
|
+
}, Ye = p(void 0), io = () => {
|
|
367
|
+
const e = l(Ye);
|
|
275
368
|
if (!e)
|
|
276
369
|
throw new Error("useAddonContext must be used within a AddonContext");
|
|
277
370
|
return e;
|
|
278
|
-
},
|
|
279
|
-
const e =
|
|
371
|
+
}, Ge = p(void 0), co = () => {
|
|
372
|
+
const e = l(Ge);
|
|
280
373
|
if (e === void 0)
|
|
281
374
|
throw new Error("useMenuContext must be used within a MenuProvider");
|
|
282
375
|
return e;
|
|
283
|
-
},
|
|
284
|
-
const e =
|
|
376
|
+
}, Z = p(void 0), lo = () => {
|
|
377
|
+
const e = l(Z);
|
|
285
378
|
if (e === void 0)
|
|
286
379
|
throw new Error("useSocketContext must be used within a SocketProvider");
|
|
287
380
|
return e;
|
|
288
|
-
},
|
|
381
|
+
}, Xe = window.location.protocol.replace("http", "ws"), Ze = `${Xe}//${window.location.host}/ws`, uo = ({
|
|
289
382
|
children: e,
|
|
290
383
|
userName: t,
|
|
291
384
|
projectName: o,
|
|
292
385
|
dispatch: i
|
|
293
386
|
}) => {
|
|
294
|
-
const [n,
|
|
295
|
-
|
|
296
|
-
|
|
387
|
+
const [n, a] = b(!1), [r, s] = b([]), [c] = he(), f = y(!1);
|
|
388
|
+
m(() => {
|
|
389
|
+
f.current = n;
|
|
297
390
|
}, [n]);
|
|
298
|
-
const
|
|
391
|
+
const g = {
|
|
299
392
|
shouldReconnect: () => !t || !localStorage.getItem("accessToken") ? !1 : (c({ full: !1 }).unwrap(), !0)
|
|
300
|
-
}, { sendMessage:
|
|
301
|
-
|
|
302
|
-
|
|
393
|
+
}, { sendMessage: C, readyState: P, getWebSocket: E } = we(
|
|
394
|
+
Ze,
|
|
395
|
+
g,
|
|
303
396
|
!!t
|
|
304
|
-
),
|
|
305
|
-
|
|
397
|
+
), v = () => {
|
|
398
|
+
C(
|
|
306
399
|
JSON.stringify({
|
|
307
400
|
topic: "auth",
|
|
308
401
|
token: localStorage.getItem("accessToken"),
|
|
309
|
-
subscribe:
|
|
402
|
+
subscribe: r,
|
|
310
403
|
project: o
|
|
311
404
|
})
|
|
312
405
|
);
|
|
313
406
|
};
|
|
314
|
-
|
|
315
|
-
console.debug("Topics changed",
|
|
316
|
-
}, [
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
const h =
|
|
320
|
-
() =>
|
|
321
|
-
|
|
407
|
+
m(() => {
|
|
408
|
+
console.debug("Topics changed", r), v();
|
|
409
|
+
}, [r, o]);
|
|
410
|
+
const T = y(r);
|
|
411
|
+
T.current = r;
|
|
412
|
+
const h = de(
|
|
413
|
+
() => z((w) => {
|
|
414
|
+
pe(T.current, w) || (console.log("WS: Subscriptions changed"), s(w));
|
|
322
415
|
}, 200),
|
|
323
416
|
[]
|
|
324
417
|
);
|
|
325
|
-
|
|
326
|
-
|
|
418
|
+
m(() => (D.setOnSubscriptionsChange((w) => h(w)), h(D.getSubscriptions("")), () => {
|
|
419
|
+
D.setOnSubscriptionsChange(null), h.cancel();
|
|
327
420
|
}), [h]);
|
|
328
|
-
const [
|
|
329
|
-
|
|
330
|
-
|
|
421
|
+
const [R, oe] = b(!1), [F, ne] = b(!1);
|
|
422
|
+
m(() => {
|
|
423
|
+
R && !F && (H.warning(/* @__PURE__ */ d(Se, {}), {
|
|
331
424
|
autoClose: !1,
|
|
332
425
|
closeButton: !1
|
|
333
|
-
}),
|
|
334
|
-
}, [
|
|
335
|
-
const
|
|
336
|
-
console.log("Resetting API state due to server restart"),
|
|
337
|
-
}, 1e3),
|
|
426
|
+
}), ne(!0));
|
|
427
|
+
}, [R, F]);
|
|
428
|
+
const I = y({ callCount: 0, lastCall: Date.now() }), re = z(() => {
|
|
429
|
+
console.log("Resetting API state due to server restart"), a(!1), i(ge.util.resetApiState());
|
|
430
|
+
}, 1e3), se = L(
|
|
338
431
|
(w) => {
|
|
339
|
-
if (
|
|
340
|
-
return
|
|
432
|
+
if (I.current.callCount > 1e3)
|
|
433
|
+
return oe(!0), console.log(
|
|
341
434
|
"Overload: Over 1000 messages per second. Ignoring subsequent messages."
|
|
342
435
|
);
|
|
343
|
-
let
|
|
436
|
+
let A;
|
|
344
437
|
try {
|
|
345
|
-
|
|
346
|
-
} catch (
|
|
347
|
-
console.error("Failed to parse websocket message:",
|
|
438
|
+
A = JSON.parse(w.data);
|
|
439
|
+
} catch (ce) {
|
|
440
|
+
console.error("Failed to parse websocket message:", ce, w.data);
|
|
348
441
|
return;
|
|
349
442
|
}
|
|
350
|
-
const { topic:
|
|
351
|
-
if (
|
|
352
|
-
console.log("Server replica booted"),
|
|
443
|
+
const { topic: S, sender: V, summary: ae, status: ie } = A || {};
|
|
444
|
+
if (f.current && (S === "heartbeat" || S === "server.started" && ie === "finished")) {
|
|
445
|
+
console.log("Server replica booted"), re();
|
|
353
446
|
return;
|
|
354
447
|
}
|
|
355
|
-
if (
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
358
|
-
} else if (
|
|
448
|
+
if (S === "heartbeat") return;
|
|
449
|
+
if (S === "server.restart_requested" && (console.log("Server restart requested"), a(!0)), ["import.data"].includes(S)) {
|
|
450
|
+
if (V !== window.senderId) return;
|
|
451
|
+
} else if (V === window.senderId)
|
|
359
452
|
return;
|
|
360
|
-
const
|
|
361
|
-
|
|
453
|
+
const B = Date.now();
|
|
454
|
+
B - I.current.lastCall < 1e3 ? I.current.callCount += 1 : I.current.callCount = 0, console.log("Event RX", A), I.current.lastCall = B, S === "shout" && A?.summary?.text && H.info(ae.text), D.publish(S, A);
|
|
362
455
|
},
|
|
363
|
-
[
|
|
456
|
+
[a]
|
|
364
457
|
);
|
|
365
|
-
return
|
|
366
|
-
|
|
458
|
+
return m(() => {
|
|
459
|
+
P === xe.OPEN && (E().onmessage = se, v(), D.publish("client.connected", {
|
|
367
460
|
topic: "client.connected"
|
|
368
461
|
}));
|
|
369
|
-
}, [
|
|
370
|
-
|
|
462
|
+
}, [P, E]), /* @__PURE__ */ d(
|
|
463
|
+
Z.Provider,
|
|
371
464
|
{
|
|
372
465
|
value: {
|
|
373
|
-
getWebSocket:
|
|
374
|
-
readyState:
|
|
466
|
+
getWebSocket: E,
|
|
467
|
+
readyState: P,
|
|
375
468
|
serverRestartingVisible: n
|
|
376
469
|
},
|
|
377
470
|
children: e
|
|
378
471
|
}
|
|
379
472
|
);
|
|
380
|
-
},
|
|
381
|
-
const e =
|
|
473
|
+
}, Q = p(void 0), po = () => {
|
|
474
|
+
const e = l(Q);
|
|
382
475
|
if (e === void 0)
|
|
383
476
|
throw new Error("useProjectContext must be used within a ProjectContextProvider");
|
|
384
477
|
return e;
|
|
385
|
-
},
|
|
478
|
+
}, fo = () => l(Q), Qe = p(
|
|
386
479
|
void 0
|
|
387
|
-
),
|
|
388
|
-
const e =
|
|
480
|
+
), go = () => {
|
|
481
|
+
const e = l(Qe);
|
|
389
482
|
if (e === void 0)
|
|
390
483
|
throw new Error("useProjectFoldersContext must be used within a ProjectFoldersContextProvider");
|
|
391
484
|
return e;
|
|
392
|
-
},
|
|
485
|
+
}, ee = p(void 0), et = (e) => ({
|
|
393
486
|
created: e,
|
|
394
487
|
label_changed: e,
|
|
395
488
|
renamed: e,
|
|
@@ -398,7 +491,7 @@ const Le = u(fe)`
|
|
|
398
491
|
tags_changed: e,
|
|
399
492
|
attrib_changed: e,
|
|
400
493
|
deleted: e
|
|
401
|
-
}),
|
|
494
|
+
}), tt = (e, t) => e === t || e.startsWith(`${t}.`), ot = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), nt = (e) => {
|
|
402
495
|
const t = e.split(".").pop();
|
|
403
496
|
if (t && [
|
|
404
497
|
"created",
|
|
@@ -411,39 +504,39 @@ const Le = u(fe)`
|
|
|
411
504
|
"deleted"
|
|
412
505
|
].includes(t))
|
|
413
506
|
return t;
|
|
414
|
-
},
|
|
507
|
+
}, ho = ({
|
|
415
508
|
projectNames: e,
|
|
416
509
|
topics: t,
|
|
417
510
|
isSyncing: o = !1,
|
|
418
511
|
shouldSyncOnUpdate: i
|
|
419
512
|
}) => {
|
|
420
|
-
const n =
|
|
513
|
+
const n = l(ee);
|
|
421
514
|
if (!n)
|
|
422
515
|
throw new Error("useSyncUpdates must be used within an EntityUpdatesProvider");
|
|
423
|
-
const
|
|
424
|
-
(
|
|
516
|
+
const a = e || n.projectNames, r = y(0), s = y(!1), c = n.updates.filter(
|
|
517
|
+
(f) => ot(f.project, a) && t.some((g) => tt(f.topic, g)) && (i?.(f) ?? !0)
|
|
425
518
|
);
|
|
426
|
-
return
|
|
427
|
-
o && !
|
|
428
|
-
}, [n, o,
|
|
519
|
+
return m(() => {
|
|
520
|
+
o && !s.current ? r.current = n.getLatestId() : !o && s.current && n.acknowledge(t, a, r.current), s.current = o;
|
|
521
|
+
}, [n, o, a, t]), {
|
|
429
522
|
updates: c,
|
|
430
523
|
hasUpdates: c.length > 0,
|
|
431
524
|
updateCount: c.length
|
|
432
525
|
};
|
|
433
|
-
},
|
|
434
|
-
const e =
|
|
526
|
+
}, mo = () => {
|
|
527
|
+
const e = l(ee);
|
|
435
528
|
if (!e)
|
|
436
529
|
throw new Error("useAutoSyncSettings must be used within an EntityUpdatesProvider");
|
|
437
530
|
const { autoSyncSettings: t, setAutoSyncSettings: o } = e;
|
|
438
531
|
return [t, (n) => {
|
|
439
|
-
const { settings:
|
|
440
|
-
o(
|
|
532
|
+
const { settings: a, global: r } = n;
|
|
533
|
+
o(r !== void 0 ? et(r) : (s) => ({ ...s, ...a }));
|
|
441
534
|
}];
|
|
442
|
-
},
|
|
535
|
+
}, vo = (e, t) => {
|
|
443
536
|
if (!t) return !1;
|
|
444
|
-
const o =
|
|
537
|
+
const o = nt(e);
|
|
445
538
|
return o ? t[o] : !1;
|
|
446
|
-
},
|
|
539
|
+
}, rt = u.li`
|
|
447
540
|
position: relative;
|
|
448
541
|
padding: 4px 6px 4px 12px;
|
|
449
542
|
user-select: none;
|
|
@@ -496,7 +589,7 @@ const Le = u(fe)`
|
|
|
496
589
|
display: flex;
|
|
497
590
|
}
|
|
498
591
|
}
|
|
499
|
-
`,
|
|
592
|
+
`, j = u($)`
|
|
500
593
|
&.hasIcon {
|
|
501
594
|
padding: 2px;
|
|
502
595
|
}
|
|
@@ -514,68 +607,68 @@ const Le = u(fe)`
|
|
|
514
607
|
}
|
|
515
608
|
}
|
|
516
609
|
}
|
|
517
|
-
`,
|
|
610
|
+
`, st = U(
|
|
518
611
|
({
|
|
519
612
|
id: e,
|
|
520
613
|
label: t,
|
|
521
614
|
startContent: o,
|
|
522
615
|
endContent: i,
|
|
523
616
|
isSelected: n,
|
|
524
|
-
isEditable:
|
|
525
|
-
isSaveable:
|
|
526
|
-
highlighted:
|
|
617
|
+
isEditable: a,
|
|
618
|
+
isSaveable: r,
|
|
619
|
+
highlighted: s,
|
|
527
620
|
onEdit: c,
|
|
528
|
-
onSave:
|
|
529
|
-
onResetView:
|
|
530
|
-
className:
|
|
531
|
-
...
|
|
532
|
-
},
|
|
533
|
-
const { viewAlias:
|
|
534
|
-
h.stopPropagation(),
|
|
535
|
-
message: `Save current ${
|
|
621
|
+
onSave: f,
|
|
622
|
+
onResetView: g,
|
|
623
|
+
className: C,
|
|
624
|
+
...P
|
|
625
|
+
}, E) => {
|
|
626
|
+
const { viewAlias: v } = ft(), T = (h, R) => {
|
|
627
|
+
h.stopPropagation(), R ? fe({
|
|
628
|
+
message: `Save current ${v} settings and overwrite this ${v}?`,
|
|
536
629
|
header: "Confirm save",
|
|
537
|
-
accept: () =>
|
|
538
|
-
}) :
|
|
630
|
+
accept: () => f && f(h, e)
|
|
631
|
+
}) : f && f(h, e);
|
|
539
632
|
};
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
-
|
|
633
|
+
return /* @__PURE__ */ x(
|
|
634
|
+
rt,
|
|
542
635
|
{
|
|
543
|
-
...
|
|
636
|
+
...P,
|
|
544
637
|
id: e,
|
|
545
|
-
className:
|
|
546
|
-
ref:
|
|
638
|
+
className: k(C, { selected: n }),
|
|
639
|
+
ref: E,
|
|
547
640
|
children: [
|
|
548
641
|
o && o,
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
|
|
551
|
-
|
|
642
|
+
/* @__PURE__ */ d("span", { className: "label", children: t }),
|
|
643
|
+
g && /* @__PURE__ */ d(
|
|
644
|
+
j,
|
|
552
645
|
{
|
|
553
646
|
icon: "restart_alt",
|
|
554
647
|
variant: "text",
|
|
555
648
|
className: "reset",
|
|
556
|
-
onClick:
|
|
649
|
+
onClick: g,
|
|
557
650
|
"data-tooltip": "Reset to Default",
|
|
558
|
-
"data-shortcut":
|
|
651
|
+
"data-shortcut": ue("0", [W.Shift, W.Ctrl])
|
|
559
652
|
}
|
|
560
653
|
),
|
|
561
|
-
|
|
562
|
-
|
|
654
|
+
a && r && !n && /* @__PURE__ */ d(
|
|
655
|
+
j,
|
|
563
656
|
{
|
|
564
657
|
icon: "save",
|
|
565
658
|
variant: "text",
|
|
566
|
-
className:
|
|
567
|
-
onClick: (h) =>
|
|
568
|
-
"data-tooltip": `Save ${
|
|
659
|
+
className: k("save", { active: s === "save" }),
|
|
660
|
+
onClick: (h) => T(h, s !== "save"),
|
|
661
|
+
"data-tooltip": `Save ${v} settings from current ${v}`
|
|
569
662
|
}
|
|
570
663
|
),
|
|
571
|
-
|
|
572
|
-
|
|
664
|
+
a && c && /* @__PURE__ */ d(
|
|
665
|
+
j,
|
|
573
666
|
{
|
|
574
667
|
variant: "text",
|
|
575
668
|
icon: "more_horiz",
|
|
576
|
-
className:
|
|
669
|
+
className: k("more", { active: s === "edit" }),
|
|
577
670
|
onClick: (h) => c(h, e),
|
|
578
|
-
"data-tooltip": `Edit ${
|
|
671
|
+
"data-tooltip": `Edit ${v}`
|
|
579
672
|
}
|
|
580
673
|
),
|
|
581
674
|
i && i
|
|
@@ -583,10 +676,10 @@ const Le = u(fe)`
|
|
|
583
676
|
}
|
|
584
677
|
);
|
|
585
678
|
}
|
|
586
|
-
),
|
|
679
|
+
), at = u.div`
|
|
587
680
|
overflow: auto;
|
|
588
681
|
max-height: 40vh;
|
|
589
|
-
`,
|
|
682
|
+
`, it = u.ul`
|
|
590
683
|
/* reset defaults */
|
|
591
684
|
margin: 0;
|
|
592
685
|
padding: 0;
|
|
@@ -596,17 +689,17 @@ const Le = u(fe)`
|
|
|
596
689
|
flex-direction: column;
|
|
597
690
|
gap: var(--base-gap-small);
|
|
598
691
|
margin-bottom: var(--padding-s);
|
|
599
|
-
`,
|
|
692
|
+
`, ct = u.li`
|
|
600
693
|
height: 1px;
|
|
601
694
|
background-color: var(--md-sys-color-outline-variant);
|
|
602
695
|
margin: 4px 0;
|
|
603
696
|
`;
|
|
604
697
|
u.li`
|
|
605
|
-
${
|
|
698
|
+
${Y.labelSmall}
|
|
606
699
|
color: var(--md-sys-color-outline);
|
|
607
700
|
`;
|
|
608
|
-
const
|
|
609
|
-
${
|
|
701
|
+
const dt = u.li`
|
|
702
|
+
${Y.labelSmall}
|
|
610
703
|
color: var(--md-sys-color-outline);
|
|
611
704
|
user-select: none;
|
|
612
705
|
border-radius: var(--border-radius-m);
|
|
@@ -641,23 +734,23 @@ const Qe = u.li`
|
|
|
641
734
|
&:hover .icon {
|
|
642
735
|
display: inline-flex;
|
|
643
736
|
}
|
|
644
|
-
`,
|
|
645
|
-
({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */
|
|
646
|
-
|
|
737
|
+
`, lt = U(
|
|
738
|
+
({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */ x(
|
|
739
|
+
dt,
|
|
647
740
|
{
|
|
648
741
|
...i,
|
|
649
|
-
className:
|
|
742
|
+
className: k("views-section-header", { collapsed: t }, o),
|
|
650
743
|
ref: n,
|
|
651
744
|
children: [
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ d("span", { children: e }),
|
|
746
|
+
/* @__PURE__ */ d("span", { className: "spacer" }),
|
|
747
|
+
/* @__PURE__ */ d(q, { className: "icon", icon: "expand_more" })
|
|
655
748
|
]
|
|
656
749
|
}
|
|
657
750
|
)
|
|
658
|
-
),
|
|
659
|
-
({ items: e, selected: t, ...o }, i) => /* @__PURE__ */
|
|
660
|
-
|
|
751
|
+
), wo = "_divider_", ut = (e) => typeof e == "object" && e !== null && "type" in e && e.type === "section", xo = U(
|
|
752
|
+
({ items: e, selected: t, ...o }, i) => /* @__PURE__ */ d(at, { children: /* @__PURE__ */ d(it, { ...o, ref: i, children: e.map((n, a) => n === "_divider_" ? /* @__PURE__ */ d(ct, {}, a) : ut(n) ? /* @__PURE__ */ d(
|
|
753
|
+
lt,
|
|
661
754
|
{
|
|
662
755
|
id: n.id,
|
|
663
756
|
title: n.title,
|
|
@@ -665,60 +758,60 @@ const Qe = u.li`
|
|
|
665
758
|
onClick: n.onToggle
|
|
666
759
|
},
|
|
667
760
|
n.id
|
|
668
|
-
) : /* @__PURE__ */
|
|
669
|
-
|
|
761
|
+
) : /* @__PURE__ */ d(
|
|
762
|
+
st,
|
|
670
763
|
{
|
|
671
764
|
tabIndex: 0,
|
|
672
765
|
isSelected: n.id === t,
|
|
673
|
-
autoFocus:
|
|
766
|
+
autoFocus: a === 0,
|
|
674
767
|
...n
|
|
675
768
|
},
|
|
676
|
-
(n.id || "") +
|
|
769
|
+
(n.id || "") + a.toString()
|
|
677
770
|
)) }) })
|
|
678
|
-
),
|
|
679
|
-
const e =
|
|
771
|
+
), pt = p(null), ft = () => {
|
|
772
|
+
const e = l(pt);
|
|
680
773
|
if (!e)
|
|
681
774
|
throw new Error("useViewsContext must be used within a ViewsProvider");
|
|
682
775
|
return e;
|
|
683
|
-
},
|
|
776
|
+
}, So = 1, gt = u.div`
|
|
684
777
|
min-width: 350px;
|
|
685
|
-
`,
|
|
778
|
+
`, ht = u.div`
|
|
686
779
|
margin-top: 12px;
|
|
687
780
|
min-height: 60px;
|
|
688
781
|
min-width: 350px;
|
|
689
|
-
`,
|
|
782
|
+
`, mt = u.p`
|
|
690
783
|
font-weight: 600;
|
|
691
784
|
margin-bottom: 4px;
|
|
692
|
-
`,
|
|
785
|
+
`, vt = u.p`
|
|
693
786
|
margin-top: 12px;
|
|
694
787
|
font-weight: 600;
|
|
695
788
|
color: var(--md-sys-color-error);
|
|
696
|
-
`,
|
|
789
|
+
`, bo = ({
|
|
697
790
|
entityLabel: e,
|
|
698
791
|
childrenDetails: t,
|
|
699
792
|
totalLine: o,
|
|
700
793
|
message: i
|
|
701
|
-
}) => /* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
t.length > 0 && /* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
t.map((n,
|
|
794
|
+
}) => /* @__PURE__ */ x(gt, { children: [
|
|
795
|
+
/* @__PURE__ */ d("p", { children: i || `Are you sure you want to delete ${e}? This action cannot be undone.` }),
|
|
796
|
+
t.length > 0 && /* @__PURE__ */ x(ht, { children: [
|
|
797
|
+
/* @__PURE__ */ d(mt, { children: "The following will also be affected:" }),
|
|
798
|
+
t.map((n, a) => /* @__PURE__ */ d("p", { children: n }, a))
|
|
706
799
|
] }),
|
|
707
|
-
o && /* @__PURE__ */
|
|
708
|
-
] }),
|
|
800
|
+
o && /* @__PURE__ */ d(vt, { children: o })
|
|
801
|
+
] }), yo = u(le)`
|
|
709
802
|
max-height: min(600px, 90vh);
|
|
710
|
-
`,
|
|
803
|
+
`, Co = u.div`
|
|
711
804
|
display: flex;
|
|
712
805
|
flex-direction: column;
|
|
713
806
|
width: 100%;
|
|
714
|
-
`,
|
|
807
|
+
`, Po = u.label`
|
|
715
808
|
margin: 2px 0 14px 0;
|
|
716
|
-
`,
|
|
809
|
+
`, Eo = u.div`
|
|
717
810
|
display: flex;
|
|
718
811
|
padding-top: 14px;
|
|
719
812
|
gap: 8px;
|
|
720
813
|
justify-content: flex-end;
|
|
721
|
-
`,
|
|
814
|
+
`, Io = u.div`
|
|
722
815
|
display: flex;
|
|
723
816
|
flex-direction: column;
|
|
724
817
|
gap: 8px;
|
|
@@ -727,105 +820,110 @@ const Qe = u.li`
|
|
|
727
820
|
/* scroll container clips the inputs' 2px focus outline — inset it, then pull back to keep alignment */
|
|
728
821
|
padding: 4px;
|
|
729
822
|
margin: -4px;
|
|
730
|
-
`,
|
|
823
|
+
`, Ao = u.label`
|
|
731
824
|
display: flex;
|
|
732
825
|
align-items: center;
|
|
733
826
|
justify-content: space-between;
|
|
734
827
|
gap: 12px;
|
|
735
|
-
`,
|
|
828
|
+
`, Do = u(G)`
|
|
736
829
|
width: 180px;
|
|
737
|
-
`,
|
|
830
|
+
`, To = u(G)`
|
|
738
831
|
width: 100%;
|
|
739
832
|
/* room for the 2px focus outline */
|
|
740
833
|
margin: 2px 0;
|
|
741
|
-
`,
|
|
834
|
+
`, wt = /* @__PURE__ */ new Set([
|
|
742
835
|
"folder",
|
|
743
836
|
"task",
|
|
744
837
|
"product",
|
|
745
838
|
"version",
|
|
746
839
|
"representation",
|
|
747
840
|
"workfile"
|
|
748
|
-
]),
|
|
749
|
-
const e =
|
|
841
|
+
]), Ro = (e) => !!e && wt.has(e), te = p(null), ko = () => {
|
|
842
|
+
const e = l(te);
|
|
750
843
|
if (!e)
|
|
751
844
|
throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
|
|
752
845
|
return e;
|
|
753
|
-
},
|
|
846
|
+
}, Oo = () => l(te), _o = "tableExport", xt = p(null), No = () => l(xt);
|
|
754
847
|
export {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
848
|
+
_o as $,
|
|
849
|
+
Ht as A,
|
|
850
|
+
Ie as B,
|
|
851
|
+
To as C,
|
|
852
|
+
bo as D,
|
|
853
|
+
ee as E,
|
|
854
|
+
Co as F,
|
|
855
|
+
Kt as G,
|
|
856
|
+
Se as H,
|
|
857
|
+
M as I,
|
|
858
|
+
Me as J,
|
|
859
|
+
Yt as K,
|
|
860
|
+
Ne as L,
|
|
861
|
+
Ge as M,
|
|
862
|
+
Fe as N,
|
|
863
|
+
Be as O,
|
|
864
|
+
Q as P,
|
|
865
|
+
Je as Q,
|
|
866
|
+
ye as R,
|
|
867
|
+
yo as S,
|
|
868
|
+
Ve as T,
|
|
869
|
+
qe as U,
|
|
870
|
+
Ye as V,
|
|
871
|
+
Te as W,
|
|
872
|
+
be as X,
|
|
873
|
+
Qe as Y,
|
|
874
|
+
Re as Z,
|
|
875
|
+
te as _,
|
|
876
|
+
Wt as a,
|
|
877
|
+
xt as a0,
|
|
878
|
+
so as a1,
|
|
879
|
+
Z as a2,
|
|
880
|
+
uo as a3,
|
|
881
|
+
Qt as a4,
|
|
882
|
+
vo as a5,
|
|
883
|
+
je as a6,
|
|
884
|
+
Ro as a7,
|
|
885
|
+
eo as a8,
|
|
886
|
+
io as a9,
|
|
887
|
+
ao as aa,
|
|
888
|
+
mo as ab,
|
|
889
|
+
ko as ac,
|
|
890
|
+
Oo as ad,
|
|
891
|
+
We as ae,
|
|
892
|
+
to as af,
|
|
893
|
+
ro as ag,
|
|
894
|
+
lo as ah,
|
|
895
|
+
oo as ai,
|
|
896
|
+
ho as aj,
|
|
897
|
+
No as ak,
|
|
898
|
+
no as al,
|
|
899
|
+
wo as am,
|
|
900
|
+
pt as an,
|
|
901
|
+
lt as ao,
|
|
902
|
+
xo as ap,
|
|
903
|
+
st as aq,
|
|
904
|
+
qt as b,
|
|
905
|
+
tt as c,
|
|
906
|
+
Jt as d,
|
|
907
|
+
ft as e,
|
|
908
|
+
So as f,
|
|
909
|
+
nt as g,
|
|
910
|
+
Po as h,
|
|
911
|
+
Io as i,
|
|
912
|
+
Ao as j,
|
|
913
|
+
Do as k,
|
|
914
|
+
Eo as l,
|
|
915
|
+
ot as m,
|
|
916
|
+
fo as n,
|
|
917
|
+
ke as o,
|
|
918
|
+
Gt as p,
|
|
919
|
+
Zt as q,
|
|
920
|
+
Oe as r,
|
|
921
|
+
Xt as s,
|
|
922
|
+
et as t,
|
|
923
|
+
co as u,
|
|
924
|
+
Ue as v,
|
|
925
|
+
_e as w,
|
|
926
|
+
po as x,
|
|
927
|
+
go as y,
|
|
928
|
+
zt as z
|
|
831
929
|
};
|