@overmap-ai/core 1.0.78-view-sets.30 → 1.0.78-view-sets.32
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/overmap-core.js +872 -832
- package/dist/overmap-core.umd.cjs +3 -3
- package/dist/sdk/constants.d.ts +1 -1
- package/package.json +1 -1
package/dist/overmap-core.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var A = (t, e, s) =>
|
|
1
|
+
var jr = Object.defineProperty;
|
|
2
|
+
var zr = (t, e, s) => e in t ? jr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var A = (t, e, s) => zr(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
4
|
import "@redux-offline/redux-offline/lib/types";
|
|
5
|
-
import { createAction as zt, createSlice as P, isAnyOf as I, createSelector as m, combineReducers as Ta, compose as
|
|
5
|
+
import { createAction as zt, createSlice as P, isAnyOf as I, createSelector as m, combineReducers as Ta, compose as Ur } from "@reduxjs/toolkit";
|
|
6
6
|
import Ge from "superagent";
|
|
7
7
|
import { v4 as Le } from "uuid";
|
|
8
|
-
import { saveAs as
|
|
9
|
-
import { offline as
|
|
8
|
+
import { saveAs as Dr } from "file-saver";
|
|
9
|
+
import { offline as xr } from "@redux-offline/redux-offline";
|
|
10
10
|
import Jt from "@redux-offline/redux-offline/lib/defaults";
|
|
11
11
|
import "buffer";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import Vr from "localforage";
|
|
13
|
+
import Cr from "redux-persist-migrate";
|
|
14
14
|
import "@overmap-ai/forms";
|
|
15
|
-
import { openDB as $
|
|
16
|
-
import
|
|
17
|
-
import { DepGraph as
|
|
15
|
+
import { openDB as $r } from "idb";
|
|
16
|
+
import Gr from "jwt-decode";
|
|
17
|
+
import { DepGraph as Br } from "dependency-graph";
|
|
18
18
|
import "@tiptap/core";
|
|
19
|
-
const
|
|
20
|
-
var
|
|
21
|
-
const bm = Oa.BACKLOG, gm = Fa.MEDIUM,
|
|
19
|
+
const Lr = Object.freeze([]), Nr = Object.freeze({});
|
|
20
|
+
var Hr = /* @__PURE__ */ ((t) => (t[t.GUEST = 0] = "GUEST", t[t.BASIC = 2] = "BASIC", t[t.ADMIN = 4] = "ADMIN", t))(Hr || {}), u = /* @__PURE__ */ ((t) => (t.GET = "GET", t.POST = "POST", t.PATCH = "PATCH", t.PUT = "PUT", t.DELETE = "DELETE", t))(u || {}), Wr = /* @__PURE__ */ ((t) => (t.Issue = "issue", t.Asset = "asset", t.AssetType = "asset_type", t.Project = "project", t.Document = "document", t))(Wr || {}), Fa = /* @__PURE__ */ ((t) => (t[t.LOWEST = 0] = "LOWEST", t[t.LOW = 2] = "LOW", t[t.MEDIUM = 4] = "MEDIUM", t[t.HIGH = 6] = "HIGH", t[t.HIGHEST = 8] = "HIGHEST", t))(Fa || {}), Oa = /* @__PURE__ */ ((t) => (t[t.BACKLOG = 0] = "BACKLOG", t[t.SELECTED = 2] = "SELECTED", t[t.DONE = 4] = "DONE", t))(Oa || {}), z = /* @__PURE__ */ ((t) => (t.STATUS = "status", t.PRIORITY = "priority", t.CATEGORY = "category", t.DESCRIPTION = "description", t.TITLE = "title", t.ASSIGNED_TO = "assigned_to", t.DUE_DATE = "due_date", t))(z || {});
|
|
21
|
+
const bm = Oa.BACKLOG, gm = Fa.MEDIUM, Kr = 6e4;
|
|
22
22
|
function O(t) {
|
|
23
23
|
return {
|
|
24
24
|
addOne: (h, p) => {
|
|
@@ -75,35 +75,35 @@ function O(t) {
|
|
|
75
75
|
}
|
|
76
76
|
function Sm() {
|
|
77
77
|
return {
|
|
78
|
-
initializeSelection: (l,
|
|
79
|
-
l.selection = Array.from(new Set(
|
|
78
|
+
initializeSelection: (l, c) => {
|
|
79
|
+
l.selection = Array.from(new Set(c.payload));
|
|
80
80
|
},
|
|
81
|
-
selectOne: (l,
|
|
82
|
-
new Set(l.selection).has(
|
|
81
|
+
selectOne: (l, c) => {
|
|
82
|
+
new Set(l.selection).has(c.payload) || l.selection.push(c.payload);
|
|
83
83
|
},
|
|
84
|
-
selectMany: (l,
|
|
84
|
+
selectMany: (l, c) => {
|
|
85
85
|
const d = new Set(l.selection);
|
|
86
|
-
for (const h of
|
|
86
|
+
for (const h of c.payload)
|
|
87
87
|
d.has(h) || d.add(h);
|
|
88
88
|
l.selection = Array.from(d);
|
|
89
89
|
},
|
|
90
|
-
unselectOne: (l,
|
|
90
|
+
unselectOne: (l, c) => {
|
|
91
91
|
const d = new Set(l.selection);
|
|
92
|
-
d.has(
|
|
92
|
+
d.has(c.payload) && (d.delete(c.payload), l.selection = Array.from(d));
|
|
93
93
|
},
|
|
94
|
-
unselectMany: (l,
|
|
94
|
+
unselectMany: (l, c) => {
|
|
95
95
|
const d = new Set(l.selection);
|
|
96
|
-
for (const h of
|
|
96
|
+
for (const h of c.payload)
|
|
97
97
|
d.has(h) && d.delete(h);
|
|
98
98
|
l.selection = Array.from(d);
|
|
99
99
|
},
|
|
100
|
-
toggleOne: (l,
|
|
100
|
+
toggleOne: (l, c) => {
|
|
101
101
|
const d = new Set(l.selection);
|
|
102
|
-
d.has(
|
|
102
|
+
d.has(c.payload) ? d.delete(c.payload) : d.add(c.payload), l.selection = Array.from(d);
|
|
103
103
|
},
|
|
104
|
-
toggleMany: (l,
|
|
104
|
+
toggleMany: (l, c) => {
|
|
105
105
|
const d = new Set(l.selection);
|
|
106
|
-
for (const h of
|
|
106
|
+
for (const h of c.payload)
|
|
107
107
|
d.has(h) ? d.delete(h) : d.add(h);
|
|
108
108
|
l.selection = Array.from(d);
|
|
109
109
|
},
|
|
@@ -116,7 +116,7 @@ function Sm() {
|
|
|
116
116
|
const ht = "versioning", _ = zt("RESET"), E = zt("RESET_PROJECT_STATE"), R = zt("RESET_ORGANIZATION_STATE");
|
|
117
117
|
var Pa;
|
|
118
118
|
Pa = Symbol.toStringTag;
|
|
119
|
-
class
|
|
119
|
+
class Yr {
|
|
120
120
|
constructor() {
|
|
121
121
|
A(this, Pa, "Promise");
|
|
122
122
|
A(this, "_promise");
|
|
@@ -156,8 +156,8 @@ const _m = (t) => ({
|
|
|
156
156
|
coordinates: t
|
|
157
157
|
}), Tm = (t, e) => t[0] === e[0] && t[1] === e[1];
|
|
158
158
|
let Tt = !1;
|
|
159
|
-
const
|
|
160
|
-
["true", "1"].includes(
|
|
159
|
+
const Jr = "";
|
|
160
|
+
["true", "1"].includes(Jr.toLowerCase()) && (Tt = !0);
|
|
161
161
|
function Fm(t, e) {
|
|
162
162
|
if (t === e) return !0;
|
|
163
163
|
if (typeof t != typeof e)
|
|
@@ -165,8 +165,8 @@ function Fm(t, e) {
|
|
|
165
165
|
const s = Object.keys(t), i = Object.keys(e), a = s.length;
|
|
166
166
|
if (a !== i.length) return !1;
|
|
167
167
|
for (let n = 0; n < a; n++) {
|
|
168
|
-
const
|
|
169
|
-
if (!Object.prototype.hasOwnProperty.call(e,
|
|
168
|
+
const r = s[n];
|
|
169
|
+
if (!Object.prototype.hasOwnProperty.call(e, r) || t[r] !== e[r])
|
|
170
170
|
return !1;
|
|
171
171
|
}
|
|
172
172
|
return !0;
|
|
@@ -184,15 +184,15 @@ function Om(t, e) {
|
|
|
184
184
|
if (t[s] !== e[s]) return !1;
|
|
185
185
|
return !0;
|
|
186
186
|
}
|
|
187
|
-
const b = (t) => t.length === 0 ?
|
|
187
|
+
const b = (t) => t.length === 0 ? Lr : t, Ut = (t) => Object.keys(t).length === 0 ? Nr : t, Zr = Ia((t) => {
|
|
188
188
|
if (!t) return "";
|
|
189
189
|
const e = new Date(t), s = e.getFullYear() === Dt.getFullYear(), i = { day: "numeric", month: "short" };
|
|
190
190
|
return s || (i.year = "numeric"), e.toLocaleDateString([], i);
|
|
191
|
-
}),
|
|
192
|
-
const i = Math.round((new Date(t).getTime() - Dt.getTime()) /
|
|
193
|
-
return i < e || i > s ?
|
|
191
|
+
}), Qr = new Intl.RelativeTimeFormat([], { style: "long", numeric: "auto" }), Xr = 1e3 * 86400, Dt = /* @__PURE__ */ new Date(), Im = (t) => new Date(t).toDateString() === Dt.toDateString(), Rm = Ia((t, e, s) => {
|
|
192
|
+
const i = Math.round((new Date(t).getTime() - Dt.getTime()) / Xr);
|
|
193
|
+
return i < e || i > s ? Zr(t) : Qr.format(i, "days");
|
|
194
194
|
});
|
|
195
|
-
function
|
|
195
|
+
function ec(t) {
|
|
196
196
|
return new Uint8Array(t).reduce((s, i) => s + i.toString(16).padStart(2, "0"), "");
|
|
197
197
|
}
|
|
198
198
|
const Zt = async (t, e) => {
|
|
@@ -212,8 +212,8 @@ function Ke(t) {
|
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
crypto.subtle.digest("SHA-1", a).then((n) => {
|
|
215
|
-
const
|
|
216
|
-
e(
|
|
215
|
+
const r = ec(n);
|
|
216
|
+
e(r);
|
|
217
217
|
});
|
|
218
218
|
}, i.readAsArrayBuffer(t);
|
|
219
219
|
});
|
|
@@ -225,7 +225,7 @@ function vm(t) {
|
|
|
225
225
|
}
|
|
226
226
|
return `${t.name}&${t.type}${t.size}`;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function tc(t, e) {
|
|
229
229
|
return new File([t], e, { type: t.type });
|
|
230
230
|
}
|
|
231
231
|
function wm(t, e) {
|
|
@@ -244,7 +244,7 @@ const km = async (t) => {
|
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
return Object.values(e);
|
|
247
|
-
},
|
|
247
|
+
}, sc = async (t) => (await fetch(t)).blob(), Em = (t) => new Promise((e, s) => {
|
|
248
248
|
const i = new FileReader();
|
|
249
249
|
i.onloadend = () => {
|
|
250
250
|
var a;
|
|
@@ -253,7 +253,7 @@ const km = async (t) => {
|
|
|
253
253
|
});
|
|
254
254
|
function Mm(t) {
|
|
255
255
|
const e = new Blob([t]);
|
|
256
|
-
|
|
256
|
+
Dr(e, t.name);
|
|
257
257
|
}
|
|
258
258
|
const Qt = {};
|
|
259
259
|
function qm(t, e, s, ...i) {
|
|
@@ -261,11 +261,11 @@ function qm(t, e, s, ...i) {
|
|
|
261
261
|
let n = !1;
|
|
262
262
|
a ? a[e] || (a[e] = !0, n = !0) : (Qt[t] = { [e]: !0 }, n = !0), n && console[s](...i);
|
|
263
263
|
}
|
|
264
|
-
const
|
|
264
|
+
const ic = ["created_at", "updated_at", "index", "revision"];
|
|
265
265
|
function F(t) {
|
|
266
266
|
return { ...t, uuid: Le() };
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function ac(t) {
|
|
269
269
|
const e = {};
|
|
270
270
|
for (const s of t)
|
|
271
271
|
e[s.uuid] = s;
|
|
@@ -294,7 +294,7 @@ function Dm(t, e) {
|
|
|
294
294
|
return s.slice(0, s.lastIndexOf(" ")) + "…";
|
|
295
295
|
}
|
|
296
296
|
const y = (t) => (e) => (s) => t(s, e);
|
|
297
|
-
function
|
|
297
|
+
function nc(t, e, s) {
|
|
298
298
|
return s.findIndex((i) => i.uuid === t.uuid) === e;
|
|
299
299
|
}
|
|
300
300
|
function xm(t, e, s) {
|
|
@@ -303,7 +303,7 @@ function xm(t, e, s) {
|
|
|
303
303
|
const Vm = /^.+@.+\..+$/;
|
|
304
304
|
function w(t) {
|
|
305
305
|
const e = { ...t };
|
|
306
|
-
for (const s of [...
|
|
306
|
+
for (const s of [...ic, "created_by"])
|
|
307
307
|
s in e && delete e[s];
|
|
308
308
|
return e;
|
|
309
309
|
}
|
|
@@ -328,12 +328,12 @@ const C = O(
|
|
|
328
328
|
deleteConversations: C.deleteMany
|
|
329
329
|
}
|
|
330
330
|
}), {
|
|
331
|
-
initializeConversations:
|
|
332
|
-
addConversation:
|
|
331
|
+
initializeConversations: rc,
|
|
332
|
+
addConversation: cc,
|
|
333
333
|
addConversations: Cm,
|
|
334
|
-
setConversation:
|
|
334
|
+
setConversation: oc,
|
|
335
335
|
setConversations: $m,
|
|
336
|
-
updateConversation:
|
|
336
|
+
updateConversation: dc,
|
|
337
337
|
updateConversations: Gm,
|
|
338
338
|
deleteConversation: Bm,
|
|
339
339
|
deleteConversations: Lm
|
|
@@ -345,7 +345,7 @@ const C = O(
|
|
|
345
345
|
[va, (t, e) => e],
|
|
346
346
|
(t, e) => t[e]
|
|
347
347
|
)
|
|
348
|
-
),
|
|
348
|
+
), uc = Ra.reducer, $ = O(
|
|
349
349
|
(t) => t.uuid
|
|
350
350
|
), es = $.getInitialState({}), wa = P({
|
|
351
351
|
name: "assetAttachments",
|
|
@@ -369,21 +369,21 @@ const C = O(
|
|
|
369
369
|
initializeAssetAttachments: ts,
|
|
370
370
|
addAssetAttachment: Wm,
|
|
371
371
|
addAssetAttachments: ka,
|
|
372
|
-
setAssetAttachment:
|
|
372
|
+
setAssetAttachment: lc,
|
|
373
373
|
setAssetAttachments: Km,
|
|
374
374
|
updateAssetAttachment: Ym,
|
|
375
|
-
updateAssetAttachments:
|
|
376
|
-
deleteAssetAttachment:
|
|
375
|
+
updateAssetAttachments: hc,
|
|
376
|
+
deleteAssetAttachment: pc,
|
|
377
377
|
deleteAssetAttachments: Ea
|
|
378
|
-
} = wa.actions,
|
|
379
|
-
[
|
|
378
|
+
} = wa.actions, mc = (t) => t.assetAttachmentReducer.instances, fc = m(
|
|
379
|
+
[mc],
|
|
380
380
|
(t) => Object.values(t)
|
|
381
|
-
),
|
|
381
|
+
), Ac = (t) => (e) => e.assetAttachmentReducer.instances[t], yc = y(
|
|
382
382
|
m(
|
|
383
|
-
[
|
|
383
|
+
[fc, (t, e) => e],
|
|
384
384
|
(t, e) => b(t.filter(({ asset: s }) => e === s))
|
|
385
385
|
)
|
|
386
|
-
),
|
|
386
|
+
), bc = wa.reducer, G = O((t) => t.uuid), ss = G.getInitialState({}), Ma = P({
|
|
387
387
|
name: "assetProcedureAttachments",
|
|
388
388
|
initialState: ss,
|
|
389
389
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -402,29 +402,29 @@ const C = O(
|
|
|
402
402
|
deleteAssetProcedureAttachments: G.deleteMany
|
|
403
403
|
}
|
|
404
404
|
}), {
|
|
405
|
-
initializeAssetProcedureAttachments:
|
|
405
|
+
initializeAssetProcedureAttachments: gc,
|
|
406
406
|
addAssetProcedureAttachment: Jm,
|
|
407
|
-
addAssetProcedureAttachments:
|
|
408
|
-
setAssetProcedureAttachment:
|
|
407
|
+
addAssetProcedureAttachments: Sc,
|
|
408
|
+
setAssetProcedureAttachment: _c,
|
|
409
409
|
setAssetProcedureAttachments: Zm,
|
|
410
410
|
updateAssetProcedureAttachment: Qm,
|
|
411
|
-
updateAssetProcedureAttachments:
|
|
412
|
-
deleteAssetProcedureAttachment:
|
|
413
|
-
deleteAssetProcedureAttachments:
|
|
414
|
-
} = Ma.actions,
|
|
415
|
-
[
|
|
411
|
+
updateAssetProcedureAttachments: Pc,
|
|
412
|
+
deleteAssetProcedureAttachment: Tc,
|
|
413
|
+
deleteAssetProcedureAttachments: Fc
|
|
414
|
+
} = Ma.actions, Oc = (t) => t.assetProcedureAttachmentReducer.instances, Ic = m(
|
|
415
|
+
[Oc],
|
|
416
416
|
(t) => Object.values(t)
|
|
417
|
-
),
|
|
417
|
+
), Rc = (t) => (e) => e.assetProcedureAttachmentReducer.instances[t], Xm = y(
|
|
418
418
|
m(
|
|
419
419
|
[
|
|
420
|
-
|
|
420
|
+
Ic,
|
|
421
421
|
(t, e) => e
|
|
422
422
|
],
|
|
423
423
|
(t, e) => b(
|
|
424
424
|
t.filter(({ asset_procedure: s }) => e === s)
|
|
425
425
|
)
|
|
426
426
|
)
|
|
427
|
-
),
|
|
427
|
+
), vc = Ma.reducer, B = O((t) => t.uuid), is = B.getInitialState({}), qa = P({
|
|
428
428
|
name: "assetProcedureFieldsAttachments",
|
|
429
429
|
initialState: is,
|
|
430
430
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -443,21 +443,21 @@ const C = O(
|
|
|
443
443
|
deleteAssetProcedureFieldsAttachments: B.deleteMany
|
|
444
444
|
}
|
|
445
445
|
}), {
|
|
446
|
-
initializeAssetProcedureFieldsAttachments:
|
|
446
|
+
initializeAssetProcedureFieldsAttachments: wc,
|
|
447
447
|
addAssetProcedureFieldsAttachment: ef,
|
|
448
|
-
addAssetProcedureFieldsAttachments:
|
|
448
|
+
addAssetProcedureFieldsAttachments: kc,
|
|
449
449
|
setAssetProcedureFieldsAttachment: tf,
|
|
450
450
|
setAssetProcedureFieldsAttachments: sf,
|
|
451
451
|
updateAssetProcedureFieldsAttachment: af,
|
|
452
|
-
updateAssetProcedureFieldsAttachments:
|
|
452
|
+
updateAssetProcedureFieldsAttachments: Ec,
|
|
453
453
|
deleteAssetProcedureFieldsAttachment: nf,
|
|
454
|
-
deleteAssetProcedureFieldsAttachments:
|
|
455
|
-
} = qa.actions,
|
|
456
|
-
[
|
|
454
|
+
deleteAssetProcedureFieldsAttachments: Mc
|
|
455
|
+
} = qa.actions, qc = (t) => t.assetProcedureFieldsAttachmentReducer.instances, jc = m(
|
|
456
|
+
[qc],
|
|
457
457
|
(t) => Object.values(t)
|
|
458
|
-
),
|
|
459
|
-
m([
|
|
460
|
-
),
|
|
458
|
+
), rf = y(
|
|
459
|
+
m([jc, (t, e) => e], (t, e) => b(t.filter((s) => s.fields_revision === e)))
|
|
460
|
+
), cf = (t) => (e) => e.assetProcedureFieldsAttachmentReducer.instances[t], zc = qa.reducer, L = O(
|
|
461
461
|
(t) => t.uuid
|
|
462
462
|
), as = L.getInitialState({}), ja = P({
|
|
463
463
|
name: "assetProcedureFields",
|
|
@@ -478,23 +478,23 @@ const C = O(
|
|
|
478
478
|
deleteAssetProcedureFieldsMany: L.deleteMany
|
|
479
479
|
}
|
|
480
480
|
}), {
|
|
481
|
-
initializeAssetProcedureFields:
|
|
482
|
-
addAssetProcedureFields:
|
|
481
|
+
initializeAssetProcedureFields: Uc,
|
|
482
|
+
addAssetProcedureFields: Dc,
|
|
483
483
|
addAssetProcedureFieldsMany: of,
|
|
484
484
|
setAssetProcedureFields: df,
|
|
485
485
|
setAssetProcedureFieldsMany: uf,
|
|
486
|
-
updateAssetProcedureFields:
|
|
486
|
+
updateAssetProcedureFields: xc,
|
|
487
487
|
updateAssetProcedureFieldsMany: lf,
|
|
488
|
-
deleteAssetProcedureFields:
|
|
488
|
+
deleteAssetProcedureFields: Vc,
|
|
489
489
|
deleteAssetProcedureFieldsMany: hf
|
|
490
|
-
} = ja.actions,
|
|
490
|
+
} = ja.actions, Cc = (t) => t.assetProcedureFieldsReducer.instances, za = m([Cc], (t) => Object.values(t)), pf = y(
|
|
491
491
|
m(
|
|
492
492
|
[za, (t, e) => e],
|
|
493
493
|
(t, e) => b(t.filter((s) => s.asset_procedure === e))
|
|
494
494
|
)
|
|
495
495
|
), mf = y(
|
|
496
496
|
m([za, (t, e) => e], (t, e) => t.filter((s) => s.asset_procedure === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
497
|
-
), ff = (t) => (e) => e.assetProcedureFieldsReducer.instances[t], $
|
|
497
|
+
), ff = (t) => (e) => e.assetProcedureFieldsReducer.instances[t], $c = ja.reducer, N = O((t) => t.uuid), ns = N.getInitialState({}), Ua = P({
|
|
498
498
|
name: "assetProcedureFieldValuesAttachments",
|
|
499
499
|
initialState: ns,
|
|
500
500
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -513,19 +513,19 @@ const C = O(
|
|
|
513
513
|
deleteAssetProcedureFieldValuesAttachments: N.deleteMany
|
|
514
514
|
}
|
|
515
515
|
}), {
|
|
516
|
-
initializeAssetProcedureFieldValuesAttachments:
|
|
516
|
+
initializeAssetProcedureFieldValuesAttachments: Gc,
|
|
517
517
|
addAssetProcedureFieldValuesAttachment: Af,
|
|
518
518
|
addAssetProcedureFieldValuesAttachments: Ft,
|
|
519
519
|
setAssetProcedureFieldValuesAttachment: yf,
|
|
520
520
|
setAssetProcedureFieldValuesAttachments: bf,
|
|
521
521
|
updateAssetProcedureFieldValuesAttachment: gf,
|
|
522
|
-
updateAssetProcedureFieldValuesAttachments:
|
|
522
|
+
updateAssetProcedureFieldValuesAttachments: Bc,
|
|
523
523
|
deleteAssetProcedureFieldValuesAttachment: Sf,
|
|
524
524
|
deleteAssetProcedureFieldValuesAttachments: Ot
|
|
525
|
-
} = Ua.actions, Da = (t) => t.assetProcedureFieldValuesAttachmentReducer.instances,
|
|
525
|
+
} = Ua.actions, Da = (t) => t.assetProcedureFieldValuesAttachmentReducer.instances, Lc = m(
|
|
526
526
|
[Da],
|
|
527
527
|
(t) => Object.values(t)
|
|
528
|
-
), _f = (t) => (e) => e.assetProcedureFieldValuesAttachmentReducer.instances[t],
|
|
528
|
+
), _f = (t) => (e) => e.assetProcedureFieldValuesAttachmentReducer.instances[t], Nc = y(
|
|
529
529
|
m(
|
|
530
530
|
[
|
|
531
531
|
Da,
|
|
@@ -536,17 +536,17 @@ const C = O(
|
|
|
536
536
|
return b(Object.values(t).filter((i) => s.has(i.uuid)));
|
|
537
537
|
}
|
|
538
538
|
)
|
|
539
|
-
),
|
|
539
|
+
), Hc = y(
|
|
540
540
|
m(
|
|
541
|
-
[
|
|
541
|
+
[Lc, (t, e) => e],
|
|
542
542
|
(t, e) => b(t.filter((s) => s.field_values === e))
|
|
543
543
|
)
|
|
544
|
-
),
|
|
544
|
+
), Wc = Ua.reducer, H = O((t) => t.uuid), rs = H.getInitialState({}), xa = P({
|
|
545
545
|
name: "assetProcedureFieldValues",
|
|
546
|
-
initialState:
|
|
546
|
+
initialState: rs,
|
|
547
547
|
extraReducers: (t) => t.addMatcher(
|
|
548
548
|
I(_, E, R),
|
|
549
|
-
(e) => Object.assign(e,
|
|
549
|
+
(e) => Object.assign(e, rs)
|
|
550
550
|
),
|
|
551
551
|
reducers: {
|
|
552
552
|
initializeAssetProcedureFieldValues: H.initialize,
|
|
@@ -560,23 +560,23 @@ const C = O(
|
|
|
560
560
|
deleteAssetProcedureFieldValuesMany: H.deleteMany
|
|
561
561
|
}
|
|
562
562
|
}), {
|
|
563
|
-
initializeAssetProcedureFieldValues:
|
|
564
|
-
addAssetProcedureFieldValues:
|
|
565
|
-
addAssetProcedureFieldValuesMany:
|
|
563
|
+
initializeAssetProcedureFieldValues: Kc,
|
|
564
|
+
addAssetProcedureFieldValues: cs,
|
|
565
|
+
addAssetProcedureFieldValuesMany: Yc,
|
|
566
566
|
setAssetProcedureFieldValues: Pf,
|
|
567
567
|
setAssetProcedureFieldValuesMany: Tf,
|
|
568
568
|
updateAssetProcedureFieldValues: Ze,
|
|
569
|
-
updateAssetProcedureFieldValuesMany:
|
|
569
|
+
updateAssetProcedureFieldValuesMany: Jc,
|
|
570
570
|
deleteAssetProcedureFieldValues: os,
|
|
571
|
-
deleteAssetProcedureFieldValuesMany:
|
|
572
|
-
} = xa.actions,
|
|
573
|
-
[
|
|
571
|
+
deleteAssetProcedureFieldValuesMany: Zc
|
|
572
|
+
} = xa.actions, Qc = (t) => t.assetProcedureFieldValuesReducer.instances, Va = m(
|
|
573
|
+
[Qc],
|
|
574
574
|
(t) => Object.values(t)
|
|
575
575
|
), Ff = y(
|
|
576
576
|
m([Va, (t, e) => e], (t, e) => b(t.filter((s) => s.asset === e)))
|
|
577
577
|
), Of = y(
|
|
578
578
|
m([Va, (t, e) => e], (t, e) => b(t.filter((s) => s.asset_procedure_instance === e)))
|
|
579
|
-
), ds = (t) => (e) => e.assetProcedureFieldValuesReducer.instances[t],
|
|
579
|
+
), ds = (t) => (e) => e.assetProcedureFieldValuesReducer.instances[t], Xc = xa.reducer, W = O((t) => t.uuid), us = W.getInitialState({}), Ca = P({
|
|
580
580
|
name: "assetProcedureInstances",
|
|
581
581
|
initialState: us,
|
|
582
582
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -667,7 +667,7 @@ const C = O(
|
|
|
667
667
|
deleteAssetProcedures: qf,
|
|
668
668
|
setAssetProcedure: jf,
|
|
669
669
|
setAssetProcedures: zf
|
|
670
|
-
} = Ba.actions, La = (t) => t.assetProcedureReducer.instances,
|
|
670
|
+
} = Ba.actions, La = (t) => t.assetProcedureReducer.instances, ro = m([La], (t) => Object.values(t)), ys = (t) => (e) => e.assetProcedureReducer.instances[t], Uf = y(
|
|
671
671
|
m(
|
|
672
672
|
[La, (t, e) => e],
|
|
673
673
|
(t, e) => {
|
|
@@ -680,8 +680,8 @@ const C = O(
|
|
|
680
680
|
}
|
|
681
681
|
)
|
|
682
682
|
), Df = y(
|
|
683
|
-
m([
|
|
684
|
-
),
|
|
683
|
+
m([ro, (t, e) => e], (t, e) => b(t.filter((s) => s.organization === e)))
|
|
684
|
+
), co = Ba.reducer, Y = O((t) => t.uuid), bs = Y.getInitialState(
|
|
685
685
|
{}
|
|
686
686
|
), Na = P({
|
|
687
687
|
name: "assetProcedureStepFieldsAttachments",
|
|
@@ -833,8 +833,8 @@ const C = O(
|
|
|
833
833
|
initializeAssetProcedureStepFieldValues: Fo,
|
|
834
834
|
addAssetProcedureStepFieldValues: Fs,
|
|
835
835
|
addAssetProcedureStepFieldValuesMany: Oo,
|
|
836
|
-
setAssetProcedureStepFieldValues:
|
|
837
|
-
setAssetProcedureStepFieldValuesMany:
|
|
836
|
+
setAssetProcedureStepFieldValues: rA,
|
|
837
|
+
setAssetProcedureStepFieldValuesMany: cA,
|
|
838
838
|
updateAssetProcedureStepFieldValues: tt,
|
|
839
839
|
updateAssetProcedureStepFieldValuesMany: Io,
|
|
840
840
|
deleteAssetProcedureStepFieldValues: Os,
|
|
@@ -986,7 +986,7 @@ const C = O(
|
|
|
986
986
|
);
|
|
987
987
|
}
|
|
988
988
|
)
|
|
989
|
-
), se = O((t) => t.uuid), Cs = se.getInitialState({}),
|
|
989
|
+
), se = O((t) => t.uuid), Cs = se.getInitialState({}), rn = P({
|
|
990
990
|
name: "assetStages",
|
|
991
991
|
initialState: Cs,
|
|
992
992
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1014,7 +1014,7 @@ const C = O(
|
|
|
1014
1014
|
updateAssetStages: RA,
|
|
1015
1015
|
deleteAssetStage: Gs,
|
|
1016
1016
|
deleteAssetStages: vA
|
|
1017
|
-
} =
|
|
1017
|
+
} = rn.actions, Ho = rn.reducer, Ct = (t) => t.assetStageReducer.instances, Bs = (t) => (e) => e.assetStageReducer.instances[t], Wo = m([Ct], (t) => Object.values(t)), wA = y(
|
|
1018
1018
|
m([Ct, (t, e) => e], (t, e) => {
|
|
1019
1019
|
const s = {};
|
|
1020
1020
|
for (const [i, a] of Object.entries(t))
|
|
@@ -1034,7 +1034,7 @@ const C = O(
|
|
|
1034
1034
|
})
|
|
1035
1035
|
), ie = O(
|
|
1036
1036
|
(t) => t.uuid
|
|
1037
|
-
), Ls = ie.getInitialState({}),
|
|
1037
|
+
), Ls = ie.getInitialState({}), cn = P({
|
|
1038
1038
|
name: "assetTypeAttachments",
|
|
1039
1039
|
initialState: Ls,
|
|
1040
1040
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1062,7 +1062,7 @@ const C = O(
|
|
|
1062
1062
|
updateAssetTypeAttachments: Jo,
|
|
1063
1063
|
deleteAssetTypeAttachment: Zo,
|
|
1064
1064
|
deleteAssetTypeAttachments: dn
|
|
1065
|
-
} =
|
|
1065
|
+
} = cn.actions, Qo = (t) => t.assetTypeAttachmentReducer.instances, Xo = m(
|
|
1066
1066
|
[Qo],
|
|
1067
1067
|
(t) => Object.values(t)
|
|
1068
1068
|
), ed = (t) => (e) => e.assetTypeAttachmentReducer.instances[t], td = y(
|
|
@@ -1070,7 +1070,7 @@ const C = O(
|
|
|
1070
1070
|
[Xo, (t, e) => e],
|
|
1071
1071
|
(t, e) => b(t.filter(({ asset_type: s }) => e === s))
|
|
1072
1072
|
)
|
|
1073
|
-
), sd =
|
|
1073
|
+
), sd = cn.reducer, ae = O((t) => t.uuid), Ns = ae.getInitialState({}), un = P({
|
|
1074
1074
|
name: "assetTypeFieldsAttachments",
|
|
1075
1075
|
initialState: Ns,
|
|
1076
1076
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1097,9 +1097,9 @@ const C = O(
|
|
|
1097
1097
|
updateAssetTypeFieldsAttachment: xA,
|
|
1098
1098
|
updateAssetTypeFieldsAttachments: nd,
|
|
1099
1099
|
deleteAssetTypeFieldsAttachment: VA,
|
|
1100
|
-
deleteAssetTypeFieldsAttachments:
|
|
1101
|
-
} = un.actions,
|
|
1102
|
-
[
|
|
1100
|
+
deleteAssetTypeFieldsAttachments: rd
|
|
1101
|
+
} = un.actions, cd = (t) => t.assetTypeFieldsAttachmentReducer.instances, od = m(
|
|
1102
|
+
[cd],
|
|
1103
1103
|
(t) => Object.values(t)
|
|
1104
1104
|
), CA = y(
|
|
1105
1105
|
m([od, (t, e) => e], (t, e) => b(t.filter((s) => s.fields_revision === e)))
|
|
@@ -1137,7 +1137,7 @@ const C = O(
|
|
|
1137
1137
|
m([$t, (t, e) => e], (t, e) => b(t.filter((s) => s.asset_type === e)))
|
|
1138
1138
|
), KA = y(
|
|
1139
1139
|
m([$t, (t, e) => e], (t, e) => t.filter((s) => s.asset_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
1140
|
-
), YA = (t) => (e) => e.assetTypeFieldsReducer.instances[t], fd = ln.reducer,
|
|
1140
|
+
), YA = (t) => (e) => e.assetTypeFieldsReducer.instances[t], fd = ln.reducer, re = O((t) => t.uuid), Ws = re.getInitialState({}), hn = P({
|
|
1141
1141
|
name: "assetTypeFieldValuesAttachments",
|
|
1142
1142
|
initialState: Ws,
|
|
1143
1143
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1145,15 +1145,15 @@ const C = O(
|
|
|
1145
1145
|
(e) => Object.assign(e, Ws)
|
|
1146
1146
|
),
|
|
1147
1147
|
reducers: {
|
|
1148
|
-
initializeAssetTypeFieldValuesAttachments:
|
|
1149
|
-
addAssetTypeFieldValuesAttachment:
|
|
1150
|
-
addAssetTypeFieldValuesAttachments:
|
|
1151
|
-
setAssetTypeFieldValuesAttachment:
|
|
1152
|
-
setAssetTypeFieldValuesAttachments:
|
|
1153
|
-
updateAssetTypeFieldValuesAttachment:
|
|
1154
|
-
updateAssetTypeFieldValuesAttachments:
|
|
1155
|
-
deleteAssetTypeFieldValuesAttachment:
|
|
1156
|
-
deleteAssetTypeFieldValuesAttachments:
|
|
1148
|
+
initializeAssetTypeFieldValuesAttachments: re.initialize,
|
|
1149
|
+
addAssetTypeFieldValuesAttachment: re.addOne,
|
|
1150
|
+
addAssetTypeFieldValuesAttachments: re.addMany,
|
|
1151
|
+
setAssetTypeFieldValuesAttachment: re.setOne,
|
|
1152
|
+
setAssetTypeFieldValuesAttachments: re.setMany,
|
|
1153
|
+
updateAssetTypeFieldValuesAttachment: re.updateOne,
|
|
1154
|
+
updateAssetTypeFieldValuesAttachments: re.updateMany,
|
|
1155
|
+
deleteAssetTypeFieldValuesAttachment: re.deleteOne,
|
|
1156
|
+
deleteAssetTypeFieldValuesAttachments: re.deleteMany
|
|
1157
1157
|
}
|
|
1158
1158
|
}), {
|
|
1159
1159
|
initializeAssetTypeFieldValuesAttachments: Ad,
|
|
@@ -1183,9 +1183,9 @@ const C = O(
|
|
|
1183
1183
|
)
|
|
1184
1184
|
), Sd = y(
|
|
1185
1185
|
m([bd, (t, e) => e], (t, e) => b(t.filter((s) => s.field_values === e)))
|
|
1186
|
-
), _d = hn.reducer,
|
|
1186
|
+
), _d = hn.reducer, ce = O(
|
|
1187
1187
|
(t) => t.uuid
|
|
1188
|
-
), Ks =
|
|
1188
|
+
), Ks = ce.getInitialState({}), mn = P({
|
|
1189
1189
|
name: "assetTypeFieldValues",
|
|
1190
1190
|
initialState: Ks,
|
|
1191
1191
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1193,15 +1193,15 @@ const C = O(
|
|
|
1193
1193
|
(e) => Object.assign(e, Ks)
|
|
1194
1194
|
),
|
|
1195
1195
|
reducers: {
|
|
1196
|
-
initializeAssetTypeFieldValues:
|
|
1197
|
-
addAssetTypeFieldValues:
|
|
1198
|
-
addAssetTypeFieldValuesMany:
|
|
1199
|
-
setAssetTypeFieldValues:
|
|
1200
|
-
setAssetTypeFieldValuesMany:
|
|
1201
|
-
updateAssetTypeFieldValues:
|
|
1202
|
-
updateAssetTypeFieldValuesMany:
|
|
1203
|
-
deleteAssetTypeFieldValues:
|
|
1204
|
-
deleteAssetTypeFieldValuesMany:
|
|
1196
|
+
initializeAssetTypeFieldValues: ce.initialize,
|
|
1197
|
+
addAssetTypeFieldValues: ce.addOne,
|
|
1198
|
+
addAssetTypeFieldValuesMany: ce.addMany,
|
|
1199
|
+
setAssetTypeFieldValues: ce.setOne,
|
|
1200
|
+
setAssetTypeFieldValuesMany: ce.setMany,
|
|
1201
|
+
updateAssetTypeFieldValues: ce.updateOne,
|
|
1202
|
+
updateAssetTypeFieldValuesMany: ce.updateMany,
|
|
1203
|
+
deleteAssetTypeFieldValues: ce.deleteOne,
|
|
1204
|
+
deleteAssetTypeFieldValuesMany: ce.deleteMany
|
|
1205
1205
|
}
|
|
1206
1206
|
}), {
|
|
1207
1207
|
initializeAssetTypeFieldValues: Pd,
|
|
@@ -1245,8 +1245,8 @@ const C = O(
|
|
|
1245
1245
|
}
|
|
1246
1246
|
}), {
|
|
1247
1247
|
initializeAssetTypes: vd,
|
|
1248
|
-
setAssetType:
|
|
1249
|
-
setAssetTypes:
|
|
1248
|
+
setAssetType: ry,
|
|
1249
|
+
setAssetTypes: cy,
|
|
1250
1250
|
addAssetType: Xs,
|
|
1251
1251
|
addAssetTypes: oy,
|
|
1252
1252
|
updateAssetType: at,
|
|
@@ -1333,10 +1333,10 @@ const C = O(
|
|
|
1333
1333
|
m([Ud, (t, e) => e], (t, e) => b(t.filter((s) => s.project === e)))
|
|
1334
1334
|
), Dd = bn.reducer, ue = O(
|
|
1335
1335
|
(t) => t.uuid
|
|
1336
|
-
),
|
|
1336
|
+
), ri = ue.getInitialState({}), Sn = P({
|
|
1337
1337
|
name: "documentAttachments",
|
|
1338
|
-
initialState:
|
|
1339
|
-
extraReducers: (t) => t.addCase(_, (e) => Object.assign(e,
|
|
1338
|
+
initialState: ri,
|
|
1339
|
+
extraReducers: (t) => t.addCase(_, (e) => Object.assign(e, ri)),
|
|
1340
1340
|
reducers: {
|
|
1341
1341
|
initializeDocumentAttachments: ue.initialize,
|
|
1342
1342
|
addDocumentAttachment: ue.addOne,
|
|
@@ -1366,19 +1366,19 @@ const C = O(
|
|
|
1366
1366
|
[Nd, (t, e) => e],
|
|
1367
1367
|
(t, e) => b(t.filter(({ document: s }) => e === s))
|
|
1368
1368
|
)
|
|
1369
|
-
), Wd = Sn.reducer,
|
|
1369
|
+
), Wd = Sn.reducer, ci = {
|
|
1370
1370
|
documents: {}
|
|
1371
1371
|
}, _n = P({
|
|
1372
1372
|
name: "documents",
|
|
1373
|
-
initialState:
|
|
1373
|
+
initialState: ci,
|
|
1374
1374
|
extraReducers: (t) => t.addCase(_, (e) => {
|
|
1375
|
-
Object.assign(e,
|
|
1375
|
+
Object.assign(e, ci);
|
|
1376
1376
|
}),
|
|
1377
1377
|
reducers: {
|
|
1378
1378
|
setDocuments: (t, e) => {
|
|
1379
|
-
if (e.payload.filter(
|
|
1379
|
+
if (e.payload.filter(nc).length !== e.payload.length)
|
|
1380
1380
|
throw new Error("Tried to use setIssues reducer with duplicate ID's");
|
|
1381
|
-
t.documents =
|
|
1381
|
+
t.documents = ac(e.payload);
|
|
1382
1382
|
},
|
|
1383
1383
|
addDocuments: (t, e) => {
|
|
1384
1384
|
for (const s of e.payload)
|
|
@@ -1500,22 +1500,22 @@ const C = O(
|
|
|
1500
1500
|
extraReducers: (t) => t.addCase(_, (e) => Object.assign(e, ui)),
|
|
1501
1501
|
reducers: {
|
|
1502
1502
|
setUploadUrl: (t, e) => {
|
|
1503
|
-
const { url: s, fields: i, sha1: a } = e.payload, n = /* @__PURE__ */ new Date(),
|
|
1503
|
+
const { url: s, fields: i, sha1: a } = e.payload, n = /* @__PURE__ */ new Date(), r = new Date(n.getTime() + au);
|
|
1504
1504
|
t.s3Urls[a] = {
|
|
1505
1505
|
url: s,
|
|
1506
1506
|
fields: i,
|
|
1507
|
-
exp:
|
|
1507
|
+
exp: r.getTime()
|
|
1508
1508
|
};
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
}), { setUploadUrl: nu } = On.actions,
|
|
1511
|
+
}), { setUploadUrl: nu } = On.actions, ru = (t) => (e) => {
|
|
1512
1512
|
const s = e.fileReducer.s3Urls[t];
|
|
1513
1513
|
if (!s)
|
|
1514
1514
|
return;
|
|
1515
1515
|
const i = (/* @__PURE__ */ new Date()).getTime();
|
|
1516
1516
|
if (!((s.exp ?? i) - i < Fn))
|
|
1517
1517
|
return s;
|
|
1518
|
-
},
|
|
1518
|
+
}, cu = On.reducer, he = O((t) => t.uuid), li = he.getInitialState({}), In = P({
|
|
1519
1519
|
name: "formRevisionAttachments",
|
|
1520
1520
|
initialState: li,
|
|
1521
1521
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -1655,7 +1655,7 @@ const C = O(
|
|
|
1655
1655
|
setFormSubmissionAttachments: ab,
|
|
1656
1656
|
updateFormSubmissionAttachment: nb,
|
|
1657
1657
|
updateFormSubmissionAttachments: vu,
|
|
1658
|
-
deleteFormSubmissionAttachment:
|
|
1658
|
+
deleteFormSubmissionAttachment: rb,
|
|
1659
1659
|
deleteFormSubmissionAttachments: Mt
|
|
1660
1660
|
} = En.actions, Mn = (t) => t.formSubmissionAttachmentReducer.instances, wu = y(
|
|
1661
1661
|
m(
|
|
@@ -1700,7 +1700,7 @@ const C = O(
|
|
|
1700
1700
|
}), {
|
|
1701
1701
|
initializeFormSubmissions: Mu,
|
|
1702
1702
|
setFormSubmission: At,
|
|
1703
|
-
setFormSubmissions:
|
|
1703
|
+
setFormSubmissions: cb,
|
|
1704
1704
|
addFormSubmission: bi,
|
|
1705
1705
|
addFormSubmissions: Nt,
|
|
1706
1706
|
updateFormSubmission: qu,
|
|
@@ -1851,7 +1851,7 @@ const C = O(
|
|
|
1851
1851
|
[al, (t, e) => e],
|
|
1852
1852
|
(t, e) => b(t.filter(({ issue: s }) => e === s))
|
|
1853
1853
|
)
|
|
1854
|
-
),
|
|
1854
|
+
), rl = (t) => (e) => e.issueAttachmentReducer.instances[t], cl = Cn.reducer, Se = O((t) => t.uuid), wi = Se.getInitialState({}), Bn = P({
|
|
1855
1855
|
name: "issueCommentAttachments",
|
|
1856
1856
|
initialState: wi,
|
|
1857
1857
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2062,7 +2062,7 @@ const C = O(
|
|
|
2062
2062
|
addIssueTypeFieldValuesMany: Lb,
|
|
2063
2063
|
setIssueTypeFieldValues: Nb,
|
|
2064
2064
|
setIssueTypeFieldValuesMany: Hb,
|
|
2065
|
-
updateIssueTypeFieldValues:
|
|
2065
|
+
updateIssueTypeFieldValues: rt,
|
|
2066
2066
|
updateIssueTypeFieldValuesMany: Wb,
|
|
2067
2067
|
deleteIssueTypeFieldValues: Ni,
|
|
2068
2068
|
deleteIssueTypeFieldValuesMany: Kb
|
|
@@ -2134,8 +2134,8 @@ const C = O(
|
|
|
2134
2134
|
initializeIssueTypeFieldValuesAttachments: Yl,
|
|
2135
2135
|
addIssueTypeFieldValuesAttachment: ng,
|
|
2136
2136
|
addIssueTypeFieldValuesAttachments: qt,
|
|
2137
|
-
setIssueTypeFieldValuesAttachment:
|
|
2138
|
-
setIssueTypeFieldValuesAttachments:
|
|
2137
|
+
setIssueTypeFieldValuesAttachment: rg,
|
|
2138
|
+
setIssueTypeFieldValuesAttachments: cg,
|
|
2139
2139
|
updateIssueTypeFieldValuesAttachment: og,
|
|
2140
2140
|
updateIssueTypeFieldValuesAttachments: Jl,
|
|
2141
2141
|
deleteIssueTypeFieldValuesAttachment: dg,
|
|
@@ -2161,7 +2161,7 @@ const C = O(
|
|
|
2161
2161
|
[Zl, (t, e) => e],
|
|
2162
2162
|
(t, e) => b(t.filter((s) => s.field_values === e))
|
|
2163
2163
|
)
|
|
2164
|
-
), eh = Qn.reducer, D = O((t) => t.uuid), Yi = D.getInitialState({}),
|
|
2164
|
+
), eh = Qn.reducer, D = O((t) => t.uuid), Yi = D.getInitialState({}), er = P({
|
|
2165
2165
|
name: "issueTypes",
|
|
2166
2166
|
initialState: Yi,
|
|
2167
2167
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2184,14 +2184,14 @@ const C = O(
|
|
|
2184
2184
|
initializeIssueTypes: th,
|
|
2185
2185
|
addIssueType: sh,
|
|
2186
2186
|
addIssueTypes: lg,
|
|
2187
|
-
setIssueType:
|
|
2187
|
+
setIssueType: ct,
|
|
2188
2188
|
setIssueTypes: hg,
|
|
2189
2189
|
updateIssueType: ih,
|
|
2190
2190
|
updateIssueTypes: pg,
|
|
2191
2191
|
deleteIssueType: mg,
|
|
2192
2192
|
deleteIssueTypes: fg,
|
|
2193
2193
|
removeIssueType: Ji
|
|
2194
|
-
} =
|
|
2194
|
+
} = er.actions, ah = (t) => t.issueTypeReducer.instances, nh = m(
|
|
2195
2195
|
ah,
|
|
2196
2196
|
(t) => Object.values(t)
|
|
2197
2197
|
), Zi = (t) => (e) => e.issueTypeReducer.instances[t], Ag = (t) => (e) => {
|
|
@@ -2203,16 +2203,16 @@ const C = O(
|
|
|
2203
2203
|
return s;
|
|
2204
2204
|
}, yg = y(
|
|
2205
2205
|
m([nh, (t, e) => e], (t, e) => b(t.filter((s) => s.organization === e)))
|
|
2206
|
-
),
|
|
2206
|
+
), tr = y(
|
|
2207
2207
|
m(
|
|
2208
2208
|
[(t) => t.issueReducer.instances, (t, e) => e],
|
|
2209
2209
|
(t, e) => b(
|
|
2210
2210
|
Object.values(t).filter((s) => s.issue_type === e)
|
|
2211
2211
|
)
|
|
2212
2212
|
)
|
|
2213
|
-
), bg = (t) => (e) =>
|
|
2213
|
+
), bg = (t) => (e) => tr(t)(e).length, rh = er.reducer, ve = O(
|
|
2214
2214
|
(t) => t.uuid
|
|
2215
|
-
), Qi = ve.getInitialState({}),
|
|
2215
|
+
), Qi = ve.getInitialState({}), sr = P({
|
|
2216
2216
|
name: "issueUpdates",
|
|
2217
2217
|
initialState: Qi,
|
|
2218
2218
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2231,7 +2231,7 @@ const C = O(
|
|
|
2231
2231
|
deleteIssueUpdates: ve.deleteMany
|
|
2232
2232
|
}
|
|
2233
2233
|
}), {
|
|
2234
|
-
initializeIssueUpdates:
|
|
2234
|
+
initializeIssueUpdates: ch,
|
|
2235
2235
|
addIssueUpdate: oh,
|
|
2236
2236
|
addIssueUpdates: dh,
|
|
2237
2237
|
setIssueUpdate: gg,
|
|
@@ -2240,14 +2240,14 @@ const C = O(
|
|
|
2240
2240
|
updateIssueUpdates: Pg,
|
|
2241
2241
|
deleteIssueUpdate: uh,
|
|
2242
2242
|
deleteIssueUpdates: lh
|
|
2243
|
-
} =
|
|
2243
|
+
} = sr.actions, hh = (t) => t.issueUpdateReducer.instances, ph = y(
|
|
2244
2244
|
m(
|
|
2245
2245
|
[hh, (t, e) => e],
|
|
2246
2246
|
(t, e) => b(Object.values(t).filter((s) => s.issue === e))
|
|
2247
2247
|
)
|
|
2248
|
-
), mh =
|
|
2248
|
+
), mh = sr.reducer, we = O((t) => t.id), Xi = we.getInitialState({
|
|
2249
2249
|
currentUser: null
|
|
2250
|
-
}),
|
|
2250
|
+
}), ir = P({
|
|
2251
2251
|
name: "users",
|
|
2252
2252
|
initialState: Xi,
|
|
2253
2253
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2288,7 +2288,7 @@ const C = O(
|
|
|
2288
2288
|
deleteUsers: vg,
|
|
2289
2289
|
setCurrentUser: wg,
|
|
2290
2290
|
setProfilePicture: kg
|
|
2291
|
-
} =
|
|
2291
|
+
} = ir.actions, bh = ir.reducer, gh = (t) => t.userReducer.currentUser, Kt = (t) => t.userReducer.instances, ar = m([Kt], (t) => Object.values(t)), Sh = (t) => (e) => e.userReducer.instances[t], Eg = y(
|
|
2292
2292
|
m([Kt, (t, e) => e], (t, e) => {
|
|
2293
2293
|
const s = [];
|
|
2294
2294
|
for (const i of e) {
|
|
@@ -2299,7 +2299,7 @@ const C = O(
|
|
|
2299
2299
|
})
|
|
2300
2300
|
), ke = O(
|
|
2301
2301
|
(t) => t.uuid
|
|
2302
|
-
), ea = ke.getInitialState({}),
|
|
2302
|
+
), ea = ke.getInitialState({}), nr = P({
|
|
2303
2303
|
name: "organizationAccess",
|
|
2304
2304
|
initialState: ea,
|
|
2305
2305
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2327,12 +2327,12 @@ const C = O(
|
|
|
2327
2327
|
updateOrganizationAccesses: zg,
|
|
2328
2328
|
deleteOrganizationAccess: Th,
|
|
2329
2329
|
deleteOrganizationAccesses: Ug
|
|
2330
|
-
} =
|
|
2331
|
-
[gh,
|
|
2330
|
+
} = nr.actions, Fh = nr.reducer, rr = (t) => t.organizationAccessReducer.instances, ta = (t) => (e) => e.organizationAccessReducer.instances[t], Dg = m(
|
|
2331
|
+
[gh, rr],
|
|
2332
2332
|
(t, e) => Object.values(e).find(
|
|
2333
2333
|
(i) => i.user === (t == null ? void 0 : t.id)
|
|
2334
2334
|
) ?? null
|
|
2335
|
-
), Oh = m([
|
|
2335
|
+
), Oh = m([rr], (t) => {
|
|
2336
2336
|
const e = {};
|
|
2337
2337
|
for (const s of Object.values(t))
|
|
2338
2338
|
e[s.user] = s;
|
|
@@ -2347,7 +2347,7 @@ const C = O(
|
|
|
2347
2347
|
})
|
|
2348
2348
|
)
|
|
2349
2349
|
)
|
|
2350
|
-
), Ee = O((t) => t.uuid), sa = Ee.getInitialState({}),
|
|
2350
|
+
), Ee = O((t) => t.uuid), sa = Ee.getInitialState({}), cr = P({
|
|
2351
2351
|
name: "organizations",
|
|
2352
2352
|
initialState: sa,
|
|
2353
2353
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2375,7 +2375,7 @@ const C = O(
|
|
|
2375
2375
|
updateOrganization: vh,
|
|
2376
2376
|
deleteOrganization: Bg,
|
|
2377
2377
|
deleteOrganizations: Lg
|
|
2378
|
-
} =
|
|
2378
|
+
} = cr.actions, wh = (t) => t.organizationReducer.instances, Ng = m([wh], (t) => Object.values(t)), Hg = (t) => (e) => e.organizationReducer.instances[t], kh = cr.reducer, Eh = (t, e, s) => {
|
|
2379
2379
|
const i = t.uuid ? t : { ...t, uuid: Le() };
|
|
2380
2380
|
return {
|
|
2381
2381
|
payload: i,
|
|
@@ -2394,7 +2394,7 @@ const C = O(
|
|
|
2394
2394
|
}, ia = {
|
|
2395
2395
|
deletedRequests: [],
|
|
2396
2396
|
latestRetryTime: 0
|
|
2397
|
-
},
|
|
2397
|
+
}, or = P({
|
|
2398
2398
|
name: "outbox",
|
|
2399
2399
|
initialState: ia,
|
|
2400
2400
|
extraReducers: (t) => t.addCase(_, (e) => Object.assign(e, ia)),
|
|
@@ -2421,9 +2421,9 @@ const C = O(
|
|
|
2421
2421
|
t.latestRetryTime = e.payload;
|
|
2422
2422
|
}
|
|
2423
2423
|
}
|
|
2424
|
-
}), Wg = (t) => t.outboxReducer.deletedRequests, Kg = (t) => t.outboxReducer.latestRetryTime, { enqueueRequest: Mh, markForDeletion: Yg, markAsDeleted: qh, _setLatestRetryTime: jh } =
|
|
2424
|
+
}), Wg = (t) => t.outboxReducer.deletedRequests, Kg = (t) => t.outboxReducer.latestRetryTime, { enqueueRequest: Mh, markForDeletion: Yg, markAsDeleted: qh, _setLatestRetryTime: jh } = or.actions, zh = or.reducer, Me = O(
|
|
2425
2425
|
(t) => t.uuid
|
|
2426
|
-
), aa = Me.getInitialState({}),
|
|
2426
|
+
), aa = Me.getInitialState({}), dr = P({
|
|
2427
2427
|
name: "projectAccess",
|
|
2428
2428
|
initialState: aa,
|
|
2429
2429
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2449,14 +2449,14 @@ const C = O(
|
|
|
2449
2449
|
setProjectAccesses: Zg,
|
|
2450
2450
|
updateProjectAccess: ot,
|
|
2451
2451
|
updateProjectAccesses: Qg,
|
|
2452
|
-
deleteProjectAccess:
|
|
2452
|
+
deleteProjectAccess: ra,
|
|
2453
2453
|
deleteProjectAccesses: xh
|
|
2454
|
-
} =
|
|
2455
|
-
|
|
2454
|
+
} = dr.actions, Vh = dr.reducer, ur = (t) => t.projectAccessReducer.instances, Yt = m(
|
|
2455
|
+
ur,
|
|
2456
2456
|
(t) => Object.values(t)
|
|
2457
|
-
),
|
|
2457
|
+
), ca = (t) => (e) => e.projectAccessReducer.instances[t], Ch = y(
|
|
2458
2458
|
m(
|
|
2459
|
-
[
|
|
2459
|
+
[ur, (t, e) => e],
|
|
2460
2460
|
(t, e) => b(
|
|
2461
2461
|
Object.values(t).filter((s) => s.project === e)
|
|
2462
2462
|
)
|
|
@@ -2470,7 +2470,7 @@ const C = O(
|
|
|
2470
2470
|
})
|
|
2471
2471
|
), eS = y(
|
|
2472
2472
|
m(
|
|
2473
|
-
[
|
|
2473
|
+
[ar, Yt, (t, e) => e],
|
|
2474
2474
|
(t, e, s) => {
|
|
2475
2475
|
const i = new Set(e.filter((a) => a.project === s).map((a) => a.user));
|
|
2476
2476
|
return b(t.filter((a) => i.has(a.id)));
|
|
@@ -2478,7 +2478,7 @@ const C = O(
|
|
|
2478
2478
|
)
|
|
2479
2479
|
), qe = O(
|
|
2480
2480
|
(t) => t.uuid
|
|
2481
|
-
), oa = qe.getInitialState({}),
|
|
2481
|
+
), oa = qe.getInitialState({}), lr = P({
|
|
2482
2482
|
name: "projectAttachments",
|
|
2483
2483
|
initialState: oa,
|
|
2484
2484
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2505,8 +2505,8 @@ const C = O(
|
|
|
2505
2505
|
updateProjectAttachment: sS,
|
|
2506
2506
|
updateProjectAttachments: Nh,
|
|
2507
2507
|
deleteProjectAttachment: Hh,
|
|
2508
|
-
deleteProjectAttachments:
|
|
2509
|
-
} =
|
|
2508
|
+
deleteProjectAttachments: hr
|
|
2509
|
+
} = lr.actions, Wh = (t) => t.projectAttachmentReducer.instances, Kh = m(
|
|
2510
2510
|
[Wh],
|
|
2511
2511
|
(t) => Object.values(t)
|
|
2512
2512
|
), Yh = (t) => (e) => e.projectAttachmentReducer.instances[t], Jh = y(
|
|
@@ -2514,12 +2514,12 @@ const C = O(
|
|
|
2514
2514
|
[Kh, (t, e) => e],
|
|
2515
2515
|
(t, e) => b(t.filter(({ project: s }) => e === s))
|
|
2516
2516
|
)
|
|
2517
|
-
), Zh =
|
|
2517
|
+
), Zh = lr.reducer, je = O(
|
|
2518
2518
|
(t) => t.uuid
|
|
2519
2519
|
), da = je.getInitialState({
|
|
2520
2520
|
activeProjectFileId: null,
|
|
2521
2521
|
isImportingProjectFile: !1
|
|
2522
|
-
}),
|
|
2522
|
+
}), pr = P({
|
|
2523
2523
|
name: "projectFiles",
|
|
2524
2524
|
initialState: da,
|
|
2525
2525
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2566,15 +2566,15 @@ const C = O(
|
|
|
2566
2566
|
addProjectFile: nS,
|
|
2567
2567
|
addProjectFiles: Xh,
|
|
2568
2568
|
updateProjectFile: ua,
|
|
2569
|
-
updateProjectFiles:
|
|
2569
|
+
updateProjectFiles: rS,
|
|
2570
2570
|
deleteProjectFile: ep,
|
|
2571
2571
|
deleteProjectFiles: tp,
|
|
2572
2572
|
// TODO: move following to /web
|
|
2573
2573
|
setIsImportingProjectFile: sp,
|
|
2574
2574
|
setActiveProjectFileId: ip,
|
|
2575
2575
|
saveActiveProjectFileBounds: ap,
|
|
2576
|
-
resetProjectFileObjectUrls:
|
|
2577
|
-
} =
|
|
2576
|
+
resetProjectFileObjectUrls: cS
|
|
2577
|
+
} = pr.actions, np = (t) => t.projectFileReducer.instances, rp = m([np], (t) => b(Object.values(t).sort((e, s) => e.z_index - s.z_index))), oS = (t) => (e) => e.projectFileReducer.instances[t], dS = (t) => t.projectFileReducer.activeProjectFileId, uS = (t) => t.projectFileReducer.isImportingProjectFile, cp = pr.reducer, ze = O((t) => t.uuid), la = ze.getInitialState({}), mr = P({
|
|
2578
2578
|
name: "projects",
|
|
2579
2579
|
initialState: la,
|
|
2580
2580
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2602,16 +2602,16 @@ const C = O(
|
|
|
2602
2602
|
updateProject: dp,
|
|
2603
2603
|
deleteProject: pa,
|
|
2604
2604
|
deleteProjects: fS
|
|
2605
|
-
} =
|
|
2606
|
-
m([
|
|
2605
|
+
} = mr.actions, up = mr.reducer, lp = (t) => t.projectReducer.instances, fr = m([lp], (t) => b(Object.values(t))), hp = (t) => (e) => e.projectReducer.instances[t], AS = y(
|
|
2606
|
+
m([fr, Yt, (t, e) => e], (t, e, s) => {
|
|
2607
2607
|
const i = new Set(e.filter((a) => a.user === s).map((a) => a.project));
|
|
2608
2608
|
return b(t.filter((a) => i.has(a.uuid)));
|
|
2609
2609
|
})
|
|
2610
2610
|
), yS = y(
|
|
2611
|
-
m([
|
|
2611
|
+
m([fr, (t, e) => e], (t, e) => b(t.filter((s) => s.organization_owner === e)))
|
|
2612
2612
|
), pp = {
|
|
2613
2613
|
isRehydrated: !1
|
|
2614
|
-
},
|
|
2614
|
+
}, Ar = P({
|
|
2615
2615
|
name: "rehydrated",
|
|
2616
2616
|
initialState: pp,
|
|
2617
2617
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
@@ -2620,9 +2620,9 @@ const C = O(
|
|
|
2620
2620
|
t.isRehydrated = e.payload;
|
|
2621
2621
|
}
|
|
2622
2622
|
}
|
|
2623
|
-
}), { setRehydrated: bS } =
|
|
2623
|
+
}), { setRehydrated: bS } = Ar.actions, gS = (t) => t.rehydratedReducer.isRehydrated, mp = Ar.reducer, Ue = O(
|
|
2624
2624
|
(t) => t.uuid
|
|
2625
|
-
), ma = Ue.getInitialState({}),
|
|
2625
|
+
), ma = Ue.getInitialState({}), yr = P({
|
|
2626
2626
|
name: "teamMemberships",
|
|
2627
2627
|
initialState: ma,
|
|
2628
2628
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2650,11 +2650,11 @@ const C = O(
|
|
|
2650
2650
|
updateTeamMemberships: TS,
|
|
2651
2651
|
deleteTeamMembership: Aa,
|
|
2652
2652
|
deleteTeamMemberships: FS
|
|
2653
|
-
} =
|
|
2653
|
+
} = yr.actions, yp = yr.reducer, bp = (t) => t.teamMembershipReducer.instances, br = m(
|
|
2654
2654
|
[bp],
|
|
2655
2655
|
(t) => Object.values(t)
|
|
2656
2656
|
), gp = (t) => (e) => e.teamMembershipReducer.instances[t], OS = y(
|
|
2657
|
-
m([
|
|
2657
|
+
m([br, (t, e) => e], (t, e) => {
|
|
2658
2658
|
const s = {};
|
|
2659
2659
|
for (const i of t.filter((a) => a.team === e))
|
|
2660
2660
|
s[i.user] = i;
|
|
@@ -2662,13 +2662,13 @@ const C = O(
|
|
|
2662
2662
|
})
|
|
2663
2663
|
), IS = y(
|
|
2664
2664
|
m(
|
|
2665
|
-
[
|
|
2665
|
+
[ar, br, (t, e) => e],
|
|
2666
2666
|
(t, e, s) => {
|
|
2667
2667
|
const i = new Set(e.filter((a) => a.team === s).map((a) => a.user));
|
|
2668
2668
|
return b(t.filter((a) => i.has(a.id)));
|
|
2669
2669
|
}
|
|
2670
2670
|
)
|
|
2671
|
-
), De = O((t) => t.uuid), ya = De.getInitialState({}),
|
|
2671
|
+
), De = O((t) => t.uuid), ya = De.getInitialState({}), gr = P({
|
|
2672
2672
|
name: "teams",
|
|
2673
2673
|
initialState: ya,
|
|
2674
2674
|
extraReducers: (t) => t.addMatcher(
|
|
@@ -2696,9 +2696,9 @@ const C = O(
|
|
|
2696
2696
|
updateTeams: wS,
|
|
2697
2697
|
deleteTeam: ba,
|
|
2698
2698
|
deleteTeams: kS
|
|
2699
|
-
} =
|
|
2699
|
+
} = gr.actions, Sr = (t) => t.teamReducer.instances, Tp = m([Sr], (t) => Object.values(t)), ga = (t) => (e) => e.teamReducer.instances[t], ES = y(
|
|
2700
2700
|
m(
|
|
2701
|
-
[
|
|
2701
|
+
[Sr, (t, e) => e],
|
|
2702
2702
|
(t, e) => {
|
|
2703
2703
|
const s = [];
|
|
2704
2704
|
for (const i of e) {
|
|
@@ -2713,36 +2713,36 @@ const C = O(
|
|
|
2713
2713
|
[Tp, (t, e) => e],
|
|
2714
2714
|
(t, e) => b(t.filter((s) => s.organization === e))
|
|
2715
2715
|
)
|
|
2716
|
-
), Fp =
|
|
2716
|
+
), Fp = gr.reducer, Op = {
|
|
2717
2717
|
version: 0
|
|
2718
2718
|
}, Ip = P({
|
|
2719
2719
|
name: "versioning",
|
|
2720
2720
|
initialState: Op,
|
|
2721
2721
|
reducers: {}
|
|
2722
|
-
}), Rp = Ip.reducer,
|
|
2722
|
+
}), Rp = Ip.reducer, _r = {
|
|
2723
2723
|
outboxReducer: zh,
|
|
2724
|
-
fileReducer:
|
|
2724
|
+
fileReducer: cu,
|
|
2725
2725
|
authReducer: Md
|
|
2726
|
-
}, qS = Ta(
|
|
2727
|
-
...
|
|
2726
|
+
}, qS = Ta(_r), vp = {
|
|
2727
|
+
..._r,
|
|
2728
2728
|
[ht]: Rp,
|
|
2729
2729
|
categoryReducer: Dd,
|
|
2730
2730
|
assetReducer: Do,
|
|
2731
|
-
assetAttachmentReducer:
|
|
2731
|
+
assetAttachmentReducer: bc,
|
|
2732
2732
|
assetStageCompletionReducer: $o,
|
|
2733
2733
|
assetStageReducer: Ho,
|
|
2734
2734
|
assetTypeReducer: kd,
|
|
2735
2735
|
assetTypeAttachmentReducer: sd,
|
|
2736
2736
|
issueReducer: Tl,
|
|
2737
|
-
issueAttachmentReducer:
|
|
2738
|
-
issueTypeReducer:
|
|
2737
|
+
issueAttachmentReducer: cl,
|
|
2738
|
+
issueTypeReducer: rh,
|
|
2739
2739
|
issueTypeAttachmentReducer: Ml,
|
|
2740
2740
|
organizationReducer: kh,
|
|
2741
2741
|
projectReducer: up,
|
|
2742
2742
|
projectAttachmentReducer: Zh,
|
|
2743
2743
|
projectAccessReducer: Vh,
|
|
2744
2744
|
organizationAccessReducer: Fh,
|
|
2745
|
-
projectFileReducer:
|
|
2745
|
+
projectFileReducer: cp,
|
|
2746
2746
|
rehydratedReducer: mp,
|
|
2747
2747
|
formReducer: Tu,
|
|
2748
2748
|
formRevisionReducer: _u,
|
|
@@ -2754,7 +2754,7 @@ const C = O(
|
|
|
2754
2754
|
documentsReducer: Zd,
|
|
2755
2755
|
documentAttachmentReducer: Wd,
|
|
2756
2756
|
teamReducer: Fp,
|
|
2757
|
-
agentsReducer:
|
|
2757
|
+
agentsReducer: uc,
|
|
2758
2758
|
issueCommentReducer: gl,
|
|
2759
2759
|
issueCommentAttachmentReducer: Al,
|
|
2760
2760
|
issueUpdateReducer: mh,
|
|
@@ -2768,13 +2768,13 @@ const C = O(
|
|
|
2768
2768
|
assetTypeFieldValuesReducer: Rd,
|
|
2769
2769
|
assetTypeFieldsAttachmentReducer: dd,
|
|
2770
2770
|
assetTypeFieldValuesAttachmentReducer: _d,
|
|
2771
|
-
assetProcedureReducer:
|
|
2771
|
+
assetProcedureReducer: co,
|
|
2772
2772
|
assetProcedureInstanceReducer: ao,
|
|
2773
|
-
assetProcedureFieldsReducer: $
|
|
2774
|
-
assetProcedureFieldValuesReducer:
|
|
2775
|
-
assetProcedureFieldsAttachmentReducer:
|
|
2776
|
-
assetProcedureFieldValuesAttachmentReducer:
|
|
2777
|
-
assetProcedureAttachmentReducer:
|
|
2773
|
+
assetProcedureFieldsReducer: $c,
|
|
2774
|
+
assetProcedureFieldValuesReducer: Xc,
|
|
2775
|
+
assetProcedureFieldsAttachmentReducer: zc,
|
|
2776
|
+
assetProcedureFieldValuesAttachmentReducer: Wc,
|
|
2777
|
+
assetProcedureAttachmentReducer: vc,
|
|
2778
2778
|
assetProcedureStepFieldsAttachmentReducer: fo,
|
|
2779
2779
|
assetProcedureStepFieldsReducer: yo,
|
|
2780
2780
|
assetProcedureStepFieldValuesAttachmentReducer: To,
|
|
@@ -2782,25 +2782,25 @@ const C = O(
|
|
|
2782
2782
|
assetProcedureStepReducer: Mo,
|
|
2783
2783
|
teamMembershipReducer: yp
|
|
2784
2784
|
}, jS = Ta(vp);
|
|
2785
|
-
let
|
|
2785
|
+
let Pr;
|
|
2786
2786
|
function wp(t) {
|
|
2787
|
-
|
|
2787
|
+
Pr = t;
|
|
2788
2788
|
}
|
|
2789
2789
|
function Je() {
|
|
2790
|
-
return
|
|
2790
|
+
return Pr;
|
|
2791
2791
|
}
|
|
2792
|
-
let
|
|
2792
|
+
let Tr;
|
|
2793
2793
|
function kp(t) {
|
|
2794
|
-
|
|
2794
|
+
Tr = t;
|
|
2795
2795
|
}
|
|
2796
2796
|
function Ep() {
|
|
2797
|
-
return
|
|
2797
|
+
return Tr;
|
|
2798
2798
|
}
|
|
2799
|
-
const zS = 5e4, M =
|
|
2800
|
-
class
|
|
2799
|
+
const zS = 5e4, M = 1e3, US = "limit", Fr = {};
|
|
2800
|
+
class Or {
|
|
2801
2801
|
constructor(e) {
|
|
2802
2802
|
A(this, "client");
|
|
2803
|
-
|
|
2803
|
+
Fr[this.constructor.name] = this, this.client = e;
|
|
2804
2804
|
}
|
|
2805
2805
|
async enqueueRequest(e) {
|
|
2806
2806
|
return this.client.enqueueRequest(e, this.host, this.constructor.name);
|
|
@@ -2836,12 +2836,12 @@ class Oc {
|
|
|
2836
2836
|
i.push(a.results);
|
|
2837
2837
|
let n = a.next;
|
|
2838
2838
|
for (; n; ) {
|
|
2839
|
-
const
|
|
2839
|
+
const r = await this.client.enqueueRequest(
|
|
2840
2840
|
{ ...e, url: n },
|
|
2841
2841
|
this.host,
|
|
2842
2842
|
this.constructor.name
|
|
2843
2843
|
);
|
|
2844
|
-
n =
|
|
2844
|
+
n = r.next, i.push(r.results);
|
|
2845
2845
|
}
|
|
2846
2846
|
return i;
|
|
2847
2847
|
}
|
|
@@ -2850,10 +2850,10 @@ class Oc {
|
|
|
2850
2850
|
this.client.store.dispatch(e);
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
|
-
const
|
|
2853
|
+
const Ir = () => vr.length - 1, Rr = (t) => (t[ht] = { version: Ir() }, t), Sa = () => Rr({}), Mp = (t) => (t.outboxReducer && (t.outboxReducer.deletedRequests = []), t), qp = (t) => (e) => {
|
|
2854
2854
|
var s;
|
|
2855
|
-
return e === void 0 && (e = {}), ((s = e[ht]) == null ? void 0 : s.version) ===
|
|
2856
|
-
},
|
|
2855
|
+
return e === void 0 && (e = {}), ((s = e[ht]) == null ? void 0 : s.version) === Ir() ? e : t(e);
|
|
2856
|
+
}, vr = [Rr, Sa, Sa, Mp], jp = Object.fromEntries(vr.map((t, e) => [e, qp(t)]));
|
|
2857
2857
|
let gt = null;
|
|
2858
2858
|
function Be() {
|
|
2859
2859
|
const t = Je();
|
|
@@ -2888,13 +2888,13 @@ const Vp = {
|
|
|
2888
2888
|
effect: xp,
|
|
2889
2889
|
// Casting needed because we are saving FullOfflineAction objects, not just OfflineAction objects,
|
|
2890
2890
|
// but redux-offline does not know this.
|
|
2891
|
-
discard:
|
|
2891
|
+
discard: Mr,
|
|
2892
2892
|
returnPromises: !0,
|
|
2893
2893
|
persistCallback: zp,
|
|
2894
2894
|
retry: Kp,
|
|
2895
2895
|
// Modify the configuration of the offline store to use localforage
|
|
2896
2896
|
// which uses IndexedDB by default (persists even on mobile when installed as a PWA, unlike localStorage)
|
|
2897
|
-
persistOptions: { storage:
|
|
2897
|
+
persistOptions: { storage: Vr },
|
|
2898
2898
|
// TODO: custom enqueue implementation to take care of intelligently cancelling "create/delete same issue",
|
|
2899
2899
|
// and custom dequeue for e.g. if user insists on removing a failed a "create issue", then remove the "edit
|
|
2900
2900
|
// that same issue"
|
|
@@ -2905,7 +2905,7 @@ const Vp = {
|
|
|
2905
2905
|
// Bad typing, undefined is actually fine, and the action is a FullOfflineAction, not just an OfflineAction.
|
|
2906
2906
|
peek: (...t) => Wp(...t)
|
|
2907
2907
|
}
|
|
2908
|
-
}, Cp =
|
|
2908
|
+
}, Cp = Cr(jp, ht), DS = Ur(xr(Vp), Cp);
|
|
2909
2909
|
function $p(t) {
|
|
2910
2910
|
function e(s) {
|
|
2911
2911
|
return typeof s == "object" && s !== null && ["ok", "redirect", "clientError", "serverError", "error"].every((a) => a in s);
|
|
@@ -2917,8 +2917,8 @@ function $p(t) {
|
|
|
2917
2917
|
if (s.response && e(s.response.response)) return s.response.response;
|
|
2918
2918
|
}
|
|
2919
2919
|
}
|
|
2920
|
-
async function
|
|
2921
|
-
const s =
|
|
2920
|
+
async function wr(t, e) {
|
|
2921
|
+
const s = Fr[t.meta.offline.effect.serviceName];
|
|
2922
2922
|
if (!s)
|
|
2923
2923
|
throw new Error(`Service ${t.meta.offline.effect.serviceName} not found`);
|
|
2924
2924
|
const i = s instanceof v;
|
|
@@ -2928,10 +2928,10 @@ async function wc(t, e) {
|
|
|
2928
2928
|
const n = {
|
|
2929
2929
|
queryParams: "",
|
|
2930
2930
|
isAuthNeeded: !0
|
|
2931
|
-
},
|
|
2931
|
+
}, r = t.meta.offline.effect, { payload: o, headers: l, method: c, queryParams: d, attachmentHash: h, isExternalUrl: p, isAuthNeeded: f, isResponseBlob: g } = {
|
|
2932
2932
|
...n,
|
|
2933
|
-
...
|
|
2934
|
-
}, S =
|
|
2933
|
+
...r.request
|
|
2934
|
+
}, S = r.request;
|
|
2935
2935
|
let T = S.url;
|
|
2936
2936
|
const k = h ? await e.files.fetchCache(h) : void 0;
|
|
2937
2937
|
if (h && !k)
|
|
@@ -2948,7 +2948,7 @@ async function wc(t, e) {
|
|
|
2948
2948
|
return j.set("x-amz-checksum-sha1", Ne).field({ ...o, ...V.fields }).attach("file", k);
|
|
2949
2949
|
}
|
|
2950
2950
|
return j.send(o);
|
|
2951
|
-
},
|
|
2951
|
+
}, qr = {
|
|
2952
2952
|
[u.GET]: () => g ? Ge.get(T.toString()).responseType("blob") : Ge.get(T.toString()),
|
|
2953
2953
|
[u.POST]: () => {
|
|
2954
2954
|
const j = Ge.post(T.toString());
|
|
@@ -2966,8 +2966,8 @@ async function wc(t, e) {
|
|
|
2966
2966
|
const j = Ge.delete(T.toString());
|
|
2967
2967
|
return q(j);
|
|
2968
2968
|
}
|
|
2969
|
-
}[
|
|
2970
|
-
let Ve =
|
|
2969
|
+
}[c];
|
|
2970
|
+
let Ve = qr();
|
|
2971
2971
|
if (f && i) {
|
|
2972
2972
|
const j = s.auth.getAuthHeader();
|
|
2973
2973
|
Ve = Ve.set("Authorization", j);
|
|
@@ -2979,7 +2979,7 @@ async function wc(t, e) {
|
|
|
2979
2979
|
const V = $p(j), Ne = V == null ? void 0 : V.status;
|
|
2980
2980
|
if (i && Ne === 401)
|
|
2981
2981
|
return await s.auth.handleUnauthorized(Ve, V), Ve.query(d);
|
|
2982
|
-
throw new x({ response: V, innerError: j, discard:
|
|
2982
|
+
throw new x({ response: V, innerError: j, discard: Er.includes(Ne) });
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
2985
|
class Gp {
|
|
@@ -2998,7 +2998,7 @@ class Gp {
|
|
|
2998
2998
|
return this._all;
|
|
2999
2999
|
}
|
|
3000
3000
|
}
|
|
3001
|
-
class
|
|
3001
|
+
class kr {
|
|
3002
3002
|
constructor() {
|
|
3003
3003
|
A(this, "next");
|
|
3004
3004
|
this.next = null;
|
|
@@ -3013,16 +3013,16 @@ class kc {
|
|
|
3013
3013
|
if (console.debug("Middleware finished. Performing request:", e), !Je()) throw new Error("Client store not set");
|
|
3014
3014
|
const i = Ep();
|
|
3015
3015
|
if (!i) throw new Error("Client SDK not set");
|
|
3016
|
-
return
|
|
3016
|
+
return wr(e, i);
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
|
-
class Bp extends
|
|
3020
|
+
class Bp extends kr {
|
|
3021
3021
|
async run(e) {
|
|
3022
3022
|
return super.run(e);
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
|
-
class Lp extends
|
|
3025
|
+
class Lp extends kr {
|
|
3026
3026
|
async run(e) {
|
|
3027
3027
|
return super.run(e);
|
|
3028
3028
|
}
|
|
@@ -3032,9 +3032,9 @@ function Hp(t) {
|
|
|
3032
3032
|
var e;
|
|
3033
3033
|
return (e = Np[0]) == null ? void 0 : e.run(t);
|
|
3034
3034
|
}
|
|
3035
|
-
const
|
|
3036
|
-
function
|
|
3037
|
-
var
|
|
3035
|
+
const Er = [400, 409, 403, 404, 405, 500];
|
|
3036
|
+
function Mr(t, e, s = 0) {
|
|
3037
|
+
var c;
|
|
3038
3038
|
if (console.debug(
|
|
3039
3039
|
"Considering discarding request due to error:",
|
|
3040
3040
|
t,
|
|
@@ -3051,9 +3051,9 @@ Retries:`,
|
|
|
3051
3051
|
t,
|
|
3052
3052
|
"(throwing immediately, which may lead to unexpected behavior)"
|
|
3053
3053
|
), t;
|
|
3054
|
-
const i = Je(), n = i.getState().outboxReducer.deletedRequests,
|
|
3054
|
+
const i = Je(), n = i.getState().outboxReducer.deletedRequests, r = e.payload.uuid;
|
|
3055
3055
|
function o() {
|
|
3056
|
-
i.dispatch(qh(
|
|
3056
|
+
i.dispatch(qh(r));
|
|
3057
3057
|
const d = Be();
|
|
3058
3058
|
if (!d)
|
|
3059
3059
|
throw new Error("Outbox coordinator not set");
|
|
@@ -3063,11 +3063,11 @@ Retries:`,
|
|
|
3063
3063
|
}
|
|
3064
3064
|
if (t instanceof x && t.options.discard)
|
|
3065
3065
|
return console.debug("Discarding request due to explicit discard:", e), o();
|
|
3066
|
-
if (n.includes(
|
|
3066
|
+
if (n.includes(r))
|
|
3067
3067
|
return console.debug("Discarding request due to deletion:", e), o();
|
|
3068
3068
|
if (t instanceof x) {
|
|
3069
|
-
const d = t.status || ((
|
|
3070
|
-
if (d || console.warn("Error has no status code:", t), d !== void 0 &&
|
|
3069
|
+
const d = t.status || ((c = t.response) == null ? void 0 : c.status);
|
|
3070
|
+
if (d || console.warn("Error has no status code:", t), d !== void 0 && Er.includes(d)) {
|
|
3071
3071
|
console.warn("Discarding request due to error:", t, `
|
|
3072
3072
|
Action:`, e);
|
|
3073
3073
|
const h = Be();
|
|
@@ -3087,7 +3087,7 @@ function Wp(t, e, s) {
|
|
|
3087
3087
|
return (i = Be()) == null ? void 0 : i.peek();
|
|
3088
3088
|
}
|
|
3089
3089
|
function Kp(t, e) {
|
|
3090
|
-
return Je().dispatch(jh((/* @__PURE__ */ new Date()).getTime())),
|
|
3090
|
+
return Je().dispatch(jh((/* @__PURE__ */ new Date()).getTime())), Kr;
|
|
3091
3091
|
}
|
|
3092
3092
|
const Ye = "An unknown error occurred", Yp = 500, _a = ["non_field_errors", "detail"];
|
|
3093
3093
|
function Jp(t, e) {
|
|
@@ -3102,7 +3102,7 @@ function Jp(t, e) {
|
|
|
3102
3102
|
else
|
|
3103
3103
|
try {
|
|
3104
3104
|
s = Object.entries(i).map(([a, n]) => typeof n == "string" ? _a.includes(a) ? n : `${a}: ${n}` : Array.isArray(n) ? _a.includes(a) ? n.join(`
|
|
3105
|
-
`) : n.map((
|
|
3105
|
+
`) : n.map((r) => `${a}: ${r}`).join(`
|
|
3106
3106
|
`) : `${a}: ${JSON.stringify(n)}`).join(`
|
|
3107
3107
|
`);
|
|
3108
3108
|
} catch (a) {
|
|
@@ -3124,12 +3124,12 @@ class x extends Error {
|
|
|
3124
3124
|
this.message = s.message ?? Jp(i, a) ?? Ye, this.status = (i == null ? void 0 : i.status) ?? 0, this.response = i, s.discard = s.discard ?? !1, this.options = s;
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
class Zp extends
|
|
3127
|
+
class Zp extends Or {
|
|
3128
3128
|
constructor(e) {
|
|
3129
3129
|
super(e);
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
3132
|
-
class v extends
|
|
3132
|
+
class v extends Or {
|
|
3133
3133
|
constructor(s, i) {
|
|
3134
3134
|
super(s);
|
|
3135
3135
|
A(this, "auth");
|
|
@@ -3148,7 +3148,7 @@ class xS extends v {
|
|
|
3148
3148
|
},
|
|
3149
3149
|
blockers: ["prompt"],
|
|
3150
3150
|
blocks: ["prompt"]
|
|
3151
|
-
}).then((i) => (this.dispatch(
|
|
3151
|
+
}).then((i) => (this.dispatch(cc(i)), i));
|
|
3152
3152
|
}
|
|
3153
3153
|
async continueConversation(e, s, i) {
|
|
3154
3154
|
return this.enqueueRequest({
|
|
@@ -3163,7 +3163,7 @@ class xS extends v {
|
|
|
3163
3163
|
blocks: ["prompt"],
|
|
3164
3164
|
queryParams: { conversation_id: s }
|
|
3165
3165
|
}).then((a) => {
|
|
3166
|
-
this.dispatch(
|
|
3166
|
+
this.dispatch(dc(a));
|
|
3167
3167
|
});
|
|
3168
3168
|
}
|
|
3169
3169
|
async fetchDetails(e) {
|
|
@@ -3174,7 +3174,7 @@ class xS extends v {
|
|
|
3174
3174
|
blockers: ["conversation"],
|
|
3175
3175
|
blocks: ["conversation"]
|
|
3176
3176
|
}).then((s) => {
|
|
3177
|
-
this.dispatch(
|
|
3177
|
+
this.dispatch(oc(s));
|
|
3178
3178
|
});
|
|
3179
3179
|
}
|
|
3180
3180
|
async rate(e, s) {
|
|
@@ -3196,7 +3196,7 @@ class xS extends v {
|
|
|
3196
3196
|
blockers: ["agent-conversations"],
|
|
3197
3197
|
blocks: ["agent-conversations"]
|
|
3198
3198
|
});
|
|
3199
|
-
return this.dispatch(
|
|
3199
|
+
return this.dispatch(rc(s)), s;
|
|
3200
3200
|
}
|
|
3201
3201
|
}
|
|
3202
3202
|
class U extends v {
|
|
@@ -3206,10 +3206,10 @@ class U extends v {
|
|
|
3206
3206
|
assetAttachmentReducer: i,
|
|
3207
3207
|
assetTypeAttachmentReducer: a,
|
|
3208
3208
|
documentAttachmentReducer: n,
|
|
3209
|
-
projectAttachmentReducer:
|
|
3209
|
+
projectAttachmentReducer: r,
|
|
3210
3210
|
formRevisionAttachmentReducer: o,
|
|
3211
3211
|
formSubmissionAttachmentReducer: l,
|
|
3212
|
-
geoImageReducer:
|
|
3212
|
+
geoImageReducer: c,
|
|
3213
3213
|
// fields
|
|
3214
3214
|
assetTypeFieldsAttachmentReducer: d,
|
|
3215
3215
|
assetTypeFieldValuesAttachmentReducer: h,
|
|
@@ -3221,10 +3221,10 @@ class U extends v {
|
|
|
3221
3221
|
Object.values(i.instances),
|
|
3222
3222
|
Object.values(a.instances),
|
|
3223
3223
|
Object.values(n.instances),
|
|
3224
|
-
Object.values(
|
|
3224
|
+
Object.values(r.instances),
|
|
3225
3225
|
Object.values(o.instances),
|
|
3226
3226
|
Object.values(l.instances),
|
|
3227
|
-
Object.values(
|
|
3227
|
+
Object.values(c.instances),
|
|
3228
3228
|
Object.values(d.instances),
|
|
3229
3229
|
Object.values(h.instances),
|
|
3230
3230
|
Object.values(p.instances),
|
|
@@ -3260,8 +3260,8 @@ class U extends v {
|
|
|
3260
3260
|
}
|
|
3261
3261
|
class xe extends U {
|
|
3262
3262
|
async _bulkAdd(e) {
|
|
3263
|
-
var
|
|
3264
|
-
const { store: s } = this.client, i = (
|
|
3263
|
+
var c;
|
|
3264
|
+
const { store: s } = this.client, i = (c = s.getState().userReducer.currentUser) == null ? void 0 : c.id, a = (/* @__PURE__ */ new Date()).toISOString(), n = [], r = [], o = {};
|
|
3265
3265
|
for (const d of e) {
|
|
3266
3266
|
const { modelUuid: h, file: p } = d, f = await this.getFilePayload(p);
|
|
3267
3267
|
f.sha1 in o || (o[f.sha1] = f);
|
|
@@ -3273,7 +3273,7 @@ class xe extends U {
|
|
|
3273
3273
|
description: "",
|
|
3274
3274
|
modelUuid: h
|
|
3275
3275
|
});
|
|
3276
|
-
n.push(g),
|
|
3276
|
+
n.push(g), r.push(
|
|
3277
3277
|
this.buildAttachmentPayload({
|
|
3278
3278
|
uuid: g.uuid,
|
|
3279
3279
|
file_name: g.file_name,
|
|
@@ -3291,7 +3291,7 @@ class xe extends U {
|
|
|
3291
3291
|
url: `${this.url}/bulk/`,
|
|
3292
3292
|
payload: {
|
|
3293
3293
|
submitted_at: a,
|
|
3294
|
-
attachments:
|
|
3294
|
+
attachments: r,
|
|
3295
3295
|
files: Object.values(o)
|
|
3296
3296
|
},
|
|
3297
3297
|
blocks: n.map((d) => d.uuid),
|
|
@@ -3329,11 +3329,11 @@ class VS extends xe {
|
|
|
3329
3329
|
A(this, "url", "/asset-attachments");
|
|
3330
3330
|
A(this, "initializeAttachments", ts);
|
|
3331
3331
|
A(this, "addAttachments", ka);
|
|
3332
|
-
A(this, "updateAttachments",
|
|
3332
|
+
A(this, "updateAttachments", hc);
|
|
3333
3333
|
A(this, "removeAttachments", Ea);
|
|
3334
|
-
A(this, "removeAttachment",
|
|
3335
|
-
A(this, "setAttachment",
|
|
3336
|
-
A(this, "selectAttachment",
|
|
3334
|
+
A(this, "removeAttachment", pc);
|
|
3335
|
+
A(this, "setAttachment", lc);
|
|
3336
|
+
A(this, "selectAttachment", Ac);
|
|
3337
3337
|
}
|
|
3338
3338
|
buildOfflineAttachment(s) {
|
|
3339
3339
|
return F({
|
|
@@ -3362,6 +3362,7 @@ class VS extends xe {
|
|
|
3362
3362
|
async refreshStore(s) {
|
|
3363
3363
|
const a = (await this.performPagination(
|
|
3364
3364
|
{
|
|
3365
|
+
immediate: !0,
|
|
3365
3366
|
description: "Get asset attachments",
|
|
3366
3367
|
method: u.GET,
|
|
3367
3368
|
url: `${this.url}/`,
|
|
@@ -3374,6 +3375,7 @@ class VS extends xe {
|
|
|
3374
3375
|
blockers: []
|
|
3375
3376
|
},
|
|
3376
3377
|
(n) => ({
|
|
3378
|
+
immediate: !0,
|
|
3377
3379
|
description: "Get asset attachments",
|
|
3378
3380
|
method: u.GET,
|
|
3379
3381
|
url: n,
|
|
@@ -3389,12 +3391,12 @@ class CS extends xe {
|
|
|
3389
3391
|
super(...arguments);
|
|
3390
3392
|
A(this, "name", "Asset Procedure Attachment");
|
|
3391
3393
|
A(this, "url", "/asset-procedure-attachments");
|
|
3392
|
-
A(this, "addAttachments",
|
|
3393
|
-
A(this, "updateAttachments",
|
|
3394
|
-
A(this, "removeAttachments",
|
|
3395
|
-
A(this, "removeAttachment",
|
|
3396
|
-
A(this, "setAttachment",
|
|
3397
|
-
A(this, "selectAttachment",
|
|
3394
|
+
A(this, "addAttachments", Sc);
|
|
3395
|
+
A(this, "updateAttachments", Pc);
|
|
3396
|
+
A(this, "removeAttachments", Fc);
|
|
3397
|
+
A(this, "removeAttachment", Tc);
|
|
3398
|
+
A(this, "setAttachment", _c);
|
|
3399
|
+
A(this, "selectAttachment", Rc);
|
|
3398
3400
|
}
|
|
3399
3401
|
buildOfflineAttachment(s) {
|
|
3400
3402
|
return F({
|
|
@@ -3431,15 +3433,15 @@ class CS extends xe {
|
|
|
3431
3433
|
blocks: [],
|
|
3432
3434
|
blockers: []
|
|
3433
3435
|
});
|
|
3434
|
-
return this.dispatch(
|
|
3436
|
+
return this.dispatch(gc(i)), i;
|
|
3435
3437
|
}
|
|
3436
3438
|
}
|
|
3437
3439
|
class $S extends U {
|
|
3438
3440
|
async bulkAdd(e) {
|
|
3439
3441
|
var l;
|
|
3440
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
3441
|
-
for (const
|
|
3442
|
-
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } =
|
|
3442
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
3443
|
+
for (const c of e) {
|
|
3444
|
+
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
3443
3445
|
f.sha1 in a || (a[f.sha1] = f);
|
|
3444
3446
|
const g = F({
|
|
3445
3447
|
file: URL.createObjectURL(p),
|
|
@@ -3460,30 +3462,30 @@ class $S extends U {
|
|
|
3460
3462
|
file_sha1: f.sha1,
|
|
3461
3463
|
fields_revision: d
|
|
3462
3464
|
};
|
|
3463
|
-
|
|
3465
|
+
r.push(S);
|
|
3464
3466
|
}
|
|
3465
|
-
this.dispatch(
|
|
3467
|
+
this.dispatch(kc(n));
|
|
3466
3468
|
const o = this.enqueueRequest({
|
|
3467
3469
|
description: "Add asset procedure fields attachments",
|
|
3468
3470
|
method: u.POST,
|
|
3469
3471
|
url: "/asset-procedure-fields-attachments/bulk/",
|
|
3470
3472
|
payload: {
|
|
3471
3473
|
submitted_at: s,
|
|
3472
|
-
attachments:
|
|
3474
|
+
attachments: r,
|
|
3473
3475
|
files: Object.values(a)
|
|
3474
3476
|
},
|
|
3475
|
-
blockers: n.map((
|
|
3476
|
-
blocks: n.map((
|
|
3477
|
+
blockers: n.map((c) => c.fields_revision),
|
|
3478
|
+
blocks: n.map((c) => c.uuid)
|
|
3477
3479
|
});
|
|
3478
|
-
return o.then((
|
|
3479
|
-
this.processPresignedUrls(
|
|
3480
|
+
return o.then((c) => {
|
|
3481
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(Ec(c.attachments));
|
|
3480
3482
|
}).catch(() => {
|
|
3481
3483
|
this.dispatch(
|
|
3482
|
-
|
|
3483
|
-
n.map((
|
|
3484
|
+
Mc(
|
|
3485
|
+
n.map((c) => c.uuid)
|
|
3484
3486
|
)
|
|
3485
3487
|
);
|
|
3486
|
-
}), [n, o.then(({ attachments:
|
|
3488
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
3487
3489
|
}
|
|
3488
3490
|
async refreshStore(e) {
|
|
3489
3491
|
const s = await this.enqueueRequest({
|
|
@@ -3496,7 +3498,7 @@ class $S extends U {
|
|
|
3496
3498
|
blockers: [],
|
|
3497
3499
|
blocks: []
|
|
3498
3500
|
});
|
|
3499
|
-
return this.dispatch(
|
|
3501
|
+
return this.dispatch(wc(s)), s;
|
|
3500
3502
|
}
|
|
3501
3503
|
}
|
|
3502
3504
|
class GS extends v {
|
|
@@ -3507,8 +3509,8 @@ class GS extends v {
|
|
|
3507
3509
|
created_by: i,
|
|
3508
3510
|
submitted_at: a
|
|
3509
3511
|
});
|
|
3510
|
-
this.dispatch(
|
|
3511
|
-
const
|
|
3512
|
+
this.dispatch(Dc(n));
|
|
3513
|
+
const r = this.enqueueRequest({
|
|
3512
3514
|
description: "Add Asset Procedure Fields",
|
|
3513
3515
|
method: u.POST,
|
|
3514
3516
|
url: "/asset-procedure-fields/",
|
|
@@ -3516,11 +3518,11 @@ class GS extends v {
|
|
|
3516
3518
|
blockers: [n.asset_procedure],
|
|
3517
3519
|
blocks: [n.uuid]
|
|
3518
3520
|
});
|
|
3519
|
-
return
|
|
3520
|
-
this.dispatch(
|
|
3521
|
+
return r.then((l) => {
|
|
3522
|
+
this.dispatch(xc(l));
|
|
3521
3523
|
}).catch((l) => {
|
|
3522
|
-
throw this.dispatch(
|
|
3523
|
-
}), [n,
|
|
3524
|
+
throw this.dispatch(Vc(n.uuid)), l;
|
|
3525
|
+
}), [n, r];
|
|
3524
3526
|
}
|
|
3525
3527
|
async refreshStore(e) {
|
|
3526
3528
|
const s = await this.enqueueRequest({
|
|
@@ -3533,7 +3535,7 @@ class GS extends v {
|
|
|
3533
3535
|
blockers: [],
|
|
3534
3536
|
blocks: []
|
|
3535
3537
|
});
|
|
3536
|
-
return this.dispatch(
|
|
3538
|
+
return this.dispatch(Uc(s)), s;
|
|
3537
3539
|
}
|
|
3538
3540
|
}
|
|
3539
3541
|
function Ce(t, e) {
|
|
@@ -3546,8 +3548,8 @@ function Ce(t, e) {
|
|
|
3546
3548
|
}
|
|
3547
3549
|
class BS extends U {
|
|
3548
3550
|
async bulkAdd(e, s) {
|
|
3549
|
-
var
|
|
3550
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (
|
|
3551
|
+
var c;
|
|
3552
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id, n = Ce(e, s ?? e.length), r = [], o = [];
|
|
3551
3553
|
for (const d of n) {
|
|
3552
3554
|
const h = {}, p = [];
|
|
3553
3555
|
for (const f of d) {
|
|
@@ -3565,7 +3567,7 @@ class BS extends U {
|
|
|
3565
3567
|
field_identifier: S
|
|
3566
3568
|
}
|
|
3567
3569
|
);
|
|
3568
|
-
|
|
3570
|
+
r.push(q);
|
|
3569
3571
|
const $e = {
|
|
3570
3572
|
uuid: q.uuid,
|
|
3571
3573
|
file_name: T.name,
|
|
@@ -3582,7 +3584,7 @@ class BS extends U {
|
|
|
3582
3584
|
files: Object.values(h)
|
|
3583
3585
|
});
|
|
3584
3586
|
}
|
|
3585
|
-
this.dispatch(Ft(
|
|
3587
|
+
this.dispatch(Ft(r));
|
|
3586
3588
|
const l = o.map((d) => this.enqueueRequest({
|
|
3587
3589
|
description: "Add asset procedure field values attachments",
|
|
3588
3590
|
method: u.POST,
|
|
@@ -3594,20 +3596,20 @@ class BS extends U {
|
|
|
3594
3596
|
return Promise.all(l).then((d) => {
|
|
3595
3597
|
for (const p of d) this.processPresignedUrls(p.presigned_urls);
|
|
3596
3598
|
const h = d.flatMap((p) => p.attachments);
|
|
3597
|
-
this.dispatch(
|
|
3599
|
+
this.dispatch(Bc(h));
|
|
3598
3600
|
}).catch((d) => {
|
|
3599
3601
|
throw this.dispatch(
|
|
3600
3602
|
Ot(
|
|
3601
|
-
|
|
3603
|
+
r.map((h) => h.uuid)
|
|
3602
3604
|
)
|
|
3603
3605
|
), d;
|
|
3604
3606
|
}), [
|
|
3605
|
-
|
|
3607
|
+
r,
|
|
3606
3608
|
l.map((d) => d.then(({ attachments: h }) => h))
|
|
3607
3609
|
];
|
|
3608
3610
|
}
|
|
3609
3611
|
async bulkDelete(e) {
|
|
3610
|
-
const { store: s } = this.client, i = s.getState(), a =
|
|
3612
|
+
const { store: s } = this.client, i = s.getState(), a = Nc(e)(i);
|
|
3611
3613
|
this.dispatch(Ot(e));
|
|
3612
3614
|
try {
|
|
3613
3615
|
await this.enqueueRequest({
|
|
@@ -3625,6 +3627,7 @@ class BS extends U {
|
|
|
3625
3627
|
async refreshStore(e) {
|
|
3626
3628
|
const i = (await this.performPagination(
|
|
3627
3629
|
{
|
|
3630
|
+
immediate: !0,
|
|
3628
3631
|
description: "Get asset procedure field values attachments",
|
|
3629
3632
|
method: u.GET,
|
|
3630
3633
|
url: "/asset-procedure-field-values-attachments/",
|
|
@@ -3637,6 +3640,7 @@ class BS extends U {
|
|
|
3637
3640
|
blocks: []
|
|
3638
3641
|
},
|
|
3639
3642
|
(a) => ({
|
|
3643
|
+
immediate: !0,
|
|
3640
3644
|
description: "Get asset procedure field values attachments",
|
|
3641
3645
|
method: u.GET,
|
|
3642
3646
|
url: a,
|
|
@@ -3644,15 +3648,15 @@ class BS extends U {
|
|
|
3644
3648
|
blocks: []
|
|
3645
3649
|
})
|
|
3646
3650
|
)).flat();
|
|
3647
|
-
return this.dispatch(
|
|
3651
|
+
return this.dispatch(Gc(i)), i;
|
|
3648
3652
|
}
|
|
3649
3653
|
}
|
|
3650
3654
|
class LS extends v {
|
|
3651
3655
|
add(e) {
|
|
3652
|
-
var
|
|
3656
|
+
var r;
|
|
3653
3657
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
3654
3658
|
...e,
|
|
3655
|
-
created_by: (
|
|
3659
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
3656
3660
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3657
3661
|
}), n = this.enqueueRequest({
|
|
3658
3662
|
description: "Add asset procedure field values",
|
|
@@ -3662,16 +3666,16 @@ class LS extends v {
|
|
|
3662
3666
|
blockers: [e.asset, e.fields_revision, e.asset_procedure_instance],
|
|
3663
3667
|
blocks: [a.uuid]
|
|
3664
3668
|
});
|
|
3665
|
-
return this.dispatch(
|
|
3669
|
+
return this.dispatch(cs(a)), n.then((o) => (this.dispatch(Ze(o)), o)).catch(() => {
|
|
3666
3670
|
this.dispatch(os(a.uuid));
|
|
3667
3671
|
}), [a, n];
|
|
3668
3672
|
}
|
|
3669
3673
|
bulkAdd(e, s) {
|
|
3670
3674
|
var l;
|
|
3671
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length),
|
|
3672
|
-
for (const
|
|
3675
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length), r = [];
|
|
3676
|
+
for (const c of n) {
|
|
3673
3677
|
const d = [];
|
|
3674
|
-
for (const h of
|
|
3678
|
+
for (const h of c) {
|
|
3675
3679
|
const p = F({
|
|
3676
3680
|
...h,
|
|
3677
3681
|
values: h.values,
|
|
@@ -3687,30 +3691,30 @@ class LS extends v {
|
|
|
3687
3691
|
values: p.values
|
|
3688
3692
|
});
|
|
3689
3693
|
}
|
|
3690
|
-
|
|
3694
|
+
r.push({
|
|
3691
3695
|
submitted_at: i,
|
|
3692
3696
|
values: e.values,
|
|
3693
3697
|
field_values: d
|
|
3694
3698
|
});
|
|
3695
3699
|
}
|
|
3696
|
-
this.dispatch(
|
|
3700
|
+
this.dispatch(Yc(a));
|
|
3697
3701
|
const o = [];
|
|
3698
|
-
for (const
|
|
3699
|
-
const d =
|
|
3702
|
+
for (const c of r) {
|
|
3703
|
+
const d = c.field_values.map((S) => S.asset), h = c.field_values.map((S) => S.fields_revision), p = c.field_values.map((S) => S.asset_procedure_instance), f = c.field_values.map((S) => S.uuid), g = this.enqueueRequest({
|
|
3700
3704
|
description: "Bulk add asset procedure field values",
|
|
3701
3705
|
method: u.POST,
|
|
3702
3706
|
url: "/asset-procedure-field-values/bulk/",
|
|
3703
|
-
payload:
|
|
3707
|
+
payload: c,
|
|
3704
3708
|
blockers: [...d, ...h, ...p],
|
|
3705
3709
|
blocks: f
|
|
3706
3710
|
});
|
|
3707
3711
|
o.push(g);
|
|
3708
3712
|
}
|
|
3709
|
-
return Promise.all(o).then((
|
|
3710
|
-
this.dispatch(
|
|
3713
|
+
return Promise.all(o).then((c) => {
|
|
3714
|
+
this.dispatch(Jc(c.flat()));
|
|
3711
3715
|
}).catch(() => {
|
|
3712
3716
|
this.dispatch(
|
|
3713
|
-
|
|
3717
|
+
Zc(a.map((c) => c.uuid))
|
|
3714
3718
|
);
|
|
3715
3719
|
}), [a, o];
|
|
3716
3720
|
}
|
|
@@ -3723,7 +3727,7 @@ class LS extends v {
|
|
|
3723
3727
|
...e
|
|
3724
3728
|
};
|
|
3725
3729
|
this.dispatch(Ze(n));
|
|
3726
|
-
const
|
|
3730
|
+
const r = this.enqueueRequest({
|
|
3727
3731
|
description: "Update asset procedure field values",
|
|
3728
3732
|
method: u.PATCH,
|
|
3729
3733
|
url: `/asset-procedure-field-values/${e.uuid}/`,
|
|
@@ -3735,19 +3739,19 @@ class LS extends v {
|
|
|
3735
3739
|
],
|
|
3736
3740
|
blocks: [n.uuid]
|
|
3737
3741
|
});
|
|
3738
|
-
return
|
|
3742
|
+
return r.then((o) => {
|
|
3739
3743
|
this.dispatch(Ze(o));
|
|
3740
3744
|
}).catch(() => {
|
|
3741
3745
|
this.dispatch(Ze(a));
|
|
3742
|
-
}), [n,
|
|
3746
|
+
}), [n, r];
|
|
3743
3747
|
}
|
|
3744
3748
|
async delete(e) {
|
|
3745
3749
|
const { store: s } = this.client, i = s.getState(), a = ds(e)(i);
|
|
3746
3750
|
if (!a)
|
|
3747
3751
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
3748
|
-
const n =
|
|
3752
|
+
const n = Hc(e)(i);
|
|
3749
3753
|
this.dispatch(os(e)), this.dispatch(
|
|
3750
|
-
Ot(n.map((
|
|
3754
|
+
Ot(n.map((r) => r.uuid))
|
|
3751
3755
|
);
|
|
3752
3756
|
try {
|
|
3753
3757
|
await this.enqueueRequest({
|
|
@@ -3757,13 +3761,14 @@ class LS extends v {
|
|
|
3757
3761
|
blockers: [e],
|
|
3758
3762
|
blocks: []
|
|
3759
3763
|
});
|
|
3760
|
-
} catch (
|
|
3761
|
-
throw this.dispatch(
|
|
3764
|
+
} catch (r) {
|
|
3765
|
+
throw this.dispatch(cs(a)), this.dispatch(Ft(n)), r;
|
|
3762
3766
|
}
|
|
3763
3767
|
}
|
|
3764
3768
|
async refreshStore(e) {
|
|
3765
3769
|
const i = (await this.performPagination(
|
|
3766
3770
|
{
|
|
3771
|
+
immediate: !0,
|
|
3767
3772
|
description: "Get asset procedure field values",
|
|
3768
3773
|
method: u.GET,
|
|
3769
3774
|
url: "/asset-procedure-field-values/",
|
|
@@ -3776,6 +3781,7 @@ class LS extends v {
|
|
|
3776
3781
|
blocks: []
|
|
3777
3782
|
},
|
|
3778
3783
|
(a) => ({
|
|
3784
|
+
immediate: !0,
|
|
3779
3785
|
description: "Get asset procedure field values",
|
|
3780
3786
|
method: u.GET,
|
|
3781
3787
|
url: a,
|
|
@@ -3783,7 +3789,7 @@ class LS extends v {
|
|
|
3783
3789
|
blocks: []
|
|
3784
3790
|
})
|
|
3785
3791
|
)).flat();
|
|
3786
|
-
return this.dispatch(
|
|
3792
|
+
return this.dispatch(Kc(i)), i;
|
|
3787
3793
|
}
|
|
3788
3794
|
}
|
|
3789
3795
|
class NS extends v {
|
|
@@ -3795,7 +3801,7 @@ class NS extends v {
|
|
|
3795
3801
|
submitted_at: a
|
|
3796
3802
|
});
|
|
3797
3803
|
this.dispatch(ls(n));
|
|
3798
|
-
const
|
|
3804
|
+
const r = this.enqueueRequest({
|
|
3799
3805
|
description: "Create asset procedure instance",
|
|
3800
3806
|
method: u.POST,
|
|
3801
3807
|
url: "/asset-procedure-instances/",
|
|
@@ -3803,11 +3809,11 @@ class NS extends v {
|
|
|
3803
3809
|
blockers: [e.asset_procedure, e.asset_type],
|
|
3804
3810
|
blocks: [n.uuid]
|
|
3805
3811
|
});
|
|
3806
|
-
return
|
|
3812
|
+
return r.then((l) => {
|
|
3807
3813
|
this.dispatch(Qe(l));
|
|
3808
3814
|
}).catch(() => {
|
|
3809
3815
|
this.dispatch(hs(n.uuid));
|
|
3810
|
-
}), [n,
|
|
3816
|
+
}), [n, r];
|
|
3811
3817
|
}
|
|
3812
3818
|
update(e) {
|
|
3813
3819
|
const { store: s } = this.client, i = ps(e.uuid)(s.getState());
|
|
@@ -3826,8 +3832,8 @@ class NS extends v {
|
|
|
3826
3832
|
blockers: [i.uuid],
|
|
3827
3833
|
blocks: [i.uuid]
|
|
3828
3834
|
});
|
|
3829
|
-
return n.then((
|
|
3830
|
-
this.dispatch(Qe(
|
|
3835
|
+
return n.then((r) => {
|
|
3836
|
+
this.dispatch(Qe(r));
|
|
3831
3837
|
}).catch(() => {
|
|
3832
3838
|
this.dispatch(Qe(i));
|
|
3833
3839
|
}), [a, n];
|
|
@@ -3849,6 +3855,7 @@ class NS extends v {
|
|
|
3849
3855
|
async refreshStore(e) {
|
|
3850
3856
|
const i = (await this.performPagination(
|
|
3851
3857
|
{
|
|
3858
|
+
immediate: !0,
|
|
3852
3859
|
description: "Get asset procedure instances",
|
|
3853
3860
|
method: u.GET,
|
|
3854
3861
|
url: "/asset-procedure-instances/",
|
|
@@ -3861,6 +3868,7 @@ class NS extends v {
|
|
|
3861
3868
|
blocks: []
|
|
3862
3869
|
},
|
|
3863
3870
|
(a) => ({
|
|
3871
|
+
immediate: !0,
|
|
3864
3872
|
description: "Get asset procedure instances",
|
|
3865
3873
|
method: u.GET,
|
|
3866
3874
|
url: a,
|
|
@@ -3880,7 +3888,7 @@ class HS extends v {
|
|
|
3880
3888
|
submitted_at: a
|
|
3881
3889
|
});
|
|
3882
3890
|
this.dispatch(fs(n));
|
|
3883
|
-
const
|
|
3891
|
+
const r = this.enqueueRequest({
|
|
3884
3892
|
description: "Create asset procedure",
|
|
3885
3893
|
method: u.POST,
|
|
3886
3894
|
url: "/asset-procedures/",
|
|
@@ -3888,11 +3896,11 @@ class HS extends v {
|
|
|
3888
3896
|
blockers: [],
|
|
3889
3897
|
blocks: [n.uuid]
|
|
3890
3898
|
});
|
|
3891
|
-
return
|
|
3899
|
+
return r.then((l) => {
|
|
3892
3900
|
this.dispatch(Xe(l));
|
|
3893
3901
|
}).catch(() => {
|
|
3894
3902
|
this.dispatch(As(n.uuid));
|
|
3895
|
-
}), [n,
|
|
3903
|
+
}), [n, r];
|
|
3896
3904
|
}
|
|
3897
3905
|
update(e) {
|
|
3898
3906
|
const { store: s } = this.client, i = ys(e.uuid)(s.getState());
|
|
@@ -3911,8 +3919,8 @@ class HS extends v {
|
|
|
3911
3919
|
blockers: [i.uuid],
|
|
3912
3920
|
blocks: [i.uuid]
|
|
3913
3921
|
});
|
|
3914
|
-
return n.then((
|
|
3915
|
-
this.dispatch(Xe(
|
|
3922
|
+
return n.then((r) => {
|
|
3923
|
+
this.dispatch(Xe(r));
|
|
3916
3924
|
}).catch(() => {
|
|
3917
3925
|
this.dispatch(Xe(i));
|
|
3918
3926
|
}), [a, n];
|
|
@@ -3922,14 +3930,14 @@ class HS extends v {
|
|
|
3922
3930
|
if (!a)
|
|
3923
3931
|
throw new Error(`Expected asset procedure with uuid ${e} to exist`);
|
|
3924
3932
|
const n = io(e)(i);
|
|
3925
|
-
return this.dispatch(As(e)), this.dispatch(so(n.map((
|
|
3933
|
+
return this.dispatch(As(e)), this.dispatch(so(n.map((r) => r.uuid))), this.enqueueRequest({
|
|
3926
3934
|
description: "Delete asset procedure",
|
|
3927
3935
|
method: u.DELETE,
|
|
3928
3936
|
url: `/asset-procedures/${e}/`,
|
|
3929
3937
|
blockers: [e],
|
|
3930
3938
|
blocks: []
|
|
3931
|
-
}).catch((
|
|
3932
|
-
throw this.dispatch(fs(a)), this.dispatch(to(n)),
|
|
3939
|
+
}).catch((r) => {
|
|
3940
|
+
throw this.dispatch(fs(a)), this.dispatch(to(n)), r;
|
|
3933
3941
|
});
|
|
3934
3942
|
}
|
|
3935
3943
|
async refreshStore(e) {
|
|
@@ -3949,9 +3957,9 @@ class HS extends v {
|
|
|
3949
3957
|
class WS extends U {
|
|
3950
3958
|
async bulkAdd(e) {
|
|
3951
3959
|
var l;
|
|
3952
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
3953
|
-
for (const
|
|
3954
|
-
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } =
|
|
3960
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
3961
|
+
for (const c of e) {
|
|
3962
|
+
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
3955
3963
|
f.sha1 in a || (a[f.sha1] = f);
|
|
3956
3964
|
const g = F({
|
|
3957
3965
|
file: URL.createObjectURL(p),
|
|
@@ -3972,7 +3980,7 @@ class WS extends U {
|
|
|
3972
3980
|
file_sha1: f.sha1,
|
|
3973
3981
|
fields_revision: d
|
|
3974
3982
|
};
|
|
3975
|
-
|
|
3983
|
+
r.push(S);
|
|
3976
3984
|
}
|
|
3977
3985
|
this.dispatch(uo(n));
|
|
3978
3986
|
const o = this.enqueueRequest({
|
|
@@ -3981,21 +3989,21 @@ class WS extends U {
|
|
|
3981
3989
|
url: "/asset-procedure-step-fields-attachments/bulk/",
|
|
3982
3990
|
payload: {
|
|
3983
3991
|
submitted_at: s,
|
|
3984
|
-
attachments:
|
|
3992
|
+
attachments: r,
|
|
3985
3993
|
files: Object.values(a)
|
|
3986
3994
|
},
|
|
3987
|
-
blockers: n.map((
|
|
3988
|
-
blocks: n.map((
|
|
3995
|
+
blockers: n.map((c) => c.fields_revision),
|
|
3996
|
+
blocks: n.map((c) => c.uuid)
|
|
3989
3997
|
});
|
|
3990
|
-
return o.then((
|
|
3991
|
-
this.processPresignedUrls(
|
|
3998
|
+
return o.then((c) => {
|
|
3999
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(lo(c.attachments));
|
|
3992
4000
|
}).catch(() => {
|
|
3993
4001
|
this.dispatch(
|
|
3994
4002
|
ho(
|
|
3995
|
-
n.map((
|
|
4003
|
+
n.map((c) => c.uuid)
|
|
3996
4004
|
)
|
|
3997
4005
|
);
|
|
3998
|
-
}), [n, o.then(({ attachments:
|
|
4006
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
3999
4007
|
}
|
|
4000
4008
|
async refreshStore(e) {
|
|
4001
4009
|
const s = await this.enqueueRequest({
|
|
@@ -4020,7 +4028,7 @@ class KS extends v {
|
|
|
4020
4028
|
submitted_at: a
|
|
4021
4029
|
});
|
|
4022
4030
|
this.dispatch(Ss(n));
|
|
4023
|
-
const
|
|
4031
|
+
const r = this.enqueueRequest({
|
|
4024
4032
|
description: "Add Asset Procedure Step Fields",
|
|
4025
4033
|
method: u.POST,
|
|
4026
4034
|
url: "/asset-procedure-step-fields/",
|
|
@@ -4028,11 +4036,11 @@ class KS extends v {
|
|
|
4028
4036
|
blockers: [n.asset_procedure_step],
|
|
4029
4037
|
blocks: [n.uuid]
|
|
4030
4038
|
});
|
|
4031
|
-
return
|
|
4039
|
+
return r.then((l) => {
|
|
4032
4040
|
this.dispatch(et(l));
|
|
4033
4041
|
}).catch((l) => {
|
|
4034
4042
|
throw this.dispatch(_s(n.uuid)), l;
|
|
4035
|
-
}), [n,
|
|
4043
|
+
}), [n, r];
|
|
4036
4044
|
}
|
|
4037
4045
|
update(e) {
|
|
4038
4046
|
const { store: s } = this.client, i = s.getState().assetProcedureStepFieldsReducer.instances[e.uuid];
|
|
@@ -4051,10 +4059,10 @@ class KS extends v {
|
|
|
4051
4059
|
blockers: [i.uuid],
|
|
4052
4060
|
blocks: [i.uuid]
|
|
4053
4061
|
});
|
|
4054
|
-
return n.then((
|
|
4055
|
-
this.dispatch(et(
|
|
4056
|
-
}).catch((
|
|
4057
|
-
throw this.dispatch(et(i)),
|
|
4062
|
+
return n.then((r) => {
|
|
4063
|
+
this.dispatch(et(r));
|
|
4064
|
+
}).catch((r) => {
|
|
4065
|
+
throw this.dispatch(et(i)), r;
|
|
4058
4066
|
}), [a, n];
|
|
4059
4067
|
}
|
|
4060
4068
|
delete(e) {
|
|
@@ -4089,8 +4097,8 @@ class KS extends v {
|
|
|
4089
4097
|
}
|
|
4090
4098
|
class YS extends U {
|
|
4091
4099
|
async bulkAdd(e, s) {
|
|
4092
|
-
var
|
|
4093
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (
|
|
4100
|
+
var c;
|
|
4101
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id, n = Ce(e, s ?? e.length), r = [], o = [];
|
|
4094
4102
|
for (const d of n) {
|
|
4095
4103
|
const h = {}, p = [];
|
|
4096
4104
|
for (const f of d) {
|
|
@@ -4106,7 +4114,7 @@ class YS extends U {
|
|
|
4106
4114
|
submitted_at: i,
|
|
4107
4115
|
field_identifier: S
|
|
4108
4116
|
});
|
|
4109
|
-
|
|
4117
|
+
r.push(q);
|
|
4110
4118
|
const $e = {
|
|
4111
4119
|
uuid: q.uuid,
|
|
4112
4120
|
file_name: T.name,
|
|
@@ -4123,7 +4131,7 @@ class YS extends U {
|
|
|
4123
4131
|
files: Object.values(h)
|
|
4124
4132
|
});
|
|
4125
4133
|
}
|
|
4126
|
-
this.dispatch(It(
|
|
4134
|
+
this.dispatch(It(r));
|
|
4127
4135
|
const l = o.map((d) => this.enqueueRequest({
|
|
4128
4136
|
description: "Add asset procedure step field values attachments",
|
|
4129
4137
|
method: u.POST,
|
|
@@ -4139,11 +4147,11 @@ class YS extends U {
|
|
|
4139
4147
|
}).catch((d) => {
|
|
4140
4148
|
throw this.dispatch(
|
|
4141
4149
|
Rt(
|
|
4142
|
-
|
|
4150
|
+
r.map((h) => h.uuid)
|
|
4143
4151
|
)
|
|
4144
4152
|
), d;
|
|
4145
4153
|
}), [
|
|
4146
|
-
|
|
4154
|
+
r,
|
|
4147
4155
|
l.map((d) => d.then(({ attachments: h }) => h))
|
|
4148
4156
|
];
|
|
4149
4157
|
}
|
|
@@ -4166,6 +4174,7 @@ class YS extends U {
|
|
|
4166
4174
|
async refreshStore(e) {
|
|
4167
4175
|
const i = (await this.performPagination(
|
|
4168
4176
|
{
|
|
4177
|
+
immediate: !0,
|
|
4169
4178
|
description: "Get asset procedure step field values attachments",
|
|
4170
4179
|
method: u.GET,
|
|
4171
4180
|
url: "/asset-procedure-step-field-values-attachments/",
|
|
@@ -4178,6 +4187,7 @@ class YS extends U {
|
|
|
4178
4187
|
blocks: []
|
|
4179
4188
|
},
|
|
4180
4189
|
(a) => ({
|
|
4190
|
+
immediate: !0,
|
|
4181
4191
|
description: "Get asset procedure step field values attachments",
|
|
4182
4192
|
method: u.GET,
|
|
4183
4193
|
url: a,
|
|
@@ -4190,10 +4200,10 @@ class YS extends U {
|
|
|
4190
4200
|
}
|
|
4191
4201
|
class JS extends v {
|
|
4192
4202
|
add(e) {
|
|
4193
|
-
var
|
|
4203
|
+
var r;
|
|
4194
4204
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
4195
4205
|
...e,
|
|
4196
|
-
created_by: (
|
|
4206
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
4197
4207
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4198
4208
|
}), n = this.enqueueRequest({
|
|
4199
4209
|
description: "Add asset procedure step field values",
|
|
@@ -4209,10 +4219,10 @@ class JS extends v {
|
|
|
4209
4219
|
}
|
|
4210
4220
|
bulkAdd(e, s) {
|
|
4211
4221
|
var l;
|
|
4212
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length),
|
|
4213
|
-
for (const
|
|
4222
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length), r = [];
|
|
4223
|
+
for (const c of n) {
|
|
4214
4224
|
const d = [];
|
|
4215
|
-
for (const h of
|
|
4225
|
+
for (const h of c) {
|
|
4216
4226
|
const p = F({
|
|
4217
4227
|
...h,
|
|
4218
4228
|
values: h.values,
|
|
@@ -4229,7 +4239,7 @@ class JS extends v {
|
|
|
4229
4239
|
values: p.values
|
|
4230
4240
|
});
|
|
4231
4241
|
}
|
|
4232
|
-
|
|
4242
|
+
r.push({
|
|
4233
4243
|
submitted_at: i,
|
|
4234
4244
|
values: e.values,
|
|
4235
4245
|
field_values: d
|
|
@@ -4237,23 +4247,23 @@ class JS extends v {
|
|
|
4237
4247
|
}
|
|
4238
4248
|
this.dispatch(Oo(a));
|
|
4239
4249
|
const o = [];
|
|
4240
|
-
for (const
|
|
4241
|
-
const d =
|
|
4250
|
+
for (const c of r) {
|
|
4251
|
+
const d = c.field_values.map((S) => S.asset), h = c.field_values.map((S) => S.fields_revision), p = c.field_values.map((S) => S.asset_procedure_instance), f = c.field_values.map((S) => S.uuid), g = this.enqueueRequest({
|
|
4242
4252
|
description: "Bulk add asset procedure step field values",
|
|
4243
4253
|
method: u.POST,
|
|
4244
4254
|
url: "/asset-procedure-step-field-values/bulk/",
|
|
4245
|
-
payload:
|
|
4255
|
+
payload: c,
|
|
4246
4256
|
blockers: [...d, ...h, ...p],
|
|
4247
4257
|
blocks: f
|
|
4248
4258
|
});
|
|
4249
4259
|
o.push(g);
|
|
4250
4260
|
}
|
|
4251
|
-
return Promise.all(o).then((
|
|
4252
|
-
this.dispatch(Io(
|
|
4261
|
+
return Promise.all(o).then((c) => {
|
|
4262
|
+
this.dispatch(Io(c.flat()));
|
|
4253
4263
|
}).catch(() => {
|
|
4254
4264
|
this.dispatch(
|
|
4255
4265
|
Ro(
|
|
4256
|
-
a.map((
|
|
4266
|
+
a.map((c) => c.uuid)
|
|
4257
4267
|
)
|
|
4258
4268
|
);
|
|
4259
4269
|
}), [a, o];
|
|
@@ -4267,7 +4277,7 @@ class JS extends v {
|
|
|
4267
4277
|
...e
|
|
4268
4278
|
};
|
|
4269
4279
|
this.dispatch(tt(n));
|
|
4270
|
-
const
|
|
4280
|
+
const r = this.enqueueRequest({
|
|
4271
4281
|
description: "Update asset procedure step field values",
|
|
4272
4282
|
method: u.PATCH,
|
|
4273
4283
|
url: `/asset-procedure-step-field-values/${e.uuid}/`,
|
|
@@ -4279,11 +4289,11 @@ class JS extends v {
|
|
|
4279
4289
|
],
|
|
4280
4290
|
blocks: [n.uuid]
|
|
4281
4291
|
});
|
|
4282
|
-
return
|
|
4292
|
+
return r.then((o) => {
|
|
4283
4293
|
this.dispatch(tt(o));
|
|
4284
4294
|
}).catch(() => {
|
|
4285
4295
|
this.dispatch(tt(a));
|
|
4286
|
-
}), [n,
|
|
4296
|
+
}), [n, r];
|
|
4287
4297
|
}
|
|
4288
4298
|
async delete(e) {
|
|
4289
4299
|
const { store: s } = this.client, i = s.getState(), a = Is(e)(i);
|
|
@@ -4291,7 +4301,7 @@ class JS extends v {
|
|
|
4291
4301
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
4292
4302
|
const n = Po(e)(i);
|
|
4293
4303
|
this.dispatch(Os(e)), this.dispatch(
|
|
4294
|
-
Rt(n.map((
|
|
4304
|
+
Rt(n.map((r) => r.uuid))
|
|
4295
4305
|
);
|
|
4296
4306
|
try {
|
|
4297
4307
|
await this.enqueueRequest({
|
|
@@ -4301,13 +4311,14 @@ class JS extends v {
|
|
|
4301
4311
|
blockers: [e],
|
|
4302
4312
|
blocks: []
|
|
4303
4313
|
});
|
|
4304
|
-
} catch (
|
|
4305
|
-
throw this.dispatch(Fs(a)), this.dispatch(It(n)),
|
|
4314
|
+
} catch (r) {
|
|
4315
|
+
throw this.dispatch(Fs(a)), this.dispatch(It(n)), r;
|
|
4306
4316
|
}
|
|
4307
4317
|
}
|
|
4308
4318
|
async refreshStore(e) {
|
|
4309
4319
|
const i = (await this.performPagination(
|
|
4310
4320
|
{
|
|
4321
|
+
immediate: !0,
|
|
4311
4322
|
description: "Get asset procedure step field values",
|
|
4312
4323
|
method: u.GET,
|
|
4313
4324
|
url: "/asset-procedure-step-field-values/",
|
|
@@ -4320,6 +4331,7 @@ class JS extends v {
|
|
|
4320
4331
|
blocks: []
|
|
4321
4332
|
},
|
|
4322
4333
|
(a) => ({
|
|
4334
|
+
immediate: !0,
|
|
4323
4335
|
description: "Get asset procedure step field values",
|
|
4324
4336
|
method: u.GET,
|
|
4325
4337
|
url: a,
|
|
@@ -4339,7 +4351,7 @@ class ZS extends v {
|
|
|
4339
4351
|
submitted_at: a
|
|
4340
4352
|
});
|
|
4341
4353
|
this.dispatch(vs(n));
|
|
4342
|
-
const
|
|
4354
|
+
const r = this.enqueueRequest({
|
|
4343
4355
|
description: "Create asset procedure step",
|
|
4344
4356
|
method: u.POST,
|
|
4345
4357
|
url: "/asset-procedure-steps/",
|
|
@@ -4347,11 +4359,11 @@ class ZS extends v {
|
|
|
4347
4359
|
blockers: [n.asset_procedure],
|
|
4348
4360
|
blocks: [n.uuid]
|
|
4349
4361
|
});
|
|
4350
|
-
return
|
|
4362
|
+
return r.then((l) => {
|
|
4351
4363
|
this.dispatch(mt(l));
|
|
4352
4364
|
}).catch(() => {
|
|
4353
4365
|
this.dispatch(ws(n.uuid));
|
|
4354
|
-
}), [n,
|
|
4366
|
+
}), [n, r];
|
|
4355
4367
|
}
|
|
4356
4368
|
update(e) {
|
|
4357
4369
|
const { store: s } = this.client, i = ks(e.uuid)(s.getState());
|
|
@@ -4374,8 +4386,8 @@ class ZS extends v {
|
|
|
4374
4386
|
blockers: [i.uuid],
|
|
4375
4387
|
blocks: [i.uuid]
|
|
4376
4388
|
});
|
|
4377
|
-
return n.then((
|
|
4378
|
-
this.dispatch(mt(
|
|
4389
|
+
return n.then((r) => {
|
|
4390
|
+
this.dispatch(mt(r));
|
|
4379
4391
|
}).catch(() => {
|
|
4380
4392
|
this.dispatch(Eo(i));
|
|
4381
4393
|
}), [a, n];
|
|
@@ -4420,7 +4432,7 @@ class QS extends v {
|
|
|
4420
4432
|
submitted_at: a
|
|
4421
4433
|
});
|
|
4422
4434
|
this.dispatch(Ms(n));
|
|
4423
|
-
const
|
|
4435
|
+
const r = this.enqueueRequest({
|
|
4424
4436
|
description: "Create asset",
|
|
4425
4437
|
method: u.POST,
|
|
4426
4438
|
url: "/assets/",
|
|
@@ -4428,11 +4440,11 @@ class QS extends v {
|
|
|
4428
4440
|
blockers: [n.asset_type],
|
|
4429
4441
|
blocks: [n.uuid]
|
|
4430
4442
|
});
|
|
4431
|
-
return
|
|
4443
|
+
return r.then((l) => {
|
|
4432
4444
|
this.dispatch(st(l));
|
|
4433
4445
|
}).catch(() => {
|
|
4434
4446
|
this.dispatch(qs(n.uuid));
|
|
4435
|
-
}), [n,
|
|
4447
|
+
}), [n, r];
|
|
4436
4448
|
}
|
|
4437
4449
|
update(e) {
|
|
4438
4450
|
const { store: s } = this.client, i = js(e.uuid)(s.getState());
|
|
@@ -4453,8 +4465,8 @@ class QS extends v {
|
|
|
4453
4465
|
blockers: [e.uuid],
|
|
4454
4466
|
blocks: [e.uuid]
|
|
4455
4467
|
});
|
|
4456
|
-
return n.then((
|
|
4457
|
-
this.dispatch(st(
|
|
4468
|
+
return n.then((r) => {
|
|
4469
|
+
this.dispatch(st(r));
|
|
4458
4470
|
}).catch(() => {
|
|
4459
4471
|
this.dispatch(st(i));
|
|
4460
4472
|
}), [a, n];
|
|
@@ -4462,17 +4474,17 @@ class QS extends v {
|
|
|
4462
4474
|
async delete(e) {
|
|
4463
4475
|
const { store: s } = this.client, i = s.getState(), a = js(e)(i);
|
|
4464
4476
|
if (!a) throw new Error(`No asset with uuid ${e} found in the store`);
|
|
4465
|
-
const n =
|
|
4477
|
+
const n = yc(e)(i), r = Uu(e)(i), o = Qu(e)(i);
|
|
4466
4478
|
if (this.dispatch(qs(e)), n.length > 0) {
|
|
4467
|
-
const l = n.map(({ uuid:
|
|
4479
|
+
const l = n.map(({ uuid: c }) => c);
|
|
4468
4480
|
this.dispatch(Ea(l));
|
|
4469
4481
|
}
|
|
4470
|
-
if (
|
|
4471
|
-
const l =
|
|
4482
|
+
if (r.length > 0) {
|
|
4483
|
+
const l = r.map(({ uuid: c }) => c);
|
|
4472
4484
|
this.dispatch(Ht(l));
|
|
4473
4485
|
}
|
|
4474
4486
|
if (o.length > 0) {
|
|
4475
|
-
const l = o.map(({ uuid:
|
|
4487
|
+
const l = o.map(({ uuid: c }) => c);
|
|
4476
4488
|
this.dispatch(Vn(l));
|
|
4477
4489
|
}
|
|
4478
4490
|
return this.enqueueRequest({
|
|
@@ -4482,16 +4494,16 @@ class QS extends v {
|
|
|
4482
4494
|
blockers: [e],
|
|
4483
4495
|
blocks: []
|
|
4484
4496
|
}).catch((l) => {
|
|
4485
|
-
throw this.dispatch(Ms(a)), this.dispatch(ka(n)), this.dispatch(Nt(
|
|
4497
|
+
throw this.dispatch(Ms(a)), this.dispatch(ka(n)), this.dispatch(Nt(r)), this.dispatch(xn(o)), l;
|
|
4486
4498
|
});
|
|
4487
4499
|
}
|
|
4488
4500
|
bulkAdd(e, s, i, a) {
|
|
4489
|
-
const n = (/* @__PURE__ */ new Date()).toISOString(),
|
|
4501
|
+
const n = (/* @__PURE__ */ new Date()).toISOString(), r = Le(), o = Ce(e, a).map((d) => {
|
|
4490
4502
|
const h = d.map((p) => F(p));
|
|
4491
4503
|
return {
|
|
4492
4504
|
batchId: Le(),
|
|
4493
4505
|
payload: {
|
|
4494
|
-
transaction_id:
|
|
4506
|
+
transaction_id: r,
|
|
4495
4507
|
submitted_at: n,
|
|
4496
4508
|
asset_type: s,
|
|
4497
4509
|
project: i,
|
|
@@ -4499,10 +4511,10 @@ class QS extends v {
|
|
|
4499
4511
|
}
|
|
4500
4512
|
};
|
|
4501
4513
|
}), l = [];
|
|
4502
|
-
let
|
|
4514
|
+
let c = null;
|
|
4503
4515
|
for (const d of o) {
|
|
4504
4516
|
const { batchId: h, payload: p } = d, f = p.assets.map((k) => k.uuid), g = [s];
|
|
4505
|
-
|
|
4517
|
+
c && g.push(c);
|
|
4506
4518
|
const S = f;
|
|
4507
4519
|
S.push(h);
|
|
4508
4520
|
const T = this.enqueueRequest({
|
|
@@ -4513,7 +4525,7 @@ class QS extends v {
|
|
|
4513
4525
|
blockers: g,
|
|
4514
4526
|
blocks: S
|
|
4515
4527
|
});
|
|
4516
|
-
|
|
4528
|
+
c = d.batchId, l.push(T);
|
|
4517
4529
|
}
|
|
4518
4530
|
return Promise.all(l).then((d) => {
|
|
4519
4531
|
const h = d.flat();
|
|
@@ -4539,6 +4551,7 @@ class QS extends v {
|
|
|
4539
4551
|
async refreshStore(e) {
|
|
4540
4552
|
const i = (await this.performPagination(
|
|
4541
4553
|
{
|
|
4554
|
+
immediate: !0,
|
|
4542
4555
|
description: "Get assets",
|
|
4543
4556
|
method: u.GET,
|
|
4544
4557
|
url: "/assets/",
|
|
@@ -4551,6 +4564,7 @@ class QS extends v {
|
|
|
4551
4564
|
blocks: []
|
|
4552
4565
|
},
|
|
4553
4566
|
(a) => ({
|
|
4567
|
+
immediate: !0,
|
|
4554
4568
|
description: "Get assets",
|
|
4555
4569
|
method: u.GET,
|
|
4556
4570
|
url: a,
|
|
@@ -4570,7 +4584,7 @@ class XS extends v {
|
|
|
4570
4584
|
submitted_at: a
|
|
4571
4585
|
});
|
|
4572
4586
|
this.dispatch(Us(n));
|
|
4573
|
-
const
|
|
4587
|
+
const r = this.enqueueRequest({
|
|
4574
4588
|
description: "Add asset stage completion",
|
|
4575
4589
|
method: u.POST,
|
|
4576
4590
|
url: "/asset-stage-completions/",
|
|
@@ -4578,11 +4592,11 @@ class XS extends v {
|
|
|
4578
4592
|
blockers: [e.asset, e.stage],
|
|
4579
4593
|
blocks: [n.uuid]
|
|
4580
4594
|
});
|
|
4581
|
-
return
|
|
4595
|
+
return r.then((l) => {
|
|
4582
4596
|
this.dispatch(Vo(l));
|
|
4583
4597
|
}).catch(() => {
|
|
4584
4598
|
this.dispatch(xs(n.uuid));
|
|
4585
|
-
}), [n,
|
|
4599
|
+
}), [n, r];
|
|
4586
4600
|
}
|
|
4587
4601
|
delete(e) {
|
|
4588
4602
|
const { store: s } = this.client, i = Go(e)(s.getState());
|
|
@@ -4601,13 +4615,13 @@ class XS extends v {
|
|
|
4601
4615
|
}), a;
|
|
4602
4616
|
}
|
|
4603
4617
|
bulkAdd(e) {
|
|
4604
|
-
var
|
|
4605
|
-
const { store: s } = this.client, i = (/* @__PURE__ */ new Date()).toISOString(), a = (
|
|
4618
|
+
var c;
|
|
4619
|
+
const { store: s } = this.client, i = (/* @__PURE__ */ new Date()).toISOString(), a = (c = s.getState().userReducer.currentUser) == null ? void 0 : c.id, n = e.map((d) => F(d)), r = n.map((d) => ({
|
|
4606
4620
|
...d,
|
|
4607
4621
|
created_by: a,
|
|
4608
4622
|
submitted_at: i
|
|
4609
|
-
})), o =
|
|
4610
|
-
this.dispatch(Ds(
|
|
4623
|
+
})), o = r.map(({ uuid: d }) => d);
|
|
4624
|
+
this.dispatch(Ds(r));
|
|
4611
4625
|
const l = this.enqueueRequest({
|
|
4612
4626
|
description: "Bulk create asset stage completions",
|
|
4613
4627
|
method: u.POST,
|
|
@@ -4627,7 +4641,7 @@ class XS extends v {
|
|
|
4627
4641
|
this.dispatch(Co(d));
|
|
4628
4642
|
}).catch(() => {
|
|
4629
4643
|
this.dispatch(Vs(o));
|
|
4630
|
-
}), [
|
|
4644
|
+
}), [r, l];
|
|
4631
4645
|
}
|
|
4632
4646
|
bulkDelete(e) {
|
|
4633
4647
|
const { store: s } = this.client, i = Bo(e)(s.getState());
|
|
@@ -4647,6 +4661,7 @@ class XS extends v {
|
|
|
4647
4661
|
async refreshStore(e) {
|
|
4648
4662
|
const i = (await this.performPagination(
|
|
4649
4663
|
{
|
|
4664
|
+
immediate: !0,
|
|
4650
4665
|
description: "Get asset stage completions",
|
|
4651
4666
|
method: u.GET,
|
|
4652
4667
|
url: "/asset-stage-completions/",
|
|
@@ -4659,6 +4674,7 @@ class XS extends v {
|
|
|
4659
4674
|
blocks: []
|
|
4660
4675
|
},
|
|
4661
4676
|
(a) => ({
|
|
4677
|
+
immediate: !0,
|
|
4662
4678
|
description: "Get asset stage completions",
|
|
4663
4679
|
method: u.GET,
|
|
4664
4680
|
url: a,
|
|
@@ -4678,7 +4694,7 @@ class e_ extends v {
|
|
|
4678
4694
|
submitted_at: a
|
|
4679
4695
|
});
|
|
4680
4696
|
this.dispatch($s(n));
|
|
4681
|
-
const
|
|
4697
|
+
const r = this.enqueueRequest({
|
|
4682
4698
|
description: "Create asset",
|
|
4683
4699
|
method: u.POST,
|
|
4684
4700
|
url: "/asset-stages/",
|
|
@@ -4686,11 +4702,11 @@ class e_ extends v {
|
|
|
4686
4702
|
blockers: [n.asset_procedure],
|
|
4687
4703
|
blocks: [n.uuid]
|
|
4688
4704
|
});
|
|
4689
|
-
return
|
|
4705
|
+
return r.then((l) => {
|
|
4690
4706
|
this.dispatch(ft(l));
|
|
4691
4707
|
}).catch(() => {
|
|
4692
4708
|
this.dispatch(Gs(n.uuid));
|
|
4693
|
-
}), [n,
|
|
4709
|
+
}), [n, r];
|
|
4694
4710
|
}
|
|
4695
4711
|
update(e) {
|
|
4696
4712
|
const { store: s } = this.client, i = Bs(e.uuid)(s.getState());
|
|
@@ -4708,8 +4724,8 @@ class e_ extends v {
|
|
|
4708
4724
|
blockers: [i.uuid],
|
|
4709
4725
|
blocks: [i.uuid]
|
|
4710
4726
|
});
|
|
4711
|
-
return n.then((
|
|
4712
|
-
this.dispatch(ft(
|
|
4727
|
+
return n.then((r) => {
|
|
4728
|
+
this.dispatch(ft(r));
|
|
4713
4729
|
}).catch(() => {
|
|
4714
4730
|
this.dispatch(No(i));
|
|
4715
4731
|
}), [a, n];
|
|
@@ -4794,9 +4810,9 @@ class t_ extends xe {
|
|
|
4794
4810
|
class s_ extends U {
|
|
4795
4811
|
async bulkAdd(e) {
|
|
4796
4812
|
var l;
|
|
4797
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
4798
|
-
for (const
|
|
4799
|
-
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } =
|
|
4813
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
4814
|
+
for (const c of e) {
|
|
4815
|
+
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
4800
4816
|
f.sha1 in a || (a[f.sha1] = f);
|
|
4801
4817
|
const g = F({
|
|
4802
4818
|
file: URL.createObjectURL(p),
|
|
@@ -4817,7 +4833,7 @@ class s_ extends U {
|
|
|
4817
4833
|
file_sha1: f.sha1,
|
|
4818
4834
|
fields_revision: d
|
|
4819
4835
|
};
|
|
4820
|
-
|
|
4836
|
+
r.push(S);
|
|
4821
4837
|
}
|
|
4822
4838
|
this.dispatch(ad(n));
|
|
4823
4839
|
const o = this.enqueueRequest({
|
|
@@ -4826,21 +4842,21 @@ class s_ extends U {
|
|
|
4826
4842
|
url: "/asset-type-fields-attachments/bulk/",
|
|
4827
4843
|
payload: {
|
|
4828
4844
|
submitted_at: s,
|
|
4829
|
-
attachments:
|
|
4845
|
+
attachments: r,
|
|
4830
4846
|
files: Object.values(a)
|
|
4831
4847
|
},
|
|
4832
|
-
blockers: n.map((
|
|
4833
|
-
blocks: n.map((
|
|
4848
|
+
blockers: n.map((c) => c.fields_revision),
|
|
4849
|
+
blocks: n.map((c) => c.uuid)
|
|
4834
4850
|
});
|
|
4835
|
-
return o.then((
|
|
4836
|
-
this.processPresignedUrls(
|
|
4851
|
+
return o.then((c) => {
|
|
4852
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(nd(c.attachments));
|
|
4837
4853
|
}).catch(() => {
|
|
4838
4854
|
this.dispatch(
|
|
4839
|
-
|
|
4840
|
-
n.map((
|
|
4855
|
+
rd(
|
|
4856
|
+
n.map((c) => c.uuid)
|
|
4841
4857
|
)
|
|
4842
4858
|
);
|
|
4843
|
-
}), [n, o.then(({ attachments:
|
|
4859
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
4844
4860
|
}
|
|
4845
4861
|
async refreshStore(e) {
|
|
4846
4862
|
const s = await this.enqueueRequest({
|
|
@@ -4865,7 +4881,7 @@ class i_ extends v {
|
|
|
4865
4881
|
submitted_at: a
|
|
4866
4882
|
});
|
|
4867
4883
|
this.dispatch(ld(n));
|
|
4868
|
-
const
|
|
4884
|
+
const r = this.enqueueRequest({
|
|
4869
4885
|
description: "Add Asset Type Fields",
|
|
4870
4886
|
method: u.POST,
|
|
4871
4887
|
url: "/asset-type-fields/",
|
|
@@ -4873,11 +4889,11 @@ class i_ extends v {
|
|
|
4873
4889
|
blockers: [n.asset_type],
|
|
4874
4890
|
blocks: [n.uuid]
|
|
4875
4891
|
});
|
|
4876
|
-
return
|
|
4892
|
+
return r.then((l) => {
|
|
4877
4893
|
this.dispatch(hd(l));
|
|
4878
4894
|
}).catch((l) => {
|
|
4879
4895
|
throw this.dispatch(pd(n.uuid)), l;
|
|
4880
|
-
}), [n,
|
|
4896
|
+
}), [n, r];
|
|
4881
4897
|
}
|
|
4882
4898
|
async refreshStore(e) {
|
|
4883
4899
|
const s = await this.enqueueRequest({
|
|
@@ -4895,8 +4911,8 @@ class i_ extends v {
|
|
|
4895
4911
|
}
|
|
4896
4912
|
class a_ extends U {
|
|
4897
4913
|
async bulkAdd(e, s) {
|
|
4898
|
-
var
|
|
4899
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (
|
|
4914
|
+
var c;
|
|
4915
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id, n = Ce(e, s ?? e.length), r = [], o = [];
|
|
4900
4916
|
for (const d of n) {
|
|
4901
4917
|
const h = {}, p = [];
|
|
4902
4918
|
for (const f of d) {
|
|
@@ -4912,7 +4928,7 @@ class a_ extends U {
|
|
|
4912
4928
|
submitted_at: i,
|
|
4913
4929
|
field_identifier: S
|
|
4914
4930
|
});
|
|
4915
|
-
|
|
4931
|
+
r.push(q);
|
|
4916
4932
|
const $e = {
|
|
4917
4933
|
uuid: q.uuid,
|
|
4918
4934
|
file_name: T.name,
|
|
@@ -4929,7 +4945,7 @@ class a_ extends U {
|
|
|
4929
4945
|
files: Object.values(h)
|
|
4930
4946
|
});
|
|
4931
4947
|
}
|
|
4932
|
-
this.dispatch(wt(
|
|
4948
|
+
this.dispatch(wt(r));
|
|
4933
4949
|
const l = o.map((d) => this.enqueueRequest({
|
|
4934
4950
|
description: "Add asset type field values attachments",
|
|
4935
4951
|
method: u.POST,
|
|
@@ -4945,11 +4961,11 @@ class a_ extends U {
|
|
|
4945
4961
|
}).catch((d) => {
|
|
4946
4962
|
throw this.dispatch(
|
|
4947
4963
|
kt(
|
|
4948
|
-
|
|
4964
|
+
r.map((h) => h.uuid)
|
|
4949
4965
|
)
|
|
4950
4966
|
), d;
|
|
4951
4967
|
}), [
|
|
4952
|
-
|
|
4968
|
+
r,
|
|
4953
4969
|
l.map((d) => d.then(({ attachments: h }) => h))
|
|
4954
4970
|
];
|
|
4955
4971
|
}
|
|
@@ -4972,6 +4988,7 @@ class a_ extends U {
|
|
|
4972
4988
|
async refreshStore(e) {
|
|
4973
4989
|
const i = (await this.performPagination(
|
|
4974
4990
|
{
|
|
4991
|
+
immediate: !0,
|
|
4975
4992
|
description: "Get asset type field values attachments",
|
|
4976
4993
|
method: u.GET,
|
|
4977
4994
|
url: "/asset-type-field-values-attachments/",
|
|
@@ -4984,6 +5001,7 @@ class a_ extends U {
|
|
|
4984
5001
|
blocks: []
|
|
4985
5002
|
},
|
|
4986
5003
|
(a) => ({
|
|
5004
|
+
immediate: !0,
|
|
4987
5005
|
description: "Get asset type field values attachments",
|
|
4988
5006
|
method: u.GET,
|
|
4989
5007
|
url: a,
|
|
@@ -4996,10 +5014,10 @@ class a_ extends U {
|
|
|
4996
5014
|
}
|
|
4997
5015
|
class n_ extends v {
|
|
4998
5016
|
add(e) {
|
|
4999
|
-
var
|
|
5017
|
+
var r;
|
|
5000
5018
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
5001
5019
|
...e,
|
|
5002
|
-
created_by: (
|
|
5020
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
5003
5021
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5004
5022
|
}), n = this.enqueueRequest({
|
|
5005
5023
|
description: "Add asset type field values",
|
|
@@ -5015,10 +5033,10 @@ class n_ extends v {
|
|
|
5015
5033
|
}
|
|
5016
5034
|
bulkAdd(e, s) {
|
|
5017
5035
|
var l;
|
|
5018
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length),
|
|
5019
|
-
for (const
|
|
5036
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), a = [], n = Ce(e.payloads, s ?? e.payloads.length), r = [];
|
|
5037
|
+
for (const c of n) {
|
|
5020
5038
|
const d = [];
|
|
5021
|
-
for (const h of
|
|
5039
|
+
for (const h of c) {
|
|
5022
5040
|
const p = F({
|
|
5023
5041
|
...h,
|
|
5024
5042
|
values: h.values,
|
|
@@ -5033,7 +5051,7 @@ class n_ extends v {
|
|
|
5033
5051
|
values: p.values
|
|
5034
5052
|
});
|
|
5035
5053
|
}
|
|
5036
|
-
|
|
5054
|
+
r.push({
|
|
5037
5055
|
submitted_at: i,
|
|
5038
5056
|
values: e.values,
|
|
5039
5057
|
field_values: d
|
|
@@ -5041,21 +5059,21 @@ class n_ extends v {
|
|
|
5041
5059
|
}
|
|
5042
5060
|
this.dispatch(Td(a));
|
|
5043
5061
|
const o = [];
|
|
5044
|
-
for (const
|
|
5045
|
-
const d =
|
|
5062
|
+
for (const c of r) {
|
|
5063
|
+
const d = c.field_values.map((g) => g.asset), h = c.field_values.map((g) => g.fields_revision), p = c.field_values.map((g) => g.uuid), f = this.enqueueRequest({
|
|
5046
5064
|
description: "Bulk add asset type field values",
|
|
5047
5065
|
method: u.POST,
|
|
5048
5066
|
url: "/asset-type-field-values/bulk/",
|
|
5049
|
-
payload:
|
|
5067
|
+
payload: c,
|
|
5050
5068
|
blockers: [...d, ...h],
|
|
5051
5069
|
blocks: p
|
|
5052
5070
|
});
|
|
5053
5071
|
o.push(f);
|
|
5054
5072
|
}
|
|
5055
|
-
return Promise.all(o).then((
|
|
5056
|
-
this.dispatch(Fd(
|
|
5073
|
+
return Promise.all(o).then((c) => {
|
|
5074
|
+
this.dispatch(Fd(c.flat()));
|
|
5057
5075
|
}).catch(() => {
|
|
5058
|
-
this.dispatch(Od(a.map((
|
|
5076
|
+
this.dispatch(Od(a.map((c) => c.uuid)));
|
|
5059
5077
|
}), [a, o];
|
|
5060
5078
|
}
|
|
5061
5079
|
update(e) {
|
|
@@ -5067,7 +5085,7 @@ class n_ extends v {
|
|
|
5067
5085
|
...e
|
|
5068
5086
|
};
|
|
5069
5087
|
this.dispatch(it(n));
|
|
5070
|
-
const
|
|
5088
|
+
const r = this.enqueueRequest({
|
|
5071
5089
|
description: "Delete asset type field values",
|
|
5072
5090
|
method: u.PATCH,
|
|
5073
5091
|
url: `/asset-type-field-values/${e.uuid}/`,
|
|
@@ -5079,18 +5097,18 @@ class n_ extends v {
|
|
|
5079
5097
|
],
|
|
5080
5098
|
blocks: [n.uuid]
|
|
5081
5099
|
});
|
|
5082
|
-
return
|
|
5100
|
+
return r.then((o) => {
|
|
5083
5101
|
this.dispatch(it(o));
|
|
5084
5102
|
}).catch(() => {
|
|
5085
5103
|
this.dispatch(it(a));
|
|
5086
|
-
}), [n,
|
|
5104
|
+
}), [n, r];
|
|
5087
5105
|
}
|
|
5088
5106
|
async delete(e) {
|
|
5089
5107
|
const { store: s } = this.client, i = s.getState(), a = Zs(e)(i);
|
|
5090
5108
|
if (!a)
|
|
5091
5109
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
5092
5110
|
const n = Sd(e)(i);
|
|
5093
|
-
this.dispatch(Js(e)), this.dispatch(kt(n.map((
|
|
5111
|
+
this.dispatch(Js(e)), this.dispatch(kt(n.map((r) => r.uuid)));
|
|
5094
5112
|
try {
|
|
5095
5113
|
await this.enqueueRequest({
|
|
5096
5114
|
description: "Delete asset type field values",
|
|
@@ -5099,13 +5117,14 @@ class n_ extends v {
|
|
|
5099
5117
|
blockers: [e],
|
|
5100
5118
|
blocks: []
|
|
5101
5119
|
});
|
|
5102
|
-
} catch (
|
|
5103
|
-
throw this.dispatch(Ys(a)), this.dispatch(wt(n)),
|
|
5120
|
+
} catch (r) {
|
|
5121
|
+
throw this.dispatch(Ys(a)), this.dispatch(wt(n)), r;
|
|
5104
5122
|
}
|
|
5105
5123
|
}
|
|
5106
5124
|
async refreshStore(e) {
|
|
5107
5125
|
const i = (await this.performPagination(
|
|
5108
5126
|
{
|
|
5127
|
+
immediate: !0,
|
|
5109
5128
|
description: "Get asset type field values",
|
|
5110
5129
|
method: u.GET,
|
|
5111
5130
|
url: "/asset-type-field-values/",
|
|
@@ -5118,6 +5137,7 @@ class n_ extends v {
|
|
|
5118
5137
|
blocks: []
|
|
5119
5138
|
},
|
|
5120
5139
|
(a) => ({
|
|
5140
|
+
immediate: !0,
|
|
5121
5141
|
description: "Get asset type field values",
|
|
5122
5142
|
method: u.GET,
|
|
5123
5143
|
url: a,
|
|
@@ -5128,7 +5148,7 @@ class n_ extends v {
|
|
|
5128
5148
|
return this.dispatch(Pd(i)), i;
|
|
5129
5149
|
}
|
|
5130
5150
|
}
|
|
5131
|
-
class
|
|
5151
|
+
class r_ extends v {
|
|
5132
5152
|
add(e) {
|
|
5133
5153
|
var o;
|
|
5134
5154
|
const { store: s } = this.client, i = (o = s.getState().userReducer.currentUser) == null ? void 0 : o.id, a = (/* @__PURE__ */ new Date()).toISOString(), n = F({
|
|
@@ -5137,7 +5157,7 @@ class c_ extends v {
|
|
|
5137
5157
|
submitted_at: a
|
|
5138
5158
|
});
|
|
5139
5159
|
this.dispatch(Xs(n));
|
|
5140
|
-
const
|
|
5160
|
+
const r = this.enqueueRequest({
|
|
5141
5161
|
description: "Create asset type",
|
|
5142
5162
|
method: u.POST,
|
|
5143
5163
|
url: "/asset-types/",
|
|
@@ -5145,11 +5165,11 @@ class c_ extends v {
|
|
|
5145
5165
|
blockers: [],
|
|
5146
5166
|
blocks: [n.uuid]
|
|
5147
5167
|
});
|
|
5148
|
-
return
|
|
5168
|
+
return r.then((l) => {
|
|
5149
5169
|
this.dispatch(at(l));
|
|
5150
5170
|
}).catch(() => {
|
|
5151
5171
|
this.dispatch(ei(n.uuid));
|
|
5152
|
-
}), [n,
|
|
5172
|
+
}), [n, r];
|
|
5153
5173
|
}
|
|
5154
5174
|
update(e) {
|
|
5155
5175
|
const { store: s } = this.client, i = ti(e.uuid)(s.getState());
|
|
@@ -5173,8 +5193,8 @@ class c_ extends v {
|
|
|
5173
5193
|
blockers: [i.uuid],
|
|
5174
5194
|
blocks: [i.uuid]
|
|
5175
5195
|
});
|
|
5176
|
-
return n.then((
|
|
5177
|
-
this.dispatch(at(
|
|
5196
|
+
return n.then((r) => {
|
|
5197
|
+
this.dispatch(at(r));
|
|
5178
5198
|
}).catch(() => {
|
|
5179
5199
|
this.dispatch(at(i));
|
|
5180
5200
|
}), [a, n];
|
|
@@ -5183,15 +5203,15 @@ class c_ extends v {
|
|
|
5183
5203
|
const { store: s } = this.client, i = s.getState(), a = ti(e)(i);
|
|
5184
5204
|
if (!a)
|
|
5185
5205
|
throw new Error(`Expected asset type with uuid ${e} to exist`);
|
|
5186
|
-
const n = sn(e)(i),
|
|
5187
|
-
return this.dispatch(ei(e)), this.dispatch(en(n.map((o) => o.uuid))), this.dispatch(dn(
|
|
5206
|
+
const n = sn(e)(i), r = td(e)(i);
|
|
5207
|
+
return this.dispatch(ei(e)), this.dispatch(en(n.map((o) => o.uuid))), this.dispatch(dn(r.map(({ uuid: o }) => o))), this.enqueueRequest({
|
|
5188
5208
|
description: "Delete asset type",
|
|
5189
5209
|
method: u.DELETE,
|
|
5190
5210
|
url: `/asset-types/${e}/`,
|
|
5191
5211
|
blockers: [e],
|
|
5192
5212
|
blocks: []
|
|
5193
5213
|
}).catch((o) => {
|
|
5194
|
-
throw this.dispatch(Xs(a)), this.dispatch(vt(n)), this.dispatch(on(
|
|
5214
|
+
throw this.dispatch(Xs(a)), this.dispatch(vt(n)), this.dispatch(on(r)), o;
|
|
5195
5215
|
});
|
|
5196
5216
|
}
|
|
5197
5217
|
async refreshStore(e) {
|
|
@@ -5208,7 +5228,7 @@ class c_ extends v {
|
|
|
5208
5228
|
return this.dispatch(vd(s)), s;
|
|
5209
5229
|
}
|
|
5210
5230
|
}
|
|
5211
|
-
class
|
|
5231
|
+
class c_ extends v {
|
|
5212
5232
|
add(e) {
|
|
5213
5233
|
var o;
|
|
5214
5234
|
const { store: s } = this.client, i = (o = s.getState().userReducer.currentUser) == null ? void 0 : o.id, a = (/* @__PURE__ */ new Date()).toISOString(), n = F({
|
|
@@ -5217,7 +5237,7 @@ class r_ extends v {
|
|
|
5217
5237
|
submitted_at: a
|
|
5218
5238
|
});
|
|
5219
5239
|
this.dispatch(ai(n));
|
|
5220
|
-
const
|
|
5240
|
+
const r = this.enqueueRequest({
|
|
5221
5241
|
description: "Create Category",
|
|
5222
5242
|
method: u.POST,
|
|
5223
5243
|
url: "/categories/",
|
|
@@ -5225,7 +5245,7 @@ class r_ extends v {
|
|
|
5225
5245
|
blockers: [e.project],
|
|
5226
5246
|
blocks: [n.uuid]
|
|
5227
5247
|
});
|
|
5228
|
-
return [n,
|
|
5248
|
+
return [n, r];
|
|
5229
5249
|
}
|
|
5230
5250
|
update(e) {
|
|
5231
5251
|
const s = this.client.store.getState(), i = ni(e.uuid)(s);
|
|
@@ -5306,10 +5326,10 @@ class o_ extends xe {
|
|
|
5306
5326
|
// NOTE: overriding the method from BaseAttachmentService since document attachments get vectorized
|
|
5307
5327
|
async bulkAdd(s) {
|
|
5308
5328
|
var h;
|
|
5309
|
-
const { store: i } = this.client, a = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, n = (/* @__PURE__ */ new Date()).toISOString(),
|
|
5329
|
+
const { store: i } = this.client, a = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, n = (/* @__PURE__ */ new Date()).toISOString(), r = [], o = [], l = {}, c = {};
|
|
5310
5330
|
for (const p of s) {
|
|
5311
5331
|
const { documentUuid: f, file: g } = p, S = await this.getFilePayload(g);
|
|
5312
|
-
S.sha1 in l || (l[S.sha1] = S,
|
|
5332
|
+
S.sha1 in l || (l[S.sha1] = S, c[S.sha1] = []);
|
|
5313
5333
|
const T = this.buildOfflineAttachment({
|
|
5314
5334
|
file: g,
|
|
5315
5335
|
file_sha1: S.sha1,
|
|
@@ -5318,16 +5338,16 @@ class o_ extends xe {
|
|
|
5318
5338
|
description: "",
|
|
5319
5339
|
modelUuid: f
|
|
5320
5340
|
});
|
|
5321
|
-
|
|
5341
|
+
r.push(T), o.push({
|
|
5322
5342
|
uuid: T.uuid,
|
|
5323
5343
|
file_name: T.file_name,
|
|
5324
5344
|
file_sha1: T.file_sha1,
|
|
5325
5345
|
file_extension: S.extension,
|
|
5326
5346
|
description: T.description,
|
|
5327
5347
|
document: f
|
|
5328
|
-
}),
|
|
5348
|
+
}), c[S.sha1].push(T.uuid);
|
|
5329
5349
|
}
|
|
5330
|
-
this.dispatch(this.addAttachments(
|
|
5350
|
+
this.dispatch(this.addAttachments(r));
|
|
5331
5351
|
const d = this.enqueueRequest({
|
|
5332
5352
|
description: "Attach files to document",
|
|
5333
5353
|
method: u.POST,
|
|
@@ -5337,21 +5357,21 @@ class o_ extends xe {
|
|
|
5337
5357
|
attachments: o,
|
|
5338
5358
|
files: Object.values(l)
|
|
5339
5359
|
},
|
|
5340
|
-
blocks:
|
|
5341
|
-
blockers:
|
|
5360
|
+
blocks: r.map((p) => p.uuid),
|
|
5361
|
+
blockers: r.map((p) => p.file_sha1)
|
|
5342
5362
|
});
|
|
5343
5363
|
return d.then(({ attachments: p, presigned_urls: f }) => {
|
|
5344
5364
|
this.dispatch(this.updateAttachments(p));
|
|
5345
5365
|
const g = this.processPresignedUrls(f);
|
|
5346
5366
|
for (const [S, T] of Object.entries(g))
|
|
5347
5367
|
T.then(() => {
|
|
5348
|
-
const k =
|
|
5368
|
+
const k = c[S];
|
|
5349
5369
|
for (const q of k)
|
|
5350
5370
|
this.makeReadable(q);
|
|
5351
5371
|
});
|
|
5352
5372
|
}).catch(() => {
|
|
5353
|
-
this.dispatch(this.removeAttachments(
|
|
5354
|
-
}), [
|
|
5373
|
+
this.dispatch(this.removeAttachments(r.map((p) => p.uuid)));
|
|
5374
|
+
}), [r, d.then(({ attachments: p }) => p)];
|
|
5355
5375
|
}
|
|
5356
5376
|
async delete(s) {
|
|
5357
5377
|
return this._delete(s);
|
|
@@ -5401,7 +5421,7 @@ class d_ extends v {
|
|
|
5401
5421
|
submitted_at: a
|
|
5402
5422
|
});
|
|
5403
5423
|
this.dispatch(Yd([n]));
|
|
5404
|
-
const
|
|
5424
|
+
const r = this.enqueueRequest({
|
|
5405
5425
|
description: "Create Document",
|
|
5406
5426
|
method: u.POST,
|
|
5407
5427
|
url: "/documents/",
|
|
@@ -5413,9 +5433,9 @@ class d_ extends v {
|
|
|
5413
5433
|
blockers: n.parent_document ? [n.parent_document] : [],
|
|
5414
5434
|
blocks: [n.uuid]
|
|
5415
5435
|
});
|
|
5416
|
-
return
|
|
5436
|
+
return r.catch(() => {
|
|
5417
5437
|
this.dispatch(oi([n.uuid]));
|
|
5418
|
-
}), [n,
|
|
5438
|
+
}), [n, r];
|
|
5419
5439
|
}
|
|
5420
5440
|
update(e) {
|
|
5421
5441
|
const { store: s } = this.client, i = s.getState().documentsReducer.documents[e.uuid];
|
|
@@ -5446,18 +5466,18 @@ class d_ extends v {
|
|
|
5446
5466
|
throw new Error(`attempting to delete a document with uuid ${e} that does not exist in store.documents`);
|
|
5447
5467
|
const n = a.parent_document ? i[a.parent_document] : void 0;
|
|
5448
5468
|
this.dispatch(oi([e]));
|
|
5449
|
-
const
|
|
5469
|
+
const r = this.enqueueRequest({
|
|
5450
5470
|
description: "Delete Document",
|
|
5451
5471
|
method: u.DELETE,
|
|
5452
5472
|
url: `/documents/${e}/`,
|
|
5453
5473
|
blockers: [e],
|
|
5454
5474
|
blocks: []
|
|
5455
5475
|
});
|
|
5456
|
-
return
|
|
5476
|
+
return r.then((o) => {
|
|
5457
5477
|
this.dispatch(He(o));
|
|
5458
5478
|
}).catch(() => {
|
|
5459
5479
|
this.dispatch(He([a])), n && this.dispatch(He([n]));
|
|
5460
|
-
}),
|
|
5480
|
+
}), r;
|
|
5461
5481
|
}
|
|
5462
5482
|
async refreshStore(e) {
|
|
5463
5483
|
const s = this.enqueueRequest({
|
|
@@ -5550,7 +5570,7 @@ class h_ extends v {
|
|
|
5550
5570
|
A(this, "host");
|
|
5551
5571
|
// NOTE: If you alter the schema (of the IndexedDB database) in any way, you must increment the version in order to
|
|
5552
5572
|
// migrate the store. This allows idb to automatically migrate the user's existing data to the new schema.
|
|
5553
|
-
A(this, "_dbPromise", $
|
|
5573
|
+
A(this, "_dbPromise", $r("fileCache", 1, {
|
|
5554
5574
|
upgrade(s) {
|
|
5555
5575
|
s.createObjectStore("files");
|
|
5556
5576
|
}
|
|
@@ -5584,7 +5604,7 @@ class h_ extends v {
|
|
|
5584
5604
|
if (St.has(i))
|
|
5585
5605
|
return;
|
|
5586
5606
|
if (!s.type) {
|
|
5587
|
-
const
|
|
5607
|
+
const r = s.name.split("."), o = r[r.length - 1];
|
|
5588
5608
|
s = new File([s], s.name, { type: o });
|
|
5589
5609
|
}
|
|
5590
5610
|
if (!s.name || !s.size || !s.type)
|
|
@@ -5602,7 +5622,7 @@ class h_ extends v {
|
|
|
5602
5622
|
}
|
|
5603
5623
|
async getOrRenewUploadUrl(s) {
|
|
5604
5624
|
const i = this.client.store.getState();
|
|
5605
|
-
return
|
|
5625
|
+
return ru(s)(i) ?? await this.renewUploadUrl(s);
|
|
5606
5626
|
}
|
|
5607
5627
|
/** Ensure the file has been added to the file cache before calling `uploadFileToS3()` */
|
|
5608
5628
|
async uploadFileToS3(s) {
|
|
@@ -5612,13 +5632,13 @@ class h_ extends v {
|
|
|
5612
5632
|
file_name: i.name,
|
|
5613
5633
|
file_sha1: s,
|
|
5614
5634
|
file: a
|
|
5615
|
-
},
|
|
5616
|
-
if ("warning" in
|
|
5617
|
-
if (
|
|
5635
|
+
}, r = await this.getOrRenewUploadUrl(s);
|
|
5636
|
+
if ("warning" in r) {
|
|
5637
|
+
if (r.warning === "already_uploaded")
|
|
5618
5638
|
return [n, Promise.resolve(void 0).then()];
|
|
5619
|
-
throw new Error(
|
|
5639
|
+
throw new Error(r.warning);
|
|
5620
5640
|
}
|
|
5621
|
-
const o =
|
|
5641
|
+
const o = r.url, l = this.enqueueRequest({
|
|
5622
5642
|
url: o,
|
|
5623
5643
|
description: "Upload file",
|
|
5624
5644
|
method: u.POST,
|
|
@@ -5627,7 +5647,7 @@ class h_ extends v {
|
|
|
5627
5647
|
attachmentHash: s,
|
|
5628
5648
|
blockers: [`s3-${a}`],
|
|
5629
5649
|
blocks: [s],
|
|
5630
|
-
s3url:
|
|
5650
|
+
s3url: r
|
|
5631
5651
|
});
|
|
5632
5652
|
return [n, l];
|
|
5633
5653
|
}
|
|
@@ -5642,14 +5662,14 @@ class h_ extends v {
|
|
|
5642
5662
|
* example.
|
|
5643
5663
|
*/
|
|
5644
5664
|
async fetchFileFromUrl(s, i, a) {
|
|
5645
|
-
const n = s.split("?")[0] ?? s,
|
|
5646
|
-
if (
|
|
5647
|
-
if (!
|
|
5665
|
+
const n = s.split("?")[0] ?? s, r = await this.fetchCache(i);
|
|
5666
|
+
if (r) {
|
|
5667
|
+
if (!r.name)
|
|
5648
5668
|
throw new Error("Cached file unexpectedly has no name.");
|
|
5649
|
-
return
|
|
5669
|
+
return r;
|
|
5650
5670
|
}
|
|
5651
5671
|
if (s.startsWith("blob:")) {
|
|
5652
|
-
const d = await
|
|
5672
|
+
const d = await sc(s), h = new File([d], a ?? i, { type: d.type });
|
|
5653
5673
|
return await this.addCache(h, i), h;
|
|
5654
5674
|
}
|
|
5655
5675
|
let o = ut[n], l = !0;
|
|
@@ -5670,14 +5690,14 @@ class h_ extends v {
|
|
|
5670
5690
|
d(p);
|
|
5671
5691
|
});
|
|
5672
5692
|
}), ut[n] = o);
|
|
5673
|
-
let
|
|
5693
|
+
let c;
|
|
5674
5694
|
try {
|
|
5675
|
-
|
|
5695
|
+
c = await o;
|
|
5676
5696
|
} catch (d) {
|
|
5677
5697
|
throw l && d instanceof x && delete ut[n], d;
|
|
5678
5698
|
}
|
|
5679
5699
|
if (l) {
|
|
5680
|
-
const d = await Ke(
|
|
5700
|
+
const d = await Ke(c);
|
|
5681
5701
|
if (d !== i) {
|
|
5682
5702
|
const f = `The hash of the file returned from the server (${d}) does not match the
|
|
5683
5703
|
expected hash (${i}). This can happen if you're using a local development server and the
|
|
@@ -5688,25 +5708,25 @@ class h_ extends v {
|
|
|
5688
5708
|
external URLs and therefore not prepended with VITE_API_URL.`;
|
|
5689
5709
|
throw new Error(f);
|
|
5690
5710
|
}
|
|
5691
|
-
const h =
|
|
5711
|
+
const h = c.type.split("/")[1];
|
|
5692
5712
|
if (!h)
|
|
5693
5713
|
throw new Error("File has no extension");
|
|
5694
5714
|
const p = a ?? d + "." + h;
|
|
5695
|
-
if (
|
|
5715
|
+
if (c = tc(c, p), !c.name)
|
|
5696
5716
|
throw new Error("Failed to set file's name");
|
|
5697
|
-
await this.addCache(
|
|
5698
|
-
f(
|
|
5717
|
+
await this.addCache(c, d), ut[n] = new Promise((f) => {
|
|
5718
|
+
f(c);
|
|
5699
5719
|
});
|
|
5700
5720
|
}
|
|
5701
|
-
return
|
|
5721
|
+
return c;
|
|
5702
5722
|
}
|
|
5703
5723
|
}
|
|
5704
5724
|
class p_ extends U {
|
|
5705
5725
|
async bulkAdd(e) {
|
|
5706
5726
|
var l;
|
|
5707
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
5708
|
-
for (const
|
|
5709
|
-
const { revisionUuid: d, fieldIdentifier: h, file: p } =
|
|
5727
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
5728
|
+
for (const c of e) {
|
|
5729
|
+
const { revisionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
5710
5730
|
f.sha1 in a || (a[f.sha1] = f);
|
|
5711
5731
|
const g = F({
|
|
5712
5732
|
file: URL.createObjectURL(p),
|
|
@@ -5727,7 +5747,7 @@ class p_ extends U {
|
|
|
5727
5747
|
file_sha1: f.sha1,
|
|
5728
5748
|
form_revision: d
|
|
5729
5749
|
};
|
|
5730
|
-
|
|
5750
|
+
r.push(S);
|
|
5731
5751
|
}
|
|
5732
5752
|
this.dispatch(du(n));
|
|
5733
5753
|
const o = this.enqueueRequest({
|
|
@@ -5736,19 +5756,19 @@ class p_ extends U {
|
|
|
5736
5756
|
url: "/form-revision-attachments/bulk/",
|
|
5737
5757
|
payload: {
|
|
5738
5758
|
submitted_at: s,
|
|
5739
|
-
attachments:
|
|
5759
|
+
attachments: r,
|
|
5740
5760
|
files: Object.values(a)
|
|
5741
5761
|
},
|
|
5742
|
-
blockers: n.map((
|
|
5743
|
-
blocks: n.map((
|
|
5762
|
+
blockers: n.map((c) => c.form_revision),
|
|
5763
|
+
blocks: n.map((c) => c.uuid)
|
|
5744
5764
|
});
|
|
5745
|
-
return o.then((
|
|
5746
|
-
this.processPresignedUrls(
|
|
5765
|
+
return o.then((c) => {
|
|
5766
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(uu(c.attachments));
|
|
5747
5767
|
}).catch(() => {
|
|
5748
5768
|
this.dispatch(
|
|
5749
|
-
lu(n.map((
|
|
5769
|
+
lu(n.map((c) => c.uuid))
|
|
5750
5770
|
);
|
|
5751
|
-
}), [n, o.then(({ attachments:
|
|
5771
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
5752
5772
|
}
|
|
5753
5773
|
async refreshStore(e) {
|
|
5754
5774
|
const s = await this.enqueueRequest({
|
|
@@ -5773,7 +5793,7 @@ class m_ extends U {
|
|
|
5773
5793
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5774
5794
|
});
|
|
5775
5795
|
this.dispatch(vn(n));
|
|
5776
|
-
const
|
|
5796
|
+
const r = this.enqueueRequest({
|
|
5777
5797
|
description: "Create form revision",
|
|
5778
5798
|
method: u.POST,
|
|
5779
5799
|
url: "/form-revisions/",
|
|
@@ -5781,11 +5801,11 @@ class m_ extends U {
|
|
|
5781
5801
|
blockers: [e.form],
|
|
5782
5802
|
blocks: [n.uuid]
|
|
5783
5803
|
});
|
|
5784
|
-
return
|
|
5804
|
+
return r.then((l) => {
|
|
5785
5805
|
this.dispatch(yu(l));
|
|
5786
5806
|
}).catch(() => {
|
|
5787
5807
|
this.dispatch(wn(n.uuid));
|
|
5788
|
-
}), [n,
|
|
5808
|
+
}), [n, r];
|
|
5789
5809
|
}
|
|
5790
5810
|
async refreshStore(e) {
|
|
5791
5811
|
const s = await this.enqueueRequest({
|
|
@@ -5803,24 +5823,24 @@ class m_ extends U {
|
|
|
5803
5823
|
}
|
|
5804
5824
|
class f_ extends U {
|
|
5805
5825
|
add(e, s) {
|
|
5806
|
-
var
|
|
5807
|
-
const { store: i } = this.client, a = (/* @__PURE__ */ new Date()).toISOString(), n = (
|
|
5826
|
+
var c;
|
|
5827
|
+
const { store: i } = this.client, a = (/* @__PURE__ */ new Date()).toISOString(), n = (c = i.getState().userReducer.currentUser) == null ? void 0 : c.id, r = F({
|
|
5808
5828
|
...e,
|
|
5809
5829
|
submitted_at: a,
|
|
5810
5830
|
created_by: n
|
|
5811
5831
|
}), o = F({
|
|
5812
5832
|
...s,
|
|
5813
|
-
form:
|
|
5833
|
+
form: r.uuid,
|
|
5814
5834
|
submitted_at: a,
|
|
5815
5835
|
created_by: n
|
|
5816
5836
|
});
|
|
5817
|
-
this.dispatch(mi(
|
|
5837
|
+
this.dispatch(mi(r)), this.dispatch(vn(o));
|
|
5818
5838
|
const l = this.enqueueRequest({
|
|
5819
5839
|
description: "Create form",
|
|
5820
5840
|
method: u.POST,
|
|
5821
5841
|
url: "/forms/",
|
|
5822
5842
|
payload: {
|
|
5823
|
-
...w(
|
|
5843
|
+
...w(r),
|
|
5824
5844
|
initial_revision: {
|
|
5825
5845
|
uuid: o.uuid,
|
|
5826
5846
|
submitted_at: o.submitted_at,
|
|
@@ -5830,11 +5850,11 @@ class f_ extends U {
|
|
|
5830
5850
|
}
|
|
5831
5851
|
},
|
|
5832
5852
|
blockers: [],
|
|
5833
|
-
blocks: [
|
|
5853
|
+
blocks: [r.uuid, o.uuid]
|
|
5834
5854
|
});
|
|
5835
5855
|
return l.catch((d) => {
|
|
5836
|
-
throw this.dispatch(fi(
|
|
5837
|
-
}), [
|
|
5856
|
+
throw this.dispatch(fi(r.uuid)), this.dispatch(wn(o.uuid)), d;
|
|
5857
|
+
}), [r, o, l];
|
|
5838
5858
|
}
|
|
5839
5859
|
async delete(e) {
|
|
5840
5860
|
const { store: s } = this.client, i = s.getState(), a = Iu(e)(i);
|
|
@@ -5842,8 +5862,8 @@ class f_ extends U {
|
|
|
5842
5862
|
throw new Error("Expected form to exist");
|
|
5843
5863
|
const n = ju(e)(i);
|
|
5844
5864
|
n.length > 0 && this.dispatch(Ht(n.map(({ uuid: o }) => o)));
|
|
5845
|
-
const
|
|
5846
|
-
|
|
5865
|
+
const r = Su(e)(i);
|
|
5866
|
+
r.length > 0 && this.dispatch(bu(r.map(({ uuid: o }) => o))), this.dispatch(fi(e));
|
|
5847
5867
|
try {
|
|
5848
5868
|
return await this.enqueueRequest({
|
|
5849
5869
|
description: "Delete form",
|
|
@@ -5853,7 +5873,7 @@ class f_ extends U {
|
|
|
5853
5873
|
blocks: []
|
|
5854
5874
|
});
|
|
5855
5875
|
} catch (o) {
|
|
5856
|
-
throw this.dispatch(mi(a)),
|
|
5876
|
+
throw this.dispatch(mi(a)), r.length > 0 && this.dispatch(Au(r)), n.length > 0 && this.dispatch(Nt(n)), o;
|
|
5857
5877
|
}
|
|
5858
5878
|
}
|
|
5859
5879
|
async refreshStore(e) {
|
|
@@ -5873,9 +5893,9 @@ class f_ extends U {
|
|
|
5873
5893
|
class A_ extends U {
|
|
5874
5894
|
async bulkAdd(e) {
|
|
5875
5895
|
var l;
|
|
5876
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
5877
|
-
for (const
|
|
5878
|
-
const { submissionUuid: d, fieldIdentifier: h, file: p } =
|
|
5896
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
5897
|
+
for (const c of e) {
|
|
5898
|
+
const { submissionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
5879
5899
|
f.sha1 in a || (a[f.sha1] = f);
|
|
5880
5900
|
const g = F({
|
|
5881
5901
|
file: URL.createObjectURL(p),
|
|
@@ -5896,7 +5916,7 @@ class A_ extends U {
|
|
|
5896
5916
|
field_identifier: h,
|
|
5897
5917
|
form_submission: d
|
|
5898
5918
|
};
|
|
5899
|
-
|
|
5919
|
+
r.push(S);
|
|
5900
5920
|
}
|
|
5901
5921
|
this.dispatch(Et(n));
|
|
5902
5922
|
const o = this.enqueueRequest({
|
|
@@ -5905,21 +5925,21 @@ class A_ extends U {
|
|
|
5905
5925
|
url: "/form-submission-attachments/bulk/",
|
|
5906
5926
|
payload: {
|
|
5907
5927
|
submitted_at: s,
|
|
5908
|
-
attachments:
|
|
5928
|
+
attachments: r,
|
|
5909
5929
|
files: Object.values(a)
|
|
5910
5930
|
},
|
|
5911
|
-
blockers: n.map((
|
|
5912
|
-
blocks: n.map((
|
|
5931
|
+
blockers: n.map((c) => c.form_submission),
|
|
5932
|
+
blocks: n.map((c) => c.uuid)
|
|
5913
5933
|
});
|
|
5914
|
-
return o.then((
|
|
5915
|
-
this.processPresignedUrls(
|
|
5916
|
-
}).catch((
|
|
5934
|
+
return o.then((c) => {
|
|
5935
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(vu(c.attachments));
|
|
5936
|
+
}).catch((c) => {
|
|
5917
5937
|
throw this.dispatch(
|
|
5918
5938
|
Mt(
|
|
5919
5939
|
n.map((d) => d.uuid)
|
|
5920
5940
|
)
|
|
5921
|
-
),
|
|
5922
|
-
}), [n, o.then(({ attachments:
|
|
5941
|
+
), c;
|
|
5942
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
5923
5943
|
}
|
|
5924
5944
|
async bulkDelete(e) {
|
|
5925
5945
|
const { store: s } = this.client, i = s.getState(), a = wu(e)(i);
|
|
@@ -5940,6 +5960,7 @@ class A_ extends U {
|
|
|
5940
5960
|
async refreshStore(e) {
|
|
5941
5961
|
const i = (await this.performPagination(
|
|
5942
5962
|
{
|
|
5963
|
+
immediate: !0,
|
|
5943
5964
|
description: "Get form submission attachments",
|
|
5944
5965
|
method: u.GET,
|
|
5945
5966
|
url: "/form-submission-attachments/",
|
|
@@ -5952,6 +5973,7 @@ class A_ extends U {
|
|
|
5952
5973
|
blocks: []
|
|
5953
5974
|
},
|
|
5954
5975
|
(a) => ({
|
|
5976
|
+
immediate: !0,
|
|
5955
5977
|
description: "Get form submission attachments",
|
|
5956
5978
|
method: u.GET,
|
|
5957
5979
|
url: a,
|
|
@@ -5964,10 +5986,10 @@ class A_ extends U {
|
|
|
5964
5986
|
}
|
|
5965
5987
|
class y_ extends U {
|
|
5966
5988
|
add(e) {
|
|
5967
|
-
var
|
|
5989
|
+
var r;
|
|
5968
5990
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
5969
5991
|
...e,
|
|
5970
|
-
created_by: (
|
|
5992
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
5971
5993
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5972
5994
|
}), n = this.enqueueRequest({
|
|
5973
5995
|
description: "Add form submission",
|
|
@@ -5994,7 +6016,7 @@ class y_ extends U {
|
|
|
5994
6016
|
...e
|
|
5995
6017
|
};
|
|
5996
6018
|
this.dispatch(qu(n));
|
|
5997
|
-
const
|
|
6019
|
+
const r = this.enqueueRequest({
|
|
5998
6020
|
description: "Delete user form submissions",
|
|
5999
6021
|
method: u.PATCH,
|
|
6000
6022
|
url: `/form-submissions/${n.uuid}/`,
|
|
@@ -6002,18 +6024,18 @@ class y_ extends U {
|
|
|
6002
6024
|
blockers: [n.uuid],
|
|
6003
6025
|
blocks: [n.uuid]
|
|
6004
6026
|
});
|
|
6005
|
-
return
|
|
6027
|
+
return r.then((o) => {
|
|
6006
6028
|
this.dispatch(At(o));
|
|
6007
6029
|
}).catch(() => {
|
|
6008
6030
|
this.dispatch(At(a));
|
|
6009
|
-
}), [n,
|
|
6031
|
+
}), [n, r];
|
|
6010
6032
|
}
|
|
6011
6033
|
async delete(e) {
|
|
6012
6034
|
const { store: s } = this.client, i = s.getState(), a = Si(e)(i);
|
|
6013
6035
|
if (!a)
|
|
6014
6036
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
6015
6037
|
const n = ku(e)(i);
|
|
6016
|
-
this.dispatch(gi(e)), this.dispatch(Mt(n.map((
|
|
6038
|
+
this.dispatch(gi(e)), this.dispatch(Mt(n.map((r) => r.uuid)));
|
|
6017
6039
|
try {
|
|
6018
6040
|
return await this.enqueueRequest({
|
|
6019
6041
|
description: "Delete user form submissions",
|
|
@@ -6022,13 +6044,14 @@ class y_ extends U {
|
|
|
6022
6044
|
blockers: [e],
|
|
6023
6045
|
blocks: []
|
|
6024
6046
|
});
|
|
6025
|
-
} catch (
|
|
6026
|
-
throw this.dispatch(bi(a)), this.dispatch(Et(n)),
|
|
6047
|
+
} catch (r) {
|
|
6048
|
+
throw this.dispatch(bi(a)), this.dispatch(Et(n)), r;
|
|
6027
6049
|
}
|
|
6028
6050
|
}
|
|
6029
6051
|
async refreshStore(e) {
|
|
6030
6052
|
const i = (await this.performPagination(
|
|
6031
6053
|
{
|
|
6054
|
+
immediate: !0,
|
|
6032
6055
|
description: "Fetch form submissions",
|
|
6033
6056
|
method: u.GET,
|
|
6034
6057
|
url: "/form-submissions/",
|
|
@@ -6041,6 +6064,7 @@ class y_ extends U {
|
|
|
6041
6064
|
blocks: []
|
|
6042
6065
|
},
|
|
6043
6066
|
(a) => ({
|
|
6067
|
+
immediate: !0,
|
|
6044
6068
|
description: "Fetch form submissions",
|
|
6045
6069
|
method: u.GET,
|
|
6046
6070
|
url: a,
|
|
@@ -6054,31 +6078,31 @@ class y_ extends U {
|
|
|
6054
6078
|
class b_ extends U {
|
|
6055
6079
|
async add(e) {
|
|
6056
6080
|
var h;
|
|
6057
|
-
const { store: s } = this.client, { file: i, ...a } = e, n = (/* @__PURE__ */ new Date()).toISOString(),
|
|
6081
|
+
const { store: s } = this.client, { file: i, ...a } = e, n = (/* @__PURE__ */ new Date()).toISOString(), r = (h = s.getState().userReducer.currentUser) == null ? void 0 : h.id, o = a.project, l = await this.getFilePayload(i), c = F({
|
|
6058
6082
|
...a,
|
|
6059
6083
|
file_name: i.name,
|
|
6060
6084
|
file_sha1: l.sha1,
|
|
6061
6085
|
file: URL.createObjectURL(i),
|
|
6062
6086
|
submitted_at: n,
|
|
6063
|
-
created_by:
|
|
6087
|
+
created_by: r
|
|
6064
6088
|
});
|
|
6065
|
-
this.dispatch(Cu(
|
|
6089
|
+
this.dispatch(Cu(c));
|
|
6066
6090
|
const d = this.enqueueRequest({
|
|
6067
6091
|
description: "Add geo image",
|
|
6068
6092
|
method: u.POST,
|
|
6069
6093
|
url: "/geo-images/",
|
|
6070
6094
|
payload: {
|
|
6071
|
-
uuid:
|
|
6095
|
+
uuid: c.uuid,
|
|
6072
6096
|
submitted_at: n,
|
|
6073
|
-
title:
|
|
6074
|
-
description:
|
|
6075
|
-
geo_marker:
|
|
6076
|
-
canvas_marker:
|
|
6077
|
-
sha1:
|
|
6078
|
-
project:
|
|
6079
|
-
file_name:
|
|
6080
|
-
direction:
|
|
6081
|
-
original_date:
|
|
6097
|
+
title: c.title,
|
|
6098
|
+
description: c.description,
|
|
6099
|
+
geo_marker: c.geo_marker,
|
|
6100
|
+
canvas_marker: c.canvas_marker,
|
|
6101
|
+
sha1: c.file_sha1,
|
|
6102
|
+
project: c.project,
|
|
6103
|
+
file_name: c.file_name,
|
|
6104
|
+
direction: c.direction,
|
|
6105
|
+
original_date: c.original_date,
|
|
6082
6106
|
file: l
|
|
6083
6107
|
},
|
|
6084
6108
|
blocks: [o],
|
|
@@ -6087,15 +6111,15 @@ class b_ extends U {
|
|
|
6087
6111
|
return d.then((p) => {
|
|
6088
6112
|
this.processPresignedUrls(p.presigned_urls), this.dispatch(nt(p.geo_image));
|
|
6089
6113
|
}).catch(() => {
|
|
6090
|
-
this.dispatch(Pi(
|
|
6091
|
-
}), [
|
|
6114
|
+
this.dispatch(Pi(c.uuid));
|
|
6115
|
+
}), [c, d.then((p) => p.geo_image)];
|
|
6092
6116
|
}
|
|
6093
6117
|
async bulkAdd(e, s) {
|
|
6094
6118
|
var h;
|
|
6095
|
-
const { store: i } = this.client, a = (/* @__PURE__ */ new Date()).toISOString(), n = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id,
|
|
6119
|
+
const { store: i } = this.client, a = (/* @__PURE__ */ new Date()).toISOString(), n = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, r = [], o = [], l = [], c = {};
|
|
6096
6120
|
for (const p of e) {
|
|
6097
6121
|
const { file: f, ...g } = p, S = await this.getFilePayload(f);
|
|
6098
|
-
S.sha1 in
|
|
6122
|
+
S.sha1 in c || (c[S.sha1] = S);
|
|
6099
6123
|
const T = F({
|
|
6100
6124
|
...g,
|
|
6101
6125
|
file_name: f.name,
|
|
@@ -6105,7 +6129,7 @@ class b_ extends U {
|
|
|
6105
6129
|
created_by: n,
|
|
6106
6130
|
project: s
|
|
6107
6131
|
});
|
|
6108
|
-
|
|
6132
|
+
r.push(T), o.push(T.uuid), l.push({
|
|
6109
6133
|
uuid: T.uuid,
|
|
6110
6134
|
sha1: T.file_sha1,
|
|
6111
6135
|
file_name: T.file_name,
|
|
@@ -6117,7 +6141,7 @@ class b_ extends U {
|
|
|
6117
6141
|
original_date: T.original_date
|
|
6118
6142
|
});
|
|
6119
6143
|
}
|
|
6120
|
-
this.dispatch($u(
|
|
6144
|
+
this.dispatch($u(r));
|
|
6121
6145
|
const d = this.enqueueRequest({
|
|
6122
6146
|
description: "Bulk add geo images",
|
|
6123
6147
|
method: u.POST,
|
|
@@ -6126,7 +6150,7 @@ class b_ extends U {
|
|
|
6126
6150
|
submitted_at: a,
|
|
6127
6151
|
project: s,
|
|
6128
6152
|
geo_images: l,
|
|
6129
|
-
files: Object.values(
|
|
6153
|
+
files: Object.values(c)
|
|
6130
6154
|
},
|
|
6131
6155
|
blocks: [s],
|
|
6132
6156
|
blockers: o
|
|
@@ -6135,7 +6159,7 @@ class b_ extends U {
|
|
|
6135
6159
|
this.processPresignedUrls(p.presigned_urls), this.dispatch(Vu(p.geo_images));
|
|
6136
6160
|
}).catch(() => {
|
|
6137
6161
|
this.dispatch(Bu(o));
|
|
6138
|
-
}), [
|
|
6162
|
+
}), [r, d.then((p) => p.geo_images)];
|
|
6139
6163
|
}
|
|
6140
6164
|
update(e) {
|
|
6141
6165
|
const { store: s } = this.client, i = s.getState(), a = Ti(e.uuid)(i);
|
|
@@ -6143,7 +6167,7 @@ class b_ extends U {
|
|
|
6143
6167
|
throw new Error(`Map image with uuid ${e.uuid} does not exist in the store`);
|
|
6144
6168
|
const n = { ...a, ...e };
|
|
6145
6169
|
this.dispatch(Gu(n));
|
|
6146
|
-
const
|
|
6170
|
+
const r = this.enqueueRequest({
|
|
6147
6171
|
description: "Update geo image",
|
|
6148
6172
|
method: u.PATCH,
|
|
6149
6173
|
url: `/geo-images/${e.uuid}/`,
|
|
@@ -6151,11 +6175,11 @@ class b_ extends U {
|
|
|
6151
6175
|
blocks: [e.uuid],
|
|
6152
6176
|
blockers: [e.uuid]
|
|
6153
6177
|
});
|
|
6154
|
-
return
|
|
6178
|
+
return r.then((o) => {
|
|
6155
6179
|
this.dispatch(nt(o));
|
|
6156
6180
|
}).catch(() => {
|
|
6157
6181
|
this.dispatch(nt(a));
|
|
6158
|
-
}), [n,
|
|
6182
|
+
}), [n, r];
|
|
6159
6183
|
}
|
|
6160
6184
|
async delete(e) {
|
|
6161
6185
|
const { store: s } = this.client, i = s.getState(), a = Ti(e)(i);
|
|
@@ -6196,7 +6220,7 @@ class g_ extends v {
|
|
|
6196
6220
|
created_by: a
|
|
6197
6221
|
});
|
|
6198
6222
|
this.dispatch(Oi(n));
|
|
6199
|
-
const
|
|
6223
|
+
const r = this.enqueueRequest({
|
|
6200
6224
|
description: "Add issue association",
|
|
6201
6225
|
method: u.POST,
|
|
6202
6226
|
url: "/issue-associations/",
|
|
@@ -6208,11 +6232,11 @@ class g_ extends v {
|
|
|
6208
6232
|
],
|
|
6209
6233
|
blocks: [n.uuid]
|
|
6210
6234
|
});
|
|
6211
|
-
return
|
|
6235
|
+
return r.then((l) => {
|
|
6212
6236
|
this.dispatch(Ku(l));
|
|
6213
6237
|
}).catch(() => {
|
|
6214
6238
|
this.dispatch(Ii(n.uuid));
|
|
6215
|
-
}), [n,
|
|
6239
|
+
}), [n, r];
|
|
6216
6240
|
}
|
|
6217
6241
|
async delete(e) {
|
|
6218
6242
|
const { store: s } = this.client, i = Yu(e)(s.getState());
|
|
@@ -6233,6 +6257,7 @@ class g_ extends v {
|
|
|
6233
6257
|
async refreshStore(e) {
|
|
6234
6258
|
const i = (await this.performPagination(
|
|
6235
6259
|
{
|
|
6260
|
+
immediate: !0,
|
|
6236
6261
|
description: "Fetch issue associations",
|
|
6237
6262
|
method: u.GET,
|
|
6238
6263
|
url: "/issue-associations/",
|
|
@@ -6245,6 +6270,7 @@ class g_ extends v {
|
|
|
6245
6270
|
blocks: []
|
|
6246
6271
|
},
|
|
6247
6272
|
(a) => ({
|
|
6273
|
+
immediate: !0,
|
|
6248
6274
|
description: "Fetch issue associations",
|
|
6249
6275
|
method: u.GET,
|
|
6250
6276
|
url: a,
|
|
@@ -6266,7 +6292,7 @@ class S_ extends xe {
|
|
|
6266
6292
|
A(this, "removeAttachments", Gn);
|
|
6267
6293
|
A(this, "removeAttachment", sl);
|
|
6268
6294
|
A(this, "setAttachment", el);
|
|
6269
|
-
A(this, "selectAttachment",
|
|
6295
|
+
A(this, "selectAttachment", rl);
|
|
6270
6296
|
}
|
|
6271
6297
|
buildOfflineAttachment(s) {
|
|
6272
6298
|
return F({
|
|
@@ -6295,6 +6321,7 @@ class S_ extends xe {
|
|
|
6295
6321
|
async refreshStore(s) {
|
|
6296
6322
|
const a = (await this.performPagination(
|
|
6297
6323
|
{
|
|
6324
|
+
immediate: !0,
|
|
6298
6325
|
description: "Get issue attachments",
|
|
6299
6326
|
method: u.GET,
|
|
6300
6327
|
url: `${this.url}/`,
|
|
@@ -6307,6 +6334,7 @@ class S_ extends xe {
|
|
|
6307
6334
|
blockers: []
|
|
6308
6335
|
},
|
|
6309
6336
|
(n) => ({
|
|
6337
|
+
immediate: !0,
|
|
6310
6338
|
description: "Get issue attachments",
|
|
6311
6339
|
method: u.GET,
|
|
6312
6340
|
url: n,
|
|
@@ -6357,6 +6385,7 @@ class __ extends xe {
|
|
|
6357
6385
|
async refreshStore(s) {
|
|
6358
6386
|
const a = (await this.performPagination(
|
|
6359
6387
|
{
|
|
6388
|
+
immediate: !0,
|
|
6360
6389
|
description: "Get issue comment attachments",
|
|
6361
6390
|
method: u.GET,
|
|
6362
6391
|
url: `${this.url}/`,
|
|
@@ -6369,6 +6398,7 @@ class __ extends xe {
|
|
|
6369
6398
|
blockers: []
|
|
6370
6399
|
},
|
|
6371
6400
|
(n) => ({
|
|
6401
|
+
immediate: !0,
|
|
6372
6402
|
description: "Get issue comment attachments",
|
|
6373
6403
|
method: u.GET,
|
|
6374
6404
|
url: n,
|
|
@@ -6454,29 +6484,29 @@ class P_ extends v {
|
|
|
6454
6484
|
class T_ extends v {
|
|
6455
6485
|
add(e) {
|
|
6456
6486
|
var l;
|
|
6457
|
-
const { store: s } = this.client, i = s.getState(), a = (/* @__PURE__ */ new Date()).toISOString(), n = (l = i.userReducer.currentUser) == null ? void 0 : l.id,
|
|
6487
|
+
const { store: s } = this.client, i = s.getState(), a = (/* @__PURE__ */ new Date()).toISOString(), n = (l = i.userReducer.currentUser) == null ? void 0 : l.id, r = F({
|
|
6458
6488
|
...e,
|
|
6459
6489
|
submitted_at: a,
|
|
6460
6490
|
created_by: n
|
|
6461
6491
|
});
|
|
6462
|
-
this.dispatch(Di(
|
|
6492
|
+
this.dispatch(Di(r));
|
|
6463
6493
|
const o = this.enqueueRequest({
|
|
6464
6494
|
description: "Create issue",
|
|
6465
6495
|
method: u.POST,
|
|
6466
6496
|
url: "/issues/",
|
|
6467
|
-
payload: w(
|
|
6497
|
+
payload: w(r),
|
|
6468
6498
|
blockers: [
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
...
|
|
6499
|
+
r.project,
|
|
6500
|
+
r.issue_type,
|
|
6501
|
+
...r.category ? [r.category] : []
|
|
6472
6502
|
],
|
|
6473
|
-
blocks: [
|
|
6503
|
+
blocks: [r.uuid]
|
|
6474
6504
|
});
|
|
6475
|
-
return o.then((
|
|
6476
|
-
this.dispatch(yt(
|
|
6477
|
-
}).catch((
|
|
6478
|
-
throw this.dispatch(xi(
|
|
6479
|
-
}), [
|
|
6505
|
+
return o.then((c) => {
|
|
6506
|
+
this.dispatch(yt(c));
|
|
6507
|
+
}).catch((c) => {
|
|
6508
|
+
throw this.dispatch(xi(r.uuid)), c;
|
|
6509
|
+
}), [r, o];
|
|
6480
6510
|
}
|
|
6481
6511
|
update(e) {
|
|
6482
6512
|
var l;
|
|
@@ -6486,7 +6516,7 @@ class T_ extends v {
|
|
|
6486
6516
|
const a = { ...i, ...e };
|
|
6487
6517
|
this.dispatch(yt(a));
|
|
6488
6518
|
const n = {};
|
|
6489
|
-
for (const
|
|
6519
|
+
for (const c of [
|
|
6490
6520
|
z.TITLE,
|
|
6491
6521
|
z.DESCRIPTION,
|
|
6492
6522
|
z.STATUS,
|
|
@@ -6495,27 +6525,27 @@ class T_ extends v {
|
|
|
6495
6525
|
z.ASSIGNED_TO,
|
|
6496
6526
|
z.DUE_DATE
|
|
6497
6527
|
])
|
|
6498
|
-
if (
|
|
6499
|
-
switch (
|
|
6528
|
+
if (c in e && e[c] !== i[c])
|
|
6529
|
+
switch (c) {
|
|
6500
6530
|
case z.PRIORITY:
|
|
6501
6531
|
case z.STATUS: {
|
|
6502
|
-
const d = e[
|
|
6503
|
-
n[
|
|
6532
|
+
const d = e[c];
|
|
6533
|
+
n[c] = d !== void 0 ? Number(d) : null;
|
|
6504
6534
|
break;
|
|
6505
6535
|
}
|
|
6506
6536
|
case z.DUE_DATE:
|
|
6507
6537
|
case z.DESCRIPTION:
|
|
6508
6538
|
case z.TITLE:
|
|
6509
|
-
n[
|
|
6539
|
+
n[c] = e[c] ?? null;
|
|
6510
6540
|
break;
|
|
6511
6541
|
case z.CATEGORY: {
|
|
6512
6542
|
let d = null;
|
|
6513
|
-
const h = e[
|
|
6543
|
+
const h = e[c];
|
|
6514
6544
|
if (h && (d = s.categoryReducer.instances[h] ?? null, !d))
|
|
6515
6545
|
throw new Error(
|
|
6516
6546
|
`Trying to update issue category to ${h} which does not exist in store`
|
|
6517
6547
|
);
|
|
6518
|
-
n[
|
|
6548
|
+
n[c] = d ? {
|
|
6519
6549
|
name: d.name,
|
|
6520
6550
|
color: d.color,
|
|
6521
6551
|
uuid: d.uuid
|
|
@@ -6524,25 +6554,25 @@ class T_ extends v {
|
|
|
6524
6554
|
}
|
|
6525
6555
|
case z.ASSIGNED_TO: {
|
|
6526
6556
|
let d = null;
|
|
6527
|
-
const h = e[
|
|
6557
|
+
const h = e[c];
|
|
6528
6558
|
if (h && (d = s.userReducer.instances[h] ?? null, !d))
|
|
6529
6559
|
throw new Error(
|
|
6530
6560
|
`Trying to update issue assigned_to to ${h} which does not exist in store`
|
|
6531
6561
|
);
|
|
6532
|
-
n[
|
|
6562
|
+
n[c] = d ? {
|
|
6533
6563
|
full_name: d.username,
|
|
6534
6564
|
id: d.id
|
|
6535
6565
|
} : null;
|
|
6536
6566
|
break;
|
|
6537
6567
|
}
|
|
6538
6568
|
}
|
|
6539
|
-
const
|
|
6569
|
+
const r = F({
|
|
6540
6570
|
created_by: (l = s.userReducer.currentUser) == null ? void 0 : l.id,
|
|
6541
6571
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6542
6572
|
issue: i.uuid,
|
|
6543
6573
|
changes: n
|
|
6544
6574
|
});
|
|
6545
|
-
this.dispatch(oh(
|
|
6575
|
+
this.dispatch(oh(r));
|
|
6546
6576
|
const o = this.enqueueRequest({
|
|
6547
6577
|
description: "Edit issue",
|
|
6548
6578
|
method: u.PATCH,
|
|
@@ -6552,20 +6582,20 @@ class T_ extends v {
|
|
|
6552
6582
|
blocks: [e.uuid]
|
|
6553
6583
|
});
|
|
6554
6584
|
return o.catch(() => {
|
|
6555
|
-
this.dispatch(yt(i)), this.dispatch(uh(
|
|
6585
|
+
this.dispatch(yt(i)), this.dispatch(uh(r.uuid));
|
|
6556
6586
|
}), [a, o];
|
|
6557
6587
|
}
|
|
6558
6588
|
async remove(e) {
|
|
6559
6589
|
const { store: s } = this.client, i = s.getState(), a = Vi(e)(i);
|
|
6560
6590
|
if (!a)
|
|
6561
6591
|
throw new Error(`No issue with uuid ${e} found in the store`);
|
|
6562
|
-
const n = nl(e)(i),
|
|
6592
|
+
const n = nl(e)(i), r = ph(e)(i), o = zu(e)(i), l = {};
|
|
6563
6593
|
for (const d of Ju(e)(i))
|
|
6564
6594
|
l[d.uuid] = d;
|
|
6565
6595
|
for (const d of Zu(e)(i))
|
|
6566
6596
|
l[d.uuid] = d;
|
|
6567
|
-
const
|
|
6568
|
-
this.dispatch(xi(e)), n.length > 0 && this.dispatch(Gn(n.map(({ uuid: d }) => d))),
|
|
6597
|
+
const c = Object.values(l);
|
|
6598
|
+
this.dispatch(xi(e)), n.length > 0 && this.dispatch(Gn(n.map(({ uuid: d }) => d))), r.length > 0 && this.dispatch(lh(r.map(({ uuid: d }) => d))), o.length > 0 && this.dispatch(Ht(o.map(({ uuid: d }) => d))), c.length > 0 && this.dispatch(Vn(c.map(({ uuid: d }) => d)));
|
|
6569
6599
|
try {
|
|
6570
6600
|
return await this.enqueueRequest({
|
|
6571
6601
|
description: "Delete issue",
|
|
@@ -6575,12 +6605,13 @@ class T_ extends v {
|
|
|
6575
6605
|
blocks: []
|
|
6576
6606
|
});
|
|
6577
6607
|
} catch (d) {
|
|
6578
|
-
throw this.dispatch(Di(a)), this.dispatch($n(n)), this.dispatch(dh(
|
|
6608
|
+
throw this.dispatch(Di(a)), this.dispatch($n(n)), this.dispatch(dh(r)), this.dispatch(Nt(o)), this.dispatch(xn(c)), d;
|
|
6579
6609
|
}
|
|
6580
6610
|
}
|
|
6581
6611
|
async refreshStore(e) {
|
|
6582
6612
|
const i = (await this.performPagination(
|
|
6583
6613
|
{
|
|
6614
|
+
immediate: !0,
|
|
6584
6615
|
description: "Get issues",
|
|
6585
6616
|
method: u.GET,
|
|
6586
6617
|
url: "/issues/",
|
|
@@ -6593,6 +6624,7 @@ class T_ extends v {
|
|
|
6593
6624
|
blocks: []
|
|
6594
6625
|
},
|
|
6595
6626
|
(a) => ({
|
|
6627
|
+
immediate: !0,
|
|
6596
6628
|
description: "Get issues",
|
|
6597
6629
|
method: u.GET,
|
|
6598
6630
|
url: a,
|
|
@@ -6657,9 +6689,9 @@ class F_ extends xe {
|
|
|
6657
6689
|
class O_ extends U {
|
|
6658
6690
|
async bulkAdd(e) {
|
|
6659
6691
|
var l;
|
|
6660
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
6661
|
-
for (const
|
|
6662
|
-
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } =
|
|
6692
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
6693
|
+
for (const c of e) {
|
|
6694
|
+
const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
6663
6695
|
f.sha1 in a || (a[f.sha1] = f);
|
|
6664
6696
|
const g = F({
|
|
6665
6697
|
file: URL.createObjectURL(p),
|
|
@@ -6680,7 +6712,7 @@ class O_ extends U {
|
|
|
6680
6712
|
file_sha1: f.sha1,
|
|
6681
6713
|
fields_revision: d
|
|
6682
6714
|
};
|
|
6683
|
-
|
|
6715
|
+
r.push(S);
|
|
6684
6716
|
}
|
|
6685
6717
|
this.dispatch(jl(n));
|
|
6686
6718
|
const o = this.enqueueRequest({
|
|
@@ -6689,21 +6721,21 @@ class O_ extends U {
|
|
|
6689
6721
|
url: "/issue-type-fields-attachments/bulk/",
|
|
6690
6722
|
payload: {
|
|
6691
6723
|
submitted_at: s,
|
|
6692
|
-
attachments:
|
|
6724
|
+
attachments: r,
|
|
6693
6725
|
files: Object.values(a)
|
|
6694
6726
|
},
|
|
6695
|
-
blockers: n.map((
|
|
6696
|
-
blocks: n.map((
|
|
6727
|
+
blockers: n.map((c) => c.fields_revision),
|
|
6728
|
+
blocks: n.map((c) => c.uuid)
|
|
6697
6729
|
});
|
|
6698
|
-
return o.then((
|
|
6699
|
-
this.processPresignedUrls(
|
|
6730
|
+
return o.then((c) => {
|
|
6731
|
+
this.processPresignedUrls(c.presigned_urls), this.dispatch(zl(c.attachments));
|
|
6700
6732
|
}).catch(() => {
|
|
6701
6733
|
this.dispatch(
|
|
6702
6734
|
Ul(
|
|
6703
|
-
n.map((
|
|
6735
|
+
n.map((c) => c.uuid)
|
|
6704
6736
|
)
|
|
6705
6737
|
);
|
|
6706
|
-
}), [n, o.then(({ attachments:
|
|
6738
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
6707
6739
|
}
|
|
6708
6740
|
async refreshStore(e) {
|
|
6709
6741
|
const s = await this.enqueueRequest({
|
|
@@ -6728,7 +6760,7 @@ class I_ extends v {
|
|
|
6728
6760
|
submitted_at: a
|
|
6729
6761
|
});
|
|
6730
6762
|
this.dispatch(Ll(n));
|
|
6731
|
-
const
|
|
6763
|
+
const r = this.enqueueRequest({
|
|
6732
6764
|
description: "Add Issue Type Fields",
|
|
6733
6765
|
method: u.POST,
|
|
6734
6766
|
url: "/issue-type-fields/",
|
|
@@ -6736,11 +6768,11 @@ class I_ extends v {
|
|
|
6736
6768
|
blockers: [n.issue_type],
|
|
6737
6769
|
blocks: [n.uuid]
|
|
6738
6770
|
});
|
|
6739
|
-
return
|
|
6771
|
+
return r.then((l) => {
|
|
6740
6772
|
this.dispatch(Nl(l));
|
|
6741
6773
|
}).catch((l) => {
|
|
6742
6774
|
throw this.dispatch(Hl(n.uuid)), l;
|
|
6743
|
-
}), [n,
|
|
6775
|
+
}), [n, r];
|
|
6744
6776
|
}
|
|
6745
6777
|
async refreshStore(e) {
|
|
6746
6778
|
const s = await this.enqueueRequest({
|
|
@@ -6759,9 +6791,9 @@ class I_ extends v {
|
|
|
6759
6791
|
class R_ extends U {
|
|
6760
6792
|
async bulkAdd(e) {
|
|
6761
6793
|
var l;
|
|
6762
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [],
|
|
6763
|
-
for (const
|
|
6764
|
-
const { fieldValuesUuid: d, fieldIdentifier: h, file: p } =
|
|
6794
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = {}, n = [], r = [];
|
|
6795
|
+
for (const c of e) {
|
|
6796
|
+
const { fieldValuesUuid: d, fieldIdentifier: h, file: p } = c, f = await this.getFilePayload(p);
|
|
6765
6797
|
f.sha1 in a || (a[f.sha1] = f);
|
|
6766
6798
|
const g = F({
|
|
6767
6799
|
file: URL.createObjectURL(p),
|
|
@@ -6782,7 +6814,7 @@ class R_ extends U {
|
|
|
6782
6814
|
field_identifier: h,
|
|
6783
6815
|
field_values: d
|
|
6784
6816
|
};
|
|
6785
|
-
|
|
6817
|
+
r.push(S);
|
|
6786
6818
|
}
|
|
6787
6819
|
this.dispatch(qt(n));
|
|
6788
6820
|
const o = this.enqueueRequest({
|
|
@@ -6791,21 +6823,21 @@ class R_ extends U {
|
|
|
6791
6823
|
url: "/issue-type-field-values-attachments/bulk/",
|
|
6792
6824
|
payload: {
|
|
6793
6825
|
submitted_at: s,
|
|
6794
|
-
attachments:
|
|
6826
|
+
attachments: r,
|
|
6795
6827
|
files: Object.values(a)
|
|
6796
6828
|
},
|
|
6797
|
-
blockers: n.map((
|
|
6798
|
-
blocks: n.map((
|
|
6829
|
+
blockers: n.map((c) => c.field_values),
|
|
6830
|
+
blocks: n.map((c) => c.uuid)
|
|
6799
6831
|
});
|
|
6800
|
-
return o.then(({ presigned_urls:
|
|
6801
|
-
this.processPresignedUrls(
|
|
6802
|
-
}).catch((
|
|
6832
|
+
return o.then(({ presigned_urls: c, attachments: d }) => {
|
|
6833
|
+
this.processPresignedUrls(c), this.dispatch(Jl(d));
|
|
6834
|
+
}).catch((c) => {
|
|
6803
6835
|
throw this.dispatch(
|
|
6804
6836
|
jt(
|
|
6805
6837
|
n.map((d) => d.uuid)
|
|
6806
6838
|
)
|
|
6807
|
-
),
|
|
6808
|
-
}), [n, o.then(({ attachments:
|
|
6839
|
+
), c;
|
|
6840
|
+
}), [n, o.then(({ attachments: c }) => c)];
|
|
6809
6841
|
}
|
|
6810
6842
|
async bulkDelete(e) {
|
|
6811
6843
|
const { store: s } = this.client, i = s.getState(), a = Ql(e)(i);
|
|
@@ -6826,6 +6858,7 @@ class R_ extends U {
|
|
|
6826
6858
|
async refreshStore(e) {
|
|
6827
6859
|
const i = (await this.performPagination(
|
|
6828
6860
|
{
|
|
6861
|
+
immediate: !0,
|
|
6829
6862
|
description: "Get issue type field values attachments",
|
|
6830
6863
|
method: u.GET,
|
|
6831
6864
|
url: "/issue-type-field-values-attachments/",
|
|
@@ -6838,6 +6871,7 @@ class R_ extends U {
|
|
|
6838
6871
|
blocks: []
|
|
6839
6872
|
},
|
|
6840
6873
|
(a) => ({
|
|
6874
|
+
immediate: !0,
|
|
6841
6875
|
description: "Get issue type field values attachments",
|
|
6842
6876
|
method: u.GET,
|
|
6843
6877
|
url: a,
|
|
@@ -6850,10 +6884,10 @@ class R_ extends U {
|
|
|
6850
6884
|
}
|
|
6851
6885
|
class v_ extends v {
|
|
6852
6886
|
add(e) {
|
|
6853
|
-
var
|
|
6887
|
+
var r;
|
|
6854
6888
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
6855
6889
|
...e,
|
|
6856
|
-
created_by: (
|
|
6890
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
6857
6891
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
6858
6892
|
}), n = this.enqueueRequest({
|
|
6859
6893
|
description: "Add issue type field values",
|
|
@@ -6863,7 +6897,7 @@ class v_ extends v {
|
|
|
6863
6897
|
blockers: [e.issue, e.fields_revision],
|
|
6864
6898
|
blocks: [a.uuid]
|
|
6865
6899
|
});
|
|
6866
|
-
return this.dispatch(Li(a)), n.then((o) => (this.dispatch(
|
|
6900
|
+
return this.dispatch(Li(a)), n.then((o) => (this.dispatch(rt(o)), o)).catch(() => {
|
|
6867
6901
|
this.dispatch(Ni(a.uuid));
|
|
6868
6902
|
}), [a, n];
|
|
6869
6903
|
}
|
|
@@ -6875,8 +6909,8 @@ class v_ extends v {
|
|
|
6875
6909
|
...a,
|
|
6876
6910
|
...e
|
|
6877
6911
|
};
|
|
6878
|
-
this.dispatch(
|
|
6879
|
-
const
|
|
6912
|
+
this.dispatch(rt(n));
|
|
6913
|
+
const r = this.enqueueRequest({
|
|
6880
6914
|
description: "Update issue type field values",
|
|
6881
6915
|
method: u.PATCH,
|
|
6882
6916
|
url: `/issue-type-field-values/${e.uuid}/`,
|
|
@@ -6888,18 +6922,18 @@ class v_ extends v {
|
|
|
6888
6922
|
],
|
|
6889
6923
|
blocks: [n.uuid]
|
|
6890
6924
|
});
|
|
6891
|
-
return
|
|
6892
|
-
this.dispatch(
|
|
6925
|
+
return r.then((o) => {
|
|
6926
|
+
this.dispatch(rt(o));
|
|
6893
6927
|
}).catch(() => {
|
|
6894
|
-
this.dispatch(
|
|
6895
|
-
}), [n,
|
|
6928
|
+
this.dispatch(rt(a));
|
|
6929
|
+
}), [n, r];
|
|
6896
6930
|
}
|
|
6897
6931
|
async delete(e) {
|
|
6898
6932
|
const { store: s } = this.client, i = s.getState(), a = Hi(e)(i);
|
|
6899
6933
|
if (!a)
|
|
6900
6934
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
6901
6935
|
const n = Xl(e)(i);
|
|
6902
|
-
this.dispatch(Ni(e)), this.dispatch(jt(n.map((
|
|
6936
|
+
this.dispatch(Ni(e)), this.dispatch(jt(n.map((r) => r.uuid)));
|
|
6903
6937
|
try {
|
|
6904
6938
|
await this.enqueueRequest({
|
|
6905
6939
|
description: "Delete issue type field values",
|
|
@@ -6908,13 +6942,14 @@ class v_ extends v {
|
|
|
6908
6942
|
blockers: [e],
|
|
6909
6943
|
blocks: []
|
|
6910
6944
|
});
|
|
6911
|
-
} catch (
|
|
6912
|
-
throw this.dispatch(Li(a)), this.dispatch(qt(n)),
|
|
6945
|
+
} catch (r) {
|
|
6946
|
+
throw this.dispatch(Li(a)), this.dispatch(qt(n)), r;
|
|
6913
6947
|
}
|
|
6914
6948
|
}
|
|
6915
6949
|
async refreshStore(e) {
|
|
6916
6950
|
const i = (await this.performPagination(
|
|
6917
6951
|
{
|
|
6952
|
+
immediate: !0,
|
|
6918
6953
|
description: "Get issue type field values",
|
|
6919
6954
|
method: u.GET,
|
|
6920
6955
|
url: "/issue-type-field-values/",
|
|
@@ -6927,6 +6962,7 @@ class v_ extends v {
|
|
|
6927
6962
|
blocks: []
|
|
6928
6963
|
},
|
|
6929
6964
|
(a) => ({
|
|
6965
|
+
immediate: !0,
|
|
6930
6966
|
description: "Get issue type field values",
|
|
6931
6967
|
method: u.GET,
|
|
6932
6968
|
url: a,
|
|
@@ -6939,11 +6975,11 @@ class v_ extends v {
|
|
|
6939
6975
|
}
|
|
6940
6976
|
class w_ extends v {
|
|
6941
6977
|
add(e) {
|
|
6942
|
-
var
|
|
6978
|
+
var r;
|
|
6943
6979
|
const { store: s } = this.client, i = s.getState(), a = F({
|
|
6944
6980
|
...e,
|
|
6945
6981
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6946
|
-
created_by: (
|
|
6982
|
+
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id
|
|
6947
6983
|
});
|
|
6948
6984
|
this.dispatch(sh(a));
|
|
6949
6985
|
const n = this.enqueueRequest({
|
|
@@ -6954,7 +6990,7 @@ class w_ extends v {
|
|
|
6954
6990
|
blocks: [a.uuid]
|
|
6955
6991
|
});
|
|
6956
6992
|
return n.then((o) => {
|
|
6957
|
-
this.dispatch(
|
|
6993
|
+
this.dispatch(ct(o));
|
|
6958
6994
|
}).catch(() => {
|
|
6959
6995
|
this.dispatch(Ji(a.uuid));
|
|
6960
6996
|
}), [a, n];
|
|
@@ -6968,34 +7004,34 @@ class w_ extends v {
|
|
|
6968
7004
|
...e
|
|
6969
7005
|
};
|
|
6970
7006
|
this.dispatch(ih(n));
|
|
6971
|
-
const
|
|
7007
|
+
const r = this.enqueueRequest({
|
|
6972
7008
|
method: u.PATCH,
|
|
6973
7009
|
url: `/issue-types/${e.uuid}/`,
|
|
6974
7010
|
payload: e,
|
|
6975
7011
|
blockers: [e.uuid],
|
|
6976
7012
|
blocks: [e.uuid]
|
|
6977
7013
|
});
|
|
6978
|
-
return
|
|
6979
|
-
this.dispatch(
|
|
7014
|
+
return r.then((o) => {
|
|
7015
|
+
this.dispatch(ct(o));
|
|
6980
7016
|
}).catch(() => {
|
|
6981
|
-
this.dispatch(
|
|
6982
|
-
}), [n,
|
|
7017
|
+
this.dispatch(ct(a));
|
|
7018
|
+
}), [n, r];
|
|
6983
7019
|
}
|
|
6984
7020
|
delete(e) {
|
|
6985
7021
|
const { store: s } = this.client, i = s.getState(), a = Zi(e)(i);
|
|
6986
7022
|
if (!a)
|
|
6987
7023
|
throw new Error(`IssueType with uuid ${e} does not exist in the store.`);
|
|
6988
|
-
const n =
|
|
7024
|
+
const n = tr(e)(i);
|
|
6989
7025
|
this.dispatch(Ji(e)), this.dispatch(Pl(n.map((o) => o.uuid)));
|
|
6990
|
-
const
|
|
7026
|
+
const r = this.enqueueRequest({
|
|
6991
7027
|
method: u.DELETE,
|
|
6992
7028
|
url: `/issue-types/${e}/`,
|
|
6993
7029
|
blockers: [e],
|
|
6994
7030
|
blocks: []
|
|
6995
7031
|
});
|
|
6996
|
-
return
|
|
6997
|
-
this.dispatch(
|
|
6998
|
-
}),
|
|
7032
|
+
return r.catch(() => {
|
|
7033
|
+
this.dispatch(ct(a)), this.dispatch(_l(n));
|
|
7034
|
+
}), r;
|
|
6999
7035
|
}
|
|
7000
7036
|
async refreshStore(e) {
|
|
7001
7037
|
const s = await this.enqueueRequest({
|
|
@@ -7014,6 +7050,7 @@ class k_ extends v {
|
|
|
7014
7050
|
async refreshStore(e) {
|
|
7015
7051
|
const i = (await this.performPagination(
|
|
7016
7052
|
{
|
|
7053
|
+
immediate: !0,
|
|
7017
7054
|
description: "Get issue updates",
|
|
7018
7055
|
method: u.GET,
|
|
7019
7056
|
url: "/issue-updates/",
|
|
@@ -7026,6 +7063,7 @@ class k_ extends v {
|
|
|
7026
7063
|
blocks: []
|
|
7027
7064
|
},
|
|
7028
7065
|
(a) => ({
|
|
7066
|
+
immediate: !0,
|
|
7029
7067
|
description: "Get issue updates",
|
|
7030
7068
|
method: u.GET,
|
|
7031
7069
|
url: a,
|
|
@@ -7033,7 +7071,7 @@ class k_ extends v {
|
|
|
7033
7071
|
blocks: []
|
|
7034
7072
|
})
|
|
7035
7073
|
)).flat();
|
|
7036
|
-
return this.dispatch(
|
|
7074
|
+
return this.dispatch(ch(i)), i;
|
|
7037
7075
|
}
|
|
7038
7076
|
}
|
|
7039
7077
|
const Xp = 1800;
|
|
@@ -7109,7 +7147,7 @@ class E_ extends Zp {
|
|
|
7109
7147
|
const i = Date.now() / 1e3;
|
|
7110
7148
|
let a;
|
|
7111
7149
|
try {
|
|
7112
|
-
a =
|
|
7150
|
+
a = Gr(s).exp ?? i;
|
|
7113
7151
|
} catch {
|
|
7114
7152
|
a = i;
|
|
7115
7153
|
}
|
|
@@ -7180,10 +7218,10 @@ class M_ extends v {
|
|
|
7180
7218
|
blockers: [e.uuid],
|
|
7181
7219
|
blocks: [e.uuid]
|
|
7182
7220
|
});
|
|
7183
|
-
return n.then((
|
|
7184
|
-
this.dispatch(bt(
|
|
7185
|
-
}).catch((
|
|
7186
|
-
throw this.dispatch(bt(i)),
|
|
7221
|
+
return n.then((r) => {
|
|
7222
|
+
this.dispatch(bt(r));
|
|
7223
|
+
}).catch((r) => {
|
|
7224
|
+
throw this.dispatch(bt(i)), r;
|
|
7187
7225
|
}), [a, n];
|
|
7188
7226
|
}
|
|
7189
7227
|
async remove(e) {
|
|
@@ -7197,8 +7235,8 @@ class M_ extends v {
|
|
|
7197
7235
|
blockers: [a.uuid],
|
|
7198
7236
|
blocks: []
|
|
7199
7237
|
});
|
|
7200
|
-
} catch (
|
|
7201
|
-
throw this.dispatch(Ph(a)), this.dispatch(Ah(n)),
|
|
7238
|
+
} catch (r) {
|
|
7239
|
+
throw this.dispatch(Ph(a)), this.dispatch(Ah(n)), r;
|
|
7202
7240
|
}
|
|
7203
7241
|
}
|
|
7204
7242
|
async refreshStore(e) {
|
|
@@ -7273,11 +7311,11 @@ class j_ extends v {
|
|
|
7273
7311
|
return i.then((a) => {
|
|
7274
7312
|
this.dispatch(ot(a));
|
|
7275
7313
|
}).catch((a) => {
|
|
7276
|
-
throw this.dispatch(
|
|
7314
|
+
throw this.dispatch(ra(s.uuid)), a;
|
|
7277
7315
|
}), [s, i];
|
|
7278
7316
|
}
|
|
7279
7317
|
update(e) {
|
|
7280
|
-
const { store: s } = this.client, i =
|
|
7318
|
+
const { store: s } = this.client, i = ca(e.uuid)(s.getState()), a = {
|
|
7281
7319
|
...i,
|
|
7282
7320
|
...e
|
|
7283
7321
|
};
|
|
@@ -7290,15 +7328,15 @@ class j_ extends v {
|
|
|
7290
7328
|
blockers: [e.uuid],
|
|
7291
7329
|
blocks: []
|
|
7292
7330
|
});
|
|
7293
|
-
return n.then((
|
|
7294
|
-
this.dispatch(ot(
|
|
7295
|
-
}).catch((
|
|
7296
|
-
throw this.dispatch(ot(i)),
|
|
7331
|
+
return n.then((r) => {
|
|
7332
|
+
this.dispatch(ot(r));
|
|
7333
|
+
}).catch((r) => {
|
|
7334
|
+
throw this.dispatch(ot(i)), r;
|
|
7297
7335
|
}), [a, n];
|
|
7298
7336
|
}
|
|
7299
7337
|
async remove(e) {
|
|
7300
|
-
const { store: s } = this.client, i =
|
|
7301
|
-
this.dispatch(
|
|
7338
|
+
const { store: s } = this.client, i = ca(e)(s.getState());
|
|
7339
|
+
this.dispatch(ra(e));
|
|
7302
7340
|
try {
|
|
7303
7341
|
await this.enqueueRequest({
|
|
7304
7342
|
description: "Delete project access",
|
|
@@ -7332,7 +7370,7 @@ class z_ extends xe {
|
|
|
7332
7370
|
A(this, "url", "/project-attachments");
|
|
7333
7371
|
A(this, "addAttachments", Gh);
|
|
7334
7372
|
A(this, "updateAttachments", Nh);
|
|
7335
|
-
A(this, "removeAttachments",
|
|
7373
|
+
A(this, "removeAttachments", hr);
|
|
7336
7374
|
A(this, "removeAttachment", Hh);
|
|
7337
7375
|
A(this, "setAttachment", Bh);
|
|
7338
7376
|
A(this, "selectAttachment", Yh);
|
|
@@ -7415,7 +7453,7 @@ class U_ extends v {
|
|
|
7415
7453
|
blocks: [i]
|
|
7416
7454
|
};
|
|
7417
7455
|
} else
|
|
7418
|
-
n = new Promise((l,
|
|
7456
|
+
n = new Promise((l, c) => {
|
|
7419
7457
|
this.client.files.uploadFileToS3(a.file_sha1).then(([d]) => {
|
|
7420
7458
|
l({
|
|
7421
7459
|
method: u.POST,
|
|
@@ -7427,7 +7465,7 @@ class U_ extends v {
|
|
|
7427
7465
|
blockers: [i],
|
|
7428
7466
|
blocks: [i]
|
|
7429
7467
|
});
|
|
7430
|
-
}).catch(
|
|
7468
|
+
}).catch(c);
|
|
7431
7469
|
});
|
|
7432
7470
|
const o = Promise.resolve(n).then((l) => this.enqueueRequest(l));
|
|
7433
7471
|
return o.then((l) => {
|
|
@@ -7445,6 +7483,7 @@ class U_ extends v {
|
|
|
7445
7483
|
async refreshStore(e) {
|
|
7446
7484
|
const i = (await this.performPagination(
|
|
7447
7485
|
{
|
|
7486
|
+
immediate: !0,
|
|
7448
7487
|
description: "Get project files",
|
|
7449
7488
|
method: u.GET,
|
|
7450
7489
|
url: "/project-files/",
|
|
@@ -7457,6 +7496,7 @@ class U_ extends v {
|
|
|
7457
7496
|
blocks: []
|
|
7458
7497
|
},
|
|
7459
7498
|
(a) => ({
|
|
7499
|
+
immediate: !0,
|
|
7460
7500
|
description: "Get project files",
|
|
7461
7501
|
method: u.GET,
|
|
7462
7502
|
url: a,
|
|
@@ -7498,10 +7538,10 @@ class D_ extends v {
|
|
|
7498
7538
|
const { store: s } = this.client, i = s.getState(), a = hp(e)(i);
|
|
7499
7539
|
if (!a)
|
|
7500
7540
|
throw new Error("Expected project to exist");
|
|
7501
|
-
const n =
|
|
7541
|
+
const n = rp(i).filter((l) => l.project === e);
|
|
7502
7542
|
this.dispatch(tp(n.map(({ uuid: l }) => l)));
|
|
7503
|
-
const
|
|
7504
|
-
this.dispatch(
|
|
7543
|
+
const r = Jh(a.uuid)(i);
|
|
7544
|
+
this.dispatch(hr(r.map(({ uuid: l }) => l)));
|
|
7505
7545
|
const o = Ch(e)(i);
|
|
7506
7546
|
this.dispatch(xh(o.map(({ uuid: l }) => l))), this.dispatch(pa(a.uuid));
|
|
7507
7547
|
try {
|
|
@@ -7513,7 +7553,7 @@ class D_ extends v {
|
|
|
7513
7553
|
blocks: []
|
|
7514
7554
|
}), this.dispatch(pa(a.uuid));
|
|
7515
7555
|
} catch (l) {
|
|
7516
|
-
throw this.dispatch(ha(a)), this.dispatch(Dh(Object.values(o))), this.dispatch(Xh(n)), this.dispatch(Lh(
|
|
7556
|
+
throw this.dispatch(ha(a)), this.dispatch(Dh(Object.values(o))), this.dispatch(Xh(n)), this.dispatch(Lh(r)), l;
|
|
7517
7557
|
}
|
|
7518
7558
|
}
|
|
7519
7559
|
async refreshStore(e) {
|
|
@@ -7619,8 +7659,8 @@ class V_ extends v {
|
|
|
7619
7659
|
blockers: [e.uuid],
|
|
7620
7660
|
blocks: [e.uuid]
|
|
7621
7661
|
});
|
|
7622
|
-
return n.then((
|
|
7623
|
-
this.dispatch(dt(
|
|
7662
|
+
return n.then((r) => {
|
|
7663
|
+
this.dispatch(dt(r));
|
|
7624
7664
|
}).catch(() => {
|
|
7625
7665
|
this.dispatch(dt(i));
|
|
7626
7666
|
}), [a, n];
|
|
@@ -7682,57 +7722,57 @@ class $_ {
|
|
|
7682
7722
|
});
|
|
7683
7723
|
}
|
|
7684
7724
|
_enqueueRequest(e, s, i) {
|
|
7685
|
-
const a = new
|
|
7725
|
+
const a = new Yr(), n = { ...e, BASE_URL: s, serviceName: i };
|
|
7686
7726
|
if (e.immediate) {
|
|
7687
|
-
const
|
|
7727
|
+
const r = {
|
|
7688
7728
|
...n,
|
|
7689
7729
|
uuid: e.uuid ?? Le()
|
|
7690
7730
|
}, o = {
|
|
7691
|
-
payload:
|
|
7731
|
+
payload: r,
|
|
7692
7732
|
type: "",
|
|
7693
7733
|
meta: {
|
|
7694
7734
|
offline: {
|
|
7695
7735
|
effect: {
|
|
7696
7736
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7697
|
-
request:
|
|
7737
|
+
request: r,
|
|
7698
7738
|
BASE_URL: s,
|
|
7699
7739
|
serviceName: i
|
|
7700
7740
|
}
|
|
7701
7741
|
}
|
|
7702
7742
|
}
|
|
7703
7743
|
};
|
|
7704
|
-
|
|
7744
|
+
wr(o, this).then((l) => {
|
|
7705
7745
|
a.resolve(l.body);
|
|
7706
7746
|
}).catch((l) => {
|
|
7707
|
-
|
|
7747
|
+
Mr(l, o), l instanceof Error ? a.reject(l) : a.reject(new Error((l ?? Ye).toString()));
|
|
7708
7748
|
});
|
|
7709
7749
|
} else {
|
|
7710
|
-
const
|
|
7750
|
+
const r = this.store.dispatch(
|
|
7711
7751
|
Mh(n)
|
|
7712
|
-
), o = (
|
|
7713
|
-
if (
|
|
7714
|
-
a.resolve(
|
|
7752
|
+
), o = (c) => {
|
|
7753
|
+
if (c)
|
|
7754
|
+
a.resolve(c.body);
|
|
7715
7755
|
else {
|
|
7716
7756
|
const d = new x({
|
|
7717
7757
|
message: "Could not get a response from the server.",
|
|
7718
|
-
response:
|
|
7758
|
+
response: c,
|
|
7719
7759
|
discard: !0
|
|
7720
7760
|
});
|
|
7721
7761
|
a.reject(d);
|
|
7722
7762
|
}
|
|
7723
|
-
}, l = (
|
|
7724
|
-
|
|
7763
|
+
}, l = (c) => {
|
|
7764
|
+
c instanceof x ? c.options.discard = !0 : (console.error(
|
|
7725
7765
|
"Received an unexpected error while processing a request:",
|
|
7726
|
-
|
|
7766
|
+
c,
|
|
7727
7767
|
`
|
|
7728
7768
|
Converting error to APIError and discarding.`
|
|
7729
|
-
),
|
|
7769
|
+
), c = new x({
|
|
7730
7770
|
message: "An error occurred while processing the request.",
|
|
7731
|
-
innerError:
|
|
7771
|
+
innerError: c,
|
|
7732
7772
|
discard: !0
|
|
7733
|
-
})), a.reject(
|
|
7773
|
+
})), a.reject(c);
|
|
7734
7774
|
};
|
|
7735
|
-
|
|
7775
|
+
r.then(o, l);
|
|
7736
7776
|
}
|
|
7737
7777
|
return a;
|
|
7738
7778
|
}
|
|
@@ -7742,7 +7782,7 @@ class We {
|
|
|
7742
7782
|
constructor() {
|
|
7743
7783
|
A(this, "graph");
|
|
7744
7784
|
A(this, "requestAttemptCounter");
|
|
7745
|
-
this.graph = new
|
|
7785
|
+
this.graph = new Br(), this.requestAttemptCounter = {};
|
|
7746
7786
|
}
|
|
7747
7787
|
/**
|
|
7748
7788
|
* Used when the app is loaded. Reconstructs the dependency graph based on an outbox from the redux-offline store.
|
|
@@ -7757,14 +7797,14 @@ class We {
|
|
|
7757
7797
|
}
|
|
7758
7798
|
s.sneakRequest(a);
|
|
7759
7799
|
for (let n = 0; n < i; n++) {
|
|
7760
|
-
const
|
|
7761
|
-
if (!
|
|
7800
|
+
const r = e[n];
|
|
7801
|
+
if (!r) {
|
|
7762
7802
|
console.error("Previous outbox item was undefined");
|
|
7763
7803
|
continue;
|
|
7764
7804
|
}
|
|
7765
|
-
|
|
7805
|
+
r.payload.uuid !== a.payload.uuid && r.payload.blocks.some((o) => a.payload.blockers.includes(o)) && We._addDependency(
|
|
7766
7806
|
a.payload.uuid,
|
|
7767
|
-
|
|
7807
|
+
r.payload.uuid,
|
|
7768
7808
|
s.graph
|
|
7769
7809
|
);
|
|
7770
7810
|
}
|
|
@@ -7909,20 +7949,20 @@ export {
|
|
|
7909
7949
|
n_ as AssetTypeFieldValuesService,
|
|
7910
7950
|
s_ as AssetTypeFieldsAttachmentService,
|
|
7911
7951
|
i_ as AssetTypeFieldsService,
|
|
7912
|
-
|
|
7913
|
-
|
|
7952
|
+
r_ as AssetTypeService,
|
|
7953
|
+
Wr as AttachmentModel,
|
|
7914
7954
|
v as BaseApiService,
|
|
7915
7955
|
$_ as BaseSDK,
|
|
7916
|
-
|
|
7917
|
-
|
|
7956
|
+
ic as COMMON_AUTO_FIELDS,
|
|
7957
|
+
c_ as CategoryService,
|
|
7918
7958
|
gm as DEFAULT_ISSUE_PRIORITY,
|
|
7919
7959
|
bm as DEFAULT_ISSUE_STATUS,
|
|
7920
7960
|
M as DEFAULT_PAGINATION_PAGE_SIZE,
|
|
7921
|
-
|
|
7961
|
+
Yr as DeferredPromise,
|
|
7922
7962
|
o_ as DocumentAttachmentService,
|
|
7923
7963
|
d_ as DocumentService,
|
|
7924
|
-
|
|
7925
|
-
|
|
7964
|
+
Lr as EMPTY_ARRAY,
|
|
7965
|
+
Nr as EMPTY_OBJECT,
|
|
7926
7966
|
u_ as EmailDomainsService,
|
|
7927
7967
|
l_ as EmailVerificationService,
|
|
7928
7968
|
h_ as FileService,
|
|
@@ -7949,8 +7989,8 @@ export {
|
|
|
7949
7989
|
z as IssueUpdateChange,
|
|
7950
7990
|
k_ as IssueUpdateService,
|
|
7951
7991
|
E_ as JWTService,
|
|
7952
|
-
|
|
7953
|
-
|
|
7992
|
+
Kr as OUTBOX_RETRY_DELAY,
|
|
7993
|
+
Hr as OrganizationAccessLevel,
|
|
7954
7994
|
M_ as OrganizationAccessService,
|
|
7955
7995
|
q_ as OrganizationService,
|
|
7956
7996
|
We as OutboxCoordinator,
|
|
@@ -7975,14 +8015,14 @@ export {
|
|
|
7975
8015
|
ka as addAssetAttachments,
|
|
7976
8016
|
fs as addAssetProcedure,
|
|
7977
8017
|
Jm as addAssetProcedureAttachment,
|
|
7978
|
-
|
|
7979
|
-
|
|
8018
|
+
Sc as addAssetProcedureAttachments,
|
|
8019
|
+
cs as addAssetProcedureFieldValues,
|
|
7980
8020
|
Af as addAssetProcedureFieldValuesAttachment,
|
|
7981
8021
|
Ft as addAssetProcedureFieldValuesAttachments,
|
|
7982
|
-
|
|
7983
|
-
|
|
8022
|
+
Yc as addAssetProcedureFieldValuesMany,
|
|
8023
|
+
Dc as addAssetProcedureFields,
|
|
7984
8024
|
ef as addAssetProcedureFieldsAttachment,
|
|
7985
|
-
|
|
8025
|
+
kc as addAssetProcedureFieldsAttachments,
|
|
7986
8026
|
of as addAssetProcedureFieldsMany,
|
|
7987
8027
|
ls as addAssetProcedureInstance,
|
|
7988
8028
|
to as addAssetProcedureInstances,
|
|
@@ -8016,7 +8056,7 @@ export {
|
|
|
8016
8056
|
vt as addAssets,
|
|
8017
8057
|
yy as addCategories,
|
|
8018
8058
|
ai as addCategory,
|
|
8019
|
-
|
|
8059
|
+
cc as addConversation,
|
|
8020
8060
|
Cm as addConversations,
|
|
8021
8061
|
Fy as addDocumentAttachment,
|
|
8022
8062
|
Vd as addDocumentAttachments,
|
|
@@ -8077,24 +8117,24 @@ export {
|
|
|
8077
8117
|
RS as addTeams,
|
|
8078
8118
|
Ah as addUser,
|
|
8079
8119
|
Og as addUsers,
|
|
8080
|
-
|
|
8120
|
+
uc as agentsReducer,
|
|
8081
8121
|
Ra as agentsSlice,
|
|
8082
8122
|
Om as areArraysEqual,
|
|
8083
|
-
|
|
8123
|
+
bc as assetAttachmentReducer,
|
|
8084
8124
|
wa as assetAttachmentSlice,
|
|
8085
|
-
|
|
8125
|
+
vc as assetProcedureAttachmentReducer,
|
|
8086
8126
|
Ma as assetProcedureAttachmentSlice,
|
|
8087
|
-
|
|
8127
|
+
Wc as assetProcedureFieldValuesAttachmentReducer,
|
|
8088
8128
|
Ua as assetProcedureFieldValuesAttachmentSlice,
|
|
8089
|
-
|
|
8129
|
+
Xc as assetProcedureFieldValuesReducer,
|
|
8090
8130
|
xa as assetProcedureFieldValuesSlice,
|
|
8091
|
-
|
|
8131
|
+
zc as assetProcedureFieldsAttachmentReducer,
|
|
8092
8132
|
qa as assetProcedureFieldsAttachmentSlice,
|
|
8093
|
-
$
|
|
8133
|
+
$c as assetProcedureFieldsReducer,
|
|
8094
8134
|
ja as assetProcedureFieldsSlice,
|
|
8095
8135
|
ao as assetProcedureInstanceReducer,
|
|
8096
8136
|
Ca as assetProcedureInstanceSlice,
|
|
8097
|
-
|
|
8137
|
+
co as assetProcedureReducer,
|
|
8098
8138
|
Ba as assetProcedureSlice,
|
|
8099
8139
|
To as assetProcedureStepFieldValuesAttachmentReducer,
|
|
8100
8140
|
Ya as assetProcedureStepFieldValuesAttachmentSlice,
|
|
@@ -8111,9 +8151,9 @@ export {
|
|
|
8111
8151
|
$o as assetStageCompletionReducer,
|
|
8112
8152
|
an as assetStageCompletionSlice,
|
|
8113
8153
|
Ho as assetStageReducer,
|
|
8114
|
-
|
|
8154
|
+
rn as assetStageSlice,
|
|
8115
8155
|
sd as assetTypeAttachmentReducer,
|
|
8116
|
-
|
|
8156
|
+
cn as assetTypeAttachmentSlice,
|
|
8117
8157
|
_d as assetTypeFieldValuesAttachmentReducer,
|
|
8118
8158
|
hn as assetTypeFieldValuesAttachmentSlice,
|
|
8119
8159
|
Rd as assetTypeFieldValuesReducer,
|
|
@@ -8127,7 +8167,7 @@ export {
|
|
|
8127
8167
|
Md as authReducer,
|
|
8128
8168
|
Gt as authSlice,
|
|
8129
8169
|
qS as baseReducer,
|
|
8130
|
-
|
|
8170
|
+
_r as baseReducers,
|
|
8131
8171
|
Em as blobToBase64,
|
|
8132
8172
|
Dd as categoryReducer,
|
|
8133
8173
|
bn as categorySlice,
|
|
@@ -8141,18 +8181,18 @@ export {
|
|
|
8141
8181
|
_m as createPointGeometry,
|
|
8142
8182
|
Sm as createSelectionAdapter,
|
|
8143
8183
|
qs as deleteAsset,
|
|
8144
|
-
|
|
8184
|
+
pc as deleteAssetAttachment,
|
|
8145
8185
|
Ea as deleteAssetAttachments,
|
|
8146
8186
|
As as deleteAssetProcedure,
|
|
8147
|
-
|
|
8148
|
-
|
|
8187
|
+
Tc as deleteAssetProcedureAttachment,
|
|
8188
|
+
Fc as deleteAssetProcedureAttachments,
|
|
8149
8189
|
os as deleteAssetProcedureFieldValues,
|
|
8150
8190
|
Sf as deleteAssetProcedureFieldValuesAttachment,
|
|
8151
8191
|
Ot as deleteAssetProcedureFieldValuesAttachments,
|
|
8152
|
-
|
|
8153
|
-
|
|
8192
|
+
Zc as deleteAssetProcedureFieldValuesMany,
|
|
8193
|
+
Vc as deleteAssetProcedureFields,
|
|
8154
8194
|
nf as deleteAssetProcedureFieldsAttachment,
|
|
8155
|
-
|
|
8195
|
+
Mc as deleteAssetProcedureFieldsAttachments,
|
|
8156
8196
|
hf as deleteAssetProcedureFieldsMany,
|
|
8157
8197
|
hs as deleteAssetProcedureInstance,
|
|
8158
8198
|
so as deleteAssetProcedureInstances,
|
|
@@ -8180,7 +8220,7 @@ export {
|
|
|
8180
8220
|
Od as deleteAssetTypeFieldValuesMany,
|
|
8181
8221
|
pd as deleteAssetTypeFields,
|
|
8182
8222
|
VA as deleteAssetTypeFieldsAttachment,
|
|
8183
|
-
|
|
8223
|
+
rd as deleteAssetTypeFieldsAttachments,
|
|
8184
8224
|
HA as deleteAssetTypeFieldsMany,
|
|
8185
8225
|
uy as deleteAssetTypes,
|
|
8186
8226
|
en as deleteAssets,
|
|
@@ -8198,7 +8238,7 @@ export {
|
|
|
8198
8238
|
lu as deleteFormRevisionAttachments,
|
|
8199
8239
|
bu as deleteFormRevisions,
|
|
8200
8240
|
gi as deleteFormSubmission,
|
|
8201
|
-
|
|
8241
|
+
rb as deleteFormSubmissionAttachment,
|
|
8202
8242
|
Mt as deleteFormSubmissionAttachments,
|
|
8203
8243
|
Ht as deleteFormSubmissions,
|
|
8204
8244
|
eb as deleteForms,
|
|
@@ -8233,10 +8273,10 @@ export {
|
|
|
8233
8273
|
Ug as deleteOrganizationAccesses,
|
|
8234
8274
|
Lg as deleteOrganizations,
|
|
8235
8275
|
pa as deleteProject,
|
|
8236
|
-
|
|
8276
|
+
ra as deleteProjectAccess,
|
|
8237
8277
|
xh as deleteProjectAccesses,
|
|
8238
8278
|
Hh as deleteProjectAttachment,
|
|
8239
|
-
|
|
8279
|
+
hr as deleteProjectAttachments,
|
|
8240
8280
|
ep as deleteProjectFile,
|
|
8241
8281
|
tp as deleteProjectFiles,
|
|
8242
8282
|
fS as deleteProjects,
|
|
@@ -8247,7 +8287,7 @@ export {
|
|
|
8247
8287
|
yh as deleteUser,
|
|
8248
8288
|
vg as deleteUsers,
|
|
8249
8289
|
Dp as dequeue,
|
|
8250
|
-
|
|
8290
|
+
Mr as discard,
|
|
8251
8291
|
Wd as documentAttachmentReducer,
|
|
8252
8292
|
Sn as documentAttachmentSlice,
|
|
8253
8293
|
_n as documentSlice,
|
|
@@ -8261,9 +8301,9 @@ export {
|
|
|
8261
8301
|
Mh as enqueueRequest,
|
|
8262
8302
|
b as fallbackToEmptyArray,
|
|
8263
8303
|
Ut as fallbackToEmptyObject,
|
|
8264
|
-
|
|
8304
|
+
cu as fileReducer,
|
|
8265
8305
|
On as fileSlice,
|
|
8266
|
-
|
|
8306
|
+
sc as fileToBlob,
|
|
8267
8307
|
Tu as formReducer,
|
|
8268
8308
|
pu as formRevisionAttachmentReducer,
|
|
8269
8309
|
In as formRevisionAttachmentSlice,
|
|
@@ -8278,18 +8318,18 @@ export {
|
|
|
8278
8318
|
Un as geoImageSlice,
|
|
8279
8319
|
vm as getFileIdentifier,
|
|
8280
8320
|
Zt as getFileS3Key,
|
|
8281
|
-
|
|
8321
|
+
Zr as getLocalDateString,
|
|
8282
8322
|
Rm as getLocalRelativeDateString,
|
|
8283
8323
|
Be as getOutboxCoordinator,
|
|
8284
|
-
|
|
8324
|
+
tc as getRenamedFile,
|
|
8285
8325
|
Ke as hashFile,
|
|
8286
8326
|
G_ as initSDK,
|
|
8287
8327
|
ts as initializeAssetAttachments,
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8328
|
+
gc as initializeAssetProcedureAttachments,
|
|
8329
|
+
Kc as initializeAssetProcedureFieldValues,
|
|
8330
|
+
Gc as initializeAssetProcedureFieldValuesAttachments,
|
|
8331
|
+
Uc as initializeAssetProcedureFields,
|
|
8332
|
+
wc as initializeAssetProcedureFieldsAttachments,
|
|
8293
8333
|
eo as initializeAssetProcedureInstances,
|
|
8294
8334
|
Fo as initializeAssetProcedureStepFieldValues,
|
|
8295
8335
|
bo as initializeAssetProcedureStepFieldValuesAttachments,
|
|
@@ -8307,7 +8347,7 @@ export {
|
|
|
8307
8347
|
vd as initializeAssetTypes,
|
|
8308
8348
|
jo as initializeAssets,
|
|
8309
8349
|
qd as initializeCategories,
|
|
8310
|
-
|
|
8350
|
+
rc as initializeConversations,
|
|
8311
8351
|
xd as initializeDocumentAttachments,
|
|
8312
8352
|
Qd as initializeEmailDomains,
|
|
8313
8353
|
ou as initializeFormRevisionAttachments,
|
|
@@ -8326,7 +8366,7 @@ export {
|
|
|
8326
8366
|
Bl as initializeIssueTypeFields,
|
|
8327
8367
|
ql as initializeIssueTypeFieldsAttachments,
|
|
8328
8368
|
th as initializeIssueTypes,
|
|
8329
|
-
|
|
8369
|
+
ch as initializeIssueUpdates,
|
|
8330
8370
|
Sl as initializeIssues,
|
|
8331
8371
|
_h as initializeOrganizationAccesses,
|
|
8332
8372
|
Ih as initializeOrganizations,
|
|
@@ -8340,7 +8380,7 @@ export {
|
|
|
8340
8380
|
Im as isToday,
|
|
8341
8381
|
Xu as issueAssociationReducer,
|
|
8342
8382
|
Dn as issueAssociationSlice,
|
|
8343
|
-
|
|
8383
|
+
cl as issueAttachmentReducer,
|
|
8344
8384
|
Cn as issueAttachmentSlice,
|
|
8345
8385
|
Al as issueCommentAttachmentReducer,
|
|
8346
8386
|
Bn as issueCommentAttachmentSlice,
|
|
@@ -8358,40 +8398,40 @@ export {
|
|
|
8358
8398
|
Kn as issueTypeFieldsAttachmentSlice,
|
|
8359
8399
|
Kl as issueTypeFieldsReducer,
|
|
8360
8400
|
Zn as issueTypeFieldsSlice,
|
|
8361
|
-
|
|
8362
|
-
|
|
8401
|
+
rh as issueTypeReducer,
|
|
8402
|
+
er as issueTypeSlice,
|
|
8363
8403
|
mh as issueUpdateReducer,
|
|
8364
|
-
|
|
8404
|
+
sr as issueUpdateSlice,
|
|
8365
8405
|
qm as logOnlyOnce,
|
|
8366
8406
|
qh as markAsDeleted,
|
|
8367
8407
|
Yg as markForDeletion,
|
|
8368
8408
|
Ia as memoize,
|
|
8369
8409
|
F as offline,
|
|
8370
8410
|
xm as onlyUniqueHashes,
|
|
8371
|
-
|
|
8411
|
+
nc as onlyUniqueOfflineIds,
|
|
8372
8412
|
Fh as organizationAccessReducer,
|
|
8373
|
-
|
|
8413
|
+
nr as organizationAccessSlice,
|
|
8374
8414
|
kh as organizationReducer,
|
|
8375
|
-
|
|
8415
|
+
cr as organizationSlice,
|
|
8376
8416
|
zh as outboxReducer,
|
|
8377
|
-
|
|
8417
|
+
or as outboxSlice,
|
|
8378
8418
|
DS as overmapEnhancer,
|
|
8379
8419
|
jS as overmapReducer,
|
|
8380
8420
|
vp as overmapReducers,
|
|
8381
|
-
|
|
8421
|
+
wr as performRequest,
|
|
8382
8422
|
Vh as projectAccessReducer,
|
|
8383
|
-
|
|
8423
|
+
dr as projectAccessSlice,
|
|
8384
8424
|
Zh as projectAttachmentReducer,
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8425
|
+
lr as projectAttachmentSlice,
|
|
8426
|
+
cp as projectFileReducer,
|
|
8427
|
+
pr as projectFileSlice,
|
|
8388
8428
|
up as projectReducer,
|
|
8389
|
-
|
|
8429
|
+
mr as projectSlice,
|
|
8390
8430
|
mp as rehydratedReducer,
|
|
8391
|
-
|
|
8431
|
+
Ar as rehydratedSlice,
|
|
8392
8432
|
oi as removeDocuments,
|
|
8393
8433
|
Ji as removeIssueType,
|
|
8394
|
-
|
|
8434
|
+
cS as resetProjectFileObjectUrls,
|
|
8395
8435
|
y as restructureCreateSelectorWithArgs,
|
|
8396
8436
|
ap as saveActiveProjectFileBounds,
|
|
8397
8437
|
fy as selectAccessToken,
|
|
@@ -8401,28 +8441,28 @@ export {
|
|
|
8401
8441
|
dS as selectActiveProjectFileId,
|
|
8402
8442
|
Nd as selectAllDocumentAttachments,
|
|
8403
8443
|
Kh as selectAllProjectAttachments,
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8444
|
+
Ac as selectAssetAttachmentById,
|
|
8445
|
+
mc as selectAssetAttachmentMapping,
|
|
8446
|
+
fc as selectAssetAttachments,
|
|
8407
8447
|
js as selectAssetById,
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8448
|
+
Rc as selectAssetProcedureAttachmentById,
|
|
8449
|
+
Oc as selectAssetProcedureAttachmentMapping,
|
|
8450
|
+
Ic as selectAssetProcedureAttachments,
|
|
8411
8451
|
ys as selectAssetProcedureById,
|
|
8412
8452
|
Va as selectAssetProcedureFieldValues,
|
|
8413
8453
|
_f as selectAssetProcedureFieldValuesAttachmentById,
|
|
8414
|
-
|
|
8415
|
-
|
|
8454
|
+
Lc as selectAssetProcedureFieldValuesAttachments,
|
|
8455
|
+
Nc as selectAssetProcedureFieldValuesAttachmentsByIds,
|
|
8416
8456
|
Da as selectAssetProcedureFieldValuesAttachmentsMapping,
|
|
8417
8457
|
ds as selectAssetProcedureFieldValuesById,
|
|
8418
|
-
|
|
8458
|
+
Qc as selectAssetProcedureFieldValuesMapping,
|
|
8419
8459
|
Ff as selectAssetProcedureFieldValuesOfAsset,
|
|
8420
8460
|
za as selectAssetProcedureFields,
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8461
|
+
cf as selectAssetProcedureFieldsAttachmentById,
|
|
8462
|
+
jc as selectAssetProcedureFieldsAttachments,
|
|
8463
|
+
qc as selectAssetProcedureFieldsAttachmentsMapping,
|
|
8424
8464
|
ff as selectAssetProcedureFieldsById,
|
|
8425
|
-
|
|
8465
|
+
Cc as selectAssetProcedureFieldsMapping,
|
|
8426
8466
|
pf as selectAssetProcedureFieldsOfAssetProcedure,
|
|
8427
8467
|
ps as selectAssetProcedureInstanceById,
|
|
8428
8468
|
Ga as selectAssetProcedureInstances,
|
|
@@ -8453,7 +8493,7 @@ export {
|
|
|
8453
8493
|
yA as selectAssetProcedureStepsByIds,
|
|
8454
8494
|
fA as selectAssetProcedureStepsMappingOfAssetProcedure,
|
|
8455
8495
|
AA as selectAssetProcedureStepsOfAssetProcedure,
|
|
8456
|
-
|
|
8496
|
+
ro as selectAssetProcedures,
|
|
8457
8497
|
Uf as selectAssetProceduresByIds,
|
|
8458
8498
|
La as selectAssetProceduresMapping,
|
|
8459
8499
|
Df as selectAssetProceduresOfOrganization,
|
|
@@ -8481,7 +8521,7 @@ export {
|
|
|
8481
8521
|
$t as selectAssetTypeFields,
|
|
8482
8522
|
$A as selectAssetTypeFieldsAttachmentById,
|
|
8483
8523
|
od as selectAssetTypeFieldsAttachments,
|
|
8484
|
-
|
|
8524
|
+
cd as selectAssetTypeFieldsAttachmentsMapping,
|
|
8485
8525
|
YA as selectAssetTypeFieldsById,
|
|
8486
8526
|
md as selectAssetTypeFieldsMapping,
|
|
8487
8527
|
WA as selectAssetTypeFieldsOfAssetType,
|
|
@@ -8494,10 +8534,10 @@ export {
|
|
|
8494
8534
|
Uo as selectAssetsByIds,
|
|
8495
8535
|
tn as selectAssetsMapping,
|
|
8496
8536
|
sn as selectAssetsOfAssetType,
|
|
8497
|
-
|
|
8537
|
+
yc as selectAttachmentsOfAsset,
|
|
8498
8538
|
Xm as selectAttachmentsOfAssetProcedure,
|
|
8499
|
-
|
|
8500
|
-
|
|
8539
|
+
Hc as selectAttachmentsOfAssetProcedureFieldValues,
|
|
8540
|
+
rf as selectAttachmentsOfAssetProcedureFields,
|
|
8501
8541
|
Po as selectAttachmentsOfAssetProcedureStepFieldValues,
|
|
8502
8542
|
Bf as selectAttachmentsOfAssetProcedureStepFields,
|
|
8503
8543
|
td as selectAttachmentsOfAssetType,
|
|
@@ -8562,7 +8602,7 @@ export {
|
|
|
8562
8602
|
Qu as selectIssueAssociationsOfAsset,
|
|
8563
8603
|
Zu as selectIssueAssociationsOfIssue,
|
|
8564
8604
|
Ju as selectIssueAssociationsToIssue,
|
|
8565
|
-
|
|
8605
|
+
rl as selectIssueAttachmentById,
|
|
8566
8606
|
il as selectIssueAttachmentMapping,
|
|
8567
8607
|
al as selectIssueAttachments,
|
|
8568
8608
|
Vi as selectIssueById,
|
|
@@ -8600,7 +8640,7 @@ export {
|
|
|
8600
8640
|
ph as selectIssueUpdatesOfIssue,
|
|
8601
8641
|
Eb as selectIssues,
|
|
8602
8642
|
Mb as selectIssuesByIds,
|
|
8603
|
-
|
|
8643
|
+
tr as selectIssuesOfIssueType,
|
|
8604
8644
|
bg as selectIssuesOfIssueTypeCount,
|
|
8605
8645
|
mf as selectLatestAssetProcedureFieldsOfAssetProcedure,
|
|
8606
8646
|
Zf as selectLatestAssetProcedureStepFieldsOfAssetProcedureStep,
|
|
@@ -8612,14 +8652,14 @@ export {
|
|
|
8612
8652
|
OS as selectMembershipsByUserOfTeam,
|
|
8613
8653
|
_A as selectNumberOfAssetsOfAssetType,
|
|
8614
8654
|
ta as selectOrganizationAccessById,
|
|
8615
|
-
|
|
8655
|
+
rr as selectOrganizationAccessMapping,
|
|
8616
8656
|
Oh as selectOrganizationAccessUserMapping,
|
|
8617
8657
|
Hg as selectOrganizationById,
|
|
8618
8658
|
ky as selectOrganizationDocuments,
|
|
8619
8659
|
Ng as selectOrganizations,
|
|
8620
8660
|
wh as selectOrganizationsMapping,
|
|
8621
|
-
|
|
8622
|
-
|
|
8661
|
+
ca as selectProjectAccessById,
|
|
8662
|
+
ur as selectProjectAccessMapping,
|
|
8623
8663
|
Yt as selectProjectAccesses,
|
|
8624
8664
|
Ch as selectProjectAccessesOfProject,
|
|
8625
8665
|
Yh as selectProjectAttachmentById,
|
|
@@ -8628,23 +8668,23 @@ export {
|
|
|
8628
8668
|
wy as selectProjectDocuments,
|
|
8629
8669
|
oS as selectProjectFileById,
|
|
8630
8670
|
np as selectProjectFileMapping,
|
|
8631
|
-
|
|
8671
|
+
rp as selectProjectFiles,
|
|
8632
8672
|
lp as selectProjectMapping,
|
|
8633
|
-
|
|
8673
|
+
fr as selectProjects,
|
|
8634
8674
|
yS as selectProjectsOfOrganization,
|
|
8635
8675
|
gS as selectRehydrated,
|
|
8636
8676
|
Ct as selectStageMapping,
|
|
8637
8677
|
ga as selectTeamById,
|
|
8638
8678
|
gp as selectTeamMembershipById,
|
|
8639
|
-
|
|
8679
|
+
br as selectTeamMemberships,
|
|
8640
8680
|
bp as selectTeamMembershipsMapping,
|
|
8641
8681
|
Tp as selectTeams,
|
|
8642
8682
|
ES as selectTeamsByIds,
|
|
8643
|
-
|
|
8683
|
+
Sr as selectTeamsMapping,
|
|
8644
8684
|
MS as selectTeamsOfOrganization,
|
|
8645
|
-
|
|
8685
|
+
ru as selectUploadUrl,
|
|
8646
8686
|
Sh as selectUserById,
|
|
8647
|
-
|
|
8687
|
+
ar as selectUsers,
|
|
8648
8688
|
Eg as selectUsersByIds,
|
|
8649
8689
|
Kt as selectUsersMapping,
|
|
8650
8690
|
xg as selectUsersOfOrganization,
|
|
@@ -8652,10 +8692,10 @@ export {
|
|
|
8652
8692
|
IS as selectUsersOfTeam,
|
|
8653
8693
|
ip as setActiveProjectFileId,
|
|
8654
8694
|
gA as setAsset,
|
|
8655
|
-
|
|
8695
|
+
lc as setAssetAttachment,
|
|
8656
8696
|
Km as setAssetAttachments,
|
|
8657
8697
|
jf as setAssetProcedure,
|
|
8658
|
-
|
|
8698
|
+
_c as setAssetProcedureAttachment,
|
|
8659
8699
|
Zm as setAssetProcedureAttachments,
|
|
8660
8700
|
Pf as setAssetProcedureFieldValues,
|
|
8661
8701
|
yf as setAssetProcedureFieldValuesAttachment,
|
|
@@ -8668,10 +8708,10 @@ export {
|
|
|
8668
8708
|
Rf as setAssetProcedureInstance,
|
|
8669
8709
|
vf as setAssetProcedureInstances,
|
|
8670
8710
|
Eo as setAssetProcedureStep,
|
|
8671
|
-
|
|
8711
|
+
rA as setAssetProcedureStepFieldValues,
|
|
8672
8712
|
tA as setAssetProcedureStepFieldValuesAttachment,
|
|
8673
8713
|
sA as setAssetProcedureStepFieldValuesAttachments,
|
|
8674
|
-
|
|
8714
|
+
cA as setAssetProcedureStepFieldValuesMany,
|
|
8675
8715
|
Hf as setAssetProcedureStepFields,
|
|
8676
8716
|
Vf as setAssetProcedureStepFieldsAttachment,
|
|
8677
8717
|
Cf as setAssetProcedureStepFieldsAttachments,
|
|
@@ -8682,7 +8722,7 @@ export {
|
|
|
8682
8722
|
PA as setAssetStageCompletion,
|
|
8683
8723
|
TA as setAssetStageCompletions,
|
|
8684
8724
|
OA as setAssetStages,
|
|
8685
|
-
|
|
8725
|
+
ry as setAssetType,
|
|
8686
8726
|
Yo as setAssetTypeAttachment,
|
|
8687
8727
|
qA as setAssetTypeAttachments,
|
|
8688
8728
|
sy as setAssetTypeFieldValues,
|
|
@@ -8693,11 +8733,11 @@ export {
|
|
|
8693
8733
|
UA as setAssetTypeFieldsAttachment,
|
|
8694
8734
|
DA as setAssetTypeFieldsAttachments,
|
|
8695
8735
|
LA as setAssetTypeFieldsMany,
|
|
8696
|
-
|
|
8736
|
+
cy as setAssetTypes,
|
|
8697
8737
|
SA as setAssets,
|
|
8698
8738
|
gy as setCategories,
|
|
8699
8739
|
by as setCategory,
|
|
8700
|
-
|
|
8740
|
+
oc as setConversation,
|
|
8701
8741
|
$m as setConversations,
|
|
8702
8742
|
wg as setCurrentUser,
|
|
8703
8743
|
Cd as setDocumentAttachment,
|
|
@@ -8713,7 +8753,7 @@ export {
|
|
|
8713
8753
|
At as setFormSubmission,
|
|
8714
8754
|
ib as setFormSubmissionAttachment,
|
|
8715
8755
|
ab as setFormSubmissionAttachments,
|
|
8716
|
-
|
|
8756
|
+
cb as setFormSubmissions,
|
|
8717
8757
|
Zy as setForms,
|
|
8718
8758
|
nt as setGeoImage,
|
|
8719
8759
|
Vu as setGeoImages,
|
|
@@ -8727,12 +8767,12 @@ export {
|
|
|
8727
8767
|
dl as setIssueCommentAttachment,
|
|
8728
8768
|
gb as setIssueCommentAttachments,
|
|
8729
8769
|
yl as setIssueComments,
|
|
8730
|
-
|
|
8770
|
+
ct as setIssueType,
|
|
8731
8771
|
Ol as setIssueTypeAttachment,
|
|
8732
8772
|
jb as setIssueTypeAttachments,
|
|
8733
8773
|
Nb as setIssueTypeFieldValues,
|
|
8734
|
-
|
|
8735
|
-
|
|
8774
|
+
rg as setIssueTypeFieldValuesAttachment,
|
|
8775
|
+
cg as setIssueTypeFieldValuesAttachments,
|
|
8736
8776
|
Hb as setIssueTypeFieldValuesMany,
|
|
8737
8777
|
Zb as setIssueTypeFields,
|
|
8738
8778
|
xb as setIssueTypeFieldsAttachment,
|
|
@@ -8769,25 +8809,25 @@ export {
|
|
|
8769
8809
|
Um as slugify,
|
|
8770
8810
|
zm as spacesToDashesLower,
|
|
8771
8811
|
yp as teamMembershipReducer,
|
|
8772
|
-
|
|
8812
|
+
yr as teamMembershipSlice,
|
|
8773
8813
|
Fp as teamReducer,
|
|
8774
|
-
|
|
8814
|
+
gr as teamSlice,
|
|
8775
8815
|
jm as toFileNameSafeString,
|
|
8776
|
-
|
|
8816
|
+
ac as toOfflineIdRecord,
|
|
8777
8817
|
Dm as truncate,
|
|
8778
8818
|
st as updateAsset,
|
|
8779
8819
|
Ym as updateAssetAttachment,
|
|
8780
|
-
|
|
8820
|
+
hc as updateAssetAttachments,
|
|
8781
8821
|
Xe as updateAssetProcedure,
|
|
8782
8822
|
Qm as updateAssetProcedureAttachment,
|
|
8783
|
-
|
|
8823
|
+
Pc as updateAssetProcedureAttachments,
|
|
8784
8824
|
Ze as updateAssetProcedureFieldValues,
|
|
8785
8825
|
gf as updateAssetProcedureFieldValuesAttachment,
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8826
|
+
Bc as updateAssetProcedureFieldValuesAttachments,
|
|
8827
|
+
Jc as updateAssetProcedureFieldValuesMany,
|
|
8828
|
+
xc as updateAssetProcedureFields,
|
|
8789
8829
|
af as updateAssetProcedureFieldsAttachment,
|
|
8790
|
-
|
|
8830
|
+
Ec as updateAssetProcedureFieldsAttachments,
|
|
8791
8831
|
lf as updateAssetProcedureFieldsMany,
|
|
8792
8832
|
Qe as updateAssetProcedureInstance,
|
|
8793
8833
|
If as updateAssetProcedureInstances,
|
|
@@ -8821,7 +8861,7 @@ export {
|
|
|
8821
8861
|
bA as updateAssets,
|
|
8822
8862
|
Sy as updateCategories,
|
|
8823
8863
|
jd as updateCategory,
|
|
8824
|
-
|
|
8864
|
+
dc as updateConversation,
|
|
8825
8865
|
Gm as updateConversations,
|
|
8826
8866
|
Iy as updateDocumentAttachment,
|
|
8827
8867
|
$d as updateDocumentAttachments,
|
|
@@ -8852,7 +8892,7 @@ export {
|
|
|
8852
8892
|
ih as updateIssueType,
|
|
8853
8893
|
zb as updateIssueTypeAttachment,
|
|
8854
8894
|
Il as updateIssueTypeAttachments,
|
|
8855
|
-
|
|
8895
|
+
rt as updateIssueTypeFieldValues,
|
|
8856
8896
|
og as updateIssueTypeFieldValuesAttachment,
|
|
8857
8897
|
Jl as updateIssueTypeFieldValuesAttachments,
|
|
8858
8898
|
Wb as updateIssueTypeFieldValuesMany,
|
|
@@ -8874,7 +8914,7 @@ export {
|
|
|
8874
8914
|
sS as updateProjectAttachment,
|
|
8875
8915
|
Nh as updateProjectAttachments,
|
|
8876
8916
|
ua as updateProjectFile,
|
|
8877
|
-
|
|
8917
|
+
rS as updateProjectFiles,
|
|
8878
8918
|
mS as updateProjects,
|
|
8879
8919
|
Pp as updateTeam,
|
|
8880
8920
|
PS as updateTeamMembership,
|
|
@@ -8883,7 +8923,7 @@ export {
|
|
|
8883
8923
|
Rg as updateUser,
|
|
8884
8924
|
Ig as updateUsers,
|
|
8885
8925
|
bh as userReducer,
|
|
8886
|
-
|
|
8926
|
+
ir as userSlice,
|
|
8887
8927
|
Rp as versioningReducer,
|
|
8888
8928
|
Ip as versioningSlice
|
|
8889
8929
|
};
|