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