@ynput/ayon-frontend-shared 0.6.8 → 0.7.0
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/dist/ContextMenu.es.js +44 -27
- package/dist/DetailsPanel.es.js +225 -224
- package/dist/Feed.es.js +64 -58
- package/dist/ListTable.es.js +423 -423
- package/dist/NewEntity.es.js +44 -43
- package/dist/ProjectTreeTable.es.js +3517 -3378
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +366 -352
- package/dist/api.es.js +428 -413
- package/dist/chunks/Actions.es.js +18 -17
- package/dist/chunks/ColumnDropIndicator.es.js +21 -20
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +60 -59
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +15 -14
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +1072 -1088
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2449 -2199
- package/dist/chunks/PlayableIcon.es.js +128 -88
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +627 -611
- package/dist/chunks/SimpleForm.es.js +11 -10
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +956 -823
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +100 -99
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +224 -223
- package/dist/chunks/getBundleMode.es.js +33 -25
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3873 -3736
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +621 -499
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +43 -43
- package/dist/chunks/useDateRangeFilter.es.js +85 -59
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +41 -40
- package/dist/components.es.js +963 -891
- package/dist/context.es.js +528 -501
- package/dist/hooks.es.js +15 -15
- package/dist/index.es.js +6 -6
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +55 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +128 -15
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +26 -1
- package/dist/types/Views.d.ts +2 -0
- package/dist/types/api.d.ts +2359 -590
- package/dist/types/components.d.ts +542 -4
- package/dist/types/context.d.ts +94 -2
- package/dist/types/util.d.ts +58 -0
- package/dist/util.es.js +141 -129
- package/package.json +2 -2
- package/dist/chunks/MenuItem.es.js +0 -420
package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js}
RENAMED
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import W, { createContext as
|
|
1
|
+
import { jsxs as R, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import W, { createContext as p, useContext as d, useRef as b, useState as S, useEffect as x, useCallback as O, useMemo as re, forwardRef as M } from "react";
|
|
3
3
|
import { Button as $, theme as z, Icon as ae, Dialog as ie, InputText as K } from "@ynput/ayon-react-components";
|
|
4
4
|
import u from "styled-components";
|
|
5
|
-
import
|
|
6
|
-
import { a as ce, K as
|
|
7
|
-
import { debounce as
|
|
5
|
+
import D from "clsx";
|
|
6
|
+
import { a as ce, K as B } from "./platform.es.js";
|
|
7
|
+
import { debounce as J, isEqual as le } from "lodash";
|
|
8
8
|
import { confirmDialog as de } from "primereact/confirmdialog";
|
|
9
9
|
import { toast as H } from "react-toastify";
|
|
10
10
|
import "uuid";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { bp as T, a as ue } from "./searchTerms.es.js";
|
|
12
|
+
import { cT as pe } from "./getUris.es.js";
|
|
13
13
|
import "@module-federation/enhanced/runtime";
|
|
14
14
|
import "./ContextMenuContextInstance.es.js";
|
|
15
15
|
import { createPortal as ge } from "react-dom";
|
|
16
16
|
import { Dialog as fe } from "primereact/dialog";
|
|
17
17
|
import he, { ReadyState as me } from "react-use-websocket";
|
|
18
18
|
import "react-redux";
|
|
19
|
+
import "react-router-dom";
|
|
19
20
|
import "semver";
|
|
20
|
-
const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */
|
|
21
|
+
const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */ R("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
21
22
|
e,
|
|
22
23
|
/* @__PURE__ */ l($, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
|
|
23
|
-
] }),
|
|
24
|
+
] }), xe = p(void 0), At = () => d(xe) || {}, ve = p({
|
|
24
25
|
isLoading: !0,
|
|
25
26
|
modules: [],
|
|
26
27
|
remotesInitialized: !1
|
|
27
28
|
}), Dt = () => {
|
|
28
|
-
const e = d(
|
|
29
|
+
const e = d(ve);
|
|
29
30
|
if (e === void 0)
|
|
30
31
|
throw new Error("useRemoteModules must be used within a RemoteModulesProvider");
|
|
31
32
|
return e;
|
|
32
|
-
},
|
|
33
|
-
const e = d(
|
|
33
|
+
}, be = p(void 0), _t = () => {
|
|
34
|
+
const e = d(be);
|
|
34
35
|
if (e === void 0)
|
|
35
36
|
throw new Error("usePowerpack must be used within a PowerpackProvider");
|
|
36
37
|
return e;
|
|
37
|
-
},
|
|
38
|
-
const e = d(
|
|
38
|
+
}, Se = p(void 0), Nt = () => {
|
|
39
|
+
const e = d(Se);
|
|
39
40
|
if (e === void 0)
|
|
40
41
|
throw new Error("useURIContext must be used within a URIProvider");
|
|
41
42
|
return e;
|
|
42
|
-
},
|
|
43
|
+
}, _ = (e, t = null) => {
|
|
43
44
|
if (!e) return t;
|
|
44
45
|
try {
|
|
45
46
|
return JSON.parse(e);
|
|
46
47
|
} catch {
|
|
47
48
|
return t;
|
|
48
49
|
}
|
|
49
|
-
},
|
|
50
|
+
}, Ot = (e, t) => {
|
|
50
51
|
if (typeof window > "u") return t;
|
|
51
52
|
try {
|
|
52
|
-
return
|
|
53
|
+
return _(sessionStorage.getItem(e), t);
|
|
53
54
|
} catch {
|
|
54
55
|
return t;
|
|
55
56
|
}
|
|
56
|
-
},
|
|
57
|
+
}, Lt = (e, t) => {
|
|
57
58
|
if (!(typeof window > "u"))
|
|
58
59
|
try {
|
|
59
60
|
sessionStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } }));
|
|
@@ -62,18 +63,18 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
|
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
function ye(e, t) {
|
|
65
|
-
const o =
|
|
66
|
+
const o = b(t);
|
|
66
67
|
o.current = t;
|
|
67
|
-
const [i, n] =
|
|
68
|
-
|
|
68
|
+
const [i, n] = S(() => typeof window > "u" ? t : _(sessionStorage.getItem(e), t));
|
|
69
|
+
x(() => {
|
|
69
70
|
const s = sessionStorage.getItem(e);
|
|
70
|
-
n(
|
|
71
|
+
n(_(s, o.current)), s || sessionStorage.setItem(e, JSON.stringify(o.current));
|
|
71
72
|
function a(c) {
|
|
72
73
|
if ("key" in c && c.key && c.key !== e) return;
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
74
|
+
const g = c.detail?.key;
|
|
75
|
+
if (g && g !== e) return;
|
|
75
76
|
const f = sessionStorage.getItem(e);
|
|
76
|
-
n(
|
|
77
|
+
n(_(f, o.current));
|
|
77
78
|
}
|
|
78
79
|
return window.addEventListener("session-storage", a), window.addEventListener("storage", a), () => {
|
|
79
80
|
window.removeEventListener("session-storage", a), window.removeEventListener("storage", a);
|
|
@@ -94,7 +95,7 @@ function ye(e, t) {
|
|
|
94
95
|
);
|
|
95
96
|
return [i, r];
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
+
const N = (e, t = null) => {
|
|
98
99
|
if (!e) return t;
|
|
99
100
|
try {
|
|
100
101
|
return JSON.parse(e);
|
|
@@ -104,7 +105,7 @@ const _ = (e, t = null) => {
|
|
|
104
105
|
}, Ce = (e, t) => {
|
|
105
106
|
if (typeof window > "u") return t;
|
|
106
107
|
try {
|
|
107
|
-
return
|
|
108
|
+
return N(localStorage.getItem(e), t);
|
|
108
109
|
} catch {
|
|
109
110
|
return t;
|
|
110
111
|
}
|
|
@@ -116,20 +117,20 @@ const _ = (e, t = null) => {
|
|
|
116
117
|
console.error(o);
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
function
|
|
120
|
-
const o =
|
|
120
|
+
function jt(e, t) {
|
|
121
|
+
const o = b(t);
|
|
121
122
|
o.current = t;
|
|
122
|
-
const [i, n] =
|
|
123
|
+
const [i, n] = S(() => {
|
|
123
124
|
const s = localStorage.getItem(e);
|
|
124
|
-
return
|
|
125
|
+
return N(s, t);
|
|
125
126
|
});
|
|
126
|
-
|
|
127
|
+
x(() => {
|
|
127
128
|
const s = localStorage.getItem(e);
|
|
128
|
-
n(
|
|
129
|
+
n(N(s, o.current)), s || localStorage.setItem(e, JSON.stringify(o.current));
|
|
129
130
|
function a(c) {
|
|
130
131
|
if (c.key && c.key !== e) return;
|
|
131
|
-
const
|
|
132
|
-
n(
|
|
132
|
+
const g = localStorage.getItem(e);
|
|
133
|
+
n(N(g, o.current));
|
|
133
134
|
}
|
|
134
135
|
return window.addEventListener("storage", a), () => {
|
|
135
136
|
window.removeEventListener("storage", a);
|
|
@@ -152,53 +153,53 @@ function Ot(e, t) {
|
|
|
152
153
|
);
|
|
153
154
|
return [i, r];
|
|
154
155
|
}
|
|
155
|
-
const Ee =
|
|
156
|
+
const Ee = p(void 0), Ie = ["feed", "subtasks", "details", "files"], Te = (e) => typeof e == "string" && Ie.includes(e), Mt = (e) => {
|
|
156
157
|
const { startFrame: t, endFrame: o } = e.activityData || {}, i = e.origin?.id ?? e.entityId;
|
|
157
158
|
if (!Number.isSafeInteger(t) || !i) return null;
|
|
158
159
|
const n = t, r = Number.isSafeInteger(o) ? Math.max(n, o) : n;
|
|
159
160
|
return { entityId: i, startFrame: n, endFrame: r };
|
|
160
|
-
},
|
|
161
|
+
}, Re = () => {
|
|
161
162
|
const e = d(Ee);
|
|
162
163
|
if (e === void 0)
|
|
163
164
|
throw new Error("useDetailsPanel must be used within a DetailsPanelProvider");
|
|
164
165
|
return e;
|
|
165
|
-
}, j = "details/tabs-by-scope",
|
|
166
|
+
}, j = "details/tabs-by-scope", $t = (e, t) => {
|
|
166
167
|
const o = Ce(j, {});
|
|
167
168
|
Pe(j, { ...o, [e]: t });
|
|
168
|
-
},
|
|
169
|
-
const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } =
|
|
169
|
+
}, Ft = (e) => {
|
|
170
|
+
const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } = Re(), [n, r] = ye(j, {}), s = n[e], a = Te(s) ? s : i(e), c = O(
|
|
170
171
|
(f) => {
|
|
171
172
|
r((y) => ({ ...y, [e]: f }));
|
|
172
173
|
},
|
|
173
174
|
[e, r]
|
|
174
|
-
),
|
|
175
|
+
), g = a === "feed";
|
|
175
176
|
return {
|
|
176
177
|
isOpen: t(e),
|
|
177
178
|
setOpen: (f) => o(e, f),
|
|
178
179
|
currentTab: a,
|
|
179
180
|
setTab: c,
|
|
180
|
-
isFeed:
|
|
181
|
+
isFeed: g
|
|
181
182
|
};
|
|
182
|
-
},
|
|
183
|
+
}, ke = p(
|
|
183
184
|
void 0
|
|
184
|
-
),
|
|
185
|
-
const e = d(
|
|
185
|
+
), Ut = () => {
|
|
186
|
+
const e = d(ke);
|
|
186
187
|
if (!e)
|
|
187
188
|
throw new Error("useSubtasksModulesContext must be used within a SubtasksModulesProvider");
|
|
188
189
|
return e;
|
|
189
|
-
},
|
|
190
|
-
const e = d(
|
|
190
|
+
}, Ae = p({}), Vt = () => {
|
|
191
|
+
const e = d(Ae);
|
|
191
192
|
if (!e)
|
|
192
193
|
throw new Error("useThumbnailUploadContext must be used within a ThumbnailUploadProvider");
|
|
193
194
|
return e;
|
|
194
|
-
},
|
|
195
|
-
const e = d(
|
|
195
|
+
}, De = p(void 0), Wt = () => {
|
|
196
|
+
const e = d(De);
|
|
196
197
|
if (e === void 0)
|
|
197
198
|
throw new Error("useSettingsPanel must be used within a SettingsPanelProvider");
|
|
198
199
|
return e;
|
|
199
|
-
},
|
|
200
|
-
function
|
|
201
|
-
const e = d(
|
|
200
|
+
}, _e = p(void 0);
|
|
201
|
+
function Ne() {
|
|
202
|
+
const e = d(_e);
|
|
202
203
|
if (e === void 0)
|
|
203
204
|
throw new Error("usePiPWindow must be used within a PiPContext");
|
|
204
205
|
return e;
|
|
@@ -235,8 +236,8 @@ const Le = u(fe)`
|
|
|
235
236
|
&:hover {
|
|
236
237
|
background-color: #3d3e40;
|
|
237
238
|
}
|
|
238
|
-
`,
|
|
239
|
-
const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } =
|
|
239
|
+
`, Bt = ({ children: e }) => {
|
|
240
|
+
const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } = Ne(), r = o && W.isValidElement(e) ? W.cloneElement(e, { id: o }) : e;
|
|
240
241
|
return !i && o ? /* @__PURE__ */ l(
|
|
241
242
|
Le,
|
|
242
243
|
{
|
|
@@ -264,35 +265,35 @@ const Le = u(fe)`
|
|
|
264
265
|
children: r
|
|
265
266
|
}
|
|
266
267
|
) : t && /* @__PURE__ */ l(Oe, { pipWindow: t, children: /* @__PURE__ */ l("div", { className: "pipRoot", children: r }) });
|
|
267
|
-
}, Me =
|
|
268
|
+
}, Me = p(void 0), Jt = () => {
|
|
268
269
|
const e = d(Me);
|
|
269
270
|
if (!e)
|
|
270
271
|
throw new Error("useAddonProjectContext must be used within a AddonProjectContext");
|
|
271
272
|
return e;
|
|
272
|
-
}, $e =
|
|
273
|
+
}, $e = p(void 0), Ht = () => {
|
|
273
274
|
const e = d($e);
|
|
274
275
|
if (!e)
|
|
275
276
|
throw new Error("useAddonContext must be used within a AddonContext");
|
|
276
277
|
return e;
|
|
277
|
-
}, Fe =
|
|
278
|
+
}, Fe = p(void 0), zt = () => {
|
|
278
279
|
const e = d(Fe);
|
|
279
280
|
if (e === void 0)
|
|
280
281
|
throw new Error("useMenuContext must be used within a MenuProvider");
|
|
281
282
|
return e;
|
|
282
|
-
}, q =
|
|
283
|
+
}, q = p(void 0), Kt = () => {
|
|
283
284
|
const e = d(q);
|
|
284
285
|
if (e === void 0)
|
|
285
286
|
throw new Error("useSocketContext must be used within a SocketProvider");
|
|
286
287
|
return e;
|
|
287
|
-
}, Ue = window.location.protocol.replace("http", "ws"), Ve = `${Ue}//${window.location.host}/ws`,
|
|
288
|
+
}, Ue = window.location.protocol.replace("http", "ws"), Ve = `${Ue}//${window.location.host}/ws`, qt = ({
|
|
288
289
|
children: e,
|
|
289
290
|
userName: t,
|
|
290
291
|
projectName: o,
|
|
291
292
|
dispatch: i
|
|
292
293
|
}) => {
|
|
293
|
-
const [n, r] =
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
const [n, r] = S(!1), [s, a] = S([]), [c] = pe(), g = b(!1);
|
|
295
|
+
x(() => {
|
|
296
|
+
g.current = n;
|
|
296
297
|
}, [n]);
|
|
297
298
|
const f = {
|
|
298
299
|
shouldReconnect: () => !t || !localStorage.getItem("accessToken") ? !1 : (c({ full: !1 }).unwrap(), !0)
|
|
@@ -310,33 +311,33 @@ const Le = u(fe)`
|
|
|
310
311
|
})
|
|
311
312
|
);
|
|
312
313
|
};
|
|
313
|
-
|
|
314
|
+
x(() => {
|
|
314
315
|
console.debug("Topics changed", s), m();
|
|
315
316
|
}, [s, o]);
|
|
316
|
-
const
|
|
317
|
-
|
|
317
|
+
const k = b(s);
|
|
318
|
+
k.current = s;
|
|
318
319
|
const h = re(
|
|
319
|
-
() =>
|
|
320
|
-
le(
|
|
320
|
+
() => J((w) => {
|
|
321
|
+
le(k.current, w) || (console.log("WS: Subscriptions changed"), a(w));
|
|
321
322
|
}, 200),
|
|
322
323
|
[]
|
|
323
324
|
);
|
|
324
|
-
|
|
325
|
+
x(() => (T.setOnSubscriptionsChange((w) => h(w)), h(T.getSubscriptions("")), () => {
|
|
325
326
|
T.setOnSubscriptionsChange(null), h.cancel();
|
|
326
327
|
}), [h]);
|
|
327
|
-
const [
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
const [A, Q] = S(!1), [F, Z] = S(!1);
|
|
329
|
+
x(() => {
|
|
330
|
+
A && !F && (H.warning(/* @__PURE__ */ l(we, {}), {
|
|
330
331
|
autoClose: !1,
|
|
331
332
|
closeButton: !1
|
|
332
333
|
}), Z(!0));
|
|
333
|
-
}, [
|
|
334
|
-
const E =
|
|
334
|
+
}, [A, F]);
|
|
335
|
+
const E = b({ callCount: 0, lastCall: Date.now() }), ee = J(() => {
|
|
335
336
|
console.log("Resetting API state due to server restart"), r(!1), i(ue.util.resetApiState());
|
|
336
337
|
}, 1e3), te = O(
|
|
337
338
|
(w) => {
|
|
338
339
|
if (E.current.callCount > 1e3)
|
|
339
|
-
return
|
|
340
|
+
return Q(!0), console.log(
|
|
340
341
|
"Overload: Over 1000 messages per second. Ignoring subsequent messages."
|
|
341
342
|
);
|
|
342
343
|
let I;
|
|
@@ -346,22 +347,22 @@ const Le = u(fe)`
|
|
|
346
347
|
console.error("Failed to parse websocket message:", se, w.data);
|
|
347
348
|
return;
|
|
348
349
|
}
|
|
349
|
-
const { topic:
|
|
350
|
-
if (
|
|
350
|
+
const { topic: v, sender: U, summary: oe, status: ne } = I || {};
|
|
351
|
+
if (g.current && (v === "heartbeat" || v === "server.started" && ne === "finished")) {
|
|
351
352
|
console.log("Server replica booted"), ee();
|
|
352
353
|
return;
|
|
353
354
|
}
|
|
354
|
-
if (
|
|
355
|
-
if (
|
|
355
|
+
if (v === "heartbeat") return;
|
|
356
|
+
if (v === "server.restart_requested" && (console.log("Server restart requested"), r(!0)), ["import.data"].includes(v)) {
|
|
356
357
|
if (U !== window.senderId) return;
|
|
357
358
|
} else if (U === window.senderId)
|
|
358
359
|
return;
|
|
359
360
|
const V = Date.now();
|
|
360
|
-
V - E.current.lastCall < 1e3 ? E.current.callCount += 1 : E.current.callCount = 0, console.log("Event RX", I), E.current.lastCall = V,
|
|
361
|
+
V - E.current.lastCall < 1e3 ? E.current.callCount += 1 : E.current.callCount = 0, console.log("Event RX", I), E.current.lastCall = V, v === "shout" && I?.summary?.text && H.info(oe.text), T.publish(v, I);
|
|
361
362
|
},
|
|
362
363
|
[r]
|
|
363
364
|
);
|
|
364
|
-
return
|
|
365
|
+
return x(() => {
|
|
365
366
|
C === me.OPEN && (P().onmessage = te, m(), T.publish("client.connected", {
|
|
366
367
|
topic: "client.connected"
|
|
367
368
|
}));
|
|
@@ -376,19 +377,19 @@ const Le = u(fe)`
|
|
|
376
377
|
children: e
|
|
377
378
|
}
|
|
378
379
|
);
|
|
379
|
-
}, Y =
|
|
380
|
+
}, Y = p(void 0), Yt = () => {
|
|
380
381
|
const e = d(Y);
|
|
381
382
|
if (e === void 0)
|
|
382
383
|
throw new Error("useProjectContext must be used within a ProjectContextProvider");
|
|
383
384
|
return e;
|
|
384
|
-
},
|
|
385
|
+
}, Gt = () => d(Y), We = p(
|
|
385
386
|
void 0
|
|
386
|
-
),
|
|
387
|
+
), Xt = () => {
|
|
387
388
|
const e = d(We);
|
|
388
389
|
if (e === void 0)
|
|
389
390
|
throw new Error("useProjectFoldersContext must be used within a ProjectFoldersContextProvider");
|
|
390
391
|
return e;
|
|
391
|
-
}, G =
|
|
392
|
+
}, G = p(void 0), Be = (e) => ({
|
|
392
393
|
created: e,
|
|
393
394
|
label_changed: e,
|
|
394
395
|
renamed: e,
|
|
@@ -397,7 +398,7 @@ const Le = u(fe)`
|
|
|
397
398
|
tags_changed: e,
|
|
398
399
|
attrib_changed: e,
|
|
399
400
|
deleted: e
|
|
400
|
-
}),
|
|
401
|
+
}), Je = (e, t) => e === t || e.startsWith(`${t}.`), He = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), ze = (e) => {
|
|
401
402
|
const t = e.split(".").pop();
|
|
402
403
|
if (t && [
|
|
403
404
|
"created",
|
|
@@ -410,7 +411,7 @@ const Le = u(fe)`
|
|
|
410
411
|
"deleted"
|
|
411
412
|
].includes(t))
|
|
412
413
|
return t;
|
|
413
|
-
},
|
|
414
|
+
}, Qt = ({
|
|
414
415
|
projectNames: e,
|
|
415
416
|
topics: t,
|
|
416
417
|
isSyncing: o = !1,
|
|
@@ -419,26 +420,26 @@ const Le = u(fe)`
|
|
|
419
420
|
const n = d(G);
|
|
420
421
|
if (!n)
|
|
421
422
|
throw new Error("useSyncUpdates must be used within an EntityUpdatesProvider");
|
|
422
|
-
const r = e || n.projectNames, s =
|
|
423
|
-
(
|
|
423
|
+
const r = e || n.projectNames, s = b(0), a = b(!1), c = n.updates.filter(
|
|
424
|
+
(g) => He(g.project, r) && t.some((f) => Je(g.topic, f)) && (i?.(g) ?? !0)
|
|
424
425
|
);
|
|
425
|
-
return
|
|
426
|
+
return x(() => {
|
|
426
427
|
o && !a.current ? s.current = n.getLatestId() : !o && a.current && n.acknowledge(t, r, s.current), a.current = o;
|
|
427
428
|
}, [n, o, r, t]), {
|
|
428
429
|
updates: c,
|
|
429
430
|
hasUpdates: c.length > 0,
|
|
430
431
|
updateCount: c.length
|
|
431
432
|
};
|
|
432
|
-
},
|
|
433
|
+
}, Zt = () => {
|
|
433
434
|
const e = d(G);
|
|
434
435
|
if (!e)
|
|
435
436
|
throw new Error("useAutoSyncSettings must be used within an EntityUpdatesProvider");
|
|
436
437
|
const { autoSyncSettings: t, setAutoSyncSettings: o } = e;
|
|
437
438
|
return [t, (n) => {
|
|
438
439
|
const { settings: r, global: s } = n;
|
|
439
|
-
o(s !== void 0 ?
|
|
440
|
+
o(s !== void 0 ? Be(s) : (a) => ({ ...a, ...r }));
|
|
440
441
|
}];
|
|
441
|
-
},
|
|
442
|
+
}, eo = (e, t) => {
|
|
442
443
|
if (!t) return !1;
|
|
443
444
|
const o = ze(e);
|
|
444
445
|
return o ? t[o] : !1;
|
|
@@ -524,24 +525,24 @@ const Le = u(fe)`
|
|
|
524
525
|
isSaveable: s,
|
|
525
526
|
highlighted: a,
|
|
526
527
|
onEdit: c,
|
|
527
|
-
onSave:
|
|
528
|
+
onSave: g,
|
|
528
529
|
onResetView: f,
|
|
529
530
|
className: y,
|
|
530
531
|
...C
|
|
531
532
|
}, P) => {
|
|
532
|
-
const { viewAlias: m } = ot(),
|
|
533
|
-
h.stopPropagation(),
|
|
533
|
+
const { viewAlias: m } = ot(), k = (h, A) => {
|
|
534
|
+
h.stopPropagation(), A ? de({
|
|
534
535
|
message: `Save current ${m} settings and overwrite this ${m}?`,
|
|
535
536
|
header: "Confirm save",
|
|
536
|
-
accept: () =>
|
|
537
|
-
}) :
|
|
537
|
+
accept: () => g && g(h, e)
|
|
538
|
+
}) : g && g(h, e);
|
|
538
539
|
};
|
|
539
|
-
return /* @__PURE__ */
|
|
540
|
+
return /* @__PURE__ */ R(
|
|
540
541
|
Ke,
|
|
541
542
|
{
|
|
542
543
|
...C,
|
|
543
544
|
id: e,
|
|
544
|
-
className:
|
|
545
|
+
className: D(y, { selected: n }),
|
|
545
546
|
ref: P,
|
|
546
547
|
children: [
|
|
547
548
|
o && o,
|
|
@@ -554,7 +555,7 @@ const Le = u(fe)`
|
|
|
554
555
|
className: "reset",
|
|
555
556
|
onClick: f,
|
|
556
557
|
"data-tooltip": "Reset to Default",
|
|
557
|
-
"data-shortcut": ce("0", [
|
|
558
|
+
"data-shortcut": ce("0", [B.Shift, B.Ctrl])
|
|
558
559
|
}
|
|
559
560
|
),
|
|
560
561
|
r && s && !n && /* @__PURE__ */ l(
|
|
@@ -562,8 +563,8 @@ const Le = u(fe)`
|
|
|
562
563
|
{
|
|
563
564
|
icon: "save",
|
|
564
565
|
variant: "text",
|
|
565
|
-
className:
|
|
566
|
-
onClick: (h) =>
|
|
566
|
+
className: D("save", { active: a === "save" }),
|
|
567
|
+
onClick: (h) => k(h, a !== "save"),
|
|
567
568
|
"data-tooltip": `Save ${m} settings from current ${m}`
|
|
568
569
|
}
|
|
569
570
|
),
|
|
@@ -572,7 +573,7 @@ const Le = u(fe)`
|
|
|
572
573
|
{
|
|
573
574
|
variant: "text",
|
|
574
575
|
icon: "more_horiz",
|
|
575
|
-
className:
|
|
576
|
+
className: D("more", { active: a === "edit" }),
|
|
576
577
|
onClick: (h) => c(h, e),
|
|
577
578
|
"data-tooltip": `Edit ${m}`
|
|
578
579
|
}
|
|
@@ -595,7 +596,7 @@ const Le = u(fe)`
|
|
|
595
596
|
flex-direction: column;
|
|
596
597
|
gap: var(--base-gap-small);
|
|
597
598
|
margin-bottom: var(--padding-s);
|
|
598
|
-
`,
|
|
599
|
+
`, Xe = u.li`
|
|
599
600
|
height: 1px;
|
|
600
601
|
background-color: var(--md-sys-color-outline-variant);
|
|
601
602
|
margin: 4px 0;
|
|
@@ -604,7 +605,7 @@ u.li`
|
|
|
604
605
|
${z.labelSmall}
|
|
605
606
|
color: var(--md-sys-color-outline);
|
|
606
607
|
`;
|
|
607
|
-
const
|
|
608
|
+
const Qe = u.li`
|
|
608
609
|
${z.labelSmall}
|
|
609
610
|
color: var(--md-sys-color-outline);
|
|
610
611
|
user-select: none;
|
|
@@ -641,11 +642,11 @@ const Xe = u.li`
|
|
|
641
642
|
display: inline-flex;
|
|
642
643
|
}
|
|
643
644
|
`, Ze = M(
|
|
644
|
-
({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */
|
|
645
|
-
|
|
645
|
+
({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */ R(
|
|
646
|
+
Qe,
|
|
646
647
|
{
|
|
647
648
|
...i,
|
|
648
|
-
className:
|
|
649
|
+
className: D("views-section-header", { collapsed: t }, o),
|
|
649
650
|
ref: n,
|
|
650
651
|
children: [
|
|
651
652
|
/* @__PURE__ */ l("span", { children: e }),
|
|
@@ -654,8 +655,8 @@ const Xe = u.li`
|
|
|
654
655
|
]
|
|
655
656
|
}
|
|
656
657
|
)
|
|
657
|
-
),
|
|
658
|
-
({ items: e, selected: t, ...o }, i) => /* @__PURE__ */ l(Ye, { children: /* @__PURE__ */ l(Ge, { ...o, ref: i, children: e.map((n, r) => n === "_divider_" ? /* @__PURE__ */ l(
|
|
658
|
+
), to = "_divider_", et = (e) => typeof e == "object" && e !== null && "type" in e && e.type === "section", oo = M(
|
|
659
|
+
({ items: e, selected: t, ...o }, i) => /* @__PURE__ */ l(Ye, { children: /* @__PURE__ */ l(Ge, { ...o, ref: i, children: e.map((n, r) => n === "_divider_" ? /* @__PURE__ */ l(Xe, {}, r) : et(n) ? /* @__PURE__ */ l(
|
|
659
660
|
Ze,
|
|
660
661
|
{
|
|
661
662
|
id: n.id,
|
|
@@ -674,12 +675,12 @@ const Xe = u.li`
|
|
|
674
675
|
},
|
|
675
676
|
(n.id || "") + r.toString()
|
|
676
677
|
)) }) })
|
|
677
|
-
), tt =
|
|
678
|
+
), tt = p(null), ot = () => {
|
|
678
679
|
const e = d(tt);
|
|
679
680
|
if (!e)
|
|
680
681
|
throw new Error("useViewsContext must be used within a ViewsProvider");
|
|
681
682
|
return e;
|
|
682
|
-
},
|
|
683
|
+
}, no = 1, nt = u.div`
|
|
683
684
|
min-width: 350px;
|
|
684
685
|
`, st = u.div`
|
|
685
686
|
margin-top: 12px;
|
|
@@ -692,32 +693,32 @@ const Xe = u.li`
|
|
|
692
693
|
margin-top: 12px;
|
|
693
694
|
font-weight: 600;
|
|
694
695
|
color: var(--md-sys-color-error);
|
|
695
|
-
`,
|
|
696
|
+
`, so = ({
|
|
696
697
|
entityLabel: e,
|
|
697
698
|
childrenDetails: t,
|
|
698
699
|
totalLine: o,
|
|
699
700
|
message: i
|
|
700
|
-
}) => /* @__PURE__ */
|
|
701
|
+
}) => /* @__PURE__ */ R(nt, { children: [
|
|
701
702
|
/* @__PURE__ */ l("p", { children: i || `Are you sure you want to delete ${e}? This action cannot be undone.` }),
|
|
702
|
-
t.length > 0 && /* @__PURE__ */
|
|
703
|
+
t.length > 0 && /* @__PURE__ */ R(st, { children: [
|
|
703
704
|
/* @__PURE__ */ l(rt, { children: "The following will also be affected:" }),
|
|
704
705
|
t.map((n, r) => /* @__PURE__ */ l("p", { children: n }, r))
|
|
705
706
|
] }),
|
|
706
707
|
o && /* @__PURE__ */ l(at, { children: o })
|
|
707
|
-
] }),
|
|
708
|
+
] }), ro = u(ie)`
|
|
708
709
|
max-height: min(600px, 90vh);
|
|
709
|
-
`,
|
|
710
|
+
`, ao = u.div`
|
|
710
711
|
display: flex;
|
|
711
712
|
flex-direction: column;
|
|
712
713
|
width: 100%;
|
|
713
|
-
`,
|
|
714
|
+
`, io = u.label`
|
|
714
715
|
margin: 2px 0 14px 0;
|
|
715
|
-
`,
|
|
716
|
+
`, co = u.div`
|
|
716
717
|
display: flex;
|
|
717
718
|
padding-top: 14px;
|
|
718
719
|
gap: 8px;
|
|
719
720
|
justify-content: flex-end;
|
|
720
|
-
`,
|
|
721
|
+
`, lo = u.div`
|
|
721
722
|
display: flex;
|
|
722
723
|
flex-direction: column;
|
|
723
724
|
gap: 8px;
|
|
@@ -726,14 +727,14 @@ const Xe = u.li`
|
|
|
726
727
|
/* scroll container clips the inputs' 2px focus outline — inset it, then pull back to keep alignment */
|
|
727
728
|
padding: 4px;
|
|
728
729
|
margin: -4px;
|
|
729
|
-
`,
|
|
730
|
+
`, uo = u.label`
|
|
730
731
|
display: flex;
|
|
731
732
|
align-items: center;
|
|
732
733
|
justify-content: space-between;
|
|
733
734
|
gap: 12px;
|
|
734
|
-
`,
|
|
735
|
+
`, po = u(K)`
|
|
735
736
|
width: 180px;
|
|
736
|
-
`,
|
|
737
|
+
`, go = u(K)`
|
|
737
738
|
width: 100%;
|
|
738
739
|
/* room for the 2px focus outline */
|
|
739
740
|
margin: 2px 0;
|
|
@@ -744,84 +745,87 @@ const Xe = u.li`
|
|
|
744
745
|
"version",
|
|
745
746
|
"representation",
|
|
746
747
|
"workfile"
|
|
747
|
-
]),
|
|
748
|
-
const e = d(
|
|
748
|
+
]), fo = (e) => !!e && it.has(e), X = p(null), ho = () => {
|
|
749
|
+
const e = d(X);
|
|
749
750
|
if (!e)
|
|
750
751
|
throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
|
|
751
752
|
return e;
|
|
752
|
-
},
|
|
753
|
+
}, mo = () => d(X), wo = "tableExport", ct = p(null), xo = () => d(ct);
|
|
753
754
|
export {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
755
|
+
qt as $,
|
|
756
|
+
j as A,
|
|
757
|
+
Te as B,
|
|
758
|
+
go as C,
|
|
759
|
+
so as D,
|
|
759
760
|
G as E,
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
761
|
+
ao as F,
|
|
762
|
+
Nt as G,
|
|
763
|
+
Ee as H,
|
|
764
|
+
ke as I,
|
|
765
|
+
De as J,
|
|
766
|
+
_e as K,
|
|
766
767
|
Me as L,
|
|
767
768
|
Fe as M,
|
|
768
769
|
$e as N,
|
|
769
|
-
|
|
770
|
+
be as O,
|
|
770
771
|
Y as P,
|
|
771
|
-
|
|
772
|
+
xe as Q,
|
|
772
773
|
we as R,
|
|
773
|
-
|
|
774
|
-
|
|
774
|
+
ro as S,
|
|
775
|
+
Ae as T,
|
|
775
776
|
We as U,
|
|
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
|
-
|
|
777
|
+
Se as V,
|
|
778
|
+
X as W,
|
|
779
|
+
wo as X,
|
|
780
|
+
ct as Y,
|
|
781
|
+
Bt as Z,
|
|
782
|
+
q as _,
|
|
783
|
+
_t as a,
|
|
784
|
+
Mt as a0,
|
|
785
|
+
eo as a1,
|
|
786
|
+
fo as a2,
|
|
787
|
+
$t as a3,
|
|
788
|
+
Ht as a4,
|
|
789
|
+
Jt as a5,
|
|
790
|
+
Zt as a6,
|
|
791
|
+
ho as a7,
|
|
792
|
+
mo as a8,
|
|
793
|
+
Ne as a9,
|
|
794
|
+
Ft as aa,
|
|
795
|
+
Wt as ab,
|
|
796
|
+
Kt as ac,
|
|
797
|
+
Ut as ad,
|
|
798
|
+
Qt as ae,
|
|
799
|
+
xo as af,
|
|
800
|
+
Vt as ag,
|
|
801
|
+
to as ah,
|
|
802
|
+
tt as ai,
|
|
803
|
+
Ze as aj,
|
|
804
|
+
oo as ak,
|
|
805
|
+
qe as al,
|
|
806
|
+
Je as b,
|
|
807
|
+
Dt as c,
|
|
808
|
+
At as d,
|
|
805
809
|
ot as e,
|
|
806
|
-
|
|
810
|
+
no as f,
|
|
807
811
|
ze as g,
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
812
|
+
io as h,
|
|
813
|
+
lo as i,
|
|
814
|
+
uo as j,
|
|
815
|
+
po as k,
|
|
816
|
+
co as l,
|
|
813
817
|
He as m,
|
|
814
|
-
|
|
815
|
-
|
|
818
|
+
Gt as n,
|
|
819
|
+
Re as o,
|
|
816
820
|
ye as p,
|
|
817
821
|
Ce as q,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
+
Ot as r,
|
|
823
|
+
jt as s,
|
|
824
|
+
Be as t,
|
|
825
|
+
zt as u,
|
|
822
826
|
Pe as v,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
+
Lt as w,
|
|
828
|
+
Yt as x,
|
|
829
|
+
Xt as y,
|
|
830
|
+
ve as z
|
|
827
831
|
};
|