@ynput/ayon-frontend-shared 0.6.5 → 0.6.7
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 +3 -3
- package/dist/NewEntity.es.js +15 -15
- package/dist/ProjectTreeTable.es.js +430 -433
- package/dist/Slicer.es.js +11 -11
- package/dist/Views.es.js +213 -206
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
- package/dist/chunks/EntityPath.es.js +2 -2
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +958 -931
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +169 -167
- package/dist/chunks/MenuItem.es.js +109 -74
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +127 -127
- package/dist/chunks/ReviewablesSelector.es.js +199 -196
- package/dist/chunks/SimpleForm.es.js +78 -75
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +22 -22
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +2 -2
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +19 -19
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getUris.es.js +926 -964
- package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
- package/dist/chunks/searchTerms.es.js +1 -0
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/components.es.js +202 -200
- package/dist/context.es.js +521 -492
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -5
- package/dist/types/Slicer.d.ts +1 -1
- package/dist/types/Views.d.ts +13 -2
- package/dist/types/api.d.ts +203 -1175
- package/dist/types/components.d.ts +14 -3
- package/dist/types/context.d.ts +3 -2
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +11 -1
- package/dist/util.es.js +44 -41
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ad as
|
|
1
|
+
import { ad as es, aL as Se, aF as L, ae as Ne, a5 as D, bj as Ps, az as Q, av as yt, be as F, a as Ls, bi as js, aH as Fs, aA as M, aq as ue, af as Pe, ag as _s, ai as Rs, aj as Gs, al as Cs, bd as Ns, an as Qs, aB as Ms, aD as Vs, b9 as ts, aI as Ds, aK as Os, aM as X, aO as $s, aP as at, aQ as xs, a9 as ce, ar as Us, ba as Bs, bb as qs, aS as Hs } from "./searchTerms.es.js";
|
|
2
2
|
import "lodash";
|
|
3
3
|
import "primereact/confirmdialog";
|
|
4
|
-
import { toast as
|
|
5
|
-
import { v4 as
|
|
6
|
-
import { R as
|
|
7
|
-
import "react";
|
|
8
|
-
import { current as
|
|
9
|
-
const Oe =
|
|
4
|
+
import { toast as ss } from "react-toastify";
|
|
5
|
+
import { v4 as Ws } from "uuid";
|
|
6
|
+
import { R as zs, D as Ks, j as H, c as U, i as pe, d as De, a as ie, w as J, h as He, g as ns } from "./realtimeUpdatesUtils.es.js";
|
|
7
|
+
import { useMemo as Js } from "react";
|
|
8
|
+
import { current as Ys } from "@reduxjs/toolkit";
|
|
9
|
+
const Oe = es.injectEndpoints({
|
|
10
10
|
endpoints: (t) => ({
|
|
11
11
|
getProjectsAccess: t.query({
|
|
12
12
|
async queryFn({ projects: e = [] }, { dispatch: s, forced: n }) {
|
|
@@ -60,12 +60,12 @@ Oe.enhanceEndpoints({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const {
|
|
63
|
-
useGetStudioAccessGroupsQuery:
|
|
64
|
-
useGetAccessGroupsQuery:
|
|
65
|
-
useGetAccessGroupQuery:
|
|
66
|
-
useGetAccessGroupSchemaQuery:
|
|
67
|
-
useGetProjectsAccessQuery:
|
|
68
|
-
} = Oe,
|
|
63
|
+
useGetStudioAccessGroupsQuery: Fr,
|
|
64
|
+
useGetAccessGroupsQuery: _r,
|
|
65
|
+
useGetAccessGroupQuery: Rr,
|
|
66
|
+
useGetAccessGroupSchemaQuery: Gr,
|
|
67
|
+
useGetProjectsAccessQuery: Cr
|
|
68
|
+
} = Oe, Xs = Oe.enhanceEndpoints({
|
|
69
69
|
endpoints: {
|
|
70
70
|
setProjectsAccess: {
|
|
71
71
|
async onQueryStarted({ payload: t }, { dispatch: e, queryFulfilled: s }) {
|
|
@@ -117,15 +117,15 @@ const {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}), {
|
|
120
|
-
useSetProjectsAccessMutation:
|
|
121
|
-
useSaveAccessGroupMutation:
|
|
122
|
-
useDeleteAccessGroupMutation:
|
|
123
|
-
} =
|
|
120
|
+
useSetProjectsAccessMutation: Nr,
|
|
121
|
+
useSaveAccessGroupMutation: Qr,
|
|
122
|
+
useDeleteAccessGroupMutation: Mr
|
|
123
|
+
} = Xs, Zs = Ne.enhanceEndpoints({
|
|
124
124
|
endpoints: {
|
|
125
125
|
executeAction: {},
|
|
126
126
|
listAvailableActionsForContext: {}
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), en = Zs.injectEndpoints({
|
|
129
129
|
endpoints: (t) => ({
|
|
130
130
|
getActionsFromContext: t.query({
|
|
131
131
|
queryFn: async (e, { dispatch: s }) => {
|
|
@@ -157,30 +157,30 @@ const {
|
|
|
157
157
|
// End of endpoints
|
|
158
158
|
})
|
|
159
159
|
}), {
|
|
160
|
-
useGetActionsFromContextQuery:
|
|
161
|
-
useLazyGetActionsFromContextQuery:
|
|
162
|
-
useExecuteActionMutation:
|
|
163
|
-
useGetActionConfigQuery:
|
|
164
|
-
useSetActionConfigMutation:
|
|
165
|
-
} =
|
|
160
|
+
useGetActionsFromContextQuery: Vr,
|
|
161
|
+
useLazyGetActionsFromContextQuery: Dr,
|
|
162
|
+
useExecuteActionMutation: Or,
|
|
163
|
+
useGetActionConfigQuery: $r,
|
|
164
|
+
useSetActionConfigMutation: xr
|
|
165
|
+
} = en, tn = (t, e) => e.split(".").reduce((s, n) => s && s[n] !== void 0 ? s[n] : void 0, t), sn = (t, e) => {
|
|
166
166
|
const s = e.split("."), n = s.pop(), i = s.reduce((r, a) => r && r[a] !== void 0 ? r[a] : void 0, t);
|
|
167
167
|
i && n && delete i[n];
|
|
168
168
|
};
|
|
169
|
-
function
|
|
169
|
+
function nn(t, e) {
|
|
170
170
|
const s = { ...t };
|
|
171
171
|
for (const [n, i] of Object.entries(e)) {
|
|
172
|
-
const r =
|
|
173
|
-
r !== void 0 && (s[i] = r,
|
|
172
|
+
const r = tn(s, n);
|
|
173
|
+
r !== void 0 && (s[i] = r, sn(s, n));
|
|
174
174
|
}
|
|
175
175
|
return s;
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const It = (t = [], e) => {
|
|
178
178
|
const s = [];
|
|
179
179
|
return t.forEach((n) => {
|
|
180
180
|
const i = n.node;
|
|
181
181
|
if (!i)
|
|
182
182
|
return;
|
|
183
|
-
const r = i, c =
|
|
183
|
+
const r = i, c = nn(
|
|
184
184
|
r,
|
|
185
185
|
{
|
|
186
186
|
"author.name": "authorName",
|
|
@@ -196,7 +196,7 @@ const bt = (t = [], e) => {
|
|
|
196
196
|
}
|
|
197
197
|
s.push(c);
|
|
198
198
|
}), { activities: s, pageInfo: e };
|
|
199
|
-
},
|
|
199
|
+
}, rn = (t) => {
|
|
200
200
|
const {
|
|
201
201
|
id: e,
|
|
202
202
|
label: s,
|
|
@@ -223,7 +223,7 @@ const bt = (t = [], e) => {
|
|
|
223
223
|
users: c?.map((p) => ({ name: p, avatarUrl: `/api/users/${p}/avatar` })) || [],
|
|
224
224
|
path: o?.path.split("/").splice(-2, 1).join("")
|
|
225
225
|
};
|
|
226
|
-
},
|
|
226
|
+
}, an = (t) => {
|
|
227
227
|
const { id: e, name: s, status: n, thumbnailId: i, author: r, updatedAt: a, product: c } = t;
|
|
228
228
|
return {
|
|
229
229
|
id: e,
|
|
@@ -238,7 +238,7 @@ const bt = (t = [], e) => {
|
|
|
238
238
|
productType: c?.productType,
|
|
239
239
|
path: c?.folder?.path?.split("/").pop()
|
|
240
240
|
};
|
|
241
|
-
},
|
|
241
|
+
}, on = (t) => {
|
|
242
242
|
const { id: e, name: s, label: n, status: i, thumbnailId: r, thumbnailHash: a, updatedAt: c, folderType: d, parents: u } = t || {};
|
|
243
243
|
return {
|
|
244
244
|
id: e,
|
|
@@ -254,7 +254,7 @@ const bt = (t = [], e) => {
|
|
|
254
254
|
users: [],
|
|
255
255
|
path: u?.[u.length - 2]
|
|
256
256
|
};
|
|
257
|
-
},
|
|
257
|
+
}, cn = (t) => {
|
|
258
258
|
const { id: e, name: s, status: n, thumbnailId: i, thumbnailHash: r, updatedAt: a, task: c } = t || {};
|
|
259
259
|
return {
|
|
260
260
|
id: e,
|
|
@@ -270,20 +270,20 @@ const bt = (t = [], e) => {
|
|
|
270
270
|
users: [],
|
|
271
271
|
path: c?.folder?.path?.split("/").pop()
|
|
272
272
|
};
|
|
273
|
-
},
|
|
273
|
+
}, dn = (t, e) => {
|
|
274
274
|
switch (e) {
|
|
275
275
|
case "task":
|
|
276
|
-
return
|
|
276
|
+
return rn(t.task);
|
|
277
277
|
case "version":
|
|
278
|
-
return
|
|
278
|
+
return an(t.version);
|
|
279
279
|
case "folder":
|
|
280
|
-
return
|
|
280
|
+
return on(t.folder);
|
|
281
281
|
case "workfile":
|
|
282
|
-
return
|
|
282
|
+
return cn(t.workfile);
|
|
283
283
|
default:
|
|
284
284
|
return {};
|
|
285
285
|
}
|
|
286
|
-
},
|
|
286
|
+
}, un = (t) => {
|
|
287
287
|
const e = t?.project?.activities?.edges?.map((a) => a?.node), s = e.map((a) => a.body), n = e.map((a) => a.activityId), i = s.reduce((a, c) => {
|
|
288
288
|
if (!c) return a;
|
|
289
289
|
const d = c.match(/\*\s\[\s\]/g);
|
|
@@ -294,21 +294,21 @@ const bt = (t = [], e) => {
|
|
|
294
294
|
return a + (d ? d.length : 0);
|
|
295
295
|
}, 0);
|
|
296
296
|
return { total: i + r, checked: r, unChecked: i, ids: n };
|
|
297
|
-
},
|
|
297
|
+
}, ln = (t, e = "task", s = "task") => t?.length ? [
|
|
298
298
|
...t.map(({ id: n }) => ({ type: e, id: n })),
|
|
299
299
|
{ type: e, id: s.toUpperCase() + "S" },
|
|
300
300
|
{
|
|
301
301
|
type: `kanBan${s.charAt(0).toUpperCase() + s.slice(1)}`,
|
|
302
302
|
id: s.toUpperCase() + "S"
|
|
303
303
|
}
|
|
304
|
-
] : [{ type: e, id: s.toUpperCase() + "S" }],
|
|
304
|
+
] : [{ type: e, id: s.toUpperCase() + "S" }], is = (t) => {
|
|
305
305
|
if (typeof t == "string") return t;
|
|
306
306
|
try {
|
|
307
307
|
return JSON.stringify(t) ?? "";
|
|
308
308
|
} catch {
|
|
309
309
|
return "";
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, rs = (t, e, s) => {
|
|
312
312
|
if (!t)
|
|
313
313
|
return [{ type: "activity", id: "LIST" }];
|
|
314
314
|
const { entityIds: n, activityTypes: i, filter: r } = s, a = (o) => (Array.isArray(o) ? o : [o]).filter(Boolean), c = a(n), d = a(i), u = t.pages ? t.pages.flatMap((o) => o.activities) : t.activities || [];
|
|
@@ -324,7 +324,7 @@ const bt = (t = [], e) => {
|
|
|
324
324
|
// Filtered Entity Activity Tags
|
|
325
325
|
...c.map((o) => ({
|
|
326
326
|
type: "entityActivities",
|
|
327
|
-
id: `${o}-${
|
|
327
|
+
id: `${o}-${is(r)}`
|
|
328
328
|
})),
|
|
329
329
|
// Published Version Tags
|
|
330
330
|
...u.filter((o) => o.activityType === "version.publish").map((o) => ({
|
|
@@ -355,7 +355,7 @@ const bt = (t = [], e) => {
|
|
|
355
355
|
"subtype.change"
|
|
356
356
|
],
|
|
357
357
|
checklists: ["checklist"]
|
|
358
|
-
},
|
|
358
|
+
}, Ur = (t) => {
|
|
359
359
|
if (typeof t == "string")
|
|
360
360
|
return t in se ? se[t] : null;
|
|
361
361
|
if (t && typeof t == "object" && t.conditions) {
|
|
@@ -366,7 +366,7 @@ const bt = (t = [], e) => {
|
|
|
366
366
|
}), s ? Array.from(new Set(e)) : se.activity;
|
|
367
367
|
}
|
|
368
368
|
return se.activity;
|
|
369
|
-
},
|
|
369
|
+
}, pn = (t) => {
|
|
370
370
|
switch (t) {
|
|
371
371
|
case "task":
|
|
372
372
|
return `
|
|
@@ -410,7 +410,7 @@ const bt = (t = [], e) => {
|
|
|
410
410
|
default:
|
|
411
411
|
return "";
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, fn = (t) => `
|
|
414
414
|
query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
415
415
|
project(name: $projectName) {
|
|
416
416
|
${t}(id: $entityId) {
|
|
@@ -420,15 +420,15 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
420
420
|
thumbnailId
|
|
421
421
|
updatedAt
|
|
422
422
|
thumbnailHash
|
|
423
|
-
${
|
|
423
|
+
${pn(t)}
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
`,
|
|
427
|
+
`, yn = (t) => t.replace(/_([a-z0-9])/g, (e, s) => s.toUpperCase()), Tt = {
|
|
428
428
|
task_type: "subType",
|
|
429
429
|
folder_type: "subType",
|
|
430
430
|
product_type: "subType"
|
|
431
|
-
}, fe = (t) => t in
|
|
431
|
+
}, fe = (t) => t in Tt ? Tt[t] : t.startsWith("project_attributes_") ? "attrib_" + t.slice(19) : t.startsWith("inherited_attributes_") ? "attrib_" + t.slice(21) : t.startsWith("attrib_") ? t : yn(t), gn = (t) => {
|
|
432
432
|
if (Array.isArray(t)) return t;
|
|
433
433
|
if (typeof t == "string") {
|
|
434
434
|
const e = t.trim();
|
|
@@ -440,7 +440,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
return [t];
|
|
443
|
-
},
|
|
443
|
+
}, hn = (t) => {
|
|
444
444
|
if (t == null) return;
|
|
445
445
|
let e = t;
|
|
446
446
|
if (typeof e == "string")
|
|
@@ -453,7 +453,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
453
453
|
const s = /* @__PURE__ */ new Map();
|
|
454
454
|
for (const n of e) {
|
|
455
455
|
if (!n || n.value == null) continue;
|
|
456
|
-
const i =
|
|
456
|
+
const i = gn(n.value);
|
|
457
457
|
for (const r of i) {
|
|
458
458
|
const a = String(r), c = s.get(a);
|
|
459
459
|
s.set(a, { ...n, value: a, count: (c?.count ?? 0) + (Number(n.count) || 0) });
|
|
@@ -466,7 +466,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
466
466
|
value: s,
|
|
467
467
|
count: Number(n) || 0
|
|
468
468
|
}));
|
|
469
|
-
}, ge = (t, e) => t == null && e == null ? void 0 : (t ?? 0) + (e ?? 0),
|
|
469
|
+
}, ge = (t, e) => t == null && e == null ? void 0 : (t ?? 0) + (e ?? 0), mn = (t, e) => t == null ? e ?? void 0 : e == null || t < e ? t : e, vn = (t, e) => t == null ? e ?? void 0 : e == null || t > e ? t : e, Le = (t, e) => t != null && e != null && t + e > 0 ? Math.round(t / (t + e) * 1e4) / 100 : void 0, bn = (t, e) => {
|
|
470
470
|
const s = ge(t.valueFilledCount, e.valueFilledCount), n = ge(t.valueNotFilledCount, e.valueNotFilledCount), i = ge(t.checkedCount, e.checkedCount), r = ge(t.notCheckedCount, e.notCheckedCount);
|
|
471
471
|
let a;
|
|
472
472
|
if (t.avg != null && e.avg != null) {
|
|
@@ -485,8 +485,8 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
485
485
|
}
|
|
486
486
|
return {
|
|
487
487
|
columnName: t.columnName,
|
|
488
|
-
min:
|
|
489
|
-
max:
|
|
488
|
+
min: mn(t.min, e.min),
|
|
489
|
+
max: vn(t.max, e.max),
|
|
490
490
|
avg: a,
|
|
491
491
|
sum: ge(t.sum, e.sum),
|
|
492
492
|
valueFilledCount: s,
|
|
@@ -504,8 +504,8 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
504
504
|
}, ke = (t) => t.map((e) => ({
|
|
505
505
|
...e,
|
|
506
506
|
columnName: fe(e.columnName),
|
|
507
|
-
distribution:
|
|
508
|
-
})),
|
|
507
|
+
distribution: hn(e.distribution)
|
|
508
|
+
})), we = (t = [], e = []) => {
|
|
509
509
|
const s = /* @__PURE__ */ new Map();
|
|
510
510
|
for (const n of e) s.set(fe(n.columnName), { ...n });
|
|
511
511
|
for (const n of t) {
|
|
@@ -515,20 +515,20 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
515
515
|
s.set(i, r);
|
|
516
516
|
}
|
|
517
517
|
return [...s.values()];
|
|
518
|
-
},
|
|
518
|
+
}, Br = (t) => t.reduce(
|
|
519
519
|
(e, s) => Math.max(e, (s.valueFilledCount ?? 0) + (s.valueNotFilledCount ?? 0)),
|
|
520
520
|
0
|
|
521
|
-
),
|
|
521
|
+
), qr = (t, e = []) => {
|
|
522
522
|
const s = /* @__PURE__ */ new Map();
|
|
523
523
|
for (const i of t) s.set(fe(i.columnName), i);
|
|
524
524
|
const n = new Map(s);
|
|
525
525
|
for (const i of e) {
|
|
526
526
|
const r = fe(i.columnName), a = s.get(r);
|
|
527
|
-
n.set(r, a ?
|
|
527
|
+
n.set(r, a ? bn(a, i) : i);
|
|
528
528
|
}
|
|
529
529
|
return [...n.values()];
|
|
530
|
-
},
|
|
531
|
-
if (
|
|
530
|
+
}, as = [zs, Ks], os = (t, e, s) => {
|
|
531
|
+
if (as.includes(e))
|
|
532
532
|
return !0;
|
|
533
533
|
if (t[e] !== void 0 && t[e] !== null)
|
|
534
534
|
return t[e];
|
|
@@ -551,32 +551,32 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
551
551
|
return s[r];
|
|
552
552
|
}
|
|
553
553
|
return !1;
|
|
554
|
-
},
|
|
555
|
-
(n) => !
|
|
554
|
+
}, Hr = (t, e) => e.filter(
|
|
555
|
+
(n) => !as.includes(n) && t[n]
|
|
556
556
|
).length === 0 && e.includes("name") ? {
|
|
557
557
|
...t,
|
|
558
558
|
name: !0
|
|
559
|
-
} : t,
|
|
559
|
+
} : t, kt = (t) => {
|
|
560
560
|
const e = t?.targets;
|
|
561
561
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
562
562
|
}, ot = (t, e, s) => {
|
|
563
563
|
const n = e?.[t], i = s?.[t];
|
|
564
564
|
return n === "none" || i === "none" ? !1 : n != null || i != null;
|
|
565
|
-
},
|
|
565
|
+
}, In = (t, e, s, n) => {
|
|
566
566
|
const i = /* @__PURE__ */ new Set([
|
|
567
567
|
...Object.keys(t ?? {}),
|
|
568
568
|
...Object.keys(e ?? {})
|
|
569
569
|
]);
|
|
570
570
|
for (const r of i)
|
|
571
|
-
if (!(s && !
|
|
571
|
+
if (!(s && !os(s, r, n)) && ot(r, t, e))
|
|
572
572
|
return !0;
|
|
573
573
|
return !1;
|
|
574
|
-
},
|
|
574
|
+
}, Wr = (t, e, s, n) => e?.name === "none" && !In(t, e, s, n), Ae = (t, e) => {
|
|
575
575
|
if (!t) return !1;
|
|
576
576
|
if (!e) return !0;
|
|
577
|
-
const s = new Set(
|
|
578
|
-
return
|
|
579
|
-
}, We = [D.Filled, D.NotFilled],
|
|
577
|
+
const s = new Set(kt(e).map((n) => n.field));
|
|
578
|
+
return kt(t).some((n) => !s.has(n.field));
|
|
579
|
+
}, We = [D.Filled, D.NotFilled], Tn = [
|
|
580
580
|
D.Min,
|
|
581
581
|
D.Max,
|
|
582
582
|
D.Avg,
|
|
@@ -587,12 +587,12 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
587
587
|
D.Filled,
|
|
588
588
|
D.NotFilled,
|
|
589
589
|
D.Distribution
|
|
590
|
-
],
|
|
590
|
+
], kn = {
|
|
591
591
|
folder: "folder_type",
|
|
592
592
|
task: "task_type",
|
|
593
593
|
product: "product_type",
|
|
594
594
|
version: null
|
|
595
|
-
},
|
|
595
|
+
}, zr = ({
|
|
596
596
|
entity: t,
|
|
597
597
|
attribs: e,
|
|
598
598
|
columnVisibility: s,
|
|
@@ -601,9 +601,9 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
601
601
|
columnSummaryScopes: r,
|
|
602
602
|
extraFields: a = []
|
|
603
603
|
}) => {
|
|
604
|
-
const c = (y) =>
|
|
604
|
+
const c = (y) => os(s, y, n), d = (y) => c(y) && ot(y, i, r), u = [];
|
|
605
605
|
t === "version" ? u.push({ field: "status", aggregations: d("status") ? Y : We }) : (u.push({ field: "name", aggregations: We }), d("status") && u.push({ field: "status", aggregations: Y })), d("tags") && u.push({ field: "tags", aggregations: Y }), t === "task" && d("assignees") && u.push({ field: "assignees", aggregations: Y });
|
|
606
|
-
const o = r?.name ?? "all", l = ["folder", "product"].includes(t) ? o === "all" || o === "primary" : o === "all" || o === "secondary", p = i?.name === "breakdown" && ot("name", i, r) && l, f =
|
|
606
|
+
const o = r?.name ?? "all", l = ["folder", "product"].includes(t) ? o === "all" || o === "primary" : o === "all" || o === "secondary", p = i?.name === "breakdown" && ot("name", i, r) && l, f = kn[t];
|
|
607
607
|
f && (d("subType") || p) && u.push({ field: f, aggregations: Y });
|
|
608
608
|
for (const y of a)
|
|
609
609
|
u.push({ field: y, aggregations: Y });
|
|
@@ -612,38 +612,38 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
612
612
|
let h = `attrib.${y.name}`;
|
|
613
613
|
["folder", "task"].includes(t) && (h = `inherited_attributes.${y.name}`);
|
|
614
614
|
const g = y.data?.type;
|
|
615
|
-
g === "integer" || g === "float" ? u.push({ field: h, aggregations:
|
|
615
|
+
g === "integer" || g === "float" ? u.push({ field: h, aggregations: Tn }) : g === "string" ? u.push({ field: h, aggregations: Ps(y.data) ? Y : We }) : (g === "list_of_strings" || g === "list_of_integers") && u.push({ field: h, aggregations: Y });
|
|
616
616
|
}
|
|
617
617
|
return u;
|
|
618
|
-
},
|
|
618
|
+
}, wt = [
|
|
619
619
|
D.Distribution,
|
|
620
620
|
D.Filled,
|
|
621
621
|
D.NotFilled
|
|
622
|
-
],
|
|
622
|
+
], wn = {
|
|
623
623
|
status: "status",
|
|
624
624
|
assignees: "assignees",
|
|
625
625
|
tags: "tags",
|
|
626
626
|
taskType: "task_type"
|
|
627
|
-
},
|
|
627
|
+
}, An = {
|
|
628
628
|
status: "status",
|
|
629
629
|
tags: "tags",
|
|
630
630
|
author: "author",
|
|
631
631
|
productType: "product_type"
|
|
632
|
-
},
|
|
633
|
-
const n = (e === "version" || e === "product" ?
|
|
634
|
-
if (n) return { field: n, aggregations:
|
|
632
|
+
}, Kr = (t, e) => {
|
|
633
|
+
const n = (e === "version" || e === "product" ? An : wn)[t.id];
|
|
634
|
+
if (n) return { field: n, aggregations: wt };
|
|
635
635
|
if (t.id.startsWith("attrib.")) {
|
|
636
636
|
const i = t.id.slice(7);
|
|
637
|
-
return { field: e === "task" || e === "folder" ? `inherited_attributes.${i}` : `attrib.${i}`, aggregations:
|
|
637
|
+
return { field: e === "task" || e === "folder" ? `inherited_attributes.${i}` : `attrib.${i}`, aggregations: wt };
|
|
638
638
|
}
|
|
639
639
|
return null;
|
|
640
|
-
},
|
|
640
|
+
}, En = (t) => {
|
|
641
641
|
const e = t.indexOf(".");
|
|
642
642
|
return e !== -1 ? "attrib_" + t.slice(e + 1) : fe(t);
|
|
643
|
-
},
|
|
643
|
+
}, Jr = (t, e) => {
|
|
644
644
|
const s = /* @__PURE__ */ new Map(), n = { count: 0, percentage: 0 };
|
|
645
645
|
if (!e) return { counts: s, total: 0, ungrouped: n, complete: !1 };
|
|
646
|
-
const i =
|
|
646
|
+
const i = En(e.field), r = t.find((f) => f.columnName === i), a = r?.distribution || [], c = r?.valueNotFilledCount ?? 0, d = r?.valueFilledCount ?? 0, u = !!r && (a.length > 0 || d === 0), o = a.reduce((f, y) => f + (y.count || 0), 0), l = d ? d + c : o + c;
|
|
647
647
|
for (const f of a) {
|
|
648
648
|
const y = f.count || 0, h = l > 0 ? Math.round(y / l * 100) : 0;
|
|
649
649
|
s.set(String(f.value), { count: y, percentage: h });
|
|
@@ -661,7 +661,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
661
661
|
} catch {
|
|
662
662
|
return {};
|
|
663
663
|
}
|
|
664
|
-
},
|
|
664
|
+
}, Yr = R, At = (t) => {
|
|
665
665
|
if (!t.project)
|
|
666
666
|
return [];
|
|
667
667
|
const e = [];
|
|
@@ -713,27 +713,27 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
713
713
|
GetFolderColumnStats: {
|
|
714
714
|
transformResponse: (t) => ke(t?.project?.folders?.fieldStats ?? []),
|
|
715
715
|
serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
|
|
716
|
-
merge: (t, e) =>
|
|
717
|
-
forceRefetch: ({ currentArg: t, previousArg: e }) =>
|
|
716
|
+
merge: (t, e) => we(e, t),
|
|
717
|
+
forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
|
|
718
718
|
providesTags: (t, e, { projectName: s }) => [{ type: "folderColumnStats", id: s }],
|
|
719
719
|
keepUnusedDataFor: Z
|
|
720
720
|
},
|
|
721
721
|
GetTaskColumnStats: {
|
|
722
722
|
transformResponse: (t) => ke(t?.project?.tasks?.fieldStats ?? []),
|
|
723
723
|
serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
|
|
724
|
-
merge: (t, e) =>
|
|
725
|
-
forceRefetch: ({ currentArg: t, previousArg: e }) =>
|
|
724
|
+
merge: (t, e) => we(e, t),
|
|
725
|
+
forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
|
|
726
726
|
providesTags: (t, e, { projectName: s }) => [{ type: "taskColumnStats", id: s }],
|
|
727
727
|
keepUnusedDataFor: Z
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), Sn = yt.enhanceEndpoints({
|
|
731
731
|
endpoints: {
|
|
732
732
|
searchFolders: {}
|
|
733
733
|
}
|
|
734
|
-
}), ze = 100, be = {}, Ke = (t, e, s, n, i) => JSON.stringify({ projectName: t, filter: e, folderFilter: s, search: n, showComments: i }),
|
|
734
|
+
}), ze = 100, be = {}, Ke = (t, e, s, n, i) => JSON.stringify({ projectName: t, filter: e, folderFilter: s, search: n, showComments: i }), Pn = (t, e) => {
|
|
735
735
|
be[t] || (be[t] = /* @__PURE__ */ new Set()), e.forEach((s) => be[t].add(s));
|
|
736
|
-
},
|
|
736
|
+
}, Et = (t) => be[t] || /* @__PURE__ */ new Set(), x = re.injectEndpoints({
|
|
737
737
|
endpoints: (t) => ({
|
|
738
738
|
// Each project has one cache for all the tasks of the expanded folders
|
|
739
739
|
// Changing the expanded folders will trigger a refetch but not a new cache
|
|
@@ -745,7 +745,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
745
745
|
try {
|
|
746
746
|
const o = d(), l = { projectName: e, filter: n, folderFilter: i, search: r, showComments: a }, f = x.endpoints.getOverviewTasksByFolders.select(
|
|
747
747
|
l
|
|
748
|
-
)(o)?.data || [], y = Ke(e, n, i, r, a), h =
|
|
748
|
+
)(o)?.data || [], y = Ke(e, n, i, r, a), h = Et(y), g = u ? s : s.filter((E) => !h.has(E));
|
|
749
749
|
if (g.length === 0)
|
|
750
750
|
return { data: f };
|
|
751
751
|
const m = [], v = 100, b = 20, I = 10, k = 1e3, T = v * b;
|
|
@@ -783,10 +783,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
783
783
|
S = C?.hasNextPage || !1, j = C?.endCursor || void 0;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
|
|
787
|
-
const
|
|
786
|
+
Pn(y, g);
|
|
787
|
+
const w = [...f, ...m], A = new Map(w.map((E) => [E.id, E]));
|
|
788
788
|
return {
|
|
789
|
-
data: Array.from(
|
|
789
|
+
data: Array.from(A.values())
|
|
790
790
|
};
|
|
791
791
|
} catch (o) {
|
|
792
792
|
return console.error(o), { error: L(o) };
|
|
@@ -805,17 +805,17 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
805
805
|
let p;
|
|
806
806
|
const y = U(
|
|
807
807
|
async (m, v) => {
|
|
808
|
-
const b =
|
|
808
|
+
const b = Et(
|
|
809
809
|
Ke(e, n, i, r, a)
|
|
810
810
|
), I = new Set(
|
|
811
|
-
l().data?.map((
|
|
811
|
+
l().data?.map((A) => A.id) || []
|
|
812
812
|
), k = /* @__PURE__ */ new Set(), T = [];
|
|
813
|
-
m.filter((
|
|
814
|
-
const E =
|
|
813
|
+
m.filter((A) => A.project === e).filter((A) => b.has(A.summary?.parentId)).forEach((A) => {
|
|
814
|
+
const E = A.summary?.entityId;
|
|
815
815
|
if (!E || !I.has(E)) return;
|
|
816
|
-
const P =
|
|
816
|
+
const P = A.topic?.split(".")[2]?.replace("_changed", ""), S = pe(
|
|
817
817
|
P,
|
|
818
|
-
|
|
818
|
+
A.summary,
|
|
819
819
|
De
|
|
820
820
|
);
|
|
821
821
|
S ? T.push({
|
|
@@ -823,21 +823,21 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
823
823
|
field: S.field,
|
|
824
824
|
value: S.value
|
|
825
825
|
}) : k.add(E);
|
|
826
|
-
}), T.length && u((
|
|
826
|
+
}), T.length && u((A) => {
|
|
827
827
|
T.forEach(({ taskId: E, field: P, value: S }) => {
|
|
828
|
-
const j =
|
|
828
|
+
const j = A.find((_) => _.id === E);
|
|
829
829
|
j && Object.assign(j, { [P === "type" ? "taskType" : P]: S });
|
|
830
830
|
});
|
|
831
831
|
});
|
|
832
|
-
const
|
|
833
|
-
if (!(!
|
|
832
|
+
const w = Array.from(k);
|
|
833
|
+
if (!(!w.length || w.length > ie))
|
|
834
834
|
try {
|
|
835
835
|
await J();
|
|
836
836
|
const E = (await o(
|
|
837
837
|
re.endpoints.GetTasksList.initiate(
|
|
838
838
|
{
|
|
839
839
|
projectName: e,
|
|
840
|
-
taskIds:
|
|
840
|
+
taskIds: w,
|
|
841
841
|
showComments: !!a
|
|
842
842
|
},
|
|
843
843
|
{ forceRefetch: !0 }
|
|
@@ -850,14 +850,14 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
850
850
|
const _ = S.findIndex((G) => G.id === j.id);
|
|
851
851
|
_ > -1 ? S[_] = j : S.push(j);
|
|
852
852
|
}
|
|
853
|
-
for (const j of
|
|
853
|
+
for (const j of w)
|
|
854
854
|
if (!P.has(j)) {
|
|
855
855
|
const _ = S.findIndex((G) => G.id === j);
|
|
856
856
|
_ > -1 && S.splice(_, 1);
|
|
857
857
|
}
|
|
858
858
|
});
|
|
859
|
-
} catch (
|
|
860
|
-
console.error("Realtime overview batch update failed",
|
|
859
|
+
} catch (A) {
|
|
860
|
+
console.error("Realtime overview batch update failed", A);
|
|
861
861
|
}
|
|
862
862
|
},
|
|
863
863
|
(m) => `${m.project ?? e}:${m.summary?.entityId}:${m.topic}`
|
|
@@ -896,7 +896,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
896
896
|
async queryFn({ projectName: e, folderSearchRequest: s }, { dispatch: n }) {
|
|
897
897
|
try {
|
|
898
898
|
const i = await n(
|
|
899
|
-
|
|
899
|
+
Sn.endpoints.searchFolders.initiate({
|
|
900
900
|
projectName: e,
|
|
901
901
|
folderSearchRequest: s
|
|
902
902
|
})
|
|
@@ -994,7 +994,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
994
994
|
}), h.length && i((m) => {
|
|
995
995
|
h.forEach(({ taskId: v, field: b, value: I }) => {
|
|
996
996
|
for (const k of m.pages) {
|
|
997
|
-
const T = k.tasks.find((
|
|
997
|
+
const T = k.tasks.find((w) => w.id === v);
|
|
998
998
|
if (T) {
|
|
999
999
|
Object.assign(T, { [b === "type" ? "taskType" : b]: I });
|
|
1000
1000
|
break;
|
|
@@ -1022,10 +1022,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1022
1022
|
i((I) => {
|
|
1023
1023
|
for (const k of v) {
|
|
1024
1024
|
let T = !1;
|
|
1025
|
-
for (const
|
|
1026
|
-
const
|
|
1027
|
-
if (
|
|
1028
|
-
|
|
1025
|
+
for (const w of I.pages) {
|
|
1026
|
+
const A = w.tasks.findIndex((E) => E.id === k.id);
|
|
1027
|
+
if (A !== -1) {
|
|
1028
|
+
w.tasks[A] = k, T = !0;
|
|
1029
1029
|
break;
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
@@ -1042,9 +1042,9 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1042
1042
|
for (const k of g)
|
|
1043
1043
|
if (!b.has(k))
|
|
1044
1044
|
for (const T of I.pages) {
|
|
1045
|
-
const
|
|
1046
|
-
if (
|
|
1047
|
-
T.tasks.splice(
|
|
1045
|
+
const w = T.tasks.findIndex((A) => A.id === k);
|
|
1046
|
+
if (w !== -1) {
|
|
1047
|
+
T.tasks.splice(w, 1);
|
|
1048
1048
|
break;
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
@@ -1104,10 +1104,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1104
1104
|
let m = h.filter, v = i;
|
|
1105
1105
|
if (h.filter)
|
|
1106
1106
|
try {
|
|
1107
|
-
const k = JSON.parse(h.filter), T = k.conditions || [],
|
|
1108
|
-
if (
|
|
1109
|
-
m =
|
|
1110
|
-
const E = i ? JSON.parse(i) : null, S = [...E && Array.isArray(E.conditions) ? E.conditions : [], ...
|
|
1107
|
+
const k = JSON.parse(h.filter), T = k.conditions || [], w = T.filter((E) => !p.has(E.key)), A = T.filter((E) => p.has(E.key));
|
|
1108
|
+
if (A.length > 0) {
|
|
1109
|
+
m = w.length ? JSON.stringify({ ...k, conditions: w }) : void 0;
|
|
1110
|
+
const E = i ? JSON.parse(i) : null, S = [...E && Array.isArray(E.conditions) ? E.conditions : [], ...A];
|
|
1111
1111
|
v = JSON.stringify(
|
|
1112
1112
|
E ? { ...E, conditions: S } : { conditions: S }
|
|
1113
1113
|
);
|
|
@@ -1160,15 +1160,15 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1160
1160
|
})
|
|
1161
1161
|
})
|
|
1162
1162
|
}), {
|
|
1163
|
-
useGetOverviewTasksByFoldersQuery:
|
|
1164
|
-
useGetSearchFoldersQuery:
|
|
1165
|
-
useGetTasksListQuery:
|
|
1166
|
-
useGetTasksListInfiniteInfiniteQuery:
|
|
1167
|
-
useLazyGetTasksByParentQuery:
|
|
1168
|
-
useGetGroupedTasksListQuery:
|
|
1169
|
-
useGetFolderColumnStatsQuery:
|
|
1170
|
-
useGetTaskColumnStatsQuery:
|
|
1171
|
-
} = x,
|
|
1163
|
+
useGetOverviewTasksByFoldersQuery: Xr,
|
|
1164
|
+
useGetSearchFoldersQuery: Zr,
|
|
1165
|
+
useGetTasksListQuery: ea,
|
|
1166
|
+
useGetTasksListInfiniteInfiniteQuery: ta,
|
|
1167
|
+
useLazyGetTasksByParentQuery: sa,
|
|
1168
|
+
useGetGroupedTasksListQuery: na,
|
|
1169
|
+
useGetFolderColumnStatsQuery: ia,
|
|
1170
|
+
useGetTaskColumnStatsQuery: ra
|
|
1171
|
+
} = x, Ln = Q.enhanceEndpoints({
|
|
1172
1172
|
endpoints: {
|
|
1173
1173
|
GetUpdatedAndNewFolders: {
|
|
1174
1174
|
transformResponse: (t) => t.project.folders.edges.map(({ node: e }) => ({
|
|
@@ -1183,7 +1183,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1183
1183
|
}))
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
|
-
}),
|
|
1186
|
+
}), jn = ie, $e = yt.enhanceEndpoints({
|
|
1187
1187
|
endpoints: {
|
|
1188
1188
|
getFolderHierarchy: {
|
|
1189
1189
|
providesTags: ["hierarchy"]
|
|
@@ -1207,64 +1207,64 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1207
1207
|
async (y, h) => {
|
|
1208
1208
|
if (!a) return;
|
|
1209
1209
|
const g = /* @__PURE__ */ new Set(), m = i().data;
|
|
1210
|
-
m && Array.isArray(m.folders) && m.folders.forEach((
|
|
1210
|
+
m && Array.isArray(m.folders) && m.folders.forEach((w) => g.add(w.id));
|
|
1211
1211
|
const v = [], b = [], I = /* @__PURE__ */ new Map(), k = [];
|
|
1212
|
-
y.forEach((
|
|
1213
|
-
const
|
|
1214
|
-
if (!
|
|
1215
|
-
if (
|
|
1216
|
-
v.push(
|
|
1212
|
+
y.forEach((w) => {
|
|
1213
|
+
const A = w.summary?.entityId;
|
|
1214
|
+
if (!A) return;
|
|
1215
|
+
if (w.topic === "entity.folder.deleted") {
|
|
1216
|
+
v.push(A);
|
|
1217
1217
|
return;
|
|
1218
1218
|
}
|
|
1219
|
-
if (
|
|
1220
|
-
b.push(
|
|
1219
|
+
if (w.topic === "entity.folder.created") {
|
|
1220
|
+
b.push(A);
|
|
1221
1221
|
return;
|
|
1222
1222
|
}
|
|
1223
|
-
if (!g.has(
|
|
1223
|
+
if (!g.has(A)) return;
|
|
1224
1224
|
const E = pe(
|
|
1225
|
-
d[
|
|
1226
|
-
|
|
1225
|
+
d[w.topic],
|
|
1226
|
+
w.summary,
|
|
1227
1227
|
c
|
|
1228
1228
|
);
|
|
1229
|
-
if (E) k.push({ folderId:
|
|
1229
|
+
if (E) k.push({ folderId: A, ...E });
|
|
1230
1230
|
else {
|
|
1231
|
-
const P = d[
|
|
1231
|
+
const P = d[w.topic];
|
|
1232
1232
|
if (!P) return;
|
|
1233
|
-
const S = I.get(
|
|
1234
|
-
S.add(P), I.set(
|
|
1233
|
+
const S = I.get(A) || /* @__PURE__ */ new Set();
|
|
1234
|
+
S.add(P), I.set(A, S);
|
|
1235
1235
|
}
|
|
1236
|
-
}), v.length && n((
|
|
1237
|
-
!
|
|
1238
|
-
}), k.length && n((
|
|
1239
|
-
!
|
|
1240
|
-
const S =
|
|
1236
|
+
}), v.length && n((w) => {
|
|
1237
|
+
!w || !Array.isArray(w.folders) || (w.folders = w.folders.filter((A) => !v.includes(A.id)));
|
|
1238
|
+
}), k.length && n((w) => {
|
|
1239
|
+
!w || !Array.isArray(w.folders) || k.forEach(({ folderId: A, field: E, value: P }) => {
|
|
1240
|
+
const S = w.folders.find((j) => j.id === A);
|
|
1241
1241
|
S && (S[E] = P);
|
|
1242
1242
|
});
|
|
1243
1243
|
});
|
|
1244
1244
|
const T = [.../* @__PURE__ */ new Set([...b, ...I.keys()])];
|
|
1245
|
-
if (!(T.length >
|
|
1245
|
+
if (!(T.length > jn) && T.length) {
|
|
1246
1246
|
await J();
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1247
|
+
const w = await r(
|
|
1248
|
+
Ln.endpoints.GetUpdatedAndNewFolders.initiate({
|
|
1249
1249
|
projectName: a,
|
|
1250
1250
|
folderIds: T,
|
|
1251
1251
|
first: T.length
|
|
1252
1252
|
})
|
|
1253
1253
|
).unwrap().catch(() => []);
|
|
1254
1254
|
if (!h()) return;
|
|
1255
|
-
const
|
|
1255
|
+
const A = new Set(b);
|
|
1256
1256
|
n((E) => {
|
|
1257
1257
|
if (!E || !Array.isArray(E.folders)) return;
|
|
1258
1258
|
const P = new Map(
|
|
1259
|
-
|
|
1259
|
+
w.filter(Boolean).map((S) => [S.id, S])
|
|
1260
1260
|
);
|
|
1261
1261
|
E.folders.forEach((S, j) => {
|
|
1262
1262
|
const _ = P.get(S.id);
|
|
1263
|
-
_ && (
|
|
1263
|
+
_ && (A.has(S.id) ? E.folders[j] = { ...S, ..._ } : (I.get(S.id) || /* @__PURE__ */ new Set()).forEach((O) => {
|
|
1264
1264
|
S[O] = _[O];
|
|
1265
1265
|
}), P.delete(S.id));
|
|
1266
1266
|
}), P.forEach((S, j) => {
|
|
1267
|
-
|
|
1267
|
+
A.has(j) && E.folders.push(S);
|
|
1268
1268
|
});
|
|
1269
1269
|
});
|
|
1270
1270
|
}
|
|
@@ -1298,7 +1298,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
-
}), { useGetFolderHierarchyQuery:
|
|
1301
|
+
}), { useGetFolderHierarchyQuery: aa, useGetFolderListQuery: oa } = $e, Fn = Q.enhanceEndpoints({
|
|
1302
1302
|
endpoints: {
|
|
1303
1303
|
GetFolderDeleteInfo: {
|
|
1304
1304
|
transformResponse: (t) => (t?.project?.folders?.edges || []).map((s) => ({
|
|
@@ -1316,7 +1316,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1316
1316
|
] : [{ type: "folder", id: "DELETE_INFO" }]
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
}), { useGetFolderDeleteInfoQuery:
|
|
1319
|
+
}), { useGetFolderDeleteInfoQuery: ca, useLazyGetFolderDeleteInfoQuery: da } = Fn, _n = ["task", "version", "folder", "representation"], je = ({
|
|
1320
1320
|
entity: t,
|
|
1321
1321
|
entityType: e,
|
|
1322
1322
|
projectName: s
|
|
@@ -1492,7 +1492,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
-
}),
|
|
1495
|
+
}), St = (t) => {
|
|
1496
1496
|
switch (t) {
|
|
1497
1497
|
case "task":
|
|
1498
1498
|
return "GetDetailsPanelTask";
|
|
@@ -1507,11 +1507,11 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1507
1507
|
endpoints: (t) => ({
|
|
1508
1508
|
getEntitiesDetailsPanel: t.query({
|
|
1509
1509
|
async queryFn({ entities: e = [], entityType: s }, { dispatch: n }) {
|
|
1510
|
-
if (!
|
|
1510
|
+
if (!_n.includes(s))
|
|
1511
1511
|
return { error: L("Entity type not supported", 400) };
|
|
1512
1512
|
try {
|
|
1513
1513
|
const i = e.map((c) => n(
|
|
1514
|
-
Je.endpoints[
|
|
1514
|
+
Je.endpoints[St(s)].initiate(
|
|
1515
1515
|
{
|
|
1516
1516
|
projectName: c.projectName,
|
|
1517
1517
|
entityId: c.id
|
|
@@ -1534,10 +1534,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1534
1534
|
l.forEach(({ topic: b, message: I }) => {
|
|
1535
1535
|
const k = I.summary?.entityId, T = I.project;
|
|
1536
1536
|
if (!k || !T) return;
|
|
1537
|
-
const
|
|
1538
|
-
if (!y.has(
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1537
|
+
const w = `${T}:${k}`;
|
|
1538
|
+
if (!y.has(w)) return;
|
|
1539
|
+
const A = b.split(".")[2]?.replace("_changed", ""), E = pe(
|
|
1540
|
+
A,
|
|
1541
1541
|
I.summary,
|
|
1542
1542
|
De
|
|
1543
1543
|
);
|
|
@@ -1546,16 +1546,16 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1546
1546
|
projectName: T,
|
|
1547
1547
|
field: E.field,
|
|
1548
1548
|
value: E.value
|
|
1549
|
-
}) : h.set(
|
|
1549
|
+
}) : h.set(w, { id: k, projectName: T });
|
|
1550
1550
|
}), g.length && s((b) => {
|
|
1551
|
-
g.forEach(({ id: I, projectName: k, field: T, value:
|
|
1552
|
-
const
|
|
1551
|
+
g.forEach(({ id: I, projectName: k, field: T, value: w }) => {
|
|
1552
|
+
const A = b.find(
|
|
1553
1553
|
(E) => E.id === I && E.projectName === k
|
|
1554
1554
|
);
|
|
1555
|
-
|
|
1556
|
-
...T === "status" || T === "tags" ? { [T]:
|
|
1557
|
-
...T === "type" ? { entitySubType:
|
|
1558
|
-
}), T === "assignees" &&
|
|
1555
|
+
A && (Object.assign(A, {
|
|
1556
|
+
...T === "status" || T === "tags" ? { [T]: w } : {},
|
|
1557
|
+
...T === "type" ? { entitySubType: w } : {}
|
|
1558
|
+
}), T === "assignees" && A.task && (A.task.assignees = w), T === "type" && A.task && (A.task.taskType = w));
|
|
1559
1559
|
});
|
|
1560
1560
|
});
|
|
1561
1561
|
const m = Array.from(h.values());
|
|
@@ -1566,7 +1566,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1566
1566
|
m.map(async (b) => {
|
|
1567
1567
|
try {
|
|
1568
1568
|
const I = await r(
|
|
1569
|
-
Je.endpoints[
|
|
1569
|
+
Je.endpoints[St(e)].initiate(
|
|
1570
1570
|
{
|
|
1571
1571
|
projectName: b.projectName,
|
|
1572
1572
|
entityId: b.id
|
|
@@ -1633,7 +1633,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
|
|
|
1633
1633
|
]
|
|
1634
1634
|
})
|
|
1635
1635
|
})
|
|
1636
|
-
}), { useGetEntitiesDetailsPanelQuery:
|
|
1636
|
+
}), { useGetEntitiesDetailsPanelQuery: ua, useLazyGetEntitiesDetailsPanelQuery: la } = de, Rn = `
|
|
1637
1637
|
fragment taskTileFragment on TaskNode {
|
|
1638
1638
|
id
|
|
1639
1639
|
name
|
|
@@ -1650,7 +1650,7 @@ fragment taskTileFragment on TaskNode {
|
|
|
1650
1650
|
path
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
-
`,
|
|
1653
|
+
`, Gn = `
|
|
1654
1654
|
fragment versionTileFragment on VersionNode {
|
|
1655
1655
|
id
|
|
1656
1656
|
name: product {
|
|
@@ -1674,7 +1674,7 @@ fragment versionTileFragment on VersionNode {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
version
|
|
1676
1676
|
}
|
|
1677
|
-
`,
|
|
1677
|
+
`, Cn = `
|
|
1678
1678
|
fragment productTileFragment on ProductNode {
|
|
1679
1679
|
id
|
|
1680
1680
|
name
|
|
@@ -1690,7 +1690,7 @@ fragment productTileFragment on ProductNode {
|
|
|
1690
1690
|
path
|
|
1691
1691
|
}
|
|
1692
1692
|
}
|
|
1693
|
-
`,
|
|
1693
|
+
`, Nn = `
|
|
1694
1694
|
fragment folderTileFragment on FolderNode {
|
|
1695
1695
|
id
|
|
1696
1696
|
name
|
|
@@ -1703,7 +1703,7 @@ fragment folderTileFragment on FolderNode {
|
|
|
1703
1703
|
path: parent {
|
|
1704
1704
|
path
|
|
1705
1705
|
}
|
|
1706
|
-
}`,
|
|
1706
|
+
}`, Qn = (t) => `
|
|
1707
1707
|
query EventTile($projectName: String!, $id: String!) {
|
|
1708
1708
|
project(name: $projectName) {
|
|
1709
1709
|
${t}(id: $id) {
|
|
@@ -1714,7 +1714,7 @@ fragment folderTileFragment on FolderNode {
|
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
`,
|
|
1717
|
+
`, Mn = (t) => {
|
|
1718
1718
|
let s = `
|
|
1719
1719
|
query EntityTiles($projectName: String!) {
|
|
1720
1720
|
project(name: $projectName) {
|
|
@@ -1733,23 +1733,23 @@ fragment folderTileFragment on FolderNode {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
`;
|
|
1735
1735
|
const n = {
|
|
1736
|
-
folder:
|
|
1737
|
-
product:
|
|
1738
|
-
version:
|
|
1739
|
-
task:
|
|
1736
|
+
folder: Nn,
|
|
1737
|
+
product: Cn,
|
|
1738
|
+
version: Gn,
|
|
1739
|
+
task: Rn
|
|
1740
1740
|
};
|
|
1741
1741
|
for (const i in t)
|
|
1742
1742
|
s += n[i];
|
|
1743
1743
|
return s;
|
|
1744
1744
|
};
|
|
1745
|
-
function
|
|
1745
|
+
function cs(t) {
|
|
1746
1746
|
if (typeof t != "object" || t === null)
|
|
1747
1747
|
return t;
|
|
1748
1748
|
let e = Object.keys(t);
|
|
1749
1749
|
if (e.length > 0)
|
|
1750
|
-
return
|
|
1750
|
+
return cs(t[e[0]]);
|
|
1751
1751
|
}
|
|
1752
|
-
const
|
|
1752
|
+
const Vn = (t, e) => {
|
|
1753
1753
|
if (Array.isArray(e)) {
|
|
1754
1754
|
const n = {};
|
|
1755
1755
|
for (const i of e)
|
|
@@ -1764,18 +1764,18 @@ const Qn = (t, e) => {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
for (const n of s) {
|
|
1766
1766
|
for (const i in n)
|
|
1767
|
-
n[i] && (Array.isArray(n[i]) ? n[i] = n[i][0] : typeof n[i] == "object" && (n[i] =
|
|
1767
|
+
n[i] && (Array.isArray(n[i]) ? n[i] = n[i][0] : typeof n[i] == "object" && (n[i] = cs(Object.values(n[i])[0])), n.type === "version" && i === "version" && (n[i] = "v" + n[i].toString().padStart(3, "0")));
|
|
1768
1768
|
n.thumbnailEntityType = n.type, n.type === "product" && (n.thumbnailEntityId = n.latestVersion.thumbnailEntityId, n.thumbnailId = n.latestVersion.thumbnailId, n.thumbnailEntityType = "version");
|
|
1769
1769
|
}
|
|
1770
1770
|
return s;
|
|
1771
|
-
},
|
|
1771
|
+
}, Dn = Q.injectEndpoints({
|
|
1772
1772
|
endpoints: (t) => ({
|
|
1773
1773
|
getEventTile: t.query({
|
|
1774
1774
|
query: ({ projectName: e, id: s, type: n }) => ({
|
|
1775
1775
|
url: "/graphql",
|
|
1776
1776
|
method: "POST",
|
|
1777
1777
|
body: {
|
|
1778
|
-
query:
|
|
1778
|
+
query: Qn(n),
|
|
1779
1779
|
variables: { projectName: e, id: s }
|
|
1780
1780
|
}
|
|
1781
1781
|
}),
|
|
@@ -1786,11 +1786,11 @@ const Qn = (t, e) => {
|
|
|
1786
1786
|
url: "/graphql",
|
|
1787
1787
|
method: "POST",
|
|
1788
1788
|
body: {
|
|
1789
|
-
query:
|
|
1789
|
+
query: Mn(s),
|
|
1790
1790
|
variables: { projectName: e }
|
|
1791
1791
|
}
|
|
1792
1792
|
}),
|
|
1793
|
-
transformResponse: (e, s, { entities: n }) =>
|
|
1793
|
+
transformResponse: (e, s, { entities: n }) => Vn(e.data?.project, n)
|
|
1794
1794
|
}),
|
|
1795
1795
|
getEntity: t.query({
|
|
1796
1796
|
query: ({ projectName: e, entityType: s, entityId: n }) => ({
|
|
@@ -1800,17 +1800,17 @@ const Qn = (t, e) => {
|
|
|
1800
1800
|
})
|
|
1801
1801
|
}),
|
|
1802
1802
|
overrideExisting: !0
|
|
1803
|
-
}), me =
|
|
1803
|
+
}), me = Dn.enhanceEndpoints({
|
|
1804
1804
|
endpoints: {
|
|
1805
1805
|
GetProductVersions: {}
|
|
1806
1806
|
}
|
|
1807
1807
|
}), {
|
|
1808
|
-
useGetEventTileQuery:
|
|
1809
|
-
useGetEntityTilesQuery:
|
|
1810
|
-
useGetEntityQuery:
|
|
1811
|
-
useLazyGetEntityQuery:
|
|
1812
|
-
useGetProductVersionsQuery:
|
|
1813
|
-
useGetSearchedEntitiesInfiniteQuery:
|
|
1808
|
+
useGetEventTileQuery: pa,
|
|
1809
|
+
useGetEntityTilesQuery: fa,
|
|
1810
|
+
useGetEntityQuery: ya,
|
|
1811
|
+
useLazyGetEntityQuery: ga,
|
|
1812
|
+
useGetProductVersionsQuery: ha,
|
|
1813
|
+
useGetSearchedEntitiesInfiniteQuery: ma
|
|
1814
1814
|
} = me, ee = Se.enhanceEndpoints({
|
|
1815
1815
|
endpoints: {
|
|
1816
1816
|
getProject: {
|
|
@@ -1828,7 +1828,7 @@ const Qn = (t, e) => {
|
|
|
1828
1828
|
providesTags: (t, e, { projectName: s }) => [{ type: "project", id: s }]
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
}), { useGetProjectQuery:
|
|
1831
|
+
}), { useGetProjectQuery: va, useListProjectsQuery: ba, useGetProjectAnatomyQuery: Ia } = ee, Pt = 2e3, Lt = Q.enhanceEndpoints({
|
|
1832
1832
|
endpoints: {
|
|
1833
1833
|
GetProjects: {
|
|
1834
1834
|
transformResponse: (t) => ({
|
|
@@ -1840,17 +1840,17 @@ const Qn = (t, e) => {
|
|
|
1840
1840
|
})
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
}), gt =
|
|
1843
|
+
}), gt = Lt.injectEndpoints({
|
|
1844
1844
|
endpoints: (t) => ({
|
|
1845
1845
|
getProjectsInfinite: t.infiniteQuery({
|
|
1846
1846
|
infiniteQueryOptions: {
|
|
1847
|
-
initialPageParam: { cursor: "", first:
|
|
1847
|
+
initialPageParam: { cursor: "", first: Pt },
|
|
1848
1848
|
getNextPageParam: (e) => {
|
|
1849
1849
|
const { pageInfo: s } = e;
|
|
1850
1850
|
if (!(!s.hasNextPage || !s.endCursor))
|
|
1851
1851
|
return {
|
|
1852
1852
|
cursor: s.endCursor,
|
|
1853
|
-
first:
|
|
1853
|
+
first: Pt
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
1856
1856
|
},
|
|
@@ -1861,7 +1861,7 @@ const Qn = (t, e) => {
|
|
|
1861
1861
|
after: s?.cursor || void 0,
|
|
1862
1862
|
first: s?.first
|
|
1863
1863
|
}, r = await n.dispatch(
|
|
1864
|
-
|
|
1864
|
+
Lt.endpoints.GetProjects.initiate(i, { forceRefetch: !0 })
|
|
1865
1865
|
);
|
|
1866
1866
|
if (r.error) throw r.error;
|
|
1867
1867
|
return {
|
|
@@ -1889,7 +1889,7 @@ const Qn = (t, e) => {
|
|
|
1889
1889
|
})
|
|
1890
1890
|
}),
|
|
1891
1891
|
overrideExisting: !0
|
|
1892
|
-
}), { useGetProjectsInfiniteInfiniteQuery:
|
|
1892
|
+
}), { useGetProjectsInfiniteInfiniteQuery: Ta } = gt, Ye = (t, e) => {
|
|
1893
1893
|
for (const [s, n] of Object.entries(e)) {
|
|
1894
1894
|
if (s === "attrib" && n && typeof n == "object" && !Array.isArray(n)) {
|
|
1895
1895
|
t.attrib = {
|
|
@@ -1900,7 +1900,7 @@ const Qn = (t, e) => {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
t[s] = n;
|
|
1902
1902
|
}
|
|
1903
|
-
},
|
|
1903
|
+
}, On = ee.enhanceEndpoints({
|
|
1904
1904
|
endpoints: {
|
|
1905
1905
|
deployProject: {
|
|
1906
1906
|
invalidatesTags: () => [
|
|
@@ -1968,21 +1968,21 @@ const Qn = (t, e) => {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
}), {
|
|
1971
|
-
useDeployProjectMutation:
|
|
1972
|
-
useDeleteProjectMutation:
|
|
1973
|
-
useSetProjectAnatomyMutation:
|
|
1974
|
-
useUpdateProjectMutation:
|
|
1975
|
-
useSetProjectBundleMutation:
|
|
1976
|
-
} =
|
|
1971
|
+
useDeployProjectMutation: ka,
|
|
1972
|
+
useDeleteProjectMutation: wa,
|
|
1973
|
+
useSetProjectAnatomyMutation: Aa,
|
|
1974
|
+
useUpdateProjectMutation: Ea,
|
|
1975
|
+
useSetProjectBundleMutation: Sa
|
|
1976
|
+
} = On, $n = (t) => {
|
|
1977
1977
|
try {
|
|
1978
1978
|
return JSON.parse(t);
|
|
1979
1979
|
} catch {
|
|
1980
1980
|
return {};
|
|
1981
1981
|
}
|
|
1982
|
-
},
|
|
1982
|
+
}, xn = (t) => Object.keys(t), jt = (t) => t.kanban.edges.map(({ node: e }) => e).sort((e, s) => {
|
|
1983
1983
|
const n = e.label || e.name, i = s.label || s.name;
|
|
1984
1984
|
return n.localeCompare(i);
|
|
1985
|
-
}),
|
|
1985
|
+
}), Ft = (t, e, s) => t?.length ? [
|
|
1986
1986
|
{ type: "kanBanTask", id: "LIST" },
|
|
1987
1987
|
...t.flatMap(({ id: n, projectName: i, assignees: r = [] }) => [
|
|
1988
1988
|
{ type: "task", id: n },
|
|
@@ -1994,7 +1994,7 @@ const Qn = (t, e) => {
|
|
|
1994
1994
|
})),
|
|
1995
1995
|
{ type: "kanban", id: JSON.stringify(s) }
|
|
1996
1996
|
])
|
|
1997
|
-
] : [{ type: "kanBanTask", id: "LIST" }],
|
|
1997
|
+
] : [{ type: "kanBanTask", id: "LIST" }], ds = async ({
|
|
1998
1998
|
projects: t = [],
|
|
1999
1999
|
taskIds: e = []
|
|
2000
2000
|
}, s) => {
|
|
@@ -2015,41 +2015,41 @@ const Qn = (t, e) => {
|
|
|
2015
2015
|
}, ht = Q.enhanceEndpoints({
|
|
2016
2016
|
endpoints: {
|
|
2017
2017
|
GetKanban: {
|
|
2018
|
-
transformResponse:
|
|
2019
|
-
providesTags:
|
|
2018
|
+
transformResponse: jt,
|
|
2019
|
+
providesTags: Ft,
|
|
2020
2020
|
async onCacheEntryAdded(t = {}, { updateCachedData: e, cacheDataLoaded: s, cacheEntryRemoved: n, dispatch: i, getCacheEntry: r }) {
|
|
2021
2021
|
let a, c;
|
|
2022
2022
|
const u = U(
|
|
2023
2023
|
async (o, l) => {
|
|
2024
2024
|
const p = Array.isArray(t?.projects) ? t.projects : [], f = Array.isArray(t?.assignees) ? t.assignees : [], y = r().data ?? [], h = new Set(y.map((T) => `${T.projectName}:${T.id}`)), g = /* @__PURE__ */ new Map(), m = [];
|
|
2025
|
-
o.forEach(({ topic: T, message:
|
|
2026
|
-
const
|
|
2027
|
-
if (!
|
|
2028
|
-
const E =
|
|
2025
|
+
o.forEach(({ topic: T, message: w }) => {
|
|
2026
|
+
const A = w.project;
|
|
2027
|
+
if (!A || !p.includes(A)) return;
|
|
2028
|
+
const E = w.summary?.entityId;
|
|
2029
2029
|
if (!E) return;
|
|
2030
2030
|
const P = T.split(".")[2]?.replace("_changed", ""), S = pe(
|
|
2031
2031
|
P,
|
|
2032
|
-
|
|
2032
|
+
w.summary,
|
|
2033
2033
|
De
|
|
2034
2034
|
);
|
|
2035
2035
|
if (!S) return;
|
|
2036
|
-
const j = `${
|
|
2036
|
+
const j = `${A}:${E}`, _ = h.has(j), G = S.value, O = S.field === "assignees" && G.some(($) => f.includes($));
|
|
2037
2037
|
if (!(!_ && !O)) {
|
|
2038
2038
|
if (!_) {
|
|
2039
|
-
g.set(j, { taskId: E, project:
|
|
2039
|
+
g.set(j, { taskId: E, project: A });
|
|
2040
2040
|
return;
|
|
2041
2041
|
}
|
|
2042
2042
|
m.push({
|
|
2043
2043
|
taskId: E,
|
|
2044
|
-
project:
|
|
2044
|
+
project: A,
|
|
2045
2045
|
field: S.field,
|
|
2046
2046
|
value: S.value
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
2049
2049
|
}), m.length && e((T) => {
|
|
2050
|
-
m.forEach(({ taskId:
|
|
2050
|
+
m.forEach(({ taskId: w, project: A, field: E, value: P }) => {
|
|
2051
2051
|
const S = T.find(
|
|
2052
|
-
(j) => j.id ===
|
|
2052
|
+
(j) => j.id === w && j.projectName === A
|
|
2053
2053
|
);
|
|
2054
2054
|
if (S && (Object.assign(S, { [E === "type" ? "taskType" : E]: P }), E === "assignees" && f.length > 0 && !P.some((j) => f.includes(j)))) {
|
|
2055
2055
|
const j = T.indexOf(S);
|
|
@@ -2060,7 +2060,7 @@ const Qn = (t, e) => {
|
|
|
2060
2060
|
const v = Array.from(g.values());
|
|
2061
2061
|
if (!v.length || v.length > ie) return;
|
|
2062
2062
|
await J();
|
|
2063
|
-
const b = await
|
|
2063
|
+
const b = await ds(
|
|
2064
2064
|
{
|
|
2065
2065
|
projects: [...new Set(v.map(({ project: T }) => T))],
|
|
2066
2066
|
taskIds: [...new Set(v.map(({ taskId: T }) => T))]
|
|
@@ -2069,17 +2069,17 @@ const Qn = (t, e) => {
|
|
|
2069
2069
|
);
|
|
2070
2070
|
if (!l()) return;
|
|
2071
2071
|
const I = b.filter(
|
|
2072
|
-
(T) => !f.length || (T.assignees ?? []).some((
|
|
2072
|
+
(T) => !f.length || (T.assignees ?? []).some((w) => f.includes(w))
|
|
2073
2073
|
), k = b.filter(
|
|
2074
|
-
(T) => f.length > 0 && !(T.assignees ?? []).some((
|
|
2074
|
+
(T) => f.length > 0 && !(T.assignees ?? []).some((w) => f.includes(w))
|
|
2075
2075
|
);
|
|
2076
2076
|
e((T) => {
|
|
2077
|
-
I.forEach((
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2080
|
-
}), k.forEach((
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2077
|
+
I.forEach((w) => {
|
|
2078
|
+
const A = T.findIndex((E) => E.id === w.id);
|
|
2079
|
+
A === -1 ? T.push(w) : T[A] = w;
|
|
2080
|
+
}), k.forEach((w) => {
|
|
2081
|
+
const A = T.findIndex((E) => E.id === w.id);
|
|
2082
|
+
A !== -1 && T.splice(A, 1);
|
|
2083
2083
|
});
|
|
2084
2084
|
});
|
|
2085
2085
|
},
|
|
@@ -2126,14 +2126,14 @@ const Qn = (t, e) => {
|
|
|
2126
2126
|
// same query as GetKanban but for specific tasks
|
|
2127
2127
|
// used mainly for patching tasks into the kanban cache
|
|
2128
2128
|
GetKanbanTasks: {
|
|
2129
|
-
transformResponse:
|
|
2130
|
-
providesTags:
|
|
2129
|
+
transformResponse: jt,
|
|
2130
|
+
providesTags: Ft
|
|
2131
2131
|
},
|
|
2132
2132
|
// get all users on all selected projects
|
|
2133
2133
|
GetKanbanProjectUsers: {
|
|
2134
2134
|
transformResponse: (t, e, { projects: s } = {}) => t.users.edges.map(({ node: n }) => {
|
|
2135
|
-
const i =
|
|
2136
|
-
let a = !n.isManager && !n.isAdmin ?
|
|
2135
|
+
const i = $n(n.accessGroups);
|
|
2136
|
+
let a = !n.isManager && !n.isAdmin ? xn(i) : s;
|
|
2137
2137
|
(typeof a == "string" || !a) && (a = []);
|
|
2138
2138
|
const c = `/api/users/${n.name}/avatar`;
|
|
2139
2139
|
return {
|
|
@@ -2149,7 +2149,7 @@ const Qn = (t, e) => {
|
|
|
2149
2149
|
] : [{ type: "user", id: "LIST" }]
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
}), { useGetKanbanQuery:
|
|
2152
|
+
}), { useGetKanbanQuery: Pa, useGetKanbanProjectUsersQuery: La } = ht, Ie = ht.injectEndpoints({
|
|
2153
2153
|
endpoints: (t) => ({
|
|
2154
2154
|
getProjectsInfo: t.query({
|
|
2155
2155
|
async queryFn({ projects: e = [], anatomy: s = !0 }, { dispatch: n }) {
|
|
@@ -2177,7 +2177,7 @@ const Qn = (t, e) => {
|
|
|
2177
2177
|
providesTags: (e, s, { projects: n }) => n.map((i) => ({ type: "project", id: i }))
|
|
2178
2178
|
})
|
|
2179
2179
|
})
|
|
2180
|
-
}), { useGetProjectsInfoQuery:
|
|
2180
|
+
}), { useGetProjectsInfoQuery: ja } = Ie, Un = (t, e) => {
|
|
2181
2181
|
const s = {
|
|
2182
2182
|
name: t.name,
|
|
2183
2183
|
attrib: t.attrib,
|
|
@@ -2224,11 +2224,11 @@ const Qn = (t, e) => {
|
|
|
2224
2224
|
...s
|
|
2225
2225
|
};
|
|
2226
2226
|
}
|
|
2227
|
-
},
|
|
2227
|
+
}, us = (t = [], e) => {
|
|
2228
2228
|
const s = t.find((c) => c.entityId === e.id), n = s?.data;
|
|
2229
2229
|
if (!n || s.entityType === "product" || s.entityType === "workfile")
|
|
2230
2230
|
return console.warn("No operation data found or entity type not supported");
|
|
2231
|
-
const i =
|
|
2231
|
+
const i = Un(n, s.entityType);
|
|
2232
2232
|
if (s.entityType === "folder" && n.name && e.path) {
|
|
2233
2233
|
const c = e.path.split("/");
|
|
2234
2234
|
c[c.length - 1] = n.name, i.path = c.join("/");
|
|
@@ -2260,14 +2260,14 @@ const Qn = (t, e) => {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
};
|
|
2262
2262
|
Object.assign(e, a);
|
|
2263
|
-
},
|
|
2263
|
+
}, ls = (t, {
|
|
2264
2264
|
state: e,
|
|
2265
2265
|
dispatch: s
|
|
2266
2266
|
}, n) => {
|
|
2267
2267
|
const i = t.map((a) => ({
|
|
2268
2268
|
type: "entities",
|
|
2269
2269
|
id: a.entityId
|
|
2270
|
-
})), r =
|
|
2270
|
+
})), r = Ls.util.selectInvalidatedBy(e, i);
|
|
2271
2271
|
for (const a of r)
|
|
2272
2272
|
if (a.endpointName === "getEntitiesDetailsPanel") {
|
|
2273
2273
|
const c = s(
|
|
@@ -2276,7 +2276,7 @@ const Qn = (t, e) => {
|
|
|
2276
2276
|
a.originalArgs,
|
|
2277
2277
|
(d) => {
|
|
2278
2278
|
for (const u of d)
|
|
2279
|
-
|
|
2279
|
+
us(t, u);
|
|
2280
2280
|
}
|
|
2281
2281
|
)
|
|
2282
2282
|
);
|
|
@@ -2299,7 +2299,7 @@ const Qn = (t, e) => {
|
|
|
2299
2299
|
}
|
|
2300
2300
|
)
|
|
2301
2301
|
), c];
|
|
2302
|
-
},
|
|
2302
|
+
}, Bn = ({
|
|
2303
2303
|
operations: t,
|
|
2304
2304
|
state: e,
|
|
2305
2305
|
dispatch: s,
|
|
@@ -2342,7 +2342,7 @@ const Qn = (t, e) => {
|
|
|
2342
2342
|
} catch (a) {
|
|
2343
2343
|
return console.error(a), s(Q.util.invalidateTags(i)), [];
|
|
2344
2344
|
}
|
|
2345
|
-
},
|
|
2345
|
+
}, ps = me.injectEndpoints({
|
|
2346
2346
|
endpoints: (t) => ({
|
|
2347
2347
|
updateEntity: t.mutation({
|
|
2348
2348
|
query: ({ projectName: e, entityId: s, data: n, entityType: i }) => ({
|
|
@@ -2365,7 +2365,7 @@ const Qn = (t, e) => {
|
|
|
2365
2365
|
{ newAssignees: g, taskId: s, data: n },
|
|
2366
2366
|
{ dispatch: a }
|
|
2367
2367
|
);
|
|
2368
|
-
j && o.push(S), j ||
|
|
2368
|
+
j && o.push(S), j || ds({ projects: [e], taskIds: [s] }, a).then(
|
|
2369
2369
|
// use .then so that the rest of the code can run
|
|
2370
2370
|
(_) => {
|
|
2371
2371
|
let G = _.find((O) => O.id === s);
|
|
@@ -2396,9 +2396,9 @@ const Qn = (t, e) => {
|
|
|
2396
2396
|
])
|
|
2397
2397
|
);
|
|
2398
2398
|
}
|
|
2399
|
-
const
|
|
2400
|
-
let
|
|
2401
|
-
for (const S of
|
|
2399
|
+
const w = Ie.util.selectInvalidatedBy(u, T).filter((S) => S.endpointName === "GetKanban");
|
|
2400
|
+
let A = [];
|
|
2401
|
+
for (const S of w) {
|
|
2402
2402
|
const [j, _] = Xe(
|
|
2403
2403
|
{
|
|
2404
2404
|
assignees: S.originalArgs.assignees,
|
|
@@ -2411,23 +2411,23 @@ const Qn = (t, e) => {
|
|
|
2411
2411
|
},
|
|
2412
2412
|
{ dispatch: a }
|
|
2413
2413
|
);
|
|
2414
|
-
_ ? o.push(j) :
|
|
2414
|
+
_ ? o.push(j) : A.push(S);
|
|
2415
2415
|
}
|
|
2416
2416
|
const E = { projects: f, assignees: m };
|
|
2417
|
-
|
|
2417
|
+
A = A.filter(
|
|
2418
2418
|
(S) => JSON.stringify(S.originalArgs) !== JSON.stringify(E)
|
|
2419
2419
|
);
|
|
2420
|
-
const P =
|
|
2420
|
+
const P = w.map((S) => ({
|
|
2421
2421
|
type: "kanban",
|
|
2422
2422
|
id: JSON.stringify(S.originalArgs)
|
|
2423
2423
|
}));
|
|
2424
2424
|
l.push(...P);
|
|
2425
2425
|
}
|
|
2426
|
-
|
|
2426
|
+
ls([{ entityId: s, data: n, entityType: r }], { state: u, dispatch: a }, o);
|
|
2427
2427
|
try {
|
|
2428
2428
|
await c, l.length && a(Ie.util.invalidateTags(l));
|
|
2429
2429
|
} catch (p) {
|
|
2430
|
-
|
|
2430
|
+
ss.error(js(p) || "Failed to update task"), o.forEach((f) => f?.undo());
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
2433
|
}),
|
|
@@ -2437,7 +2437,7 @@ const Qn = (t, e) => {
|
|
|
2437
2437
|
const r = i(), a = [];
|
|
2438
2438
|
for (const { projectName: p, data: f, id: y, currentAssignees: h = [] } of e) {
|
|
2439
2439
|
const g = n(
|
|
2440
|
-
|
|
2440
|
+
ps.endpoints.updateEntity.initiate({
|
|
2441
2441
|
projectName: p,
|
|
2442
2442
|
entityId: y,
|
|
2443
2443
|
data: f,
|
|
@@ -2448,9 +2448,9 @@ const Qn = (t, e) => {
|
|
|
2448
2448
|
a.push(g);
|
|
2449
2449
|
}
|
|
2450
2450
|
let c = [];
|
|
2451
|
-
(s === "task" || s === "folder") && (c =
|
|
2451
|
+
(s === "task" || s === "folder") && (c = Bn({ operations: e, state: r, dispatch: n, entityType: s }));
|
|
2452
2452
|
const d = [], u = e.map((p) => ({ ...p, entityId: p.id }));
|
|
2453
|
-
return (s === "task" || s === "folder") && (s === "task" && Ee(u, { state: r, dispatch: n }, d), s === "folder" && (
|
|
2453
|
+
return (s === "task" || s === "folder") && (s === "task" && Ee(u, { state: r, dispatch: n }, d), s === "folder" && (Be(u, { state: r, dispatch: n }, d), console.log("invalidate overview folders"), n(me.util.invalidateTags([{ type: "folder", id: "LIST" }])), n(
|
|
2454
2454
|
me.util.invalidateTags(
|
|
2455
2455
|
u.map((p) => ({ type: "overviewTask", id: p.entityId }))
|
|
2456
2456
|
)
|
|
@@ -2474,7 +2474,7 @@ const Qn = (t, e) => {
|
|
|
2474
2474
|
})
|
|
2475
2475
|
}),
|
|
2476
2476
|
overrideExisting: !0
|
|
2477
|
-
}), { useUpdateEntitiesMutation:
|
|
2477
|
+
}), { useUpdateEntitiesMutation: Fa, useUpdateEntityMutation: _a } = ps, _t = (t) => [...new Set(t.map((e) => e.entityId).filter(Boolean))], qn = async ({
|
|
2478
2478
|
dispatch: t,
|
|
2479
2479
|
projectName: e,
|
|
2480
2480
|
updatedTaskIds: s,
|
|
@@ -2512,7 +2512,7 @@ const Qn = (t, e) => {
|
|
|
2512
2512
|
} catch (i) {
|
|
2513
2513
|
return console.error("Background entity refetch failed:", i), null;
|
|
2514
2514
|
}
|
|
2515
|
-
},
|
|
2515
|
+
}, Hn = async ({
|
|
2516
2516
|
dispatch: t,
|
|
2517
2517
|
projectName: e,
|
|
2518
2518
|
updatedTaskIds: s,
|
|
@@ -2544,40 +2544,40 @@ const Qn = (t, e) => {
|
|
|
2544
2544
|
} catch (i) {
|
|
2545
2545
|
return console.error("Background overview tasks refetch failed:", i), null;
|
|
2546
2546
|
}
|
|
2547
|
-
},
|
|
2548
|
-
version: { type:
|
|
2549
|
-
product: { type:
|
|
2547
|
+
}, fs = "version", Wn = { type: fs, id: "LIST" }, ys = "product", mt = { type: ys, id: "LIST" }, Ze = {
|
|
2548
|
+
version: { type: fs, list: Wn },
|
|
2549
|
+
product: { type: ys, list: mt }
|
|
2550
2550
|
}, W = (t, e) => t ? [
|
|
2551
2551
|
...t.map(
|
|
2552
2552
|
(s) => ({ type: Ze[e].type, id: s.id })
|
|
2553
2553
|
),
|
|
2554
2554
|
Ze[e].list
|
|
2555
|
-
] : [Ze[e].list],
|
|
2555
|
+
] : [Ze[e].list], gs = (t) => {
|
|
2556
2556
|
const e = W(t, "version"), s = W(
|
|
2557
2557
|
t.map((n) => n.product).filter((n) => !!n),
|
|
2558
2558
|
"product"
|
|
2559
2559
|
);
|
|
2560
2560
|
return [...e, ...s];
|
|
2561
|
-
}, xe = (t) => t ?
|
|
2561
|
+
}, xe = (t) => t ? gs(t.versions) : W(void 0, "version"), zn = (t) => t ? gs(Xn(t)) : W(void 0, "version"), Kn = (t) => {
|
|
2562
2562
|
if (!t) return [mt, ...W(void 0, "product")];
|
|
2563
|
-
const e =
|
|
2563
|
+
const e = Zn(t), s = W(e, "product"), n = W(
|
|
2564
2564
|
e.map((i) => i.featuredVersion).filter((i) => !!i),
|
|
2565
2565
|
"version"
|
|
2566
2566
|
);
|
|
2567
2567
|
return [...s, ...n];
|
|
2568
|
-
},
|
|
2568
|
+
}, Jn = (t) => {
|
|
2569
2569
|
if (!t) return [mt, ...W(void 0, "product")];
|
|
2570
2570
|
const e = W(t.products, "product"), s = W(
|
|
2571
2571
|
t.products.map((n) => n.featuredVersion).filter((n) => !!n),
|
|
2572
2572
|
"version"
|
|
2573
2573
|
);
|
|
2574
2574
|
return [...e, ...s];
|
|
2575
|
-
},
|
|
2575
|
+
}, Yn = (t) => {
|
|
2576
2576
|
const e = [];
|
|
2577
2577
|
for (const { node: s } of t)
|
|
2578
2578
|
Math.sign(s.version) !== -1 && e.push(s);
|
|
2579
2579
|
return e;
|
|
2580
|
-
},
|
|
2580
|
+
}, Xn = (t) => t ? t.pages.flatMap((e) => e.versions) : [], Zn = (t) => t ? t.pages.flatMap((e) => e.products) : [], hs = (t) => {
|
|
2581
2581
|
const e = R(t.allAttrib), s = t.task ? {
|
|
2582
2582
|
...t.task,
|
|
2583
2583
|
attrib: R(t.task.allAttrib),
|
|
@@ -2596,10 +2596,10 @@ const Qn = (t, e) => {
|
|
|
2596
2596
|
task: s,
|
|
2597
2597
|
product: n
|
|
2598
2598
|
};
|
|
2599
|
-
},
|
|
2600
|
-
const e = t.project.versions.pageInfo, n =
|
|
2599
|
+
}, Rt = (t) => {
|
|
2600
|
+
const e = t.project.versions.pageInfo, n = Yn(t.project.versions.edges).map((i) => hs(i));
|
|
2601
2601
|
return { pageInfo: e, versions: n };
|
|
2602
|
-
},
|
|
2602
|
+
}, ei = (t) => t.featuredVersion ? hs({
|
|
2603
2603
|
...t.featuredVersion,
|
|
2604
2604
|
product: {
|
|
2605
2605
|
id: t.id,
|
|
@@ -2610,7 +2610,7 @@ const Qn = (t, e) => {
|
|
|
2610
2610
|
allAttrib: t.folder.allAttrib
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
|
-
}) : null,
|
|
2613
|
+
}) : null, ti = (t) => {
|
|
2614
2614
|
const e = t.project.products.pageInfo, s = t.project.products.edges.map((n) => {
|
|
2615
2615
|
const i = n.node, r = R(i.allAttrib), a = {
|
|
2616
2616
|
...i.folder,
|
|
@@ -2624,11 +2624,11 @@ const Qn = (t, e) => {
|
|
|
2624
2624
|
attrib: r,
|
|
2625
2625
|
folder: a,
|
|
2626
2626
|
versions: d,
|
|
2627
|
-
featuredVersion:
|
|
2627
|
+
featuredVersion: ei(i)
|
|
2628
2628
|
};
|
|
2629
2629
|
});
|
|
2630
2630
|
return { pageInfo: e, products: s };
|
|
2631
|
-
},
|
|
2631
|
+
}, Gt = (t) => {
|
|
2632
2632
|
try {
|
|
2633
2633
|
const e = t.match(/:\s*({.*})$/);
|
|
2634
2634
|
if (!e)
|
|
@@ -2643,7 +2643,7 @@ const Qn = (t, e) => {
|
|
|
2643
2643
|
return t.split(":")[0] || t;
|
|
2644
2644
|
}
|
|
2645
2645
|
}, K = 10;
|
|
2646
|
-
function
|
|
2646
|
+
function ms(t, e, s, n) {
|
|
2647
2647
|
for (let i = 0; i < t.length; i++) {
|
|
2648
2648
|
const r = e[s], a = t[i][s];
|
|
2649
2649
|
if (n ? r > a : r < a)
|
|
@@ -2651,7 +2651,7 @@ function hs(t, e, s, n) {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
return t.length;
|
|
2653
2653
|
}
|
|
2654
|
-
function
|
|
2654
|
+
function si(t, e, s, n, i, r) {
|
|
2655
2655
|
for (const a of t) {
|
|
2656
2656
|
const c = a[n], d = c.findIndex((u) => u.id === e);
|
|
2657
2657
|
if (d !== -1) {
|
|
@@ -2660,7 +2660,7 @@ function ei(t, e, s, n, i, r) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
}
|
|
2662
2662
|
if (s && t.length > 0) {
|
|
2663
|
-
const a = t[0][n], c =
|
|
2663
|
+
const a = t[0][n], c = ms(a, s, i, r);
|
|
2664
2664
|
a.splice(c, 0, s);
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
@@ -2679,10 +2679,10 @@ function Qe(t, e, s, n, i, r = !0) {
|
|
|
2679
2679
|
return t[c] = e, !0;
|
|
2680
2680
|
if (!r) return !1;
|
|
2681
2681
|
}
|
|
2682
|
-
const a =
|
|
2682
|
+
const a = ms(t, e, n, i);
|
|
2683
2683
|
return t.splice(a, 0, e), !0;
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2685
|
+
function ni(t, e, s, n, i) {
|
|
2686
2686
|
if (s)
|
|
2687
2687
|
for (const r of t)
|
|
2688
2688
|
Qe(r.versions, e, !0, n, i, !1);
|
|
@@ -2696,20 +2696,20 @@ const z = Q.enhanceEndpoints({
|
|
|
2696
2696
|
endpoints: {
|
|
2697
2697
|
// used by both stacked and non-stacked views
|
|
2698
2698
|
GetVersions: {
|
|
2699
|
-
transformResponse:
|
|
2699
|
+
transformResponse: Rt,
|
|
2700
2700
|
providesTags: xe,
|
|
2701
2701
|
keepUnusedDataFor: K
|
|
2702
2702
|
},
|
|
2703
2703
|
// used by getVersionsByProducts only
|
|
2704
2704
|
GetVersionsByProductId: {
|
|
2705
|
-
transformResponse:
|
|
2705
|
+
transformResponse: Rt,
|
|
2706
2706
|
providesTags: xe,
|
|
2707
2707
|
keepUnusedDataFor: K
|
|
2708
2708
|
},
|
|
2709
2709
|
// used by getProductsInfinite only
|
|
2710
2710
|
GetProducts: {
|
|
2711
|
-
transformResponse:
|
|
2712
|
-
providesTags:
|
|
2711
|
+
transformResponse: ti,
|
|
2712
|
+
providesTags: Jn,
|
|
2713
2713
|
keepUnusedDataFor: K
|
|
2714
2714
|
},
|
|
2715
2715
|
// footer stats: `targets` excluded from cache key + responses merged,
|
|
@@ -2717,21 +2717,21 @@ const z = Q.enhanceEndpoints({
|
|
|
2717
2717
|
GetProductsColumnStats: {
|
|
2718
2718
|
transformResponse: (t) => ke(t?.project?.products?.fieldStats ?? []),
|
|
2719
2719
|
serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
|
|
2720
|
-
merge: (t, e) =>
|
|
2721
|
-
forceRefetch: ({ currentArg: t, previousArg: e }) =>
|
|
2720
|
+
merge: (t, e) => we(e, t),
|
|
2721
|
+
forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
|
|
2722
2722
|
providesTags: (t, e, { projectName: s }) => [{ type: "productColumnStats", id: s }],
|
|
2723
2723
|
keepUnusedDataFor: K
|
|
2724
2724
|
},
|
|
2725
2725
|
GetVersionsColumnStats: {
|
|
2726
2726
|
transformResponse: (t) => ke(t?.project?.versions?.fieldStats ?? []),
|
|
2727
2727
|
serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
|
|
2728
|
-
merge: (t, e) =>
|
|
2729
|
-
forceRefetch: ({ currentArg: t, previousArg: e }) =>
|
|
2728
|
+
merge: (t, e) => we(e, t),
|
|
2729
|
+
forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
|
|
2730
2730
|
providesTags: (t, e, { projectName: s }) => [{ type: "versionColumnStats", id: s }],
|
|
2731
2731
|
keepUnusedDataFor: K
|
|
2732
2732
|
}
|
|
2733
2733
|
}
|
|
2734
|
-
}), ae = 250,
|
|
2734
|
+
}), ae = 250, Ct = 1e3, ii = 10, ri = ["status", "tags"];
|
|
2735
2735
|
function Fe(t, e, s) {
|
|
2736
2736
|
const i = U(
|
|
2737
2737
|
async (a, c) => {
|
|
@@ -2750,7 +2750,7 @@ function Fe(t, e, s) {
|
|
|
2750
2750
|
o.add(g);
|
|
2751
2751
|
continue;
|
|
2752
2752
|
}
|
|
2753
|
-
const I = pe(b, h.summary,
|
|
2753
|
+
const I = pe(b, h.summary, ri);
|
|
2754
2754
|
if (!I) {
|
|
2755
2755
|
l.add(g);
|
|
2756
2756
|
continue;
|
|
@@ -2855,7 +2855,7 @@ const N = z.injectEndpoints({
|
|
|
2855
2855
|
return console.error("Error in getVersionsInfiniteQuery queryFn:", i), { error: L(i) };
|
|
2856
2856
|
}
|
|
2857
2857
|
},
|
|
2858
|
-
providesTags:
|
|
2858
|
+
providesTags: zn,
|
|
2859
2859
|
// Subscribes to version entity changes and updates cache accordingly
|
|
2860
2860
|
// Handles: create, update, delete operations
|
|
2861
2861
|
onCacheEntryAdded: async (e, { getCacheEntry: s, updateCachedData: n, cacheEntryRemoved: i, dispatch: r }) => {
|
|
@@ -2922,7 +2922,7 @@ const N = z.injectEndpoints({
|
|
|
2922
2922
|
}
|
|
2923
2923
|
if (p)
|
|
2924
2924
|
for (const g of p)
|
|
2925
|
-
|
|
2925
|
+
ni(
|
|
2926
2926
|
y.pages,
|
|
2927
2927
|
g,
|
|
2928
2928
|
e.latestPerFolder === !0 && f?.has(g.id) === !0,
|
|
@@ -2946,7 +2946,7 @@ const N = z.injectEndpoints({
|
|
|
2946
2946
|
...a,
|
|
2947
2947
|
productIds: [p]
|
|
2948
2948
|
};
|
|
2949
|
-
return r ? (f && (y.before = f), y.last =
|
|
2949
|
+
return r ? (f && (y.before = f), y.last = Ct) : (f && (y.after = f), y.first = Ct), s(
|
|
2950
2950
|
z.endpoints.GetVersionsByProductId.initiate(y, {
|
|
2951
2951
|
forceRefetch: n
|
|
2952
2952
|
})
|
|
@@ -2955,7 +2955,7 @@ const N = z.injectEndpoints({
|
|
|
2955
2955
|
for (let p = 0; p < u.length; p++) {
|
|
2956
2956
|
const f = u[p], y = i[p];
|
|
2957
2957
|
if (f.status === "rejected") {
|
|
2958
|
-
console.error(`Error fetching versions for product ${y}:`, f.reason), l.push({ productId: y, error:
|
|
2958
|
+
console.error(`Error fetching versions for product ${y}:`, f.reason), l.push({ productId: y, error: Gt(f.reason) });
|
|
2959
2959
|
continue;
|
|
2960
2960
|
}
|
|
2961
2961
|
const h = f.value;
|
|
@@ -2963,14 +2963,14 @@ const N = z.injectEndpoints({
|
|
|
2963
2963
|
console.error(`Error fetching versions for product ${y}:`, h.error), l.push({
|
|
2964
2964
|
productId: y,
|
|
2965
2965
|
// @ts-expect-error - message
|
|
2966
|
-
error:
|
|
2966
|
+
error: Gt(h.error?.message || "Unknown error")
|
|
2967
2967
|
});
|
|
2968
2968
|
continue;
|
|
2969
2969
|
}
|
|
2970
2970
|
if (!h.data) continue;
|
|
2971
2971
|
o.push(...h.data.versions);
|
|
2972
2972
|
let g = h.data.pageInfo, m = 1;
|
|
2973
|
-
for (; g && m <
|
|
2973
|
+
for (; g && m < ii; ) {
|
|
2974
2974
|
const v = r ? g.hasPreviousPage : g.hasNextPage, b = g.endCursor;
|
|
2975
2975
|
if (!v || !b) break;
|
|
2976
2976
|
const I = await c(y, b);
|
|
@@ -3106,7 +3106,7 @@ const N = z.injectEndpoints({
|
|
|
3106
3106
|
return console.error("Error in getProductsInfiniteQuery queryFn:", r), { error: L(r) };
|
|
3107
3107
|
}
|
|
3108
3108
|
},
|
|
3109
|
-
providesTags:
|
|
3109
|
+
providesTags: Kn,
|
|
3110
3110
|
// Subscribes to product entity changes and updates cache accordingly
|
|
3111
3111
|
// Handles: create, update, delete operations
|
|
3112
3112
|
// Often triggered together with version changes (new product + version)
|
|
@@ -3146,7 +3146,7 @@ const N = z.injectEndpoints({
|
|
|
3146
3146
|
(g.data?.products || []).map((b) => [b.id, b])
|
|
3147
3147
|
);
|
|
3148
3148
|
f.forEach((b) => {
|
|
3149
|
-
|
|
3149
|
+
si(
|
|
3150
3150
|
m.pages,
|
|
3151
3151
|
b,
|
|
3152
3152
|
v.get(b),
|
|
@@ -3196,11 +3196,11 @@ const N = z.injectEndpoints({
|
|
|
3196
3196
|
const I = b.featuredVersion?.id;
|
|
3197
3197
|
if (I) {
|
|
3198
3198
|
if (f && f.some((k) => k.entityId === I && k.parentId === b.id) && p.add(b.id), y)
|
|
3199
|
-
for (const { entityId: k, field: T, value:
|
|
3200
|
-
b.id ===
|
|
3199
|
+
for (const { entityId: k, field: T, value: w, parentId: A } of y)
|
|
3200
|
+
b.id === A && I === k && b.featuredVersion && (b.featuredVersion[T] = w);
|
|
3201
3201
|
if (h)
|
|
3202
|
-
for (const { entityId: k, allAttrib: T, parsedAttrib:
|
|
3203
|
-
I === k && b.featuredVersion && (b.featuredVersion.allAttrib = T, b.featuredVersion.attrib =
|
|
3202
|
+
for (const { entityId: k, allAttrib: T, parsedAttrib: w } of h)
|
|
3203
|
+
I === k && b.featuredVersion && (b.featuredVersion.allAttrib = T, b.featuredVersion.attrib = w);
|
|
3204
3204
|
if (g)
|
|
3205
3205
|
for (const k of g)
|
|
3206
3206
|
I === k.id && b.featuredVersion && (b.featuredVersion = k);
|
|
@@ -3243,7 +3243,7 @@ const N = z.injectEndpoints({
|
|
|
3243
3243
|
try {
|
|
3244
3244
|
const v = [];
|
|
3245
3245
|
for (const k of s) {
|
|
3246
|
-
const T = k.count || 500,
|
|
3246
|
+
const T = k.count || 500, w = {
|
|
3247
3247
|
projectName: e,
|
|
3248
3248
|
// base filters
|
|
3249
3249
|
productFilter: r,
|
|
@@ -3262,30 +3262,30 @@ const N = z.injectEndpoints({
|
|
|
3262
3262
|
hasReviewables: g,
|
|
3263
3263
|
group: k.value
|
|
3264
3264
|
};
|
|
3265
|
-
l ?
|
|
3266
|
-
const
|
|
3265
|
+
l ? w.last = T : w.first = T;
|
|
3266
|
+
const A = m.dispatch(
|
|
3267
3267
|
z.endpoints.GetVersions.initiate(
|
|
3268
|
-
|
|
3268
|
+
w,
|
|
3269
3269
|
{
|
|
3270
3270
|
forceRefetch: !0
|
|
3271
3271
|
}
|
|
3272
3272
|
)
|
|
3273
3273
|
);
|
|
3274
|
-
v.push(
|
|
3274
|
+
v.push(A);
|
|
3275
3275
|
}
|
|
3276
3276
|
const b = await Promise.all(v), I = [];
|
|
3277
3277
|
for (const k of b) {
|
|
3278
3278
|
if (k.error) throw k.error;
|
|
3279
|
-
const T = k.originalArgs?.group,
|
|
3279
|
+
const T = k.originalArgs?.group, w = k.data?.pageInfo?.hasNextPage || k.data?.pageInfo?.hasPreviousPage || !1, A = k.data?.versions.map((E, P, S) => ({
|
|
3280
3280
|
...E,
|
|
3281
3281
|
groups: [
|
|
3282
3282
|
{
|
|
3283
3283
|
value: T,
|
|
3284
|
-
hasNextPage: P === S.length - 1 &&
|
|
3284
|
+
hasNextPage: P === S.length - 1 && w ? T : void 0
|
|
3285
3285
|
}
|
|
3286
3286
|
]
|
|
3287
3287
|
})) || [];
|
|
3288
|
-
I.push(...
|
|
3288
|
+
I.push(...A);
|
|
3289
3289
|
}
|
|
3290
3290
|
return {
|
|
3291
3291
|
data: {
|
|
@@ -3368,15 +3368,15 @@ const N = z.injectEndpoints({
|
|
|
3368
3368
|
})
|
|
3369
3369
|
})
|
|
3370
3370
|
}), {
|
|
3371
|
-
useGetVersionsQuery:
|
|
3372
|
-
useGetProductsColumnStatsQuery:
|
|
3373
|
-
useGetVersionsColumnStatsQuery:
|
|
3371
|
+
useGetVersionsQuery: Ra,
|
|
3372
|
+
useGetProductsColumnStatsQuery: Ga,
|
|
3373
|
+
useGetVersionsColumnStatsQuery: Ca
|
|
3374
3374
|
} = z, {
|
|
3375
|
-
useGetVersionsInfiniteInfiniteQuery:
|
|
3376
|
-
useGetVersionsByProductsQuery:
|
|
3377
|
-
useGetProductsInfiniteInfiniteQuery:
|
|
3378
|
-
useGetGroupedVersionsListQuery:
|
|
3379
|
-
} = N,
|
|
3375
|
+
useGetVersionsInfiniteInfiniteQuery: Na,
|
|
3376
|
+
useGetVersionsByProductsQuery: Qa,
|
|
3377
|
+
useGetProductsInfiniteInfiniteQuery: Ma,
|
|
3378
|
+
useGetGroupedVersionsListQuery: Va
|
|
3379
|
+
} = N, Nt = (t) => [
|
|
3380
3380
|
{ type: "version", id: "LIST" },
|
|
3381
3381
|
...t.map((e) => ({ type: "version", id: e.entityId }))
|
|
3382
3382
|
], _e = (t, e) => {
|
|
@@ -3387,26 +3387,26 @@ const N = z.injectEndpoints({
|
|
|
3387
3387
|
...s.attrib,
|
|
3388
3388
|
...e.attrib
|
|
3389
3389
|
}), s;
|
|
3390
|
-
},
|
|
3390
|
+
}, vs = (t, e) => {
|
|
3391
3391
|
e.data && (Object.entries(e.data).forEach(([s, n]) => {
|
|
3392
3392
|
s !== "attrib" && (t[s] = n);
|
|
3393
3393
|
}), e.data.attrib && (t.attrib = { ...t.attrib, ...e.data.attrib }));
|
|
3394
|
-
},
|
|
3394
|
+
}, Qt = (t, e) => {
|
|
3395
3395
|
t.forEach((s) => {
|
|
3396
3396
|
[s.task, s.product, s.product?.folder].forEach((i) => {
|
|
3397
3397
|
if (!i) return;
|
|
3398
3398
|
const r = e.get(i.id);
|
|
3399
|
-
r &&
|
|
3399
|
+
r && vs(i, r);
|
|
3400
3400
|
});
|
|
3401
3401
|
});
|
|
3402
|
-
},
|
|
3402
|
+
}, Mt = (t, e) => {
|
|
3403
3403
|
t.forEach((s) => {
|
|
3404
3404
|
const n = s.folder;
|
|
3405
3405
|
if (!n) return;
|
|
3406
3406
|
const i = e.get(n.id);
|
|
3407
|
-
i &&
|
|
3407
|
+
i && vs(n, i);
|
|
3408
3408
|
});
|
|
3409
|
-
},
|
|
3409
|
+
}, ai = (t, {
|
|
3410
3410
|
state: e,
|
|
3411
3411
|
dispatch: s
|
|
3412
3412
|
}, n) => {
|
|
@@ -3428,7 +3428,7 @@ const N = z.injectEndpoints({
|
|
|
3428
3428
|
a.originalArgs,
|
|
3429
3429
|
(d) => {
|
|
3430
3430
|
for (const u of d.pages)
|
|
3431
|
-
|
|
3431
|
+
Qt(u.versions, i);
|
|
3432
3432
|
}
|
|
3433
3433
|
)
|
|
3434
3434
|
);
|
|
@@ -3440,7 +3440,7 @@ const N = z.injectEndpoints({
|
|
|
3440
3440
|
a.originalArgs,
|
|
3441
3441
|
(d) => {
|
|
3442
3442
|
for (const u of d.pages)
|
|
3443
|
-
|
|
3443
|
+
Mt(u.products, i);
|
|
3444
3444
|
}
|
|
3445
3445
|
)
|
|
3446
3446
|
);
|
|
@@ -3450,7 +3450,7 @@ const N = z.injectEndpoints({
|
|
|
3450
3450
|
N.util.updateQueryData(
|
|
3451
3451
|
a.endpointName,
|
|
3452
3452
|
a.originalArgs,
|
|
3453
|
-
(d) =>
|
|
3453
|
+
(d) => Qt(d.versions, i)
|
|
3454
3454
|
)
|
|
3455
3455
|
);
|
|
3456
3456
|
n?.push(c);
|
|
@@ -3459,17 +3459,17 @@ const N = z.injectEndpoints({
|
|
|
3459
3459
|
N.util.updateQueryData(
|
|
3460
3460
|
a.endpointName,
|
|
3461
3461
|
a.originalArgs,
|
|
3462
|
-
(d) =>
|
|
3462
|
+
(d) => Mt(d.products, i)
|
|
3463
3463
|
)
|
|
3464
3464
|
);
|
|
3465
3465
|
n?.push(c);
|
|
3466
3466
|
}
|
|
3467
|
-
},
|
|
3467
|
+
}, oi = (t, {
|
|
3468
3468
|
state: e,
|
|
3469
3469
|
dispatch: s
|
|
3470
3470
|
}, n) => {
|
|
3471
3471
|
if (!t.length) return;
|
|
3472
|
-
const i =
|
|
3472
|
+
const i = Nt(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((d) => d.type === "delete").map((d) => d.entityId));
|
|
3473
3473
|
for (const d of r)
|
|
3474
3474
|
if (d.endpointName === "getVersionsInfinite") {
|
|
3475
3475
|
const u = s(
|
|
@@ -3556,11 +3556,11 @@ const N = z.injectEndpoints({
|
|
|
3556
3556
|
n?.push(u);
|
|
3557
3557
|
}
|
|
3558
3558
|
const c = t.filter((d) => d.type !== "delete");
|
|
3559
|
-
c.length > 0 && s(N.util.invalidateTags(
|
|
3560
|
-
},
|
|
3559
|
+
c.length > 0 && s(N.util.invalidateTags(Nt(c)));
|
|
3560
|
+
}, Vt = (t) => [
|
|
3561
3561
|
{ type: "product", id: "LIST" },
|
|
3562
3562
|
...t.map((e) => ({ type: "product", id: e.entityId }))
|
|
3563
|
-
],
|
|
3563
|
+
], ci = (t, e) => {
|
|
3564
3564
|
const s = { ...t };
|
|
3565
3565
|
return Object.keys(e).forEach((n) => {
|
|
3566
3566
|
n !== "attrib" && e[n] !== void 0 && (s[n] = e[n]);
|
|
@@ -3568,12 +3568,12 @@ const N = z.injectEndpoints({
|
|
|
3568
3568
|
...s.attrib,
|
|
3569
3569
|
...e.attrib
|
|
3570
3570
|
}), s;
|
|
3571
|
-
},
|
|
3571
|
+
}, di = (t, {
|
|
3572
3572
|
state: e,
|
|
3573
3573
|
dispatch: s
|
|
3574
3574
|
}, n) => {
|
|
3575
3575
|
if (!t.length) return;
|
|
3576
|
-
const i =
|
|
3576
|
+
const i = Vt(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((u) => u.type === "delete").map((u) => u.entityId)), c = (u) => {
|
|
3577
3577
|
for (let o = u.length - 1; o >= 0; o--)
|
|
3578
3578
|
a.has(u[o].product?.id) && u.splice(o, 1);
|
|
3579
3579
|
};
|
|
@@ -3591,7 +3591,7 @@ const N = z.injectEndpoints({
|
|
|
3591
3591
|
const y = p.products[f], h = t.find(
|
|
3592
3592
|
(g) => g.entityId === y.id && g.type !== "delete"
|
|
3593
3593
|
);
|
|
3594
|
-
h?.data && (p.products[f] =
|
|
3594
|
+
h?.data && (p.products[f] = ci(y, h.data));
|
|
3595
3595
|
}
|
|
3596
3596
|
}
|
|
3597
3597
|
}
|
|
@@ -3623,7 +3623,7 @@ const N = z.injectEndpoints({
|
|
|
3623
3623
|
n?.push(o);
|
|
3624
3624
|
}
|
|
3625
3625
|
const d = t.filter((u) => u.type !== "delete");
|
|
3626
|
-
d.length > 0 && s(N.util.invalidateTags(
|
|
3626
|
+
d.length > 0 && s(N.util.invalidateTags(Vt(d)));
|
|
3627
3627
|
}, Ue = (t, e) => {
|
|
3628
3628
|
if (Object.keys(e).forEach((s) => {
|
|
3629
3629
|
s === "attrib" || s === "links" || s === "deleteLinks" || (t[s] = e[s]);
|
|
@@ -3643,7 +3643,7 @@ const N = z.injectEndpoints({
|
|
|
3643
3643
|
t.links = t.links.filter((i) => i.id !== n);
|
|
3644
3644
|
});
|
|
3645
3645
|
}
|
|
3646
|
-
},
|
|
3646
|
+
}, ui = (t) => [
|
|
3647
3647
|
{ type: "overviewTask", id: "LIST" },
|
|
3648
3648
|
...t.map((e) => ({ type: "overviewTask", id: e.entityId })),
|
|
3649
3649
|
// we also add the projectName so that tasks that do not exist in the cache can still invalidate
|
|
@@ -3651,31 +3651,31 @@ const N = z.injectEndpoints({
|
|
|
3651
3651
|
type: "overviewTask",
|
|
3652
3652
|
id: e.data?.projectName
|
|
3653
3653
|
}))
|
|
3654
|
-
],
|
|
3654
|
+
], li = (t) => [
|
|
3655
3655
|
...t.map((e) => ({ type: "folder", id: e.entityId })),
|
|
3656
3656
|
// we also add the projectName so that tasks that do not exist in the cache can still invalidate
|
|
3657
3657
|
...t.filter((e) => e.data?.projectName).map((e) => ({
|
|
3658
3658
|
type: "folder",
|
|
3659
3659
|
id: e.data?.projectName
|
|
3660
3660
|
}))
|
|
3661
|
-
],
|
|
3661
|
+
], pi = (t, e, s) => ({
|
|
3662
3662
|
entityId: t,
|
|
3663
3663
|
entityType: e,
|
|
3664
3664
|
type: "update",
|
|
3665
3665
|
data: { deleteLinks: s }
|
|
3666
|
-
}),
|
|
3667
|
-
(s) =>
|
|
3668
|
-
),
|
|
3666
|
+
}), Da = (t, e) => t.map(
|
|
3667
|
+
(s) => pi(s.entityId, s.entityType, e)
|
|
3668
|
+
), Oa = (t, {
|
|
3669
3669
|
state: e,
|
|
3670
3670
|
dispatch: s
|
|
3671
3671
|
}, n) => {
|
|
3672
3672
|
const i = t.reduce((r, a) => (r[a.entityType] || (r[a.entityType] = []), r[a.entityType].push(a), r), {});
|
|
3673
|
-
i.task && Ee(i.task, { state: e, dispatch: s }, n), i.folder &&
|
|
3673
|
+
i.task && Ee(i.task, { state: e, dispatch: s }, n), i.folder && Be(i.folder, { state: e, dispatch: s }, n);
|
|
3674
3674
|
}, Ee = (t, {
|
|
3675
3675
|
state: e,
|
|
3676
3676
|
dispatch: s
|
|
3677
3677
|
}, n) => {
|
|
3678
|
-
const i =
|
|
3678
|
+
const i = ui(t), r = x.util.selectInvalidatedBy(e, i), a = new Set(
|
|
3679
3679
|
t.filter((d) => d.type === "delete" && d.entityId).map((d) => d.entityId)
|
|
3680
3680
|
), c = (d) => {
|
|
3681
3681
|
for (let u = d.length - 1; u >= 0; u--)
|
|
@@ -3721,7 +3721,7 @@ const N = z.injectEndpoints({
|
|
|
3721
3721
|
);
|
|
3722
3722
|
n?.push(u);
|
|
3723
3723
|
}
|
|
3724
|
-
}, et = /* @__PURE__ */ new Map(),
|
|
3724
|
+
}, et = /* @__PURE__ */ new Map(), Dt = (t, e, s) => {
|
|
3725
3725
|
const n = `${e}:${s.join()}`, i = et.get(n);
|
|
3726
3726
|
i && clearTimeout(i), et.set(
|
|
3727
3727
|
n,
|
|
@@ -3731,11 +3731,11 @@ const N = z.injectEndpoints({
|
|
|
3731
3731
|
);
|
|
3732
3732
|
}, 500)
|
|
3733
3733
|
);
|
|
3734
|
-
},
|
|
3734
|
+
}, Be = (t, {
|
|
3735
3735
|
state: e,
|
|
3736
3736
|
dispatch: s
|
|
3737
3737
|
}, n) => {
|
|
3738
|
-
const i = $e.util.selectInvalidatedBy(e,
|
|
3738
|
+
const i = $e.util.selectInvalidatedBy(e, li(t)).filter((a) => a.endpointName === "getFolderList"), r = new Set(
|
|
3739
3739
|
t.filter((a) => a.type === "delete" && a.entityId).map((a) => a.entityId)
|
|
3740
3740
|
);
|
|
3741
3741
|
for (const a of i) {
|
|
@@ -3763,17 +3763,17 @@ const N = z.injectEndpoints({
|
|
|
3763
3763
|
);
|
|
3764
3764
|
n?.push(c);
|
|
3765
3765
|
}
|
|
3766
|
-
},
|
|
3766
|
+
}, fi = (t, {
|
|
3767
3767
|
state: e,
|
|
3768
3768
|
dispatch: s
|
|
3769
3769
|
}, n) => {
|
|
3770
|
-
const i = t.map((c) => ({ type: "entityListItem", id: c.entityId })), r =
|
|
3770
|
+
const i = t.map((c) => ({ type: "entityListItem", id: c.entityId })), r = B.util.selectInvalidatedBy(e, i), a = new Set(
|
|
3771
3771
|
t.filter((c) => c.type === "delete" && c.entityId).map((c) => c.entityId)
|
|
3772
3772
|
);
|
|
3773
3773
|
for (const c of r)
|
|
3774
3774
|
if (c.endpointName === "getListItemsInfinite") {
|
|
3775
3775
|
const d = s(
|
|
3776
|
-
|
|
3776
|
+
B.util.updateQueryData(
|
|
3777
3777
|
"getListItemsInfinite",
|
|
3778
3778
|
c.originalArgs,
|
|
3779
3779
|
(u) => {
|
|
@@ -3792,23 +3792,23 @@ const N = z.injectEndpoints({
|
|
|
3792
3792
|
);
|
|
3793
3793
|
n?.push(d);
|
|
3794
3794
|
}
|
|
3795
|
-
},
|
|
3795
|
+
}, Ot = (t) => t.reduce(
|
|
3796
3796
|
(e, s) => (e[s.type].push(s), e),
|
|
3797
3797
|
{
|
|
3798
3798
|
create: [],
|
|
3799
3799
|
update: [],
|
|
3800
3800
|
delete: []
|
|
3801
3801
|
}
|
|
3802
|
-
),
|
|
3802
|
+
), $t = Fs.enhanceEndpoints({
|
|
3803
3803
|
endpoints: {
|
|
3804
3804
|
operations: {}
|
|
3805
3805
|
}
|
|
3806
|
-
}),
|
|
3806
|
+
}), yi = $t.injectEndpoints({
|
|
3807
3807
|
endpoints: (t) => ({
|
|
3808
3808
|
updateOverviewEntities: t.mutation({
|
|
3809
3809
|
async queryFn(e, { dispatch: s }) {
|
|
3810
3810
|
try {
|
|
3811
|
-
const n = await s(
|
|
3811
|
+
const n = await s($t.endpoints.operations.initiate(e));
|
|
3812
3812
|
if (n.error)
|
|
3813
3813
|
return { error: L(n.error) };
|
|
3814
3814
|
const i = n.data, r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
@@ -3846,23 +3846,23 @@ const N = z.injectEndpoints({
|
|
|
3846
3846
|
}
|
|
3847
3847
|
), u = a(), o = [];
|
|
3848
3848
|
if (d.task?.length) {
|
|
3849
|
-
const { delete: v, update: b } =
|
|
3849
|
+
const { delete: v, update: b } = Ot(d.task), I = b.filter(
|
|
3850
3850
|
(k) => !s.some((T) => T.entityId === k.entityId)
|
|
3851
3851
|
);
|
|
3852
3852
|
Ee([...I, ...v], { state: u, dispatch: i }, o);
|
|
3853
3853
|
}
|
|
3854
3854
|
if (d.folder?.length) {
|
|
3855
|
-
const { delete: v, update: b } =
|
|
3855
|
+
const { delete: v, update: b } = Ot(d.folder), I = b.filter(
|
|
3856
3856
|
(k) => !s.some((T) => T.entityId === k.entityId)
|
|
3857
3857
|
);
|
|
3858
|
-
|
|
3858
|
+
Be([...I, ...v], { state: u, dispatch: i }, o);
|
|
3859
3859
|
}
|
|
3860
3860
|
const l = s.filter((v) => v.entityType === "task"), p = s.filter((v) => v.entityType === "folder");
|
|
3861
|
-
l.length && Ee(l, { state: u, dispatch: i }, o), p.length &&
|
|
3861
|
+
l.length && Ee(l, { state: u, dispatch: i }, o), p.length && Be(p, { state: u, dispatch: i }, o), ai(
|
|
3862
3862
|
[...c, ...s],
|
|
3863
3863
|
{ state: u, dispatch: i },
|
|
3864
3864
|
o
|
|
3865
|
-
),
|
|
3865
|
+
), fi([...c, ...s], { state: u, dispatch: i }, o), d.version?.length && oi(d.version, { state: u, dispatch: i }, o), d.product?.length && di(d.product, { state: u, dispatch: i }, o);
|
|
3866
3866
|
const f = c.map((v) => ({
|
|
3867
3867
|
id: v.entityId,
|
|
3868
3868
|
type: v.entityType
|
|
@@ -3884,7 +3884,7 @@ const N = z.injectEndpoints({
|
|
|
3884
3884
|
v.originalArgs,
|
|
3885
3885
|
(I) => {
|
|
3886
3886
|
for (const k of I)
|
|
3887
|
-
|
|
3887
|
+
us(c, k);
|
|
3888
3888
|
}
|
|
3889
3889
|
)
|
|
3890
3890
|
);
|
|
@@ -3893,35 +3893,35 @@ const N = z.injectEndpoints({
|
|
|
3893
3893
|
try {
|
|
3894
3894
|
await r;
|
|
3895
3895
|
const v = d.task || [], b = d.folder || [], I = d.version || [], k = d.product || [];
|
|
3896
|
-
if (n && ((v.length || b.length) &&
|
|
3896
|
+
if (n && ((v.length || b.length) && Dt(i, n, [
|
|
3897
3897
|
"folderColumnStats",
|
|
3898
3898
|
"taskColumnStats",
|
|
3899
3899
|
"entityListItemsColumnStats"
|
|
3900
|
-
]), (I.length || k.length) &&
|
|
3900
|
+
]), (I.length || k.length) && Dt(i, n, [
|
|
3901
3901
|
"productColumnStats",
|
|
3902
3902
|
"versionColumnStats",
|
|
3903
3903
|
"entityListItemsColumnStats"
|
|
3904
3904
|
])), v.length === 0 && b.length === 0)
|
|
3905
3905
|
return;
|
|
3906
|
-
const T =
|
|
3906
|
+
const T = _t(v), w = _t(b), A = T.map((P) => ({ type: "overviewTask", id: P })), E = x.util.selectInvalidatedBy(u, A).filter((P) => P.endpointName === "getTasksListInfinite");
|
|
3907
3907
|
if (T.length > 0 && n) {
|
|
3908
3908
|
for (const S of E)
|
|
3909
|
-
await
|
|
3909
|
+
await qn({
|
|
3910
3910
|
dispatch: i,
|
|
3911
3911
|
projectName: n,
|
|
3912
3912
|
updatedTaskIds: T,
|
|
3913
3913
|
cacheEntry: S
|
|
3914
3914
|
});
|
|
3915
|
-
const P = x.util.selectInvalidatedBy(u,
|
|
3915
|
+
const P = x.util.selectInvalidatedBy(u, A).filter((S) => S.endpointName === "getOverviewTasksByFolders");
|
|
3916
3916
|
for (const S of P)
|
|
3917
|
-
await
|
|
3917
|
+
await Hn({
|
|
3918
3918
|
dispatch: i,
|
|
3919
3919
|
projectName: n,
|
|
3920
3920
|
updatedTaskIds: T,
|
|
3921
3921
|
cacheEntry: S
|
|
3922
3922
|
});
|
|
3923
3923
|
}
|
|
3924
|
-
|
|
3924
|
+
w.length > 0 && n && i($e.util.invalidateTags([{ type: "folder", id: "LIST" }]));
|
|
3925
3925
|
} catch {
|
|
3926
3926
|
for (const b of o)
|
|
3927
3927
|
b.undo();
|
|
@@ -3953,17 +3953,17 @@ const N = z.injectEndpoints({
|
|
|
3953
3953
|
}
|
|
3954
3954
|
})
|
|
3955
3955
|
})
|
|
3956
|
-
}), { useUpdateOverviewEntitiesMutation:
|
|
3956
|
+
}), { useUpdateOverviewEntitiesMutation: $a } = yi, ct = (t) => {
|
|
3957
3957
|
if (t)
|
|
3958
3958
|
return t.label;
|
|
3959
|
-
},
|
|
3959
|
+
}, xt = {
|
|
3960
3960
|
folder: "GetFoldersLinks",
|
|
3961
3961
|
task: "GetTasksLinks",
|
|
3962
3962
|
product: "GetProductsLinks",
|
|
3963
3963
|
version: "GetVersionsLinks",
|
|
3964
3964
|
representation: "GetRepresentationsLinks",
|
|
3965
3965
|
workfile: "GetWorkfilesLinks"
|
|
3966
|
-
},
|
|
3966
|
+
}, Ut = {
|
|
3967
3967
|
folder: "folders",
|
|
3968
3968
|
task: "tasks",
|
|
3969
3969
|
product: "products",
|
|
@@ -3978,7 +3978,7 @@ const N = z.injectEndpoints({
|
|
|
3978
3978
|
const d = i(), u = JSON.stringify({ projectName: e, entityType: n }), l = d.restApi?.queries?.[a || `getEntityLinks(${u})`]?.data || [], p = new Set(l.map((v) => v.id)), f = s.filter((v) => !p?.has(v) || c);
|
|
3979
3979
|
if (f.length === 0)
|
|
3980
3980
|
return { data: l };
|
|
3981
|
-
const y =
|
|
3981
|
+
const y = xt[n], h = Ut[n];
|
|
3982
3982
|
return { data: (await r(
|
|
3983
3983
|
M.endpoints[y].initiate(
|
|
3984
3984
|
{ projectName: e, entityIds: f },
|
|
@@ -4016,7 +4016,7 @@ const N = z.injectEndpoints({
|
|
|
4016
4016
|
};
|
|
4017
4017
|
}) || [] };
|
|
4018
4018
|
} catch (d) {
|
|
4019
|
-
return console.error(`Error in getEntityLinks queryFn for ${n}:`, d),
|
|
4019
|
+
return console.error(`Error in getEntityLinks queryFn for ${n}:`, d), ss.error(`Error fetching ${n} links`), { error: L(d) };
|
|
4020
4020
|
}
|
|
4021
4021
|
},
|
|
4022
4022
|
// 2. We should not create new caches when the entityIds argument changes.
|
|
@@ -4051,7 +4051,7 @@ const N = z.injectEndpoints({
|
|
|
4051
4051
|
let c;
|
|
4052
4052
|
const d = U(
|
|
4053
4053
|
async (u, o) => {
|
|
4054
|
-
const l =
|
|
4054
|
+
const l = xt[s], p = Ut[s];
|
|
4055
4055
|
try {
|
|
4056
4056
|
await J();
|
|
4057
4057
|
const f = await a(
|
|
@@ -4105,7 +4105,7 @@ const N = z.injectEndpoints({
|
|
|
4105
4105
|
}
|
|
4106
4106
|
})
|
|
4107
4107
|
})
|
|
4108
|
-
}), { useGetEntityLinksQuery:
|
|
4108
|
+
}), { useGetEntityLinksQuery: xa } = le, ne = 10, Bt = (t) => {
|
|
4109
4109
|
if (!t) return {};
|
|
4110
4110
|
try {
|
|
4111
4111
|
return typeof t != "string" ? t ?? {} : JSON.parse(t);
|
|
@@ -4119,8 +4119,8 @@ const N = z.injectEndpoints({
|
|
|
4119
4119
|
// @ts-expect-error - entityType is string
|
|
4120
4120
|
lists: t.project.entityLists.edges.map((e) => ({
|
|
4121
4121
|
...e.node,
|
|
4122
|
-
data:
|
|
4123
|
-
attrib:
|
|
4122
|
+
data: Bt(e.node.data),
|
|
4123
|
+
attrib: Bt(e.node.allAttrib)
|
|
4124
4124
|
})),
|
|
4125
4125
|
pageInfo: t.project.entityLists.pageInfo
|
|
4126
4126
|
}),
|
|
@@ -4152,7 +4152,7 @@ const N = z.injectEndpoints({
|
|
|
4152
4152
|
keepUnusedDataFor: ne
|
|
4153
4153
|
}
|
|
4154
4154
|
}
|
|
4155
|
-
}),
|
|
4155
|
+
}), B = Re.injectEndpoints({
|
|
4156
4156
|
endpoints: (t) => ({
|
|
4157
4157
|
getListsInfinite: t.infiniteQuery({
|
|
4158
4158
|
infiniteQueryOptions: {
|
|
@@ -4220,7 +4220,6 @@ const N = z.injectEndpoints({
|
|
|
4220
4220
|
allAttrib: "",
|
|
4221
4221
|
attrib: {},
|
|
4222
4222
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4223
|
-
updatedAt: "",
|
|
4224
4223
|
active: !0,
|
|
4225
4224
|
access: "",
|
|
4226
4225
|
accessLevel: 30,
|
|
@@ -4231,8 +4230,8 @@ const N = z.injectEndpoints({
|
|
|
4231
4230
|
entityListType: p.entity_list_type,
|
|
4232
4231
|
count: p.count,
|
|
4233
4232
|
entityListFolderId: p.entity_list_folder_id ?? null,
|
|
4234
|
-
|
|
4235
|
-
|
|
4233
|
+
// the event's own timestamps have no timezone, so the client clock is the closer estimate
|
|
4234
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4236
4235
|
owner: h?.owner || ""
|
|
4237
4236
|
// mainly to shut up typescript
|
|
4238
4237
|
});
|
|
@@ -4332,8 +4331,8 @@ const N = z.injectEndpoints({
|
|
|
4332
4331
|
r((b) => {
|
|
4333
4332
|
b?.pages && v.forEach((I) => {
|
|
4334
4333
|
b.pages.forEach((k) => {
|
|
4335
|
-
(k.items || []).forEach((
|
|
4336
|
-
|
|
4334
|
+
(k.items || []).forEach((w) => {
|
|
4335
|
+
w.entityId === I.summary.entityId && w.entityType === I.summary.entityType && I.summary.thumbnailHash && (w.thumbnailHash = I.summary.thumbnailHash);
|
|
4337
4336
|
});
|
|
4338
4337
|
});
|
|
4339
4338
|
});
|
|
@@ -4403,7 +4402,7 @@ const N = z.injectEndpoints({
|
|
|
4403
4402
|
keepUnusedDataFor: ne
|
|
4404
4403
|
})
|
|
4405
4404
|
})
|
|
4406
|
-
}),
|
|
4405
|
+
}), gi = ue.enhanceEndpoints({
|
|
4407
4406
|
endpoints: {
|
|
4408
4407
|
getEntityList: {
|
|
4409
4408
|
providesTags: (t, e, { listId: s, projectName: n }) => [
|
|
@@ -4421,12 +4420,12 @@ const N = z.injectEndpoints({
|
|
|
4421
4420
|
}
|
|
4422
4421
|
}
|
|
4423
4422
|
}), {
|
|
4424
|
-
useGetListsInfiniteInfiniteQuery:
|
|
4425
|
-
useGetListItemsInfiniteInfiniteQuery:
|
|
4426
|
-
useGetListsItemsForReviewSessionInfiniteQuery:
|
|
4427
|
-
useLazyGetListsItemsForReviewSessionQuery:
|
|
4428
|
-
useLazyGetListItemsQuery:
|
|
4429
|
-
} =
|
|
4423
|
+
useGetListsInfiniteInfiniteQuery: Ua,
|
|
4424
|
+
useGetListItemsInfiniteInfiniteQuery: Ba,
|
|
4425
|
+
useGetListsItemsForReviewSessionInfiniteQuery: qa,
|
|
4426
|
+
useLazyGetListsItemsForReviewSessionQuery: Ha,
|
|
4427
|
+
useLazyGetListItemsQuery: Wa
|
|
4428
|
+
} = B, { useGetEntityListQuery: za } = gi, hi = ue.enhanceEndpoints({
|
|
4430
4429
|
endpoints: {
|
|
4431
4430
|
// LIST MUTATIONS
|
|
4432
4431
|
createEntityList: {
|
|
@@ -4434,11 +4433,11 @@ const N = z.injectEndpoints({
|
|
|
4434
4433
|
},
|
|
4435
4434
|
updateEntityList: {
|
|
4436
4435
|
async onQueryStarted({ listId: t, entityListPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
|
|
4437
|
-
const r = i(), a = [{ type: "entityList", id: t }], c =
|
|
4436
|
+
const r = i(), a = [{ type: "entityList", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((o) => o.endpointName === "getListsInfinite");
|
|
4438
4437
|
let d = [];
|
|
4439
4438
|
for (const o of c) {
|
|
4440
4439
|
const l = s(
|
|
4441
|
-
|
|
4440
|
+
B.util.updateQueryData("getListsInfinite", o.originalArgs, (p) => {
|
|
4442
4441
|
for (const f of p.pages) {
|
|
4443
4442
|
const y = f.lists.findIndex((h) => h.id === t);
|
|
4444
4443
|
if (y !== -1) {
|
|
@@ -4479,7 +4478,7 @@ const N = z.injectEndpoints({
|
|
|
4479
4478
|
// LIST ITEM MUTATIONS
|
|
4480
4479
|
updateEntityListItems: {
|
|
4481
4480
|
async onQueryStarted({ listId: t, entityListMultiPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
|
|
4482
|
-
const r = i(), a = [{ type: "entityListItem", id: t }], c =
|
|
4481
|
+
const r = i(), a = [{ type: "entityListItem", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
|
|
4483
4482
|
let d = [];
|
|
4484
4483
|
if (!e.items || e.items.length === 0) {
|
|
4485
4484
|
await n;
|
|
@@ -4488,7 +4487,7 @@ const N = z.injectEndpoints({
|
|
|
4488
4487
|
for (const u of c) {
|
|
4489
4488
|
if (u.originalArgs.listId !== t) continue;
|
|
4490
4489
|
const o = s(
|
|
4491
|
-
|
|
4490
|
+
B.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
|
|
4492
4491
|
let p = !1;
|
|
4493
4492
|
for (const f of l.pages)
|
|
4494
4493
|
e.items?.forEach((y) => {
|
|
@@ -4552,11 +4551,11 @@ const N = z.injectEndpoints({
|
|
|
4552
4551
|
},
|
|
4553
4552
|
updateEntityListItem: {
|
|
4554
4553
|
async onQueryStarted({ listItemId: t, entityListItemPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
|
|
4555
|
-
const r = i(), a = [{ type: "entityListItem", id: t }], c =
|
|
4554
|
+
const r = i(), a = [{ type: "entityListItem", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
|
|
4556
4555
|
let d = [];
|
|
4557
4556
|
for (const u of c) {
|
|
4558
4557
|
const o = s(
|
|
4559
|
-
|
|
4558
|
+
B.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
|
|
4560
4559
|
for (const p of l.pages) {
|
|
4561
4560
|
const f = p.items.findIndex((y) => y.id === t);
|
|
4562
4561
|
if (f !== -1) {
|
|
@@ -4609,7 +4608,7 @@ const N = z.injectEndpoints({
|
|
|
4609
4608
|
]
|
|
4610
4609
|
}
|
|
4611
4610
|
}
|
|
4612
|
-
}),
|
|
4611
|
+
}), mi = hi.injectEndpoints({
|
|
4613
4612
|
endpoints: (t) => ({
|
|
4614
4613
|
createSessionFromList: t.mutation({
|
|
4615
4614
|
query: (e) => ({
|
|
@@ -4622,21 +4621,21 @@ const N = z.injectEndpoints({
|
|
|
4622
4621
|
})
|
|
4623
4622
|
}), {
|
|
4624
4623
|
// LIST MUTATIONS
|
|
4625
|
-
useCreateEntityListMutation:
|
|
4626
|
-
useUpdateEntityListMutation:
|
|
4627
|
-
useDeleteEntityListMutation:
|
|
4624
|
+
useCreateEntityListMutation: Ka,
|
|
4625
|
+
useUpdateEntityListMutation: Ja,
|
|
4626
|
+
useDeleteEntityListMutation: Ya,
|
|
4628
4627
|
// LIST ITEM MUTATIONS
|
|
4629
|
-
useUpdateEntityListItemsMutation:
|
|
4630
|
-
useUpdateEntityListItemMutation:
|
|
4631
|
-
useCreateEntityListItemMutation:
|
|
4632
|
-
useDeleteEntityListItemMutation:
|
|
4628
|
+
useUpdateEntityListItemsMutation: Xa,
|
|
4629
|
+
useUpdateEntityListItemMutation: Za,
|
|
4630
|
+
useCreateEntityListItemMutation: eo,
|
|
4631
|
+
useDeleteEntityListItemMutation: to,
|
|
4633
4632
|
// REVIEW SESSION MUTATIONS
|
|
4634
|
-
useCreateSessionFromListMutation:
|
|
4635
|
-
} =
|
|
4633
|
+
useCreateSessionFromListMutation: so
|
|
4634
|
+
} = mi, Ht = 5, Te = (t) => (t || "").replace(/-/g, ""), vi = (t, e, s) => {
|
|
4636
4635
|
Array.isArray(t.latestComments) || (t.latestComments = []);
|
|
4637
4636
|
const n = t.latestComments, i = Te(e.activityId), r = n.findIndex((a) => Te(a.activityId) === i);
|
|
4638
|
-
s === "delete" ? r !== -1 && n.splice(r, 1) : s === "update" ? r !== -1 && (n[r].body = e.body) : (r !== -1 && n.splice(r, 1), n.unshift(e), n.length >
|
|
4639
|
-
},
|
|
4637
|
+
s === "delete" ? r !== -1 && n.splice(r, 1) : s === "update" ? r !== -1 && (n[r].body = e.body) : (r !== -1 && n.splice(r, 1), n.unshift(e), n.length > Ht && n.splice(Ht));
|
|
4638
|
+
}, bi = [
|
|
4640
4639
|
{
|
|
4641
4640
|
api: x,
|
|
4642
4641
|
tag: "overviewTask",
|
|
@@ -4647,7 +4646,7 @@ const N = z.injectEndpoints({
|
|
|
4647
4646
|
}
|
|
4648
4647
|
},
|
|
4649
4648
|
{
|
|
4650
|
-
api:
|
|
4649
|
+
api: B,
|
|
4651
4650
|
tag: "entityListItem",
|
|
4652
4651
|
selectors: {
|
|
4653
4652
|
getListItemsInfinite: (t) => t?.pages?.flatMap((e) => e.items ?? []) ?? []
|
|
@@ -4663,7 +4662,7 @@ const N = z.injectEndpoints({
|
|
|
4663
4662
|
getProductsInfinite: (t) => (t?.pages?.flatMap((e) => e.products ?? []) ?? []).map((e) => e.featuredVersion).filter(Boolean)
|
|
4664
4663
|
}
|
|
4665
4664
|
}
|
|
4666
|
-
],
|
|
4665
|
+
], Ii = (t, { dispatch: e, getState: s }, n) => {
|
|
4667
4666
|
const { patch: i } = t, r = t.entityId ?? i?.entityId, a = i?.activityId ?? t.activityId;
|
|
4668
4667
|
if (!r || !a) return [];
|
|
4669
4668
|
if (n === "create" && !(i?.activityType === "comment" && i?.referenceType === "origin"))
|
|
@@ -4676,7 +4675,7 @@ const N = z.injectEndpoints({
|
|
|
4676
4675
|
author: i?.authorName ?? null,
|
|
4677
4676
|
createdAt: i?.createdAt ?? ""
|
|
4678
4677
|
}, d = s(), u = Te(r), o = [];
|
|
4679
|
-
for (const { api: l, tag: p, selectors: f } of
|
|
4678
|
+
for (const { api: l, tag: p, selectors: f } of bi) {
|
|
4680
4679
|
const y = l.util.selectInvalidatedBy(d, [{ type: p, id: r }]);
|
|
4681
4680
|
for (const { endpointName: h, originalArgs: g } of y) {
|
|
4682
4681
|
const m = f[h];
|
|
@@ -4684,14 +4683,14 @@ const N = z.injectEndpoints({
|
|
|
4684
4683
|
e(
|
|
4685
4684
|
l.util.updateQueryData(h, g, (v) => {
|
|
4686
4685
|
for (const b of m(v))
|
|
4687
|
-
(Te(b?.id) === u || Te(b?.entityId) === u) &&
|
|
4686
|
+
(Te(b?.id) === u || Te(b?.entityId) === u) && vi(b, c, n);
|
|
4688
4687
|
})
|
|
4689
4688
|
)
|
|
4690
4689
|
);
|
|
4691
4690
|
}
|
|
4692
4691
|
}
|
|
4693
4692
|
return o;
|
|
4694
|
-
},
|
|
4693
|
+
}, Ti = (t) => t ? t.includes("* [ ]") || t.includes("* [x]") : !1, ki = async (t, {
|
|
4695
4694
|
updateCachedData: e,
|
|
4696
4695
|
cacheDataLoaded: s,
|
|
4697
4696
|
cacheEntryRemoved: n,
|
|
@@ -4704,20 +4703,20 @@ const N = z.injectEndpoints({
|
|
|
4704
4703
|
async (o, l) => {
|
|
4705
4704
|
const p = Array.isArray(t.entityIds) ? t.entityIds : [t.entityIds], f = ["origin", "mention", "relation"], y = t.activityTypes, h = Array.isArray(y) ? y : y ? [y] : [], g = [], m = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
|
|
4706
4705
|
o.forEach(({ topic: k, message: T }) => {
|
|
4707
|
-
const
|
|
4708
|
-
if (!
|
|
4709
|
-
const
|
|
4710
|
-
if (!(!p.some((P) =>
|
|
4706
|
+
const w = T.summary?.activity_id;
|
|
4707
|
+
if (!w) return;
|
|
4708
|
+
const A = (T.summary?.references || []).filter((P) => f.includes(P.reference_type)).map((P) => P.entity_id);
|
|
4709
|
+
if (!(!p.some((P) => A.includes(P)) && p.length > 0)) {
|
|
4711
4710
|
if (k === "activity.deleted") {
|
|
4712
|
-
g.push(
|
|
4711
|
+
g.push(w);
|
|
4713
4712
|
return;
|
|
4714
4713
|
}
|
|
4715
|
-
T.summary?.activity_type && (v.add(
|
|
4714
|
+
T.summary?.activity_type && (v.add(w), m.set(w, k), A.forEach((P) => b.add(P)));
|
|
4716
4715
|
}
|
|
4717
4716
|
}), g.length && e((k) => {
|
|
4718
4717
|
k.pages?.forEach((T) => {
|
|
4719
4718
|
T.activities = T.activities?.filter(
|
|
4720
|
-
(
|
|
4719
|
+
(w) => !g.includes(w.activityId)
|
|
4721
4720
|
);
|
|
4722
4721
|
});
|
|
4723
4722
|
});
|
|
@@ -4737,18 +4736,18 @@ const N = z.injectEndpoints({
|
|
|
4737
4736
|
);
|
|
4738
4737
|
if ("error" in T && T.error) throw new Error("Failed to fetch activities");
|
|
4739
4738
|
if (!l()) return;
|
|
4740
|
-
const
|
|
4741
|
-
|
|
4739
|
+
const w = T.data?.activities || [], A = new Map(
|
|
4740
|
+
w.map((E) => [E.activityId, E])
|
|
4742
4741
|
);
|
|
4743
4742
|
e((E) => {
|
|
4744
|
-
|
|
4743
|
+
A.forEach((P, S) => {
|
|
4745
4744
|
const j = [P.activityType];
|
|
4746
|
-
if (P.activityType === "comment" &&
|
|
4745
|
+
if (P.activityType === "comment" && Ti(P.body || "") && j.push("checklist"), h.length > 0 && !h.some(($) => j.includes($)))
|
|
4747
4746
|
return;
|
|
4748
4747
|
let _ = !1;
|
|
4749
4748
|
if (E.pages?.forEach(($) => {
|
|
4750
4749
|
const C = $.activities?.findIndex(
|
|
4751
|
-
(
|
|
4750
|
+
(Ss) => Ss.activityId === S
|
|
4752
4751
|
);
|
|
4753
4752
|
C !== void 0 && C !== -1 && $.activities && ($.activities[C] = P, _ = !0);
|
|
4754
4753
|
}), !_ && m.get(S) === "activity.created" && E.pages?.[0]?.activities?.unshift(P), P.activityType !== "status.change" || P.origin?.type !== "version")
|
|
@@ -4806,14 +4805,14 @@ const N = z.injectEndpoints({
|
|
|
4806
4805
|
endpoints: {
|
|
4807
4806
|
// Only used by the infinite query below
|
|
4808
4807
|
GetActivities: {
|
|
4809
|
-
transformResponse: (t) =>
|
|
4810
|
-
providesTags:
|
|
4808
|
+
transformResponse: (t) => It(t.project.activities.edges, t.project.activities.pageInfo),
|
|
4809
|
+
providesTags: rs
|
|
4811
4810
|
},
|
|
4812
4811
|
GetActivitiesById: {
|
|
4813
|
-
transformResponse: (t) =>
|
|
4812
|
+
transformResponse: (t) => It(t.project.activities.edges, t.project.activities.pageInfo)
|
|
4814
4813
|
},
|
|
4815
4814
|
GetEntitiesChecklists: {
|
|
4816
|
-
transformResponse: (t) =>
|
|
4815
|
+
transformResponse: (t) => un(t),
|
|
4817
4816
|
providesTags: (t, e, { entityIds: s }) => t ? [
|
|
4818
4817
|
{ type: "activity", id: "LIST" },
|
|
4819
4818
|
...t.ids.map((n) => ({ type: "activity", id: "checklist-" + n })),
|
|
@@ -4828,18 +4827,18 @@ const N = z.injectEndpoints({
|
|
|
4828
4827
|
providesTags: (t) => t?.length ? [{ type: "user", id: "LIST" }, ...t.map(({ name: e }) => ({ type: "user", id: e }))] : [{ type: "user", id: "LIST" }]
|
|
4829
4828
|
}
|
|
4830
4829
|
}
|
|
4831
|
-
}),
|
|
4830
|
+
}), Wt = 30, ye = st.injectEndpoints({
|
|
4832
4831
|
endpoints: (t) => ({
|
|
4833
4832
|
getActivitiesInfinite: t.infiniteQuery({
|
|
4834
4833
|
infiniteQueryOptions: {
|
|
4835
|
-
initialPageParam: { cursor: "", last:
|
|
4834
|
+
initialPageParam: { cursor: "", last: Wt },
|
|
4836
4835
|
// Calculate the next page param based on current page response and params
|
|
4837
4836
|
getNextPageParam: (e) => {
|
|
4838
4837
|
const s = e.pageInfo;
|
|
4839
4838
|
if (!(!s.hasPreviousPage || !s.endCursor))
|
|
4840
4839
|
return {
|
|
4841
4840
|
cursor: s.endCursor,
|
|
4842
|
-
last:
|
|
4841
|
+
last: Wt
|
|
4843
4842
|
};
|
|
4844
4843
|
}
|
|
4845
4844
|
},
|
|
@@ -4872,7 +4871,7 @@ const N = z.injectEndpoints({
|
|
|
4872
4871
|
}
|
|
4873
4872
|
},
|
|
4874
4873
|
async onCacheEntryAdded(e, { updateCachedData: s, cacheDataLoaded: n, cacheEntryRemoved: i, dispatch: r, getCacheEntry: a }) {
|
|
4875
|
-
await
|
|
4874
|
+
await ki(e, {
|
|
4876
4875
|
updateCachedData: s,
|
|
4877
4876
|
cacheDataLoaded: n,
|
|
4878
4877
|
cacheEntryRemoved: i,
|
|
@@ -4881,7 +4880,7 @@ const N = z.injectEndpoints({
|
|
|
4881
4880
|
gqlApi: st
|
|
4882
4881
|
});
|
|
4883
4882
|
},
|
|
4884
|
-
providesTags:
|
|
4883
|
+
providesTags: rs
|
|
4885
4884
|
}),
|
|
4886
4885
|
// get data for a reference tooltip based on type,id and projectName
|
|
4887
4886
|
getEntityTooltip: t.query({
|
|
@@ -4889,24 +4888,24 @@ const N = z.injectEndpoints({
|
|
|
4889
4888
|
url: "/graphql",
|
|
4890
4889
|
method: "POST",
|
|
4891
4890
|
body: {
|
|
4892
|
-
query:
|
|
4891
|
+
query: fn(n),
|
|
4893
4892
|
variables: { projectName: e, entityId: s }
|
|
4894
4893
|
}
|
|
4895
4894
|
}),
|
|
4896
|
-
transformResponse: (e, s, { entityType: n }) =>
|
|
4897
|
-
providesTags: (e, s, { entityType: n }) =>
|
|
4895
|
+
transformResponse: (e, s, { entityType: n }) => dn(e?.data?.project, n),
|
|
4896
|
+
providesTags: (e, s, { entityType: n }) => ln([e], "task", n)
|
|
4898
4897
|
})
|
|
4899
4898
|
}),
|
|
4900
4899
|
overrideExisting: !0
|
|
4901
4900
|
}), {
|
|
4902
|
-
useGetEntityTooltipQuery:
|
|
4903
|
-
useGetActivitiesByIdQuery:
|
|
4904
|
-
useLazyGetActivitiesByIdQuery:
|
|
4905
|
-
useGetEntitiesChecklistsQuery:
|
|
4906
|
-
useGetActivitiesQuery:
|
|
4907
|
-
useGetActivitiesInfiniteInfiniteQuery:
|
|
4908
|
-
useGetActivityUsersQuery:
|
|
4909
|
-
} = ye,
|
|
4901
|
+
useGetEntityTooltipQuery: no,
|
|
4902
|
+
useGetActivitiesByIdQuery: io,
|
|
4903
|
+
useLazyGetActivitiesByIdQuery: ro,
|
|
4904
|
+
useGetEntitiesChecklistsQuery: ao,
|
|
4905
|
+
useGetActivitiesQuery: oo,
|
|
4906
|
+
useGetActivitiesInfiniteInfiniteQuery: co,
|
|
4907
|
+
useGetActivityUsersQuery: uo
|
|
4908
|
+
} = ye, wi = (t, e, s) => {
|
|
4910
4909
|
if (s)
|
|
4911
4910
|
for (const n of t.pages) {
|
|
4912
4911
|
const i = n.activities.findIndex((r) => r.activityId === e.activityId);
|
|
@@ -4926,12 +4925,12 @@ const N = z.injectEndpoints({
|
|
|
4926
4925
|
}
|
|
4927
4926
|
!n && t.pages.length > 0 && t.pages[0].activities.unshift(e);
|
|
4928
4927
|
}
|
|
4929
|
-
},
|
|
4928
|
+
}, Ai = (t) => t == null ? "" : typeof t == "string" ? t : JSON.stringify(t), nt = async ({ patch: t, entityIds: e = [], filter: s, refs: n = [], ...i }, r, a) => {
|
|
4930
4929
|
const { dispatch: c, queryFulfilled: d, getState: u } = r, o = n.map((g) => g.id) || [];
|
|
4931
|
-
|
|
4930
|
+
Ai(s);
|
|
4932
4931
|
const l = [...e, ...o].map((g) => ({
|
|
4933
4932
|
type: "entityActivities",
|
|
4934
|
-
id: g + "-" +
|
|
4933
|
+
id: g + "-" + is(s)
|
|
4935
4934
|
})), p = u(), f = ye.util.selectInvalidatedBy(p, l);
|
|
4936
4935
|
a !== "delete" && t.data && (t.activityData = { ...t.activityData, ...t.data });
|
|
4937
4936
|
const y = f.map(
|
|
@@ -4939,10 +4938,10 @@ const N = z.injectEndpoints({
|
|
|
4939
4938
|
ye.util.updateQueryData(
|
|
4940
4939
|
"getActivitiesInfinite",
|
|
4941
4940
|
g,
|
|
4942
|
-
(m) =>
|
|
4941
|
+
(m) => wi(m, t, a === "delete")
|
|
4943
4942
|
)
|
|
4944
4943
|
)
|
|
4945
|
-
), h =
|
|
4944
|
+
), h = Ii(
|
|
4946
4945
|
{ patch: t, ...i },
|
|
4947
4946
|
r,
|
|
4948
4947
|
a
|
|
@@ -4959,7 +4958,7 @@ const N = z.injectEndpoints({
|
|
|
4959
4958
|
id: t + "-" + i
|
|
4960
4959
|
}));
|
|
4961
4960
|
return n.push({ type: "activity", id: "LIST" }), n.push({ type: "watchers", id: t }), n;
|
|
4962
|
-
},
|
|
4961
|
+
}, Ei = ye.injectEndpoints({
|
|
4963
4962
|
endpoints: (t) => ({
|
|
4964
4963
|
createEntityActivity: t.mutation({
|
|
4965
4964
|
query: ({ projectName: e, entityType: s, entityId: n, data: i = {} }) => ({
|
|
@@ -5000,10 +4999,10 @@ const N = z.injectEndpoints({
|
|
|
5000
4999
|
}),
|
|
5001
5000
|
overrideExisting: !0
|
|
5002
5001
|
}), {
|
|
5003
|
-
useCreateEntityActivityMutation:
|
|
5004
|
-
useDeleteActivityMutation:
|
|
5005
|
-
useUpdateActivityMutation:
|
|
5006
|
-
} =
|
|
5002
|
+
useCreateEntityActivityMutation: lo,
|
|
5003
|
+
useDeleteActivityMutation: po,
|
|
5004
|
+
useUpdateActivityMutation: fo
|
|
5005
|
+
} = Ei, zt = ({ activityId: t, userName: e, reaction: s }, { getState: n, dispatch: i }, r) => {
|
|
5007
5006
|
const a = [{ type: "activity", id: t }];
|
|
5008
5007
|
return ye.util.selectInvalidatedBy(n(), a).map((d) => i(
|
|
5009
5008
|
// @ts-ignore
|
|
@@ -5041,11 +5040,11 @@ const N = z.injectEndpoints({
|
|
|
5041
5040
|
}
|
|
5042
5041
|
)
|
|
5043
5042
|
));
|
|
5044
|
-
},
|
|
5043
|
+
}, Si = Pe.enhanceEndpoints({
|
|
5045
5044
|
endpoints: {
|
|
5046
5045
|
createReactionToActivity: {
|
|
5047
5046
|
async onQueryStarted(t, { getState: e, dispatch: s, queryFulfilled: n }) {
|
|
5048
|
-
const i =
|
|
5047
|
+
const i = zt(
|
|
5049
5048
|
{
|
|
5050
5049
|
activityId: t.activityId,
|
|
5051
5050
|
// @ts-ignore
|
|
@@ -5065,7 +5064,7 @@ const N = z.injectEndpoints({
|
|
|
5065
5064
|
},
|
|
5066
5065
|
deleteReactionToActivity: {
|
|
5067
5066
|
async onQueryStarted(t, { getState: e, dispatch: s, queryFulfilled: n }) {
|
|
5068
|
-
const i =
|
|
5067
|
+
const i = zt(
|
|
5069
5068
|
// @ts-ignore
|
|
5070
5069
|
{ activityId: t.activityId, userName: t.userName, reaction: t.reaction },
|
|
5071
5070
|
{ getState: e, dispatch: s },
|
|
@@ -5080,23 +5079,23 @@ const N = z.injectEndpoints({
|
|
|
5080
5079
|
}
|
|
5081
5080
|
}
|
|
5082
5081
|
}
|
|
5083
|
-
}), { useCreateReactionToActivityMutation:
|
|
5082
|
+
}), { useCreateReactionToActivityMutation: yo, useDeleteReactionToActivityMutation: go } = Si, Kt = Pe.enhanceEndpoints({
|
|
5084
5083
|
endpoints: {
|
|
5085
5084
|
suggestEntityMention: {}
|
|
5086
5085
|
}
|
|
5087
|
-
}),
|
|
5086
|
+
}), Pi = Kt.injectEndpoints({
|
|
5088
5087
|
endpoints: (t) => ({
|
|
5089
5088
|
getEntityMentions: t.query({
|
|
5090
5089
|
queryFn: async (e, { dispatch: s }) => {
|
|
5091
5090
|
const n = await s(
|
|
5092
|
-
|
|
5091
|
+
Kt.endpoints.suggestEntityMention.initiate(e)
|
|
5093
5092
|
);
|
|
5094
5093
|
return n.error ? { error: L(n.error) } : { data: n.data };
|
|
5095
5094
|
},
|
|
5096
5095
|
providesTags: [{ type: "team", id: "LIST" }]
|
|
5097
5096
|
})
|
|
5098
5097
|
})
|
|
5099
|
-
}), { useGetEntityMentionsQuery:
|
|
5098
|
+
}), { useGetEntityMentionsQuery: ho } = Pi, dt = { type: "category", id: "LIST" }, ut = { type: "addonSettings", id: "powerpack" }, lt = Pe.enhanceEndpoints({
|
|
5100
5099
|
endpoints: {
|
|
5101
5100
|
getActivityCategories: {
|
|
5102
5101
|
transformResponse: (t) => t.categories,
|
|
@@ -5107,7 +5106,7 @@ const N = z.injectEndpoints({
|
|
|
5107
5106
|
] : [dt, ut]
|
|
5108
5107
|
}
|
|
5109
5108
|
}
|
|
5110
|
-
}),
|
|
5109
|
+
}), Li = lt.injectEndpoints({
|
|
5111
5110
|
endpoints: (t) => ({
|
|
5112
5111
|
getProjectsCategories: t.query({
|
|
5113
5112
|
async queryFn({ projects: e = [] }, { dispatch: s }) {
|
|
@@ -5128,86 +5127,33 @@ const N = z.injectEndpoints({
|
|
|
5128
5127
|
providesTags: [dt, ut]
|
|
5129
5128
|
})
|
|
5130
5129
|
})
|
|
5131
|
-
}), { useGetActivityCategoriesQuery:
|
|
5130
|
+
}), { useGetActivityCategoriesQuery: mo } = lt, { useGetProjectsCategoriesQuery: vo } = Li, bs = _s.enhanceEndpoints({
|
|
5132
5131
|
endpoints: {
|
|
5133
5132
|
listAddons: {
|
|
5134
5133
|
providesTags: ["addonList"]
|
|
5135
5134
|
}
|
|
5136
5135
|
}
|
|
5137
|
-
}), { useListAddonsQuery:
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
}
|
|
5159
|
-
return s;
|
|
5160
|
-
}
|
|
5161
|
-
}),
|
|
5162
|
-
// Return a list of addons with settings-scoped frontend
|
|
5163
|
-
getSettingsAddons: t.query({
|
|
5164
|
-
query: () => ({
|
|
5165
|
-
url: "/api/addons",
|
|
5166
|
-
method: "GET"
|
|
5167
|
-
}),
|
|
5168
|
-
providesTags: ["settingsAddons"],
|
|
5169
|
-
transformResponse: (e) => {
|
|
5170
|
-
let s = [];
|
|
5171
|
-
for (const n of e.addons) {
|
|
5172
|
-
const i = n.versions[n.productionVersion];
|
|
5173
|
-
if (!i) continue;
|
|
5174
|
-
const r = i.frontendScopes.settings;
|
|
5175
|
-
r && s.push({
|
|
5176
|
-
name: n.name,
|
|
5177
|
-
title: n.title,
|
|
5178
|
-
version: n.productionVersion,
|
|
5179
|
-
settings: r
|
|
5180
|
-
});
|
|
5181
|
-
}
|
|
5182
|
-
return s;
|
|
5183
|
-
}
|
|
5184
|
-
}),
|
|
5185
|
-
// Return a list of addons with dashboard-scoped frontend
|
|
5186
|
-
getDashboardAddons: t.query({
|
|
5187
|
-
query: () => ({
|
|
5188
|
-
url: "/api/addons",
|
|
5189
|
-
method: "GET"
|
|
5190
|
-
}),
|
|
5191
|
-
providesTags: ["dashboardAddons"],
|
|
5192
|
-
transformResponse: (e) => {
|
|
5193
|
-
let s = [];
|
|
5194
|
-
for (const n of e.addons) {
|
|
5195
|
-
const i = n.versions[n.productionVersion];
|
|
5196
|
-
if (!i) continue;
|
|
5197
|
-
const r = i.frontendScopes.dashboard;
|
|
5198
|
-
r && s.push({
|
|
5199
|
-
name: n.name,
|
|
5200
|
-
title: n.title,
|
|
5201
|
-
version: n.productionVersion,
|
|
5202
|
-
settings: r
|
|
5203
|
-
});
|
|
5204
|
-
}
|
|
5205
|
-
return s;
|
|
5206
|
-
}
|
|
5207
|
-
})
|
|
5208
|
-
}),
|
|
5209
|
-
overrideExisting: !0
|
|
5210
|
-
}), { useGetProjectAddonsQuery: mo, useGetSettingsAddonsQuery: vo, useGetDashboardAddonsQuery: bo } = bs, rt = bs.enhanceEndpoints({
|
|
5136
|
+
}), { useListAddonsQuery: ji } = bs, Fi = (t, e) => {
|
|
5137
|
+
const s = [];
|
|
5138
|
+
for (const n of t.addons) {
|
|
5139
|
+
const i = n.versions[n.productionVersion];
|
|
5140
|
+
if (!i) continue;
|
|
5141
|
+
const r = i.frontendScopes?.[e];
|
|
5142
|
+
r && s.push({
|
|
5143
|
+
name: n.name,
|
|
5144
|
+
title: n.title,
|
|
5145
|
+
version: n.productionVersion,
|
|
5146
|
+
settings: r
|
|
5147
|
+
});
|
|
5148
|
+
}
|
|
5149
|
+
return s;
|
|
5150
|
+
}, vt = (t) => (e, s) => {
|
|
5151
|
+
const n = ji({}, s), i = Js(
|
|
5152
|
+
() => n.data ? Fi(n.data, t) : void 0,
|
|
5153
|
+
[n.data]
|
|
5154
|
+
);
|
|
5155
|
+
return { ...n, data: i };
|
|
5156
|
+
}, bo = vt("project"), Io = vt("settings"), To = vt("dashboard"), rt = bs.enhanceEndpoints({
|
|
5211
5157
|
endpoints: {
|
|
5212
5158
|
deleteAddonVersion: {
|
|
5213
5159
|
invalidatesTags: ["addonList"]
|
|
@@ -5271,7 +5217,7 @@ const N = z.injectEndpoints({
|
|
|
5271
5217
|
}),
|
|
5272
5218
|
// endpoints
|
|
5273
5219
|
overrideExisting: !0
|
|
5274
|
-
}), { useDeleteAddonVersionsMutation:
|
|
5220
|
+
}), { useDeleteAddonVersionsMutation: ko, useDownloadAddonsMutation: wo } = Is, Ts = Rs.enhanceEndpoints({
|
|
5275
5221
|
endpoints: {
|
|
5276
5222
|
getAttributeList: {
|
|
5277
5223
|
transformResponse: (t) => t.attributes || [],
|
|
@@ -5284,7 +5230,7 @@ const N = z.injectEndpoints({
|
|
|
5284
5230
|
]
|
|
5285
5231
|
}
|
|
5286
5232
|
}
|
|
5287
|
-
}), { useGetAttributeListQuery:
|
|
5233
|
+
}), { useGetAttributeListQuery: Ao, useGetAttributeConfigQuery: Eo } = Ts, _i = Ts.enhanceEndpoints({
|
|
5288
5234
|
endpoints: {
|
|
5289
5235
|
setAttributeList: {
|
|
5290
5236
|
invalidatesTags: ["attribute"]
|
|
@@ -5296,21 +5242,21 @@ const N = z.injectEndpoints({
|
|
|
5296
5242
|
invalidatesTags: (t, e, { attributeName: s }) => [{ type: "attribute", id: s }]
|
|
5297
5243
|
}
|
|
5298
5244
|
}
|
|
5299
|
-
}), { useSetAttributeListMutation:
|
|
5245
|
+
}), { useSetAttributeListMutation: So, usePatchAttributeConfigMutation: Po } = _i, Ri = Gs.enhanceEndpoints({
|
|
5300
5246
|
endpoints: {
|
|
5301
5247
|
createSession: {},
|
|
5302
5248
|
getUserPools: {
|
|
5303
5249
|
providesTags: [{ type: "userPool", id: "LIST" }]
|
|
5304
5250
|
}
|
|
5305
5251
|
}
|
|
5306
|
-
}), { useCreateSessionMutation:
|
|
5252
|
+
}), { useCreateSessionMutation: Lo, useGetUserPoolsQuery: jo } = Ri, pt = Cs.enhanceEndpoints({
|
|
5307
5253
|
endpoints: {
|
|
5308
5254
|
listBundles: {
|
|
5309
5255
|
providesTags: () => [{ type: "bundleList" }]
|
|
5310
5256
|
},
|
|
5311
5257
|
checkBundleCompatibility: {}
|
|
5312
5258
|
}
|
|
5313
|
-
}),
|
|
5259
|
+
}), Gi = Se.enhanceEndpoints({
|
|
5314
5260
|
endpoints: {
|
|
5315
5261
|
getProjectBundleInfo: {
|
|
5316
5262
|
providesTags: (t, e, { projectName: s }) => [
|
|
@@ -5319,7 +5265,7 @@ const N = z.injectEndpoints({
|
|
|
5319
5265
|
]
|
|
5320
5266
|
}
|
|
5321
5267
|
}
|
|
5322
|
-
}), { useListBundlesQuery:
|
|
5268
|
+
}), { useListBundlesQuery: Fo, useLazyListBundlesQuery: _o, useCheckBundleCompatibilityQuery: Ro } = pt, { useGetProjectBundleInfoQuery: Go } = Gi, Ci = pt.enhanceEndpoints({
|
|
5323
5269
|
endpoints: {
|
|
5324
5270
|
migrateSettingsByBundle: {
|
|
5325
5271
|
invalidatesTags: () => [
|
|
@@ -5350,11 +5296,12 @@ const N = z.injectEndpoints({
|
|
|
5350
5296
|
{ type: "bundleList" },
|
|
5351
5297
|
{ type: "addonList" },
|
|
5352
5298
|
{ type: "addonSettingsList" },
|
|
5353
|
-
{ type: "marketAddon" }
|
|
5299
|
+
{ type: "marketAddon" },
|
|
5300
|
+
{ type: "frontendModules" }
|
|
5354
5301
|
]
|
|
5355
5302
|
}
|
|
5356
5303
|
}
|
|
5357
|
-
}),
|
|
5304
|
+
}), Ni = Se.enhanceEndpoints({
|
|
5358
5305
|
endpoints: {
|
|
5359
5306
|
unsetProjectBundle: {
|
|
5360
5307
|
invalidatesTags: (t, e, { projectName: s }) => [
|
|
@@ -5367,7 +5314,7 @@ const N = z.injectEndpoints({
|
|
|
5367
5314
|
]
|
|
5368
5315
|
}
|
|
5369
5316
|
}
|
|
5370
|
-
}),
|
|
5317
|
+
}), Qi = Ci.injectEndpoints({
|
|
5371
5318
|
endpoints: (t) => ({
|
|
5372
5319
|
deleteBundle: t.mutation({
|
|
5373
5320
|
query: ({ name: e }) => ({
|
|
@@ -5378,7 +5325,8 @@ const N = z.injectEndpoints({
|
|
|
5378
5325
|
invalidatesTags: () => [
|
|
5379
5326
|
{ type: "bundleList" },
|
|
5380
5327
|
{ type: "addonList" },
|
|
5381
|
-
{ type: "addonSettingsList" }
|
|
5328
|
+
{ type: "addonSettingsList" },
|
|
5329
|
+
{ type: "frontendModules" }
|
|
5382
5330
|
]
|
|
5383
5331
|
}),
|
|
5384
5332
|
promoteBundle: t.mutation({
|
|
@@ -5394,7 +5342,8 @@ const N = z.injectEndpoints({
|
|
|
5394
5342
|
{ type: "addonSettingsList" },
|
|
5395
5343
|
{ type: "addonSettings" },
|
|
5396
5344
|
{ type: "addonSettingsOverrides" },
|
|
5397
|
-
{ type: "marketAddon" }
|
|
5345
|
+
{ type: "marketAddon" },
|
|
5346
|
+
{ type: "frontendModules" }
|
|
5398
5347
|
]
|
|
5399
5348
|
}),
|
|
5400
5349
|
createBundle: t.mutation({
|
|
@@ -5414,19 +5363,20 @@ const N = z.injectEndpoints({
|
|
|
5414
5363
|
// TODO: invalidate settings
|
|
5415
5364
|
{ type: "addonSettings" },
|
|
5416
5365
|
{ type: "addonSettingsOverrides" },
|
|
5417
|
-
{ type: "addonSettingsList" }
|
|
5366
|
+
{ type: "addonSettingsList" },
|
|
5367
|
+
{ type: "frontendModules" }
|
|
5418
5368
|
]
|
|
5419
5369
|
})
|
|
5420
5370
|
}),
|
|
5421
5371
|
// endpoints
|
|
5422
5372
|
overrideExisting: !0
|
|
5423
5373
|
}), {
|
|
5424
|
-
useDeleteBundleMutation:
|
|
5425
|
-
useCreateBundleMutation:
|
|
5426
|
-
usePromoteBundleMutation:
|
|
5427
|
-
useMigrateSettingsByBundleMutation:
|
|
5428
|
-
useUpdateBundleMutation:
|
|
5429
|
-
} =
|
|
5374
|
+
useDeleteBundleMutation: Co,
|
|
5375
|
+
useCreateBundleMutation: No,
|
|
5376
|
+
usePromoteBundleMutation: Qo,
|
|
5377
|
+
useMigrateSettingsByBundleMutation: Mo,
|
|
5378
|
+
useUpdateBundleMutation: Vo
|
|
5379
|
+
} = Qi, { useUnsetProjectBundleMutation: Do } = Ni, Mi = Ns.enhanceEndpoints({
|
|
5430
5380
|
endpoints: {
|
|
5431
5381
|
getYnputCloudInfo: {
|
|
5432
5382
|
providesTags: ["connections"]
|
|
@@ -5442,11 +5392,11 @@ const N = z.injectEndpoints({
|
|
|
5442
5392
|
}
|
|
5443
5393
|
}
|
|
5444
5394
|
}), {
|
|
5445
|
-
useGetYnputCloudInfoQuery:
|
|
5446
|
-
useSetYnputCloudKeyMutation:
|
|
5447
|
-
useDeleteYnputCloudKeyMutation:
|
|
5448
|
-
useGetFeedbackVerificationQuery:
|
|
5449
|
-
} =
|
|
5395
|
+
useGetYnputCloudInfoQuery: Oo,
|
|
5396
|
+
useSetYnputCloudKeyMutation: $o,
|
|
5397
|
+
useDeleteYnputCloudKeyMutation: xo,
|
|
5398
|
+
useGetFeedbackVerificationQuery: Uo
|
|
5399
|
+
} = Mi, ks = Qs.enhanceEndpoints({
|
|
5450
5400
|
endpoints: {
|
|
5451
5401
|
getServerConfig: {
|
|
5452
5402
|
providesTags: ["config"]
|
|
@@ -5460,17 +5410,17 @@ const N = z.injectEndpoints({
|
|
|
5460
5410
|
}
|
|
5461
5411
|
}
|
|
5462
5412
|
}), {
|
|
5463
|
-
useGetServerConfigQuery:
|
|
5464
|
-
useGetServerConfigOverridesQuery:
|
|
5465
|
-
useGetServerConfigSchemaQuery:
|
|
5466
|
-
useGetConfigValueQuery:
|
|
5467
|
-
} = ks,
|
|
5413
|
+
useGetServerConfigQuery: Bo,
|
|
5414
|
+
useGetServerConfigOverridesQuery: qo,
|
|
5415
|
+
useGetServerConfigSchemaQuery: Ho,
|
|
5416
|
+
useGetConfigValueQuery: Wo
|
|
5417
|
+
} = ks, Vi = ks.enhanceEndpoints({
|
|
5468
5418
|
endpoints: {
|
|
5469
5419
|
setServerConfig: {
|
|
5470
5420
|
invalidatesTags: ["config"]
|
|
5471
5421
|
}
|
|
5472
5422
|
}
|
|
5473
|
-
}), { useSetServerConfigMutation:
|
|
5423
|
+
}), { useSetServerConfigMutation: zo } = Vi, ft = ue.enhanceEndpoints({
|
|
5474
5424
|
endpoints: {
|
|
5475
5425
|
getEntityListAttributesDefinition: {
|
|
5476
5426
|
providesTags: (t, e, { listId: s }) => t ? [
|
|
@@ -5479,7 +5429,7 @@ const N = z.injectEndpoints({
|
|
|
5479
5429
|
] : [{ type: "entityListAttribute", id: "LIST" }]
|
|
5480
5430
|
}
|
|
5481
5431
|
}
|
|
5482
|
-
}), { useGetEntityListAttributesDefinitionQuery:
|
|
5432
|
+
}), { useGetEntityListAttributesDefinitionQuery: Ko } = ft, Di = (t) => t.startsWith("attrib.") ? `_all_attrib.${t.slice(7)}` : t.startsWith("inherited_attributes.") ? `_all_attrib.${t.slice(21)}` : `_entity_${t}`, Oi = (t) => t.startsWith("_all_attrib_") ? `attrib_${t.slice(12)}` : t.startsWith("_entity_") ? t.slice(8) : t, Jo = (t) => t.map((e) => ({ ...e, field: Di(e.field) })), $i = Q.enhanceEndpoints({
|
|
5483
5433
|
endpoints: {
|
|
5484
5434
|
// same caching as the other column stats endpoints: `targets` excluded
|
|
5485
5435
|
// from the cache key, responses merged, only added targets refetch
|
|
@@ -5487,19 +5437,19 @@ const N = z.injectEndpoints({
|
|
|
5487
5437
|
transformResponse: (t) => {
|
|
5488
5438
|
const e = t?.project?.entityLists?.edges?.[0]?.node?.items?.fieldStats ?? [];
|
|
5489
5439
|
return ke(
|
|
5490
|
-
e.map((s) => ({ ...s, columnName:
|
|
5440
|
+
e.map((s) => ({ ...s, columnName: Oi(s.columnName) }))
|
|
5491
5441
|
);
|
|
5492
5442
|
},
|
|
5493
5443
|
serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
|
|
5494
|
-
merge: (t, e) =>
|
|
5495
|
-
forceRefetch: ({ currentArg: t, previousArg: e }) =>
|
|
5444
|
+
merge: (t, e) => we(e, t),
|
|
5445
|
+
forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
|
|
5496
5446
|
providesTags: (t, e, { listId: s, projectName: n }) => [
|
|
5497
5447
|
{ type: "entityListItemsColumnStats", id: s },
|
|
5498
5448
|
{ type: "entityListItemsColumnStats", id: n }
|
|
5499
5449
|
]
|
|
5500
5450
|
}
|
|
5501
5451
|
}
|
|
5502
|
-
}), { useGetListItemsColumnStatsQuery:
|
|
5452
|
+
}), { useGetListItemsColumnStatsQuery: Yo } = $i, xi = ft.enhanceEndpoints({
|
|
5503
5453
|
endpoints: {
|
|
5504
5454
|
setEntityListAttributesDefinition: {
|
|
5505
5455
|
onQueryStarted: async (t, { dispatch: e, queryFulfilled: s }) => {
|
|
@@ -5519,7 +5469,7 @@ const N = z.injectEndpoints({
|
|
|
5519
5469
|
invalidatesTags: (t, e, { listId: s }) => [{ type: "entityListAttribute", id: s }]
|
|
5520
5470
|
}
|
|
5521
5471
|
}
|
|
5522
|
-
}), { useSetEntityListAttributesDefinitionMutation:
|
|
5472
|
+
}), { useSetEntityListAttributesDefinitionMutation: Xo } = xi, Ge = { type: "entityListFolder", id: "LIST" }, Me = ue.enhanceEndpoints({
|
|
5523
5473
|
endpoints: {
|
|
5524
5474
|
getEntityListFolders: {
|
|
5525
5475
|
transformResponse: (t) => t.folders || [],
|
|
@@ -5537,7 +5487,7 @@ const N = z.injectEndpoints({
|
|
|
5537
5487
|
(r) => {
|
|
5538
5488
|
const a = {
|
|
5539
5489
|
...e,
|
|
5540
|
-
id: e.id ||
|
|
5490
|
+
id: e.id || ns()
|
|
5541
5491
|
};
|
|
5542
5492
|
r.push(a);
|
|
5543
5493
|
}
|
|
@@ -5607,15 +5557,15 @@ const N = z.injectEndpoints({
|
|
|
5607
5557
|
}
|
|
5608
5558
|
}
|
|
5609
5559
|
}), {
|
|
5610
|
-
useGetEntityListFoldersQuery:
|
|
5611
|
-
useCreateEntityListFolderMutation:
|
|
5612
|
-
useDeleteEntityListFolderMutation:
|
|
5613
|
-
useUpdateEntityListFolderMutation:
|
|
5614
|
-
} = Me,
|
|
5560
|
+
useGetEntityListFoldersQuery: Zo,
|
|
5561
|
+
useCreateEntityListFolderMutation: ec,
|
|
5562
|
+
useDeleteEntityListFolderMutation: tc,
|
|
5563
|
+
useUpdateEntityListFolderMutation: sc
|
|
5564
|
+
} = Me, Ui = Ms.enhanceEndpoints({
|
|
5615
5565
|
endpoints: {
|
|
5616
5566
|
getEntityGroups: {}
|
|
5617
5567
|
}
|
|
5618
|
-
}), { useGetEntityGroupsQuery:
|
|
5568
|
+
}), { useGetEntityGroupsQuery: nc } = Ui, Jt = async (t, e, s, n) => {
|
|
5619
5569
|
switch (t) {
|
|
5620
5570
|
case "task":
|
|
5621
5571
|
return (await n(
|
|
@@ -5662,7 +5612,7 @@ const N = z.injectEndpoints({
|
|
|
5662
5612
|
default:
|
|
5663
5613
|
throw new Error(`Unknown entity type: ${t}`);
|
|
5664
5614
|
}
|
|
5665
|
-
},
|
|
5615
|
+
}, Yt = ({
|
|
5666
5616
|
projectName: t,
|
|
5667
5617
|
sourceEntity: e,
|
|
5668
5618
|
targetEntity: s,
|
|
@@ -5706,13 +5656,13 @@ const N = z.injectEndpoints({
|
|
|
5706
5656
|
parents: f.parents,
|
|
5707
5657
|
subType: f.subType
|
|
5708
5658
|
}
|
|
5709
|
-
},
|
|
5710
|
-
(
|
|
5659
|
+
}, w = k.links.findIndex(
|
|
5660
|
+
(A) => A.id === n
|
|
5711
5661
|
);
|
|
5712
|
-
|
|
5662
|
+
w !== -1 ? k.links[w] = T : (console.log(
|
|
5713
5663
|
`Adding new link to ${p.entityType} links cache`,
|
|
5714
5664
|
T,
|
|
5715
|
-
|
|
5665
|
+
Ys(k)
|
|
5716
5666
|
), k.links.push(T));
|
|
5717
5667
|
}
|
|
5718
5668
|
}
|
|
@@ -5733,7 +5683,7 @@ const N = z.injectEndpoints({
|
|
|
5733
5683
|
));
|
|
5734
5684
|
};
|
|
5735
5685
|
o(e, s, r), o(s, e, r === "in" ? "out" : "in");
|
|
5736
|
-
},
|
|
5686
|
+
}, Bi = Vs.enhanceEndpoints({
|
|
5737
5687
|
endpoints: {
|
|
5738
5688
|
deleteEntityLink: {
|
|
5739
5689
|
async onQueryStarted({ linkId: t, projectName: e, patch: s }, { dispatch: n, getState: i, queryFulfilled: r }) {
|
|
@@ -5742,7 +5692,7 @@ const N = z.injectEndpoints({
|
|
|
5742
5692
|
const d = s?.source, u = s?.target, o = s?.linkType || "", l = s?.direction || "out";
|
|
5743
5693
|
if (d && u)
|
|
5744
5694
|
try {
|
|
5745
|
-
|
|
5695
|
+
Yt(
|
|
5746
5696
|
{
|
|
5747
5697
|
projectName: e,
|
|
5748
5698
|
sourceEntity: d,
|
|
@@ -5777,12 +5727,12 @@ const N = z.injectEndpoints({
|
|
|
5777
5727
|
const o = s?.source, l = o?.entityType, p = o?.entityId, f = s?.target, y = f?.entityType, h = f?.entityId, g = s?.direction || "out", m = a?.split("|")[0];
|
|
5778
5728
|
try {
|
|
5779
5729
|
if (o && o.entityType && f) {
|
|
5780
|
-
const v =
|
|
5730
|
+
const v = Jt(
|
|
5781
5731
|
l,
|
|
5782
5732
|
p,
|
|
5783
5733
|
t,
|
|
5784
5734
|
n
|
|
5785
|
-
), b =
|
|
5735
|
+
), b = Jt(
|
|
5786
5736
|
y,
|
|
5787
5737
|
h,
|
|
5788
5738
|
t,
|
|
@@ -5792,14 +5742,14 @@ const N = z.injectEndpoints({
|
|
|
5792
5742
|
throw new Error("Source or target entity data not found");
|
|
5793
5743
|
if (!c)
|
|
5794
5744
|
throw new Error("Link ID not found in cache entry");
|
|
5795
|
-
const
|
|
5745
|
+
const w = {
|
|
5796
5746
|
entityType: l,
|
|
5797
5747
|
entityId: p,
|
|
5798
5748
|
name: k.name,
|
|
5799
5749
|
label: "label" in k ? k.label : void 0,
|
|
5800
5750
|
parents: k.parents || [],
|
|
5801
5751
|
subType: "subType" in k ? k.subType : void 0
|
|
5802
|
-
},
|
|
5752
|
+
}, A = {
|
|
5803
5753
|
entityType: y,
|
|
5804
5754
|
entityId: h,
|
|
5805
5755
|
name: T.name,
|
|
@@ -5807,11 +5757,11 @@ const N = z.injectEndpoints({
|
|
|
5807
5757
|
parents: T.parents || [],
|
|
5808
5758
|
subType: "subType" in T ? T.subType : void 0
|
|
5809
5759
|
};
|
|
5810
|
-
|
|
5760
|
+
Yt(
|
|
5811
5761
|
{
|
|
5812
5762
|
projectName: t,
|
|
5813
|
-
sourceEntity:
|
|
5814
|
-
targetEntity:
|
|
5763
|
+
sourceEntity: w,
|
|
5764
|
+
targetEntity: A,
|
|
5815
5765
|
linkId: c,
|
|
5816
5766
|
linkType: m,
|
|
5817
5767
|
direction: g,
|
|
@@ -5835,7 +5785,7 @@ const N = z.injectEndpoints({
|
|
|
5835
5785
|
}
|
|
5836
5786
|
}
|
|
5837
5787
|
}
|
|
5838
|
-
}), { useDeleteEntityLinkMutation:
|
|
5788
|
+
}), { useDeleteEntityLinkMutation: ic, useCreateEntityLinkMutation: rc } = Bi, qi = 50, he = (t, e) => e ? { entityType: t, entityId: e.id, thumbnailHash: e.thumbnailHash || void 0 } : void 0, Hi = M.injectEndpoints({
|
|
5839
5789
|
endpoints: (t) => ({
|
|
5840
5790
|
getSearchedEntitiesLinks: t.infiniteQuery({
|
|
5841
5791
|
infiniteQueryOptions: {
|
|
@@ -5852,7 +5802,7 @@ const N = z.injectEndpoints({
|
|
|
5852
5802
|
try {
|
|
5853
5803
|
const { projectName: i, entityType: r, search: a, parentIds: c, hasReviewables: d, includeTask: u } = e, { cursor: o } = s, l = {
|
|
5854
5804
|
projectName: i,
|
|
5855
|
-
first:
|
|
5805
|
+
first: qi
|
|
5856
5806
|
};
|
|
5857
5807
|
o && (l.after = o), l.search = a || "", l.parentIds = c, l.hasReviewables = d, l.includeTask = !!u;
|
|
5858
5808
|
let p;
|
|
@@ -5990,7 +5940,7 @@ const N = z.injectEndpoints({
|
|
|
5990
5940
|
}
|
|
5991
5941
|
})
|
|
5992
5942
|
})
|
|
5993
|
-
}), { useGetSearchedEntitiesLinksInfiniteQuery:
|
|
5943
|
+
}), { useGetSearchedEntitiesLinksInfiniteQuery: ac } = Hi, Wi = 5e3, zi = 5e4, Ki = M.injectEndpoints({
|
|
5994
5944
|
endpoints: (t) => ({
|
|
5995
5945
|
/**
|
|
5996
5946
|
* All links into or out of a set of entities, grouped by entity like
|
|
@@ -6007,7 +5957,7 @@ const N = z.injectEndpoints({
|
|
|
6007
5957
|
do {
|
|
6008
5958
|
const o = await i(
|
|
6009
5959
|
M.endpoints[r].initiate(
|
|
6010
|
-
{ projectName: e, entityIds: s, first:
|
|
5960
|
+
{ projectName: e, entityIds: s, first: Wi, after: c },
|
|
6011
5961
|
{ forceRefetch: !0, subscribe: !1 }
|
|
6012
5962
|
)
|
|
6013
5963
|
).unwrap(), { edges: l, pageInfo: p } = o.project.links;
|
|
@@ -6028,7 +5978,7 @@ const N = z.injectEndpoints({
|
|
|
6028
5978
|
isRestricted: !g
|
|
6029
5979
|
});
|
|
6030
5980
|
}
|
|
6031
|
-
d += l.length, c = p.hasNextPage ? p.endCursor : void 0, u = !!c && d >=
|
|
5981
|
+
d += l.length, c = p.hasNextPage ? p.endCursor : void 0, u = !!c && d >= zi;
|
|
6032
5982
|
} while (c && !u);
|
|
6033
5983
|
} catch (o) {
|
|
6034
5984
|
return { error: L(o) };
|
|
@@ -6042,7 +5992,7 @@ const N = z.injectEndpoints({
|
|
|
6042
5992
|
}
|
|
6043
5993
|
})
|
|
6044
5994
|
})
|
|
6045
|
-
}), { useGetLinksOfEntitiesQuery:
|
|
5995
|
+
}), { useGetLinksOfEntitiesQuery: oc } = Ki, Ji = ts.enhanceEndpoints({
|
|
6046
5996
|
endpoints: {
|
|
6047
5997
|
getMyPermissions: {
|
|
6048
5998
|
providesTags: (t) => [{ type: "userPermissions" }]
|
|
@@ -6051,13 +6001,13 @@ const N = z.injectEndpoints({
|
|
|
6051
6001
|
providesTags: (t, e, s) => [{ type: "userProjectPermissions" }]
|
|
6052
6002
|
}
|
|
6053
6003
|
}
|
|
6054
|
-
}), { useGetMyPermissionsQuery:
|
|
6004
|
+
}), { useGetMyPermissionsQuery: cc, useGetMyProjectPermissionsQuery: dc } = Ji, ws = Ds.enhanceEndpoints({
|
|
6055
6005
|
endpoints: {
|
|
6056
6006
|
getProductTypes: {
|
|
6057
6007
|
providesTags: (t, e, s) => [{ type: "productType", id: "LIST" }]
|
|
6058
6008
|
}
|
|
6059
6009
|
}
|
|
6060
|
-
}), { useGetProductTypesQuery:
|
|
6010
|
+
}), { useGetProductTypesQuery: uc } = ws, Yi = ws.enhanceEndpoints({
|
|
6061
6011
|
endpoints: {
|
|
6062
6012
|
createProduct: {
|
|
6063
6013
|
invalidatesTags: (t, e, { productPostModel: s }) => [
|
|
@@ -6065,7 +6015,7 @@ const N = z.injectEndpoints({
|
|
|
6065
6015
|
]
|
|
6066
6016
|
}
|
|
6067
6017
|
}
|
|
6068
|
-
}), { useCreateProductMutation:
|
|
6018
|
+
}), { useCreateProductMutation: lc } = Yi, Xi = Q.enhanceEndpoints({
|
|
6069
6019
|
endpoints: {
|
|
6070
6020
|
GetFolderProducts: {
|
|
6071
6021
|
transformResponse: (t) => (t?.project?.products?.edges || []).map((s) => ({
|
|
@@ -6089,7 +6039,7 @@ const N = z.injectEndpoints({
|
|
|
6089
6039
|
] : [{ type: "product", id: s }]
|
|
6090
6040
|
}
|
|
6091
6041
|
}
|
|
6092
|
-
}), { useGetFolderProductsQuery:
|
|
6042
|
+
}), { useGetFolderProductsQuery: pc } = Xi, oe = { type: "projectFolder", id: "LIST" }, Ve = Os.enhanceEndpoints({
|
|
6093
6043
|
endpoints: {
|
|
6094
6044
|
getProjectFolders: {
|
|
6095
6045
|
transformResponse: (t) => t.folders || [],
|
|
@@ -6107,7 +6057,7 @@ const N = z.injectEndpoints({
|
|
|
6107
6057
|
(i) => {
|
|
6108
6058
|
const r = {
|
|
6109
6059
|
...t,
|
|
6110
|
-
id: t.id ||
|
|
6060
|
+
id: t.id || ns()
|
|
6111
6061
|
};
|
|
6112
6062
|
i.push(r);
|
|
6113
6063
|
}
|
|
@@ -6218,13 +6168,13 @@ const N = z.injectEndpoints({
|
|
|
6218
6168
|
}
|
|
6219
6169
|
}
|
|
6220
6170
|
}), {
|
|
6221
|
-
useGetProjectFoldersQuery:
|
|
6222
|
-
useCreateProjectFolderMutation:
|
|
6223
|
-
useDeleteProjectFolderMutation:
|
|
6224
|
-
useUpdateProjectFolderMutation:
|
|
6225
|
-
useSetProjectFoldersOrderMutation:
|
|
6226
|
-
useAssignProjectsToFolderMutation:
|
|
6227
|
-
} = Ve,
|
|
6171
|
+
useGetProjectFoldersQuery: fc,
|
|
6172
|
+
useCreateProjectFolderMutation: yc,
|
|
6173
|
+
useDeleteProjectFolderMutation: gc,
|
|
6174
|
+
useUpdateProjectFolderMutation: hc,
|
|
6175
|
+
useSetProjectFoldersOrderMutation: mc,
|
|
6176
|
+
useAssignProjectsToFolderMutation: vc
|
|
6177
|
+
} = Ve, As = (t, {
|
|
6228
6178
|
productId: e,
|
|
6229
6179
|
taskId: s,
|
|
6230
6180
|
folderId: n,
|
|
@@ -6259,11 +6209,11 @@ const N = z.injectEndpoints({
|
|
|
6259
6209
|
a.push(...u);
|
|
6260
6210
|
}
|
|
6261
6211
|
return a;
|
|
6262
|
-
},
|
|
6212
|
+
}, Zi = X.enhanceEndpoints({
|
|
6263
6213
|
endpoints: {
|
|
6264
6214
|
getReviewablesForVersion: {
|
|
6265
6215
|
keepUnusedDataFor: 1,
|
|
6266
|
-
providesTags: (t, e, { versionId: s }) =>
|
|
6216
|
+
providesTags: (t, e, { versionId: s }) => As([t], { versionId: s, productId: t?.productId }),
|
|
6267
6217
|
async onCacheEntryAdded({ versionId: t }, { updateCachedData: e, cacheDataLoaded: s, cacheEntryRemoved: n, dispatch: i, getCacheEntry: r }) {
|
|
6268
6218
|
let a;
|
|
6269
6219
|
const c = U(
|
|
@@ -6322,7 +6272,7 @@ const N = z.injectEndpoints({
|
|
|
6322
6272
|
}
|
|
6323
6273
|
}
|
|
6324
6274
|
}
|
|
6325
|
-
}),
|
|
6275
|
+
}), bt = Zi.injectEndpoints({
|
|
6326
6276
|
endpoints: (t) => ({
|
|
6327
6277
|
// custom endpoint to get reviewables from product/task/folder
|
|
6328
6278
|
// utilizes getReviewablesForProduct, getReviewablesForTask, getReviewablesForFolder
|
|
@@ -6357,7 +6307,7 @@ const N = z.injectEndpoints({
|
|
|
6357
6307
|
const c = await r(a);
|
|
6358
6308
|
return c.error ? { error: L(c.error) } : { data: c.data };
|
|
6359
6309
|
},
|
|
6360
|
-
providesTags: (e, s, n) =>
|
|
6310
|
+
providesTags: (e, s, n) => As(e, n, !0),
|
|
6361
6311
|
async onCacheEntryAdded({ productId: e, taskId: s, folderId: n }, { cacheDataLoaded: i, cacheEntryRemoved: r, dispatch: a, getCacheEntry: c }) {
|
|
6362
6312
|
let d;
|
|
6363
6313
|
const u = U(
|
|
@@ -6389,10 +6339,10 @@ const N = z.injectEndpoints({
|
|
|
6389
6339
|
})
|
|
6390
6340
|
})
|
|
6391
6341
|
}), {
|
|
6392
|
-
useGetViewerReviewablesQuery:
|
|
6393
|
-
useGetReviewablesForVersionQuery:
|
|
6394
|
-
useHasTranscoderQuery:
|
|
6395
|
-
} =
|
|
6342
|
+
useGetViewerReviewablesQuery: bc,
|
|
6343
|
+
useGetReviewablesForVersionQuery: Ic,
|
|
6344
|
+
useHasTranscoderQuery: Tc
|
|
6345
|
+
} = bt, er = bt.injectEndpoints({
|
|
6396
6346
|
endpoints: (t) => ({
|
|
6397
6347
|
deleteReviewable: t.mutation(
|
|
6398
6348
|
{
|
|
@@ -6410,13 +6360,13 @@ const N = z.injectEndpoints({
|
|
|
6410
6360
|
}
|
|
6411
6361
|
)
|
|
6412
6362
|
})
|
|
6413
|
-
}),
|
|
6363
|
+
}), tr = er.enhanceEndpoints({
|
|
6414
6364
|
endpoints: {
|
|
6415
6365
|
// reviewables list is updated optimistically
|
|
6416
6366
|
sortVersionReviewables: {
|
|
6417
6367
|
async onQueryStarted({ projectName: t, versionId: e, sortReviewablesRequest: s }, { dispatch: n, queryFulfilled: i }) {
|
|
6418
6368
|
const r = n(
|
|
6419
|
-
|
|
6369
|
+
bt.util.updateQueryData(
|
|
6420
6370
|
"getReviewablesForVersion",
|
|
6421
6371
|
{ projectName: t, versionId: e },
|
|
6422
6372
|
(a) => {
|
|
@@ -6443,16 +6393,16 @@ const N = z.injectEndpoints({
|
|
|
6443
6393
|
}
|
|
6444
6394
|
}
|
|
6445
6395
|
}), {
|
|
6446
|
-
useDeleteReviewableMutation:
|
|
6447
|
-
useSortVersionReviewablesMutation:
|
|
6448
|
-
useUpdateReviewableMutation:
|
|
6449
|
-
} =
|
|
6396
|
+
useDeleteReviewableMutation: kc,
|
|
6397
|
+
useSortVersionReviewablesMutation: wc,
|
|
6398
|
+
useUpdateReviewableMutation: Ac
|
|
6399
|
+
} = tr, Xt = (t) => {
|
|
6450
6400
|
const e = [{ type: "shared", id: "LIST" }];
|
|
6451
6401
|
return t && e.push({
|
|
6452
6402
|
type: "shared",
|
|
6453
6403
|
id: t.toUpperCase()
|
|
6454
6404
|
}), e;
|
|
6455
|
-
},
|
|
6405
|
+
}, sr = (t) => {
|
|
6456
6406
|
const e = [];
|
|
6457
6407
|
for (const s of t) {
|
|
6458
6408
|
const n = { type: "shared", id: s.value };
|
|
@@ -6478,14 +6428,14 @@ const N = z.injectEndpoints({
|
|
|
6478
6428
|
}
|
|
6479
6429
|
}
|
|
6480
6430
|
return e;
|
|
6481
|
-
},
|
|
6431
|
+
}, nr = es.enhanceEndpoints({
|
|
6482
6432
|
endpoints: {
|
|
6483
6433
|
getShareOptions: {
|
|
6484
6434
|
transformResponse: (t) => t?.options || [],
|
|
6485
|
-
providesTags: (t, e, { projectName: s }) => t ? [...
|
|
6435
|
+
providesTags: (t, e, { projectName: s }) => t ? [...sr(t), ...Xt(s)] : Xt(s)
|
|
6486
6436
|
}
|
|
6487
6437
|
}
|
|
6488
|
-
}), { useGetShareOptionsQuery:
|
|
6438
|
+
}), { useGetShareOptionsQuery: Ec } = nr, Es = $s.enhanceEndpoints({
|
|
6489
6439
|
endpoints: {
|
|
6490
6440
|
getSiteInfo: {
|
|
6491
6441
|
providesTags: (t) => t ? [
|
|
@@ -6499,10 +6449,22 @@ const N = z.injectEndpoints({
|
|
|
6499
6449
|
] : ["info", "attribute"]
|
|
6500
6450
|
},
|
|
6501
6451
|
listFrontendModules: {
|
|
6502
|
-
providesTags: ["info"]
|
|
6452
|
+
providesTags: ["info", "frontendModules"],
|
|
6453
|
+
// production addon versions can change without a server restart (bundle edits),
|
|
6454
|
+
// so refetch on bundle events to pick up the new versions
|
|
6455
|
+
async onCacheEntryAdded(t, { dispatch: e, cacheDataLoaded: s, cacheEntryRemoved: n }) {
|
|
6456
|
+
let i;
|
|
6457
|
+
try {
|
|
6458
|
+
await s, i = F.subscribe("bundle", () => {
|
|
6459
|
+
e(Es.util.invalidateTags(["frontendModules"]));
|
|
6460
|
+
});
|
|
6461
|
+
} catch {
|
|
6462
|
+
}
|
|
6463
|
+
await n, F.unsubscribe(i);
|
|
6464
|
+
}
|
|
6503
6465
|
}
|
|
6504
6466
|
}
|
|
6505
|
-
}), { useGetSiteInfoQuery:
|
|
6467
|
+
}), { useGetSiteInfoQuery: Sc, useLazyGetSiteInfoQuery: Pc, useListFrontendModulesQuery: Lc } = Es, ir = at.enhanceEndpoints({
|
|
6506
6468
|
endpoints: {
|
|
6507
6469
|
getTask: {
|
|
6508
6470
|
providesTags: (t, e, { taskId: s }) => [
|
|
@@ -6510,11 +6472,11 @@ const N = z.injectEndpoints({
|
|
|
6510
6472
|
]
|
|
6511
6473
|
}
|
|
6512
6474
|
}
|
|
6513
|
-
}), { useGetTaskQuery:
|
|
6514
|
-
const r = [{ type: "entityListItem", id: t }], a =
|
|
6475
|
+
}), { useGetTaskQuery: jc } = ir, rr = (t, e, { state: s, dispatch: n }, i) => {
|
|
6476
|
+
const r = [{ type: "entityListItem", id: t }], a = B.util.selectInvalidatedBy(s, r).filter((c) => c.endpointName === "getListItemsInfinite");
|
|
6515
6477
|
for (const c of a) {
|
|
6516
6478
|
const d = n(
|
|
6517
|
-
|
|
6479
|
+
B.util.updateQueryData("getListItemsInfinite", c.originalArgs, (u) => {
|
|
6518
6480
|
for (const o of u.pages) {
|
|
6519
6481
|
const l = o.items.findIndex((p) => p.entityId === t);
|
|
6520
6482
|
if (l !== -1) {
|
|
@@ -6526,7 +6488,7 @@ const N = z.injectEndpoints({
|
|
|
6526
6488
|
);
|
|
6527
6489
|
i.push(d);
|
|
6528
6490
|
}
|
|
6529
|
-
},
|
|
6491
|
+
}, ar = at.injectEndpoints({
|
|
6530
6492
|
endpoints: (t) => ({
|
|
6531
6493
|
updateSubtasks: t.mutation({
|
|
6532
6494
|
queryFn: async ({ projectName: e, taskId: s, subtasks: n }, { dispatch: i }) => {
|
|
@@ -6552,7 +6514,7 @@ const N = z.injectEndpoints({
|
|
|
6552
6514
|
data: { subtasks: s }
|
|
6553
6515
|
}
|
|
6554
6516
|
];
|
|
6555
|
-
Ee(d, { state: a, dispatch: n }, c),
|
|
6517
|
+
Ee(d, { state: a, dispatch: n }, c), ls(d, { state: a, dispatch: n }, c), rr(e, s, { state: a, dispatch: n }, c);
|
|
6556
6518
|
try {
|
|
6557
6519
|
await i;
|
|
6558
6520
|
} catch {
|
|
@@ -6561,7 +6523,7 @@ const N = z.injectEndpoints({
|
|
|
6561
6523
|
}
|
|
6562
6524
|
})
|
|
6563
6525
|
})
|
|
6564
|
-
}), { useUpdateSubtasksMutation:
|
|
6526
|
+
}), { useUpdateSubtasksMutation: Fc } = ar, te = { type: "team", id: "LIST" }, or = xs.enhanceEndpoints({
|
|
6565
6527
|
endpoints: {
|
|
6566
6528
|
getTeams: {
|
|
6567
6529
|
providesTags: (t) => t ? [te, ...t.map((e) => ({ type: "team", id: e.name }))] : [te]
|
|
@@ -6599,13 +6561,13 @@ const N = z.injectEndpoints({
|
|
|
6599
6561
|
}
|
|
6600
6562
|
}
|
|
6601
6563
|
}), {
|
|
6602
|
-
useGetTeamsQuery:
|
|
6603
|
-
useUpdateTeamsMutation:
|
|
6604
|
-
useSaveTeamMutation:
|
|
6605
|
-
useDeleteTeamMutation:
|
|
6606
|
-
useSaveTeamMemberMutation:
|
|
6607
|
-
useDeleteTeamMemberMutation:
|
|
6608
|
-
} =
|
|
6564
|
+
useGetTeamsQuery: _c,
|
|
6565
|
+
useUpdateTeamsMutation: Rc,
|
|
6566
|
+
useSaveTeamMutation: Gc,
|
|
6567
|
+
useDeleteTeamMutation: Cc,
|
|
6568
|
+
useSaveTeamMemberMutation: Nc,
|
|
6569
|
+
useDeleteTeamMemberMutation: Qc
|
|
6570
|
+
} = or, cr = `
|
|
6609
6571
|
query UserList($name:String!) {
|
|
6610
6572
|
users(name: $name) {
|
|
6611
6573
|
edges {
|
|
@@ -6627,7 +6589,7 @@ const N = z.injectEndpoints({
|
|
|
6627
6589
|
}
|
|
6628
6590
|
}
|
|
6629
6591
|
}
|
|
6630
|
-
`,
|
|
6592
|
+
`, dr = `
|
|
6631
6593
|
query UserList {
|
|
6632
6594
|
users(last: 5000, isSupport: false) {
|
|
6633
6595
|
edges {
|
|
@@ -6655,7 +6617,7 @@ const N = z.injectEndpoints({
|
|
|
6655
6617
|
}
|
|
6656
6618
|
}
|
|
6657
6619
|
}
|
|
6658
|
-
`,
|
|
6620
|
+
`, ur = `
|
|
6659
6621
|
query Assignees($names: [String!]!){
|
|
6660
6622
|
users(names: $names, isSupport: false) {
|
|
6661
6623
|
edges {
|
|
@@ -6667,7 +6629,7 @@ query Assignees($names: [String!]!){
|
|
|
6667
6629
|
}
|
|
6668
6630
|
}
|
|
6669
6631
|
}
|
|
6670
|
-
}`,
|
|
6632
|
+
}`, lr = `
|
|
6671
6633
|
query Assignees($projectName: String) {
|
|
6672
6634
|
users(last: 5000, projectName: $projectName, isSupport: false) {
|
|
6673
6635
|
edges {
|
|
@@ -6679,7 +6641,7 @@ query Assignees($projectName: String) {
|
|
|
6679
6641
|
}
|
|
6680
6642
|
}
|
|
6681
6643
|
}
|
|
6682
|
-
}`,
|
|
6644
|
+
}`, pr = (t) => {
|
|
6683
6645
|
const e = String(t.value);
|
|
6684
6646
|
return {
|
|
6685
6647
|
name: e,
|
|
@@ -6687,7 +6649,7 @@ query Assignees($projectName: String) {
|
|
|
6687
6649
|
avatarUrl: `/api/users/${e}/avatar`,
|
|
6688
6650
|
hidden: t.hidden
|
|
6689
6651
|
};
|
|
6690
|
-
},
|
|
6652
|
+
}, fr = ts.enhanceEndpoints({
|
|
6691
6653
|
endpoints: {
|
|
6692
6654
|
getCurrentUser: {
|
|
6693
6655
|
providesTags: [{ type: "user", id: "LIST" }]
|
|
@@ -6700,14 +6662,14 @@ query Assignees($projectName: String) {
|
|
|
6700
6662
|
providesTags: (t, e, { userName: s }) => [{ type: "session", id: s }]
|
|
6701
6663
|
}
|
|
6702
6664
|
}
|
|
6703
|
-
}),
|
|
6665
|
+
}), yr = Q.injectEndpoints({
|
|
6704
6666
|
endpoints: (t) => ({
|
|
6705
6667
|
getUsers: t.query({
|
|
6706
6668
|
query: () => ({
|
|
6707
6669
|
url: "/graphql",
|
|
6708
6670
|
method: "POST",
|
|
6709
6671
|
body: {
|
|
6710
|
-
query:
|
|
6672
|
+
query: dr,
|
|
6711
6673
|
variables: {}
|
|
6712
6674
|
}
|
|
6713
6675
|
}),
|
|
@@ -6729,7 +6691,7 @@ query Assignees($projectName: String) {
|
|
|
6729
6691
|
url: "/graphql",
|
|
6730
6692
|
method: "POST",
|
|
6731
6693
|
body: {
|
|
6732
|
-
query:
|
|
6694
|
+
query: cr,
|
|
6733
6695
|
variables: { name: e }
|
|
6734
6696
|
}
|
|
6735
6697
|
}),
|
|
@@ -6744,7 +6706,7 @@ query Assignees($projectName: String) {
|
|
|
6744
6706
|
async queryFn({ names: e, projectName: s }, n, i, r) {
|
|
6745
6707
|
if (!e && s) {
|
|
6746
6708
|
const d = await n.dispatch(
|
|
6747
|
-
|
|
6709
|
+
Us.endpoints.getEnumOptions.initiate(
|
|
6748
6710
|
{
|
|
6749
6711
|
enumName: "users",
|
|
6750
6712
|
params: { project_name: s, mode: "users", hide_inactive: !0 }
|
|
@@ -6752,13 +6714,13 @@ query Assignees($projectName: String) {
|
|
|
6752
6714
|
{ subscribe: !1, forceRefetch: n.forced }
|
|
6753
6715
|
)
|
|
6754
6716
|
).unwrap();
|
|
6755
|
-
return d.error ? { error: L(d.error) } : { data: d.items.map(
|
|
6717
|
+
return d.error ? { error: L(d.error) } : { data: d.items.map(pr) };
|
|
6756
6718
|
}
|
|
6757
6719
|
const a = await r({
|
|
6758
6720
|
url: "/graphql",
|
|
6759
6721
|
method: "POST",
|
|
6760
6722
|
body: {
|
|
6761
|
-
query: e ?
|
|
6723
|
+
query: e ? ur : lr,
|
|
6762
6724
|
variables: { names: e, projectName: s }
|
|
6763
6725
|
}
|
|
6764
6726
|
});
|
|
@@ -6782,7 +6744,7 @@ query Assignees($projectName: String) {
|
|
|
6782
6744
|
})
|
|
6783
6745
|
}),
|
|
6784
6746
|
overrideExisting: !0
|
|
6785
|
-
}),
|
|
6747
|
+
}), gr = yr.enhanceEndpoints({
|
|
6786
6748
|
endpoints: {
|
|
6787
6749
|
GetAllProjectUsersAsAssignee: {
|
|
6788
6750
|
transformResponse: (t) => t.users.edges.map((e) => ({
|
|
@@ -6806,14 +6768,14 @@ query Assignees($projectName: String) {
|
|
|
6806
6768
|
}
|
|
6807
6769
|
}
|
|
6808
6770
|
}), {
|
|
6809
|
-
useGetAllProjectUsersAsAssigneeQuery:
|
|
6810
|
-
useLazyGetAllProjectUsersAsAssigneeQuery:
|
|
6811
|
-
useGetActiveUsersCountQuery:
|
|
6812
|
-
useGetAllAssigneesQuery:
|
|
6813
|
-
useGetUsersQuery:
|
|
6814
|
-
useGetUserByNameQuery:
|
|
6815
|
-
useGetUsersAssigneeQuery:
|
|
6816
|
-
} =
|
|
6771
|
+
useGetAllProjectUsersAsAssigneeQuery: Mc,
|
|
6772
|
+
useLazyGetAllProjectUsersAsAssigneeQuery: Vc,
|
|
6773
|
+
useGetActiveUsersCountQuery: Dc,
|
|
6774
|
+
useGetAllAssigneesQuery: Oc,
|
|
6775
|
+
useGetUsersQuery: $c,
|
|
6776
|
+
useGetUserByNameQuery: xc,
|
|
6777
|
+
useGetUsersAssigneeQuery: Uc
|
|
6778
|
+
} = gr, { useGetUserSessionsQuery: Bc, useGetCurrentUserQuery: qc, useGetUserQuery: Hc } = fr, hr = Se.enhanceEndpoints({
|
|
6817
6779
|
endpoints: {
|
|
6818
6780
|
listGuestUsers: {
|
|
6819
6781
|
providesTags: (t) => t?.users ? [
|
|
@@ -6828,7 +6790,7 @@ query Assignees($projectName: String) {
|
|
|
6828
6790
|
invalidatesTags: (t, e, s) => [{ type: "guest", id: s.email }]
|
|
6829
6791
|
}
|
|
6830
6792
|
}
|
|
6831
|
-
}), { useListGuestUsersQuery:
|
|
6793
|
+
}), { useListGuestUsersQuery: Wc, useAddGuestUserMutation: zc, useRemoveGuestUserMutation: Kc } = hr, mr = Q.enhanceEndpoints({
|
|
6832
6794
|
endpoints: {
|
|
6833
6795
|
GetLatestProductVersion: {
|
|
6834
6796
|
transformResponse: (t) => t.project.versions.edges[0]?.node,
|
|
@@ -6838,7 +6800,7 @@ query Assignees($projectName: String) {
|
|
|
6838
6800
|
] : [{ type: "product", id: s }]
|
|
6839
6801
|
}
|
|
6840
6802
|
}
|
|
6841
|
-
}), { useGetLatestProductVersionQuery:
|
|
6803
|
+
}), { useGetLatestProductVersionQuery: Jc } = mr, vr = Bs.enhanceEndpoints({
|
|
6842
6804
|
endpoints: {
|
|
6843
6805
|
getVersion: {},
|
|
6844
6806
|
createVersion: {
|
|
@@ -6857,7 +6819,7 @@ query Assignees($projectName: String) {
|
|
|
6857
6819
|
]
|
|
6858
6820
|
}
|
|
6859
6821
|
}
|
|
6860
|
-
}), { useGetVersionQuery:
|
|
6822
|
+
}), { useGetVersionQuery: Yc, useCreateVersionMutation: Xc, useDeleteVersionMutation: Zc } = vr, q = (t, e) => ({
|
|
6861
6823
|
type: "view",
|
|
6862
6824
|
id: `${t.toUpperCase()}${e ? `:${e.toUpperCase()}` : ""}`
|
|
6863
6825
|
}), Ce = { type: "view", id: "LIST" }, V = qs.enhanceEndpoints({
|
|
@@ -6866,14 +6828,14 @@ query Assignees($projectName: String) {
|
|
|
6866
6828
|
transformResponse: (t) => t?.views || [],
|
|
6867
6829
|
providesTags: (t, e, { viewType: s, projectName: n }) => t ? [
|
|
6868
6830
|
Ce,
|
|
6869
|
-
|
|
6831
|
+
q(s, n),
|
|
6870
6832
|
...t.filter((i) => i.id != null).map((i) => ({ type: "view", id: i.id }))
|
|
6871
6833
|
] : [Ce]
|
|
6872
6834
|
},
|
|
6873
6835
|
getWorkingView: {
|
|
6874
6836
|
providesTags: (t, e, { viewType: s, projectName: n }) => [
|
|
6875
6837
|
{ type: "view", id: t?.id },
|
|
6876
|
-
|
|
6838
|
+
q(s, n),
|
|
6877
6839
|
Ce
|
|
6878
6840
|
]
|
|
6879
6841
|
},
|
|
@@ -6881,19 +6843,19 @@ query Assignees($projectName: String) {
|
|
|
6881
6843
|
providesTags: (t, e, s) => [{ type: "view", id: s.viewId }, Ce]
|
|
6882
6844
|
},
|
|
6883
6845
|
getDefaultView: {
|
|
6884
|
-
providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id },
|
|
6846
|
+
providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, q(s, n)] : [q(s, n)]
|
|
6885
6847
|
},
|
|
6886
6848
|
getBaseView: {
|
|
6887
|
-
providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id },
|
|
6849
|
+
providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, q(s, n)] : [q(s, n)]
|
|
6888
6850
|
}
|
|
6889
6851
|
}
|
|
6890
6852
|
}), {
|
|
6891
|
-
useListViewsQuery:
|
|
6892
|
-
useGetWorkingViewQuery:
|
|
6893
|
-
useGetViewQuery:
|
|
6894
|
-
useGetDefaultViewQuery:
|
|
6895
|
-
useGetBaseViewQuery:
|
|
6896
|
-
} = V,
|
|
6853
|
+
useListViewsQuery: ed,
|
|
6854
|
+
useGetWorkingViewQuery: td,
|
|
6855
|
+
useGetViewQuery: sd,
|
|
6856
|
+
useGetDefaultViewQuery: nd,
|
|
6857
|
+
useGetBaseViewQuery: id
|
|
6858
|
+
} = V, br = V.enhanceEndpoints({
|
|
6897
6859
|
endpoints: {
|
|
6898
6860
|
createView: {
|
|
6899
6861
|
onQueryStarted: async (t, { dispatch: e, queryFulfilled: s, getState: n }) => {
|
|
@@ -6947,7 +6909,7 @@ query Assignees($projectName: String) {
|
|
|
6947
6909
|
let u;
|
|
6948
6910
|
if (i.label === "__base__") {
|
|
6949
6911
|
const o = {
|
|
6950
|
-
id:
|
|
6912
|
+
id: Ws(),
|
|
6951
6913
|
...i,
|
|
6952
6914
|
working: !1,
|
|
6953
6915
|
scope: t.projectName ? "project" : "studio",
|
|
@@ -6981,7 +6943,7 @@ query Assignees($projectName: String) {
|
|
|
6981
6943
|
// updates the view list cache for a specific view type and project
|
|
6982
6944
|
invalidatesTags: (t, e, { viewType: s, projectName: n, payload: i }) => [
|
|
6983
6945
|
{ type: "view", id: i.id },
|
|
6984
|
-
|
|
6946
|
+
q(s, n)
|
|
6985
6947
|
]
|
|
6986
6948
|
},
|
|
6987
6949
|
updateView: {
|
|
@@ -7041,7 +7003,7 @@ query Assignees($projectName: String) {
|
|
|
7041
7003
|
"accessLevel",
|
|
7042
7004
|
"working"
|
|
7043
7005
|
];
|
|
7044
|
-
return Object.keys(r).some((u) => c.includes(u)) && (a.push({ type: "view", id: i }), a.push(
|
|
7006
|
+
return Object.keys(r).some((u) => c.includes(u)) && (a.push({ type: "view", id: i }), a.push(q(s, n))), a;
|
|
7045
7007
|
}
|
|
7046
7008
|
},
|
|
7047
7009
|
deleteView: {
|
|
@@ -7082,8 +7044,8 @@ query Assignees($projectName: String) {
|
|
|
7082
7044
|
// updates the view list cache for a specific view type and project
|
|
7083
7045
|
invalidatesTags: (t, e, { viewType: s, projectName: n, viewId: i }) => [
|
|
7084
7046
|
{ type: "view", id: i },
|
|
7085
|
-
|
|
7086
|
-
|
|
7047
|
+
q(s, n),
|
|
7048
|
+
q(s, void 0)
|
|
7087
7049
|
]
|
|
7088
7050
|
},
|
|
7089
7051
|
setDefaultView: {
|
|
@@ -7121,21 +7083,21 @@ query Assignees($projectName: String) {
|
|
|
7121
7083
|
// updates the default view cache for a specific view type and project
|
|
7122
7084
|
invalidatesTags: (t, e, { viewType: s, projectName: n, setDefaultViewRequestModel: i }) => [
|
|
7123
7085
|
{ type: "view", id: i.viewId },
|
|
7124
|
-
|
|
7086
|
+
q(s, n)
|
|
7125
7087
|
]
|
|
7126
7088
|
}
|
|
7127
7089
|
}
|
|
7128
7090
|
}), {
|
|
7129
|
-
useCreateViewMutation:
|
|
7130
|
-
useUpdateViewMutation:
|
|
7131
|
-
useDeleteViewMutation:
|
|
7132
|
-
useSetDefaultViewMutation:
|
|
7133
|
-
} =
|
|
7091
|
+
useCreateViewMutation: rd,
|
|
7092
|
+
useUpdateViewMutation: ad,
|
|
7093
|
+
useDeleteViewMutation: od,
|
|
7094
|
+
useSetDefaultViewMutation: cd
|
|
7095
|
+
} = br, qe = Pe.enhanceEndpoints({
|
|
7134
7096
|
endpoints: {
|
|
7135
7097
|
getEntityWatchers: {},
|
|
7136
7098
|
setEntityWatchers: {}
|
|
7137
7099
|
}
|
|
7138
|
-
}),
|
|
7100
|
+
}), Zt = qe.injectEndpoints({
|
|
7139
7101
|
endpoints: (t) => ({
|
|
7140
7102
|
getEntitiesWatchers: t.query({
|
|
7141
7103
|
async queryFn({ entities: e = [] }, { dispatch: s }) {
|
|
@@ -7143,7 +7105,7 @@ query Assignees($projectName: String) {
|
|
|
7143
7105
|
return { data: await Promise.all(
|
|
7144
7106
|
e.map(async (i) => {
|
|
7145
7107
|
const r = await s(
|
|
7146
|
-
|
|
7108
|
+
qe.endpoints.getEntityWatchers.initiate(i, { forceRefetch: !0 })
|
|
7147
7109
|
);
|
|
7148
7110
|
if (r.error) throw r.error;
|
|
7149
7111
|
return {
|
|
@@ -7162,13 +7124,13 @@ query Assignees($projectName: String) {
|
|
|
7162
7124
|
])
|
|
7163
7125
|
})
|
|
7164
7126
|
})
|
|
7165
|
-
}),
|
|
7127
|
+
}), Ir = Zt.injectEndpoints({
|
|
7166
7128
|
endpoints: (t) => ({
|
|
7167
7129
|
setEntitiesWatchers: t.mutation({
|
|
7168
7130
|
async queryFn({ entities: e = [] }, { dispatch: s }) {
|
|
7169
7131
|
const n = e.map(async (i) => {
|
|
7170
7132
|
const r = await s(
|
|
7171
|
-
|
|
7133
|
+
qe.endpoints.setEntityWatchers.initiate({
|
|
7172
7134
|
entityId: i.entityId,
|
|
7173
7135
|
entityType: i.entityType,
|
|
7174
7136
|
projectName: i.projectName,
|
|
@@ -7184,12 +7146,12 @@ query Assignees($projectName: String) {
|
|
|
7184
7146
|
}
|
|
7185
7147
|
},
|
|
7186
7148
|
async onQueryStarted({ entities: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
|
|
7187
|
-
const r = i(), a = e.map((u) => ({ type: "watchers", id: u.entityId })), c =
|
|
7149
|
+
const r = i(), a = e.map((u) => ({ type: "watchers", id: u.entityId })), c = qe.util.selectInvalidatedBy(r, a);
|
|
7188
7150
|
let d = [];
|
|
7189
7151
|
try {
|
|
7190
7152
|
c.forEach((u) => {
|
|
7191
7153
|
const o = s(
|
|
7192
|
-
|
|
7154
|
+
Zt.util.updateQueryData(
|
|
7193
7155
|
"getEntitiesWatchers",
|
|
7194
7156
|
u.originalArgs,
|
|
7195
7157
|
(l) => {
|
|
@@ -7214,295 +7176,295 @@ query Assignees($projectName: String) {
|
|
|
7214
7176
|
invalidatesTags: (e, s, { entities: n }) => n.some((i) => i.entityType === "task") ? [{ type: "watchers", id: "VERSION-LIST" }] : []
|
|
7215
7177
|
})
|
|
7216
7178
|
})
|
|
7217
|
-
}), { useGetEntitiesWatchersQuery:
|
|
7179
|
+
}), { useGetEntitiesWatchersQuery: dd, useSetEntitiesWatchersMutation: ud } = Ir, Tr = Hs.enhanceEndpoints({
|
|
7218
7180
|
endpoints: {
|
|
7219
7181
|
resolveUris: {}
|
|
7220
7182
|
}
|
|
7221
|
-
}), { useResolveUrisMutation:
|
|
7183
|
+
}), { useResolveUrisMutation: ld } = Tr;
|
|
7222
7184
|
export {
|
|
7223
7185
|
ot as $,
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7186
|
+
B as A,
|
|
7187
|
+
mi as B,
|
|
7188
|
+
Yn as C,
|
|
7227
7189
|
se as D,
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7190
|
+
qi as E,
|
|
7191
|
+
Nn as F,
|
|
7192
|
+
Zn as G,
|
|
7193
|
+
Xn as H,
|
|
7232
7194
|
$e as I,
|
|
7233
|
-
|
|
7195
|
+
Vn as J,
|
|
7234
7196
|
ye as K,
|
|
7235
7197
|
qt as L,
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7198
|
+
jn as M,
|
|
7199
|
+
Ur as N,
|
|
7200
|
+
ds as O,
|
|
7201
|
+
Cn as P,
|
|
7202
|
+
gi as Q,
|
|
7241
7203
|
gt as R,
|
|
7242
|
-
|
|
7204
|
+
bt as S,
|
|
7243
7205
|
ze as T,
|
|
7244
|
-
|
|
7245
|
-
|
|
7206
|
+
q as U,
|
|
7207
|
+
Gn as V,
|
|
7246
7208
|
V as W,
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7209
|
+
Kr as X,
|
|
7210
|
+
Ui as Y,
|
|
7211
|
+
Ae as Z,
|
|
7250
7212
|
N as _,
|
|
7251
7213
|
tt as a,
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7214
|
+
go as a$,
|
|
7215
|
+
Pi as a0,
|
|
7216
|
+
we as a1,
|
|
7255
7217
|
ke as a2,
|
|
7256
|
-
|
|
7257
|
-
|
|
7218
|
+
Yr as a3,
|
|
7219
|
+
Gt as a4,
|
|
7258
7220
|
R as a5,
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7221
|
+
ls as a6,
|
|
7222
|
+
us as a7,
|
|
7223
|
+
rr as a8,
|
|
7224
|
+
Oa as a9,
|
|
7225
|
+
Rt as aA,
|
|
7226
|
+
zc as aB,
|
|
7227
|
+
vc as aC,
|
|
7228
|
+
Ro as aD,
|
|
7229
|
+
No as aE,
|
|
7230
|
+
lo as aF,
|
|
7231
|
+
rc as aG,
|
|
7232
|
+
ec as aH,
|
|
7233
|
+
eo as aI,
|
|
7234
|
+
Ka as aJ,
|
|
7235
|
+
lc as aK,
|
|
7236
|
+
yc as aL,
|
|
7237
|
+
yo as aM,
|
|
7238
|
+
so as aN,
|
|
7239
|
+
Lo as aO,
|
|
7240
|
+
Xc as aP,
|
|
7241
|
+
rd as aQ,
|
|
7242
|
+
Mr as aR,
|
|
7243
|
+
po as aS,
|
|
7244
|
+
ko as aT,
|
|
7245
|
+
Co as aU,
|
|
7246
|
+
ic as aV,
|
|
7247
|
+
tc as aW,
|
|
7248
|
+
to as aX,
|
|
7249
|
+
Ya as aY,
|
|
7250
|
+
gc as aZ,
|
|
7251
|
+
wa as a_,
|
|
7252
|
+
Be as aa,
|
|
7291
7253
|
Ee as ab,
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7254
|
+
ai as ac,
|
|
7255
|
+
di as ad,
|
|
7256
|
+
oi as ae,
|
|
7257
|
+
Ji as af,
|
|
7296
7258
|
mt as ag,
|
|
7297
7259
|
ee as ah,
|
|
7298
7260
|
W as ai,
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7261
|
+
Kn as aj,
|
|
7262
|
+
Jn as ak,
|
|
7263
|
+
zn as al,
|
|
7302
7264
|
xe as am,
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7265
|
+
Si as an,
|
|
7266
|
+
tr as ao,
|
|
7267
|
+
Jr as ap,
|
|
7268
|
+
nr as aq,
|
|
7269
|
+
Wr as ar,
|
|
7270
|
+
Es as as,
|
|
7271
|
+
En as at,
|
|
7272
|
+
or as au,
|
|
7273
|
+
Jo as av,
|
|
7274
|
+
Br as aw,
|
|
7313
7275
|
je as ax,
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7276
|
+
ti as ay,
|
|
7277
|
+
hs as az,
|
|
7278
|
+
zi as b,
|
|
7279
|
+
Ma as b$,
|
|
7280
|
+
kc as b0,
|
|
7281
|
+
Qc as b1,
|
|
7282
|
+
Cc as b2,
|
|
7283
|
+
Zc as b3,
|
|
7284
|
+
od as b4,
|
|
7285
|
+
xo as b5,
|
|
7286
|
+
ka as b6,
|
|
7287
|
+
wo as b7,
|
|
7288
|
+
Or as b8,
|
|
7289
|
+
Rr as b9,
|
|
7290
|
+
za as bA,
|
|
7291
|
+
ho as bB,
|
|
7292
|
+
ya as bC,
|
|
7293
|
+
fa as bD,
|
|
7294
|
+
no as bE,
|
|
7295
|
+
pa as bF,
|
|
7296
|
+
Uo as bG,
|
|
7297
|
+
ia as bH,
|
|
7298
|
+
ca as bI,
|
|
7299
|
+
aa as bJ,
|
|
7300
|
+
oa as bK,
|
|
7301
|
+
pc as bL,
|
|
7302
|
+
na as bM,
|
|
7303
|
+
Va as bN,
|
|
7304
|
+
La as bO,
|
|
7305
|
+
Pa as bP,
|
|
7306
|
+
Jc as bQ,
|
|
7307
|
+
oc as bR,
|
|
7308
|
+
Yo as bS,
|
|
7309
|
+
Ba as bT,
|
|
7310
|
+
Ua as bU,
|
|
7311
|
+
qa as bV,
|
|
7312
|
+
cc as bW,
|
|
7313
|
+
dc as bX,
|
|
7314
|
+
Xr as bY,
|
|
7315
|
+
ha as bZ,
|
|
7316
|
+
Ga as b_,
|
|
7317
|
+
Gr as ba,
|
|
7318
|
+
_r as bb,
|
|
7319
|
+
$r as bc,
|
|
7320
|
+
Vr as bd,
|
|
7321
|
+
Dc as be,
|
|
7322
|
+
io as bf,
|
|
7323
|
+
co as bg,
|
|
7324
|
+
oo as bh,
|
|
7325
|
+
mo as bi,
|
|
7326
|
+
uo as bj,
|
|
7327
|
+
Oc as bk,
|
|
7328
|
+
Mc as bl,
|
|
7329
|
+
Eo as bm,
|
|
7330
|
+
Ao as bn,
|
|
7331
|
+
id as bo,
|
|
7332
|
+
Wo as bp,
|
|
7333
|
+
qc as bq,
|
|
7334
|
+
To as br,
|
|
7335
|
+
nd as bs,
|
|
7336
|
+
ao as bt,
|
|
7337
|
+
ua as bu,
|
|
7338
|
+
dd as bv,
|
|
7339
|
+
nc as bw,
|
|
7340
|
+
xa as bx,
|
|
7341
|
+
Ko as by,
|
|
7342
|
+
Zo as bz,
|
|
7343
|
+
Pt as c,
|
|
7344
|
+
Qr as c$,
|
|
7345
|
+
bo as c0,
|
|
7346
|
+
Ia as c1,
|
|
7347
|
+
Go as c2,
|
|
7348
|
+
fc as c3,
|
|
7349
|
+
va as c4,
|
|
7350
|
+
Cr as c5,
|
|
7351
|
+
vo as c6,
|
|
7352
|
+
Ta as c7,
|
|
7353
|
+
ja as c8,
|
|
7354
|
+
Ic as c9,
|
|
7355
|
+
sd as cA,
|
|
7356
|
+
bc as cB,
|
|
7357
|
+
td as cC,
|
|
7358
|
+
Oo as cD,
|
|
7359
|
+
Tc as cE,
|
|
7360
|
+
Dr as cF,
|
|
7361
|
+
ro as cG,
|
|
7362
|
+
Vc as cH,
|
|
7363
|
+
la as cI,
|
|
7364
|
+
ga as cJ,
|
|
7365
|
+
da as cK,
|
|
7366
|
+
Wa as cL,
|
|
7367
|
+
Ha as cM,
|
|
7368
|
+
Pc as cN,
|
|
7369
|
+
sa as cO,
|
|
7370
|
+
_o as cP,
|
|
7371
|
+
ji as cQ,
|
|
7372
|
+
Fo as cR,
|
|
7373
|
+
Lc as cS,
|
|
7374
|
+
Wc as cT,
|
|
7375
|
+
ba as cU,
|
|
7376
|
+
ed as cV,
|
|
7377
|
+
Mo as cW,
|
|
7378
|
+
Po as cX,
|
|
7379
|
+
Qo as cY,
|
|
7380
|
+
Kc as cZ,
|
|
7381
|
+
ld as c_,
|
|
7382
|
+
Zr as ca,
|
|
7383
|
+
ma as cb,
|
|
7384
|
+
ac as cc,
|
|
7385
|
+
qo as cd,
|
|
7386
|
+
Bo as ce,
|
|
7387
|
+
Ho as cf,
|
|
7388
|
+
Io as cg,
|
|
7389
|
+
Ec as ch,
|
|
7390
|
+
Sc as ci,
|
|
7391
|
+
Fr as cj,
|
|
7392
|
+
ra as ck,
|
|
7393
|
+
jc as cl,
|
|
7394
|
+
ta as cm,
|
|
7395
|
+
ea as cn,
|
|
7396
|
+
_c as co,
|
|
7397
|
+
xc as cp,
|
|
7398
|
+
jo as cq,
|
|
7399
|
+
Hc as cr,
|
|
7400
|
+
Bc as cs,
|
|
7401
|
+
Uc as ct,
|
|
7402
|
+
$c as cu,
|
|
7403
|
+
Yc as cv,
|
|
7404
|
+
Qa as cw,
|
|
7405
|
+
Ca as cx,
|
|
7406
|
+
Na as cy,
|
|
7407
|
+
Ra as cz,
|
|
7408
|
+
Rn as d,
|
|
7409
|
+
Nc as d0,
|
|
7410
|
+
Gc as d1,
|
|
7411
|
+
xr as d2,
|
|
7412
|
+
So as d3,
|
|
7413
|
+
cd as d4,
|
|
7414
|
+
ud as d5,
|
|
7415
|
+
Xo as d6,
|
|
7416
|
+
Aa as d7,
|
|
7417
|
+
Sa as d8,
|
|
7418
|
+
mc as d9,
|
|
7419
|
+
uc as dA,
|
|
7420
|
+
os as dB,
|
|
7421
|
+
Hr as dC,
|
|
7422
|
+
as as dD,
|
|
7423
|
+
Nr as da,
|
|
7424
|
+
zo as db,
|
|
7425
|
+
$o as dc,
|
|
7426
|
+
wc as dd,
|
|
7427
|
+
Do as de,
|
|
7428
|
+
fo as df,
|
|
7429
|
+
Vo as dg,
|
|
7430
|
+
Fa as dh,
|
|
7431
|
+
sc as di,
|
|
7432
|
+
Za as dj,
|
|
7433
|
+
Xa as dk,
|
|
7434
|
+
Ja as dl,
|
|
7435
|
+
_a as dm,
|
|
7436
|
+
$a as dn,
|
|
7437
|
+
hc as dp,
|
|
7438
|
+
Ea as dq,
|
|
7439
|
+
Ac as dr,
|
|
7440
|
+
Fc as ds,
|
|
7441
|
+
Rc as dt,
|
|
7442
|
+
ad as du,
|
|
7443
|
+
Wn as dv,
|
|
7444
|
+
vr as dw,
|
|
7445
|
+
br as dx,
|
|
7446
|
+
Ir as dy,
|
|
7447
|
+
Mi as dz,
|
|
7486
7448
|
ae as e,
|
|
7487
|
-
|
|
7449
|
+
Ei as f,
|
|
7488
7450
|
Is as g,
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7451
|
+
In as h,
|
|
7452
|
+
en as i,
|
|
7453
|
+
_i as j,
|
|
7454
|
+
Ri as k,
|
|
7455
|
+
zr as l,
|
|
7456
|
+
Qi as m,
|
|
7495
7457
|
fe as n,
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7458
|
+
qr as o,
|
|
7459
|
+
Vi as p,
|
|
7460
|
+
pi as q,
|
|
7499
7461
|
Ie as r,
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7462
|
+
Da as s,
|
|
7463
|
+
_n as t,
|
|
7464
|
+
Xs as u,
|
|
7503
7465
|
de as v,
|
|
7504
7466
|
z as w,
|
|
7505
|
-
|
|
7467
|
+
ps as x,
|
|
7506
7468
|
le as y,
|
|
7507
|
-
|
|
7469
|
+
xi as z
|
|
7508
7470
|
};
|