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