@ynput/ayon-frontend-shared 0.8.1 → 0.9.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 +2 -2
- package/dist/ListTable.es.js +1 -1
- package/dist/NewEntity.es.js +5 -3
- package/dist/ProjectTreeTable.es.js +4153 -4130
- package/dist/ProjectsTable.es.js +5 -4
- package/dist/Slicer.es.js +326 -293
- package/dist/Views.es.js +724 -714
- package/dist/chunks/ColumnDropIndicator.es.js +10 -10
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/Feed.es.js +41 -39
- package/dist/chunks/FilmstripEntityCard.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +3 -2
- package/dist/chunks/MetaWidget.es.js +425 -411
- 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 +131 -126
- package/dist/chunks/ThumbnailSimple.es.js +11 -11
- package/dist/chunks/Watchers.es.js +46 -46
- package/dist/chunks/getUris.es.js +1 -1
- package/dist/chunks/searchTerms.es.js +617 -581
- package/dist/chunks/useCreateContextMenu.es.js +15 -13
- package/dist/components.es.js +900 -868
- package/dist/context.es.js +1 -1
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +11 -10
- package/dist/types/ContextMenu.d.ts +1 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/NewEntity.d.ts +2 -0
- package/dist/types/ProjectTreeTable.d.ts +44 -3
- package/dist/types/ProjectsTable.d.ts +1 -1
- package/dist/types/SimpleTable.d.ts +1 -1
- package/dist/types/Slicer.d.ts +7 -1
- package/dist/types/Views.d.ts +5 -0
- package/dist/types/components.d.ts +46 -1
- package/dist/types/context.d.ts +2 -1
- package/dist/types/util.d.ts +21 -0
- package/dist/util.es.js +116 -113
- package/package.json +2 -2
package/dist/components.es.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { t as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useState as x, useRef as ie, useCallback as
|
|
5
|
-
import { matchSorter as
|
|
6
|
-
import { InputText as
|
|
1
|
+
import { C as gt, S as bt, A as Re, a as wt, T as vt, D as yt, b as Et, c as St, d as Ve, e as xe, f as kt, g as Ct, h as Ot, M as Tt, F as It, i as Pt, j as At, k as Dt, l as Rt, m as Vt, B as xt, L as Ft, n as _t, o as Lt, p as Mt, q as Nt, r as Ut, s as Bt } from "./chunks/ReviewablesSelector.es.js";
|
|
2
|
+
import { t as Lo, u as Mo, v as No, w as Uo, x as Bo, y as $o, z as Go, E as zo, G as Ho, H as Wo, I as Yo, J as jo, K as Ko, N as qo, O as Qo, Q as Xo, P as Jo, U as Zo, R as en, V as tn, W as sn, X as an, Y as on, Z as nn, _ as rn, $ as ln, a0 as cn, a1 as un, a2 as dn, a3 as pn, a4 as fn, a5 as mn, a6 as hn } from "./chunks/ReviewablesSelector.es.js";
|
|
3
|
+
import { jsxs as F, jsx as d, Fragment as X } from "react/jsx-runtime";
|
|
4
|
+
import { useState as x, useRef as ie, useCallback as H, useEffect as W, useMemo as B, createElement as $t, useId as Gt, useContext as zt } from "react";
|
|
5
|
+
import { matchSorter as Fe } from "match-sorter";
|
|
6
|
+
import { InputText as Ke, Icon as pe, Panel as ve, InputPassword as Ht, Button as Te, Section as Wt, SEARCH_FILTER_ID as Yt } from "@ynput/ayon-react-components";
|
|
7
7
|
import ue from "clsx";
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import { A as
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { format as de, parseISO as
|
|
13
|
-
import { B as
|
|
14
|
-
import { $ as
|
|
15
|
-
import { c as
|
|
16
|
-
import { d as
|
|
17
|
-
import { p as
|
|
18
|
-
import { e as
|
|
19
|
-
import { D as
|
|
20
|
-
import { q as
|
|
21
|
-
import { s as
|
|
22
|
-
import { E as
|
|
23
|
-
import { E as
|
|
24
|
-
import { I as
|
|
25
|
-
import { J as
|
|
26
|
-
import { E as
|
|
27
|
-
import { a as
|
|
28
|
-
import { a as
|
|
29
|
-
import { bQ as
|
|
8
|
+
import { B as bn, a as wn, S as vn } from "./chunks/SimpleForm.es.js";
|
|
9
|
+
import { e as qe, P as jt } from "./chunks/MetaWidget.es.js";
|
|
10
|
+
import { A as En, k as Sn, l as kn, m as Cn, n as On, L as Tn, o as In, q as Pn, r as An, s as Dn } from "./chunks/MetaWidget.es.js";
|
|
11
|
+
import { createPortal as Kt } from "react-dom";
|
|
12
|
+
import { format as de, parseISO as Qe, isValid as Xe } from "date-fns";
|
|
13
|
+
import { B as _e, e as Je, g as ke, h as Ce } from "./chunks/FilmstripEntityCard.es.js";
|
|
14
|
+
import { $ as Vn, j as xn, k as Fn, l as _n, m as Ln, n as Mn, o as Nn, q as Un, A as Bn, C as $n, a as Gn, r as zn, D as Hn, s as Wn, t as Yn, u as jn, v as Kn, w as qn, x as Qn, F as Xn, y as Jn, I as Zn, z as er, E as tr, G as sr, H as ar, J as or, M as nr, K as rr, L as ir, N as lr, U as cr, Y as ur, O as dr, P as pr, Q as fr, R as mr, d as hr, f as gr, S as br, T as wr, V as vr, W as yr, X as Er, Z as Sr, _ as kr, a0 as Cr, a1 as Or, a2 as Tr, a3 as Ir, a4 as Pr, p as Ar, a5 as Dr, a6 as Rr, a7 as Vr } from "./chunks/FilmstripEntityCard.es.js";
|
|
15
|
+
import { c as Ze, s as et, b as tt, ar as st, av as at, ax as qt, q as Qt, u as ot } from "./chunks/TableExportContextInstance.es.js";
|
|
16
|
+
import { d as Fr, D as _r, z as Lr } from "./chunks/TableExportContextInstance.es.js";
|
|
17
|
+
import { p as Xt, d as Le } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
|
|
18
|
+
import { e as Nr, D as Ur, b as Br, a as $r, c as Gr, s as zr } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
|
|
19
|
+
import { D as Wr } from "./chunks/DetailsDialog.es.js";
|
|
20
|
+
import { q as Jt, r as Zt, n as es } from "./chunks/Watchers.es.js";
|
|
21
|
+
import { s as jr, t as Kr, v as qr, R as Qr, c as Xr, b as Jr, w as Zr, x as ei, W as ti, u as si } from "./chunks/Watchers.es.js";
|
|
22
|
+
import { E as oi, P as ni } from "./chunks/EmptyPlaceholder.es.js";
|
|
23
|
+
import { E as ii, a as li } from "./chunks/EmptyPlaceholderFlex.styled.es.js";
|
|
24
|
+
import { I as ui } from "./chunks/InfoMessage.es.js";
|
|
25
|
+
import { J as pi } from "./chunks/JsonViewer.es.js";
|
|
26
|
+
import { E as mi, a as hi, R as gi, g as bi } from "./chunks/EntityPath.es.js";
|
|
27
|
+
import { a as vi, E as yi } from "./chunks/EntityTooltip.es.js";
|
|
28
|
+
import { a as Me, bD as Ne, bC as ts, bF as ss } from "./chunks/searchTerms.es.js";
|
|
29
|
+
import { bQ as as, bV as os, cC as ns, aO as rs, aT as is, bL as ls, bs as cs, dv as us, cp as ds, cb as ps, cf as fs, bT as ms } from "./chunks/getUris.es.js";
|
|
30
30
|
export * from "primereact/confirmdialog";
|
|
31
31
|
import "@module-federation/enhanced/runtime";
|
|
32
|
-
import { loadPiece as
|
|
32
|
+
import { loadPiece as hs, pieceContext as gs, reportContributionError as Ue, menuItemsAt as Be } from "@ynput/ayon-addon/host";
|
|
33
33
|
import { toast as Q } from "react-toastify";
|
|
34
|
-
import { isEmpty as
|
|
34
|
+
import { isEmpty as bs, upperFirst as me } from "lodash";
|
|
35
35
|
import "uuid";
|
|
36
|
-
import { a as
|
|
37
|
-
import
|
|
36
|
+
import { a as ws } from "./chunks/afterStartup.es.js";
|
|
37
|
+
import $e from "axios";
|
|
38
38
|
import "semver";
|
|
39
39
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
40
|
-
import { useSearchParams as
|
|
41
|
-
import { F as
|
|
42
|
-
import { C as
|
|
43
|
-
import { F as
|
|
40
|
+
import { useSearchParams as vs, useLocation as ys, useNavigate as Pe, useParams as Es } from "react-router-dom";
|
|
41
|
+
import { F as Ss } from "./chunks/addonColumnTags.es.js";
|
|
42
|
+
import { C as ki, S as Ci, b as Oi, u as Ti } from "./chunks/addonColumnTags.es.js";
|
|
43
|
+
import { F as Pi } from "./chunks/FilterErrorActions.es.js";
|
|
44
44
|
import "lexical";
|
|
45
45
|
import "@lexical/markdown";
|
|
46
46
|
import "@lexical/code";
|
|
@@ -50,34 +50,36 @@ import "@lexical/selection";
|
|
|
50
50
|
import "@lexical/utils";
|
|
51
51
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
52
52
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
53
|
-
import { m as
|
|
54
|
-
import { T as
|
|
55
|
-
import { useContributions as
|
|
56
|
-
import { useDispatch as
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import { Splitter as
|
|
60
|
-
import { o as
|
|
61
|
-
import { p as
|
|
53
|
+
import { m as Di, r as Ri, a as Vi, u as xi } from "./chunks/useDateRangeFilter.es.js";
|
|
54
|
+
import { T as _i } from "./chunks/TableSettingsFallback.es.js";
|
|
55
|
+
import { useContributions as he, ContributionView as ge, ProjectPageLayout as ks, Slicer as Cs, prefetchPiece as Ie, runContribution as nt } from "@ynput/ayon-addon";
|
|
56
|
+
import { useDispatch as Os } from "react-redux";
|
|
57
|
+
import Ts from "remark-gfm";
|
|
58
|
+
import Is from "react-markdown";
|
|
59
|
+
import { Splitter as Ps, SplitterPanel as Ge } from "primereact/splitter";
|
|
60
|
+
import { o as As, h as Ds, e as Rs } from "./chunks/Slicer.es.js";
|
|
61
|
+
import { p as Mi, q as Ni } from "./chunks/Slicer.es.js";
|
|
62
62
|
import "./chunks/NewEntityContextInstance.es.js";
|
|
63
|
-
import { V as
|
|
64
|
-
import { u as
|
|
63
|
+
import { V as Vs } from "./chunks/VersionUploadContextInstance.es.js";
|
|
64
|
+
import { u as Bi, a as $i } from "./chunks/VersionUploadContextInstance.es.js";
|
|
65
65
|
import "@tanstack/react-table";
|
|
66
|
-
import { M as
|
|
67
|
-
import { b as
|
|
68
|
-
import { A as
|
|
69
|
-
import { s as
|
|
70
|
-
import { e as
|
|
71
|
-
import { T as
|
|
66
|
+
import { M as rt, a as it } from "./chunks/Menu.es.js";
|
|
67
|
+
import { b as zi, c as Hi, d as Wi } from "./chunks/Menu.es.js";
|
|
68
|
+
import { A as xs, f as Fs } from "./chunks/SimpleTable.es.js";
|
|
69
|
+
import { s as ji, g as Ki } from "./chunks/SimpleTable.es.js";
|
|
70
|
+
import { e as _s, E as Ls } from "./chunks/EntityPickerDialog.es.js";
|
|
71
|
+
import { T as Qi } from "./chunks/EntityPickerDialog.es.js";
|
|
72
|
+
import "primereact-context/contextmenu";
|
|
73
|
+
import { u as Ms } from "./chunks/useCreateContextMenu.es.js";
|
|
72
74
|
import { g as re } from "./chunks/getEntityTypeIcon.es.js";
|
|
73
75
|
import { g as q } from "./chunks/iconUtils.es.js";
|
|
74
|
-
import { C as
|
|
75
|
-
import { S as
|
|
76
|
-
import { e as
|
|
77
|
-
import { b as
|
|
78
|
-
import { p as
|
|
79
|
-
import { C as
|
|
80
|
-
const
|
|
76
|
+
import { C as Ji, T as Zi } from "./chunks/ThumbnailSimple.es.js";
|
|
77
|
+
import { S as tl } from "./chunks/SimpleFormDialog.es.js";
|
|
78
|
+
import { e as Ns } from "./chunks/extractVersionFromFilename.es.js";
|
|
79
|
+
import { b as Us, c as Bs, v as $s } from "./chunks/versionUploadHelpers.es.js";
|
|
80
|
+
import { p as Gs } from "./chunks/parseFilename.es.js";
|
|
81
|
+
import { C as al } from "./chunks/ColumnHeaderMenuUI.es.js";
|
|
82
|
+
const ze = 500, zs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, no = ({
|
|
81
83
|
shareOptions: e,
|
|
82
84
|
existingAccess: t,
|
|
83
85
|
owner: n,
|
|
@@ -88,22 +90,22 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
88
90
|
pt: u,
|
|
89
91
|
...l
|
|
90
92
|
}) => {
|
|
91
|
-
const [
|
|
92
|
-
const
|
|
93
|
+
const [p, c] = x(""), [E, v] = x(!1), [T, g] = x(-1), V = ie(null), O = e.filter((C) => !t.includes(C.value)).toSorted((C, b) => {
|
|
94
|
+
const y = (m) => m.value === "__everyone__" ? 0 : m.value.startsWith("__") ? 1 : m.value.startsWith("team:") ? 2 : m.value.startsWith("group:") ? 3 : m.value.startsWith("user:") ? 4 : 5, k = y(C), i = y(b);
|
|
93
95
|
return k !== i ? k - i : C.label.localeCompare(b.label);
|
|
94
|
-
}), w = (
|
|
96
|
+
}), w = (p ? Fe(O, p, {
|
|
95
97
|
keys: ["name", "label", "value"],
|
|
96
|
-
threshold:
|
|
97
|
-
}) : O).slice(0,
|
|
98
|
-
|
|
98
|
+
threshold: Fe.rankings.CONTAINS
|
|
99
|
+
}) : O).slice(0, ze), D = zs.test(p) && !e.some((C) => C.name === p) && a === "external", R = () => {
|
|
100
|
+
v(!0), g(-1);
|
|
99
101
|
}, M = () => {
|
|
100
102
|
setTimeout(() => {
|
|
101
|
-
|
|
103
|
+
v(!1), g(-1);
|
|
102
104
|
}, 200);
|
|
103
105
|
}, U = (C) => {
|
|
104
|
-
c(C.target.value), g(-1),
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
106
|
+
c(C.target.value), g(-1), v(!0);
|
|
107
|
+
}, _ = (C) => {
|
|
108
|
+
if (!E || w.length === 0) {
|
|
107
109
|
C.key === "Enter" && w.length > 0 && (C.preventDefault(), $(w[0]));
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
@@ -118,46 +120,46 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
118
120
|
C.preventDefault(), T >= 0 && T < w.length ? $(w[T]) : w.length > 0 && $(w[0]);
|
|
119
121
|
break;
|
|
120
122
|
case "Escape":
|
|
121
|
-
|
|
123
|
+
v(!1), g(-1), V.current?.blur(), C.stopPropagation();
|
|
122
124
|
break;
|
|
123
125
|
}
|
|
124
126
|
}, $ = (C) => {
|
|
125
|
-
o(C, 10), c(""),
|
|
126
|
-
},
|
|
127
|
+
o(C, 10), c(""), v(!1), g(-1), V.current?.focus();
|
|
128
|
+
}, Y = () => {
|
|
127
129
|
o(
|
|
128
130
|
{
|
|
129
|
-
name:
|
|
130
|
-
label:
|
|
131
|
-
value:
|
|
131
|
+
name: p,
|
|
132
|
+
label: p,
|
|
133
|
+
value: p,
|
|
132
134
|
shareType: "guest"
|
|
133
135
|
},
|
|
134
136
|
10
|
|
135
|
-
), c(""),
|
|
137
|
+
), c(""), v(!1), g(-1), V.current?.focus();
|
|
136
138
|
};
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
139
|
+
return /* @__PURE__ */ F(gt, { ...l, children: [
|
|
140
|
+
/* @__PURE__ */ d(
|
|
141
|
+
Ke,
|
|
140
142
|
{
|
|
141
143
|
ref: V,
|
|
142
|
-
value:
|
|
144
|
+
value: p,
|
|
143
145
|
placeholder: r,
|
|
144
146
|
disabled: s,
|
|
145
147
|
onFocus: R,
|
|
146
148
|
onClick: R,
|
|
147
149
|
onBlur: M,
|
|
148
150
|
onChange: U,
|
|
149
|
-
onKeyDown:
|
|
151
|
+
onKeyDown: _,
|
|
150
152
|
style: { width: "100%" }
|
|
151
153
|
}
|
|
152
154
|
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
E && (w.length > 0 || D) && /* @__PURE__ */ F(
|
|
156
|
+
bt,
|
|
155
157
|
{
|
|
156
158
|
...u?.list,
|
|
157
159
|
className: ue(u?.list?.className, { "no-owner": !n }),
|
|
158
160
|
children: [
|
|
159
|
-
w.map((C, b) => /* @__PURE__ */
|
|
160
|
-
|
|
161
|
+
w.map((C, b) => /* @__PURE__ */ d(
|
|
162
|
+
Re,
|
|
161
163
|
{
|
|
162
164
|
name: C.name,
|
|
163
165
|
label: C.label,
|
|
@@ -174,49 +176,49 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
174
176
|
},
|
|
175
177
|
C.value
|
|
176
178
|
)),
|
|
177
|
-
D && /* @__PURE__ */
|
|
178
|
-
|
|
179
|
+
D && /* @__PURE__ */ d(
|
|
180
|
+
Re,
|
|
179
181
|
{
|
|
180
|
-
name:
|
|
181
|
-
label:
|
|
182
|
+
name: p,
|
|
183
|
+
label: p,
|
|
182
184
|
shareType: "guest",
|
|
183
185
|
isOwner: !1,
|
|
184
186
|
isMe: !1,
|
|
185
187
|
"data-index": w.length,
|
|
186
188
|
className: w.length === T ? "highlighted" : "",
|
|
187
189
|
style: { cursor: "pointer" },
|
|
188
|
-
onClick:
|
|
190
|
+
onClick: Y,
|
|
189
191
|
onMouseEnter: () => g(w.length),
|
|
190
192
|
isCompact: !0,
|
|
191
193
|
isSearchResult: !0
|
|
192
194
|
}
|
|
193
195
|
),
|
|
194
|
-
w.length ===
|
|
196
|
+
w.length === ze && /* @__PURE__ */ d("li", { className: "tip", children: "More than 500 results, please refine your search..." })
|
|
195
197
|
]
|
|
196
198
|
}
|
|
197
199
|
)
|
|
198
200
|
] });
|
|
199
|
-
},
|
|
201
|
+
}, ro = {
|
|
200
202
|
0: "No access",
|
|
201
203
|
10: "Viewer",
|
|
202
204
|
20: "Editor",
|
|
203
205
|
30: "Admin"
|
|
204
|
-
},
|
|
206
|
+
}, He = (e) => {
|
|
205
207
|
if (!e) return "";
|
|
206
208
|
try {
|
|
207
|
-
const t =
|
|
208
|
-
if (
|
|
209
|
-
return
|
|
209
|
+
const t = Qe(e);
|
|
210
|
+
if (Xe(t))
|
|
211
|
+
return Je(t, "yyyy-MM-dd");
|
|
210
212
|
} catch {
|
|
211
213
|
return "";
|
|
212
214
|
}
|
|
213
215
|
return "";
|
|
214
|
-
},
|
|
216
|
+
}, We = (e, t) => {
|
|
215
217
|
if (!e) return null;
|
|
216
218
|
try {
|
|
217
|
-
const n =
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
219
|
+
const n = Qe(e);
|
|
220
|
+
if (Xe(n))
|
|
221
|
+
return Je(n, t);
|
|
220
222
|
} catch {
|
|
221
223
|
return null;
|
|
222
224
|
}
|
|
@@ -231,7 +233,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
231
233
|
return null;
|
|
232
234
|
}
|
|
233
235
|
return null;
|
|
234
|
-
},
|
|
236
|
+
}, io = ({
|
|
235
237
|
value: e,
|
|
236
238
|
onChange: t,
|
|
237
239
|
emptyTrigger: n,
|
|
@@ -241,41 +243,41 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
241
243
|
className: o,
|
|
242
244
|
displayFormat: u = "MMM d",
|
|
243
245
|
minDate: l,
|
|
244
|
-
maxDate:
|
|
246
|
+
maxDate: p,
|
|
245
247
|
pt: c
|
|
246
248
|
}) => {
|
|
247
|
-
const [
|
|
248
|
-
const
|
|
249
|
-
(
|
|
249
|
+
const [E, v] = x(!1), [T, g] = x(""), [V, O] = x(""), w = ie(null), D = ie(null), R = ie(null), M = ie(null), U = e.startDate || e.endDate, _ = H(() => {
|
|
250
|
+
const S = ne(T), L = ne(V);
|
|
251
|
+
(S !== e.startDate || L !== e.endDate) && t({ startDate: S, endDate: L }), v(!1);
|
|
250
252
|
}, [T, V, e.startDate, e.endDate, t]);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
+
W(() => {
|
|
254
|
+
E && (g(He(e.startDate)), O(He(e.endDate)), !e.startDate && !e.endDate && setTimeout(() => {
|
|
253
255
|
try {
|
|
254
256
|
R.current?.showPicker();
|
|
255
257
|
} catch {
|
|
256
258
|
}
|
|
257
259
|
}, 100));
|
|
258
|
-
}, [
|
|
259
|
-
if (!
|
|
260
|
-
const
|
|
261
|
-
const G =
|
|
262
|
-
w.current && !w.current.contains(G) && D.current && !D.current.contains(G) &&
|
|
260
|
+
}, [E, e.startDate, e.endDate]), W(() => {
|
|
261
|
+
if (!E) return;
|
|
262
|
+
const S = (L) => {
|
|
263
|
+
const G = L.target;
|
|
264
|
+
w.current && !w.current.contains(G) && D.current && !D.current.contains(G) && _();
|
|
263
265
|
};
|
|
264
|
-
return document.addEventListener("mousedown",
|
|
265
|
-
}, [
|
|
266
|
-
if (!
|
|
267
|
-
const
|
|
268
|
-
|
|
266
|
+
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
267
|
+
}, [E, _]), W(() => {
|
|
268
|
+
if (!E) return;
|
|
269
|
+
const S = (L) => {
|
|
270
|
+
L.key === "Escape" && (L.stopPropagation(), _());
|
|
269
271
|
};
|
|
270
|
-
return document.addEventListener("keydown",
|
|
271
|
-
}, [
|
|
272
|
-
const $ = (
|
|
273
|
-
const
|
|
274
|
-
g(
|
|
275
|
-
const G = ne(
|
|
272
|
+
return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
|
|
273
|
+
}, [E, _]);
|
|
274
|
+
const $ = (S) => {
|
|
275
|
+
const L = S.target.value;
|
|
276
|
+
g(L);
|
|
277
|
+
const G = ne(L), K = ne(V);
|
|
276
278
|
if (G && K) {
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
+
const J = new Date(G), oe = new Date(K);
|
|
280
|
+
J > oe && O(L);
|
|
279
281
|
}
|
|
280
282
|
G && setTimeout(() => {
|
|
281
283
|
try {
|
|
@@ -283,36 +285,36 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
283
285
|
} catch {
|
|
284
286
|
}
|
|
285
287
|
}, 100);
|
|
286
|
-
},
|
|
287
|
-
const
|
|
288
|
-
O(
|
|
289
|
-
const G = ne(
|
|
290
|
-
let
|
|
288
|
+
}, Y = (S) => {
|
|
289
|
+
const L = S.target.value;
|
|
290
|
+
O(L);
|
|
291
|
+
const G = ne(L), K = ne(T);
|
|
292
|
+
let J = K, oe = G;
|
|
291
293
|
if (G && K) {
|
|
292
294
|
const se = new Date(K);
|
|
293
|
-
new Date(G) < se && (g(
|
|
295
|
+
new Date(G) < se && (g(L), J = G);
|
|
294
296
|
}
|
|
295
|
-
t({ startDate:
|
|
297
|
+
t({ startDate: J, endDate: oe });
|
|
296
298
|
}, C = () => {
|
|
297
|
-
g(""), O(""), t({ startDate: null, endDate: null }),
|
|
298
|
-
}, b = (
|
|
299
|
-
|
|
300
|
-
},
|
|
299
|
+
g(""), O(""), t({ startDate: null, endDate: null }), v(!1);
|
|
300
|
+
}, b = (S) => {
|
|
301
|
+
S.stopPropagation(), a || (E ? _() : v(!0));
|
|
302
|
+
}, y = E ? ne(T) : e.startDate, k = E ? ne(V) : e.endDate, i = We(y, u), m = We(k, u), f = i && m ? `${i} - ${m}` : i || m || "", h = () => {
|
|
301
303
|
if (!w.current) return { top: 0, left: 0 };
|
|
302
|
-
const
|
|
304
|
+
const S = w.current.getBoundingClientRect();
|
|
303
305
|
return {
|
|
304
|
-
top:
|
|
305
|
-
left: s === "left" ?
|
|
306
|
+
top: S.bottom + 4,
|
|
307
|
+
left: s === "left" ? S.left : S.right
|
|
306
308
|
};
|
|
307
|
-
}, I = () => U ? r ? r(e,
|
|
308
|
-
return /* @__PURE__ */
|
|
309
|
-
|
|
309
|
+
}, I = () => U ? r ? r(e, f) : /* @__PURE__ */ d("span", { className: ue("date-value", c?.valueDisplay?.className), ...c?.valueDisplay, children: f }) : n || /* @__PURE__ */ d(Ct, { icon: "calendar_add_on" }), P = h();
|
|
310
|
+
return /* @__PURE__ */ F(
|
|
311
|
+
wt,
|
|
310
312
|
{
|
|
311
313
|
...c?.root,
|
|
312
|
-
className: ue(
|
|
314
|
+
className: ue(_e, o, c?.root?.className),
|
|
313
315
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
|
|
316
|
+
/* @__PURE__ */ d(
|
|
317
|
+
vt,
|
|
316
318
|
{
|
|
317
319
|
ref: w,
|
|
318
320
|
onClick: b,
|
|
@@ -323,9 +325,9 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
323
325
|
children: I()
|
|
324
326
|
}
|
|
325
327
|
),
|
|
326
|
-
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
|
|
328
|
+
E && Kt(
|
|
329
|
+
/* @__PURE__ */ d(
|
|
330
|
+
yt,
|
|
329
331
|
{
|
|
330
332
|
ref: D,
|
|
331
333
|
style: {
|
|
@@ -334,38 +336,38 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
334
336
|
right: s === "right" ? window.innerWidth - P.left : "auto",
|
|
335
337
|
...c?.dropdown?.style
|
|
336
338
|
},
|
|
337
|
-
onMouseDown: (
|
|
339
|
+
onMouseDown: (S) => S.stopPropagation(),
|
|
338
340
|
...c?.dropdown,
|
|
339
|
-
className: ue(
|
|
340
|
-
children: /* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
|
|
341
|
+
className: ue(_e, s, c?.dropdown?.className),
|
|
342
|
+
children: /* @__PURE__ */ F(Et, { className: c?.content?.className, ...c?.content, children: [
|
|
343
|
+
/* @__PURE__ */ d(
|
|
344
|
+
St,
|
|
343
345
|
{
|
|
344
346
|
icon: "close",
|
|
345
347
|
variant: "text",
|
|
346
|
-
onClick:
|
|
348
|
+
onClick: _,
|
|
347
349
|
...c?.closeButton
|
|
348
350
|
}
|
|
349
351
|
),
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
|
|
352
|
+
/* @__PURE__ */ F(
|
|
353
|
+
Ve,
|
|
352
354
|
{
|
|
353
355
|
className: c?.startDate?.field?.className,
|
|
354
356
|
...c?.startDate?.field,
|
|
355
357
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
|
|
358
|
+
/* @__PURE__ */ d("label", { ...c?.startDate?.label, children: "Start date" }),
|
|
359
|
+
/* @__PURE__ */ d(
|
|
360
|
+
xe,
|
|
359
361
|
{
|
|
360
362
|
ref: R,
|
|
361
363
|
type: "date",
|
|
362
364
|
value: T,
|
|
363
365
|
onChange: $,
|
|
364
|
-
max:
|
|
366
|
+
max: p ? de(p, "yyyy-MM-dd") : void 0,
|
|
365
367
|
min: l ? de(l, "yyyy-MM-dd") : void 0,
|
|
366
|
-
onClick: (
|
|
368
|
+
onClick: (S) => {
|
|
367
369
|
try {
|
|
368
|
-
|
|
370
|
+
S.currentTarget.showPicker();
|
|
369
371
|
} catch {
|
|
370
372
|
}
|
|
371
373
|
},
|
|
@@ -375,20 +377,20 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
375
377
|
]
|
|
376
378
|
}
|
|
377
379
|
),
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
|
|
380
|
+
/* @__PURE__ */ F(Ve, { className: c?.endDate?.field?.className, ...c?.endDate?.field, children: [
|
|
381
|
+
/* @__PURE__ */ d("label", { ...c?.endDate?.label, children: "End date" }),
|
|
382
|
+
/* @__PURE__ */ d(
|
|
383
|
+
xe,
|
|
382
384
|
{
|
|
383
385
|
ref: M,
|
|
384
386
|
type: "date",
|
|
385
387
|
value: V,
|
|
386
|
-
onChange:
|
|
387
|
-
max:
|
|
388
|
+
onChange: Y,
|
|
389
|
+
max: p ? de(p, "yyyy-MM-dd") : void 0,
|
|
388
390
|
min: T || (l ? de(l, "yyyy-MM-dd") : void 0),
|
|
389
|
-
onClick: (
|
|
391
|
+
onClick: (S) => {
|
|
390
392
|
try {
|
|
391
|
-
|
|
393
|
+
S.currentTarget.showPicker();
|
|
392
394
|
} catch {
|
|
393
395
|
}
|
|
394
396
|
},
|
|
@@ -396,7 +398,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
396
398
|
}
|
|
397
399
|
)
|
|
398
400
|
] }),
|
|
399
|
-
U && /* @__PURE__ */
|
|
401
|
+
U && /* @__PURE__ */ d(kt, { onClick: C, variant: "text", ...c?.clearButton, children: "Clear dates" })
|
|
400
402
|
] })
|
|
401
403
|
}
|
|
402
404
|
),
|
|
@@ -409,56 +411,56 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
409
411
|
version: 1,
|
|
410
412
|
name: "review",
|
|
411
413
|
productType: "review"
|
|
412
|
-
},
|
|
414
|
+
}, lo = ({
|
|
413
415
|
children: e,
|
|
414
416
|
projectName: t,
|
|
415
417
|
onVersionCreated: n,
|
|
416
418
|
dispatch: r
|
|
417
419
|
}) => {
|
|
418
|
-
const [s, a] = x(""), [o, u] = x(""), [l,
|
|
420
|
+
const [s, a] = x(""), [o, u] = x(""), [l, p] = x(null), [c, E] = x(null), [v, T] = x(!1), [g, V] = x([]), [O, w] = x(le), [D, R] = x(!1), [M, U] = x(""), [_, $] = x(null), [Y, C] = x(null), [b, y] = x(void 0), [k, i] = x(void 0), m = ie(!1), f = ie(null), { data: h = [], isLoading: I } = as(
|
|
419
421
|
{ projectName: t, folderId: s },
|
|
420
|
-
{ skip: !s || !
|
|
422
|
+
{ skip: !s || !v || !!o }
|
|
421
423
|
), P = B(() => {
|
|
422
424
|
if (!(o || !O.name || h.length === 0))
|
|
423
425
|
return h.find((A) => A.name === O.name);
|
|
424
|
-
}, [o, O.name, h]),
|
|
426
|
+
}, [o, O.name, h]), S = o || P?.id || "", { currentData: L } = os(
|
|
425
427
|
{
|
|
426
428
|
projectName: t,
|
|
427
429
|
productId: o
|
|
428
430
|
},
|
|
429
|
-
{ skip: !o || !
|
|
430
|
-
), { data: G } =
|
|
431
|
+
{ skip: !o || !v || b != null }
|
|
432
|
+
), { data: G } = ns(
|
|
431
433
|
{ projectName: t, versionId: k },
|
|
432
|
-
{ skip: !k || !
|
|
433
|
-
), K = l ?? G?.taskId ?? "",
|
|
434
|
-
({ productId: A, folderId: N, taskId: z, linkedTask: ae, latestVersionNumber: fe, latestVersionId:
|
|
435
|
-
u(A || ""), a(N || ""),
|
|
436
|
-
...
|
|
434
|
+
{ skip: !k || !v || l !== null }
|
|
435
|
+
), K = l ?? G?.taskId ?? "", J = !!(k && l === null && !G), oe = H(
|
|
436
|
+
({ productId: A, folderId: N, taskId: z, linkedTask: ae, latestVersionNumber: fe, latestVersionId: mt }) => {
|
|
437
|
+
u(A || ""), a(N || ""), p(z || null), E(ae || null), y(fe), i(mt), w((ht) => ({
|
|
438
|
+
...ht,
|
|
437
439
|
...fe != null ? { version: fe + 1 } : {}
|
|
438
440
|
})), T(!0);
|
|
439
441
|
},
|
|
440
442
|
[]
|
|
441
|
-
), se =
|
|
443
|
+
), se = H(() => {
|
|
442
444
|
g.forEach((A) => {
|
|
443
445
|
A.preview && URL.revokeObjectURL(A.preview);
|
|
444
|
-
}), V([]), w(le), $(null), C(null), U(""), R(!1), T(!1), u(""), a(""),
|
|
445
|
-
}, [g]), [
|
|
446
|
+
}), V([]), w(le), $(null), C(null), U(""), R(!1), T(!1), u(""), a(""), p(null), E(null), m.current = !1, y(void 0), i(void 0);
|
|
447
|
+
}, [g]), [Se] = rs(), [be] = is(), Z = H(
|
|
446
448
|
async (A) => {
|
|
447
449
|
try {
|
|
448
|
-
if (
|
|
449
|
-
const N = await
|
|
450
|
-
productId:
|
|
450
|
+
if (S) {
|
|
451
|
+
const N = await Us(be, t, {
|
|
452
|
+
productId: S,
|
|
451
453
|
version: A.version,
|
|
452
454
|
taskId: K || void 0
|
|
453
455
|
});
|
|
454
|
-
return n(
|
|
455
|
-
productId:
|
|
456
|
+
return n(S, N.id), Q.success("Created new version"), {
|
|
457
|
+
productId: S,
|
|
456
458
|
versionId: N.id
|
|
457
459
|
};
|
|
458
460
|
} else {
|
|
459
|
-
const { product: N, version: z } = await
|
|
460
|
-
|
|
461
|
-
|
|
461
|
+
const { product: N, version: z } = await Bs(
|
|
462
|
+
Se,
|
|
463
|
+
be,
|
|
462
464
|
t,
|
|
463
465
|
{
|
|
464
466
|
folderId: s,
|
|
@@ -480,56 +482,56 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
480
482
|
throw console.error("Error uploading version:", N), N.message || N;
|
|
481
483
|
}
|
|
482
484
|
},
|
|
483
|
-
[se,
|
|
484
|
-
),
|
|
485
|
+
[se, S, s, K, t]
|
|
486
|
+
), we = H(
|
|
485
487
|
(A) => {
|
|
486
|
-
if (
|
|
488
|
+
if (S) return;
|
|
487
489
|
const N = A[0];
|
|
488
490
|
if (N) {
|
|
489
|
-
const z =
|
|
491
|
+
const z = Gs(N.name), ae = Ns(z);
|
|
490
492
|
ae && ae !== O.version && w((fe) => ({
|
|
491
493
|
...fe,
|
|
492
494
|
version: ae
|
|
493
495
|
}));
|
|
494
496
|
}
|
|
495
497
|
},
|
|
496
|
-
[
|
|
497
|
-
),
|
|
498
|
+
[S, O.version]
|
|
499
|
+
), ee = L?.version ?? b ?? P?.latestVersion?.version, te = H((A, N) => {
|
|
498
500
|
w((z) => ({
|
|
499
501
|
...z,
|
|
500
502
|
[A]: N
|
|
501
503
|
})), U("");
|
|
502
|
-
}, []),
|
|
504
|
+
}, []), Ae = H(
|
|
503
505
|
async (A) => {
|
|
504
506
|
try {
|
|
505
507
|
R(!0), U("");
|
|
506
|
-
const N =
|
|
508
|
+
const N = $s(A, ee, !S);
|
|
507
509
|
if (!N.isValid)
|
|
508
510
|
throw N.error;
|
|
509
|
-
const z = await
|
|
510
|
-
s && (
|
|
511
|
+
const z = await Z(A);
|
|
512
|
+
s && (f.current = { folderId: s, productName: A.name }), z?.productId && $(z.productId), z?.versionId && C(z.versionId), g.length < 1 && (R(!1), se());
|
|
511
513
|
} catch (N) {
|
|
512
514
|
U(N), R(!1);
|
|
513
515
|
}
|
|
514
516
|
},
|
|
515
|
-
[
|
|
517
|
+
[Z, g.length, se, ee, S]
|
|
516
518
|
);
|
|
517
|
-
|
|
518
|
-
if (!(!
|
|
519
|
-
return w(
|
|
519
|
+
W(() => {
|
|
520
|
+
if (!(!v || b != null))
|
|
521
|
+
return w(L ? (A) => ({ ...A, version: L.version + 1 }) : le), () => {
|
|
520
522
|
w(le);
|
|
521
523
|
};
|
|
522
|
-
}, [
|
|
523
|
-
if (!
|
|
524
|
-
const A =
|
|
524
|
+
}, [v, L, b]), W(() => {
|
|
525
|
+
if (!v || o || h.length === 0 || O.name !== le.name) return;
|
|
526
|
+
const A = f.current;
|
|
525
527
|
if (A && A.folderId === s && h.some((ae) => ae.name === A.productName)) {
|
|
526
528
|
w((ae) => ({ ...ae, name: A.productName }));
|
|
527
529
|
return;
|
|
528
530
|
}
|
|
529
531
|
const N = h[h.length - 1];
|
|
530
532
|
N && w((z) => ({ ...z, name: N.name }));
|
|
531
|
-
}, [
|
|
532
|
-
if (!(!
|
|
533
|
+
}, [v, o, h]), W(() => {
|
|
534
|
+
if (!(!v || o))
|
|
533
535
|
if (P) {
|
|
534
536
|
w((N) => ({
|
|
535
537
|
...N,
|
|
@@ -539,45 +541,45 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
539
541
|
}
|
|
540
542
|
}));
|
|
541
543
|
const A = P.latestVersion?.task;
|
|
542
|
-
A && (l === null || m.current) ? (
|
|
544
|
+
A && (l === null || m.current) ? (p(A.id), E({
|
|
543
545
|
id: A.id,
|
|
544
546
|
name: A.name,
|
|
545
547
|
label: A.label,
|
|
546
548
|
taskType: A.taskType
|
|
547
|
-
}), m.current = !0) : !A && m.current && (
|
|
549
|
+
}), m.current = !0) : !A && m.current && (p(null), E(null), m.current = !1);
|
|
548
550
|
} else
|
|
549
|
-
w((A) => ({ ...A, version: le.version })), (l === null || m.current) && (
|
|
550
|
-
}, [
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
}, []),
|
|
551
|
+
w((A) => ({ ...A, version: le.version })), (l === null || m.current) && (p(null), E(null), m.current = !1);
|
|
552
|
+
}, [v, o, P]);
|
|
553
|
+
const De = H((A) => {
|
|
554
|
+
p(A), m.current = !1;
|
|
555
|
+
}, []), ft = B(
|
|
554
556
|
() => ({
|
|
555
557
|
productId: o,
|
|
556
558
|
setProductId: u,
|
|
557
559
|
folderId: s,
|
|
558
560
|
taskId: K,
|
|
559
561
|
linkedTask: c,
|
|
560
|
-
isLoadingTask:
|
|
561
|
-
setTaskId:
|
|
562
|
-
setLinkedTask:
|
|
562
|
+
isLoadingTask: J,
|
|
563
|
+
setTaskId: De,
|
|
564
|
+
setLinkedTask: E,
|
|
563
565
|
setFolderId: a,
|
|
564
|
-
isOpen:
|
|
566
|
+
isOpen: v,
|
|
565
567
|
projectName: t,
|
|
566
|
-
latestVersion:
|
|
568
|
+
latestVersion: ee,
|
|
567
569
|
pendingFiles: g,
|
|
568
570
|
setPendingFiles: V,
|
|
569
571
|
onOpenVersionUpload: oe,
|
|
570
572
|
onCloseVersionUpload: se,
|
|
571
|
-
onUploadVersion:
|
|
572
|
-
extractAndSetVersionFromFiles:
|
|
573
|
+
onUploadVersion: Z,
|
|
574
|
+
extractAndSetVersionFromFiles: we,
|
|
573
575
|
form: O,
|
|
574
576
|
setForm: w,
|
|
575
577
|
isSubmitting: D,
|
|
576
578
|
error: M,
|
|
577
|
-
createdProductId:
|
|
578
|
-
createdVersionId:
|
|
579
|
-
handleFormChange:
|
|
580
|
-
handleFormSubmit:
|
|
579
|
+
createdProductId: _,
|
|
580
|
+
createdVersionId: Y,
|
|
581
|
+
handleFormChange: te,
|
|
582
|
+
handleFormSubmit: Ae,
|
|
581
583
|
folderProducts: h,
|
|
582
584
|
isFolderProductsLoading: I,
|
|
583
585
|
matchedProduct: P,
|
|
@@ -589,88 +591,88 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
589
591
|
o,
|
|
590
592
|
K,
|
|
591
593
|
c,
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
594
|
+
J,
|
|
595
|
+
De,
|
|
596
|
+
E,
|
|
595
597
|
u,
|
|
596
|
-
|
|
598
|
+
v,
|
|
597
599
|
t,
|
|
598
|
-
|
|
600
|
+
ee,
|
|
599
601
|
g,
|
|
600
602
|
V,
|
|
601
603
|
oe,
|
|
602
604
|
se,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
+
Z,
|
|
606
|
+
we,
|
|
605
607
|
O,
|
|
606
608
|
D,
|
|
607
609
|
M,
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
_,
|
|
611
|
+
Y,
|
|
612
|
+
te,
|
|
613
|
+
Ae,
|
|
612
614
|
h,
|
|
613
615
|
I,
|
|
614
616
|
P,
|
|
615
617
|
r
|
|
616
618
|
]
|
|
617
619
|
);
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
},
|
|
620
|
-
const [t, n] = x(!1), { siteInfo: r, user: s, cloudInfo: a } =
|
|
620
|
+
return /* @__PURE__ */ d(Vs.Provider, { value: ft, children: e });
|
|
621
|
+
}, co = ({ children: e }) => {
|
|
622
|
+
const [t, n] = x(!1), { siteInfo: r, user: s, cloudInfo: a } = Ze(), { data: o, isLoading: u } = ls(
|
|
621
623
|
{},
|
|
622
624
|
{
|
|
623
625
|
skip: !s?.name || !a?.connected
|
|
624
626
|
}
|
|
625
627
|
), l = () => {
|
|
626
|
-
t || (
|
|
628
|
+
t || (ws(() => {
|
|
627
629
|
if (document.getElementById("featurebase-sdk")) return;
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
+
const f = document.createElement("script");
|
|
631
|
+
f.src = "https://do.featurebase.app/js/sdk.js", f.id = "featurebase-sdk", f.async = !0, document.body.appendChild(f);
|
|
630
632
|
}), n(!0));
|
|
631
|
-
},
|
|
632
|
-
const
|
|
633
|
-
typeof
|
|
634
|
-
(
|
|
633
|
+
}, p = () => {
|
|
634
|
+
const f = window;
|
|
635
|
+
typeof f.Featurebase != "function" && (f.Featurebase = function() {
|
|
636
|
+
(f.Featurebase.q = f.Featurebase.q || []).push(arguments);
|
|
635
637
|
});
|
|
636
|
-
}, c = r?.version?.split("+")[0] || "unknown",
|
|
638
|
+
}, c = r?.version?.split("+")[0] || "unknown", E = r?.version?.split("+")[1] || "unknown", v = () => {
|
|
637
639
|
if (!s?.name || !o?.available) return;
|
|
638
|
-
const
|
|
640
|
+
const f = {
|
|
639
641
|
...o.data,
|
|
640
642
|
customFields: {
|
|
641
643
|
origin: window.location.origin,
|
|
642
644
|
serverVersion: c,
|
|
643
|
-
frontendVersion:
|
|
645
|
+
frontendVersion: E,
|
|
644
646
|
instanceId: a?.instanceId
|
|
645
647
|
}
|
|
646
648
|
};
|
|
647
|
-
console.log(
|
|
649
|
+
console.log(f), window.Featurebase("identify", f, (I) => {
|
|
648
650
|
I ? console.error(I) : console.log("Featurebase identify completed");
|
|
649
651
|
});
|
|
650
652
|
}, [T, g] = x(!1), [V, O] = x(0), w = () => {
|
|
651
|
-
const
|
|
652
|
-
if (typeof
|
|
653
|
+
const f = window;
|
|
654
|
+
if (typeof f.Featurebase == "function") {
|
|
653
655
|
if (console.log("Initializing Featurebase messenger widget"), !o?.available)
|
|
654
656
|
return console.warn("messenger verification not available, skipping messenger init");
|
|
655
|
-
|
|
657
|
+
f.Featurebase(
|
|
656
658
|
"boot",
|
|
657
659
|
{
|
|
658
660
|
theme: "dark",
|
|
659
661
|
...o?.data
|
|
660
662
|
},
|
|
661
663
|
(h) => {
|
|
662
|
-
h ? console.error(h) : (console.log("Featurebase messenger completed"), g(!0),
|
|
664
|
+
h ? console.error(h) : (console.log("Featurebase messenger completed"), g(!0), f.Featurebase("onUnreadCountChange", function(I) {
|
|
663
665
|
O(I);
|
|
664
666
|
}));
|
|
665
667
|
}
|
|
666
668
|
);
|
|
667
669
|
}
|
|
668
670
|
}, D = () => {
|
|
669
|
-
const
|
|
671
|
+
const f = [];
|
|
670
672
|
if (s?.data?.isAdmin) {
|
|
671
673
|
const I = ["Server", "Addon", "Pipeline"];
|
|
672
|
-
|
|
673
|
-
} else r?.disableChangelog ||
|
|
674
|
+
f.push(...I);
|
|
675
|
+
} else r?.disableChangelog || f.push("Highlights");
|
|
674
676
|
const h = window;
|
|
675
677
|
return typeof h.Featurebase == "function" && h.Featurebase("init_changelog_widget", {
|
|
676
678
|
organization: "ayon",
|
|
@@ -682,12 +684,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
682
684
|
usersName: s?.attrib?.fullName,
|
|
683
685
|
autoOpenForNewUpdates: !0
|
|
684
686
|
},
|
|
685
|
-
category:
|
|
687
|
+
category: f,
|
|
686
688
|
theme: "dark"
|
|
687
689
|
}), !1;
|
|
688
690
|
}, R = () => {
|
|
689
|
-
const
|
|
690
|
-
return typeof
|
|
691
|
+
const f = window;
|
|
692
|
+
return typeof f.Featurebase == "function" && f.Featurebase(
|
|
691
693
|
"initialize_feedback_widget",
|
|
692
694
|
{
|
|
693
695
|
organization: "ayon",
|
|
@@ -699,8 +701,8 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
699
701
|
}
|
|
700
702
|
), !1;
|
|
701
703
|
}, M = () => {
|
|
702
|
-
const
|
|
703
|
-
return typeof
|
|
704
|
+
const f = window;
|
|
705
|
+
return typeof f.Featurebase == "function" && f.Featurebase(
|
|
704
706
|
"initialize_portal_widget",
|
|
705
707
|
{
|
|
706
708
|
organization: "ayon",
|
|
@@ -710,8 +712,8 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
710
712
|
(h) => h ? (console.error("Error initializing portal widget:", h), !1) : !0
|
|
711
713
|
), !1;
|
|
712
714
|
}, U = () => {
|
|
713
|
-
const
|
|
714
|
-
return typeof
|
|
715
|
+
const f = window;
|
|
716
|
+
return typeof f.Featurebase == "function" && f.Featurebase(
|
|
715
717
|
"initialize_survey_widget",
|
|
716
718
|
{
|
|
717
719
|
organization: "ayon",
|
|
@@ -726,60 +728,60 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
726
728
|
}
|
|
727
729
|
), !1;
|
|
728
730
|
};
|
|
729
|
-
|
|
730
|
-
s?.name && r && (r.disableFeedback || t || (l(),
|
|
731
|
+
W(() => {
|
|
732
|
+
s?.name && r && (r.disableFeedback || t || (l(), p(), D(), R(), M()));
|
|
731
733
|
}, [s?.name, t, r]);
|
|
732
|
-
const [
|
|
733
|
-
|
|
734
|
-
!s?.name || !a || !o || !t ||
|
|
734
|
+
const [_, $] = x(!1);
|
|
735
|
+
W(() => {
|
|
736
|
+
!s?.name || !a || !o || !t || _ || (v(), U(), $(!0));
|
|
735
737
|
}, [
|
|
736
738
|
s?.name,
|
|
737
739
|
a?.instanceId,
|
|
738
740
|
o?.available,
|
|
739
741
|
t,
|
|
740
742
|
window.location.pathname,
|
|
741
|
-
|
|
742
|
-
]),
|
|
743
|
+
_
|
|
744
|
+
]), W(() => {
|
|
743
745
|
u || !t || w();
|
|
744
746
|
}, [o, u, t]);
|
|
745
|
-
const
|
|
747
|
+
const Y = () => {
|
|
746
748
|
window.postMessage({
|
|
747
749
|
target: "FeaturebaseWidget",
|
|
748
750
|
data: {
|
|
749
751
|
action: "openFeedbackWidget"
|
|
750
752
|
}
|
|
751
753
|
});
|
|
752
|
-
}, C = (
|
|
754
|
+
}, C = (f = "MainView", h) => {
|
|
753
755
|
window.postMessage({
|
|
754
756
|
target: "FeaturebaseWidget",
|
|
755
757
|
data: {
|
|
756
758
|
action: "changePage",
|
|
757
|
-
payload:
|
|
759
|
+
payload: f,
|
|
758
760
|
openWidget: !0,
|
|
759
761
|
...h && { articleId: h }
|
|
760
762
|
}
|
|
761
763
|
});
|
|
762
|
-
}, [b,
|
|
763
|
-
|
|
764
|
+
}, [b, y] = x(!1), k = document.getElementById("fb-messenger-root"), i = (f) => k instanceof HTMLElement && (k.style.display = f ? "block" : "none");
|
|
765
|
+
W(() => {
|
|
764
766
|
!t || !T || i(b);
|
|
765
|
-
}, [t, T, b]),
|
|
767
|
+
}, [t, T, b]), W(() => {
|
|
766
768
|
if (!t || !T) return;
|
|
767
|
-
const
|
|
768
|
-
typeof
|
|
769
|
-
|
|
769
|
+
const f = window;
|
|
770
|
+
typeof f.Featurebase == "function" && f.Featurebase("onHide", function() {
|
|
771
|
+
y(!1);
|
|
770
772
|
});
|
|
771
773
|
}, [t, T]);
|
|
772
|
-
const m = (
|
|
774
|
+
const m = (f = "Home", h) => {
|
|
773
775
|
const I = window;
|
|
774
776
|
if (typeof I.Featurebase != "function") {
|
|
775
777
|
window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
|
|
776
778
|
return;
|
|
777
779
|
}
|
|
778
780
|
if (b) {
|
|
779
|
-
I.Featurebase("hide"),
|
|
781
|
+
I.Featurebase("hide"), y(!1);
|
|
780
782
|
return;
|
|
781
783
|
}
|
|
782
|
-
switch (
|
|
784
|
+
switch (y(!0), f) {
|
|
783
785
|
case "Home":
|
|
784
786
|
I.Featurebase("show");
|
|
785
787
|
break;
|
|
@@ -803,23 +805,23 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
803
805
|
break;
|
|
804
806
|
}
|
|
805
807
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
|
|
808
|
+
return /* @__PURE__ */ d(
|
|
809
|
+
Ss.Provider,
|
|
808
810
|
{
|
|
809
811
|
value: {
|
|
810
812
|
openSupport: m,
|
|
811
|
-
openFeedback:
|
|
813
|
+
openFeedback: Y,
|
|
812
814
|
openPortal: C,
|
|
813
815
|
messengerLoaded: T,
|
|
814
816
|
unreadCount: V,
|
|
815
817
|
messengerVisibility: b,
|
|
816
|
-
setMessengerVisibility:
|
|
818
|
+
setMessengerVisibility: y,
|
|
817
819
|
loaded: t
|
|
818
820
|
},
|
|
819
821
|
children: e
|
|
820
822
|
}
|
|
821
823
|
);
|
|
822
|
-
},
|
|
824
|
+
}, uo = ({
|
|
823
825
|
projectName: e,
|
|
824
826
|
list: t,
|
|
825
827
|
isLoading: n,
|
|
@@ -829,7 +831,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
829
831
|
label: "",
|
|
830
832
|
tags: [],
|
|
831
833
|
active: !1
|
|
832
|
-
}), o = (t?.accessLevel || 0) >= 30, { tags: u } =
|
|
834
|
+
}), o = (t?.accessLevel || 0) >= 30, { tags: u } = et(), { data: l = [] } = cs(), p = B(
|
|
833
835
|
() => l.filter((g) => g.scope?.includes("list")).map((g) => ({
|
|
834
836
|
name: g.name,
|
|
835
837
|
data: g.data
|
|
@@ -848,15 +850,15 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
848
850
|
enableSearch: !0
|
|
849
851
|
}
|
|
850
852
|
},
|
|
851
|
-
...
|
|
853
|
+
...p,
|
|
852
854
|
{ name: "active", data: { type: "boolean", title: "Active" } },
|
|
853
855
|
...r
|
|
854
856
|
],
|
|
855
|
-
[u,
|
|
857
|
+
[u, p, r]
|
|
856
858
|
);
|
|
857
|
-
|
|
859
|
+
W(() => {
|
|
858
860
|
if (t) {
|
|
859
|
-
const g = t.attrib || {}, O = [...
|
|
861
|
+
const g = t.attrib || {}, O = [...p, ...r].reduce((w, { name: D }) => {
|
|
860
862
|
const R = g[D];
|
|
861
863
|
return w[D] = R || "", w;
|
|
862
864
|
}, {});
|
|
@@ -867,12 +869,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
867
869
|
...O
|
|
868
870
|
});
|
|
869
871
|
}
|
|
870
|
-
}, [t, JSON.stringify(r), JSON.stringify(
|
|
871
|
-
const [
|
|
872
|
+
}, [t, JSON.stringify(r), JSON.stringify(p)]);
|
|
873
|
+
const [E] = us(), v = (g) => r.some((V) => V.name === g) || p.some((V) => V.name === g), T = H(
|
|
872
874
|
async (g, V) => {
|
|
873
875
|
if (!t?.id) return console.warn("No list ID provided");
|
|
874
876
|
let O;
|
|
875
|
-
if (
|
|
877
|
+
if (v(g)) {
|
|
876
878
|
const w = t.attrib || {};
|
|
877
879
|
V === "" && g === "category" ? O = {
|
|
878
880
|
attrib: {
|
|
@@ -890,7 +892,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
890
892
|
O = w, a((D) => ({ ...D, ...w }));
|
|
891
893
|
}
|
|
892
894
|
try {
|
|
893
|
-
await
|
|
895
|
+
await E({
|
|
894
896
|
entityListId: t.id,
|
|
895
897
|
projectName: e,
|
|
896
898
|
entityListPatchModel: O
|
|
@@ -899,10 +901,10 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
899
901
|
console.error(w), Q.error("Failed to update list attribute: ", w.attrib.detail);
|
|
900
902
|
}
|
|
901
903
|
},
|
|
902
|
-
[t?.id, t?.attrib, e,
|
|
904
|
+
[t?.id, t?.attrib, e, E, p, r]
|
|
903
905
|
);
|
|
904
|
-
return /* @__PURE__ */
|
|
905
|
-
|
|
906
|
+
return /* @__PURE__ */ d(
|
|
907
|
+
Jt,
|
|
906
908
|
{
|
|
907
909
|
enableEditing: o,
|
|
908
910
|
projectName: e,
|
|
@@ -913,7 +915,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
913
915
|
title: "Attributes"
|
|
914
916
|
}
|
|
915
917
|
);
|
|
916
|
-
},
|
|
918
|
+
}, po = ({ list: e, isLoading: t }) => {
|
|
917
919
|
const n = Object.fromEntries(
|
|
918
920
|
Object.entries(e?.data || {}).filter(
|
|
919
921
|
([a, o]) => !["category", "count"].includes(a) && o !== null && typeof o != "object"
|
|
@@ -934,16 +936,16 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
934
936
|
data: { type: "string" },
|
|
935
937
|
hidden: !1
|
|
936
938
|
}));
|
|
937
|
-
return /* @__PURE__ */
|
|
938
|
-
},
|
|
939
|
+
return /* @__PURE__ */ d(Zt, { form: r, fields: s, isLoading: !!t });
|
|
940
|
+
}, fo = ({
|
|
939
941
|
label: e,
|
|
940
942
|
description: t,
|
|
941
943
|
features: n,
|
|
942
944
|
isCloseable: r = !0,
|
|
943
945
|
addon: s
|
|
944
946
|
}) => {
|
|
945
|
-
const [a, o] = x(!1), { setPowerpackDialog: u, selectedPowerPack: l, powerpackDialog:
|
|
946
|
-
if (!
|
|
947
|
+
const [a, o] = x(!1), { setPowerpackDialog: u, selectedPowerPack: l, powerpackDialog: p, addonDialog: c } = tt(), E = !!s || !!c, v = e ?? p?.label ?? c?.label, T = t ?? p?.description ?? (c ? c.features[c.selectedFeature ?? ""]?.description ?? Object.values(c.features)[0]?.description : void 0), g = s?.icon ?? (c ? c.icon : "bolt");
|
|
948
|
+
if (!p && !c && (!e || !t)) return null;
|
|
947
949
|
const O = (() => {
|
|
948
950
|
if (n)
|
|
949
951
|
return Object.entries(n);
|
|
@@ -960,15 +962,15 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
960
962
|
}
|
|
961
963
|
return D;
|
|
962
964
|
}
|
|
963
|
-
return Object.entries(
|
|
965
|
+
return Object.entries(Xt).sort(([D], [R]) => {
|
|
964
966
|
if (D === l) return -1;
|
|
965
967
|
if (R === l) return 1;
|
|
966
|
-
const M =
|
|
968
|
+
const M = Le.indexOf(D), U = Le.indexOf(R);
|
|
967
969
|
return M > -1 && U > -1 ? M - U : M > -1 ? -1 : U > -1 ? 1 : 0;
|
|
968
970
|
});
|
|
969
971
|
})();
|
|
970
|
-
return /* @__PURE__ */
|
|
971
|
-
|
|
972
|
+
return /* @__PURE__ */ F(
|
|
973
|
+
Ot,
|
|
972
974
|
{
|
|
973
975
|
isOpen: !0,
|
|
974
976
|
onClose: () => {
|
|
@@ -978,37 +980,37 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
978
980
|
hideCancelButton: !r,
|
|
979
981
|
hideBackdrop: !r,
|
|
980
982
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
|
|
983
|
+
/* @__PURE__ */ F(Tt, { children: [
|
|
984
|
+
/* @__PURE__ */ F("h1", { children: [
|
|
985
|
+
/* @__PURE__ */ d(pe, { icon: g }),
|
|
986
|
+
v
|
|
985
987
|
] }),
|
|
986
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ d("h2", { children: T })
|
|
987
989
|
] }),
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
|
|
990
|
+
/* @__PURE__ */ F(It, { children: [
|
|
991
|
+
E ? /* @__PURE__ */ F("h3", { children: [
|
|
990
992
|
"Unlock all ",
|
|
991
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ d("span", { className: "green", children: "Premium Addons" }),
|
|
992
994
|
" with an AYON Studio subscription."
|
|
993
|
-
] }) : /* @__PURE__ */
|
|
995
|
+
] }) : /* @__PURE__ */ F("h3", { children: [
|
|
994
996
|
"Unlock all ",
|
|
995
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ d(pe, { icon: "bolt" }),
|
|
996
998
|
" ",
|
|
997
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ d("span", { className: "green", children: "Power Features" }),
|
|
998
1000
|
" with an AYON subscription."
|
|
999
1001
|
] }),
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ d("ul", { children: O.slice(0, a ? void 0 : 5).map(([D, R]) => /* @__PURE__ */ F("li", { children: [
|
|
1003
|
+
/* @__PURE__ */ d(pe, { icon: R.icon ?? "check" }),
|
|
1004
|
+
/* @__PURE__ */ d("span", { children: R.bullet })
|
|
1003
1005
|
] }, D)) }),
|
|
1004
|
-
!a && O.length > 5 && /* @__PURE__ */
|
|
1006
|
+
!a && O.length > 5 && /* @__PURE__ */ d(Pt, { onClick: () => o(!0), children: "Show all" })
|
|
1005
1007
|
] }),
|
|
1006
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ d(At, { addon: s?.name, children: /* @__PURE__ */ d(Dt, {}) })
|
|
1007
1009
|
]
|
|
1008
1010
|
}
|
|
1009
1011
|
);
|
|
1010
|
-
},
|
|
1011
|
-
const { projectName: t } =
|
|
1012
|
+
}, mo = (e) => {
|
|
1013
|
+
const { projectName: t } = et(), { contributions: n } = he("projectTable.customizeSection");
|
|
1012
1014
|
return B(() => {
|
|
1013
1015
|
const r = { projectName: t, page: e };
|
|
1014
1016
|
return n.filter((s) => !s.pages?.length || s.pages.includes(e)).map((s) => ({
|
|
@@ -1016,13 +1018,13 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1016
1018
|
id: `addon:${s.key}`,
|
|
1017
1019
|
title: s.title,
|
|
1018
1020
|
icon: s.icon,
|
|
1019
|
-
component:
|
|
1021
|
+
component: $t(ge, {
|
|
1020
1022
|
contribution: s,
|
|
1021
1023
|
context: r
|
|
1022
1024
|
})
|
|
1023
1025
|
}));
|
|
1024
1026
|
}, [n, t, e]);
|
|
1025
|
-
},
|
|
1027
|
+
}, Ye = ({
|
|
1026
1028
|
Component: e,
|
|
1027
1029
|
projectName: t,
|
|
1028
1030
|
state: n,
|
|
@@ -1032,18 +1034,18 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1032
1034
|
onGoToFrame: o,
|
|
1033
1035
|
onOpenViewer: u,
|
|
1034
1036
|
onUpdateEntity: l,
|
|
1035
|
-
...
|
|
1037
|
+
...p
|
|
1036
1038
|
}) => {
|
|
1037
|
-
const c =
|
|
1038
|
-
return /* @__PURE__ */
|
|
1039
|
+
const c = st(), { onCreateView: E, getLatestSettings: v, markCacheDirty: T } = at();
|
|
1040
|
+
return /* @__PURE__ */ d(
|
|
1039
1041
|
e,
|
|
1040
1042
|
{
|
|
1041
|
-
router: { useParams:
|
|
1043
|
+
router: { useParams: Es, useNavigate: Pe, useLocation: ys, useSearchParams: vs },
|
|
1042
1044
|
projectName: t,
|
|
1043
1045
|
views: {
|
|
1044
1046
|
...c,
|
|
1045
1047
|
settings: c.viewSettings,
|
|
1046
|
-
updateViewSettings: (...g) =>
|
|
1048
|
+
updateViewSettings: (...g) => qt(...g, c, E, v, T)
|
|
1047
1049
|
},
|
|
1048
1050
|
context: {},
|
|
1049
1051
|
state: n,
|
|
@@ -1054,10 +1056,10 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1054
1056
|
onOpenViewer: u,
|
|
1055
1057
|
onUpdateEntity: l,
|
|
1056
1058
|
toast: Q,
|
|
1057
|
-
...
|
|
1059
|
+
...p
|
|
1058
1060
|
}
|
|
1059
1061
|
);
|
|
1060
|
-
},
|
|
1062
|
+
}, Hs = ({ children: e, fields: t }) => /* @__PURE__ */ d("main", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ d(ks, { sidebar: /* @__PURE__ */ d(Cs, { fields: t }), children: e }) }), ho = ({
|
|
1061
1063
|
Component: e,
|
|
1062
1064
|
projectName: t,
|
|
1063
1065
|
slicer: n,
|
|
@@ -1065,16 +1067,16 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1065
1067
|
addonProps: s,
|
|
1066
1068
|
...a
|
|
1067
1069
|
}) => {
|
|
1068
|
-
let o = /* @__PURE__ */
|
|
1070
|
+
let o = /* @__PURE__ */ d(Ye, { Component: e, projectName: t, ...a });
|
|
1069
1071
|
if (n && t) {
|
|
1070
1072
|
let u = null;
|
|
1071
1073
|
try {
|
|
1072
|
-
u =
|
|
1074
|
+
u = qe();
|
|
1073
1075
|
} catch {
|
|
1074
1076
|
console.log("Slicer context not available for this addon page");
|
|
1075
1077
|
}
|
|
1076
|
-
o = /* @__PURE__ */
|
|
1077
|
-
|
|
1078
|
+
o = /* @__PURE__ */ d(Hs, { fields: n.fields, children: /* @__PURE__ */ d(
|
|
1079
|
+
Ye,
|
|
1078
1080
|
{
|
|
1079
1081
|
Component: e,
|
|
1080
1082
|
projectName: t,
|
|
@@ -1085,19 +1087,19 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1085
1087
|
) });
|
|
1086
1088
|
}
|
|
1087
1089
|
return o;
|
|
1088
|
-
},
|
|
1090
|
+
}, Ws = () => /* @__PURE__ */ F(Rt, { children: [
|
|
1089
1091
|
"By logging in you agree to our",
|
|
1090
1092
|
" ",
|
|
1091
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ d("a", { href: "https://ynput.io/terms/", target: "_blank", children: "Terms of Service" }),
|
|
1092
1094
|
" ",
|
|
1093
1095
|
"and",
|
|
1094
1096
|
" ",
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
] }),
|
|
1097
|
-
const r =
|
|
1098
|
-
|
|
1097
|
+
/* @__PURE__ */ d("a", { href: "https://ynput.io/privacy-policy", target: "_blank", children: "Privacy Policy" })
|
|
1098
|
+
] }), go = ({ onLogin: e, loading: t = null, isFirstTime: n = !1 }) => {
|
|
1099
|
+
const r = Os(), s = new URLSearchParams(window.location.search), [a, o] = x(""), [u, l] = x(""), p = s.getAll("provider"), [c, E] = x(!1), [v, T] = x(!1), { data: g, isLoading: V } = ds({ full: !0 }), O = g || {}, { motd: w, loginPageBrand: D = "", loginPageBackground: R = "" } = O;
|
|
1100
|
+
W(() => {
|
|
1099
1101
|
document.title = "Login • AYON";
|
|
1100
|
-
}, []),
|
|
1102
|
+
}, []), W(() => {
|
|
1101
1103
|
window.location.pathname.startsWith("/login") || (console.debug("Storing preferred URL in local storage:", window.location.href), localStorage.setItem("auth-preferred-url", window.location.href));
|
|
1102
1104
|
}, []);
|
|
1103
1105
|
const M = async (C) => {
|
|
@@ -1107,9 +1109,9 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1107
1109
|
}
|
|
1108
1110
|
let b = null;
|
|
1109
1111
|
try {
|
|
1110
|
-
b = await
|
|
1111
|
-
} catch (
|
|
1112
|
-
const k =
|
|
1112
|
+
b = await $e.post("/api/auth/login", { name: a, password: u });
|
|
1113
|
+
} catch (y) {
|
|
1114
|
+
const k = y;
|
|
1113
1115
|
console.error("Login error", k.response?.data || k), Q.error(k.response?.data?.detail || `Unable to login: Error ${k.response?.status}`);
|
|
1114
1116
|
return;
|
|
1115
1117
|
}
|
|
@@ -1117,32 +1119,32 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1117
1119
|
console.error("Login error", b), Q.error("Unable to login, check the console for details");
|
|
1118
1120
|
return;
|
|
1119
1121
|
}
|
|
1120
|
-
localStorage.removeItem("auth-preferred-url"), Q.info(b.data.detail), e({ user: b.data.user, accessToken: b.data.token }), r(
|
|
1122
|
+
localStorage.removeItem("auth-preferred-url"), Q.info(b.data.detail), e({ user: b.data.user, accessToken: b.data.token }), r(Me.util.resetApiState());
|
|
1121
1123
|
}, U = async (C) => {
|
|
1122
1124
|
const b = window.location.pathname.split("/")[2];
|
|
1123
1125
|
if (!b || (console.debug("handleSSOCallback", b), !C?.length && b !== "_token")) return;
|
|
1124
|
-
const
|
|
1125
|
-
if (!
|
|
1126
|
+
const y = new URLSearchParams(window.location.search);
|
|
1127
|
+
if (!y.toString()) return;
|
|
1126
1128
|
window.history.replaceState({}, "", window.location.pathname);
|
|
1127
1129
|
let k = (O?.ssoOptions || []).find((P) => P.name === b);
|
|
1128
1130
|
if (b === "_token" && (k = {
|
|
1129
1131
|
name: "secure token",
|
|
1130
1132
|
callback: "/api/auth/tokenauth"
|
|
1131
1133
|
}), !k) return;
|
|
1132
|
-
|
|
1133
|
-
let i = !1, m = null,
|
|
1134
|
+
y.append("ayonProvider", b), T(!0);
|
|
1135
|
+
let i = !1, m = null, f = null;
|
|
1134
1136
|
try {
|
|
1135
|
-
console.debug("SSO Callback", k.callback), m = await
|
|
1137
|
+
console.debug("SSO Callback", k.callback), m = await $e.get(k.callback, { params: y }), i = !0;
|
|
1136
1138
|
} catch (P) {
|
|
1137
|
-
const
|
|
1138
|
-
console.error("SSO Callback error",
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
/* @__PURE__ */
|
|
1139
|
+
const S = P;
|
|
1140
|
+
console.error("SSO Callback error", S.response?.data), Q.error(
|
|
1141
|
+
/* @__PURE__ */ F(X, { children: [
|
|
1142
|
+
/* @__PURE__ */ F("p", { children: [
|
|
1141
1143
|
"Unable to login using ",
|
|
1142
1144
|
k.name,
|
|
1143
1145
|
":"
|
|
1144
1146
|
] }),
|
|
1145
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ d("p", { children: S.response?.data?.detail || `Error ${S.response?.status}` })
|
|
1146
1148
|
] })
|
|
1147
1149
|
);
|
|
1148
1150
|
}
|
|
@@ -1150,45 +1152,45 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1150
1152
|
if (i && m?.data?.user) {
|
|
1151
1153
|
console.debug("SSO Callback response", m.data);
|
|
1152
1154
|
const P = m.data;
|
|
1153
|
-
Q.info(P.detail || `Logged in as ${P.user.name}`), h = P.user, I = P.token, P.redirectUrl && (
|
|
1155
|
+
Q.info(P.detail || `Logged in as ${P.user.name}`), h = P.user, I = P.token, P.redirectUrl && (f = P.redirectUrl);
|
|
1154
1156
|
} else i && (Q.error("Unable to login using SSO"), i = !1);
|
|
1155
|
-
i ? (!
|
|
1157
|
+
i ? (!f && localStorage.getItem("auth-preferred-url") && (f = localStorage.getItem("auth-preferred-url")), f || (f = window.location.origin), T(!1), localStorage.removeItem("auth-preferred-url"), e({ user: h, accessToken: I, redirectUrl: f }), r(Me.util.resetApiState())) : (console.log("SSO Callback failed, clearing auth state"), T(!1), localStorage.removeItem("auth-preferred-url"));
|
|
1156
1158
|
};
|
|
1157
|
-
|
|
1159
|
+
W(() => {
|
|
1158
1160
|
U(O.ssoOptions);
|
|
1159
1161
|
}, [O.ssoOptions]);
|
|
1160
|
-
const
|
|
1161
|
-
({ name: C, hidden: b }) => !b && (!
|
|
1162
|
-
).map(({ name: C, title: b, url:
|
|
1162
|
+
const _ = c || !O?.hidePasswordAuth || p?.length && p.includes("password") || null, $ = !c && (p || !_), Y = B(() => O.ssoOptions?.length ? O.ssoOptions.filter(
|
|
1163
|
+
({ name: C, hidden: b }) => !b && (!p?.length || p.includes(C) || c)
|
|
1164
|
+
).map(({ name: C, title: b, url: y, args: k, redirectKey: i, icon: m, color: f, textColor: h }) => {
|
|
1163
1165
|
const I = { ...k }, P = `${window.location.origin}/login/${C}`;
|
|
1164
1166
|
I[i] = P;
|
|
1165
|
-
const
|
|
1166
|
-
return /* @__PURE__ */
|
|
1167
|
-
|
|
1167
|
+
const S = new URLSearchParams(I), L = `${y}?${S}`;
|
|
1168
|
+
return /* @__PURE__ */ d(
|
|
1169
|
+
Vt,
|
|
1168
1170
|
{
|
|
1169
1171
|
name: b || C,
|
|
1170
|
-
url:
|
|
1172
|
+
url: L,
|
|
1171
1173
|
icon: m,
|
|
1172
|
-
color:
|
|
1174
|
+
color: f,
|
|
1173
1175
|
textColor: h
|
|
1174
1176
|
},
|
|
1175
1177
|
C
|
|
1176
1178
|
);
|
|
1177
|
-
}) : null, [O.ssoOptions,
|
|
1178
|
-
return
|
|
1179
|
-
R && /* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
(w || D) && /* @__PURE__ */
|
|
1182
|
-
D && /* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1179
|
+
}) : null, [O.ssoOptions, p, c]);
|
|
1180
|
+
return v || V ? n ? null : /* @__PURE__ */ d(X, { children: t }) : /* @__PURE__ */ d(X, { children: /* @__PURE__ */ F("main", { className: "center", children: [
|
|
1181
|
+
R && /* @__PURE__ */ d(xt, { src: R }),
|
|
1182
|
+
/* @__PURE__ */ F(Ft, { children: [
|
|
1183
|
+
(w || D) && /* @__PURE__ */ F(ve, { children: [
|
|
1184
|
+
D && /* @__PURE__ */ d(_t, { src: D }),
|
|
1185
|
+
/* @__PURE__ */ d(Lt, { children: /* @__PURE__ */ d(Is, { remarkPlugins: [Ts], children: w }) })
|
|
1184
1186
|
] }),
|
|
1185
|
-
/* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
|
|
1187
|
+
/* @__PURE__ */ F(ve, { children: [
|
|
1188
|
+
/* @__PURE__ */ d(Mt, { src: "/AYON.svg" }),
|
|
1189
|
+
/* @__PURE__ */ F(Nt, { children: [
|
|
1190
|
+
_ ? /* @__PURE__ */ F("form", { onSubmit: M, children: [
|
|
1191
|
+
/* @__PURE__ */ d("label", { id: "username", children: "Username" }),
|
|
1192
|
+
/* @__PURE__ */ d(
|
|
1193
|
+
Ke,
|
|
1192
1194
|
{
|
|
1193
1195
|
autoFocus: !0,
|
|
1194
1196
|
placeholder: "Enter your username",
|
|
@@ -1198,9 +1200,9 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1198
1200
|
onChange: (C) => o(C.target.value)
|
|
1199
1201
|
}
|
|
1200
1202
|
),
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
|
|
1203
|
+
/* @__PURE__ */ d("label", { id: "password", children: "Password" }),
|
|
1204
|
+
/* @__PURE__ */ d(
|
|
1205
|
+
Ht,
|
|
1204
1206
|
{
|
|
1205
1207
|
placeholder: "Enter password",
|
|
1206
1208
|
name: "password",
|
|
@@ -1209,50 +1211,50 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1209
1211
|
onChange: (C) => l(C.target.value)
|
|
1210
1212
|
}
|
|
1211
1213
|
),
|
|
1212
|
-
/* @__PURE__ */
|
|
1213
|
-
] }) : /* @__PURE__ */
|
|
1214
|
-
|
|
1214
|
+
/* @__PURE__ */ d(Te, { type: "submit", children: /* @__PURE__ */ d("span", { className: "label", children: "Login with password" }) })
|
|
1215
|
+
] }) : /* @__PURE__ */ d(X, { children: /* @__PURE__ */ d("div", { style: { marginBottom: "8px" } }) }),
|
|
1216
|
+
Y
|
|
1215
1217
|
] }),
|
|
1216
|
-
O?.passwordRecoveryAvailable &&
|
|
1217
|
-
$ && /* @__PURE__ */
|
|
1218
|
-
|
|
1218
|
+
O?.passwordRecoveryAvailable && _ && /* @__PURE__ */ d("a", { href: "/passwordReset", style: { margin: "8px 0" }, children: "Reset password" }),
|
|
1219
|
+
$ && /* @__PURE__ */ d(
|
|
1220
|
+
Te,
|
|
1219
1221
|
{
|
|
1220
1222
|
style: { width: "100%" },
|
|
1221
1223
|
variant: "text",
|
|
1222
|
-
onClick: () =>
|
|
1224
|
+
onClick: () => E(!0),
|
|
1223
1225
|
children: "Show all login options"
|
|
1224
1226
|
}
|
|
1225
1227
|
),
|
|
1226
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ d(Ws, {})
|
|
1227
1229
|
] })
|
|
1228
1230
|
] })
|
|
1229
1231
|
] }) });
|
|
1230
|
-
},
|
|
1231
|
-
const [n, r] =
|
|
1232
|
-
return e ? /* @__PURE__ */
|
|
1233
|
-
|
|
1232
|
+
}, bo = ({ sidebar: e, children: t }) => {
|
|
1233
|
+
const [n, r] = As();
|
|
1234
|
+
return e ? /* @__PURE__ */ F(
|
|
1235
|
+
Ps,
|
|
1234
1236
|
{
|
|
1235
1237
|
layout: "horizontal",
|
|
1236
1238
|
style: { width: "100%", height: "100%" },
|
|
1237
1239
|
onResizeEnd: r,
|
|
1238
1240
|
children: [
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ d(Ge, { size: n[0], style: { overflow: "hidden" }, children: e }),
|
|
1242
|
+
/* @__PURE__ */ d(Ge, { size: n[1], style: { overflow: "hidden" }, children: t })
|
|
1241
1243
|
]
|
|
1242
1244
|
}
|
|
1243
|
-
) : /* @__PURE__ */
|
|
1244
|
-
},
|
|
1245
|
+
) : /* @__PURE__ */ d(X, { children: t });
|
|
1246
|
+
}, wo = ({ fields: e }) => {
|
|
1245
1247
|
const t = e.join(","), n = B(
|
|
1246
|
-
() =>
|
|
1248
|
+
() => Ds.filter((r) => e.includes(r.value)),
|
|
1247
1249
|
// fields is compared by content: addons pass a new array literal every render
|
|
1248
1250
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1249
1251
|
[t]
|
|
1250
1252
|
);
|
|
1251
|
-
return /* @__PURE__ */
|
|
1252
|
-
},
|
|
1253
|
-
},
|
|
1254
|
-
const e =
|
|
1255
|
-
(o) => t(o,
|
|
1253
|
+
return /* @__PURE__ */ d(Wt, { wrap: !0, style: { height: "100%" }, children: /* @__PURE__ */ d(Rs, { sliceFields: n, pinnedSliceType: "hierarchy" }) });
|
|
1254
|
+
}, Ys = () => {
|
|
1255
|
+
}, lt = () => {
|
|
1256
|
+
const e = st(), { updateViewSettings: t } = at(), { viewType: n, viewSettings: r, isLoadingViews: s } = e, a = H(
|
|
1257
|
+
(o) => t(o, Ys, void 0, {}),
|
|
1256
1258
|
[t]
|
|
1257
1259
|
);
|
|
1258
1260
|
return B(
|
|
@@ -1264,7 +1266,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1264
1266
|
} : void 0,
|
|
1265
1267
|
[n, r, s, a]
|
|
1266
1268
|
);
|
|
1267
|
-
},
|
|
1269
|
+
}, js = () => {
|
|
1268
1270
|
const {
|
|
1269
1271
|
folders: e,
|
|
1270
1272
|
isLoading: t,
|
|
@@ -1272,7 +1274,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1272
1274
|
getParentFolderIds: r,
|
|
1273
1275
|
getChildFolderIds: s,
|
|
1274
1276
|
getFolderIdsWithoutChildren: a
|
|
1275
|
-
} =
|
|
1277
|
+
} = Qt();
|
|
1276
1278
|
return B(
|
|
1277
1279
|
() => ({
|
|
1278
1280
|
// attrib is typed `object` in the api model
|
|
@@ -1292,52 +1294,52 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1292
1294
|
a
|
|
1293
1295
|
]
|
|
1294
1296
|
);
|
|
1295
|
-
},
|
|
1296
|
-
const { data: t } =
|
|
1297
|
+
}, vo = (e) => {
|
|
1298
|
+
const { data: t } = ps({ projectName: e }), { rowSelection: n, sliceType: r } = qe(), s = B(
|
|
1297
1299
|
() => ({
|
|
1298
1300
|
sliceType: r,
|
|
1299
1301
|
selection: Object.keys(n).filter((u) => n[u])
|
|
1300
1302
|
}),
|
|
1301
1303
|
[r, n]
|
|
1302
|
-
), a =
|
|
1304
|
+
), a = js(), o = lt();
|
|
1303
1305
|
return B(
|
|
1304
1306
|
() => ({ projectName: e, project: t, slicer: s, projectFolders: a, views: o }),
|
|
1305
1307
|
[e, t, s, a, o]
|
|
1306
1308
|
);
|
|
1307
|
-
},
|
|
1308
|
-
const t =
|
|
1309
|
+
}, yo = (e) => {
|
|
1310
|
+
const t = lt();
|
|
1309
1311
|
return B(() => ({ selectedProjects: e, views: t }), [e, t]);
|
|
1310
|
-
},
|
|
1312
|
+
}, Ks = (e) => ["to", "run", "dialog", "menu", "popover", "component"].find(
|
|
1311
1313
|
(t) => e[t] !== void 0
|
|
1312
|
-
),
|
|
1314
|
+
), Ee = (e, t) => e.map((n, r) => {
|
|
1313
1315
|
if ("divider" in n) return { id: "divider" };
|
|
1314
|
-
const { id: s, label: a, icon: o, to: u, href: l, onClick:
|
|
1316
|
+
const { id: s, label: a, icon: o, to: u, href: l, onClick: p, items: c, disabled: E, selected: v, danger: T } = n;
|
|
1315
1317
|
return {
|
|
1316
1318
|
id: `${s}-${r}`,
|
|
1317
1319
|
label: a,
|
|
1318
1320
|
icon: o,
|
|
1319
|
-
disabled:
|
|
1320
|
-
selected:
|
|
1321
|
+
disabled: E,
|
|
1322
|
+
selected: v,
|
|
1321
1323
|
danger: T,
|
|
1322
1324
|
...u ? { link: u } : l ? { link: l, target: "_blank" } : {},
|
|
1323
|
-
...
|
|
1325
|
+
...p ? {
|
|
1324
1326
|
onClick: () => {
|
|
1325
|
-
Promise.resolve().then(
|
|
1327
|
+
Promise.resolve().then(p).catch(t);
|
|
1326
1328
|
}
|
|
1327
1329
|
} : {},
|
|
1328
|
-
...c?.length ? { items:
|
|
1330
|
+
...c?.length ? { items: Ee(c, t) } : {}
|
|
1329
1331
|
};
|
|
1330
|
-
}),
|
|
1332
|
+
}), Eo = ({
|
|
1331
1333
|
contribution: e,
|
|
1332
1334
|
context: t,
|
|
1333
1335
|
renderButton: n,
|
|
1334
1336
|
autoOpen: r,
|
|
1335
1337
|
onContext: s
|
|
1336
1338
|
}) => {
|
|
1337
|
-
const a = e, o =
|
|
1339
|
+
const a = e, o = Ks(a), u = Pe(), l = B(
|
|
1338
1340
|
() => ({ ...t, navigate: (i) => u(i) }),
|
|
1339
1341
|
[t, u]
|
|
1340
|
-
), [
|
|
1342
|
+
), [p, c] = x(!!r && o === "dialog"), E = H(() => c(!1), []), v = B(() => ({ ...l, close: E }), [l, E]), { menuOpen: T, setMenuOpen: g, toggleMenuOpen: V } = ot(), [O, w] = x(!!r && o === "popover"), D = H(() => w(!1), []), R = H(() => {
|
|
1341
1343
|
O || g(!1), w((i) => !i);
|
|
1342
1344
|
}, [O, g]), M = B(
|
|
1343
1345
|
() => ({ ...l, close: D }),
|
|
@@ -1345,15 +1347,15 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1345
1347
|
), U = B(
|
|
1346
1348
|
() => a.popover ? { ...l, popoverOpen: O, togglePopover: R } : l,
|
|
1347
1349
|
[a.popover, l, O, R]
|
|
1348
|
-
),
|
|
1349
|
-
|
|
1350
|
+
), _ = `addon:${a.slot}:${a.key}`, [$, Y] = x([]), [C, b] = x(null);
|
|
1351
|
+
W(
|
|
1350
1352
|
() => s?.(
|
|
1351
|
-
o === "dialog" ?
|
|
1353
|
+
o === "dialog" ? v : o === "popover" ? M : l
|
|
1352
1354
|
),
|
|
1353
|
-
[s, o,
|
|
1355
|
+
[s, o, v, M, l]
|
|
1354
1356
|
);
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
+
const y = o === "popover" && /* @__PURE__ */ d(
|
|
1358
|
+
Ut,
|
|
1357
1359
|
{
|
|
1358
1360
|
contribution: e,
|
|
1359
1361
|
context: M,
|
|
@@ -1362,57 +1364,57 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1362
1364
|
}
|
|
1363
1365
|
);
|
|
1364
1366
|
if (a.component) {
|
|
1365
|
-
const i = /* @__PURE__ */
|
|
1366
|
-
return
|
|
1367
|
-
/* @__PURE__ */
|
|
1367
|
+
const i = /* @__PURE__ */ d(ge, { contribution: e, context: U });
|
|
1368
|
+
return y ? /* @__PURE__ */ F(X, { children: [
|
|
1369
|
+
/* @__PURE__ */ d(
|
|
1368
1370
|
"span",
|
|
1369
1371
|
{
|
|
1370
1372
|
ref: b,
|
|
1371
1373
|
className: "addon-popover-anchor",
|
|
1372
1374
|
style: { display: "inline-flex" },
|
|
1373
|
-
onMouseEnter: () =>
|
|
1375
|
+
onMouseEnter: () => Ie(a.popover),
|
|
1374
1376
|
children: i
|
|
1375
1377
|
}
|
|
1376
1378
|
),
|
|
1377
|
-
|
|
1379
|
+
y
|
|
1378
1380
|
] }) : i;
|
|
1379
1381
|
}
|
|
1380
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ F(X, { children: [
|
|
1381
1383
|
n({
|
|
1382
1384
|
ref: b,
|
|
1383
|
-
active:
|
|
1385
|
+
active: p || O || T === _,
|
|
1384
1386
|
onClick: () => {
|
|
1385
1387
|
if (o === "to") u(a.to);
|
|
1386
|
-
else if (o === "run")
|
|
1388
|
+
else if (o === "run") nt(e, l);
|
|
1387
1389
|
else if (o === "dialog") c((i) => !i);
|
|
1388
1390
|
else if (o === "popover") R();
|
|
1389
1391
|
else if (o === "menu") {
|
|
1390
|
-
if (T ===
|
|
1391
|
-
|
|
1392
|
+
if (T === _) return g(!1);
|
|
1393
|
+
hs(a.menu).then((i) => {
|
|
1392
1394
|
if (typeof i != "function") throw new Error('"menu" has no default export function');
|
|
1393
1395
|
return i(
|
|
1394
|
-
|
|
1396
|
+
gs(a, l)
|
|
1395
1397
|
);
|
|
1396
1398
|
}).then((i) => {
|
|
1397
|
-
|
|
1398
|
-
}).catch((i) =>
|
|
1399
|
+
Y(Ee(i, (m) => Ue(a, m))), V(_);
|
|
1400
|
+
}).catch((i) => Ue(a, i));
|
|
1399
1401
|
}
|
|
1400
1402
|
},
|
|
1401
|
-
onMouseEnter: () => o && o !== "to" &&
|
|
1403
|
+
onMouseEnter: () => o && o !== "to" && Ie(a[o])
|
|
1402
1404
|
}),
|
|
1403
|
-
o === "dialog" &&
|
|
1404
|
-
o === "menu" && /* @__PURE__ */
|
|
1405
|
-
|
|
1405
|
+
o === "dialog" && p && /* @__PURE__ */ d(xs, { contribution: e, context: v }),
|
|
1406
|
+
o === "menu" && /* @__PURE__ */ d(rt, { id: _, target: C, children: /* @__PURE__ */ d(it, { menu: $ }) }),
|
|
1407
|
+
y
|
|
1406
1408
|
] });
|
|
1407
|
-
},
|
|
1409
|
+
}, qs = (e = []) => {
|
|
1408
1410
|
const t = {};
|
|
1409
1411
|
for (const { id: n, entityType: r } of e) {
|
|
1410
|
-
if (!(r in
|
|
1412
|
+
if (!(r in _s)) continue;
|
|
1411
1413
|
const s = r;
|
|
1412
1414
|
t[s] = { ...t[s], [n]: !0 };
|
|
1413
1415
|
}
|
|
1414
1416
|
return t;
|
|
1415
|
-
},
|
|
1417
|
+
}, Qs = (e, t, n, r) => e.map((s, a) => {
|
|
1416
1418
|
const o = t[a];
|
|
1417
1419
|
return {
|
|
1418
1420
|
id: s,
|
|
@@ -1421,43 +1423,43 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1421
1423
|
...o?.name && { name: o.name },
|
|
1422
1424
|
...o?.label && { label: o.label }
|
|
1423
1425
|
};
|
|
1424
|
-
}),
|
|
1426
|
+
}), So = ({
|
|
1425
1427
|
projectName: e,
|
|
1426
1428
|
entityType: t,
|
|
1427
1429
|
multiSelect: n,
|
|
1428
1430
|
initialSelection: r,
|
|
1429
1431
|
onSubmit: s,
|
|
1430
1432
|
onClose: a
|
|
1431
|
-
}) => /* @__PURE__ */
|
|
1432
|
-
|
|
1433
|
+
}) => /* @__PURE__ */ d(
|
|
1434
|
+
Ls,
|
|
1433
1435
|
{
|
|
1434
1436
|
projectName: e,
|
|
1435
1437
|
entityType: t,
|
|
1436
1438
|
isMultiSelect: n,
|
|
1437
|
-
initialSelection:
|
|
1439
|
+
initialSelection: qs(r),
|
|
1438
1440
|
onClose: a,
|
|
1439
|
-
onSubmit: (o, u) => s(
|
|
1441
|
+
onSubmit: (o, u) => s(Qs(o, u, t, e))
|
|
1440
1442
|
}
|
|
1441
|
-
),
|
|
1442
|
-
},
|
|
1443
|
-
const { contributions: t } =
|
|
1444
|
-
return /* @__PURE__ */
|
|
1445
|
-
|
|
1443
|
+
), Xs = () => {
|
|
1444
|
+
}, ko = ({ projectName: e }) => {
|
|
1445
|
+
const { contributions: t } = he("app.service"), n = B(() => ({ projectName: e }), [e]);
|
|
1446
|
+
return /* @__PURE__ */ d(X, { children: t.map((r) => /* @__PURE__ */ d(
|
|
1447
|
+
ge,
|
|
1446
1448
|
{
|
|
1447
1449
|
contribution: r,
|
|
1448
1450
|
context: n,
|
|
1449
|
-
error: (s) => /* @__PURE__ */
|
|
1450
|
-
|
|
1451
|
+
error: (s) => /* @__PURE__ */ d(
|
|
1452
|
+
Fs,
|
|
1451
1453
|
{
|
|
1452
1454
|
contribution: r,
|
|
1453
1455
|
error: s,
|
|
1454
|
-
onReported:
|
|
1456
|
+
onReported: Xs
|
|
1455
1457
|
}
|
|
1456
1458
|
)
|
|
1457
1459
|
},
|
|
1458
1460
|
r.key
|
|
1459
1461
|
)) });
|
|
1460
|
-
},
|
|
1462
|
+
}, Js = (e) => ({
|
|
1461
1463
|
name: e.name,
|
|
1462
1464
|
fullName: e.attrib?.fullName || void 0,
|
|
1463
1465
|
email: e.attrib?.email || void 0,
|
|
@@ -1466,40 +1468,49 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1466
1468
|
isManager: !!(e.isManager || e.isAdmin),
|
|
1467
1469
|
isGuest: !!e.isGuest,
|
|
1468
1470
|
isService: !!e.isService
|
|
1469
|
-
}),
|
|
1470
|
-
const { contributions: t } =
|
|
1471
|
-
() => t.filter((u) =>
|
|
1471
|
+
}), ct = (e, t) => t > 0 && (e !== "single" || t === 1), Co = (e, t) => B(() => ({ users: e.map(Js), readOnly: t }), [e, t]), Oo = (e) => {
|
|
1472
|
+
const { contributions: t } = he("userDetails.menuItem"), n = B(
|
|
1473
|
+
() => t.filter((u) => ct(u.selection, e.users.length)),
|
|
1472
1474
|
[t, e.users.length]
|
|
1473
|
-
), r =
|
|
1475
|
+
), r = H(
|
|
1474
1476
|
(u) => ({
|
|
1475
1477
|
id: u.key,
|
|
1476
1478
|
label: u.label,
|
|
1477
1479
|
icon: u.icon,
|
|
1478
1480
|
"data-addon-item": u.key,
|
|
1479
|
-
onClick: () =>
|
|
1481
|
+
onClick: () => nt(u, e)
|
|
1480
1482
|
}),
|
|
1481
1483
|
[e]
|
|
1482
1484
|
), s = B(
|
|
1483
|
-
() =>
|
|
1485
|
+
() => Be(n, "top").map(r),
|
|
1484
1486
|
[n, r]
|
|
1485
1487
|
), a = B(
|
|
1486
|
-
() =>
|
|
1488
|
+
() => Be(n, "bottom").map(r),
|
|
1487
1489
|
[n, r]
|
|
1488
|
-
), o =
|
|
1489
|
-
() => n.forEach((u) =>
|
|
1490
|
+
), o = H(
|
|
1491
|
+
() => n.forEach((u) => Ie(u.run)),
|
|
1490
1492
|
[n]
|
|
1491
1493
|
);
|
|
1492
1494
|
return { topItems: s, items: a, prefetch: o };
|
|
1493
|
-
},
|
|
1494
|
-
const { contributions: t } =
|
|
1495
|
-
() => t.filter((s) =>
|
|
1495
|
+
}, To = ({ context: e }) => {
|
|
1496
|
+
const { contributions: t } = he("userDetails.section"), n = e.users.some((s) => s.isService), r = B(
|
|
1497
|
+
() => t.filter((s) => ct(s.selection, e.users.length)).filter((s) => !n || s.serviceUsers).sort((s, a) => (s.order ?? 0) - (a.order ?? 0)),
|
|
1496
1498
|
[t, e.users.length, n]
|
|
1497
1499
|
);
|
|
1498
|
-
return /* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ d(X, { children: r.map((s) => /* @__PURE__ */ F(ve, { "data-addon-section": s.key, children: [
|
|
1501
|
+
/* @__PURE__ */ d("b", { children: s.title }),
|
|
1502
|
+
/* @__PURE__ */ d(ge, { contribution: s, context: e })
|
|
1503
|
+
] }, s.key)) });
|
|
1504
|
+
}, Zs = {}, Io = () => {
|
|
1505
|
+
const { contributions: e } = he("profile.section"), { powerLicense: t, isLoading: n } = tt(), r = B(
|
|
1506
|
+
() => e.filter((s) => !s.powerFeature || t && !n).sort((s, a) => (s.order ?? 0) - (a.order ?? 0)),
|
|
1507
|
+
[e, t, n]
|
|
1508
|
+
);
|
|
1509
|
+
return /* @__PURE__ */ d(X, { children: r.map((s) => /* @__PURE__ */ F(ve, { "data-addon-section": s.key, children: [
|
|
1510
|
+
/* @__PURE__ */ d("b", { children: s.title }),
|
|
1511
|
+
/* @__PURE__ */ d(ge, { contribution: s, context: Zs })
|
|
1501
1512
|
] }, s.key)) });
|
|
1502
|
-
},
|
|
1513
|
+
}, Po = ({
|
|
1503
1514
|
items: e,
|
|
1504
1515
|
icon: t = "more_horiz",
|
|
1505
1516
|
label: n,
|
|
@@ -1509,12 +1520,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1509
1520
|
disabled: o,
|
|
1510
1521
|
className: u,
|
|
1511
1522
|
onError: l,
|
|
1512
|
-
"data-testid":
|
|
1523
|
+
"data-testid": p
|
|
1513
1524
|
}) => {
|
|
1514
|
-
const { menuOpen: c, toggleMenuOpen:
|
|
1515
|
-
return /* @__PURE__ */
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
|
|
1525
|
+
const { menuOpen: c, toggleMenuOpen: E } = ot(), v = `addon-more-menu:${Gt()}`, T = c === v, [g, V] = x(null), O = B(() => Ee(e, l), [e, l]), w = r || n || "More";
|
|
1526
|
+
return /* @__PURE__ */ F(X, { children: [
|
|
1527
|
+
/* @__PURE__ */ d(
|
|
1528
|
+
Te,
|
|
1518
1529
|
{
|
|
1519
1530
|
ref: V,
|
|
1520
1531
|
icon: t,
|
|
@@ -1526,13 +1537,32 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1526
1537
|
"aria-haspopup": "true",
|
|
1527
1538
|
"aria-expanded": T,
|
|
1528
1539
|
className: ue(u, { active: T }),
|
|
1529
|
-
"data-testid":
|
|
1530
|
-
onClick: () =>
|
|
1540
|
+
"data-testid": p,
|
|
1541
|
+
onClick: () => E(v)
|
|
1531
1542
|
}
|
|
1532
1543
|
),
|
|
1533
|
-
/* @__PURE__ */
|
|
1544
|
+
/* @__PURE__ */ d(rt, { id: v, target: g, align: a, children: /* @__PURE__ */ d(it, { menu: O }) })
|
|
1534
1545
|
] });
|
|
1535
|
-
},
|
|
1546
|
+
}, ut = (e, t) => e.map(({ id: n, label: r, icon: s, disabled: a, danger: o, link: u, target: l, onClick: p, items: c }) => {
|
|
1547
|
+
if (n === "divider") return { separator: !0 };
|
|
1548
|
+
const E = a ? void 0 : u ? () => l ? window.open(u, l, "noopener") : t(u) : p && ((v) => p(v.originalEvent));
|
|
1549
|
+
return {
|
|
1550
|
+
label: r,
|
|
1551
|
+
icon: s,
|
|
1552
|
+
disabled: a,
|
|
1553
|
+
danger: o,
|
|
1554
|
+
...E ? { command: E } : {},
|
|
1555
|
+
...c?.length ? { items: ut(c, t) } : {}
|
|
1556
|
+
};
|
|
1557
|
+
}), Ao = () => {
|
|
1558
|
+
const [e] = Ms(), t = Pe();
|
|
1559
|
+
return H(
|
|
1560
|
+
(n, r, s) => {
|
|
1561
|
+
n.stopPropagation(), e(n, ut(Ee(r, s), t));
|
|
1562
|
+
},
|
|
1563
|
+
[e, t]
|
|
1564
|
+
);
|
|
1565
|
+
}, ea = /* @__PURE__ */ new Set([
|
|
1536
1566
|
"name",
|
|
1537
1567
|
"extension",
|
|
1538
1568
|
"status",
|
|
@@ -1548,7 +1578,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1548
1578
|
"hasReviewables",
|
|
1549
1579
|
"createdAt",
|
|
1550
1580
|
"updatedAt"
|
|
1551
|
-
]),
|
|
1581
|
+
]), Do = ({
|
|
1552
1582
|
filterTypes: e = [],
|
|
1553
1583
|
projectNames: t,
|
|
1554
1584
|
scope: n,
|
|
@@ -1557,45 +1587,45 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1557
1587
|
config: a,
|
|
1558
1588
|
power: o
|
|
1559
1589
|
}) => {
|
|
1560
|
-
const u =
|
|
1590
|
+
const u = es(), l = s.productTypes || [], p = s.productBaseTypes || [];
|
|
1561
1591
|
let c = [];
|
|
1562
|
-
const
|
|
1563
|
-
scope:
|
|
1592
|
+
const E = /* @__PURE__ */ new Map(), v = r || (n ? Array.isArray(n) ? n : [n] : []).map((y) => ({
|
|
1593
|
+
scope: y,
|
|
1564
1594
|
filterTypes: e
|
|
1565
|
-
})), T =
|
|
1566
|
-
Array.from(new Set(
|
|
1567
|
-
(b) =>
|
|
1595
|
+
})), T = v.length > 1, g = new Set(
|
|
1596
|
+
Array.from(new Set(v.flatMap(({ filterTypes: b }) => b))).filter(
|
|
1597
|
+
(b) => v.filter(({ filterTypes: y }) => y.includes(b)).length > 1
|
|
1568
1598
|
)
|
|
1569
|
-
), V =
|
|
1570
|
-
(b) => ["entitySubType", "status"].some((
|
|
1571
|
-
), O =
|
|
1599
|
+
), V = v.some(
|
|
1600
|
+
(b) => ["entitySubType", "status"].some((y) => b.filterTypes.includes(y))
|
|
1601
|
+
), O = v.some(
|
|
1572
1602
|
(b) => ["assignees", "users", "author"].some(
|
|
1573
|
-
(
|
|
1603
|
+
(y) => b.filterTypes.includes(y)
|
|
1574
1604
|
)
|
|
1575
|
-
), { data: w = {} } =
|
|
1605
|
+
), { data: w = {} } = fs(
|
|
1576
1606
|
{
|
|
1577
1607
|
projects: t
|
|
1578
1608
|
},
|
|
1579
1609
|
{
|
|
1580
1610
|
skip: !t?.length || !V
|
|
1581
1611
|
}
|
|
1582
|
-
), { data: D = [] } =
|
|
1612
|
+
), { data: D = [] } = ms(
|
|
1583
1613
|
{ projects: t },
|
|
1584
1614
|
{
|
|
1585
1615
|
skip: !t?.length || !O
|
|
1586
1616
|
}
|
|
1587
|
-
), { attributes: R } =
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1617
|
+
), { attributes: R } = Ze(), M = zt(jt), U = M?.attribFields?.length ? M.attribFields : R, _ = /* @__PURE__ */ new Map();
|
|
1618
|
+
v.forEach(({ scope: b, filterTypes: y }) => {
|
|
1619
|
+
y.includes("attributes") && U.filter((k) => k.scope?.includes(b)).forEach((k) => {
|
|
1620
|
+
_.set(
|
|
1591
1621
|
k.name,
|
|
1592
|
-
(
|
|
1622
|
+
(_.get(k.name) || 0) + 1
|
|
1593
1623
|
);
|
|
1594
1624
|
});
|
|
1595
|
-
}),
|
|
1625
|
+
}), v.forEach(({ scope: b, filterTypes: y }) => {
|
|
1596
1626
|
const k = T ? b : void 0;
|
|
1597
|
-
if (
|
|
1598
|
-
const i =
|
|
1627
|
+
if (y.includes("taskType") && b !== "user") {
|
|
1628
|
+
const i = j(
|
|
1599
1629
|
"taskType",
|
|
1600
1630
|
{
|
|
1601
1631
|
...a,
|
|
@@ -1605,12 +1635,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1605
1635
|
g.has("taskType")
|
|
1606
1636
|
);
|
|
1607
1637
|
if (i) {
|
|
1608
|
-
let m =
|
|
1638
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "task");
|
|
1609
1639
|
i.values?.push(...m), c.push(i);
|
|
1610
1640
|
}
|
|
1611
1641
|
}
|
|
1612
|
-
if (
|
|
1613
|
-
const i =
|
|
1642
|
+
if (y.includes("folderType") && b !== "user") {
|
|
1643
|
+
const i = j(
|
|
1614
1644
|
"folderType",
|
|
1615
1645
|
{
|
|
1616
1646
|
...a,
|
|
@@ -1620,12 +1650,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1620
1650
|
g.has("folderType")
|
|
1621
1651
|
);
|
|
1622
1652
|
if (i) {
|
|
1623
|
-
let m =
|
|
1653
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "folder");
|
|
1624
1654
|
i.values?.push(...m), c.push(i);
|
|
1625
1655
|
}
|
|
1626
1656
|
}
|
|
1627
|
-
if (
|
|
1628
|
-
const i =
|
|
1657
|
+
if (y.includes("productType") && b !== "user") {
|
|
1658
|
+
const i = j(
|
|
1629
1659
|
"productType",
|
|
1630
1660
|
{
|
|
1631
1661
|
...a,
|
|
@@ -1635,12 +1665,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1635
1665
|
g.has("productType")
|
|
1636
1666
|
);
|
|
1637
1667
|
if (i) {
|
|
1638
|
-
let m =
|
|
1668
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "product");
|
|
1639
1669
|
i.values?.push(...m), c.push(i);
|
|
1640
1670
|
}
|
|
1641
1671
|
}
|
|
1642
|
-
if (
|
|
1643
|
-
const i =
|
|
1672
|
+
if (y.includes("productBaseType") && b !== "user") {
|
|
1673
|
+
const i = j(
|
|
1644
1674
|
"productBaseType",
|
|
1645
1675
|
{
|
|
1646
1676
|
...a,
|
|
@@ -1649,36 +1679,36 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1649
1679
|
k,
|
|
1650
1680
|
g.has("productBaseType")
|
|
1651
1681
|
);
|
|
1652
|
-
i && (
|
|
1653
|
-
i.values?.some((h) => h.id ===
|
|
1654
|
-
id:
|
|
1655
|
-
label:
|
|
1682
|
+
i && (p.forEach(({ icon: m, name: f }) => {
|
|
1683
|
+
i.values?.some((h) => h.id === f) || i.values?.push({
|
|
1684
|
+
id: f,
|
|
1685
|
+
label: f,
|
|
1656
1686
|
icon: m || re("product")
|
|
1657
1687
|
});
|
|
1658
|
-
}), s.productBaseTypes?.forEach(({ icon: m, name:
|
|
1659
|
-
i.values?.some((h) => h.id ===
|
|
1660
|
-
id:
|
|
1661
|
-
label:
|
|
1688
|
+
}), s.productBaseTypes?.forEach(({ icon: m, name: f }) => {
|
|
1689
|
+
i.values?.some((h) => h.id === f) || i.values?.push({
|
|
1690
|
+
id: f,
|
|
1691
|
+
label: f,
|
|
1662
1692
|
icon: m || re("product")
|
|
1663
1693
|
});
|
|
1664
1694
|
}), c.push(i));
|
|
1665
1695
|
}
|
|
1666
|
-
if (
|
|
1667
|
-
const i =
|
|
1696
|
+
if (y.includes("productName") && b === "product") {
|
|
1697
|
+
const i = j(
|
|
1668
1698
|
"productName",
|
|
1669
1699
|
a,
|
|
1670
1700
|
k,
|
|
1671
1701
|
g.has("productName")
|
|
1672
1702
|
);
|
|
1673
1703
|
i && (s.productNames?.forEach((m) => {
|
|
1674
|
-
i.values?.some((
|
|
1704
|
+
i.values?.some((f) => f.id === m) || i.values?.push({
|
|
1675
1705
|
id: m,
|
|
1676
1706
|
label: m
|
|
1677
1707
|
});
|
|
1678
1708
|
}), c.push(i));
|
|
1679
1709
|
}
|
|
1680
|
-
if (
|
|
1681
|
-
const i =
|
|
1710
|
+
if (y.includes("status")) {
|
|
1711
|
+
const i = j(
|
|
1682
1712
|
"status",
|
|
1683
1713
|
{ ...a, enableOperatorChange: !1 },
|
|
1684
1714
|
k,
|
|
@@ -1695,34 +1725,34 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1695
1725
|
});
|
|
1696
1726
|
}), c.push(i));
|
|
1697
1727
|
}
|
|
1698
|
-
if (
|
|
1699
|
-
const i =
|
|
1728
|
+
if (y.includes("assignees")) {
|
|
1729
|
+
const i = j(
|
|
1700
1730
|
"assignees",
|
|
1701
1731
|
a,
|
|
1702
1732
|
k,
|
|
1703
1733
|
g.has("assignees")
|
|
1704
1734
|
);
|
|
1705
1735
|
i && (D.forEach((m) => {
|
|
1706
|
-
i.values?.some((
|
|
1736
|
+
i.values?.some((f) => f.id === m.name) || i.values?.push({
|
|
1707
1737
|
id: m.name,
|
|
1708
1738
|
label: m.attrib.fullName || m.name,
|
|
1709
1739
|
img: `/api/users/${m.name}/avatar`,
|
|
1710
1740
|
icon: null
|
|
1711
1741
|
});
|
|
1712
|
-
}), i.values?.sort((m,
|
|
1742
|
+
}), i.values?.sort((m, f) => {
|
|
1713
1743
|
const h = s.assignees?.filter((P) => P === m.id).length || 0;
|
|
1714
|
-
return (s.assignees?.filter((P) => P ===
|
|
1744
|
+
return (s.assignees?.filter((P) => P === f.id).length || 0) - h;
|
|
1715
1745
|
}), c.push(i));
|
|
1716
1746
|
}
|
|
1717
|
-
if (
|
|
1718
|
-
const i =
|
|
1747
|
+
if (y.includes("author")) {
|
|
1748
|
+
const i = j(
|
|
1719
1749
|
"author",
|
|
1720
1750
|
a,
|
|
1721
1751
|
k,
|
|
1722
1752
|
g.has("author")
|
|
1723
1753
|
);
|
|
1724
1754
|
i && (D.forEach((m) => {
|
|
1725
|
-
i.values?.some((
|
|
1755
|
+
i.values?.some((f) => f.id === m.name) || i.values?.push({
|
|
1726
1756
|
id: m.name,
|
|
1727
1757
|
label: m.attrib.fullName || m.name,
|
|
1728
1758
|
img: `/api/users/${m.name}/avatar`,
|
|
@@ -1730,8 +1760,8 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1730
1760
|
});
|
|
1731
1761
|
}), c.push(i));
|
|
1732
1762
|
}
|
|
1733
|
-
if (
|
|
1734
|
-
const i =
|
|
1763
|
+
if (y.includes("tags")) {
|
|
1764
|
+
const i = j("tags", a, k, g.has("tags"));
|
|
1735
1765
|
if (i) {
|
|
1736
1766
|
const m = /* @__PURE__ */ new Map();
|
|
1737
1767
|
Object.values(w).forEach((I) => {
|
|
@@ -1739,46 +1769,46 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1739
1769
|
m.has(P.name) || m.set(P.name, P);
|
|
1740
1770
|
});
|
|
1741
1771
|
});
|
|
1742
|
-
const
|
|
1772
|
+
const f = /* @__PURE__ */ new Map();
|
|
1743
1773
|
s.tags?.forEach((I) => {
|
|
1744
|
-
const P =
|
|
1774
|
+
const P = f.get(I);
|
|
1745
1775
|
if (P) {
|
|
1746
1776
|
P.count++;
|
|
1747
1777
|
return;
|
|
1748
1778
|
} else {
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1779
|
+
const S = m.get(I);
|
|
1780
|
+
f.set(I, {
|
|
1751
1781
|
id: I,
|
|
1752
1782
|
type: "string",
|
|
1753
1783
|
label: I,
|
|
1754
1784
|
values: [],
|
|
1755
|
-
color:
|
|
1785
|
+
color: S?.color || null,
|
|
1756
1786
|
count: 1
|
|
1757
1787
|
});
|
|
1758
1788
|
}
|
|
1759
1789
|
});
|
|
1760
|
-
const h = Array.from(
|
|
1790
|
+
const h = Array.from(f.values()).sort(
|
|
1761
1791
|
(I, P) => P.count - I.count
|
|
1762
1792
|
);
|
|
1763
1793
|
i.values?.push(...h), c.push(i);
|
|
1764
1794
|
}
|
|
1765
1795
|
}
|
|
1766
|
-
if (
|
|
1767
|
-
const i =
|
|
1768
|
-
i && (
|
|
1796
|
+
if (y.includes("version")) {
|
|
1797
|
+
const i = j("version", a, k);
|
|
1798
|
+
i && (Bt.forEach((f) => {
|
|
1769
1799
|
i.values?.push({
|
|
1770
|
-
id:
|
|
1771
|
-
label:
|
|
1772
|
-
icon:
|
|
1800
|
+
id: f.value,
|
|
1801
|
+
label: f.label,
|
|
1802
|
+
icon: f.icon
|
|
1773
1803
|
});
|
|
1774
1804
|
}), c.push(i));
|
|
1775
1805
|
}
|
|
1776
|
-
if (
|
|
1777
|
-
const i =
|
|
1806
|
+
if (y.includes("name")) {
|
|
1807
|
+
const i = j("name", a, k, g.has("name"));
|
|
1778
1808
|
i && c.push(i);
|
|
1779
1809
|
}
|
|
1780
|
-
if (
|
|
1781
|
-
const i =
|
|
1810
|
+
if (y.includes("extension") && b === "representation") {
|
|
1811
|
+
const i = j(
|
|
1782
1812
|
"extension",
|
|
1783
1813
|
a,
|
|
1784
1814
|
k,
|
|
@@ -1786,8 +1816,8 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1786
1816
|
);
|
|
1787
1817
|
i && c.push(i);
|
|
1788
1818
|
}
|
|
1789
|
-
if (
|
|
1790
|
-
const i =
|
|
1819
|
+
if (y.includes("hasReviewables")) {
|
|
1820
|
+
const i = j(
|
|
1791
1821
|
"hasReviewables",
|
|
1792
1822
|
a,
|
|
1793
1823
|
k,
|
|
@@ -1809,80 +1839,80 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1809
1839
|
i.values?.push(...m), c.push(i);
|
|
1810
1840
|
}
|
|
1811
1841
|
}
|
|
1812
|
-
if (
|
|
1813
|
-
const i =
|
|
1842
|
+
if (y.includes("createdAt")) {
|
|
1843
|
+
const i = j(
|
|
1814
1844
|
"createdAt",
|
|
1815
1845
|
a,
|
|
1816
1846
|
k,
|
|
1817
1847
|
g.has("createdAt")
|
|
1818
1848
|
);
|
|
1819
|
-
i && (i.values?.push(
|
|
1820
|
-
...
|
|
1849
|
+
i && (i.values?.push(ke), i.values?.push(
|
|
1850
|
+
...Ce().map((m) => ({
|
|
1821
1851
|
...m,
|
|
1822
|
-
contentAfter: o ? void 0 : /* @__PURE__ */
|
|
1852
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1823
1853
|
}))
|
|
1824
1854
|
), c.push(i));
|
|
1825
1855
|
}
|
|
1826
|
-
if (
|
|
1827
|
-
const i =
|
|
1856
|
+
if (y.includes("updatedAt")) {
|
|
1857
|
+
const i = j(
|
|
1828
1858
|
"updatedAt",
|
|
1829
1859
|
a,
|
|
1830
1860
|
k,
|
|
1831
1861
|
g.has("updatedAt")
|
|
1832
1862
|
);
|
|
1833
|
-
i && (i.values?.push(
|
|
1834
|
-
...
|
|
1863
|
+
i && (i.values?.push(ke), i.values?.push(
|
|
1864
|
+
...Ce().map((m) => ({
|
|
1835
1865
|
...m,
|
|
1836
|
-
contentAfter: o ? void 0 : /* @__PURE__ */
|
|
1866
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1837
1867
|
}))
|
|
1838
1868
|
), c.push(i));
|
|
1839
1869
|
}
|
|
1840
|
-
if (
|
|
1870
|
+
if (y.includes("attributes")) {
|
|
1841
1871
|
const i = U.filter(
|
|
1842
1872
|
(h) => h.scope?.includes(b) && // replaced by the dedicated extension option: publishing never sets this
|
|
1843
1873
|
// attribute on representations, so filtering on it matches nothing
|
|
1844
|
-
!(
|
|
1845
|
-
), m =
|
|
1874
|
+
!(y.includes("extension") && h.name === "extension")
|
|
1875
|
+
), m = bs(s.attributes) ? i : i.filter(
|
|
1846
1876
|
(h) => s.attributes && s.attributes[h.name]
|
|
1847
1877
|
);
|
|
1848
1878
|
(a?.enableRelativeValues ? m : m.filter((h) => h.data.type !== "datetime")).forEach((h) => {
|
|
1849
|
-
const I = s.attributes && s.attributes[h.name], P = h.data.enum,
|
|
1879
|
+
const I = s.attributes && s.attributes[h.name], P = h.data.enum, S = h.data.type, L = [
|
|
1850
1880
|
"list_of_strings",
|
|
1851
1881
|
"list_of_integers",
|
|
1852
1882
|
"list_of_any",
|
|
1853
1883
|
"list_of_submodels"
|
|
1854
|
-
].includes(
|
|
1884
|
+
].includes(S || ""), G = S === "datetime", K = S === "string", J = S === "integer" || S === "float", oe = L ? a?.enableOperatorChange : !1, se = h.data.default !== void 0 && h.data.default !== null && h.data.inherit !== !1, be = (L || G || K || J) && !se ? a?.enableRelativeValues : !1, Z = ta(
|
|
1855
1885
|
h,
|
|
1856
1886
|
{
|
|
1857
1887
|
...a,
|
|
1858
1888
|
allowsCustomValues: !0,
|
|
1859
1889
|
enableOperatorChange: oe,
|
|
1860
|
-
enableRelativeValues:
|
|
1890
|
+
enableRelativeValues: be
|
|
1861
1891
|
},
|
|
1862
1892
|
k,
|
|
1863
|
-
(
|
|
1893
|
+
(_.get(h.name) || 0) > 1
|
|
1864
1894
|
);
|
|
1865
1895
|
if (h.data.enumResolver) {
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1896
|
+
const te = h.data;
|
|
1897
|
+
Z.loadValuesKey = t?.[0], Z.loadValues = async () => je(
|
|
1868
1898
|
I,
|
|
1869
|
-
await u(
|
|
1870
|
-
|
|
1899
|
+
await u(te, t?.[0]),
|
|
1900
|
+
S
|
|
1871
1901
|
);
|
|
1872
1902
|
}
|
|
1873
|
-
const
|
|
1903
|
+
const we = [
|
|
1874
1904
|
"string",
|
|
1875
1905
|
"integer",
|
|
1876
1906
|
"float",
|
|
1877
1907
|
"list_of_strings",
|
|
1878
1908
|
"list_of_integers"
|
|
1879
|
-
],
|
|
1880
|
-
if (
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1909
|
+
], ee = [];
|
|
1910
|
+
if (we.includes(S)) {
|
|
1911
|
+
const te = je(I, P, S);
|
|
1912
|
+
ee.push(...te);
|
|
1883
1913
|
}
|
|
1884
|
-
if (
|
|
1885
|
-
const
|
|
1914
|
+
if (S === "boolean") {
|
|
1915
|
+
const te = [
|
|
1886
1916
|
{
|
|
1887
1917
|
id: "true",
|
|
1888
1918
|
label: "Yes",
|
|
@@ -1894,34 +1924,34 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1894
1924
|
values: []
|
|
1895
1925
|
}
|
|
1896
1926
|
];
|
|
1897
|
-
|
|
1927
|
+
ee.push(...te);
|
|
1898
1928
|
}
|
|
1899
|
-
G && (
|
|
1900
|
-
...
|
|
1901
|
-
...
|
|
1902
|
-
contentAfter: o ? void 0 : /* @__PURE__ */
|
|
1929
|
+
G && (ee.push(ke), ee.push(
|
|
1930
|
+
...Ce().map((te) => ({
|
|
1931
|
+
...te,
|
|
1932
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1903
1933
|
}))
|
|
1904
|
-
)),
|
|
1934
|
+
)), Z.values?.push(...ee), E.set(Z.id, h.name), c.push(Z);
|
|
1905
1935
|
});
|
|
1906
1936
|
}
|
|
1907
1937
|
});
|
|
1908
|
-
const $ = c.reduce((b,
|
|
1909
|
-
if (!
|
|
1910
|
-
const k = typeof
|
|
1911
|
-
return b.some((
|
|
1938
|
+
const $ = c.reduce((b, y) => {
|
|
1939
|
+
if (!y.group) return b;
|
|
1940
|
+
const k = typeof y.group == "string" ? void 0 : y.group, i = k?.name || y.group, m = v.some(({ scope: f }) => f === i);
|
|
1941
|
+
return b.some((f) => f.name === i) || b.push({
|
|
1912
1942
|
name: i,
|
|
1913
|
-
label: m ? me(i) : k?.label ||
|
|
1914
|
-
icon: m ? re(i) : k?.icon ||
|
|
1915
|
-
color: k?.color ||
|
|
1943
|
+
label: m ? me(i) : k?.label || y.label,
|
|
1944
|
+
icon: m ? re(i) : k?.icon || y.icon,
|
|
1945
|
+
color: k?.color || y.color
|
|
1916
1946
|
}), b;
|
|
1917
|
-
}, []),
|
|
1947
|
+
}, []), Y = sa(c, E, U), C = aa(
|
|
1918
1948
|
$,
|
|
1919
|
-
|
|
1920
|
-
|
|
1949
|
+
Y,
|
|
1950
|
+
E,
|
|
1921
1951
|
U
|
|
1922
1952
|
);
|
|
1923
|
-
return { options:
|
|
1924
|
-
},
|
|
1953
|
+
return { options: Y, groupOptions: C };
|
|
1954
|
+
}, Oe = ({
|
|
1925
1955
|
projectsInfo: e,
|
|
1926
1956
|
productTypes: t
|
|
1927
1957
|
}, n) => {
|
|
@@ -1973,12 +2003,12 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
1973
2003
|
});
|
|
1974
2004
|
});
|
|
1975
2005
|
}), r;
|
|
1976
|
-
},
|
|
2006
|
+
}, dt = (e, t, n, r) => {
|
|
1977
2007
|
const { prefixes: s, keys: a } = n || {};
|
|
1978
2008
|
let o = e;
|
|
1979
2009
|
return a && t in a ? o = `${a[t]}` : s && t in s && (o = `${s[t]}${e}`), r && (o = `${r}_${o}`), o;
|
|
1980
|
-
},
|
|
1981
|
-
const s = (l) =>
|
|
2010
|
+
}, j = (e, t, n, r = !1) => {
|
|
2011
|
+
const s = (l) => dt(l, e, t, n);
|
|
1982
2012
|
let a = null;
|
|
1983
2013
|
switch (e) {
|
|
1984
2014
|
case "taskType":
|
|
@@ -2236,14 +2266,14 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2236
2266
|
};
|
|
2237
2267
|
}
|
|
2238
2268
|
return a && n && (a.tooltip = u(a.label), a.value = { label: u(a.label) }), a && e === "version" && n === "version" && (a.value = { label: "Product Version" }, a.tooltip = "Product Version"), a;
|
|
2239
|
-
},
|
|
2269
|
+
}, ta = (e, t, n, r = !1) => {
|
|
2240
2270
|
const s = e.data.title || e.name, a = r || n ? {
|
|
2241
2271
|
name: n || e.name,
|
|
2242
2272
|
label: n ? me(n) : s,
|
|
2243
|
-
icon: n ? re(n) : q(e.name, e.data.type,
|
|
2273
|
+
icon: n ? re(n) : q(e.name, e.data.type, Ne(e.data))
|
|
2244
2274
|
} : void 0;
|
|
2245
2275
|
return {
|
|
2246
|
-
id:
|
|
2276
|
+
id: dt(e.name, "attributes", t, n),
|
|
2247
2277
|
type: e.data.type,
|
|
2248
2278
|
label: s,
|
|
2249
2279
|
operator: "OR",
|
|
@@ -2254,19 +2284,19 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2254
2284
|
allowNoValue: t.enableRelativeValues,
|
|
2255
2285
|
allowExcludes: t?.enableExcludes,
|
|
2256
2286
|
operatorChangeable: t?.enableOperatorChange,
|
|
2257
|
-
icon: q(e.name, e.data.type,
|
|
2287
|
+
icon: q(e.name, e.data.type, Ne(e.data)),
|
|
2258
2288
|
group: a,
|
|
2259
2289
|
tooltip: n ? `${me(n)} ${s}` : void 0,
|
|
2260
2290
|
value: n ? { icon: re(n) } : void 0,
|
|
2261
2291
|
singleSelect: ["boolean", "datetime"].includes(e.data.type || "")
|
|
2262
2292
|
};
|
|
2263
|
-
},
|
|
2293
|
+
}, je = (e, t, n) => {
|
|
2264
2294
|
const r = [], s = [];
|
|
2265
2295
|
if (t) {
|
|
2266
2296
|
const a = (e || []).flatMap((o) => Array.isArray(o) ? o : [o]);
|
|
2267
|
-
|
|
2297
|
+
ts(t, a).forEach(
|
|
2268
2298
|
(o) => {
|
|
2269
|
-
const u = o.icon, l =
|
|
2299
|
+
const u = o.icon, l = ss(u);
|
|
2270
2300
|
r.push({
|
|
2271
2301
|
id: o.value.toString(),
|
|
2272
2302
|
type: n,
|
|
@@ -2297,9 +2327,9 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2297
2327
|
}
|
|
2298
2328
|
const u = o.trim().toLowerCase().replace(/[^a-z0-9\s]/g, "").replace(/\s+/g, "-");
|
|
2299
2329
|
if (r?.find((c) => c.id === u)) return;
|
|
2300
|
-
const
|
|
2301
|
-
if (
|
|
2302
|
-
|
|
2330
|
+
const p = s.find((c) => c.id === u);
|
|
2331
|
+
if (p) {
|
|
2332
|
+
p.count++;
|
|
2303
2333
|
return;
|
|
2304
2334
|
} else
|
|
2305
2335
|
s.push({
|
|
@@ -2310,32 +2340,32 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2310
2340
|
count: 1
|
|
2311
2341
|
});
|
|
2312
2342
|
}), s.sort((a, o) => o.count - a.count), [...r, ...s];
|
|
2313
|
-
},
|
|
2314
|
-
|
|
2343
|
+
}, sa = (e, t, n) => [...e].sort((r, s) => pt(
|
|
2344
|
+
ye(r),
|
|
2315
2345
|
t.get(r.id),
|
|
2316
|
-
|
|
2346
|
+
ye(s),
|
|
2317
2347
|
t.get(s.id),
|
|
2318
2348
|
n
|
|
2319
|
-
)),
|
|
2349
|
+
)), ye = (e) => e.group ? typeof e.group == "string" ? e.group : e.group.name : e.id, aa = (e, t, n, r) => [...e].sort((s, a) => {
|
|
2320
2350
|
const o = t.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === s.name), u = t.find((l) => (typeof l.group == "string" ? l.group : l.group?.name) === a.name);
|
|
2321
|
-
return
|
|
2322
|
-
o ?
|
|
2351
|
+
return pt(
|
|
2352
|
+
o ? ye(o) : s.name,
|
|
2323
2353
|
o ? n.get(o.id) : s.name,
|
|
2324
|
-
u ?
|
|
2354
|
+
u ? ye(u) : a.name,
|
|
2325
2355
|
u ? n.get(u.id) : a.name,
|
|
2326
2356
|
r
|
|
2327
2357
|
);
|
|
2328
|
-
}),
|
|
2329
|
-
const a = new Map(s.map((
|
|
2358
|
+
}), pt = (e, t, n, r, s) => {
|
|
2359
|
+
const a = new Map(s.map((p, c) => [p.name, c])), o = (p) => {
|
|
2330
2360
|
let c = 0;
|
|
2331
|
-
for (const
|
|
2332
|
-
if (
|
|
2361
|
+
for (const E of ea) {
|
|
2362
|
+
if (p === E || p.endsWith(`_${E}`)) return c;
|
|
2333
2363
|
c++;
|
|
2334
2364
|
}
|
|
2335
2365
|
return Number.MAX_SAFE_INTEGER;
|
|
2336
2366
|
}, u = t ? [1, a.get(t) ?? Number.MAX_SAFE_INTEGER] : [0, o(e)], l = r ? [1, a.get(r) ?? Number.MAX_SAFE_INTEGER] : [0, o(n)];
|
|
2337
2367
|
return u[0] - l[0] || u[1] - l[1];
|
|
2338
|
-
},
|
|
2368
|
+
}, Ro = (e, t, n, r) => {
|
|
2339
2369
|
const s = {
|
|
2340
2370
|
folder: { conditions: [], operator: e?.operator || "and" },
|
|
2341
2371
|
product: { conditions: [], operator: e?.operator || "and" },
|
|
@@ -2348,15 +2378,15 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2348
2378
|
if (!e?.conditions || e?.conditions.length === 0)
|
|
2349
2379
|
return s;
|
|
2350
2380
|
const a = (l) => {
|
|
2351
|
-
const
|
|
2352
|
-
if (
|
|
2353
|
-
const c = l.substring(`${
|
|
2354
|
-
return { scope:
|
|
2381
|
+
const p = t.find((c) => l.startsWith(`${c}_`));
|
|
2382
|
+
if (p) {
|
|
2383
|
+
const c = l.substring(`${p}_`.length);
|
|
2384
|
+
return { scope: p, cleanId: c };
|
|
2355
2385
|
} else if (n?.fallbackScope)
|
|
2356
2386
|
return { scope: n.fallbackScope, cleanId: l };
|
|
2357
2387
|
return { scope: null, cleanId: l };
|
|
2358
2388
|
}, o = (l) => {
|
|
2359
|
-
const
|
|
2389
|
+
const p = {
|
|
2360
2390
|
folder: [],
|
|
2361
2391
|
product: [],
|
|
2362
2392
|
task: [],
|
|
@@ -2366,32 +2396,32 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2366
2396
|
unscoped: []
|
|
2367
2397
|
};
|
|
2368
2398
|
if ("conditions" in l && !("key" in l)) {
|
|
2369
|
-
const c = (l.conditions || []).map((
|
|
2370
|
-
Object.keys(
|
|
2371
|
-
const
|
|
2372
|
-
T.length > 0 && (T.length === 1 && !l.operator ?
|
|
2399
|
+
const c = (l.conditions || []).map((E) => o(E));
|
|
2400
|
+
Object.keys(p).forEach((E) => {
|
|
2401
|
+
const v = E, T = c.flatMap((g) => g[v]);
|
|
2402
|
+
T.length > 0 && (T.length === 1 && !l.operator ? p[v].push(T[0]) : p[v].push({
|
|
2373
2403
|
conditions: T,
|
|
2374
2404
|
operator: l.operator
|
|
2375
2405
|
}));
|
|
2376
2406
|
});
|
|
2377
2407
|
} else if ("key" in l) {
|
|
2378
|
-
const { scope: c, cleanId:
|
|
2408
|
+
const { scope: c, cleanId: E } = a(l.key);
|
|
2379
2409
|
if (c)
|
|
2380
|
-
|
|
2410
|
+
p[c].push({ ...l, key: E });
|
|
2381
2411
|
else {
|
|
2382
|
-
const
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
}) :
|
|
2412
|
+
const v = r?.[l.key];
|
|
2413
|
+
v ? p[v].push(l) : l.key === Yt || l.key === "name" || l.key?.endsWith("_name") ? t.forEach((T) => {
|
|
2414
|
+
p[T].push(l);
|
|
2415
|
+
}) : p.unscoped.push(l);
|
|
2386
2416
|
}
|
|
2387
2417
|
}
|
|
2388
|
-
return
|
|
2418
|
+
return p;
|
|
2389
2419
|
}, u = (e.conditions || []).map((l) => o(l));
|
|
2390
2420
|
return Object.keys(s).forEach((l) => {
|
|
2391
|
-
const
|
|
2392
|
-
s[
|
|
2421
|
+
const p = l;
|
|
2422
|
+
s[p].conditions = u.flatMap((c) => c[p]);
|
|
2393
2423
|
}), s;
|
|
2394
|
-
},
|
|
2424
|
+
}, Vo = (e, t, n) => {
|
|
2395
2425
|
const r = {
|
|
2396
2426
|
folder: [],
|
|
2397
2427
|
product: [],
|
|
@@ -2421,7 +2451,7 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2421
2451
|
l ? r[l].push(o) : r.unscoped.push(o);
|
|
2422
2452
|
}
|
|
2423
2453
|
}), r;
|
|
2424
|
-
}, ce = ["status", "tags", "attributes", "createdAt", "updatedAt"],
|
|
2454
|
+
}, ce = ["status", "tags", "attributes", "createdAt", "updatedAt"], oa = {
|
|
2425
2455
|
folder: [...ce, "name", "folderType"],
|
|
2426
2456
|
task: [...ce, "name", "taskType", "folderType", "assignees"],
|
|
2427
2457
|
version: [
|
|
@@ -2438,213 +2468,215 @@ const Ge = 500, $s = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, eo = ({
|
|
|
2438
2468
|
product: [...ce, "productName", "productBaseType"],
|
|
2439
2469
|
representation: [...ce, "name", "extension"],
|
|
2440
2470
|
user: [...ce]
|
|
2441
|
-
},
|
|
2471
|
+
}, xo = (e, t) => e.map((n) => ({
|
|
2442
2472
|
scope: n,
|
|
2443
|
-
filterTypes:
|
|
2473
|
+
filterTypes: oa[n].filter((r) => !t?.[n]?.includes(r))
|
|
2444
2474
|
}));
|
|
2445
2475
|
export {
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2476
|
+
Vn as $createMediaNode,
|
|
2477
|
+
xn as $createMentionNode,
|
|
2478
|
+
Fn as $createYouTubeNode,
|
|
2479
|
+
_n as $getMarkdown,
|
|
2480
|
+
Ln as $isMediaNode,
|
|
2481
|
+
Mn as $isMentionNode,
|
|
2482
|
+
Nn as $isYouTubeNode,
|
|
2483
|
+
Un as $setMarkdown,
|
|
2484
|
+
ro as ACCESS_LEVEL_LABELS,
|
|
2485
|
+
Bn as ACTIVITY_LINK_LABEL,
|
|
2486
|
+
no as AccessSearchInput,
|
|
2487
|
+
Re as AccessUser,
|
|
2488
|
+
Lo as AddColumnButton,
|
|
2489
|
+
En as AddNewLinks,
|
|
2490
|
+
Eo as AddonButton,
|
|
2491
|
+
xs as AddonDialog,
|
|
2492
|
+
So as AddonEntityPicker,
|
|
2493
|
+
Mo as AddonLoadingScreen,
|
|
2494
|
+
Po as AddonMoreMenu,
|
|
2495
|
+
Io as AddonProfileSections,
|
|
2496
|
+
ko as AddonServices,
|
|
2497
|
+
To as AddonUserDetailsSections,
|
|
2498
|
+
No as AttributeEditor,
|
|
2499
|
+
_e as BLOCK_DIALOG_CLOSE_CLASS,
|
|
2500
|
+
bn as Badge,
|
|
2501
|
+
wn as BadgeWrapper,
|
|
2502
|
+
$n as CUSTOM_RANGE_ICON,
|
|
2503
|
+
Gn as CUSTOM_RANGE_ID,
|
|
2504
|
+
zn as CellEditingDialog,
|
|
2505
|
+
Sn as Chips,
|
|
2506
|
+
al as ColumnHeaderMenuUI,
|
|
2507
|
+
ki as ColumnMenuButton,
|
|
2508
|
+
Uo as ColumnsSettings,
|
|
2509
|
+
Bo as ColumnsSettingsWithContext,
|
|
2510
|
+
Ji as CustomDateRangeDialog,
|
|
2511
|
+
$o as CustomizeButton,
|
|
2512
|
+
Go as DEFAULT_FEATURED_ORDER,
|
|
2513
|
+
Hn as DEFAULT_TOOLBAR,
|
|
2514
|
+
Fr as DELETE_CONFIRM_THRESHOLD,
|
|
2515
|
+
Nr as DELETE_TYPE_ORDER,
|
|
2516
|
+
Wn as DESCRIPTION_TOOLBAR,
|
|
2517
|
+
io as DateRangePicker,
|
|
2518
|
+
_r as DeleteConfirmContent,
|
|
2519
|
+
Ur as DeleteEntitiesConfirmDialog,
|
|
2520
|
+
kn as DescriptionSection,
|
|
2521
|
+
Wr as DetailsDialog,
|
|
2522
|
+
Jt as DetailsPanelAttributesEditor,
|
|
2523
|
+
jr as DetailsPanelDetails,
|
|
2524
|
+
Zt as DetailsSection,
|
|
2525
|
+
Yn as DoneCheckbox,
|
|
2526
|
+
vi as ENTITY_TOOLTIP_TYPES,
|
|
2527
|
+
zo as EVERYONE_GROUP_KEY,
|
|
2528
|
+
Ho as EVERY_GUESTS_KEY,
|
|
2529
|
+
Wo as EarlyPreview,
|
|
2530
|
+
oi as EmptyPlaceholder,
|
|
2531
|
+
ii as EmptyPlaceholderFlex,
|
|
2532
|
+
li as EmptyPlaceholderFlexWrapper,
|
|
2533
|
+
Cn as EntityIcon,
|
|
2534
|
+
mi as EntityPanelUploader,
|
|
2535
|
+
hi as EntityPath,
|
|
2536
|
+
yi as EntityTooltip,
|
|
2537
|
+
Yo as EnumEditor,
|
|
2538
|
+
jo as EnumEditorItem,
|
|
2539
|
+
On as EnumItemDialog,
|
|
2540
|
+
Bt as FEATURED_VERSION_TYPES,
|
|
2541
|
+
jn as FILMSTRIP_ACTIVE_ATTRIBUTE,
|
|
2542
|
+
Kn as FILMSTRIP_FILE_ATTRIBUTE,
|
|
2543
|
+
qn as FILMSTRIP_POSITION_ATTRIBUTE,
|
|
2544
|
+
oa as FILTER_TYPES_BY_SCOPE,
|
|
2545
|
+
Qn as FLOATING_TOOLBAR,
|
|
2546
|
+
Ko as FeaturedVersionOrder,
|
|
2547
|
+
Ss as FeedbackContext,
|
|
2548
|
+
co as FeedbackProvider,
|
|
2549
|
+
Kr as FieldLabel,
|
|
2550
|
+
qr as FileThumbnail,
|
|
2551
|
+
Xn as Filmstrip,
|
|
2552
|
+
Jn as FilmstripEntityCard,
|
|
2553
|
+
Pi as FilterErrorActions,
|
|
2554
|
+
At as FreeTrialLink,
|
|
2555
|
+
qo as GROUP_KEY_PREFIX,
|
|
2556
|
+
Qo as GUEST_KEY_PREFIX,
|
|
2557
|
+
Zn as INSERT_MENTION_TRIGGER_COMMAND,
|
|
2558
|
+
ui as InfoMessage,
|
|
2559
|
+
pi as JsonViewer,
|
|
2560
|
+
Xo as LegacyBadge,
|
|
2561
|
+
Tn as LinkManagerItem,
|
|
2562
|
+
In as LinksManager,
|
|
2563
|
+
uo as ListAttributeForm,
|
|
2564
|
+
po as ListMetaData,
|
|
2565
|
+
go as LoginPage,
|
|
2566
|
+
er as MARKDOWN_TRANSFORMERS,
|
|
2567
|
+
tr as MENTION,
|
|
2568
|
+
sr as MENTION_REF_TYPES,
|
|
2569
|
+
ar as MENTION_TRIGGER_BY_TYPE,
|
|
2570
|
+
zi as MENU_PORTAL_CONTENT_ID,
|
|
2571
|
+
Hi as MENU_PORTAL_DIALOG_ID,
|
|
2572
|
+
or as MarkdownEditor,
|
|
2573
|
+
nr as MediaBlock,
|
|
2574
|
+
rr as MediaNode,
|
|
2575
|
+
ir as MentionNode,
|
|
2576
|
+
it as Menu,
|
|
2577
|
+
rt as MenuContainer,
|
|
2578
|
+
Wi as MenuList,
|
|
2579
|
+
lr as NO_DATE,
|
|
2580
|
+
ni as Placeholder,
|
|
2581
|
+
Jo as PowerpackButton,
|
|
2582
|
+
fo as PowerpackDialog,
|
|
2583
|
+
bo as ProjectPageLayoutHost,
|
|
2584
|
+
ho as ProjectPageRemote,
|
|
2585
|
+
Zo as ProjectTableSettings,
|
|
2586
|
+
Lr as RefreshToast,
|
|
2587
|
+
Ye as RemotePageWrapper,
|
|
2588
|
+
Fs as ReportCrash,
|
|
2589
|
+
en as RequiredAddonVersion,
|
|
2590
|
+
Qr as ReviewableCard,
|
|
2591
|
+
Xr as ReviewableProgressCard,
|
|
2592
|
+
Jr as ReviewableUpload,
|
|
2593
|
+
gi as ReviewablesList,
|
|
2594
|
+
tn as ReviewablesSelector,
|
|
2595
|
+
sn as SettingOption,
|
|
2596
|
+
an as SettingSwitch,
|
|
2597
|
+
on as SettingsPanel,
|
|
2598
|
+
nn as SettingsPanelItemTemplate,
|
|
2599
|
+
rn as ShareOptionIcon,
|
|
2600
|
+
vn as SimpleForm,
|
|
2601
|
+
tl as SimpleFormDialog,
|
|
2602
|
+
ln as SizeSlider,
|
|
2603
|
+
wo as SlicerHost,
|
|
2604
|
+
cn as SplitterStyles,
|
|
2605
|
+
Zr as StackedThumbnails,
|
|
2606
|
+
un as StyledLink,
|
|
2607
|
+
Pn as SubtasksManagerWrapper,
|
|
2608
|
+
Ci as SupportBubble,
|
|
2609
|
+
Mi as SyncButton,
|
|
2610
|
+
dn as TEAM_KEY_PREFIX,
|
|
2611
|
+
pn as TableGridSwitch,
|
|
2612
|
+
Qi as TableSearch,
|
|
2613
|
+
_i as TableSettingsFallback,
|
|
2614
|
+
ei as Thumbnail,
|
|
2615
|
+
Zi as ThumbnailSimple,
|
|
2616
|
+
fn as USER_KEY_PREFIX,
|
|
2617
|
+
mn as UploadVersionDialog,
|
|
2618
|
+
cr as UserImage,
|
|
2619
|
+
Vs as VersionUploadContext,
|
|
2620
|
+
lo as VersionUploadProvider,
|
|
2621
|
+
ti as Watchers,
|
|
2622
|
+
ur as YouTubeEmbed,
|
|
2623
|
+
dr as YouTubeNode,
|
|
2624
|
+
Br as buildChildrenDetails,
|
|
2625
|
+
$r as buildEntityLabel,
|
|
2626
|
+
Gr as buildExpectedCounts,
|
|
2627
|
+
xo as buildScopes,
|
|
2628
|
+
Ni as buildSortMenuItem,
|
|
2629
|
+
pr as createFeedMentionSource,
|
|
2630
|
+
ke as customRangeOption,
|
|
2631
|
+
fr as dateOptions,
|
|
2632
|
+
mr as datePresetOptions,
|
|
2633
|
+
hr as detectRelativeDatePattern,
|
|
2634
|
+
gr as filterDateFunctions,
|
|
2635
|
+
br as generateDateOptions,
|
|
2636
|
+
Ce as generateDatePresetOptions,
|
|
2637
|
+
Ks as getButtonAction,
|
|
2638
|
+
wr as getFilmstripTarget,
|
|
2639
|
+
bi as getGroupedReviewables,
|
|
2640
|
+
vr as getInlineMediaFileIds,
|
|
2641
|
+
yr as getLinkLabel,
|
|
2642
|
+
Er as getMediaKind,
|
|
2643
|
+
Sr as getMentionTrigger,
|
|
2644
|
+
kr as getProjectFileId,
|
|
2645
|
+
Cr as getSourceLink,
|
|
2646
|
+
hn as getUiTypeLabel,
|
|
2647
|
+
An as groupLinksByEntity,
|
|
2648
|
+
Or as isMediaFile,
|
|
2649
|
+
Tr as loadFilmstrip,
|
|
2650
|
+
Di as markdownToPlainText,
|
|
2651
|
+
Ir as normalizeLegacyMarkdown,
|
|
2652
|
+
Pr as parseActivityLink,
|
|
2653
|
+
Gs as parseFilename,
|
|
2654
|
+
Ar as parseYouTubeUrl,
|
|
2655
|
+
Dr as peekFilmstrip,
|
|
2656
|
+
Ri as renderMediaParagraph,
|
|
2657
|
+
Vi as renderYouTubeParagraph,
|
|
2658
|
+
ji as shortcutEntities,
|
|
2659
|
+
ct as showsForSelection,
|
|
2660
|
+
Vo as splitClientFiltersByScope,
|
|
2661
|
+
Ro as splitFiltersByScope,
|
|
2662
|
+
zr as sumExpectedCounts,
|
|
2663
|
+
Ee as toMenuItems,
|
|
2664
|
+
Js as toUserRef,
|
|
2665
|
+
Rr as toggleBlockFormat,
|
|
2666
|
+
Ao as useAddonContextMenu,
|
|
2667
|
+
mo as useAddonCustomizeSections,
|
|
2668
|
+
Ki as useAddonTableShortcuts,
|
|
2669
|
+
Oo as useAddonUserMenuItems,
|
|
2670
|
+
Do as useBuildFilterOptions,
|
|
2671
|
+
xi as useDateRangeFilter,
|
|
2672
|
+
Vr as useEntityCardFilmstrip,
|
|
2673
|
+
Oi as useFeedback,
|
|
2674
|
+
Ti as useFeedbackSafe,
|
|
2675
|
+
Bi as useOptionalVersionUploadContext,
|
|
2676
|
+
vo as useProjectPageSlotContext,
|
|
2677
|
+
si as useReviewablesUpload,
|
|
2678
|
+
yo as useStudioPageSlotContext,
|
|
2679
|
+
Dn as useUpdateLinks,
|
|
2680
|
+
Co as useUserDetailsSlotContext,
|
|
2681
|
+
$i as useVersionUploadContext
|
|
2650
2682
|
};
|