@ynput/ayon-frontend-shared 0.8.1 → 0.10.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/DetailsPanel.es.js +39 -39
- package/dist/ListTable.es.js +738 -651
- package/dist/NewEntity.es.js +4 -2
- package/dist/ProjectTreeTable.es.js +4208 -4185
- package/dist/ProjectsTable.es.js +5 -4
- package/dist/Slicer.es.js +327 -294
- package/dist/Views.es.js +725 -713
- package/dist/chunks/ColumnDropIndicator.es.js +33 -27
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +112 -110
- package/dist/chunks/FilmstripEntityCard.es.js +2 -2
- package/dist/chunks/GroupSettingsFallback.es.js +3 -2
- package/dist/chunks/MetaWidget.es.js +828 -809
- package/dist/chunks/NewEntityContextInstance.es.js +6 -5
- package/dist/chunks/ReviewablesSelector.es.js +76 -76
- package/dist/chunks/SimpleTable.es.js +151 -149
- package/dist/chunks/Slicer.es.js +637 -617
- package/dist/chunks/TableExportContextInstance.es.js +415 -471
- package/dist/chunks/ThumbnailSimple.es.js +11 -11
- package/dist/chunks/Watchers.es.js +46 -46
- package/dist/chunks/getUris.es.js +1069 -1057
- package/dist/chunks/searchTerms.es.js +617 -581
- package/dist/chunks/useCreateContextMenu.es.js +15 -13
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +916 -884
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/index.es.js +11 -10
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +18 -17
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +18 -17
- package/dist/types/ListTable.d.ts +28 -18
- package/dist/types/NewEntity.d.ts +19 -16
- package/dist/types/ProjectTreeTable.d.ts +62 -19
- package/dist/types/ProjectsTable.d.ts +18 -17
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +18 -17
- package/dist/types/Slicer.d.ts +24 -17
- package/dist/types/Views.d.ts +23 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +64 -18
- package/dist/types/context.d.ts +28 -18
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +38 -16
- package/dist/util.es.js +116 -113
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useMemo as
|
|
1
|
+
import { useMemo as v, useRef as x, useCallback as h, useState as A, useEffect as T } from "react";
|
|
2
2
|
import "react-toastify";
|
|
3
3
|
import "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { g as d } from "./iconUtils.es.js";
|
|
6
|
-
import {
|
|
6
|
+
import { bD as E } from "./searchTerms.es.js";
|
|
7
7
|
import "uuid";
|
|
8
8
|
import "axios";
|
|
9
9
|
import { jsx as L } from "react/jsx-runtime";
|
|
@@ -29,19 +29,19 @@ import "@module-federation/enhanced/runtime";
|
|
|
29
29
|
import "@ynput/ayon-addon/host";
|
|
30
30
|
import "semver";
|
|
31
31
|
import "./ContextMenuContextInstance.es.js";
|
|
32
|
-
import { createPortal as
|
|
32
|
+
import { createPortal as D } from "react-dom";
|
|
33
33
|
import "react-router-dom";
|
|
34
34
|
import "@tanstack/react-table";
|
|
35
35
|
import "react-redux";
|
|
36
|
-
import { useDndContext as
|
|
37
|
-
import { a as
|
|
38
|
-
const
|
|
36
|
+
import { useDndContext as I } from "@dnd-kit/core";
|
|
37
|
+
import { a as R } from "./addonColumnTags.es.js";
|
|
38
|
+
const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(o.data.type || "") && (!s || o.scope?.includes(s)) ? n ? E(o.data) : !0 : !1, xt = ({
|
|
39
39
|
allowedTypes: o,
|
|
40
40
|
enumOnly: s,
|
|
41
41
|
scope: t
|
|
42
42
|
}) => {
|
|
43
43
|
const { columnOrder: n } = S(), { attribFields: a } = k();
|
|
44
|
-
return
|
|
44
|
+
return v(
|
|
45
45
|
() => [
|
|
46
46
|
{
|
|
47
47
|
value: "folderType",
|
|
@@ -49,6 +49,12 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
49
49
|
icon: d("folder"),
|
|
50
50
|
scopes: ["folder", "task"]
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
value: "folderId",
|
|
54
|
+
label: "Folder",
|
|
55
|
+
icon: d("folder"),
|
|
56
|
+
scopes: ["version"]
|
|
57
|
+
},
|
|
52
58
|
{
|
|
53
59
|
value: "taskType",
|
|
54
60
|
label: "Task type",
|
|
@@ -91,7 +97,7 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
91
97
|
icon: d("tags"),
|
|
92
98
|
scopes: ["task", "version", "folder", "product"]
|
|
93
99
|
},
|
|
94
|
-
...a.filter((r) =>
|
|
100
|
+
...a.filter((r) => B(r, t, o, s)).map((r) => ({
|
|
95
101
|
value: "attrib." + r.name,
|
|
96
102
|
label: r.data.title || r.name,
|
|
97
103
|
icon: d(r.name)
|
|
@@ -102,7 +108,7 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
102
108
|
}),
|
|
103
109
|
[a, n, o, s, t]
|
|
104
110
|
);
|
|
105
|
-
},
|
|
111
|
+
}, F = "data-column-dnd-container", y = 100, yt = ({
|
|
106
112
|
columnPinning: o,
|
|
107
113
|
columnSizing: s
|
|
108
114
|
}) => {
|
|
@@ -116,16 +122,16 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
116
122
|
({ transform: e, activeNodeRect: l, draggingNodeRect: g, active: p }) => {
|
|
117
123
|
if (t.current === null || !l || p?.data.current?.type && p.data.current.type !== "column") return e;
|
|
118
124
|
let i = n.current;
|
|
119
|
-
i === null && (i = (document.querySelector(`[${
|
|
120
|
-
const
|
|
125
|
+
i === null && (i = (document.querySelector(`[${F}]`)?.getBoundingClientRect().left ?? 0) + a());
|
|
126
|
+
const b = g?.left ?? l.left;
|
|
121
127
|
if (t.current) {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
return { ...e, x: f -
|
|
128
|
+
const C = b + l.width + e.x, f = i + y;
|
|
129
|
+
if (C > f)
|
|
130
|
+
return { ...e, x: f - b - l.width };
|
|
125
131
|
} else {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
return { ...e, x: f -
|
|
132
|
+
const C = b + e.x, f = i - y;
|
|
133
|
+
if (C < f)
|
|
134
|
+
return { ...e, x: f - b };
|
|
129
135
|
}
|
|
130
136
|
return e;
|
|
131
137
|
},
|
|
@@ -151,15 +157,15 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
151
157
|
activePinnedState: t,
|
|
152
158
|
setCachedBoundary: c
|
|
153
159
|
};
|
|
154
|
-
},
|
|
160
|
+
}, P = (o, s) => {
|
|
155
161
|
const t = o.getBoundingClientRect(), n = o.closest("table")?.getBoundingClientRect() ?? t;
|
|
156
162
|
return {
|
|
157
163
|
left: s === "left" ? t.left - 1 : t.right - 1,
|
|
158
164
|
top: n.top,
|
|
159
165
|
height: n.height
|
|
160
166
|
};
|
|
161
|
-
}, _ = "th[data-column-id]",
|
|
162
|
-
const { active: o, over: s } =
|
|
167
|
+
}, _ = "th[data-column-id]", vt = () => {
|
|
168
|
+
const { active: o, over: s } = I(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = A(null);
|
|
163
169
|
return T(() => {
|
|
164
170
|
if (!t || !n || t === n) {
|
|
165
171
|
r(null);
|
|
@@ -171,7 +177,7 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
171
177
|
document.querySelectorAll(_)
|
|
172
178
|
), e = c.find((l) => l.dataset.columnId === n);
|
|
173
179
|
if (e) {
|
|
174
|
-
const l = c.findIndex((i) => i.dataset.columnId === t), g = c.indexOf(e), p =
|
|
180
|
+
const l = c.findIndex((i) => i.dataset.columnId === t), g = c.indexOf(e), p = P(e, l < g ? "right" : "left");
|
|
175
181
|
r(
|
|
176
182
|
(i) => i && i.left === p.left && i.top === p.top && i.height === p.height ? i : p
|
|
177
183
|
);
|
|
@@ -179,15 +185,15 @@ const I = ["string", "integer", "float"], O = (o, s, t, n) => (t || I).includes(
|
|
|
179
185
|
m = requestAnimationFrame(u);
|
|
180
186
|
};
|
|
181
187
|
return u(), () => cancelAnimationFrame(m);
|
|
182
|
-
}, [t, n]), a ?
|
|
188
|
+
}, [t, n]), a ? D(/* @__PURE__ */ L(R, { style: a }), document.body) : null;
|
|
183
189
|
};
|
|
184
190
|
export {
|
|
185
191
|
_ as C,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
192
|
+
vt as T,
|
|
193
|
+
F as a,
|
|
194
|
+
O as b,
|
|
189
195
|
xt as c,
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
P as g,
|
|
197
|
+
B as i,
|
|
192
198
|
yt as u
|
|
193
199
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as d, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as l, jsxs as d, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E, useMemo as F } from "react";
|
|
3
3
|
import { Button as D } from "@ynput/ayon-react-components";
|
|
4
|
-
import { S as
|
|
4
|
+
import { S as j, D as z, d as $, F as N, e as T, C as O, f as I, g as M, h as R, i as K } from "./TableExportContextInstance.es.js";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
7
|
import "react-toastify";
|
|
@@ -24,7 +24,8 @@ const oe = [
|
|
|
24
24
|
"columnSummaries",
|
|
25
25
|
"listValues",
|
|
26
26
|
"entityLinks",
|
|
27
|
-
"tableExport"
|
|
27
|
+
"tableExport",
|
|
28
|
+
"personalApiKeys"
|
|
28
29
|
], se = {
|
|
29
30
|
annotations: {
|
|
30
31
|
label: "Annotations",
|
|
@@ -100,6 +101,11 @@ const oe = [
|
|
|
100
101
|
label: "Table Export",
|
|
101
102
|
description: "Export a table or the selected rows to Excel or CSV, with every row and inherited attribute, ready to import back.",
|
|
102
103
|
bullet: "Export tables to Excel and CSV"
|
|
104
|
+
},
|
|
105
|
+
personalApiKeys: {
|
|
106
|
+
label: "Personal API Keys",
|
|
107
|
+
description: "Create your own API keys on your profile, each with a name and an expiry, for scripts and tools that work as you.",
|
|
108
|
+
bullet: "Personal API keys for scripts and tools"
|
|
103
109
|
}
|
|
104
110
|
}, C = [
|
|
105
111
|
"folder",
|
|
@@ -108,7 +114,7 @@ const oe = [
|
|
|
108
114
|
"version",
|
|
109
115
|
"representation",
|
|
110
116
|
"workfile"
|
|
111
|
-
],
|
|
117
|
+
], _ = (o) => o.length <= 1 ? o.join("") : `${o.slice(0, -1).join(", ")} and ${o[o.length - 1]}`, ne = (o) => {
|
|
112
118
|
if (o.length === 1) {
|
|
113
119
|
const e = o[0];
|
|
114
120
|
return `${e.entityType} "${e.label || e.name || e.id}"`;
|
|
@@ -118,8 +124,8 @@ const oe = [
|
|
|
118
124
|
const a = C.filter((e) => r[e] > 0).map(
|
|
119
125
|
(e) => u(r[e], e)
|
|
120
126
|
);
|
|
121
|
-
return
|
|
122
|
-
},
|
|
127
|
+
return _(a);
|
|
128
|
+
}, ie = (o, r) => {
|
|
123
129
|
const a = {}, e = (s, t) => {
|
|
124
130
|
t > 0 && (a[s] = (a[s] || 0) + t);
|
|
125
131
|
};
|
|
@@ -127,19 +133,19 @@ const oe = [
|
|
|
127
133
|
for (const s of r)
|
|
128
134
|
e("folder", s.totalFolderCount), e("task", s.totalTaskCount), e("product", s.totalProductCount), e("version", s.totalVersionCount);
|
|
129
135
|
return a;
|
|
130
|
-
},
|
|
136
|
+
}, G = (o) => C.reduce((r, a) => r + (o[a] || 0), 0), g = 8, re = (o, r) => {
|
|
131
137
|
if (o.length === 0) return [];
|
|
132
138
|
const a = new Map(r.map((t) => [t.id, t])), e = o.length > 1, s = [];
|
|
133
139
|
for (const t of o) {
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
140
|
+
const n = a.get(t.id), p = t.label || t.name || t.id, m = e ? `"${p}" contains ` : "Contains ";
|
|
141
|
+
if (n && (n.totalFolderCount > 0 || n.totalTaskCount > 0 || n.totalProductCount > 0 || n.totalVersionCount > 0)) {
|
|
136
142
|
const c = [];
|
|
137
|
-
|
|
143
|
+
n.totalFolderCount > 0 && c.push(u(n.totalFolderCount, "child folder")), n.totalTaskCount > 0 && c.push(u(n.totalTaskCount, "task")), n.totalProductCount > 0 && c.push(u(n.totalProductCount, "product")), n.totalVersionCount > 0 && c.push(u(n.totalVersionCount, "version")), s.push(`${m}${c.join(", ")}`);
|
|
138
144
|
} else
|
|
139
145
|
t.hasChildren && s.push(`${m}child folders`), t.taskNames && t.taskNames.length > 0 && s.push(`${m}${u(t.taskNames.length, "task")}`);
|
|
140
146
|
}
|
|
141
147
|
return s.length > g ? [...s.slice(0, g), `…and ${s.length - g} more`] : s;
|
|
142
|
-
},
|
|
148
|
+
}, H = (o, r) => {
|
|
143
149
|
const a = (o ?? "").trim();
|
|
144
150
|
return a !== "" && Number(a) === r;
|
|
145
151
|
}, ae = ({
|
|
@@ -151,17 +157,17 @@ const oe = [
|
|
|
151
157
|
entityLabel: e,
|
|
152
158
|
childrenDetails: s,
|
|
153
159
|
expectedCounts: t,
|
|
154
|
-
expectedName:
|
|
160
|
+
expectedName: n,
|
|
155
161
|
deleteLabel: p = "Delete forever",
|
|
156
162
|
message: m
|
|
157
|
-
} = o, [f, c] =
|
|
158
|
-
() => C.filter((
|
|
163
|
+
} = o, [f, c] = E(""), [y, x] = E({}), w = F(
|
|
164
|
+
() => C.filter((i) => (t[i] || 0) > 0),
|
|
159
165
|
[t]
|
|
160
|
-
), b =
|
|
161
|
-
|
|
166
|
+
), b = F(() => G(t), [t]), h = b > $, v = !!n && !h, k = h ? w.every((i) => H(y[i], t[i])) : v ? f.trim() === n : !0, S = (i) => {
|
|
167
|
+
i.key === "Enter" && k && (i.preventDefault(), r());
|
|
162
168
|
};
|
|
163
169
|
return /* @__PURE__ */ l(
|
|
164
|
-
|
|
170
|
+
j,
|
|
165
171
|
{
|
|
166
172
|
size: "md",
|
|
167
173
|
isOpen: !0,
|
|
@@ -170,43 +176,43 @@ const oe = [
|
|
|
170
176
|
footer: (
|
|
171
177
|
// keydown lives here, not on the dialog — dialog spreads rest props over its own
|
|
172
178
|
// handler and would lose escape-to-close
|
|
173
|
-
/* @__PURE__ */ d(
|
|
174
|
-
|
|
179
|
+
/* @__PURE__ */ d(N, { onKeyDown: S, children: [
|
|
180
|
+
v && /* @__PURE__ */ d(A, { children: [
|
|
175
181
|
/* @__PURE__ */ d(T, { htmlFor: "delete-confirm-name-input", children: [
|
|
176
182
|
"To confirm delete action, type '",
|
|
177
|
-
|
|
183
|
+
n,
|
|
178
184
|
"' in the box below"
|
|
179
185
|
] }),
|
|
180
186
|
/* @__PURE__ */ l(
|
|
181
|
-
|
|
187
|
+
O,
|
|
182
188
|
{
|
|
183
189
|
id: "delete-confirm-name-input",
|
|
184
190
|
"data-testid": "delete-confirm-name-input",
|
|
185
191
|
autoFocus: !0,
|
|
186
192
|
value: f,
|
|
187
|
-
placeholder:
|
|
188
|
-
onChange: (
|
|
193
|
+
placeholder: n,
|
|
194
|
+
onChange: (i) => c(i.target.value)
|
|
189
195
|
}
|
|
190
196
|
)
|
|
191
197
|
] }),
|
|
192
|
-
h && /* @__PURE__ */ d(
|
|
198
|
+
h && /* @__PURE__ */ d(A, { children: [
|
|
193
199
|
/* @__PURE__ */ l(T, { as: "p", children: "To confirm, type how many of each will be deleted, children included" }),
|
|
194
|
-
/* @__PURE__ */ l(
|
|
195
|
-
/* @__PURE__ */ l("span", { children: `${
|
|
200
|
+
/* @__PURE__ */ l(I, { children: w.map((i, V) => /* @__PURE__ */ d(M, { children: [
|
|
201
|
+
/* @__PURE__ */ l("span", { children: `${i[0].toUpperCase()}${i.slice(1)}s - ${t[i]}` }),
|
|
196
202
|
/* @__PURE__ */ l(
|
|
197
|
-
|
|
203
|
+
R,
|
|
198
204
|
{
|
|
199
|
-
"data-testid": `delete-confirm-count-${
|
|
205
|
+
"data-testid": `delete-confirm-count-${i}`,
|
|
200
206
|
autoFocus: V === 0,
|
|
201
207
|
inputMode: "numeric",
|
|
202
|
-
value:
|
|
203
|
-
placeholder: `Number of ${
|
|
204
|
-
onChange: (
|
|
208
|
+
value: y[i] ?? "",
|
|
209
|
+
placeholder: `Number of ${i}s`,
|
|
210
|
+
onChange: (P) => x((L) => ({ ...L, [i]: P.target.value }))
|
|
205
211
|
}
|
|
206
212
|
)
|
|
207
|
-
] },
|
|
213
|
+
] }, i)) })
|
|
208
214
|
] }),
|
|
209
|
-
/* @__PURE__ */ d(
|
|
215
|
+
/* @__PURE__ */ d(K, { children: [
|
|
210
216
|
/* @__PURE__ */ l(D, { label: "Cancel", onClick: a }),
|
|
211
217
|
/* @__PURE__ */ l(
|
|
212
218
|
D,
|
|
@@ -222,7 +228,7 @@ const oe = [
|
|
|
222
228
|
] })
|
|
223
229
|
),
|
|
224
230
|
children: /* @__PURE__ */ l(
|
|
225
|
-
|
|
231
|
+
z,
|
|
226
232
|
{
|
|
227
233
|
entityLabel: e,
|
|
228
234
|
childrenDetails: s,
|
|
@@ -238,11 +244,11 @@ const oe = [
|
|
|
238
244
|
};
|
|
239
245
|
export {
|
|
240
246
|
ae as D,
|
|
241
|
-
|
|
247
|
+
ne as a,
|
|
242
248
|
re as b,
|
|
243
|
-
|
|
249
|
+
ie as c,
|
|
244
250
|
oe as d,
|
|
245
251
|
C as e,
|
|
246
252
|
se as p,
|
|
247
|
-
|
|
253
|
+
G as s
|
|
248
254
|
};
|
|
@@ -8,21 +8,21 @@ import { bw as pe } from "./searchTerms.es.js";
|
|
|
8
8
|
import "axios";
|
|
9
9
|
import { createPortal as fe } from "react-dom";
|
|
10
10
|
import { b as y, H as ee, a as me, S as he, e as ge } from "./SimpleTable.es.js";
|
|
11
|
-
import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as
|
|
11
|
+
import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as U } from "@ynput/ayon-react-components";
|
|
12
12
|
import S from "styled-components";
|
|
13
13
|
import { E as xe } from "./EmptyPlaceholder.es.js";
|
|
14
|
-
import { a as
|
|
14
|
+
import { a as X, E as Pe } from "./EntityTooltip.es.js";
|
|
15
15
|
import { cj as Te } from "./getUris.es.js";
|
|
16
16
|
import "@module-federation/enhanced/runtime";
|
|
17
17
|
import "@ynput/ayon-addon/host";
|
|
18
|
-
import {
|
|
18
|
+
import { n as Ie, o as Ce, k as Fe, p as Re } from "./TableExportContextInstance.es.js";
|
|
19
19
|
import "semver";
|
|
20
20
|
import "./ContextMenuContextInstance.es.js";
|
|
21
21
|
import "clsx";
|
|
22
22
|
import "react-router-dom";
|
|
23
23
|
import { g as A } from "./getThumbnailUrl.es.js";
|
|
24
24
|
import { g as te } from "./getEntityTypeIcon.es.js";
|
|
25
|
-
import { P as je, a as
|
|
25
|
+
import { P as je, a as q } from "./ProjectFoldersContext.es.js";
|
|
26
26
|
const I = {
|
|
27
27
|
folder: ["folder"],
|
|
28
28
|
product: ["folder", "product"],
|
|
@@ -164,7 +164,7 @@ const I = {
|
|
|
164
164
|
typeof s == "string" && /* @__PURE__ */ w(Me, { value: s, onChange: n, onClose: () => n(void 0) })
|
|
165
165
|
] });
|
|
166
166
|
}, Ge = 150, We = (e, s) => {
|
|
167
|
-
const n =
|
|
167
|
+
const n = X.includes(e) || e === "product", [t, c] = L(null), a = z(), i = M(() => clearTimeout(a.current), []), o = M(() => {
|
|
168
168
|
i(), c(null);
|
|
169
169
|
}, [i]), p = M(() => {
|
|
170
170
|
i(), a.current = setTimeout(() => c(null), Ge);
|
|
@@ -176,7 +176,7 @@ const I = {
|
|
|
176
176
|
const m = M(
|
|
177
177
|
(d) => {
|
|
178
178
|
const r = s?.find((u) => u.id === d)?.data?.tooltip || { entityType: e, entityId: d };
|
|
179
|
-
return
|
|
179
|
+
return X.includes(r.entityType) && r.entityId ? r : null;
|
|
180
180
|
},
|
|
181
181
|
[s, e]
|
|
182
182
|
), h = M(
|
|
@@ -514,7 +514,7 @@ const I = {
|
|
|
514
514
|
a.skipDetection = !0, t(r, o);
|
|
515
515
|
}
|
|
516
516
|
}, [e, s, t]);
|
|
517
|
-
}, J = (e = {}) => Object.keys(e).filter((s) => e[s]),
|
|
517
|
+
}, J = (e = {}) => Object.keys(e).filter((s) => e[s]), He = ({
|
|
518
518
|
entityHierarchy: e,
|
|
519
519
|
entityData: s,
|
|
520
520
|
rowSelection: n,
|
|
@@ -543,7 +543,7 @@ const I = {
|
|
|
543
543
|
);
|
|
544
544
|
}
|
|
545
545
|
}, [e, s, n, t, c]);
|
|
546
|
-
},
|
|
546
|
+
}, Ue = 600, Xe = S.div`
|
|
547
547
|
display: grid;
|
|
548
548
|
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
549
549
|
gap: var(--base-gap-large);
|
|
@@ -561,9 +561,9 @@ const I = {
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
`, Tt = (e) => {
|
|
564
|
-
const s = Fe(), n = Re(), t = /* @__PURE__ */ w(
|
|
565
|
-
return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(
|
|
566
|
-
},
|
|
564
|
+
const s = Fe(), n = Re(), t = /* @__PURE__ */ w(qe, { ...e });
|
|
565
|
+
return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) : t;
|
|
566
|
+
}, qe = ({
|
|
567
567
|
projectName: e,
|
|
568
568
|
entityType: s,
|
|
569
569
|
initialSelection: n,
|
|
@@ -629,7 +629,7 @@ const I = {
|
|
|
629
629
|
entityData: O,
|
|
630
630
|
rowSelection: T,
|
|
631
631
|
setEntityRowSelection: F
|
|
632
|
-
}),
|
|
632
|
+
}), He({
|
|
633
633
|
entityHierarchy: R,
|
|
634
634
|
entityData: O,
|
|
635
635
|
rowSelection: T,
|
|
@@ -637,14 +637,14 @@ const I = {
|
|
|
637
637
|
initialSelection: n
|
|
638
638
|
});
|
|
639
639
|
const V = (l, v, D) => {
|
|
640
|
-
const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0,
|
|
640
|
+
const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, H = {
|
|
641
641
|
...l,
|
|
642
642
|
isDisabled: $,
|
|
643
643
|
disabledMessage: ce
|
|
644
644
|
};
|
|
645
|
-
return l.subRows && l.subRows.length > 0 && (
|
|
645
|
+
return l.subRows && l.subRows.length > 0 && (H.subRows = l.subRows.map(
|
|
646
646
|
(de) => V(de, v, $)
|
|
647
|
-
)),
|
|
647
|
+
)), H;
|
|
648
648
|
}, ie = (l) => !Y || Y.length === 0 ? l : l.map((v) => V(v, Y, !1)), Q = (l) => {
|
|
649
649
|
const v = O[s].data;
|
|
650
650
|
c(
|
|
@@ -665,11 +665,11 @@ const I = {
|
|
|
665
665
|
header: `Select ${Z(s)}`,
|
|
666
666
|
isOpen: !0,
|
|
667
667
|
size: "full",
|
|
668
|
-
style: { height: "80vh", maxWidth: R.length *
|
|
668
|
+
style: { height: "80vh", maxWidth: R.length * Ue },
|
|
669
669
|
footer: /* @__PURE__ */ B(ue, { children: [
|
|
670
|
-
a && i && /* @__PURE__ */ w(
|
|
670
|
+
a && i && /* @__PURE__ */ w(U, { label: "Move to root", variant: "text", onClick: i }),
|
|
671
671
|
/* @__PURE__ */ w(
|
|
672
|
-
|
|
672
|
+
U,
|
|
673
673
|
{
|
|
674
674
|
label: `Select ${s}${t ? "s" : ""}`,
|
|
675
675
|
variant: "filled",
|
|
@@ -693,7 +693,7 @@ const I = {
|
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
),
|
|
696
|
-
/* @__PURE__ */ w(
|
|
696
|
+
/* @__PURE__ */ w(Xe, { children: R.map((l) => /* @__PURE__ */ w(
|
|
697
697
|
ge,
|
|
698
698
|
{
|
|
699
699
|
rowSelection: T[l] || {},
|