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