@ynput/ayon-frontend-shared 0.8.0 → 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 +141 -136
- 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 +618 -581
- package/dist/chunks/useCreateContextMenu.es.js +15 -13
- package/dist/components.es.js +1393 -1314
- 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 +121 -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/api.d.ts +1 -0
- package/dist/types/components.d.ts +164 -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
|
|
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,60 +50,62 @@ 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,
|
|
84
|
-
placeholder:
|
|
85
|
-
disabled:
|
|
86
|
-
mode:
|
|
87
|
-
onSelectOption:
|
|
88
|
-
pt:
|
|
89
|
-
...
|
|
86
|
+
placeholder: r = "Add people or access groups",
|
|
87
|
+
disabled: s = !1,
|
|
88
|
+
mode: a = "internal",
|
|
89
|
+
onSelectOption: o,
|
|
90
|
+
pt: u,
|
|
91
|
+
...l
|
|
90
92
|
}) => {
|
|
91
|
-
const [
|
|
92
|
-
const
|
|
93
|
-
return k !==
|
|
94
|
-
}), w = (
|
|
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);
|
|
95
|
+
return k !== i ? k - i : C.label.localeCompare(b.label);
|
|
96
|
+
}), w = (p ? Fe(O, p, {
|
|
95
97
|
keys: ["name", "label", "value"],
|
|
96
|
-
threshold:
|
|
97
|
-
}) : O).slice(0,
|
|
98
|
-
|
|
99
|
-
},
|
|
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);
|
|
101
|
+
}, M = () => {
|
|
100
102
|
setTimeout(() => {
|
|
101
|
-
|
|
103
|
+
v(!1), g(-1);
|
|
102
104
|
}, 200);
|
|
103
|
-
},
|
|
104
|
-
c(C.target.value), g(-1),
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
105
|
+
}, U = (C) => {
|
|
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 Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
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
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
127
|
+
o(C, 10), c(""), v(!1), g(-1), V.current?.focus();
|
|
128
|
+
}, Y = () => {
|
|
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:
|
|
143
|
-
placeholder:
|
|
144
|
-
disabled:
|
|
144
|
+
value: p,
|
|
145
|
+
placeholder: r,
|
|
146
|
+
disabled: s,
|
|
145
147
|
onFocus: R,
|
|
146
148
|
onClick: R,
|
|
147
|
-
onBlur:
|
|
148
|
-
onChange:
|
|
149
|
-
onKeyDown:
|
|
149
|
+
onBlur: M,
|
|
150
|
+
onChange: U,
|
|
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
|
-
...
|
|
157
|
-
className: ue(
|
|
158
|
+
...u?.list,
|
|
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 Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
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
|
}
|
|
@@ -224,148 +226,148 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
224
226
|
}, ne = (e) => {
|
|
225
227
|
if (!e) return null;
|
|
226
228
|
try {
|
|
227
|
-
const [t, n,
|
|
228
|
-
if (t && n &&
|
|
229
|
-
return new Date(Date.UTC(t, n - 1,
|
|
229
|
+
const [t, n, r] = e.split("-").map(Number);
|
|
230
|
+
if (t && n && r)
|
|
231
|
+
return new Date(Date.UTC(t, n - 1, r)).toISOString();
|
|
230
232
|
} catch {
|
|
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,
|
|
238
|
-
valueTrigger:
|
|
239
|
-
align:
|
|
240
|
-
disabled:
|
|
241
|
-
className:
|
|
242
|
-
displayFormat:
|
|
243
|
-
minDate:
|
|
244
|
-
maxDate:
|
|
240
|
+
valueTrigger: r,
|
|
241
|
+
align: s = "left",
|
|
242
|
+
disabled: a = !1,
|
|
243
|
+
className: o,
|
|
244
|
+
displayFormat: u = "MMM d",
|
|
245
|
+
minDate: l,
|
|
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
|
|
262
|
-
w.current && !w.current.contains(
|
|
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
|
|
276
|
-
if (
|
|
277
|
-
const
|
|
278
|
-
|
|
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);
|
|
278
|
+
if (G && K) {
|
|
279
|
+
const J = new Date(G), oe = new Date(K);
|
|
280
|
+
J > oe && O(L);
|
|
279
281
|
}
|
|
280
|
-
|
|
282
|
+
G && setTimeout(() => {
|
|
281
283
|
try {
|
|
282
|
-
|
|
284
|
+
M.current?.showPicker();
|
|
283
285
|
} catch {
|
|
284
286
|
}
|
|
285
287
|
}, 100);
|
|
286
|
-
},
|
|
287
|
-
const
|
|
288
|
-
O(
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
new Date(
|
|
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;
|
|
293
|
+
if (G && K) {
|
|
294
|
+
const se = new Date(K);
|
|
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:
|
|
306
|
+
top: S.bottom + 4,
|
|
307
|
+
left: s === "left" ? S.left : S.right
|
|
306
308
|
};
|
|
307
|
-
}, I = () =>
|
|
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,
|
|
319
|
-
disabled:
|
|
321
|
+
disabled: a,
|
|
320
322
|
type: "button",
|
|
321
323
|
...c?.trigger,
|
|
322
|
-
className: ue(
|
|
324
|
+
className: ue(U ? "has-value" : "empty", c?.trigger?.className),
|
|
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: {
|
|
332
334
|
top: P.top,
|
|
333
|
-
left:
|
|
334
|
-
right:
|
|
335
|
+
left: s === "left" ? P.left : "auto",
|
|
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:
|
|
365
|
-
min:
|
|
366
|
-
onClick: (
|
|
366
|
+
max: p ? de(p, "yyyy-MM-dd") : void 0,
|
|
367
|
+
min: l ? de(l, "yyyy-MM-dd") : void 0,
|
|
368
|
+
onClick: (S) => {
|
|
367
369
|
try {
|
|
368
|
-
|
|
370
|
+
S.currentTarget.showPicker();
|
|
369
371
|
} catch {
|
|
370
372
|
}
|
|
371
373
|
},
|
|
@@ -375,20 +377,20 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
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
|
-
ref:
|
|
385
|
+
ref: M,
|
|
384
386
|
type: "date",
|
|
385
387
|
value: V,
|
|
386
|
-
onChange:
|
|
387
|
-
max:
|
|
388
|
-
min: T || (
|
|
389
|
-
onClick: (
|
|
388
|
+
onChange: Y,
|
|
389
|
+
max: p ? de(p, "yyyy-MM-dd") : void 0,
|
|
390
|
+
min: T || (l ? de(l, "yyyy-MM-dd") : void 0),
|
|
391
|
+
onClick: (S) => {
|
|
390
392
|
try {
|
|
391
|
-
|
|
393
|
+
S.currentTarget.showPicker();
|
|
392
394
|
} catch {
|
|
393
395
|
}
|
|
394
396
|
},
|
|
@@ -396,7 +398,7 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
396
398
|
}
|
|
397
399
|
)
|
|
398
400
|
] }),
|
|
399
|
-
|
|
401
|
+
U && /* @__PURE__ */ d(kt, { onClick: C, variant: "text", ...c?.clearButton, children: "Clear dates" })
|
|
400
402
|
] })
|
|
401
403
|
}
|
|
402
404
|
),
|
|
@@ -405,381 +407,381 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
405
407
|
]
|
|
406
408
|
}
|
|
407
409
|
);
|
|
408
|
-
},
|
|
410
|
+
}, le = {
|
|
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
|
-
dispatch:
|
|
418
|
+
dispatch: r
|
|
417
419
|
}) => {
|
|
418
|
-
const [
|
|
419
|
-
{ projectName: t, folderId:
|
|
420
|
-
{ skip: !
|
|
421
|
-
), P =
|
|
422
|
-
if (!(
|
|
423
|
-
return
|
|
424
|
-
}, [
|
|
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(
|
|
421
|
+
{ projectName: t, folderId: s },
|
|
422
|
+
{ skip: !s || !v || !!o }
|
|
423
|
+
), P = B(() => {
|
|
424
|
+
if (!(o || !O.name || h.length === 0))
|
|
425
|
+
return h.find((A) => A.name === O.name);
|
|
426
|
+
}, [o, O.name, h]), S = o || P?.id || "", { currentData: L } = os(
|
|
425
427
|
{
|
|
426
428
|
projectName: t,
|
|
427
|
-
productId:
|
|
429
|
+
productId: o
|
|
428
430
|
},
|
|
429
|
-
{ skip: !
|
|
430
|
-
), { data:
|
|
431
|
+
{ skip: !o || !v || b != null }
|
|
432
|
+
), { data: G } = ns(
|
|
431
433
|
{ projectName: t, versionId: k },
|
|
432
|
-
{ skip: !k || !
|
|
433
|
-
),
|
|
434
|
-
({ productId: A, folderId:
|
|
435
|
-
|
|
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
|
-
),
|
|
443
|
+
), se = H(() => {
|
|
442
444
|
g.forEach((A) => {
|
|
443
445
|
A.preview && URL.revokeObjectURL(A.preview);
|
|
444
|
-
}), V([]), w(
|
|
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
|
|
450
|
-
productId:
|
|
450
|
+
if (S) {
|
|
451
|
+
const N = await Us(be, t, {
|
|
452
|
+
productId: S,
|
|
451
453
|
version: A.version,
|
|
452
|
-
taskId:
|
|
454
|
+
taskId: K || void 0
|
|
453
455
|
});
|
|
454
|
-
return n(
|
|
455
|
-
productId:
|
|
456
|
-
versionId:
|
|
456
|
+
return n(S, N.id), Q.success("Created new version"), {
|
|
457
|
+
productId: S,
|
|
458
|
+
versionId: N.id
|
|
457
459
|
};
|
|
458
460
|
} else {
|
|
459
|
-
const { product:
|
|
460
|
-
|
|
461
|
-
|
|
461
|
+
const { product: N, version: z } = await Bs(
|
|
462
|
+
Se,
|
|
463
|
+
be,
|
|
462
464
|
t,
|
|
463
465
|
{
|
|
464
|
-
folderId:
|
|
466
|
+
folderId: s,
|
|
465
467
|
name: A.name,
|
|
466
468
|
productType: A.productType || "review",
|
|
467
469
|
productBaseType: A.productType || "review"
|
|
468
470
|
},
|
|
469
471
|
{
|
|
470
472
|
version: A.version,
|
|
471
|
-
taskId:
|
|
473
|
+
taskId: K || void 0
|
|
472
474
|
}
|
|
473
475
|
);
|
|
474
|
-
return n(
|
|
475
|
-
productId:
|
|
476
|
-
versionId:
|
|
476
|
+
return n(N.id, z.id), Q.success("Created new version"), {
|
|
477
|
+
productId: N.id,
|
|
478
|
+
versionId: z.id
|
|
477
479
|
};
|
|
478
480
|
}
|
|
479
|
-
} catch (
|
|
480
|
-
throw console.error("Error uploading version:",
|
|
481
|
+
} catch (N) {
|
|
482
|
+
throw console.error("Error uploading version:", N), N.message || N;
|
|
481
483
|
}
|
|
482
484
|
},
|
|
483
|
-
[
|
|
484
|
-
),
|
|
485
|
+
[se, S, s, K, t]
|
|
486
|
+
), we = H(
|
|
485
487
|
(A) => {
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
488
|
-
if (
|
|
489
|
-
const
|
|
490
|
-
|
|
488
|
+
if (S) return;
|
|
489
|
+
const N = A[0];
|
|
490
|
+
if (N) {
|
|
491
|
+
const z = Gs(N.name), ae = Ns(z);
|
|
492
|
+
ae && ae !== O.version && w((fe) => ({
|
|
491
493
|
...fe,
|
|
492
|
-
version:
|
|
494
|
+
version: ae
|
|
493
495
|
}));
|
|
494
496
|
}
|
|
495
497
|
},
|
|
496
|
-
[
|
|
497
|
-
),
|
|
498
|
-
w((
|
|
499
|
-
...
|
|
500
|
-
[A]:
|
|
501
|
-
})),
|
|
502
|
-
}, []),
|
|
498
|
+
[S, O.version]
|
|
499
|
+
), ee = L?.version ?? b ?? P?.latestVersion?.version, te = H((A, N) => {
|
|
500
|
+
w((z) => ({
|
|
501
|
+
...z,
|
|
502
|
+
[A]: N
|
|
503
|
+
})), U("");
|
|
504
|
+
}, []), Ae = H(
|
|
503
505
|
async (A) => {
|
|
504
506
|
try {
|
|
505
|
-
R(!0),
|
|
506
|
-
const
|
|
507
|
-
if (!
|
|
508
|
-
throw
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
} catch (
|
|
512
|
-
|
|
507
|
+
R(!0), U("");
|
|
508
|
+
const N = $s(A, ee, !S);
|
|
509
|
+
if (!N.isValid)
|
|
510
|
+
throw N.error;
|
|
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());
|
|
513
|
+
} catch (N) {
|
|
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(
|
|
520
|
-
w(
|
|
519
|
+
W(() => {
|
|
520
|
+
if (!(!v || b != null))
|
|
521
|
+
return w(L ? (A) => ({ ...A, version: L.version + 1 }) : le), () => {
|
|
522
|
+
w(le);
|
|
521
523
|
};
|
|
522
|
-
}, [
|
|
523
|
-
if (!
|
|
524
|
-
const A =
|
|
525
|
-
if (A && A.folderId ===
|
|
526
|
-
w((
|
|
524
|
+
}, [v, L, b]), W(() => {
|
|
525
|
+
if (!v || o || h.length === 0 || O.name !== le.name) return;
|
|
526
|
+
const A = f.current;
|
|
527
|
+
if (A && A.folderId === s && h.some((ae) => ae.name === A.productName)) {
|
|
528
|
+
w((ae) => ({ ...ae, name: A.productName }));
|
|
527
529
|
return;
|
|
528
530
|
}
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
}, [
|
|
532
|
-
if (!(!
|
|
531
|
+
const N = h[h.length - 1];
|
|
532
|
+
N && w((z) => ({ ...z, name: N.name }));
|
|
533
|
+
}, [v, o, h]), W(() => {
|
|
534
|
+
if (!(!v || o))
|
|
533
535
|
if (P) {
|
|
534
|
-
w((
|
|
535
|
-
...
|
|
536
|
+
w((N) => ({
|
|
537
|
+
...N,
|
|
536
538
|
productType: P.productType,
|
|
537
539
|
...P.latestVersion && {
|
|
538
540
|
version: P.latestVersion.version + 1
|
|
539
541
|
}
|
|
540
542
|
}));
|
|
541
543
|
const A = P.latestVersion?.task;
|
|
542
|
-
A && (
|
|
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
|
-
}),
|
|
549
|
+
}), m.current = !0) : !A && m.current && (p(null), E(null), m.current = !1);
|
|
548
550
|
} else
|
|
549
|
-
w((A) => ({ ...A, version:
|
|
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
|
-
productId:
|
|
556
|
-
setProductId:
|
|
557
|
-
folderId:
|
|
558
|
-
taskId:
|
|
557
|
+
productId: o,
|
|
558
|
+
setProductId: u,
|
|
559
|
+
folderId: s,
|
|
560
|
+
taskId: K,
|
|
559
561
|
linkedTask: c,
|
|
560
|
-
isLoadingTask:
|
|
561
|
-
setTaskId:
|
|
562
|
-
setLinkedTask:
|
|
563
|
-
setFolderId:
|
|
564
|
-
isOpen:
|
|
562
|
+
isLoadingTask: J,
|
|
563
|
+
setTaskId: De,
|
|
564
|
+
setLinkedTask: E,
|
|
565
|
+
setFolderId: a,
|
|
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
|
-
onCloseVersionUpload:
|
|
571
|
-
onUploadVersion:
|
|
572
|
-
extractAndSetVersionFromFiles:
|
|
572
|
+
onCloseVersionUpload: se,
|
|
573
|
+
onUploadVersion: Z,
|
|
574
|
+
extractAndSetVersionFromFiles: we,
|
|
573
575
|
form: O,
|
|
574
576
|
setForm: w,
|
|
575
577
|
isSubmitting: D,
|
|
576
|
-
error:
|
|
577
|
-
createdProductId:
|
|
578
|
-
createdVersionId:
|
|
579
|
-
handleFormChange:
|
|
580
|
-
handleFormSubmit:
|
|
581
|
-
folderProducts:
|
|
578
|
+
error: M,
|
|
579
|
+
createdProductId: _,
|
|
580
|
+
createdVersionId: Y,
|
|
581
|
+
handleFormChange: te,
|
|
582
|
+
handleFormSubmit: Ae,
|
|
583
|
+
folderProducts: h,
|
|
582
584
|
isFolderProductsLoading: I,
|
|
583
585
|
matchedProduct: P,
|
|
584
|
-
dispatch:
|
|
586
|
+
dispatch: r
|
|
585
587
|
}),
|
|
586
588
|
[
|
|
587
|
-
o,
|
|
588
589
|
s,
|
|
589
590
|
a,
|
|
590
|
-
|
|
591
|
+
o,
|
|
592
|
+
K,
|
|
591
593
|
c,
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
J,
|
|
595
|
+
De,
|
|
596
|
+
E,
|
|
597
|
+
u,
|
|
598
|
+
v,
|
|
597
599
|
t,
|
|
598
|
-
|
|
600
|
+
ee,
|
|
599
601
|
g,
|
|
600
602
|
V,
|
|
601
603
|
oe,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
604
|
+
se,
|
|
605
|
+
Z,
|
|
606
|
+
we,
|
|
605
607
|
O,
|
|
606
608
|
D,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
609
|
+
M,
|
|
610
|
+
_,
|
|
611
|
+
Y,
|
|
612
|
+
te,
|
|
613
|
+
Ae,
|
|
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:
|
|
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
|
-
skip: !
|
|
625
|
+
skip: !s?.name || !a?.connected
|
|
624
626
|
}
|
|
625
|
-
),
|
|
626
|
-
t || (
|
|
627
|
+
), l = () => {
|
|
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 =
|
|
637
|
-
if (!
|
|
638
|
-
const
|
|
639
|
-
...
|
|
638
|
+
}, c = r?.version?.split("+")[0] || "unknown", E = r?.version?.split("+")[1] || "unknown", v = () => {
|
|
639
|
+
if (!s?.name || !o?.available) return;
|
|
640
|
+
const f = {
|
|
641
|
+
...o.data,
|
|
640
642
|
customFields: {
|
|
641
643
|
origin: window.location.origin,
|
|
642
644
|
serverVersion: c,
|
|
643
|
-
frontendVersion:
|
|
644
|
-
instanceId:
|
|
645
|
+
frontendVersion: E,
|
|
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
|
-
if (console.log("Initializing Featurebase messenger widget"), !
|
|
653
|
+
const f = window;
|
|
654
|
+
if (typeof f.Featurebase == "function") {
|
|
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
|
-
(
|
|
662
|
-
|
|
663
|
+
(h) => {
|
|
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
|
|
670
|
-
if (
|
|
671
|
+
const f = [];
|
|
672
|
+
if (s?.data?.isAdmin) {
|
|
671
673
|
const I = ["Server", "Addon", "Pipeline"];
|
|
672
|
-
|
|
673
|
-
} else
|
|
674
|
-
const
|
|
675
|
-
return typeof
|
|
674
|
+
f.push(...I);
|
|
675
|
+
} else r?.disableChangelog || f.push("Highlights");
|
|
676
|
+
const h = window;
|
|
677
|
+
return typeof h.Featurebase == "function" && h.Featurebase("init_changelog_widget", {
|
|
676
678
|
organization: "ayon",
|
|
677
679
|
dropdown: {
|
|
678
680
|
enabled: !0
|
|
679
681
|
},
|
|
680
682
|
popup: {
|
|
681
683
|
enabled: !0,
|
|
682
|
-
usersName:
|
|
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",
|
|
694
696
|
theme: "dark",
|
|
695
697
|
metadata: {}
|
|
696
698
|
},
|
|
697
|
-
(
|
|
698
|
-
|
|
699
|
+
(h) => {
|
|
700
|
+
h && console.error("Error initializing feedback widget:", h);
|
|
699
701
|
}
|
|
700
702
|
), !1;
|
|
701
|
-
},
|
|
702
|
-
const
|
|
703
|
-
return typeof
|
|
703
|
+
}, M = () => {
|
|
704
|
+
const f = window;
|
|
705
|
+
return typeof f.Featurebase == "function" && f.Featurebase(
|
|
704
706
|
"initialize_portal_widget",
|
|
705
707
|
{
|
|
706
708
|
organization: "ayon",
|
|
707
709
|
fullScreen: !0,
|
|
708
710
|
initialPage: "MainView"
|
|
709
711
|
},
|
|
710
|
-
(
|
|
712
|
+
(h) => h ? (console.error("Error initializing portal widget:", h), !1) : !0
|
|
711
713
|
), !1;
|
|
712
|
-
},
|
|
713
|
-
const
|
|
714
|
-
return typeof
|
|
714
|
+
}, U = () => {
|
|
715
|
+
const f = window;
|
|
716
|
+
return typeof f.Featurebase == "function" && f.Featurebase(
|
|
715
717
|
"initialize_survey_widget",
|
|
716
718
|
{
|
|
717
719
|
organization: "ayon",
|
|
718
720
|
placement: "bottom-right",
|
|
719
721
|
theme: "dark",
|
|
720
|
-
email:
|
|
721
|
-
featurebaseJwt:
|
|
722
|
+
email: s?.attrib?.email,
|
|
723
|
+
featurebaseJwt: o?.data?.featurebaseJwt,
|
|
722
724
|
locale: "en"
|
|
723
725
|
},
|
|
724
|
-
(
|
|
725
|
-
|
|
726
|
+
(h) => {
|
|
727
|
+
h ? console.error("Error initializing survey widget:", h) : console.log("Survey widget initialized successfully");
|
|
726
728
|
}
|
|
727
729
|
), !1;
|
|
728
730
|
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}, [
|
|
732
|
-
const [
|
|
733
|
-
|
|
734
|
-
!
|
|
731
|
+
W(() => {
|
|
732
|
+
s?.name && r && (r.disableFeedback || t || (l(), p(), D(), R(), M()));
|
|
733
|
+
}, [s?.name, t, r]);
|
|
734
|
+
const [_, $] = x(!1);
|
|
735
|
+
W(() => {
|
|
736
|
+
!s?.name || !a || !o || !t || _ || (v(), U(), $(!0));
|
|
735
737
|
}, [
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
738
|
+
s?.name,
|
|
739
|
+
a?.instanceId,
|
|
740
|
+
o?.available,
|
|
739
741
|
t,
|
|
740
742
|
window.location.pathname,
|
|
741
|
-
|
|
742
|
-
]),
|
|
743
|
-
|
|
744
|
-
}, [
|
|
745
|
-
const
|
|
743
|
+
_
|
|
744
|
+
]), W(() => {
|
|
745
|
+
u || !t || w();
|
|
746
|
+
}, [o, u, t]);
|
|
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
|
-
!t || !T ||
|
|
765
|
-
}, [t, T, b]),
|
|
764
|
+
}, [b, y] = x(!1), k = document.getElementById("fb-messenger-root"), i = (f) => k instanceof HTMLElement && (k.style.display = f ? "block" : "none");
|
|
765
|
+
W(() => {
|
|
766
|
+
!t || !T || i(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
|
|
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;
|
|
@@ -793,49 +795,49 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
793
795
|
I.Featurebase("show", "help");
|
|
794
796
|
break;
|
|
795
797
|
case "ShowArticle":
|
|
796
|
-
|
|
798
|
+
h ? I.Featurebase("showArticle", h) : I.Featurebase("show", "help");
|
|
797
799
|
break;
|
|
798
800
|
case "NewMessage":
|
|
799
|
-
I.Featurebase("showNewMessage",
|
|
801
|
+
I.Featurebase("showNewMessage", h);
|
|
800
802
|
break;
|
|
801
803
|
default:
|
|
802
804
|
I.Featurebase("show");
|
|
803
805
|
break;
|
|
804
806
|
}
|
|
805
807
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
|
|
808
|
+
return /* @__PURE__ */ d(
|
|
809
|
+
Ss.Provider,
|
|
808
810
|
{
|
|
809
811
|
value: {
|
|
810
|
-
openSupport:
|
|
811
|
-
openFeedback:
|
|
812
|
+
openSupport: m,
|
|
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,
|
|
826
|
-
attributes:
|
|
828
|
+
attributes: r = []
|
|
827
829
|
}) => {
|
|
828
|
-
const [
|
|
830
|
+
const [s, a] = x({
|
|
829
831
|
label: "",
|
|
830
832
|
tags: [],
|
|
831
833
|
active: !1
|
|
832
|
-
}),
|
|
833
|
-
() =>
|
|
834
|
+
}), o = (t?.accessLevel || 0) >= 30, { tags: u } = et(), { data: l = [] } = cs(), p = B(
|
|
835
|
+
() => l.filter((g) => g.scope?.includes("list")).map((g) => ({
|
|
834
836
|
name: g.name,
|
|
835
837
|
data: g.data
|
|
836
838
|
})),
|
|
837
|
-
[
|
|
838
|
-
), c =
|
|
839
|
+
[l]
|
|
840
|
+
), c = B(
|
|
839
841
|
() => [
|
|
840
842
|
{ name: "label", data: { type: "string", title: "Label" } },
|
|
841
843
|
{
|
|
@@ -843,36 +845,36 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
843
845
|
data: {
|
|
844
846
|
type: "list_of_strings",
|
|
845
847
|
title: "Tags",
|
|
846
|
-
enum:
|
|
848
|
+
enum: u?.map((g) => ({ value: g.name, label: g.name, color: g.color })),
|
|
847
849
|
enableCustomValues: !0,
|
|
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
|
-
[
|
|
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
|
}, {});
|
|
863
|
-
|
|
865
|
+
a({
|
|
864
866
|
label: t?.label || "",
|
|
865
867
|
tags: t?.tags || [],
|
|
866
868
|
active: t?.active ?? !1,
|
|
867
869
|
...O
|
|
868
870
|
});
|
|
869
871
|
}
|
|
870
|
-
}, [t, 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: {
|
|
@@ -884,13 +886,13 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
884
886
|
...w,
|
|
885
887
|
[g]: V
|
|
886
888
|
}
|
|
887
|
-
},
|
|
889
|
+
}, a((D) => ({ ...D, [g]: V }));
|
|
888
890
|
} else {
|
|
889
891
|
const w = { [g]: V };
|
|
890
|
-
O = w,
|
|
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,26 +901,26 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
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
|
-
enableEditing:
|
|
909
|
+
enableEditing: o,
|
|
908
910
|
projectName: e,
|
|
909
911
|
fields: c,
|
|
910
|
-
form:
|
|
912
|
+
form: s,
|
|
911
913
|
isLoading: n,
|
|
912
914
|
onChange: T,
|
|
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"
|
|
920
922
|
)
|
|
921
|
-
),
|
|
923
|
+
), r = {
|
|
922
924
|
Id: e?.id,
|
|
923
925
|
"Entity type": e?.entityType,
|
|
924
926
|
"List type": e?.entityListType,
|
|
@@ -929,21 +931,21 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
929
931
|
"Updated at": e?.updatedAt && de(new Date(e?.updatedAt), "PPpp"),
|
|
930
932
|
"Last updated by": e?.updatedBy,
|
|
931
933
|
...n
|
|
932
|
-
},
|
|
933
|
-
name:
|
|
934
|
+
}, s = Object.keys(r).map((a) => ({
|
|
935
|
+
name: a,
|
|
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
|
-
isCloseable:
|
|
943
|
-
addon:
|
|
944
|
+
isCloseable: r = !0,
|
|
945
|
+
addon: s
|
|
944
946
|
}) => {
|
|
945
|
-
const [
|
|
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);
|
|
@@ -952,164 +954,164 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
952
954
|
(R) => [R, c.features[R]]
|
|
953
955
|
);
|
|
954
956
|
if (c.selectedFeature) {
|
|
955
|
-
const R = D.findIndex(([
|
|
957
|
+
const R = D.findIndex(([M]) => M === c.selectedFeature);
|
|
956
958
|
if (R > 0) {
|
|
957
|
-
const [
|
|
958
|
-
D.unshift(
|
|
959
|
+
const [M] = D.splice(R, 1);
|
|
960
|
+
D.unshift(M);
|
|
959
961
|
}
|
|
960
962
|
}
|
|
961
963
|
return D;
|
|
962
964
|
}
|
|
963
|
-
return Object.entries(
|
|
964
|
-
if (D ===
|
|
965
|
-
if (R ===
|
|
966
|
-
const
|
|
967
|
-
return
|
|
965
|
+
return Object.entries(Xt).sort(([D], [R]) => {
|
|
966
|
+
if (D === l) return -1;
|
|
967
|
+
if (R === l) return 1;
|
|
968
|
+
const M = Le.indexOf(D), U = Le.indexOf(R);
|
|
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: () => {
|
|
975
|
-
|
|
977
|
+
r && (u(null), o(!1));
|
|
976
978
|
},
|
|
977
979
|
size: "lg",
|
|
978
|
-
hideCancelButton: !
|
|
979
|
-
hideBackdrop: !
|
|
980
|
+
hideCancelButton: !r,
|
|
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
|
-
!
|
|
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
|
-
return
|
|
1013
|
-
const
|
|
1014
|
-
return n.filter((
|
|
1012
|
+
}, mo = (e) => {
|
|
1013
|
+
const { projectName: t } = et(), { contributions: n } = he("projectTable.customizeSection");
|
|
1014
|
+
return B(() => {
|
|
1015
|
+
const r = { projectName: t, page: e };
|
|
1016
|
+
return n.filter((s) => !s.pages?.length || s.pages.includes(e)).map((s) => ({
|
|
1015
1017
|
// namespaced, so it can't replace a built-in section (settings are merged by id)
|
|
1016
|
-
id: `addon:${
|
|
1017
|
-
title:
|
|
1018
|
-
icon:
|
|
1019
|
-
component:
|
|
1020
|
-
contribution:
|
|
1021
|
-
context:
|
|
1018
|
+
id: `addon:${s.key}`,
|
|
1019
|
+
title: s.title,
|
|
1020
|
+
icon: s.icon,
|
|
1021
|
+
component: $t(ge, {
|
|
1022
|
+
contribution: s,
|
|
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,
|
|
1029
|
-
dispatch:
|
|
1030
|
-
useSelector:
|
|
1031
|
-
onOpenImage:
|
|
1032
|
-
onGoToFrame:
|
|
1033
|
-
onOpenViewer:
|
|
1034
|
-
onUpdateEntity:
|
|
1035
|
-
...
|
|
1031
|
+
dispatch: r,
|
|
1032
|
+
useSelector: s,
|
|
1033
|
+
onOpenImage: a,
|
|
1034
|
+
onGoToFrame: o,
|
|
1035
|
+
onOpenViewer: u,
|
|
1036
|
+
onUpdateEntity: l,
|
|
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,
|
|
1050
|
-
dispatch:
|
|
1051
|
-
useSelector:
|
|
1052
|
-
onOpenImage:
|
|
1053
|
-
onGoToFrame:
|
|
1054
|
-
onOpenViewer:
|
|
1055
|
-
onUpdateEntity:
|
|
1052
|
+
dispatch: r,
|
|
1053
|
+
useSelector: s,
|
|
1054
|
+
onOpenImage: a,
|
|
1055
|
+
onGoToFrame: o,
|
|
1056
|
+
onOpenViewer: u,
|
|
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,
|
|
1064
|
-
state:
|
|
1065
|
-
addonProps:
|
|
1066
|
-
...
|
|
1066
|
+
state: r = {},
|
|
1067
|
+
addonProps: s,
|
|
1068
|
+
...a
|
|
1067
1069
|
}) => {
|
|
1068
|
-
let
|
|
1070
|
+
let o = /* @__PURE__ */ d(Ye, { Component: e, projectName: t, ...a });
|
|
1069
1071
|
if (n && t) {
|
|
1070
|
-
let
|
|
1072
|
+
let u = null;
|
|
1071
1073
|
try {
|
|
1072
|
-
|
|
1074
|
+
u = qe();
|
|
1073
1075
|
} catch {
|
|
1074
1076
|
console.log("Slicer context not available for this addon page");
|
|
1075
1077
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
+
o = /* @__PURE__ */ d(Hs, { fields: n.fields, children: /* @__PURE__ */ d(
|
|
1079
|
+
Ye,
|
|
1078
1080
|
{
|
|
1079
1081
|
Component: e,
|
|
1080
1082
|
projectName: t,
|
|
1081
|
-
...
|
|
1082
|
-
state: { slicer:
|
|
1083
|
-
...
|
|
1083
|
+
...a,
|
|
1084
|
+
state: { slicer: u, ...r },
|
|
1085
|
+
...s
|
|
1084
1086
|
}
|
|
1085
1087
|
) });
|
|
1086
1088
|
}
|
|
1087
|
-
return
|
|
1088
|
-
},
|
|
1089
|
+
return o;
|
|
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
|
|
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
|
-
const
|
|
1104
|
-
if (C.preventDefault(), !(
|
|
1105
|
+
const M = async (C) => {
|
|
1106
|
+
if (C.preventDefault(), !(a && u)) {
|
|
1105
1107
|
Q.error("Please enter username and password to login");
|
|
1106
1108
|
return;
|
|
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,380 +1119,450 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
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 }),
|
|
1121
|
-
},
|
|
1122
|
+
localStorage.removeItem("auth-preferred-url"), Q.info(b.data.detail), e({ user: b.data.user, accessToken: b.data.token }), r(Me.util.resetApiState());
|
|
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
|
|
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),
|
|
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
|
}
|
|
1149
|
-
let
|
|
1150
|
-
if (
|
|
1151
|
-
console.debug("SSO Callback response",
|
|
1152
|
-
const P =
|
|
1153
|
-
Q.info(P.detail || `Logged in as ${P.user.name}`),
|
|
1154
|
-
} else
|
|
1155
|
-
|
|
1151
|
+
let h = null, I = null;
|
|
1152
|
+
if (i && m?.data?.user) {
|
|
1153
|
+
console.debug("SSO Callback response", m.data);
|
|
1154
|
+
const P = m.data;
|
|
1155
|
+
Q.info(P.detail || `Logged in as ${P.user.name}`), h = P.user, I = P.token, P.redirectUrl && (f = P.redirectUrl);
|
|
1156
|
+
} else i && (Q.error("Unable to login using SSO"), i = !1);
|
|
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
|
-
|
|
1158
|
-
|
|
1159
|
+
W(() => {
|
|
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
|
-
I[
|
|
1165
|
-
const
|
|
1166
|
-
return /* @__PURE__ */
|
|
1167
|
-
|
|
1166
|
+
I[i] = P;
|
|
1167
|
+
const S = new URLSearchParams(I), L = `${y}?${S}`;
|
|
1168
|
+
return /* @__PURE__ */ d(
|
|
1169
|
+
Vt,
|
|
1168
1170
|
{
|
|
1169
1171
|
name: b || C,
|
|
1170
|
-
url:
|
|
1171
|
-
icon:
|
|
1172
|
-
color:
|
|
1173
|
-
textColor:
|
|
1172
|
+
url: L,
|
|
1173
|
+
icon: m,
|
|
1174
|
+
color: f,
|
|
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",
|
|
1195
1197
|
name: "username",
|
|
1196
1198
|
"aria-label": "Username",
|
|
1197
|
-
value:
|
|
1198
|
-
onChange: (C) =>
|
|
1199
|
+
value: a,
|
|
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",
|
|
1207
1209
|
"aria-label": "Password",
|
|
1208
|
-
value:
|
|
1209
|
-
onChange: (C) =>
|
|
1210
|
+
value: u,
|
|
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,
|
|
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
|
-
onResizeEnd:
|
|
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
|
-
const t = e.join(","), n =
|
|
1246
|
-
() =>
|
|
1245
|
+
) : /* @__PURE__ */ d(X, { children: t });
|
|
1246
|
+
}, wo = ({ fields: e }) => {
|
|
1247
|
+
const t = e.join(","), n = B(
|
|
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
|
-
(
|
|
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
|
-
return
|
|
1260
|
+
return B(
|
|
1259
1261
|
() => n ? {
|
|
1260
1262
|
viewType: n,
|
|
1261
|
-
settings:
|
|
1262
|
-
isLoading:
|
|
1263
|
-
updateSettings:
|
|
1263
|
+
settings: r,
|
|
1264
|
+
isLoading: s,
|
|
1265
|
+
updateSettings: a
|
|
1264
1266
|
} : void 0,
|
|
1265
|
-
[n,
|
|
1267
|
+
[n, r, s, a]
|
|
1266
1268
|
);
|
|
1267
|
-
},
|
|
1269
|
+
}, js = () => {
|
|
1268
1270
|
const {
|
|
1269
1271
|
folders: e,
|
|
1270
1272
|
isLoading: t,
|
|
1271
1273
|
getFolderById: n,
|
|
1272
|
-
getParentFolderIds:
|
|
1273
|
-
getChildFolderIds:
|
|
1274
|
-
getFolderIdsWithoutChildren:
|
|
1275
|
-
} =
|
|
1276
|
-
return
|
|
1274
|
+
getParentFolderIds: r,
|
|
1275
|
+
getChildFolderIds: s,
|
|
1276
|
+
getFolderIdsWithoutChildren: a
|
|
1277
|
+
} = Qt();
|
|
1278
|
+
return B(
|
|
1277
1279
|
() => ({
|
|
1278
1280
|
// attrib is typed `object` in the api model
|
|
1279
1281
|
folders: e,
|
|
1280
1282
|
isLoading: t,
|
|
1281
1283
|
getFolderById: n,
|
|
1282
|
-
getParentFolderIds:
|
|
1283
|
-
getChildFolderIds:
|
|
1284
|
-
getFolderIdsWithoutChildren:
|
|
1284
|
+
getParentFolderIds: r,
|
|
1285
|
+
getChildFolderIds: s,
|
|
1286
|
+
getFolderIdsWithoutChildren: a
|
|
1285
1287
|
}),
|
|
1286
1288
|
[
|
|
1287
1289
|
e,
|
|
1288
1290
|
t,
|
|
1289
1291
|
n,
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1292
|
+
r,
|
|
1293
|
+
s,
|
|
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
|
-
sliceType:
|
|
1299
|
-
selection: Object.keys(n).filter((
|
|
1300
|
+
sliceType: r,
|
|
1301
|
+
selection: Object.keys(n).filter((u) => n[u])
|
|
1300
1302
|
}),
|
|
1301
|
-
[
|
|
1302
|
-
),
|
|
1303
|
-
return
|
|
1304
|
-
() => ({ projectName: e, project: t, slicer:
|
|
1305
|
-
[e, t,
|
|
1303
|
+
[r, n]
|
|
1304
|
+
), a = js(), o = lt();
|
|
1305
|
+
return B(
|
|
1306
|
+
() => ({ projectName: e, project: t, slicer: s, projectFolders: a, views: o }),
|
|
1307
|
+
[e, t, s, a, o]
|
|
1306
1308
|
);
|
|
1307
|
-
},
|
|
1308
|
-
const t =
|
|
1309
|
-
return
|
|
1310
|
-
},
|
|
1309
|
+
}, yo = (e) => {
|
|
1310
|
+
const t = lt();
|
|
1311
|
+
return B(() => ({ selectedProjects: e, views: t }), [e, t]);
|
|
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:
|
|
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
|
-
id: `${
|
|
1317
|
-
label:
|
|
1318
|
-
icon:
|
|
1319
|
-
disabled:
|
|
1320
|
-
selected:
|
|
1318
|
+
id: `${s}-${r}`,
|
|
1319
|
+
label: a,
|
|
1320
|
+
icon: o,
|
|
1321
|
+
disabled: E,
|
|
1322
|
+
selected: v,
|
|
1321
1323
|
danger: T,
|
|
1322
|
-
...
|
|
1323
|
-
...
|
|
1324
|
+
...u ? { link: u } : l ? { link: l, target: "_blank" } : {},
|
|
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
|
-
autoOpen:
|
|
1335
|
-
onContext:
|
|
1336
|
+
autoOpen: r,
|
|
1337
|
+
onContext: s
|
|
1336
1338
|
}) => {
|
|
1337
|
-
const
|
|
1338
|
-
() => ({ ...t, navigate: (
|
|
1339
|
-
[t,
|
|
1340
|
-
), [
|
|
1341
|
-
O || g(!1), w((
|
|
1342
|
-
}, [O, g]),
|
|
1343
|
-
() => ({ ...
|
|
1344
|
-
[
|
|
1345
|
-
),
|
|
1346
|
-
() =>
|
|
1347
|
-
[
|
|
1348
|
-
),
|
|
1349
|
-
|
|
1350
|
-
() =>
|
|
1351
|
-
|
|
1339
|
+
const a = e, o = Ks(a), u = Pe(), l = B(
|
|
1340
|
+
() => ({ ...t, navigate: (i) => u(i) }),
|
|
1341
|
+
[t, u]
|
|
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(() => {
|
|
1343
|
+
O || g(!1), w((i) => !i);
|
|
1344
|
+
}, [O, g]), M = B(
|
|
1345
|
+
() => ({ ...l, close: D }),
|
|
1346
|
+
[l, D]
|
|
1347
|
+
), U = B(
|
|
1348
|
+
() => a.popover ? { ...l, popoverOpen: O, togglePopover: R } : l,
|
|
1349
|
+
[a.popover, l, O, R]
|
|
1350
|
+
), _ = `addon:${a.slot}:${a.key}`, [$, Y] = x([]), [C, b] = x(null);
|
|
1351
|
+
W(
|
|
1352
|
+
() => s?.(
|
|
1353
|
+
o === "dialog" ? v : o === "popover" ? M : l
|
|
1352
1354
|
),
|
|
1353
|
-
[
|
|
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
|
-
context:
|
|
1361
|
+
context: M,
|
|
1360
1362
|
open: O,
|
|
1361
1363
|
anchor: C
|
|
1362
1364
|
}
|
|
1363
1365
|
);
|
|
1364
|
-
if (
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1367
|
-
/* @__PURE__ */
|
|
1366
|
+
if (a.component) {
|
|
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: () =>
|
|
1374
|
-
children:
|
|
1375
|
+
onMouseEnter: () => Ie(a.popover),
|
|
1376
|
+
children: i
|
|
1375
1377
|
}
|
|
1376
1378
|
),
|
|
1377
|
-
|
|
1378
|
-
] }) :
|
|
1379
|
+
y
|
|
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
|
-
if (
|
|
1386
|
-
else if (
|
|
1387
|
-
else if (
|
|
1388
|
-
else if (
|
|
1389
|
-
else if (
|
|
1390
|
-
if (T ===
|
|
1391
|
-
|
|
1392
|
-
if (typeof
|
|
1393
|
-
return
|
|
1394
|
-
|
|
1387
|
+
if (o === "to") u(a.to);
|
|
1388
|
+
else if (o === "run") nt(e, l);
|
|
1389
|
+
else if (o === "dialog") c((i) => !i);
|
|
1390
|
+
else if (o === "popover") R();
|
|
1391
|
+
else if (o === "menu") {
|
|
1392
|
+
if (T === _) return g(!1);
|
|
1393
|
+
hs(a.menu).then((i) => {
|
|
1394
|
+
if (typeof i != "function") throw new Error('"menu" has no default export function');
|
|
1395
|
+
return i(
|
|
1396
|
+
gs(a, l)
|
|
1395
1397
|
);
|
|
1396
|
-
}).then((
|
|
1397
|
-
|
|
1398
|
-
}).catch((
|
|
1398
|
+
}).then((i) => {
|
|
1399
|
+
Y(Ee(i, (m) => Ue(a, m))), V(_);
|
|
1400
|
+
}).catch((i) => Ue(a, i));
|
|
1399
1401
|
}
|
|
1400
1402
|
},
|
|
1401
|
-
onMouseEnter: () =>
|
|
1403
|
+
onMouseEnter: () => o && o !== "to" && Ie(a[o])
|
|
1402
1404
|
}),
|
|
1403
|
-
|
|
1404
|
-
|
|
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
|
-
for (const { id: n, entityType:
|
|
1410
|
-
if (!(
|
|
1411
|
-
const
|
|
1412
|
-
t[
|
|
1411
|
+
for (const { id: n, entityType: r } of e) {
|
|
1412
|
+
if (!(r in _s)) continue;
|
|
1413
|
+
const s = r;
|
|
1414
|
+
t[s] = { ...t[s], [n]: !0 };
|
|
1413
1415
|
}
|
|
1414
1416
|
return t;
|
|
1415
|
-
},
|
|
1416
|
-
const
|
|
1417
|
+
}, Qs = (e, t, n, r) => e.map((s, a) => {
|
|
1418
|
+
const o = t[a];
|
|
1417
1419
|
return {
|
|
1418
|
-
id:
|
|
1420
|
+
id: s,
|
|
1419
1421
|
entityType: n,
|
|
1420
|
-
projectName:
|
|
1421
|
-
...
|
|
1422
|
-
...
|
|
1422
|
+
projectName: r,
|
|
1423
|
+
...o?.name && { name: o.name },
|
|
1424
|
+
...o?.label && { label: o.label }
|
|
1423
1425
|
};
|
|
1424
|
-
}),
|
|
1426
|
+
}), So = ({
|
|
1425
1427
|
projectName: e,
|
|
1426
1428
|
entityType: t,
|
|
1427
1429
|
multiSelect: n,
|
|
1428
|
-
initialSelection:
|
|
1429
|
-
onSubmit:
|
|
1430
|
-
onClose:
|
|
1431
|
-
}) => /* @__PURE__ */
|
|
1432
|
-
|
|
1430
|
+
initialSelection: r,
|
|
1431
|
+
onSubmit: s,
|
|
1432
|
+
onClose: a
|
|
1433
|
+
}) => /* @__PURE__ */ d(
|
|
1434
|
+
Ls,
|
|
1433
1435
|
{
|
|
1434
1436
|
projectName: e,
|
|
1435
1437
|
entityType: t,
|
|
1436
1438
|
isMultiSelect: n,
|
|
1437
|
-
initialSelection:
|
|
1438
|
-
onClose:
|
|
1439
|
-
onSubmit: (
|
|
1439
|
+
initialSelection: qs(r),
|
|
1440
|
+
onClose: a,
|
|
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
|
-
contribution:
|
|
1449
|
+
contribution: r,
|
|
1448
1450
|
context: n,
|
|
1449
|
-
error: (
|
|
1450
|
-
|
|
1451
|
+
error: (s) => /* @__PURE__ */ d(
|
|
1452
|
+
Fs,
|
|
1451
1453
|
{
|
|
1452
|
-
contribution:
|
|
1453
|
-
error:
|
|
1454
|
-
onReported:
|
|
1454
|
+
contribution: r,
|
|
1455
|
+
error: s,
|
|
1456
|
+
onReported: Xs
|
|
1455
1457
|
}
|
|
1456
1458
|
)
|
|
1457
1459
|
},
|
|
1458
|
-
|
|
1460
|
+
r.key
|
|
1459
1461
|
)) });
|
|
1460
|
-
},
|
|
1462
|
+
}, Js = (e) => ({
|
|
1463
|
+
name: e.name,
|
|
1464
|
+
fullName: e.attrib?.fullName || void 0,
|
|
1465
|
+
email: e.attrib?.email || void 0,
|
|
1466
|
+
active: e.active !== !1,
|
|
1467
|
+
isAdmin: !!e.isAdmin,
|
|
1468
|
+
isManager: !!(e.isManager || e.isAdmin),
|
|
1469
|
+
isGuest: !!e.isGuest,
|
|
1470
|
+
isService: !!e.isService
|
|
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)),
|
|
1474
|
+
[t, e.users.length]
|
|
1475
|
+
), r = H(
|
|
1476
|
+
(u) => ({
|
|
1477
|
+
id: u.key,
|
|
1478
|
+
label: u.label,
|
|
1479
|
+
icon: u.icon,
|
|
1480
|
+
"data-addon-item": u.key,
|
|
1481
|
+
onClick: () => nt(u, e)
|
|
1482
|
+
}),
|
|
1483
|
+
[e]
|
|
1484
|
+
), s = B(
|
|
1485
|
+
() => Be(n, "top").map(r),
|
|
1486
|
+
[n, r]
|
|
1487
|
+
), a = B(
|
|
1488
|
+
() => Be(n, "bottom").map(r),
|
|
1489
|
+
[n, r]
|
|
1490
|
+
), o = H(
|
|
1491
|
+
() => n.forEach((u) => Ie(u.run)),
|
|
1492
|
+
[n]
|
|
1493
|
+
);
|
|
1494
|
+
return { topItems: s, items: a, prefetch: o };
|
|
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)),
|
|
1498
|
+
[t, e.users.length, n]
|
|
1499
|
+
);
|
|
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 })
|
|
1512
|
+
] }, s.key)) });
|
|
1513
|
+
}, Po = ({
|
|
1461
1514
|
items: e,
|
|
1462
1515
|
icon: t = "more_horiz",
|
|
1463
1516
|
label: n,
|
|
1464
|
-
tooltip:
|
|
1465
|
-
variant:
|
|
1466
|
-
align:
|
|
1467
|
-
disabled:
|
|
1468
|
-
className:
|
|
1469
|
-
onError:
|
|
1470
|
-
"data-testid":
|
|
1517
|
+
tooltip: r,
|
|
1518
|
+
variant: s = "text",
|
|
1519
|
+
align: a = "right",
|
|
1520
|
+
disabled: o,
|
|
1521
|
+
className: u,
|
|
1522
|
+
onError: l,
|
|
1523
|
+
"data-testid": p
|
|
1471
1524
|
}) => {
|
|
1472
|
-
const { menuOpen: c, toggleMenuOpen:
|
|
1473
|
-
return /* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
|
|
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,
|
|
1476
1529
|
{
|
|
1477
1530
|
ref: V,
|
|
1478
1531
|
icon: t,
|
|
1479
1532
|
label: n,
|
|
1480
|
-
variant:
|
|
1481
|
-
disabled:
|
|
1482
|
-
"data-tooltip": n && !
|
|
1533
|
+
variant: s,
|
|
1534
|
+
disabled: o,
|
|
1535
|
+
"data-tooltip": n && !r ? void 0 : w,
|
|
1483
1536
|
"aria-label": w,
|
|
1484
1537
|
"aria-haspopup": "true",
|
|
1485
1538
|
"aria-expanded": T,
|
|
1486
|
-
className: ue(
|
|
1487
|
-
"data-testid":
|
|
1488
|
-
onClick: () =>
|
|
1539
|
+
className: ue(u, { active: T }),
|
|
1540
|
+
"data-testid": p,
|
|
1541
|
+
onClick: () => E(v)
|
|
1489
1542
|
}
|
|
1490
1543
|
),
|
|
1491
|
-
/* @__PURE__ */
|
|
1544
|
+
/* @__PURE__ */ d(rt, { id: v, target: g, align: a, children: /* @__PURE__ */ d(it, { menu: O }) })
|
|
1492
1545
|
] });
|
|
1493
|
-
},
|
|
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([
|
|
1494
1566
|
"name",
|
|
1495
1567
|
"extension",
|
|
1496
1568
|
"status",
|
|
@@ -1506,253 +1578,253 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1506
1578
|
"hasReviewables",
|
|
1507
1579
|
"createdAt",
|
|
1508
1580
|
"updatedAt"
|
|
1509
|
-
]),
|
|
1581
|
+
]), Do = ({
|
|
1510
1582
|
filterTypes: e = [],
|
|
1511
1583
|
projectNames: t,
|
|
1512
1584
|
scope: n,
|
|
1513
|
-
scopes:
|
|
1514
|
-
data:
|
|
1515
|
-
config:
|
|
1516
|
-
power:
|
|
1585
|
+
scopes: r,
|
|
1586
|
+
data: s,
|
|
1587
|
+
config: a,
|
|
1588
|
+
power: o
|
|
1517
1589
|
}) => {
|
|
1518
|
-
const
|
|
1590
|
+
const u = es(), l = s.productTypes || [], p = s.productBaseTypes || [];
|
|
1519
1591
|
let c = [];
|
|
1520
|
-
const
|
|
1521
|
-
scope:
|
|
1592
|
+
const E = /* @__PURE__ */ new Map(), v = r || (n ? Array.isArray(n) ? n : [n] : []).map((y) => ({
|
|
1593
|
+
scope: y,
|
|
1522
1594
|
filterTypes: e
|
|
1523
|
-
})), T =
|
|
1524
|
-
Array.from(new Set(
|
|
1525
|
-
(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
|
|
1526
1598
|
)
|
|
1527
|
-
), V =
|
|
1528
|
-
(b) => ["entitySubType", "status"].some((
|
|
1529
|
-
), O =
|
|
1599
|
+
), V = v.some(
|
|
1600
|
+
(b) => ["entitySubType", "status"].some((y) => b.filterTypes.includes(y))
|
|
1601
|
+
), O = v.some(
|
|
1530
1602
|
(b) => ["assignees", "users", "author"].some(
|
|
1531
|
-
(
|
|
1603
|
+
(y) => b.filterTypes.includes(y)
|
|
1532
1604
|
)
|
|
1533
|
-
), { data: w = {} } =
|
|
1605
|
+
), { data: w = {} } = fs(
|
|
1534
1606
|
{
|
|
1535
1607
|
projects: t
|
|
1536
1608
|
},
|
|
1537
1609
|
{
|
|
1538
1610
|
skip: !t?.length || !V
|
|
1539
1611
|
}
|
|
1540
|
-
), { data: D = [] } =
|
|
1612
|
+
), { data: D = [] } = ms(
|
|
1541
1613
|
{ projects: t },
|
|
1542
1614
|
{
|
|
1543
1615
|
skip: !t?.length || !O
|
|
1544
1616
|
}
|
|
1545
|
-
), { attributes: R } =
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
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(
|
|
1549
1621
|
k.name,
|
|
1550
|
-
(
|
|
1622
|
+
(_.get(k.name) || 0) + 1
|
|
1551
1623
|
);
|
|
1552
1624
|
});
|
|
1553
|
-
}),
|
|
1625
|
+
}), v.forEach(({ scope: b, filterTypes: y }) => {
|
|
1554
1626
|
const k = T ? b : void 0;
|
|
1555
|
-
if (
|
|
1556
|
-
const
|
|
1627
|
+
if (y.includes("taskType") && b !== "user") {
|
|
1628
|
+
const i = j(
|
|
1557
1629
|
"taskType",
|
|
1558
1630
|
{
|
|
1559
|
-
...
|
|
1631
|
+
...a,
|
|
1560
1632
|
enableOperatorChange: !1
|
|
1561
1633
|
},
|
|
1562
1634
|
k,
|
|
1563
1635
|
g.has("taskType")
|
|
1564
1636
|
);
|
|
1565
|
-
if (
|
|
1566
|
-
let
|
|
1567
|
-
|
|
1637
|
+
if (i) {
|
|
1638
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "task");
|
|
1639
|
+
i.values?.push(...m), c.push(i);
|
|
1568
1640
|
}
|
|
1569
1641
|
}
|
|
1570
|
-
if (
|
|
1571
|
-
const
|
|
1642
|
+
if (y.includes("folderType") && b !== "user") {
|
|
1643
|
+
const i = j(
|
|
1572
1644
|
"folderType",
|
|
1573
1645
|
{
|
|
1574
|
-
...
|
|
1646
|
+
...a,
|
|
1575
1647
|
enableOperatorChange: !1
|
|
1576
1648
|
},
|
|
1577
1649
|
k,
|
|
1578
1650
|
g.has("folderType")
|
|
1579
1651
|
);
|
|
1580
|
-
if (
|
|
1581
|
-
let
|
|
1582
|
-
|
|
1652
|
+
if (i) {
|
|
1653
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "folder");
|
|
1654
|
+
i.values?.push(...m), c.push(i);
|
|
1583
1655
|
}
|
|
1584
1656
|
}
|
|
1585
|
-
if (
|
|
1586
|
-
const
|
|
1657
|
+
if (y.includes("productType") && b !== "user") {
|
|
1658
|
+
const i = j(
|
|
1587
1659
|
"productType",
|
|
1588
1660
|
{
|
|
1589
|
-
...
|
|
1661
|
+
...a,
|
|
1590
1662
|
enableOperatorChange: !1
|
|
1591
1663
|
},
|
|
1592
1664
|
k,
|
|
1593
1665
|
g.has("productType")
|
|
1594
1666
|
);
|
|
1595
|
-
if (
|
|
1596
|
-
let
|
|
1597
|
-
|
|
1667
|
+
if (i) {
|
|
1668
|
+
let m = Oe({ projectsInfo: w, productTypes: l }, "product");
|
|
1669
|
+
i.values?.push(...m), c.push(i);
|
|
1598
1670
|
}
|
|
1599
1671
|
}
|
|
1600
|
-
if (
|
|
1601
|
-
const
|
|
1672
|
+
if (y.includes("productBaseType") && b !== "user") {
|
|
1673
|
+
const i = j(
|
|
1602
1674
|
"productBaseType",
|
|
1603
1675
|
{
|
|
1604
|
-
...
|
|
1676
|
+
...a,
|
|
1605
1677
|
enableOperatorChange: !1
|
|
1606
1678
|
},
|
|
1607
1679
|
k,
|
|
1608
1680
|
g.has("productBaseType")
|
|
1609
1681
|
);
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
id:
|
|
1613
|
-
label:
|
|
1614
|
-
icon:
|
|
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,
|
|
1686
|
+
icon: m || re("product")
|
|
1615
1687
|
});
|
|
1616
|
-
}),
|
|
1617
|
-
|
|
1618
|
-
id:
|
|
1619
|
-
label:
|
|
1620
|
-
icon:
|
|
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,
|
|
1692
|
+
icon: m || re("product")
|
|
1621
1693
|
});
|
|
1622
|
-
}), c.push(
|
|
1694
|
+
}), c.push(i));
|
|
1623
1695
|
}
|
|
1624
|
-
if (
|
|
1625
|
-
const
|
|
1696
|
+
if (y.includes("productName") && b === "product") {
|
|
1697
|
+
const i = j(
|
|
1626
1698
|
"productName",
|
|
1627
|
-
|
|
1699
|
+
a,
|
|
1628
1700
|
k,
|
|
1629
1701
|
g.has("productName")
|
|
1630
1702
|
);
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
id:
|
|
1634
|
-
label:
|
|
1703
|
+
i && (s.productNames?.forEach((m) => {
|
|
1704
|
+
i.values?.some((f) => f.id === m) || i.values?.push({
|
|
1705
|
+
id: m,
|
|
1706
|
+
label: m
|
|
1635
1707
|
});
|
|
1636
|
-
}), c.push(
|
|
1708
|
+
}), c.push(i));
|
|
1637
1709
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
const
|
|
1710
|
+
if (y.includes("status")) {
|
|
1711
|
+
const i = j(
|
|
1640
1712
|
"status",
|
|
1641
|
-
{ ...
|
|
1713
|
+
{ ...a, enableOperatorChange: !1 },
|
|
1642
1714
|
k,
|
|
1643
1715
|
g.has("status")
|
|
1644
1716
|
);
|
|
1645
|
-
|
|
1646
|
-
(
|
|
1647
|
-
|
|
1648
|
-
id:
|
|
1649
|
-
label:
|
|
1650
|
-
icon:
|
|
1651
|
-
color:
|
|
1717
|
+
i && (Object.values(w).forEach((m) => {
|
|
1718
|
+
(m?.statuses || []).filter((h) => h.scope?.includes(b)).forEach((h) => {
|
|
1719
|
+
i.values?.some((I) => I.id === h.name) || i.values?.push({
|
|
1720
|
+
id: h.name,
|
|
1721
|
+
label: h.name,
|
|
1722
|
+
icon: h.icon,
|
|
1723
|
+
color: h.color
|
|
1652
1724
|
});
|
|
1653
1725
|
});
|
|
1654
|
-
}), c.push(
|
|
1726
|
+
}), c.push(i));
|
|
1655
1727
|
}
|
|
1656
|
-
if (
|
|
1657
|
-
const
|
|
1728
|
+
if (y.includes("assignees")) {
|
|
1729
|
+
const i = j(
|
|
1658
1730
|
"assignees",
|
|
1659
|
-
|
|
1731
|
+
a,
|
|
1660
1732
|
k,
|
|
1661
1733
|
g.has("assignees")
|
|
1662
1734
|
);
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
id:
|
|
1666
|
-
label:
|
|
1667
|
-
img: `/api/users/${
|
|
1735
|
+
i && (D.forEach((m) => {
|
|
1736
|
+
i.values?.some((f) => f.id === m.name) || i.values?.push({
|
|
1737
|
+
id: m.name,
|
|
1738
|
+
label: m.attrib.fullName || m.name,
|
|
1739
|
+
img: `/api/users/${m.name}/avatar`,
|
|
1668
1740
|
icon: null
|
|
1669
1741
|
});
|
|
1670
|
-
}),
|
|
1671
|
-
const
|
|
1672
|
-
return (
|
|
1673
|
-
}), c.push(
|
|
1742
|
+
}), i.values?.sort((m, f) => {
|
|
1743
|
+
const h = s.assignees?.filter((P) => P === m.id).length || 0;
|
|
1744
|
+
return (s.assignees?.filter((P) => P === f.id).length || 0) - h;
|
|
1745
|
+
}), c.push(i));
|
|
1674
1746
|
}
|
|
1675
|
-
if (
|
|
1676
|
-
const
|
|
1747
|
+
if (y.includes("author")) {
|
|
1748
|
+
const i = j(
|
|
1677
1749
|
"author",
|
|
1678
|
-
|
|
1750
|
+
a,
|
|
1679
1751
|
k,
|
|
1680
1752
|
g.has("author")
|
|
1681
1753
|
);
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
id:
|
|
1685
|
-
label:
|
|
1686
|
-
img: `/api/users/${
|
|
1754
|
+
i && (D.forEach((m) => {
|
|
1755
|
+
i.values?.some((f) => f.id === m.name) || i.values?.push({
|
|
1756
|
+
id: m.name,
|
|
1757
|
+
label: m.attrib.fullName || m.name,
|
|
1758
|
+
img: `/api/users/${m.name}/avatar`,
|
|
1687
1759
|
icon: null
|
|
1688
1760
|
});
|
|
1689
|
-
}), c.push(
|
|
1761
|
+
}), c.push(i));
|
|
1690
1762
|
}
|
|
1691
|
-
if (
|
|
1692
|
-
const
|
|
1693
|
-
if (
|
|
1694
|
-
const
|
|
1763
|
+
if (y.includes("tags")) {
|
|
1764
|
+
const i = j("tags", a, k, g.has("tags"));
|
|
1765
|
+
if (i) {
|
|
1766
|
+
const m = /* @__PURE__ */ new Map();
|
|
1695
1767
|
Object.values(w).forEach((I) => {
|
|
1696
1768
|
I?.tags && I.tags.forEach((P) => {
|
|
1697
|
-
|
|
1769
|
+
m.has(P.name) || m.set(P.name, P);
|
|
1698
1770
|
});
|
|
1699
1771
|
});
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
const P =
|
|
1772
|
+
const f = /* @__PURE__ */ new Map();
|
|
1773
|
+
s.tags?.forEach((I) => {
|
|
1774
|
+
const P = f.get(I);
|
|
1703
1775
|
if (P) {
|
|
1704
1776
|
P.count++;
|
|
1705
1777
|
return;
|
|
1706
1778
|
} else {
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1779
|
+
const S = m.get(I);
|
|
1780
|
+
f.set(I, {
|
|
1709
1781
|
id: I,
|
|
1710
1782
|
type: "string",
|
|
1711
1783
|
label: I,
|
|
1712
1784
|
values: [],
|
|
1713
|
-
color:
|
|
1785
|
+
color: S?.color || null,
|
|
1714
1786
|
count: 1
|
|
1715
1787
|
});
|
|
1716
1788
|
}
|
|
1717
1789
|
});
|
|
1718
|
-
const
|
|
1790
|
+
const h = Array.from(f.values()).sort(
|
|
1719
1791
|
(I, P) => P.count - I.count
|
|
1720
1792
|
);
|
|
1721
|
-
|
|
1793
|
+
i.values?.push(...h), c.push(i);
|
|
1722
1794
|
}
|
|
1723
1795
|
}
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
id:
|
|
1729
|
-
label:
|
|
1730
|
-
icon:
|
|
1796
|
+
if (y.includes("version")) {
|
|
1797
|
+
const i = j("version", a, k);
|
|
1798
|
+
i && (Bt.forEach((f) => {
|
|
1799
|
+
i.values?.push({
|
|
1800
|
+
id: f.value,
|
|
1801
|
+
label: f.label,
|
|
1802
|
+
icon: f.icon
|
|
1731
1803
|
});
|
|
1732
|
-
}), c.push(
|
|
1804
|
+
}), c.push(i));
|
|
1733
1805
|
}
|
|
1734
|
-
if (
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1806
|
+
if (y.includes("name")) {
|
|
1807
|
+
const i = j("name", a, k, g.has("name"));
|
|
1808
|
+
i && c.push(i);
|
|
1737
1809
|
}
|
|
1738
|
-
if (
|
|
1739
|
-
const
|
|
1810
|
+
if (y.includes("extension") && b === "representation") {
|
|
1811
|
+
const i = j(
|
|
1740
1812
|
"extension",
|
|
1741
|
-
|
|
1813
|
+
a,
|
|
1742
1814
|
k,
|
|
1743
1815
|
g.has("extension")
|
|
1744
1816
|
);
|
|
1745
|
-
|
|
1817
|
+
i && c.push(i);
|
|
1746
1818
|
}
|
|
1747
|
-
if (
|
|
1748
|
-
const
|
|
1819
|
+
if (y.includes("hasReviewables")) {
|
|
1820
|
+
const i = j(
|
|
1749
1821
|
"hasReviewables",
|
|
1750
|
-
|
|
1822
|
+
a,
|
|
1751
1823
|
k,
|
|
1752
1824
|
g.has("hasReviewables")
|
|
1753
1825
|
);
|
|
1754
|
-
if (
|
|
1755
|
-
const
|
|
1826
|
+
if (i) {
|
|
1827
|
+
const m = [
|
|
1756
1828
|
{
|
|
1757
1829
|
id: "true",
|
|
1758
1830
|
label: "Yes",
|
|
@@ -1764,83 +1836,83 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1764
1836
|
values: []
|
|
1765
1837
|
}
|
|
1766
1838
|
];
|
|
1767
|
-
|
|
1839
|
+
i.values?.push(...m), c.push(i);
|
|
1768
1840
|
}
|
|
1769
1841
|
}
|
|
1770
|
-
if (
|
|
1771
|
-
const
|
|
1842
|
+
if (y.includes("createdAt")) {
|
|
1843
|
+
const i = j(
|
|
1772
1844
|
"createdAt",
|
|
1773
|
-
|
|
1845
|
+
a,
|
|
1774
1846
|
k,
|
|
1775
1847
|
g.has("createdAt")
|
|
1776
1848
|
);
|
|
1777
|
-
|
|
1778
|
-
...
|
|
1779
|
-
...
|
|
1780
|
-
contentAfter:
|
|
1849
|
+
i && (i.values?.push(ke), i.values?.push(
|
|
1850
|
+
...Ce().map((m) => ({
|
|
1851
|
+
...m,
|
|
1852
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1781
1853
|
}))
|
|
1782
|
-
), c.push(
|
|
1854
|
+
), c.push(i));
|
|
1783
1855
|
}
|
|
1784
|
-
if (
|
|
1785
|
-
const
|
|
1856
|
+
if (y.includes("updatedAt")) {
|
|
1857
|
+
const i = j(
|
|
1786
1858
|
"updatedAt",
|
|
1787
|
-
|
|
1859
|
+
a,
|
|
1788
1860
|
k,
|
|
1789
1861
|
g.has("updatedAt")
|
|
1790
1862
|
);
|
|
1791
|
-
|
|
1792
|
-
...
|
|
1793
|
-
...
|
|
1794
|
-
contentAfter:
|
|
1863
|
+
i && (i.values?.push(ke), i.values?.push(
|
|
1864
|
+
...Ce().map((m) => ({
|
|
1865
|
+
...m,
|
|
1866
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1795
1867
|
}))
|
|
1796
|
-
), c.push(
|
|
1868
|
+
), c.push(i));
|
|
1797
1869
|
}
|
|
1798
|
-
if (
|
|
1799
|
-
const
|
|
1800
|
-
(
|
|
1870
|
+
if (y.includes("attributes")) {
|
|
1871
|
+
const i = U.filter(
|
|
1872
|
+
(h) => h.scope?.includes(b) && // replaced by the dedicated extension option: publishing never sets this
|
|
1801
1873
|
// attribute on representations, so filtering on it matches nothing
|
|
1802
|
-
!(
|
|
1803
|
-
),
|
|
1804
|
-
(
|
|
1874
|
+
!(y.includes("extension") && h.name === "extension")
|
|
1875
|
+
), m = bs(s.attributes) ? i : i.filter(
|
|
1876
|
+
(h) => s.attributes && s.attributes[h.name]
|
|
1805
1877
|
);
|
|
1806
|
-
(
|
|
1807
|
-
const I =
|
|
1878
|
+
(a?.enableRelativeValues ? m : m.filter((h) => h.data.type !== "datetime")).forEach((h) => {
|
|
1879
|
+
const I = s.attributes && s.attributes[h.name], P = h.data.enum, S = h.data.type, L = [
|
|
1808
1880
|
"list_of_strings",
|
|
1809
1881
|
"list_of_integers",
|
|
1810
1882
|
"list_of_any",
|
|
1811
1883
|
"list_of_submodels"
|
|
1812
|
-
].includes(
|
|
1813
|
-
|
|
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(
|
|
1885
|
+
h,
|
|
1814
1886
|
{
|
|
1815
|
-
...
|
|
1887
|
+
...a,
|
|
1816
1888
|
allowsCustomValues: !0,
|
|
1817
1889
|
enableOperatorChange: oe,
|
|
1818
|
-
enableRelativeValues:
|
|
1890
|
+
enableRelativeValues: be
|
|
1819
1891
|
},
|
|
1820
1892
|
k,
|
|
1821
|
-
(
|
|
1893
|
+
(_.get(h.name) || 0) > 1
|
|
1822
1894
|
);
|
|
1823
|
-
if (
|
|
1824
|
-
const
|
|
1825
|
-
|
|
1895
|
+
if (h.data.enumResolver) {
|
|
1896
|
+
const te = h.data;
|
|
1897
|
+
Z.loadValuesKey = t?.[0], Z.loadValues = async () => je(
|
|
1826
1898
|
I,
|
|
1827
|
-
await
|
|
1828
|
-
|
|
1899
|
+
await u(te, t?.[0]),
|
|
1900
|
+
S
|
|
1829
1901
|
);
|
|
1830
1902
|
}
|
|
1831
|
-
const
|
|
1903
|
+
const we = [
|
|
1832
1904
|
"string",
|
|
1833
1905
|
"integer",
|
|
1834
1906
|
"float",
|
|
1835
1907
|
"list_of_strings",
|
|
1836
1908
|
"list_of_integers"
|
|
1837
|
-
],
|
|
1838
|
-
if (
|
|
1839
|
-
const
|
|
1840
|
-
|
|
1909
|
+
], ee = [];
|
|
1910
|
+
if (we.includes(S)) {
|
|
1911
|
+
const te = je(I, P, S);
|
|
1912
|
+
ee.push(...te);
|
|
1841
1913
|
}
|
|
1842
|
-
if (
|
|
1843
|
-
const
|
|
1914
|
+
if (S === "boolean") {
|
|
1915
|
+
const te = [
|
|
1844
1916
|
{
|
|
1845
1917
|
id: "true",
|
|
1846
1918
|
label: "Yes",
|
|
@@ -1852,56 +1924,56 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1852
1924
|
values: []
|
|
1853
1925
|
}
|
|
1854
1926
|
];
|
|
1855
|
-
|
|
1927
|
+
ee.push(...te);
|
|
1856
1928
|
}
|
|
1857
|
-
|
|
1858
|
-
...
|
|
1859
|
-
...
|
|
1860
|
-
contentAfter:
|
|
1929
|
+
G && (ee.push(ke), ee.push(
|
|
1930
|
+
...Ce().map((te) => ({
|
|
1931
|
+
...te,
|
|
1932
|
+
contentAfter: o ? void 0 : /* @__PURE__ */ d(pe, { icon: "bolt" })
|
|
1861
1933
|
}))
|
|
1862
|
-
)),
|
|
1934
|
+
)), Z.values?.push(...ee), E.set(Z.id, h.name), c.push(Z);
|
|
1863
1935
|
});
|
|
1864
1936
|
}
|
|
1865
1937
|
});
|
|
1866
|
-
const $ = c.reduce((b,
|
|
1867
|
-
if (!
|
|
1868
|
-
const k = typeof
|
|
1869
|
-
return b.some((
|
|
1870
|
-
name:
|
|
1871
|
-
label:
|
|
1872
|
-
icon:
|
|
1873
|
-
color: k?.color ||
|
|
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({
|
|
1942
|
+
name: i,
|
|
1943
|
+
label: m ? me(i) : k?.label || y.label,
|
|
1944
|
+
icon: m ? re(i) : k?.icon || y.icon,
|
|
1945
|
+
color: k?.color || y.color
|
|
1874
1946
|
}), b;
|
|
1875
|
-
}, []),
|
|
1947
|
+
}, []), Y = sa(c, E, U), C = aa(
|
|
1876
1948
|
$,
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1949
|
+
Y,
|
|
1950
|
+
E,
|
|
1951
|
+
U
|
|
1880
1952
|
);
|
|
1881
|
-
return { options:
|
|
1882
|
-
},
|
|
1953
|
+
return { options: Y, groupOptions: C };
|
|
1954
|
+
}, Oe = ({
|
|
1883
1955
|
projectsInfo: e,
|
|
1884
1956
|
productTypes: t
|
|
1885
1957
|
}, n) => {
|
|
1886
|
-
const
|
|
1887
|
-
return n === "product" ? t.forEach(({ icon:
|
|
1888
|
-
|
|
1889
|
-
id:
|
|
1958
|
+
const r = [];
|
|
1959
|
+
return n === "product" ? t.forEach(({ icon: s, name: a }) => {
|
|
1960
|
+
r.push({
|
|
1961
|
+
id: a,
|
|
1890
1962
|
type: "string",
|
|
1891
|
-
label:
|
|
1892
|
-
icon:
|
|
1963
|
+
label: a,
|
|
1964
|
+
icon: s || re("product"),
|
|
1893
1965
|
inverted: !1,
|
|
1894
1966
|
values: [],
|
|
1895
1967
|
allowsCustomValues: !1
|
|
1896
1968
|
});
|
|
1897
|
-
}) : n === "task" ? Object.values(e).forEach((
|
|
1898
|
-
(
|
|
1899
|
-
|
|
1900
|
-
id:
|
|
1969
|
+
}) : n === "task" ? Object.values(e).forEach((s) => {
|
|
1970
|
+
(s?.taskTypes || []).forEach((o) => {
|
|
1971
|
+
r.some((u) => u.id === o.name) || r.push({
|
|
1972
|
+
id: o.name,
|
|
1901
1973
|
type: "string",
|
|
1902
|
-
label:
|
|
1903
|
-
icon:
|
|
1904
|
-
color:
|
|
1974
|
+
label: o.name,
|
|
1975
|
+
icon: o.icon,
|
|
1976
|
+
color: o.color,
|
|
1905
1977
|
inverted: !1,
|
|
1906
1978
|
values: [],
|
|
1907
1979
|
allowsCustomValues: !1,
|
|
@@ -1912,14 +1984,14 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1912
1984
|
}
|
|
1913
1985
|
});
|
|
1914
1986
|
});
|
|
1915
|
-
}) : n === "folder" && Object.values(e).forEach((
|
|
1916
|
-
(
|
|
1917
|
-
|
|
1918
|
-
id:
|
|
1987
|
+
}) : n === "folder" && Object.values(e).forEach((s) => {
|
|
1988
|
+
(s?.folderTypes || []).forEach((o) => {
|
|
1989
|
+
r.some((u) => u.id === o.name) || r.push({
|
|
1990
|
+
id: o.name,
|
|
1919
1991
|
type: "string",
|
|
1920
|
-
label:
|
|
1921
|
-
icon:
|
|
1922
|
-
color:
|
|
1992
|
+
label: o.name,
|
|
1993
|
+
icon: o.icon,
|
|
1994
|
+
color: o.color,
|
|
1923
1995
|
inverted: !1,
|
|
1924
1996
|
values: [],
|
|
1925
1997
|
allowsCustomValues: !1,
|
|
@@ -1930,18 +2002,18 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1930
2002
|
}
|
|
1931
2003
|
});
|
|
1932
2004
|
});
|
|
1933
|
-
}),
|
|
1934
|
-
},
|
|
1935
|
-
const { prefixes:
|
|
1936
|
-
let
|
|
1937
|
-
return
|
|
1938
|
-
},
|
|
1939
|
-
const
|
|
1940
|
-
let
|
|
2005
|
+
}), r;
|
|
2006
|
+
}, dt = (e, t, n, r) => {
|
|
2007
|
+
const { prefixes: s, keys: a } = n || {};
|
|
2008
|
+
let o = e;
|
|
2009
|
+
return a && t in a ? o = `${a[t]}` : s && t in s && (o = `${s[t]}${e}`), r && (o = `${r}_${o}`), o;
|
|
2010
|
+
}, j = (e, t, n, r = !1) => {
|
|
2011
|
+
const s = (l) => dt(l, e, t, n);
|
|
2012
|
+
let a = null;
|
|
1941
2013
|
switch (e) {
|
|
1942
2014
|
case "taskType":
|
|
1943
|
-
|
|
1944
|
-
id:
|
|
2015
|
+
a = {
|
|
2016
|
+
id: s("taskType"),
|
|
1945
2017
|
type: "string",
|
|
1946
2018
|
label: "Task Type",
|
|
1947
2019
|
icon: q("task"),
|
|
@@ -1956,8 +2028,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1956
2028
|
};
|
|
1957
2029
|
break;
|
|
1958
2030
|
case "folderType":
|
|
1959
|
-
|
|
1960
|
-
id:
|
|
2031
|
+
a = {
|
|
2032
|
+
id: s("folderType"),
|
|
1961
2033
|
type: "string",
|
|
1962
2034
|
label: "Folder Type",
|
|
1963
2035
|
icon: q("folder"),
|
|
@@ -1972,8 +2044,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1972
2044
|
};
|
|
1973
2045
|
break;
|
|
1974
2046
|
case "productType":
|
|
1975
|
-
|
|
1976
|
-
id:
|
|
2047
|
+
a = {
|
|
2048
|
+
id: s("productType"),
|
|
1977
2049
|
type: "string",
|
|
1978
2050
|
label: "Product Type",
|
|
1979
2051
|
icon: q("product"),
|
|
@@ -1988,8 +2060,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
1988
2060
|
};
|
|
1989
2061
|
break;
|
|
1990
2062
|
case "productBaseType":
|
|
1991
|
-
|
|
1992
|
-
id:
|
|
2063
|
+
a = {
|
|
2064
|
+
id: s("productBaseType"),
|
|
1993
2065
|
type: "string",
|
|
1994
2066
|
label: "Product Base Type",
|
|
1995
2067
|
icon: q("product"),
|
|
@@ -2004,8 +2076,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2004
2076
|
};
|
|
2005
2077
|
break;
|
|
2006
2078
|
case "productName":
|
|
2007
|
-
|
|
2008
|
-
id:
|
|
2079
|
+
a = {
|
|
2080
|
+
id: s("productNames"),
|
|
2009
2081
|
type: "string",
|
|
2010
2082
|
label: "Product Name",
|
|
2011
2083
|
icon: q("productName", "string"),
|
|
@@ -2020,8 +2092,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2020
2092
|
};
|
|
2021
2093
|
break;
|
|
2022
2094
|
case "status":
|
|
2023
|
-
|
|
2024
|
-
id:
|
|
2095
|
+
a = {
|
|
2096
|
+
id: s("status"),
|
|
2025
2097
|
type: "string",
|
|
2026
2098
|
label: "Status",
|
|
2027
2099
|
icon: q("status"),
|
|
@@ -2036,8 +2108,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2036
2108
|
};
|
|
2037
2109
|
break;
|
|
2038
2110
|
case "assignees":
|
|
2039
|
-
|
|
2040
|
-
id:
|
|
2111
|
+
a = {
|
|
2112
|
+
id: s("assignees"),
|
|
2041
2113
|
type: "list_of_strings",
|
|
2042
2114
|
label: "Assignee",
|
|
2043
2115
|
icon: q("assignees"),
|
|
@@ -2052,8 +2124,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2052
2124
|
};
|
|
2053
2125
|
break;
|
|
2054
2126
|
case "author":
|
|
2055
|
-
|
|
2056
|
-
id:
|
|
2127
|
+
a = {
|
|
2128
|
+
id: s("author"),
|
|
2057
2129
|
type: "string",
|
|
2058
2130
|
label: "Author",
|
|
2059
2131
|
icon: q("author"),
|
|
@@ -2068,8 +2140,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2068
2140
|
};
|
|
2069
2141
|
break;
|
|
2070
2142
|
case "tags":
|
|
2071
|
-
|
|
2072
|
-
id:
|
|
2143
|
+
a = {
|
|
2144
|
+
id: s("tags"),
|
|
2073
2145
|
type: "list_of_strings",
|
|
2074
2146
|
label: "Tags",
|
|
2075
2147
|
icon: q("tags"),
|
|
@@ -2084,8 +2156,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2084
2156
|
};
|
|
2085
2157
|
break;
|
|
2086
2158
|
case "version":
|
|
2087
|
-
|
|
2088
|
-
id:
|
|
2159
|
+
a = {
|
|
2160
|
+
id: s("version"),
|
|
2089
2161
|
type: "string",
|
|
2090
2162
|
label: "Version",
|
|
2091
2163
|
icon: re("version"),
|
|
@@ -2101,8 +2173,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2101
2173
|
};
|
|
2102
2174
|
break;
|
|
2103
2175
|
case "name":
|
|
2104
|
-
|
|
2105
|
-
id:
|
|
2176
|
+
a = {
|
|
2177
|
+
id: s("name"),
|
|
2106
2178
|
type: "string",
|
|
2107
2179
|
label: "Name",
|
|
2108
2180
|
icon: "text_fields",
|
|
@@ -2117,8 +2189,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2117
2189
|
};
|
|
2118
2190
|
break;
|
|
2119
2191
|
case "extension":
|
|
2120
|
-
|
|
2121
|
-
id:
|
|
2192
|
+
a = {
|
|
2193
|
+
id: s("extension"),
|
|
2122
2194
|
type: "string",
|
|
2123
2195
|
label: "File Extension",
|
|
2124
2196
|
icon: q("extension", "string"),
|
|
@@ -2133,8 +2205,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2133
2205
|
};
|
|
2134
2206
|
break;
|
|
2135
2207
|
case "hasReviewables":
|
|
2136
|
-
|
|
2137
|
-
id:
|
|
2208
|
+
a = {
|
|
2209
|
+
id: s("hasReviewables"),
|
|
2138
2210
|
type: "boolean",
|
|
2139
2211
|
label: "Has Reviewables",
|
|
2140
2212
|
icon: "play_circle",
|
|
@@ -2150,8 +2222,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2150
2222
|
};
|
|
2151
2223
|
break;
|
|
2152
2224
|
case "createdAt":
|
|
2153
|
-
|
|
2154
|
-
id:
|
|
2225
|
+
a = {
|
|
2226
|
+
id: s("createdAt"),
|
|
2155
2227
|
type: "datetime",
|
|
2156
2228
|
label: "Created",
|
|
2157
2229
|
icon: "calendar_add_on",
|
|
@@ -2167,8 +2239,8 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2167
2239
|
};
|
|
2168
2240
|
break;
|
|
2169
2241
|
case "updatedAt":
|
|
2170
|
-
|
|
2171
|
-
id:
|
|
2242
|
+
a = {
|
|
2243
|
+
id: s("updatedAt"),
|
|
2172
2244
|
type: "datetime",
|
|
2173
2245
|
label: "Updated",
|
|
2174
2246
|
icon: "edit_calendar",
|
|
@@ -2184,26 +2256,26 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2184
2256
|
};
|
|
2185
2257
|
break;
|
|
2186
2258
|
}
|
|
2187
|
-
const
|
|
2188
|
-
if ((
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2191
|
-
name:
|
|
2192
|
-
label: n ? me(n) :
|
|
2193
|
-
icon: n ? re(n) :
|
|
2259
|
+
const o = me(n || ""), u = (l) => n ? `${o} ${l}` : l;
|
|
2260
|
+
if ((r || n) && a) {
|
|
2261
|
+
const l = n || e;
|
|
2262
|
+
a.group = {
|
|
2263
|
+
name: l,
|
|
2264
|
+
label: n ? me(n) : a.label,
|
|
2265
|
+
icon: n ? re(n) : a.icon
|
|
2194
2266
|
};
|
|
2195
2267
|
}
|
|
2196
|
-
return
|
|
2197
|
-
},
|
|
2198
|
-
const
|
|
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;
|
|
2269
|
+
}, ta = (e, t, n, r = !1) => {
|
|
2270
|
+
const s = e.data.title || e.name, a = r || n ? {
|
|
2199
2271
|
name: n || e.name,
|
|
2200
|
-
label: n ? me(n) :
|
|
2201
|
-
icon: n ? re(n) : q(e.name, e.data.type,
|
|
2272
|
+
label: n ? me(n) : s,
|
|
2273
|
+
icon: n ? re(n) : q(e.name, e.data.type, Ne(e.data))
|
|
2202
2274
|
} : void 0;
|
|
2203
2275
|
return {
|
|
2204
|
-
id:
|
|
2276
|
+
id: dt(e.name, "attributes", t, n),
|
|
2205
2277
|
type: e.data.type,
|
|
2206
|
-
label:
|
|
2278
|
+
label: s,
|
|
2207
2279
|
operator: "OR",
|
|
2208
2280
|
inverted: !1,
|
|
2209
2281
|
values: [],
|
|
@@ -2212,27 +2284,27 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2212
2284
|
allowNoValue: t.enableRelativeValues,
|
|
2213
2285
|
allowExcludes: t?.enableExcludes,
|
|
2214
2286
|
operatorChangeable: t?.enableOperatorChange,
|
|
2215
|
-
icon: q(e.name, e.data.type,
|
|
2216
|
-
group:
|
|
2217
|
-
tooltip: n ? `${me(n)} ${
|
|
2287
|
+
icon: q(e.name, e.data.type, Ne(e.data)),
|
|
2288
|
+
group: a,
|
|
2289
|
+
tooltip: n ? `${me(n)} ${s}` : void 0,
|
|
2218
2290
|
value: n ? { icon: re(n) } : void 0,
|
|
2219
2291
|
singleSelect: ["boolean", "datetime"].includes(e.data.type || "")
|
|
2220
2292
|
};
|
|
2221
|
-
},
|
|
2222
|
-
const
|
|
2293
|
+
}, je = (e, t, n) => {
|
|
2294
|
+
const r = [], s = [];
|
|
2223
2295
|
if (t) {
|
|
2224
|
-
const
|
|
2225
|
-
|
|
2226
|
-
(
|
|
2227
|
-
const
|
|
2228
|
-
|
|
2229
|
-
id:
|
|
2296
|
+
const a = (e || []).flatMap((o) => Array.isArray(o) ? o : [o]);
|
|
2297
|
+
ts(t, a).forEach(
|
|
2298
|
+
(o) => {
|
|
2299
|
+
const u = o.icon, l = ss(u);
|
|
2300
|
+
r.push({
|
|
2301
|
+
id: o.value.toString(),
|
|
2230
2302
|
type: n,
|
|
2231
|
-
label:
|
|
2303
|
+
label: o.label,
|
|
2232
2304
|
values: [],
|
|
2233
|
-
icon:
|
|
2234
|
-
img:
|
|
2235
|
-
color:
|
|
2305
|
+
icon: l ? null : u,
|
|
2306
|
+
img: l ? u : void 0,
|
|
2307
|
+
color: o.color,
|
|
2236
2308
|
pt: {
|
|
2237
2309
|
style: { color: "inherit" }
|
|
2238
2310
|
}
|
|
@@ -2240,61 +2312,61 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2240
2312
|
}
|
|
2241
2313
|
);
|
|
2242
2314
|
}
|
|
2243
|
-
return e?.forEach((
|
|
2244
|
-
if (!
|
|
2245
|
-
let
|
|
2246
|
-
switch (typeof
|
|
2315
|
+
return e?.forEach((a) => {
|
|
2316
|
+
if (!a) return;
|
|
2317
|
+
let o = "";
|
|
2318
|
+
switch (typeof a) {
|
|
2247
2319
|
case "string":
|
|
2248
2320
|
case "number":
|
|
2249
2321
|
case "boolean":
|
|
2250
|
-
|
|
2322
|
+
o = a.toString();
|
|
2251
2323
|
break;
|
|
2252
2324
|
case "object":
|
|
2253
|
-
Array.isArray(
|
|
2325
|
+
Array.isArray(a) ? o = a.join(", ") : o = JSON.stringify(a);
|
|
2254
2326
|
break;
|
|
2255
2327
|
}
|
|
2256
|
-
const
|
|
2257
|
-
if (
|
|
2258
|
-
const
|
|
2259
|
-
if (
|
|
2260
|
-
|
|
2328
|
+
const u = o.trim().toLowerCase().replace(/[^a-z0-9\s]/g, "").replace(/\s+/g, "-");
|
|
2329
|
+
if (r?.find((c) => c.id === u)) return;
|
|
2330
|
+
const p = s.find((c) => c.id === u);
|
|
2331
|
+
if (p) {
|
|
2332
|
+
p.count++;
|
|
2261
2333
|
return;
|
|
2262
2334
|
} else
|
|
2263
|
-
|
|
2264
|
-
id:
|
|
2335
|
+
s.push({
|
|
2336
|
+
id: u,
|
|
2265
2337
|
type: n,
|
|
2266
|
-
label:
|
|
2338
|
+
label: o,
|
|
2267
2339
|
values: [],
|
|
2268
2340
|
count: 1
|
|
2269
2341
|
});
|
|
2270
|
-
}),
|
|
2271
|
-
},
|
|
2272
|
-
|
|
2273
|
-
t.get(
|
|
2274
|
-
|
|
2275
|
-
t.get(
|
|
2342
|
+
}), s.sort((a, o) => o.count - a.count), [...r, ...s];
|
|
2343
|
+
}, sa = (e, t, n) => [...e].sort((r, s) => pt(
|
|
2344
|
+
ye(r),
|
|
2345
|
+
t.get(r.id),
|
|
2346
|
+
ye(s),
|
|
2347
|
+
t.get(s.id),
|
|
2276
2348
|
n
|
|
2277
|
-
)),
|
|
2278
|
-
const
|
|
2279
|
-
return
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
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) => {
|
|
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);
|
|
2351
|
+
return pt(
|
|
2352
|
+
o ? ye(o) : s.name,
|
|
2353
|
+
o ? n.get(o.id) : s.name,
|
|
2354
|
+
u ? ye(u) : a.name,
|
|
2355
|
+
u ? n.get(u.id) : a.name,
|
|
2356
|
+
r
|
|
2285
2357
|
);
|
|
2286
|
-
}),
|
|
2287
|
-
const
|
|
2358
|
+
}), pt = (e, t, n, r, s) => {
|
|
2359
|
+
const a = new Map(s.map((p, c) => [p.name, c])), o = (p) => {
|
|
2288
2360
|
let c = 0;
|
|
2289
|
-
for (const
|
|
2290
|
-
if (
|
|
2361
|
+
for (const E of ea) {
|
|
2362
|
+
if (p === E || p.endsWith(`_${E}`)) return c;
|
|
2291
2363
|
c++;
|
|
2292
2364
|
}
|
|
2293
2365
|
return Number.MAX_SAFE_INTEGER;
|
|
2294
|
-
},
|
|
2295
|
-
return
|
|
2296
|
-
},
|
|
2297
|
-
const
|
|
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)];
|
|
2367
|
+
return u[0] - l[0] || u[1] - l[1];
|
|
2368
|
+
}, Ro = (e, t, n, r) => {
|
|
2369
|
+
const s = {
|
|
2298
2370
|
folder: { conditions: [], operator: e?.operator || "and" },
|
|
2299
2371
|
product: { conditions: [], operator: e?.operator || "and" },
|
|
2300
2372
|
task: { conditions: [], operator: e?.operator || "and" },
|
|
@@ -2304,17 +2376,17 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2304
2376
|
unscoped: { conditions: [], operator: e?.operator || "and" }
|
|
2305
2377
|
};
|
|
2306
2378
|
if (!e?.conditions || e?.conditions.length === 0)
|
|
2307
|
-
return
|
|
2308
|
-
const
|
|
2309
|
-
const
|
|
2310
|
-
if (
|
|
2311
|
-
const c =
|
|
2312
|
-
return { scope:
|
|
2379
|
+
return s;
|
|
2380
|
+
const a = (l) => {
|
|
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 };
|
|
2313
2385
|
} else if (n?.fallbackScope)
|
|
2314
|
-
return { scope: n.fallbackScope, cleanId:
|
|
2315
|
-
return { scope: null, cleanId:
|
|
2316
|
-
},
|
|
2317
|
-
const
|
|
2386
|
+
return { scope: n.fallbackScope, cleanId: l };
|
|
2387
|
+
return { scope: null, cleanId: l };
|
|
2388
|
+
}, o = (l) => {
|
|
2389
|
+
const p = {
|
|
2318
2390
|
folder: [],
|
|
2319
2391
|
product: [],
|
|
2320
2392
|
task: [],
|
|
@@ -2323,34 +2395,34 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2323
2395
|
representation: [],
|
|
2324
2396
|
unscoped: []
|
|
2325
2397
|
};
|
|
2326
|
-
if ("conditions" in
|
|
2327
|
-
const c = (
|
|
2328
|
-
Object.keys(
|
|
2329
|
-
const
|
|
2330
|
-
T.length > 0 && (T.length === 1 && !
|
|
2398
|
+
if ("conditions" in l && !("key" in l)) {
|
|
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({
|
|
2331
2403
|
conditions: T,
|
|
2332
|
-
operator:
|
|
2404
|
+
operator: l.operator
|
|
2333
2405
|
}));
|
|
2334
2406
|
});
|
|
2335
|
-
} else if ("key" in
|
|
2336
|
-
const { scope: c, cleanId:
|
|
2407
|
+
} else if ("key" in l) {
|
|
2408
|
+
const { scope: c, cleanId: E } = a(l.key);
|
|
2337
2409
|
if (c)
|
|
2338
|
-
|
|
2410
|
+
p[c].push({ ...l, key: E });
|
|
2339
2411
|
else {
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
}) :
|
|
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);
|
|
2344
2416
|
}
|
|
2345
2417
|
}
|
|
2346
|
-
return
|
|
2347
|
-
},
|
|
2348
|
-
return Object.keys(
|
|
2349
|
-
const
|
|
2350
|
-
|
|
2351
|
-
}),
|
|
2352
|
-
},
|
|
2353
|
-
const
|
|
2418
|
+
return p;
|
|
2419
|
+
}, u = (e.conditions || []).map((l) => o(l));
|
|
2420
|
+
return Object.keys(s).forEach((l) => {
|
|
2421
|
+
const p = l;
|
|
2422
|
+
s[p].conditions = u.flatMap((c) => c[p]);
|
|
2423
|
+
}), s;
|
|
2424
|
+
}, Vo = (e, t, n) => {
|
|
2425
|
+
const r = {
|
|
2354
2426
|
folder: [],
|
|
2355
2427
|
product: [],
|
|
2356
2428
|
task: [],
|
|
@@ -2360,26 +2432,26 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2360
2432
|
unscoped: []
|
|
2361
2433
|
};
|
|
2362
2434
|
if (!e || e.length === 0)
|
|
2363
|
-
return
|
|
2364
|
-
const
|
|
2365
|
-
const
|
|
2366
|
-
return
|
|
2435
|
+
return r;
|
|
2436
|
+
const s = (o) => t.find((l) => o.startsWith(`${l}_`)) || null, a = (o, u) => {
|
|
2437
|
+
const l = `${u}_`;
|
|
2438
|
+
return o.startsWith(l) ? o.substring(l.length) : o;
|
|
2367
2439
|
};
|
|
2368
|
-
return e.forEach((
|
|
2369
|
-
if (!
|
|
2370
|
-
const
|
|
2371
|
-
if (
|
|
2372
|
-
const
|
|
2373
|
-
...
|
|
2374
|
-
id:
|
|
2440
|
+
return e.forEach((o) => {
|
|
2441
|
+
if (!o.id) return;
|
|
2442
|
+
const u = s(o.id);
|
|
2443
|
+
if (u) {
|
|
2444
|
+
const l = {
|
|
2445
|
+
...o,
|
|
2446
|
+
id: a(o.id, u)
|
|
2375
2447
|
};
|
|
2376
|
-
|
|
2448
|
+
r[u].push(l);
|
|
2377
2449
|
} else {
|
|
2378
|
-
const
|
|
2379
|
-
|
|
2450
|
+
const l = n?.[o.id];
|
|
2451
|
+
l ? r[l].push(o) : r.unscoped.push(o);
|
|
2380
2452
|
}
|
|
2381
|
-
}),
|
|
2382
|
-
}, ce = ["status", "tags", "attributes", "createdAt", "updatedAt"],
|
|
2453
|
+
}), r;
|
|
2454
|
+
}, ce = ["status", "tags", "attributes", "createdAt", "updatedAt"], oa = {
|
|
2383
2455
|
folder: [...ce, "name", "folderType"],
|
|
2384
2456
|
task: [...ce, "name", "taskType", "folderType", "assignees"],
|
|
2385
2457
|
version: [
|
|
@@ -2396,208 +2468,215 @@ const Ue = 500, Bs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xa = ({
|
|
|
2396
2468
|
product: [...ce, "productName", "productBaseType"],
|
|
2397
2469
|
representation: [...ce, "name", "extension"],
|
|
2398
2470
|
user: [...ce]
|
|
2399
|
-
},
|
|
2471
|
+
}, xo = (e, t) => e.map((n) => ({
|
|
2400
2472
|
scope: n,
|
|
2401
|
-
filterTypes:
|
|
2473
|
+
filterTypes: oa[n].filter((r) => !t?.[n]?.includes(r))
|
|
2402
2474
|
}));
|
|
2403
2475
|
export {
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
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
|
-
nn as
|
|
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
|
-
|
|
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
|
|
2603
2682
|
};
|