@overmap-ai/core 1.0.72-mapbox.0 → 1.0.72-mapbox.2
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 +883 -900
- package/dist/overmap-core.umd.cjs +7 -7
- package/dist/store/slices/authSlice.d.ts +1 -1
- package/dist/store/slices/fileSlice.d.ts +1 -1
- package/dist/store/slices/organizationAccessSlice.d.ts +1 -2
- package/dist/typings/models/access.d.ts +1 -1
- package/package.json +1 -1
package/dist/overmap-core.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var ea = Object.defineProperty;
|
|
2
2
|
var ta = (t, e, s) => e in t ? ea(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
3
|
var y = (t, e, s) => ta(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { v4 as
|
|
4
|
+
import { v4 as le } from "uuid";
|
|
5
5
|
import { createSlice as _, createSelector as p, combineReducers as sa, compose as ia } from "@reduxjs/toolkit";
|
|
6
6
|
import { saveAs as na } from "file-saver";
|
|
7
7
|
import { offline as aa } from "@redux-offline/redux-offline";
|
|
8
|
-
import
|
|
8
|
+
import At from "@redux-offline/redux-offline/lib/defaults";
|
|
9
9
|
import oa from "localforage";
|
|
10
10
|
import ca from "redux-persist-migrate";
|
|
11
|
-
import
|
|
11
|
+
import ue from "superagent";
|
|
12
12
|
import { DepGraph as ra } from "dependency-graph";
|
|
13
13
|
import { openDB as da } from "idb";
|
|
14
14
|
import { RESET_STATE as la } from "@redux-offline/redux-offline/lib/constants";
|
|
@@ -57,9 +57,9 @@ const hu = (t) => ({
|
|
|
57
57
|
type: "MultiPoint",
|
|
58
58
|
coordinates: t
|
|
59
59
|
}), pu = (t, e) => t[0] === e[0] && t[1] === e[1];
|
|
60
|
-
let
|
|
60
|
+
let Ye = !1;
|
|
61
61
|
const _a = "";
|
|
62
|
-
["true", "1"].includes(_a.toLowerCase()) && (
|
|
62
|
+
["true", "1"].includes(_a.toLowerCase()) && (Ye = !0);
|
|
63
63
|
function Sa(t, e) {
|
|
64
64
|
if (t === e) return !0;
|
|
65
65
|
if (typeof t != typeof e)
|
|
@@ -77,7 +77,7 @@ function di(t) {
|
|
|
77
77
|
const e = {};
|
|
78
78
|
return function() {
|
|
79
79
|
const s = Array.prototype.slice.call(arguments);
|
|
80
|
-
return s in e ? (
|
|
80
|
+
return s in e ? (Ye && console.debug(`Memoization debug: Using memorized return value for ${t.toString()}(`, s, ")"), e[s]) : (Ye && console.debug(`Memoization debug: Cache miss! Memoizing ${t.toString()}(`, s, ")"), e[s] = t.apply(this, s));
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
function fu(t, e) {
|
|
@@ -86,25 +86,25 @@ function fu(t, e) {
|
|
|
86
86
|
if (t[s] !== e[s]) return !1;
|
|
87
87
|
return !0;
|
|
88
88
|
}
|
|
89
|
-
const g = (t) => t.length === 0 ? ha : t,
|
|
89
|
+
const g = (t) => t.length === 0 ? ha : t, ye = (t) => Object.keys(t).length === 0 ? ma : t, Ta = di((t) => {
|
|
90
90
|
if (!t) return "";
|
|
91
|
-
const e = new Date(t), s = e.getFullYear() ===
|
|
91
|
+
const e = new Date(t), s = e.getFullYear() === nt.getFullYear(), i = { day: "numeric", month: "short" };
|
|
92
92
|
return s || (i.year = "numeric"), e.toLocaleDateString([], i);
|
|
93
|
-
}), Ra = new Intl.RelativeTimeFormat([], { style: "long", numeric: "auto" }), wa = 1e3 * 86400,
|
|
94
|
-
const i = Math.round((new Date(t).getTime() -
|
|
93
|
+
}), Ra = new Intl.RelativeTimeFormat([], { style: "long", numeric: "auto" }), wa = 1e3 * 86400, nt = /* @__PURE__ */ new Date(), yu = (t) => new Date(t).toDateString() === nt.toDateString(), Au = di((t, e, s) => {
|
|
94
|
+
const i = Math.round((new Date(t).getTime() - nt.getTime()) / wa);
|
|
95
95
|
return i < e || i > s ? Ta(t) : Ra.format(i, "days");
|
|
96
96
|
});
|
|
97
97
|
function Oa(t) {
|
|
98
98
|
return new Uint8Array(t).reduce((s, i) => s + i.toString(16).padStart(2, "0"), "");
|
|
99
99
|
}
|
|
100
|
-
const
|
|
101
|
-
e || (e = await
|
|
100
|
+
const gt = async (t, e) => {
|
|
101
|
+
e || (e = await we(t));
|
|
102
102
|
let s = t.type;
|
|
103
103
|
if (s.includes("/") && (s = s.split("/")[1]), !s)
|
|
104
104
|
throw new Error(`Could not extract file type from ${t.type}`);
|
|
105
105
|
return `${e}.${s}`;
|
|
106
106
|
};
|
|
107
|
-
function
|
|
107
|
+
function we(t) {
|
|
108
108
|
return new Promise((e, s) => {
|
|
109
109
|
const i = new FileReader();
|
|
110
110
|
i.onload = () => {
|
|
@@ -137,7 +137,7 @@ function bu(t, e) {
|
|
|
137
137
|
const _u = async (t) => {
|
|
138
138
|
const e = {};
|
|
139
139
|
for (const s of t) {
|
|
140
|
-
const i = await
|
|
140
|
+
const i = await we(s);
|
|
141
141
|
e[i] = {
|
|
142
142
|
sha1: i,
|
|
143
143
|
extension: s.name.split(".").pop() || "",
|
|
@@ -157,14 +157,14 @@ function Tu(t) {
|
|
|
157
157
|
const e = new Blob([t]);
|
|
158
158
|
na(e, t.name);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const bt = {};
|
|
161
161
|
function Ru(t, e, s, ...i) {
|
|
162
|
-
const n =
|
|
162
|
+
const n = bt[t];
|
|
163
163
|
let a = !1;
|
|
164
|
-
n ? n[e] || (n[e] = !0, a = !0) : (
|
|
164
|
+
n ? n[e] || (n[e] = !0, a = !0) : (bt[t] = { [e]: !0 }, a = !0), a && console[s](...i);
|
|
165
165
|
}
|
|
166
166
|
function R(t) {
|
|
167
|
-
return { ...t, offline_id:
|
|
167
|
+
return { ...t, offline_id: le() };
|
|
168
168
|
}
|
|
169
169
|
function Ea(t) {
|
|
170
170
|
const e = {};
|
|
@@ -254,17 +254,17 @@ function w(t) {
|
|
|
254
254
|
})
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const _e = w(
|
|
258
258
|
(t) => t.offline_id
|
|
259
|
-
),
|
|
259
|
+
), _t = _e.getInitialState({}), li = _({
|
|
260
260
|
name: "agents",
|
|
261
|
-
initialState:
|
|
262
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
261
|
+
initialState: _t,
|
|
262
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, _t)),
|
|
263
263
|
reducers: {
|
|
264
|
-
initializeConversations:
|
|
265
|
-
addConversation:
|
|
266
|
-
setConversation:
|
|
267
|
-
updateConversation:
|
|
264
|
+
initializeConversations: _e.initialize,
|
|
265
|
+
addConversation: _e.addOne,
|
|
266
|
+
setConversation: _e.setOne,
|
|
267
|
+
updateConversation: _e.updateOne
|
|
268
268
|
}
|
|
269
269
|
}), { initializeConversations: Fa, addConversation: qa, setConversation: ja, updateConversation: Pa } = li.actions, ui = (t) => t.agentsReducer.instances, Fu = p(
|
|
270
270
|
[ui],
|
|
@@ -274,10 +274,10 @@ const Se = w(
|
|
|
274
274
|
[ui, (t, e) => e],
|
|
275
275
|
(t, e) => t[e]
|
|
276
276
|
)
|
|
277
|
-
), Da = li.reducer, j = w((t) => t.offline_id),
|
|
277
|
+
), Da = li.reducer, j = w((t) => t.offline_id), St = j.getInitialState({}), hi = _({
|
|
278
278
|
name: "assetAttachments",
|
|
279
|
-
initialState:
|
|
280
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
279
|
+
initialState: St,
|
|
280
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, St)),
|
|
281
281
|
reducers: {
|
|
282
282
|
initializeAssetAttachments: j.initialize,
|
|
283
283
|
addAssetAttachment: j.addOne,
|
|
@@ -290,7 +290,7 @@ const Se = w(
|
|
|
290
290
|
deleteAssetAttachments: j.deleteMany
|
|
291
291
|
}
|
|
292
292
|
}), {
|
|
293
|
-
initializeAssetAttachments:
|
|
293
|
+
initializeAssetAttachments: Tt,
|
|
294
294
|
addAssetAttachment: ju,
|
|
295
295
|
addAssetAttachments: mi,
|
|
296
296
|
setAssetAttachment: Ca,
|
|
@@ -321,10 +321,10 @@ const Se = w(
|
|
|
321
321
|
return { fileAttachments: i, imageAttachments: n };
|
|
322
322
|
}
|
|
323
323
|
)
|
|
324
|
-
), Va = hi.reducer, P = w((t) => t.offline_id),
|
|
324
|
+
), Va = hi.reducer, P = w((t) => t.offline_id), Rt = P.getInitialState({}), yi = _({
|
|
325
325
|
name: "assets",
|
|
326
|
-
initialState:
|
|
327
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
326
|
+
initialState: Rt,
|
|
327
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Rt)),
|
|
328
328
|
reducers: {
|
|
329
329
|
initializeAssets: P.initialize,
|
|
330
330
|
addAsset: P.addOne,
|
|
@@ -338,17 +338,17 @@ const Se = w(
|
|
|
338
338
|
}
|
|
339
339
|
}), {
|
|
340
340
|
initializeAssets: Ga,
|
|
341
|
-
addAsset:
|
|
341
|
+
addAsset: wt,
|
|
342
342
|
addAssets: Ai,
|
|
343
|
-
updateAsset:
|
|
343
|
+
updateAsset: ke,
|
|
344
344
|
updateAssets: xu,
|
|
345
|
-
deleteAsset:
|
|
345
|
+
deleteAsset: Ot,
|
|
346
346
|
deleteAssets: La,
|
|
347
347
|
setAsset: Mu,
|
|
348
348
|
setAssets: zu
|
|
349
349
|
} = yi.actions, gi = (t) => t.assetReducer.instances, Ba = p([gi], (t) => g(Object.values(t))), bi = A(
|
|
350
350
|
p([Ba, (t, e) => e], (t, e) => g(t.filter((s) => s.asset_type === e)))
|
|
351
|
-
),
|
|
351
|
+
), vt = (t) => (e) => e.assetReducer.instances[t], $u = A(
|
|
352
352
|
p([gi, (t, e) => e], (t, e) => {
|
|
353
353
|
const s = [];
|
|
354
354
|
for (const i of e) {
|
|
@@ -359,10 +359,10 @@ const Se = w(
|
|
|
359
359
|
})
|
|
360
360
|
), Uu = (t) => (e) => bi(t)(e).length, Na = yi.reducer, te = w(
|
|
361
361
|
(t) => t.offline_id
|
|
362
|
-
),
|
|
362
|
+
), It = te.getInitialState({}), _i = _({
|
|
363
363
|
name: "assetStageCompletions",
|
|
364
|
-
initialState:
|
|
365
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
364
|
+
initialState: It,
|
|
365
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, It)),
|
|
366
366
|
reducers: {
|
|
367
367
|
initializeAssetStageCompletions: te.initialize,
|
|
368
368
|
addAssetStageCompletion: te.addOne,
|
|
@@ -374,12 +374,12 @@ const Se = w(
|
|
|
374
374
|
}
|
|
375
375
|
}), {
|
|
376
376
|
initializeAssetStageCompletions: Wa,
|
|
377
|
-
addAssetStageCompletion:
|
|
378
|
-
addAssetStageCompletions:
|
|
377
|
+
addAssetStageCompletion: Et,
|
|
378
|
+
addAssetStageCompletions: kt,
|
|
379
379
|
updateAssetStageCompletion: Ha,
|
|
380
380
|
updateAssetStageCompletions: Ka,
|
|
381
|
-
deleteAssetStageCompletion:
|
|
382
|
-
deleteAssetStageCompletions:
|
|
381
|
+
deleteAssetStageCompletion: Ft,
|
|
382
|
+
deleteAssetStageCompletions: qt
|
|
383
383
|
} = _i.actions, Si = (t) => t.assetStageCompletionReducer.instances, Vu = p(
|
|
384
384
|
[Si],
|
|
385
385
|
(t) => {
|
|
@@ -388,7 +388,7 @@ const Se = w(
|
|
|
388
388
|
const { asset: i, stage: n, submitted_at: a } = s;
|
|
389
389
|
e[i] || (e[i] = {}), e[i][n] = a;
|
|
390
390
|
}
|
|
391
|
-
return
|
|
391
|
+
return ye(e);
|
|
392
392
|
}
|
|
393
393
|
), Ya = (t) => (e) => e.assetStageCompletionReducer.instances[t], Ja = A(
|
|
394
394
|
p(
|
|
@@ -402,10 +402,10 @@ const Se = w(
|
|
|
402
402
|
);
|
|
403
403
|
}
|
|
404
404
|
)
|
|
405
|
-
), Xa = _i.reducer, D = w((t) => t.offline_id),
|
|
405
|
+
), Xa = _i.reducer, D = w((t) => t.offline_id), jt = D.getInitialState({}), Ti = _({
|
|
406
406
|
name: "assetStages",
|
|
407
|
-
initialState:
|
|
408
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
407
|
+
initialState: jt,
|
|
408
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, jt)),
|
|
409
409
|
reducers: {
|
|
410
410
|
initializeAssetStages: D.initialize,
|
|
411
411
|
setAssetStage: D.setOne,
|
|
@@ -422,24 +422,24 @@ const Se = w(
|
|
|
422
422
|
setAssetStage: Za,
|
|
423
423
|
setAssetStages: Gu,
|
|
424
424
|
addAssetStage: Lu,
|
|
425
|
-
addAssetStages:
|
|
426
|
-
updateAssetStage:
|
|
427
|
-
updateAssetStages:
|
|
425
|
+
addAssetStages: Je,
|
|
426
|
+
updateAssetStage: Pt,
|
|
427
|
+
updateAssetStages: Ge,
|
|
428
428
|
deleteAssetStage: Bu,
|
|
429
|
-
deleteAssetStages:
|
|
430
|
-
} = Ti.actions, eo = Ti.reducer,
|
|
431
|
-
p([
|
|
429
|
+
deleteAssetStages: Xe
|
|
430
|
+
} = Ti.actions, eo = Ti.reducer, at = (t) => t.assetStageReducer.instances, to = (t) => (e) => e.assetStageReducer.instances[t], so = p([at], (t) => Object.values(t)), Nu = A(
|
|
431
|
+
p([at, (t, e) => e], (t, e) => {
|
|
432
432
|
const s = {};
|
|
433
433
|
for (const [i, n] of Object.entries(t))
|
|
434
434
|
n.asset_type === e && (s[i] = n);
|
|
435
|
-
return
|
|
435
|
+
return ye(s);
|
|
436
436
|
})
|
|
437
437
|
), io = A(
|
|
438
438
|
p([so, (t, e) => e], (t, e) => g(
|
|
439
439
|
t.filter((s) => s.asset_type === e).sort((s, i) => s.priority - i.priority)
|
|
440
440
|
))
|
|
441
|
-
),
|
|
442
|
-
p([
|
|
441
|
+
), Dt = A(
|
|
442
|
+
p([at, (t, e) => e], (t, e) => {
|
|
443
443
|
const s = [];
|
|
444
444
|
for (const i of e) {
|
|
445
445
|
const n = t[i];
|
|
@@ -449,10 +449,10 @@ const Se = w(
|
|
|
449
449
|
})
|
|
450
450
|
), C = w(
|
|
451
451
|
(t) => t.offline_id
|
|
452
|
-
),
|
|
452
|
+
), Ct = C.getInitialState({}), Ri = _({
|
|
453
453
|
name: "assetTypeAttachments",
|
|
454
|
-
initialState:
|
|
455
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
454
|
+
initialState: Ct,
|
|
455
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ct)),
|
|
456
456
|
reducers: {
|
|
457
457
|
initializeAssetTypeAttachments: C.initialize,
|
|
458
458
|
addAssetTypeAttachment: C.addOne,
|
|
@@ -498,10 +498,10 @@ const Se = w(
|
|
|
498
498
|
)
|
|
499
499
|
), ho = Ri.reducer, x = w(
|
|
500
500
|
(t) => t.offline_id
|
|
501
|
-
),
|
|
501
|
+
), xt = x.getInitialState({}), Ii = _({
|
|
502
502
|
name: "assetTypeFieldsAttachments",
|
|
503
|
-
initialState:
|
|
504
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
503
|
+
initialState: xt,
|
|
504
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, xt)),
|
|
505
505
|
reducers: {
|
|
506
506
|
initializeAssetTypeFieldsAttachments: x.initialize,
|
|
507
507
|
addAssetTypeFieldsAttachment: x.addOne,
|
|
@@ -528,10 +528,10 @@ const Se = w(
|
|
|
528
528
|
(t) => Object.values(t)
|
|
529
529
|
), th = A(
|
|
530
530
|
p([go, (t, e) => e], (t, e) => g(t.filter((s) => s.fields_revision === e)))
|
|
531
|
-
), sh = (t) => (e) => e.assetTypeFieldsAttachmentReducer.instances[t], bo = Ii.reducer, M = w((t) => t.offline_id),
|
|
531
|
+
), sh = (t) => (e) => e.assetTypeFieldsAttachmentReducer.instances[t], bo = Ii.reducer, M = w((t) => t.offline_id), Mt = M.getInitialState({}), Ei = _({
|
|
532
532
|
name: "assetTypeFields",
|
|
533
|
-
initialState:
|
|
534
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
533
|
+
initialState: Mt,
|
|
534
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Mt)),
|
|
535
535
|
reducers: {
|
|
536
536
|
initializeAssetTypeFields: M.initialize,
|
|
537
537
|
addAssetTypeFields: M.addOne,
|
|
@@ -553,16 +553,16 @@ const Se = w(
|
|
|
553
553
|
updateAssetTypeFieldsMany: oh,
|
|
554
554
|
deleteAssetTypeFields: Ro,
|
|
555
555
|
deleteAssetTypeFieldsMany: ch
|
|
556
|
-
} = Ei.actions, wo = (t) => t.assetTypeFieldsReducer.instances,
|
|
557
|
-
p([
|
|
556
|
+
} = Ei.actions, wo = (t) => t.assetTypeFieldsReducer.instances, ot = p([wo], (t) => Object.values(t)), rh = A(
|
|
557
|
+
p([ot, (t, e) => e], (t, e) => g(t.filter((s) => s.asset_type === e)))
|
|
558
558
|
), dh = A(
|
|
559
|
-
p([
|
|
559
|
+
p([ot, (t, e) => e], (t, e) => t.filter((s) => s.asset_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
560
560
|
), lh = (t) => (e) => e.assetTypeFieldsReducer.instances[t], Oo = Ei.reducer, z = w(
|
|
561
561
|
(t) => t.offline_id
|
|
562
|
-
),
|
|
562
|
+
), zt = z.getInitialState({}), ki = _({
|
|
563
563
|
name: "assetTypeFieldValuesAttachments",
|
|
564
|
-
initialState:
|
|
565
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
564
|
+
initialState: zt,
|
|
565
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, zt)),
|
|
566
566
|
reducers: {
|
|
567
567
|
initializeAssetTypeFieldValuesAttachments: z.initialize,
|
|
568
568
|
addAssetTypeFieldValuesAttachment: z.addOne,
|
|
@@ -577,13 +577,13 @@ const Se = w(
|
|
|
577
577
|
}), {
|
|
578
578
|
initializeAssetTypeFieldValuesAttachments: vo,
|
|
579
579
|
addAssetTypeFieldValuesAttachment: uh,
|
|
580
|
-
addAssetTypeFieldValuesAttachments:
|
|
580
|
+
addAssetTypeFieldValuesAttachments: Qe,
|
|
581
581
|
setAssetTypeFieldValuesAttachment: hh,
|
|
582
582
|
setAssetTypeFieldValuesAttachments: mh,
|
|
583
583
|
updateAssetTypeFieldValuesAttachment: ph,
|
|
584
584
|
updateAssetTypeFieldValuesAttachments: Io,
|
|
585
585
|
deleteAssetTypeFieldValuesAttachment: fh,
|
|
586
|
-
deleteAssetTypeFieldValuesAttachments:
|
|
586
|
+
deleteAssetTypeFieldValuesAttachments: Ze
|
|
587
587
|
} = ki.actions, Fi = (t) => t.assetTypeFieldValuesAttachmentReducer.instances, Eo = p(
|
|
588
588
|
[Fi],
|
|
589
589
|
(t) => Object.values(t)
|
|
@@ -601,10 +601,10 @@ const Se = w(
|
|
|
601
601
|
p([Eo, (t, e) => e], (t, e) => g(t.filter((s) => s.field_values === e)))
|
|
602
602
|
), qo = ki.reducer, $ = w(
|
|
603
603
|
(t) => t.offline_id
|
|
604
|
-
),
|
|
604
|
+
), $t = $.getInitialState({}), qi = _({
|
|
605
605
|
name: "assetTypeFieldValues",
|
|
606
|
-
initialState:
|
|
607
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
606
|
+
initialState: $t,
|
|
607
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, $t)),
|
|
608
608
|
reducers: {
|
|
609
609
|
initializeAssetTypeFieldValues: $.initialize,
|
|
610
610
|
addAssetTypeFieldValues: $.addOne,
|
|
@@ -618,19 +618,19 @@ const Se = w(
|
|
|
618
618
|
}
|
|
619
619
|
}), {
|
|
620
620
|
initializeAssetTypeFieldValues: jo,
|
|
621
|
-
addAssetTypeFieldValues:
|
|
621
|
+
addAssetTypeFieldValues: Ut,
|
|
622
622
|
addAssetTypeFieldValuesMany: Po,
|
|
623
623
|
setAssetTypeFieldValues: Ah,
|
|
624
624
|
setAssetTypeFieldValuesMany: gh,
|
|
625
|
-
updateAssetTypeFieldValues:
|
|
625
|
+
updateAssetTypeFieldValues: Fe,
|
|
626
626
|
updateAssetTypeFieldValuesMany: Do,
|
|
627
|
-
deleteAssetTypeFieldValues:
|
|
627
|
+
deleteAssetTypeFieldValues: Vt,
|
|
628
628
|
deleteAssetTypeFieldValuesMany: Co
|
|
629
629
|
} = qi.actions, xo = (t) => t.assetTypeFieldValuesReducer.instances, ji = p([xo], (t) => Object.values(t)), bh = A(
|
|
630
630
|
p([ji, (t, e) => e], (t, e) => g(t.filter((s) => s.asset === e)))
|
|
631
631
|
), _h = A(
|
|
632
632
|
p(
|
|
633
|
-
[
|
|
633
|
+
[ot, ji, (t, e) => e],
|
|
634
634
|
(t, e, s) => {
|
|
635
635
|
const i = new Set(
|
|
636
636
|
t.filter((n) => n.asset_type === s).map((n) => n.offline_id)
|
|
@@ -638,10 +638,10 @@ const Se = w(
|
|
|
638
638
|
return g(e.filter((n) => i.has(n.fields_revision)));
|
|
639
639
|
}
|
|
640
640
|
)
|
|
641
|
-
),
|
|
641
|
+
), Gt = (t) => (e) => e.assetTypeFieldValuesReducer.instances[t], Mo = qi.reducer, U = w((t) => t.offline_id), Lt = U.getInitialState({}), Pi = _({
|
|
642
642
|
name: "assetTypes",
|
|
643
|
-
initialState:
|
|
644
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
643
|
+
initialState: Lt,
|
|
644
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Lt)),
|
|
645
645
|
reducers: {
|
|
646
646
|
initializeAssetTypes: U.initialize,
|
|
647
647
|
setAssetType: U.setOne,
|
|
@@ -657,16 +657,16 @@ const Se = w(
|
|
|
657
657
|
initializeAssetTypes: zo,
|
|
658
658
|
setAssetType: Sh,
|
|
659
659
|
setAssetTypes: Th,
|
|
660
|
-
addAssetType:
|
|
660
|
+
addAssetType: Bt,
|
|
661
661
|
addAssetTypes: Rh,
|
|
662
|
-
updateAssetType:
|
|
662
|
+
updateAssetType: qe,
|
|
663
663
|
updateAssetTypes: wh,
|
|
664
|
-
deleteAssetType:
|
|
664
|
+
deleteAssetType: Nt,
|
|
665
665
|
deleteAssetTypes: Oh
|
|
666
666
|
} = Pi.actions, Di = (t) => t.assetTypeReducer.instances, vh = p(
|
|
667
667
|
[Di],
|
|
668
668
|
(t) => Object.values(t)
|
|
669
|
-
),
|
|
669
|
+
), Wt = (t) => (e) => e.assetTypeReducer.instances[t], Ih = A(
|
|
670
670
|
p(
|
|
671
671
|
[Di, (t, e) => e],
|
|
672
672
|
(t, e) => {
|
|
@@ -678,14 +678,14 @@ const Se = w(
|
|
|
678
678
|
return g(s);
|
|
679
679
|
}
|
|
680
680
|
)
|
|
681
|
-
), $o = Pi.reducer,
|
|
681
|
+
), $o = Pi.reducer, Ht = {
|
|
682
682
|
accessToken: "",
|
|
683
683
|
refreshToken: "",
|
|
684
684
|
isLoggedIn: !1
|
|
685
|
-
},
|
|
685
|
+
}, ct = _({
|
|
686
686
|
name: "auth",
|
|
687
|
-
initialState:
|
|
688
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
687
|
+
initialState: Ht,
|
|
688
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ht)),
|
|
689
689
|
reducers: {
|
|
690
690
|
setTokens: (t, e) => {
|
|
691
691
|
t.accessToken = e.payload.accessToken, t.refreshToken = e.payload.refreshToken;
|
|
@@ -694,20 +694,20 @@ const Se = w(
|
|
|
694
694
|
t.accessToken = "", t.refreshToken = "";
|
|
695
695
|
},
|
|
696
696
|
setLoggedIn: (t, e) => {
|
|
697
|
-
e.payload ||
|
|
697
|
+
e.payload || ct.caseReducers.clearTokens(t), t.isLoggedIn = e.payload;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
}), { setTokens: Eh, clearTokens: kh, setLoggedIn: Uo } =
|
|
700
|
+
}), { setTokens: Eh, clearTokens: kh, setLoggedIn: Uo } = ct.actions, Fh = (t) => t.authReducer.accessToken, qh = (t) => t.authReducer.isLoggedIn, Vo = ct.reducer, Se = w((t) => t.offline_id), Kt = Se.getInitialState({}), Ci = _({
|
|
701
701
|
name: "categories",
|
|
702
|
-
initialState:
|
|
703
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
702
|
+
initialState: Kt,
|
|
703
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Kt)),
|
|
704
704
|
reducers: {
|
|
705
|
-
initializeCategories:
|
|
706
|
-
addCategory:
|
|
707
|
-
updateCategory:
|
|
708
|
-
deleteCategory:
|
|
705
|
+
initializeCategories: Se.initialize,
|
|
706
|
+
addCategory: Se.addOne,
|
|
707
|
+
updateCategory: Se.updateOne,
|
|
708
|
+
deleteCategory: Se.deleteOne
|
|
709
709
|
}
|
|
710
|
-
}), { initializeCategories: Go, addCategory:
|
|
710
|
+
}), { initializeCategories: Go, addCategory: Yt, updateCategory: Lo, deleteCategory: Bo } = Ci.actions, xi = (t) => t.categoryReducer.instances, jh = p([xi], (t) => Object.values(t)), Jt = (t) => (e) => e.categoryReducer.instances[t], Ph = A(
|
|
711
711
|
p(
|
|
712
712
|
[xi, (t, e) => e],
|
|
713
713
|
(t, e) => {
|
|
@@ -719,10 +719,10 @@ const Se = w(
|
|
|
719
719
|
return g(s);
|
|
720
720
|
}
|
|
721
721
|
)
|
|
722
|
-
), Dh = (t) => (e) => Object.values(e.issueReducer.instances).filter((s) => s.category === t).length, No = Ci.reducer, V = w((t) => t.offline_id),
|
|
722
|
+
), Dh = (t) => (e) => Object.values(e.issueReducer.instances).filter((s) => s.category === t).length, No = Ci.reducer, V = w((t) => t.offline_id), Xt = V.getInitialState({}), Mi = _({
|
|
723
723
|
name: "documentAttachments",
|
|
724
|
-
initialState:
|
|
725
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
724
|
+
initialState: Xt,
|
|
725
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Xt)),
|
|
726
726
|
reducers: {
|
|
727
727
|
initializeDocumentAttachments: V.initialize,
|
|
728
728
|
addDocumentAttachment: V.addOne,
|
|
@@ -766,13 +766,13 @@ const Se = w(
|
|
|
766
766
|
return { fileAttachments: i, imageAttachments: n };
|
|
767
767
|
}
|
|
768
768
|
)
|
|
769
|
-
), ec = Mi.reducer,
|
|
769
|
+
), ec = Mi.reducer, Qt = {
|
|
770
770
|
documents: {}
|
|
771
771
|
}, $i = _({
|
|
772
772
|
name: "documents",
|
|
773
|
-
initialState:
|
|
773
|
+
initialState: Qt,
|
|
774
774
|
extraReducers: (t) => t.addCase("RESET", (e) => {
|
|
775
|
-
Object.assign(e,
|
|
775
|
+
Object.assign(e, Qt);
|
|
776
776
|
}),
|
|
777
777
|
reducers: {
|
|
778
778
|
setDocuments: (t, e) => {
|
|
@@ -894,12 +894,12 @@ const Se = w(
|
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
|
-
}), { setDocuments: tc, addDocuments:
|
|
898
|
-
[
|
|
897
|
+
}), { setDocuments: tc, addDocuments: Zt, updateDocuments: ne, moveDocument: sc, removeDocuments: es } = $i.actions, Oe = (t) => t.documentsReducer.documents, ic = p(
|
|
898
|
+
[Oe],
|
|
899
899
|
(t) => Object.values(t)
|
|
900
900
|
), nc = (t) => (e) => e.documentsReducer.documents[t], Uh = A(
|
|
901
901
|
p(
|
|
902
|
-
[
|
|
902
|
+
[Oe, (t, e) => e],
|
|
903
903
|
(t, e) => {
|
|
904
904
|
const s = [];
|
|
905
905
|
for (const i of e) {
|
|
@@ -910,7 +910,7 @@ const Se = w(
|
|
|
910
910
|
}
|
|
911
911
|
)
|
|
912
912
|
), Vh = A(
|
|
913
|
-
p([
|
|
913
|
+
p([Oe, (t, e) => e], (t, e) => {
|
|
914
914
|
const s = [], i = t[e];
|
|
915
915
|
if (!i || !i.parent_document) return s;
|
|
916
916
|
let n = t[i.parent_document];
|
|
@@ -921,13 +921,13 @@ const Se = w(
|
|
|
921
921
|
), Gh = p(
|
|
922
922
|
[ic],
|
|
923
923
|
(t) => g(t.filter((e) => !e.parent_document))
|
|
924
|
-
), ac = $i.reducer,
|
|
924
|
+
), ac = $i.reducer, ze = w((t) => t.offline_id), oc = ze.getInitialState({}), Ui = _({
|
|
925
925
|
name: "emailDomains",
|
|
926
926
|
initialState: oc,
|
|
927
927
|
reducers: {
|
|
928
|
-
initializeEmailDomains:
|
|
929
|
-
addEmailDomain:
|
|
930
|
-
deleteEmailDomain:
|
|
928
|
+
initializeEmailDomains: ze.initialize,
|
|
929
|
+
addEmailDomain: ze.addOne,
|
|
930
|
+
deleteEmailDomain: ze.deleteOne
|
|
931
931
|
}
|
|
932
932
|
}), { initializeEmailDomains: cc, addEmailDomain: rc, deleteEmailDomain: dc } = Ui.actions, lc = (t) => t.emailDomainsReducer.instances, uc = p([lc], (t) => Object.values(t)), Lh = A(
|
|
933
933
|
p(
|
|
@@ -936,12 +936,12 @@ const Se = w(
|
|
|
936
936
|
t.filter((s) => s.organization === e)
|
|
937
937
|
)
|
|
938
938
|
)
|
|
939
|
-
), hc = Ui.reducer,
|
|
939
|
+
), hc = Ui.reducer, ts = {
|
|
940
940
|
s3Urls: {}
|
|
941
941
|
}, Vi = 1e3 * 60 * 60, mc = Vi * 24 * 7, Gi = _({
|
|
942
942
|
name: "file",
|
|
943
|
-
initialState:
|
|
944
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
943
|
+
initialState: ts,
|
|
944
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, ts)),
|
|
945
945
|
reducers: {
|
|
946
946
|
setUploadUrl: (t, e) => {
|
|
947
947
|
const { url: s, fields: i, sha1: n } = e.payload, a = /* @__PURE__ */ new Date(), o = new Date(a.getTime() + mc);
|
|
@@ -961,10 +961,10 @@ const Se = w(
|
|
|
961
961
|
return s;
|
|
962
962
|
}, yc = Gi.reducer, G = w(
|
|
963
963
|
(t) => t.offline_id
|
|
964
|
-
),
|
|
964
|
+
), ss = G.getInitialState({}), Li = _({
|
|
965
965
|
name: "formRevisionAttachments",
|
|
966
|
-
initialState:
|
|
967
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
966
|
+
initialState: ss,
|
|
967
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, ss)),
|
|
968
968
|
reducers: {
|
|
969
969
|
initializeFormRevisionAttachments: G.initialize,
|
|
970
970
|
addFormRevisionAttachment: G.addOne,
|
|
@@ -996,17 +996,17 @@ const Se = w(
|
|
|
996
996
|
), Tc = Li.reducer, Rc = (t, e) => {
|
|
997
997
|
const s = t.revision, i = e.revision;
|
|
998
998
|
return s === "Pending" && i === "Pending" ? t.submitted_at < e.submitted_at ? -1 : 1 : s === "Pending" ? 1 : i === "Pending" || s < i ? -1 : 1;
|
|
999
|
-
},
|
|
999
|
+
}, ae = w((t) => t.offline_id), is = ae.getInitialState({}), Bi = _({
|
|
1000
1000
|
name: "formRevisions",
|
|
1001
|
-
initialState:
|
|
1002
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1001
|
+
initialState: is,
|
|
1002
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, is)),
|
|
1003
1003
|
reducers: {
|
|
1004
|
-
initializeFormRevisions:
|
|
1005
|
-
setFormRevision:
|
|
1006
|
-
addFormRevision:
|
|
1007
|
-
addFormRevisions:
|
|
1008
|
-
deleteFormRevision:
|
|
1009
|
-
deleteFormRevisions:
|
|
1004
|
+
initializeFormRevisions: ae.initialize,
|
|
1005
|
+
setFormRevision: ae.setOne,
|
|
1006
|
+
addFormRevision: ae.addOne,
|
|
1007
|
+
addFormRevisions: ae.addMany,
|
|
1008
|
+
deleteFormRevision: ae.deleteOne,
|
|
1009
|
+
deleteFormRevisions: ae.deleteMany
|
|
1010
1010
|
}
|
|
1011
1011
|
}), {
|
|
1012
1012
|
setFormRevision: wc,
|
|
@@ -1015,8 +1015,8 @@ const Se = w(
|
|
|
1015
1015
|
addFormRevisions: vc,
|
|
1016
1016
|
deleteFormRevision: Wi,
|
|
1017
1017
|
deleteFormRevisions: Ic
|
|
1018
|
-
} = Bi.actions,
|
|
1019
|
-
[
|
|
1018
|
+
} = Bi.actions, rt = (t) => t.formRevisionReducer.instances, Ec = p(
|
|
1019
|
+
[rt],
|
|
1020
1020
|
(t) => Object.values(t)
|
|
1021
1021
|
), Jh = (t) => (e) => e.formRevisionReducer.instances[t], kc = (t, e) => {
|
|
1022
1022
|
let s = null;
|
|
@@ -1027,7 +1027,7 @@ const Se = w(
|
|
|
1027
1027
|
return s;
|
|
1028
1028
|
}, Xh = A(
|
|
1029
1029
|
p(
|
|
1030
|
-
[
|
|
1030
|
+
[rt, (t, e) => e],
|
|
1031
1031
|
(t, e) => {
|
|
1032
1032
|
const s = Object.values(t).filter((a) => a.form === e);
|
|
1033
1033
|
if (s.length === 0) return;
|
|
@@ -1040,19 +1040,19 @@ const Se = w(
|
|
|
1040
1040
|
[Ec, (t, e) => e],
|
|
1041
1041
|
(t, e) => g(t.filter((s) => s.form === e))
|
|
1042
1042
|
)
|
|
1043
|
-
), qc = Bi.reducer,
|
|
1043
|
+
), qc = Bi.reducer, oe = w((t) => t.offline_id), ns = oe.getInitialState({}), Hi = _({
|
|
1044
1044
|
name: "forms",
|
|
1045
|
-
initialState:
|
|
1046
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1045
|
+
initialState: ns,
|
|
1046
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, ns)),
|
|
1047
1047
|
reducers: {
|
|
1048
|
-
initializeForms:
|
|
1049
|
-
setForm:
|
|
1050
|
-
addForm:
|
|
1051
|
-
addForms:
|
|
1052
|
-
updateForm:
|
|
1053
|
-
deleteForm:
|
|
1054
|
-
}
|
|
1055
|
-
}), { initializeForms: jc, setForm: Qh, addForm:
|
|
1048
|
+
initializeForms: oe.initialize,
|
|
1049
|
+
setForm: oe.setOne,
|
|
1050
|
+
addForm: oe.addOne,
|
|
1051
|
+
addForms: oe.addMany,
|
|
1052
|
+
updateForm: oe.updateOne,
|
|
1053
|
+
deleteForm: oe.deleteOne
|
|
1054
|
+
}
|
|
1055
|
+
}), { initializeForms: jc, setForm: Qh, addForm: as, addForms: Zh, updateForm: em, deleteForm: os } = Hi.actions, Pc = Hi.reducer, Dc = (t) => t.formReducer.instances, tm = p([Dc], (t) => Object.values(t)), Cc = (t) => (e) => e.formReducer.instances[t], sm = A(
|
|
1056
1056
|
p(
|
|
1057
1057
|
[
|
|
1058
1058
|
(t) => t.formReducer.instances,
|
|
@@ -1061,10 +1061,10 @@ const Se = w(
|
|
|
1061
1061
|
],
|
|
1062
1062
|
(t, e, s) => {
|
|
1063
1063
|
const { searchTerm: i, maxResults: n, organization: a } = s, o = [];
|
|
1064
|
-
for (const [r,
|
|
1065
|
-
if (Number.isInteger(a) && a !==
|
|
1064
|
+
for (const [r, u] of Object.entries(t)) {
|
|
1065
|
+
if (Number.isInteger(a) && a !== u.organization)
|
|
1066
1066
|
continue;
|
|
1067
|
-
kc(e, r).title.toLowerCase().includes(i.toLowerCase()) && o.push(
|
|
1067
|
+
kc(e, r).title.toLowerCase().includes(i.toLowerCase()) && o.push(u);
|
|
1068
1068
|
}
|
|
1069
1069
|
return [...o.slice(0, n)];
|
|
1070
1070
|
},
|
|
@@ -1073,10 +1073,10 @@ const Se = w(
|
|
|
1073
1073
|
)
|
|
1074
1074
|
), L = w(
|
|
1075
1075
|
(t) => t.offline_id
|
|
1076
|
-
),
|
|
1076
|
+
), cs = L.getInitialState({}), Ki = _({
|
|
1077
1077
|
name: "formSubmissionAttachments",
|
|
1078
|
-
initialState:
|
|
1079
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1078
|
+
initialState: cs,
|
|
1079
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, cs)),
|
|
1080
1080
|
reducers: {
|
|
1081
1081
|
initializeFormSubmissionAttachments: L.initialize,
|
|
1082
1082
|
addFormSubmissionAttachment: L.addOne,
|
|
@@ -1091,13 +1091,13 @@ const Se = w(
|
|
|
1091
1091
|
}), {
|
|
1092
1092
|
initializeFormSubmissionAttachments: xc,
|
|
1093
1093
|
addFormSubmissionAttachment: im,
|
|
1094
|
-
addFormSubmissionAttachments:
|
|
1094
|
+
addFormSubmissionAttachments: et,
|
|
1095
1095
|
setFormSubmissionAttachment: nm,
|
|
1096
1096
|
setFormSubmissionAttachments: am,
|
|
1097
1097
|
updateFormSubmissionAttachment: om,
|
|
1098
1098
|
updateFormSubmissionAttachments: Mc,
|
|
1099
1099
|
deleteFormSubmissionAttachment: cm,
|
|
1100
|
-
deleteFormSubmissionAttachments:
|
|
1100
|
+
deleteFormSubmissionAttachments: tt
|
|
1101
1101
|
} = Ki.actions, Yi = (t) => t.formSubmissionAttachmentReducer.instances, zc = A(
|
|
1102
1102
|
p(
|
|
1103
1103
|
[Yi, (t, e) => e],
|
|
@@ -1117,10 +1117,10 @@ const Se = w(
|
|
|
1117
1117
|
)
|
|
1118
1118
|
)
|
|
1119
1119
|
)
|
|
1120
|
-
), Uc = Ki.reducer, B = w((t) => t.offline_id),
|
|
1120
|
+
), Uc = Ki.reducer, B = w((t) => t.offline_id), rs = B.getInitialState({}), Ji = _({
|
|
1121
1121
|
name: "formSubmissions",
|
|
1122
|
-
initialState:
|
|
1123
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1122
|
+
initialState: rs,
|
|
1123
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, rs)),
|
|
1124
1124
|
reducers: {
|
|
1125
1125
|
initializeFormSubmissions: B.initialize,
|
|
1126
1126
|
setFormSubmission: B.setOne,
|
|
@@ -1134,22 +1134,22 @@ const Se = w(
|
|
|
1134
1134
|
}
|
|
1135
1135
|
}), {
|
|
1136
1136
|
initializeFormSubmissions: Vc,
|
|
1137
|
-
setFormSubmission:
|
|
1137
|
+
setFormSubmission: Le,
|
|
1138
1138
|
setFormSubmissions: rm,
|
|
1139
|
-
addFormSubmission:
|
|
1140
|
-
addFormSubmissions:
|
|
1139
|
+
addFormSubmission: ds,
|
|
1140
|
+
addFormSubmissions: dt,
|
|
1141
1141
|
updateFormSubmission: Gc,
|
|
1142
1142
|
updateFormSubmissions: dm,
|
|
1143
|
-
deleteFormSubmission:
|
|
1144
|
-
deleteFormSubmissions:
|
|
1143
|
+
deleteFormSubmission: ls,
|
|
1144
|
+
deleteFormSubmissions: lt
|
|
1145
1145
|
} = Ji.actions, Xi = (t) => t.formSubmissionReducer.instances, Qi = p(
|
|
1146
1146
|
[Xi],
|
|
1147
1147
|
(t) => Object.values(t)
|
|
1148
|
-
),
|
|
1148
|
+
), us = (t) => (e) => e.formSubmissionReducer.instances[t], Lc = A(
|
|
1149
1149
|
p(
|
|
1150
1150
|
[
|
|
1151
1151
|
Xi,
|
|
1152
|
-
|
|
1152
|
+
rt,
|
|
1153
1153
|
(t, e) => e
|
|
1154
1154
|
],
|
|
1155
1155
|
(t, e, s) => {
|
|
@@ -1171,12 +1171,12 @@ const Se = w(
|
|
|
1171
1171
|
[Qi, (t, e) => e],
|
|
1172
1172
|
(t, e) => t.filter((s) => s.asset === e)
|
|
1173
1173
|
)
|
|
1174
|
-
), Wc = Ji.reducer, N = w((t) => t.offline_id),
|
|
1174
|
+
), Wc = Ji.reducer, N = w((t) => t.offline_id), hs = N.getInitialState({}), Zi = _({
|
|
1175
1175
|
name: "geoImages",
|
|
1176
|
-
initialState:
|
|
1176
|
+
initialState: hs,
|
|
1177
1177
|
extraReducers: (t) => {
|
|
1178
1178
|
t.addCase("RESET", (e) => {
|
|
1179
|
-
Object.assign(e,
|
|
1179
|
+
Object.assign(e, hs);
|
|
1180
1180
|
});
|
|
1181
1181
|
},
|
|
1182
1182
|
reducers: {
|
|
@@ -1192,20 +1192,20 @@ const Se = w(
|
|
|
1192
1192
|
}
|
|
1193
1193
|
}), {
|
|
1194
1194
|
initializeGeoImages: Hc,
|
|
1195
|
-
setGeoImage:
|
|
1195
|
+
setGeoImage: je,
|
|
1196
1196
|
setGeoImages: Kc,
|
|
1197
1197
|
addGeoImage: Yc,
|
|
1198
1198
|
addGeoImages: Jc,
|
|
1199
1199
|
updateGeoImage: Xc,
|
|
1200
1200
|
updateGeoImages: lm,
|
|
1201
|
-
deleteGeoImage:
|
|
1201
|
+
deleteGeoImage: ms,
|
|
1202
1202
|
deleteGeoImages: Qc
|
|
1203
|
-
} = Zi.actions, Zc = (t) => t.geoImageReducer.instances, er = p([Zc], (t) => Object.values(t)),
|
|
1203
|
+
} = Zi.actions, Zc = (t) => t.geoImageReducer.instances, er = p([Zc], (t) => Object.values(t)), ps = (t) => (e) => e.geoImageReducer.instances[t], um = A(
|
|
1204
1204
|
p([er, (t, e) => e], (t, e) => g(t.filter((s) => s.project === e)))
|
|
1205
|
-
), tr = Zi.reducer, W = w((t) => t.offline_id),
|
|
1205
|
+
), tr = Zi.reducer, W = w((t) => t.offline_id), fs = W.getInitialState({}), en = _({
|
|
1206
1206
|
name: "issueAssociations",
|
|
1207
|
-
initialState:
|
|
1208
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1207
|
+
initialState: fs,
|
|
1208
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, fs)),
|
|
1209
1209
|
reducers: {
|
|
1210
1210
|
initializeIssueAssociations: W.initialize,
|
|
1211
1211
|
addIssueAssociation: W.addOne,
|
|
@@ -1223,31 +1223,31 @@ const Se = w(
|
|
|
1223
1223
|
setIssueAssociation: mm,
|
|
1224
1224
|
updateIssueAssociation: ir,
|
|
1225
1225
|
updateIssueAssociations: pm,
|
|
1226
|
-
addIssueAssociation:
|
|
1226
|
+
addIssueAssociation: ys,
|
|
1227
1227
|
addIssueAssociations: tn,
|
|
1228
|
-
deleteIssueAssociation:
|
|
1228
|
+
deleteIssueAssociation: As,
|
|
1229
1229
|
deleteIssueAssociations: sn
|
|
1230
|
-
} = en.actions,
|
|
1230
|
+
} = en.actions, Ve = (t) => t.issueAssociationReducer.instances, fm = p([Ve], (t) => Object.values(t)), nr = (t) => (e) => e.issueAssociationReducer.instances[t], ar = A(
|
|
1231
1231
|
p(
|
|
1232
|
-
[
|
|
1232
|
+
[Ve, (t, e) => e],
|
|
1233
1233
|
(t, e) => g(
|
|
1234
1234
|
Object.values(t).filter((s) => s.associated_issue === e)
|
|
1235
1235
|
)
|
|
1236
1236
|
)
|
|
1237
1237
|
), or = A(
|
|
1238
1238
|
p(
|
|
1239
|
-
[
|
|
1239
|
+
[Ve, (t, e) => e],
|
|
1240
1240
|
(t, e) => g(Object.values(t).filter((s) => s.issue === e))
|
|
1241
1241
|
)
|
|
1242
1242
|
), cr = A(
|
|
1243
1243
|
p(
|
|
1244
|
-
[
|
|
1244
|
+
[Ve, (t, e) => e],
|
|
1245
1245
|
(t, e) => g(Object.values(t).filter((s) => s.asset === e))
|
|
1246
1246
|
)
|
|
1247
|
-
), rr = en.reducer, H = w((t) => t.offline_id),
|
|
1247
|
+
), rr = en.reducer, H = w((t) => t.offline_id), gs = H.getInitialState({}), nn = _({
|
|
1248
1248
|
name: "issueAttachments",
|
|
1249
|
-
initialState:
|
|
1250
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1249
|
+
initialState: gs,
|
|
1250
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, gs)),
|
|
1251
1251
|
reducers: {
|
|
1252
1252
|
initializeIssueAttachments: H.initialize,
|
|
1253
1253
|
addIssueAttachment: H.addOne,
|
|
@@ -1291,42 +1291,42 @@ const Se = w(
|
|
|
1291
1291
|
return { fileAttachments: i, imageAttachments: n };
|
|
1292
1292
|
}
|
|
1293
1293
|
)
|
|
1294
|
-
), yr = nn.reducer,
|
|
1294
|
+
), yr = nn.reducer, ce = w((t) => t.offline_id), bs = ce.getInitialState({}), rn = _({
|
|
1295
1295
|
name: "issueComments",
|
|
1296
|
-
initialState:
|
|
1297
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1296
|
+
initialState: bs,
|
|
1297
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, bs)),
|
|
1298
1298
|
reducers: {
|
|
1299
|
-
addIssueComment:
|
|
1300
|
-
addIssueComments:
|
|
1301
|
-
setIssueComment:
|
|
1302
|
-
setIssueComments:
|
|
1303
|
-
deleteIssueComment:
|
|
1304
|
-
deleteIssueComments:
|
|
1299
|
+
addIssueComment: ce.addOne,
|
|
1300
|
+
addIssueComments: ce.addMany,
|
|
1301
|
+
setIssueComment: ce.setOne,
|
|
1302
|
+
setIssueComments: ce.setMany,
|
|
1303
|
+
deleteIssueComment: ce.deleteOne,
|
|
1304
|
+
deleteIssueComments: ce.deleteMany
|
|
1305
1305
|
}
|
|
1306
1306
|
}), {
|
|
1307
1307
|
setIssueComments: Ar,
|
|
1308
|
-
setIssueComment:
|
|
1309
|
-
addIssueComment:
|
|
1308
|
+
setIssueComment: _s,
|
|
1309
|
+
addIssueComment: Ss,
|
|
1310
1310
|
addIssueComments: _m,
|
|
1311
|
-
deleteIssueComment:
|
|
1311
|
+
deleteIssueComment: Ts,
|
|
1312
1312
|
deleteIssueComments: Sm
|
|
1313
1313
|
} = rn.actions, gr = (t) => t.issueCommentReducer.instances, br = (t) => (e) => e.issueCommentReducer.instances[t], Tm = A(
|
|
1314
1314
|
p([gr, (t, e) => e], (t, e) => g(Object.values(t).filter((s) => s.issue === e)))
|
|
1315
|
-
), _r = rn.reducer,
|
|
1315
|
+
), _r = rn.reducer, re = w((t) => t.offline_id), Rs = re.getInitialState({}), dn = _({
|
|
1316
1316
|
name: "issues",
|
|
1317
|
-
initialState:
|
|
1317
|
+
initialState: Rs,
|
|
1318
1318
|
extraReducers: (t) => t.addCase("RESET", (e) => {
|
|
1319
|
-
Object.assign(e,
|
|
1319
|
+
Object.assign(e, Rs);
|
|
1320
1320
|
}),
|
|
1321
1321
|
reducers: {
|
|
1322
|
-
initializeIssues:
|
|
1323
|
-
addIssue:
|
|
1324
|
-
addIssues:
|
|
1325
|
-
updateIssue:
|
|
1326
|
-
deleteIssue:
|
|
1327
|
-
deleteIssues:
|
|
1328
|
-
}
|
|
1329
|
-
}), { initializeIssues: Sr, addIssue:
|
|
1322
|
+
initializeIssues: re.initialize,
|
|
1323
|
+
addIssue: re.addOne,
|
|
1324
|
+
addIssues: re.addMany,
|
|
1325
|
+
updateIssue: re.updateOne,
|
|
1326
|
+
deleteIssue: re.deleteOne,
|
|
1327
|
+
deleteIssues: re.deleteMany
|
|
1328
|
+
}
|
|
1329
|
+
}), { initializeIssues: Sr, addIssue: ws, addIssues: Tr, updateIssue: Be, deleteIssue: Os, deleteIssues: Rr } = dn.actions, wr = (t) => t.issueReducer.instances, vs = (t) => (e) => e.issueReducer.instances[t], Rm = A(
|
|
1330
1330
|
p([wr, (t, e) => e], (t, e) => {
|
|
1331
1331
|
const s = [];
|
|
1332
1332
|
for (const i of e) {
|
|
@@ -1337,10 +1337,10 @@ const Se = w(
|
|
|
1337
1337
|
})
|
|
1338
1338
|
), Or = dn.reducer, K = w(
|
|
1339
1339
|
(t) => t.offline_id
|
|
1340
|
-
),
|
|
1340
|
+
), Is = K.getInitialState({}), ln = _({
|
|
1341
1341
|
name: "issueTypeFieldsAttachments",
|
|
1342
|
-
initialState:
|
|
1343
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1342
|
+
initialState: Is,
|
|
1343
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Is)),
|
|
1344
1344
|
reducers: {
|
|
1345
1345
|
initializeIssueTypeFieldsAttachments: K.initialize,
|
|
1346
1346
|
addIssueTypeFieldsAttachment: K.addOne,
|
|
@@ -1374,10 +1374,10 @@ const Se = w(
|
|
|
1374
1374
|
)
|
|
1375
1375
|
), Fm = (t) => (e) => e.issueTypeFieldsAttachmentReducer.instances[t], jr = ln.reducer, Y = w(
|
|
1376
1376
|
(t) => t.offline_id
|
|
1377
|
-
),
|
|
1377
|
+
), Es = Y.getInitialState({}), un = _({
|
|
1378
1378
|
name: "issueTypeFieldValues",
|
|
1379
|
-
initialState:
|
|
1380
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1379
|
+
initialState: Es,
|
|
1380
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Es)),
|
|
1381
1381
|
reducers: {
|
|
1382
1382
|
initializeIssueTypeFieldValues: Y.initialize,
|
|
1383
1383
|
addIssueTypeFieldValues: Y.addOne,
|
|
@@ -1391,20 +1391,20 @@ const Se = w(
|
|
|
1391
1391
|
}
|
|
1392
1392
|
}), {
|
|
1393
1393
|
initializeIssueTypeFieldValues: Pr,
|
|
1394
|
-
addIssueTypeFieldValues:
|
|
1394
|
+
addIssueTypeFieldValues: ks,
|
|
1395
1395
|
addIssueTypeFieldValuesMany: qm,
|
|
1396
1396
|
setIssueTypeFieldValues: jm,
|
|
1397
1397
|
setIssueTypeFieldValuesMany: Pm,
|
|
1398
|
-
updateIssueTypeFieldValues:
|
|
1398
|
+
updateIssueTypeFieldValues: Pe,
|
|
1399
1399
|
updateIssueTypeFieldValuesMany: Dm,
|
|
1400
|
-
deleteIssueTypeFieldValues:
|
|
1400
|
+
deleteIssueTypeFieldValues: Fs,
|
|
1401
1401
|
deleteIssueTypeFieldValuesMany: Cm
|
|
1402
1402
|
} = un.actions, Dr = (t) => t.issueTypeFieldValuesReducer.instances, hn = p([Dr], (t) => Object.values(t)), xm = A(
|
|
1403
1403
|
p([hn, (t, e) => e], (t, e) => g(t.filter((s) => s.issue === e)))
|
|
1404
|
-
),
|
|
1404
|
+
), qs = (t) => (e) => e.issueTypeFieldValuesReducer.instances[t], Cr = un.reducer, J = w((t) => t.offline_id), js = J.getInitialState({}), mn = _({
|
|
1405
1405
|
name: "issueTypeFields",
|
|
1406
|
-
initialState:
|
|
1407
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1406
|
+
initialState: js,
|
|
1407
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, js)),
|
|
1408
1408
|
reducers: {
|
|
1409
1409
|
initializeIssueTypeFields: J.initialize,
|
|
1410
1410
|
addIssueTypeFields: J.addOne,
|
|
@@ -1426,13 +1426,13 @@ const Se = w(
|
|
|
1426
1426
|
updateIssueTypeFieldsMany: Um,
|
|
1427
1427
|
deleteIssueTypeFields: $r,
|
|
1428
1428
|
deleteIssueTypeFieldsMany: Vm
|
|
1429
|
-
} = mn.actions, Ur = (t) => t.issueTypeFieldsReducer.instances,
|
|
1430
|
-
p([
|
|
1429
|
+
} = mn.actions, Ur = (t) => t.issueTypeFieldsReducer.instances, ut = p([Ur], (t) => Object.values(t)), Gm = A(
|
|
1430
|
+
p([ut, (t, e) => e], (t, e) => g(t.filter((s) => s.issue_type === e)))
|
|
1431
1431
|
), Lm = A(
|
|
1432
|
-
p([
|
|
1432
|
+
p([ut, (t, e) => e], (t, e) => t.filter((s) => s.issue_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
1433
1433
|
), Bm = A(
|
|
1434
1434
|
p(
|
|
1435
|
-
[
|
|
1435
|
+
[ut, hn, (t, e) => e],
|
|
1436
1436
|
(t, e, s) => {
|
|
1437
1437
|
const i = new Set(
|
|
1438
1438
|
t.filter((n) => n.issue_type === s).map((n) => n.offline_id)
|
|
@@ -1442,10 +1442,10 @@ const Se = w(
|
|
|
1442
1442
|
)
|
|
1443
1443
|
), Nm = (t) => (e) => e.issueTypeFieldsReducer.instances[t], Vr = mn.reducer, X = w(
|
|
1444
1444
|
(t) => t.offline_id
|
|
1445
|
-
),
|
|
1445
|
+
), Ps = X.getInitialState({}), pn = _({
|
|
1446
1446
|
name: "issueTypeFieldValuesAttachments",
|
|
1447
|
-
initialState:
|
|
1448
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1447
|
+
initialState: Ps,
|
|
1448
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ps)),
|
|
1449
1449
|
reducers: {
|
|
1450
1450
|
initializeIssueTypeFieldValuesAttachments: X.initialize,
|
|
1451
1451
|
addIssueTypeFieldValuesAttachment: X.addOne,
|
|
@@ -1460,13 +1460,13 @@ const Se = w(
|
|
|
1460
1460
|
}), {
|
|
1461
1461
|
initializeIssueTypeFieldValuesAttachments: Gr,
|
|
1462
1462
|
addIssueTypeFieldValuesAttachment: Wm,
|
|
1463
|
-
addIssueTypeFieldValuesAttachments:
|
|
1463
|
+
addIssueTypeFieldValuesAttachments: st,
|
|
1464
1464
|
setIssueTypeFieldValuesAttachment: Hm,
|
|
1465
1465
|
setIssueTypeFieldValuesAttachments: Km,
|
|
1466
1466
|
updateIssueTypeFieldValuesAttachment: Ym,
|
|
1467
1467
|
updateIssueTypeFieldValuesAttachments: Lr,
|
|
1468
1468
|
deleteIssueTypeFieldValuesAttachment: Jm,
|
|
1469
|
-
deleteIssueTypeFieldValuesAttachments:
|
|
1469
|
+
deleteIssueTypeFieldValuesAttachments: it
|
|
1470
1470
|
} = pn.actions, fn = (t) => t.issueTypeFieldValuesAttachmentReducer.instances, Br = p(
|
|
1471
1471
|
[fn],
|
|
1472
1472
|
(t) => Object.values(t)
|
|
@@ -1485,23 +1485,23 @@ const Se = w(
|
|
|
1485
1485
|
[Br, (t, e) => e],
|
|
1486
1486
|
(t, e) => g(t.filter((s) => s.field_values === e))
|
|
1487
1487
|
)
|
|
1488
|
-
), Hr = pn.reducer,
|
|
1488
|
+
), Hr = pn.reducer, he = w((t) => t.offline_id), Ds = he.getInitialState({}), yn = _({
|
|
1489
1489
|
name: "issueTypes",
|
|
1490
|
-
initialState:
|
|
1490
|
+
initialState: Ds,
|
|
1491
1491
|
extraReducers: (t) => t.addCase("RESET", (e) => {
|
|
1492
|
-
Object.assign(e,
|
|
1492
|
+
Object.assign(e, Ds);
|
|
1493
1493
|
}),
|
|
1494
1494
|
reducers: {
|
|
1495
|
-
initializeIssueTypes:
|
|
1496
|
-
setIssueType:
|
|
1497
|
-
addIssueType:
|
|
1498
|
-
updateIssueType:
|
|
1499
|
-
removeIssueType:
|
|
1495
|
+
initializeIssueTypes: he.initialize,
|
|
1496
|
+
setIssueType: he.setOne,
|
|
1497
|
+
addIssueType: he.addOne,
|
|
1498
|
+
updateIssueType: he.updateOne,
|
|
1499
|
+
removeIssueType: he.deleteOne
|
|
1500
1500
|
}
|
|
1501
|
-
}), { initializeIssueTypes: Kr, setIssueType:
|
|
1501
|
+
}), { initializeIssueTypes: Kr, setIssueType: De, addIssueType: Yr, updateIssueType: Jr, removeIssueType: Cs } = yn.actions, Xr = (t) => t.issueTypeReducer.instances, Qr = p(
|
|
1502
1502
|
Xr,
|
|
1503
1503
|
(t) => Object.values(t)
|
|
1504
|
-
),
|
|
1504
|
+
), xs = (t) => (e) => e.issueTypeReducer.instances[t], Qm = (t) => (e) => {
|
|
1505
1505
|
const s = [];
|
|
1506
1506
|
for (const i of t) {
|
|
1507
1507
|
const n = e.issueTypeReducer.instances[i];
|
|
@@ -1520,17 +1520,17 @@ const Se = w(
|
|
|
1520
1520
|
Object.values(t).filter((s) => s.issue_type === e)
|
|
1521
1521
|
)
|
|
1522
1522
|
)
|
|
1523
|
-
), ep = (t) => (e) => An(t)(e).length, Zr = yn.reducer,
|
|
1523
|
+
), ep = (t) => (e) => An(t)(e).length, Zr = yn.reducer, de = w((t) => t.offline_id), Ms = de.getInitialState({}), gn = _({
|
|
1524
1524
|
name: "issueUpdates",
|
|
1525
|
-
initialState:
|
|
1526
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1525
|
+
initialState: Ms,
|
|
1526
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ms)),
|
|
1527
1527
|
reducers: {
|
|
1528
|
-
initializeIssueUpdates:
|
|
1529
|
-
setIssueUpdate:
|
|
1530
|
-
addIssueUpdate:
|
|
1531
|
-
addIssueUpdates:
|
|
1532
|
-
deleteIssueUpdate:
|
|
1533
|
-
deleteIssueUpdates:
|
|
1528
|
+
initializeIssueUpdates: de.setMany,
|
|
1529
|
+
setIssueUpdate: de.setOne,
|
|
1530
|
+
addIssueUpdate: de.addOne,
|
|
1531
|
+
addIssueUpdates: de.addMany,
|
|
1532
|
+
deleteIssueUpdate: de.deleteOne,
|
|
1533
|
+
deleteIssueUpdates: de.deleteMany
|
|
1534
1534
|
}
|
|
1535
1535
|
}), {
|
|
1536
1536
|
initializeIssueUpdates: ed,
|
|
@@ -1544,30 +1544,30 @@ const Se = w(
|
|
|
1544
1544
|
[ad, (t, e) => e],
|
|
1545
1545
|
(t, e) => g(Object.values(t).filter((s) => s.issue === e))
|
|
1546
1546
|
)
|
|
1547
|
-
), cd = gn.reducer,
|
|
1547
|
+
), cd = gn.reducer, $e = w((t) => t.offline_id), zs = $e.getInitialState({}), bn = _({
|
|
1548
1548
|
name: "license",
|
|
1549
|
-
initialState:
|
|
1550
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1549
|
+
initialState: zs,
|
|
1550
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, zs)),
|
|
1551
1551
|
reducers: {
|
|
1552
|
-
initializeLicences:
|
|
1553
|
-
addLicenses:
|
|
1554
|
-
updateLicense:
|
|
1552
|
+
initializeLicences: $e.initialize,
|
|
1553
|
+
addLicenses: $e.addMany,
|
|
1554
|
+
updateLicense: $e.updateOne
|
|
1555
1555
|
}
|
|
1556
|
-
}), { initializeLicences: rd, addLicenses: sp, updateLicense: se } = bn.actions,
|
|
1557
|
-
[
|
|
1556
|
+
}), { initializeLicences: rd, addLicenses: sp, updateLicense: se } = bn.actions, ht = (t) => t.licenseReducer.instances, ip = (t) => (e) => e.licenseReducer.instances[t], dd = (t) => (e) => Object.values(e.licenseReducer.instances).find((s) => s.project === t), np = p(
|
|
1557
|
+
[ht],
|
|
1558
1558
|
(t) => g(Object.values(t).filter((e) => e.is_active))
|
|
1559
1559
|
), ap = p(
|
|
1560
|
-
[
|
|
1561
|
-
(t) =>
|
|
1560
|
+
[ht],
|
|
1561
|
+
(t) => ye(
|
|
1562
1562
|
Object.values(t).filter((e) => e.project).reduce((e, s) => ({ ...e, [s.project]: s }), {})
|
|
1563
1563
|
)
|
|
1564
|
-
), ld = bn.reducer,
|
|
1564
|
+
), ld = bn.reducer, $s = {
|
|
1565
1565
|
users: {},
|
|
1566
1566
|
currentUser: null
|
|
1567
1567
|
}, _n = _({
|
|
1568
1568
|
name: "users",
|
|
1569
|
-
initialState:
|
|
1570
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1569
|
+
initialState: $s,
|
|
1570
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, $s)),
|
|
1571
1571
|
reducers: {
|
|
1572
1572
|
setUsers: (t, e) => {
|
|
1573
1573
|
const s = {};
|
|
@@ -1594,8 +1594,8 @@ const Se = w(
|
|
|
1594
1594
|
delete t.users[e.payload];
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
|
-
}), { setCurrentUser: op, setProfilePicture: cp, setUsers: ud, addUsers: rp, removeUser: hd } = _n.actions, md = _n.reducer,
|
|
1598
|
-
p([
|
|
1597
|
+
}), { setCurrentUser: op, setProfilePicture: cp, setUsers: ud, addUsers: rp, removeUser: hd } = _n.actions, md = _n.reducer, mt = (t) => t.userReducer.currentUser, pt = (t) => t.userReducer.users, dp = (t) => (e) => e.userReducer.users[t], lp = A(
|
|
1598
|
+
p([pt, (t, e) => e], (t, e) => {
|
|
1599
1599
|
const s = [];
|
|
1600
1600
|
for (const i of e) {
|
|
1601
1601
|
const n = t[i];
|
|
@@ -1603,19 +1603,19 @@ const Se = w(
|
|
|
1603
1603
|
}
|
|
1604
1604
|
return g(s);
|
|
1605
1605
|
})
|
|
1606
|
-
),
|
|
1606
|
+
), Ue = w(
|
|
1607
1607
|
(t) => t.offline_id
|
|
1608
|
-
),
|
|
1608
|
+
), Us = Ue.getInitialState({}), Sn = _({
|
|
1609
1609
|
name: "organizationAccess",
|
|
1610
|
-
initialState:
|
|
1611
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1610
|
+
initialState: Us,
|
|
1611
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Us)),
|
|
1612
1612
|
reducers: {
|
|
1613
|
-
initializeOrganizationAccesses:
|
|
1614
|
-
updateOrganizationAccess:
|
|
1615
|
-
deleteOrganizationAccess:
|
|
1613
|
+
initializeOrganizationAccesses: Ue.initialize,
|
|
1614
|
+
updateOrganizationAccess: Ue.updateOne,
|
|
1615
|
+
deleteOrganizationAccess: Ue.deleteOne
|
|
1616
1616
|
}
|
|
1617
1617
|
}), { initializeOrganizationAccesses: pd, updateOrganizationAccess: fd, deleteOrganizationAccess: yd } = Sn.actions, Tn = (t) => t.organizationAccessReducer.instances, up = (t) => (e) => e.organizationAccessReducer.instances[t], hp = p(
|
|
1618
|
-
[
|
|
1618
|
+
[mt, Tn],
|
|
1619
1619
|
(t, e) => Object.values(e).find(
|
|
1620
1620
|
(i) => i.user === (t == null ? void 0 : t.id)
|
|
1621
1621
|
) ?? null
|
|
@@ -1625,16 +1625,16 @@ const Se = w(
|
|
|
1625
1625
|
const e = {};
|
|
1626
1626
|
for (const s of Object.values(t.organizationAccessReducer.instances))
|
|
1627
1627
|
e[s.user] = s;
|
|
1628
|
-
return
|
|
1629
|
-
}, gd = Sn.reducer,
|
|
1628
|
+
return ye(e);
|
|
1629
|
+
}, gd = Sn.reducer, Te = w((t) => t.offline_id), Vs = Te.getInitialState({}), Rn = _({
|
|
1630
1630
|
name: "projectAccess",
|
|
1631
|
-
initialState:
|
|
1632
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1631
|
+
initialState: Vs,
|
|
1632
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Vs)),
|
|
1633
1633
|
reducers: {
|
|
1634
|
-
initializeProjectAccesses:
|
|
1635
|
-
updateProjectAccess:
|
|
1636
|
-
deleteProjectAccess:
|
|
1637
|
-
deleteProjectAccesses:
|
|
1634
|
+
initializeProjectAccesses: Te.initialize,
|
|
1635
|
+
updateProjectAccess: Te.updateOne,
|
|
1636
|
+
deleteProjectAccess: Te.deleteOne,
|
|
1637
|
+
deleteProjectAccesses: Te.deleteMany
|
|
1638
1638
|
}
|
|
1639
1639
|
}), { initializeProjectAccesses: wn, updateProjectAccess: bd, deleteProjectAccess: _d, deleteProjectAccesses: Sd } = Rn.actions, On = (t) => t.projectAccessReducer.instances, Td = p(
|
|
1640
1640
|
On,
|
|
@@ -1645,13 +1645,13 @@ const Se = w(
|
|
|
1645
1645
|
const e = {};
|
|
1646
1646
|
for (const s of Object.values(t.projectAccessReducer.instances))
|
|
1647
1647
|
e[s.user] = s;
|
|
1648
|
-
return
|
|
1649
|
-
}, wd = Rn.reducer,
|
|
1648
|
+
return ye(e);
|
|
1649
|
+
}, wd = Rn.reducer, Gs = {
|
|
1650
1650
|
projects: {}
|
|
1651
1651
|
}, vn = _({
|
|
1652
1652
|
name: "projects",
|
|
1653
|
-
initialState:
|
|
1654
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1653
|
+
initialState: Gs,
|
|
1654
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Gs)),
|
|
1655
1655
|
reducers: {
|
|
1656
1656
|
setProjects: (t, e) => {
|
|
1657
1657
|
const s = {};
|
|
@@ -1676,10 +1676,10 @@ const Se = w(
|
|
|
1676
1676
|
[On],
|
|
1677
1677
|
(t) => Object.values(t).map((e) => e.user)
|
|
1678
1678
|
), qd = p(
|
|
1679
|
-
[Fd,
|
|
1679
|
+
[Fd, pt],
|
|
1680
1680
|
(t, e) => t.reduce((s, i) => ({ ...s, [i]: e[i] }), {})
|
|
1681
1681
|
), Ap = p(
|
|
1682
|
-
[
|
|
1682
|
+
[mt, qd, Rd],
|
|
1683
1683
|
(t, e, s) => g(
|
|
1684
1684
|
Object.values(e).sort((i, n) => {
|
|
1685
1685
|
if (i.id === (t == null ? void 0 : t.id))
|
|
@@ -1690,12 +1690,12 @@ const Se = w(
|
|
|
1690
1690
|
return (a == null ? void 0 : a.access_level) === (o == null ? void 0 : o.access_level) ? i.username.localeCompare(n.username) : (a == null ? void 0 : a.access_level) === ai.ADMIN ? -1 : 1;
|
|
1691
1691
|
})
|
|
1692
1692
|
)
|
|
1693
|
-
),
|
|
1693
|
+
), Ls = {
|
|
1694
1694
|
organizations: {}
|
|
1695
1695
|
}, En = _({
|
|
1696
1696
|
name: "organizations",
|
|
1697
|
-
initialState:
|
|
1698
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1697
|
+
initialState: Ls,
|
|
1698
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ls)),
|
|
1699
1699
|
reducers: {
|
|
1700
1700
|
setOrganizations: (t, e) => {
|
|
1701
1701
|
for (const s of e.payload)
|
|
@@ -1718,16 +1718,16 @@ const Se = w(
|
|
|
1718
1718
|
)
|
|
1719
1719
|
)
|
|
1720
1720
|
), Sp = A(
|
|
1721
|
-
p([
|
|
1721
|
+
p([ht, (t, e) => e], (t, e) => g(
|
|
1722
1722
|
Object.values(t).filter((s) => s.organization_owner === e)
|
|
1723
1723
|
))
|
|
1724
1724
|
), xd = p(
|
|
1725
|
-
[Cd,
|
|
1726
|
-
(t, e) =>
|
|
1725
|
+
[Cd, pt],
|
|
1726
|
+
(t, e) => ye(
|
|
1727
1727
|
t.reduce((s, i) => ({ ...s, [i]: e[i] }), {})
|
|
1728
1728
|
)
|
|
1729
1729
|
), Tp = p(
|
|
1730
|
-
[
|
|
1730
|
+
[mt, xd, Ad],
|
|
1731
1731
|
(t, e, s) => g(
|
|
1732
1732
|
Object.values(e).sort((i, n) => {
|
|
1733
1733
|
if (i.id === (t == null ? void 0 : t.id))
|
|
@@ -1739,7 +1739,7 @@ const Se = w(
|
|
|
1739
1739
|
})
|
|
1740
1740
|
)
|
|
1741
1741
|
), Md = En.reducer, zd = (t, e, s) => {
|
|
1742
|
-
const i = t.uuid ? t : { ...t, uuid:
|
|
1742
|
+
const i = t.uuid ? t : { ...t, uuid: le() };
|
|
1743
1743
|
return {
|
|
1744
1744
|
payload: i,
|
|
1745
1745
|
type: "",
|
|
@@ -1754,13 +1754,13 @@ const Se = w(
|
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
1756
|
};
|
|
1757
|
-
},
|
|
1757
|
+
}, Bs = {
|
|
1758
1758
|
deletedRequests: [],
|
|
1759
1759
|
latestRetryTime: 0
|
|
1760
1760
|
}, kn = _({
|
|
1761
1761
|
name: "outbox",
|
|
1762
|
-
initialState:
|
|
1763
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1762
|
+
initialState: Bs,
|
|
1763
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Bs)),
|
|
1764
1764
|
reducers: {
|
|
1765
1765
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
1766
1766
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -1784,10 +1784,10 @@ const Se = w(
|
|
|
1784
1784
|
t.latestRetryTime = e.payload;
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
}), Rp = (t) => t.outboxReducer.deletedRequests, wp = (t) => t.outboxReducer.latestRetryTime, { enqueueRequest: $d, markForDeletion: Op, markAsDeleted: Ud, _setLatestRetryTime: Vd } = kn.actions, Gd = kn.reducer, Q = w((t) => t.offline_id),
|
|
1787
|
+
}), Rp = (t) => t.outboxReducer.deletedRequests, wp = (t) => t.outboxReducer.latestRetryTime, { enqueueRequest: $d, markForDeletion: Op, markAsDeleted: Ud, _setLatestRetryTime: Vd } = kn.actions, Gd = kn.reducer, Q = w((t) => t.offline_id), Ns = Q.getInitialState({}), Fn = _({
|
|
1788
1788
|
name: "projectAttachments",
|
|
1789
|
-
initialState:
|
|
1790
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1789
|
+
initialState: Ns,
|
|
1790
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ns)),
|
|
1791
1791
|
reducers: {
|
|
1792
1792
|
initializeProjectAttachments: Q.initialize,
|
|
1793
1793
|
addProjectAttachment: Q.addOne,
|
|
@@ -1828,13 +1828,13 @@ const Se = w(
|
|
|
1828
1828
|
return { fileAttachments: i, imageAttachments: n };
|
|
1829
1829
|
}
|
|
1830
1830
|
)
|
|
1831
|
-
), Qd = Fn.reducer, Z = w((t) => t.offline_id),
|
|
1831
|
+
), Qd = Fn.reducer, Z = w((t) => t.offline_id), Ws = Z.getInitialState({
|
|
1832
1832
|
activeProjectFileId: null,
|
|
1833
1833
|
isImportingProjectFile: !1
|
|
1834
1834
|
}), Pn = _({
|
|
1835
1835
|
name: "projectFiles",
|
|
1836
|
-
initialState:
|
|
1837
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1836
|
+
initialState: Ws,
|
|
1837
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ws)),
|
|
1838
1838
|
reducers: {
|
|
1839
1839
|
initializeProjectFiles: Z.initialize,
|
|
1840
1840
|
setProjectFile: Z.setOne,
|
|
@@ -1874,7 +1874,7 @@ const Se = w(
|
|
|
1874
1874
|
setProjectFiles: Fp,
|
|
1875
1875
|
addProjectFile: qp,
|
|
1876
1876
|
addProjectFiles: el,
|
|
1877
|
-
updateProjectFile:
|
|
1877
|
+
updateProjectFile: Hs,
|
|
1878
1878
|
updateProjectFiles: jp,
|
|
1879
1879
|
deleteProjectFile: tl,
|
|
1880
1880
|
deleteProjectFiles: sl,
|
|
@@ -1894,18 +1894,18 @@ const Se = w(
|
|
|
1894
1894
|
t.isRehydrated = e.payload;
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
|
-
}), { setRehydrated: Mp } = Dn.actions, zp = (t) => t.rehydratedReducer.isRehydrated, ll = Dn.reducer,
|
|
1897
|
+
}), { setRehydrated: Mp } = Dn.actions, zp = (t) => t.rehydratedReducer.isRehydrated, ll = Dn.reducer, me = w((t) => t.offline_id), Ks = me.getInitialState({}), Cn = _({
|
|
1898
1898
|
name: "teams",
|
|
1899
|
-
initialState:
|
|
1900
|
-
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e,
|
|
1899
|
+
initialState: Ks,
|
|
1900
|
+
extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ks)),
|
|
1901
1901
|
reducers: {
|
|
1902
|
-
setTeam:
|
|
1903
|
-
initializeTeams:
|
|
1904
|
-
addTeam:
|
|
1905
|
-
updateTeam:
|
|
1906
|
-
deleteTeam:
|
|
1902
|
+
setTeam: me.setOne,
|
|
1903
|
+
initializeTeams: me.initialize,
|
|
1904
|
+
addTeam: me.addOne,
|
|
1905
|
+
updateTeam: me.updateOne,
|
|
1906
|
+
deleteTeam: me.deleteOne
|
|
1907
1907
|
}
|
|
1908
|
-
}), { setTeam:
|
|
1908
|
+
}), { setTeam: ge, initializeTeams: ul, addTeam: hl, updateTeam: Ys, deleteTeam: Js } = Cn.actions, xn = (t) => t.teamReducer.instances, Mn = p([xn], (t) => Object.values(t)), be = (t) => (e) => e.teamReducer.instances[t], $p = A(
|
|
1909
1909
|
p(
|
|
1910
1910
|
[xn, (t, e) => e],
|
|
1911
1911
|
(t, e) => {
|
|
@@ -1930,20 +1930,20 @@ const Se = w(
|
|
|
1930
1930
|
name: "versioning",
|
|
1931
1931
|
initialState: pl,
|
|
1932
1932
|
reducers: {}
|
|
1933
|
-
}), yl = fl.reducer,
|
|
1933
|
+
}), yl = fl.reducer, pe = w((t) => t.offline_id), Al = pe.getInitialState({}), zn = _({
|
|
1934
1934
|
name: "workspace",
|
|
1935
1935
|
initialState: Al,
|
|
1936
1936
|
reducers: {
|
|
1937
|
-
initializeWorkspaces:
|
|
1938
|
-
setWorkspaces:
|
|
1939
|
-
addWorkspace:
|
|
1940
|
-
updateWorkspace:
|
|
1941
|
-
deleteWorkspace:
|
|
1937
|
+
initializeWorkspaces: pe.initialize,
|
|
1938
|
+
setWorkspaces: pe.setMany,
|
|
1939
|
+
addWorkspace: pe.addOne,
|
|
1940
|
+
updateWorkspace: pe.updateOne,
|
|
1941
|
+
deleteWorkspace: pe.deleteOne
|
|
1942
1942
|
}
|
|
1943
|
-
}), { initializeWorkspaces: gl, setWorkspaces: Gp, addWorkspace:
|
|
1943
|
+
}), { initializeWorkspaces: gl, setWorkspaces: Gp, addWorkspace: Xs, updateWorkspace: Ce, deleteWorkspace: Qs } = zn.actions, $n = (t) => t.workspaceReducer.instances, bl = p([$n], (t) => Object.values(t)), Lp = p(
|
|
1944
1944
|
[bl],
|
|
1945
1945
|
(t) => t.find((e) => e.name.toLowerCase() === "main")
|
|
1946
|
-
),
|
|
1946
|
+
), Zs = (t) => (e) => e.workspaceReducer.instances[t], Bp = p(
|
|
1947
1947
|
[$n],
|
|
1948
1948
|
(t) => new Set(
|
|
1949
1949
|
Object.values(t).filter((e) => e.permitted).map((e) => e.offline_id)
|
|
@@ -1953,7 +1953,7 @@ let Un;
|
|
|
1953
1953
|
function Sl(t) {
|
|
1954
1954
|
Un = t;
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function Ie() {
|
|
1957
1957
|
return Un;
|
|
1958
1958
|
}
|
|
1959
1959
|
let Vn;
|
|
@@ -1977,10 +1977,10 @@ class Ln {
|
|
|
1977
1977
|
this.client.store.dispatch(e);
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
|
-
const Bn = "versioning", Nn = () => Hn.length - 1, Wn = (t) => (t[Bn] = { version: Nn() }, t),
|
|
1980
|
+
const Bn = "versioning", Nn = () => Hn.length - 1, Wn = (t) => (t[Bn] = { version: Nn() }, t), ei = () => Wn({}), wl = (t) => (t.outboxReducer && (t.outboxReducer.deletedRequests = []), t), Ol = (t) => (e) => {
|
|
1981
1981
|
var s;
|
|
1982
1982
|
return e === void 0 && (e = {}), ((s = e[Bn]) == null ? void 0 : s.version) === Nn() ? e : t(e);
|
|
1983
|
-
}, Hn = [Wn,
|
|
1983
|
+
}, Hn = [Wn, ei, ei, wl], vl = Object.fromEntries(Hn.map((t, e) => [e, Ol(t)])), Kn = "versioning", Il = {
|
|
1984
1984
|
// TODO: attachmentReducer,
|
|
1985
1985
|
[Kn]: yl,
|
|
1986
1986
|
fileReducer: yc,
|
|
@@ -2028,26 +2028,26 @@ const Bn = "versioning", Nn = () => Hn.length - 1, Wn = (t) => (t[Bn] = { versio
|
|
|
2028
2028
|
assetTypeFieldValuesReducer: Mo,
|
|
2029
2029
|
assetTypeFieldsAttachmentReducer: bo,
|
|
2030
2030
|
assetTypeFieldValuesAttachmentReducer: qo
|
|
2031
|
-
},
|
|
2032
|
-
let
|
|
2033
|
-
function
|
|
2034
|
-
const t =
|
|
2031
|
+
}, ti = sa(Il), El = "RESET", Np = (t, e) => e.type === "auth/setLoggedIn" && !e.payload ? ti(void 0, e) : ti(t, e);
|
|
2032
|
+
let Ne = null;
|
|
2033
|
+
function fe() {
|
|
2034
|
+
const t = Ie();
|
|
2035
2035
|
if (!t)
|
|
2036
2036
|
return console.warn("Client store not set; cannot get outbox coordinator yet."), null;
|
|
2037
|
-
if (
|
|
2038
|
-
return
|
|
2039
|
-
const e = t.getState().offline.outbox, s =
|
|
2040
|
-
return
|
|
2037
|
+
if (Ne)
|
|
2038
|
+
return Ne;
|
|
2039
|
+
const e = t.getState().offline.outbox, s = Re._fromOutbox(e);
|
|
2040
|
+
return Ne = s, s;
|
|
2041
2041
|
}
|
|
2042
2042
|
const kl = (t) => {
|
|
2043
2043
|
if (t) throw t;
|
|
2044
|
-
const e =
|
|
2044
|
+
const e = Ie();
|
|
2045
2045
|
e ? e.dispatch({ type: "rehydrated/setRehydrated", payload: !0 }) : console.error("Client store not set");
|
|
2046
2046
|
}, Fl = (t, e, s) => {
|
|
2047
|
-
const i =
|
|
2047
|
+
const i = fe();
|
|
2048
2048
|
return i ? (i.addRequest(e), i.getQueue()) : (console.warn("Outbox coordinator not set; cannot enqueue request yet."), []);
|
|
2049
2049
|
}, ql = (t, e, s) => {
|
|
2050
|
-
const i =
|
|
2050
|
+
const i = fe();
|
|
2051
2051
|
if (!i)
|
|
2052
2052
|
return console.warn("Outbox coordinator not set; cannot dequeue request yet."), [];
|
|
2053
2053
|
const a = e.meta.offlineAction.payload.uuid;
|
|
@@ -2059,7 +2059,7 @@ async function jl(t, e) {
|
|
|
2059
2059
|
return Ul(e);
|
|
2060
2060
|
}
|
|
2061
2061
|
const Pl = {
|
|
2062
|
-
...
|
|
2062
|
+
...At,
|
|
2063
2063
|
effect: jl,
|
|
2064
2064
|
// Casting needed because we are saving FullOfflineAction objects, not just OfflineAction objects,
|
|
2065
2065
|
// but redux-offline does not know this.
|
|
@@ -2074,7 +2074,7 @@ const Pl = {
|
|
|
2074
2074
|
// and custom dequeue for e.g. if user insists on removing a failed a "create issue", then remove the "edit
|
|
2075
2075
|
// that same issue"
|
|
2076
2076
|
queue: {
|
|
2077
|
-
...
|
|
2077
|
+
...At.queue,
|
|
2078
2078
|
enqueue: Fl,
|
|
2079
2079
|
dequeue: ql,
|
|
2080
2080
|
// Bad typing, undefined is actually fine, and the action is a FullOfflineAction, not just an OfflineAction.
|
|
@@ -2103,7 +2103,7 @@ async function Yn(t, e) {
|
|
|
2103
2103
|
const a = {
|
|
2104
2104
|
queryParams: "",
|
|
2105
2105
|
isAuthNeeded: !0
|
|
2106
|
-
}, o = t.meta.offline.effect, { payload: r, headers:
|
|
2106
|
+
}, o = t.meta.offline.effect, { payload: r, headers: u, method: c, queryParams: l, attachmentHash: h, isExternalUrl: m, isAuthNeeded: f, isResponseBlob: b } = {
|
|
2107
2107
|
...a,
|
|
2108
2108
|
...o.request
|
|
2109
2109
|
}, T = o.request;
|
|
@@ -2118,43 +2118,43 @@ async function Yn(t, e) {
|
|
|
2118
2118
|
if (!q) throw new Error(`No S3 URL for file ${h}`);
|
|
2119
2119
|
if ("warning" in q) throw new Error(`S3 URL warning for file ${h}`);
|
|
2120
2120
|
if (!E) throw new Error(`No file for file ${h}`);
|
|
2121
|
-
const
|
|
2122
|
-
if (!
|
|
2123
|
-
return v.set("x-amz-checksum-sha1",
|
|
2121
|
+
const Ae = q.fields["x-amz-checksum-sha1"];
|
|
2122
|
+
if (!Ae) throw new Error(`No checksum for file ${h}`);
|
|
2123
|
+
return v.set("x-amz-checksum-sha1", Ae).field({ ...r, ...q.fields }).attach("file", E);
|
|
2124
2124
|
}
|
|
2125
2125
|
return v.send(r);
|
|
2126
2126
|
}, Zn = {
|
|
2127
|
-
[d.GET]: () => b ?
|
|
2127
|
+
[d.GET]: () => b ? ue.get(S.toString()).responseType("blob") : ue.get(S.toString()),
|
|
2128
2128
|
[d.POST]: () => {
|
|
2129
|
-
const v =
|
|
2129
|
+
const v = ue.post(S.toString());
|
|
2130
2130
|
return ee(v);
|
|
2131
2131
|
},
|
|
2132
2132
|
[d.PATCH]: () => {
|
|
2133
|
-
const v =
|
|
2133
|
+
const v = ue.patch(S.toString());
|
|
2134
2134
|
return ee(v);
|
|
2135
2135
|
},
|
|
2136
2136
|
[d.PUT]: () => {
|
|
2137
|
-
const v =
|
|
2137
|
+
const v = ue.put(S.toString());
|
|
2138
2138
|
return ee(v);
|
|
2139
2139
|
},
|
|
2140
2140
|
[d.DELETE]: () => {
|
|
2141
|
-
const v =
|
|
2141
|
+
const v = ue.delete(S.toString());
|
|
2142
2142
|
return ee(v);
|
|
2143
2143
|
}
|
|
2144
2144
|
}[c];
|
|
2145
|
-
let
|
|
2145
|
+
let ie = Zn();
|
|
2146
2146
|
if (f && i) {
|
|
2147
2147
|
const v = s.auth.getAuthHeader();
|
|
2148
|
-
|
|
2148
|
+
ie = ie.set("Authorization", v);
|
|
2149
2149
|
}
|
|
2150
|
-
|
|
2150
|
+
u && (ie = ie.set(u));
|
|
2151
2151
|
try {
|
|
2152
|
-
return await
|
|
2152
|
+
return await ie.query(l);
|
|
2153
2153
|
} catch (v) {
|
|
2154
|
-
const q = Cl(v),
|
|
2155
|
-
if (i &&
|
|
2156
|
-
return await s.auth.handleUnauthorized(
|
|
2157
|
-
throw new k({ response: q, innerError: v, discard: Xn.includes(
|
|
2154
|
+
const q = Cl(v), Ae = q == null ? void 0 : q.status;
|
|
2155
|
+
if (i && Ae === 401)
|
|
2156
|
+
return await s.auth.handleUnauthorized(ie, q), ie.query(l);
|
|
2157
|
+
throw new k({ response: q, innerError: v, discard: Xn.includes(Ae) });
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
2160
|
class xl {
|
|
@@ -2185,7 +2185,7 @@ class Jn {
|
|
|
2185
2185
|
if (this.next)
|
|
2186
2186
|
return this.next.run(e);
|
|
2187
2187
|
{
|
|
2188
|
-
if (console.debug("Middleware finished. Performing request:", e), !
|
|
2188
|
+
if (console.debug("Middleware finished. Performing request:", e), !Ie()) throw new Error("Client store not set");
|
|
2189
2189
|
const i = Rl();
|
|
2190
2190
|
if (!i) throw new Error("Client SDK not set");
|
|
2191
2191
|
return Yn(e, i);
|
|
@@ -2226,13 +2226,13 @@ Retries:`,
|
|
|
2226
2226
|
t,
|
|
2227
2227
|
"(throwing immediately, which may lead to unexpected behavior)"
|
|
2228
2228
|
), t;
|
|
2229
|
-
const i =
|
|
2229
|
+
const i = Ie(), a = i.getState().outboxReducer.deletedRequests, o = e.payload.uuid;
|
|
2230
2230
|
function r() {
|
|
2231
2231
|
i.dispatch(Ud(o));
|
|
2232
|
-
const
|
|
2233
|
-
if (!
|
|
2232
|
+
const l = fe();
|
|
2233
|
+
if (!l)
|
|
2234
2234
|
throw new Error("Outbox coordinator not set");
|
|
2235
|
-
|
|
2235
|
+
l.remove(e.payload.uuid);
|
|
2236
2236
|
const h = e.meta.offline.rollback;
|
|
2237
2237
|
throw h && (console.warn("Rolling back request due to SDK error:", e), i.dispatch(h)), t;
|
|
2238
2238
|
}
|
|
@@ -2241,30 +2241,30 @@ Retries:`,
|
|
|
2241
2241
|
if (a.includes(o))
|
|
2242
2242
|
return console.debug("Discarding request due to deletion:", e), r();
|
|
2243
2243
|
if (t instanceof k) {
|
|
2244
|
-
const
|
|
2245
|
-
if (
|
|
2244
|
+
const l = t.status || ((c = t.response) == null ? void 0 : c.status);
|
|
2245
|
+
if (l || console.warn("Error has no status code:", t), l !== void 0 && Xn.includes(l)) {
|
|
2246
2246
|
console.warn("Discarding request due to error:", t, `
|
|
2247
2247
|
Action:`, e);
|
|
2248
|
-
const h =
|
|
2248
|
+
const h = fe();
|
|
2249
2249
|
if (!h)
|
|
2250
2250
|
throw new Error("Outbox coordinator not set");
|
|
2251
2251
|
h.remove(e.payload.uuid), t.options.discard = !0, r();
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
console.debug("Registering a retry for request:", e.payload.uuid);
|
|
2255
|
-
const
|
|
2256
|
-
if (!
|
|
2255
|
+
const u = fe();
|
|
2256
|
+
if (!u)
|
|
2257
2257
|
throw new Error("Outbox coordinator not set");
|
|
2258
|
-
return
|
|
2258
|
+
return u.registerRetry(e.payload.uuid), !1;
|
|
2259
2259
|
}
|
|
2260
2260
|
function Vl(t, e, s) {
|
|
2261
2261
|
var i;
|
|
2262
|
-
return (i =
|
|
2262
|
+
return (i = fe()) == null ? void 0 : i.peek();
|
|
2263
2263
|
}
|
|
2264
2264
|
function Gl(t, e) {
|
|
2265
|
-
return
|
|
2265
|
+
return Ie().dispatch(Vd((/* @__PURE__ */ new Date()).getTime())), ga;
|
|
2266
2266
|
}
|
|
2267
|
-
const
|
|
2267
|
+
const ve = "An unknown error occurred", Ll = 500, si = ["non_field_errors", "detail"];
|
|
2268
2268
|
function Bl(t, e) {
|
|
2269
2269
|
let s;
|
|
2270
2270
|
if (t != null && t.body)
|
|
@@ -2276,7 +2276,7 @@ function Bl(t, e) {
|
|
|
2276
2276
|
s = i.message;
|
|
2277
2277
|
else
|
|
2278
2278
|
try {
|
|
2279
|
-
s = Object.entries(i).map(([n, a]) => typeof a == "string" ?
|
|
2279
|
+
s = Object.entries(i).map(([n, a]) => typeof a == "string" ? si.includes(n) ? a : `${n}: ${a}` : Array.isArray(a) ? si.includes(n) ? a.join(`
|
|
2280
2280
|
`) : a.map((o) => `${n}: ${o}`).join(`
|
|
2281
2281
|
`) : `${n}: ${JSON.stringify(a)}`).join(`
|
|
2282
2282
|
`);
|
|
@@ -2285,18 +2285,18 @@ function Bl(t, e) {
|
|
|
2285
2285
|
}
|
|
2286
2286
|
} else typeof t.body == "string" && (s = t.body);
|
|
2287
2287
|
else t != null && t.text ? s = t.text : e instanceof Error && (s = e.message);
|
|
2288
|
-
return !s || s.length > Ll ?
|
|
2288
|
+
return !s || s.length > Ll ? ve : s;
|
|
2289
2289
|
}
|
|
2290
2290
|
class k extends Error {
|
|
2291
2291
|
constructor(s) {
|
|
2292
|
-
super(
|
|
2292
|
+
super(ve);
|
|
2293
2293
|
// NOTE: Needs to conform to NetworkError in @redux-offline/redux-offline, which has `status` and `response`.
|
|
2294
2294
|
y(this, "status");
|
|
2295
2295
|
y(this, "response");
|
|
2296
2296
|
y(this, "message");
|
|
2297
2297
|
y(this, "options");
|
|
2298
2298
|
const { response: i, innerError: n } = s;
|
|
2299
|
-
this.message = s.message ?? Bl(i, n) ??
|
|
2299
|
+
this.message = s.message ?? Bl(i, n) ?? ve, this.status = (i == null ? void 0 : i.status) ?? 0, this.response = i, s.discard = s.discard ?? !1, this.options = s;
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
2302
|
class Hp {
|
|
@@ -2317,7 +2317,7 @@ class Hp {
|
|
|
2317
2317
|
if (e.immediate) {
|
|
2318
2318
|
const o = {
|
|
2319
2319
|
...a,
|
|
2320
|
-
uuid: e.uuid ??
|
|
2320
|
+
uuid: e.uuid ?? le()
|
|
2321
2321
|
}, r = {
|
|
2322
2322
|
payload: o,
|
|
2323
2323
|
type: "",
|
|
@@ -2332,10 +2332,10 @@ class Hp {
|
|
|
2332
2332
|
}
|
|
2333
2333
|
}
|
|
2334
2334
|
};
|
|
2335
|
-
Yn(r, this).then((
|
|
2336
|
-
n.resolve(
|
|
2337
|
-
}).catch((
|
|
2338
|
-
Qn(
|
|
2335
|
+
Yn(r, this).then((u) => {
|
|
2336
|
+
n.resolve(u.body);
|
|
2337
|
+
}).catch((u) => {
|
|
2338
|
+
Qn(u, r), u instanceof Error ? n.reject(u) : n.reject(new Error((u ?? ve).toString()));
|
|
2339
2339
|
});
|
|
2340
2340
|
} else {
|
|
2341
2341
|
const o = this.store.dispatch(
|
|
@@ -2344,14 +2344,14 @@ class Hp {
|
|
|
2344
2344
|
if (c)
|
|
2345
2345
|
n.resolve(c.body);
|
|
2346
2346
|
else {
|
|
2347
|
-
const
|
|
2347
|
+
const l = new k({
|
|
2348
2348
|
message: "Could not get a response from the server.",
|
|
2349
2349
|
response: c,
|
|
2350
2350
|
discard: !0
|
|
2351
2351
|
});
|
|
2352
|
-
n.reject(
|
|
2352
|
+
n.reject(l);
|
|
2353
2353
|
}
|
|
2354
|
-
},
|
|
2354
|
+
}, u = (c) => {
|
|
2355
2355
|
c instanceof k ? c.options.discard = !0 : (console.error(
|
|
2356
2356
|
"Received an unexpected error while processing a request:",
|
|
2357
2357
|
c,
|
|
@@ -2363,13 +2363,13 @@ Converting error to APIError and discarding.`
|
|
|
2363
2363
|
discard: !0
|
|
2364
2364
|
})), n.reject(c);
|
|
2365
2365
|
};
|
|
2366
|
-
o.then(r,
|
|
2366
|
+
o.then(r, u);
|
|
2367
2367
|
}
|
|
2368
2368
|
return n;
|
|
2369
2369
|
}
|
|
2370
2370
|
// NOTE: these are currently expected to be present in the base SDK, not sure if that is desired
|
|
2371
2371
|
}
|
|
2372
|
-
class
|
|
2372
|
+
class Re {
|
|
2373
2373
|
constructor() {
|
|
2374
2374
|
y(this, "graph");
|
|
2375
2375
|
y(this, "requestAttemptCounter");
|
|
@@ -2379,7 +2379,7 @@ class we {
|
|
|
2379
2379
|
* Used when the app is loaded. Reconstructs the dependency graph based on an outbox from the redux-offline store.
|
|
2380
2380
|
*/
|
|
2381
2381
|
static _fromOutbox(e) {
|
|
2382
|
-
const s = new
|
|
2382
|
+
const s = new Re();
|
|
2383
2383
|
for (let i = 0; i < e.length; i++) {
|
|
2384
2384
|
const n = e[i];
|
|
2385
2385
|
if (!n) {
|
|
@@ -2393,7 +2393,7 @@ class we {
|
|
|
2393
2393
|
console.error("Previous outbox item was undefined");
|
|
2394
2394
|
continue;
|
|
2395
2395
|
}
|
|
2396
|
-
o.payload.uuid !== n.payload.uuid && o.payload.blocks.some((r) => n.payload.blockers.includes(r)) &&
|
|
2396
|
+
o.payload.uuid !== n.payload.uuid && o.payload.blocks.some((r) => n.payload.blockers.includes(r)) && Re._addDependency(
|
|
2397
2397
|
n.payload.uuid,
|
|
2398
2398
|
o.payload.uuid,
|
|
2399
2399
|
s.graph
|
|
@@ -2403,7 +2403,7 @@ class we {
|
|
|
2403
2403
|
return s;
|
|
2404
2404
|
}
|
|
2405
2405
|
_addDependency(e, s) {
|
|
2406
|
-
|
|
2406
|
+
Re._addDependency(e, s, this.graph);
|
|
2407
2407
|
}
|
|
2408
2408
|
static _addDependency(e, s, i) {
|
|
2409
2409
|
if (e === s)
|
|
@@ -2593,10 +2593,10 @@ class F extends O {
|
|
|
2593
2593
|
documentAttachmentReducer: a,
|
|
2594
2594
|
projectAttachmentReducer: o,
|
|
2595
2595
|
formRevisionAttachmentReducer: r,
|
|
2596
|
-
formSubmissionAttachmentReducer:
|
|
2596
|
+
formSubmissionAttachmentReducer: u,
|
|
2597
2597
|
geoImageReducer: c,
|
|
2598
2598
|
// fields
|
|
2599
|
-
assetTypeFieldsAttachmentReducer:
|
|
2599
|
+
assetTypeFieldsAttachmentReducer: l,
|
|
2600
2600
|
assetTypeFieldValuesAttachmentReducer: h,
|
|
2601
2601
|
issueTypeFieldsAttachmentReducer: m,
|
|
2602
2602
|
issueTypeFieldValuesAttachmentReducer: f
|
|
@@ -2608,9 +2608,9 @@ class F extends O {
|
|
|
2608
2608
|
Object.values(a.instances),
|
|
2609
2609
|
Object.values(o.instances),
|
|
2610
2610
|
Object.values(r.instances),
|
|
2611
|
-
Object.values(l.instances),
|
|
2612
|
-
Object.values(c.instances),
|
|
2613
2611
|
Object.values(u.instances),
|
|
2612
|
+
Object.values(c.instances),
|
|
2613
|
+
Object.values(l.instances),
|
|
2614
2614
|
Object.values(h.instances),
|
|
2615
2615
|
Object.values(m.instances),
|
|
2616
2616
|
Object.values(f.instances)
|
|
@@ -2634,7 +2634,7 @@ class F extends O {
|
|
|
2634
2634
|
return s;
|
|
2635
2635
|
}
|
|
2636
2636
|
async getFilePayload(e) {
|
|
2637
|
-
const s = await
|
|
2637
|
+
const s = await we(e), i = {
|
|
2638
2638
|
sha1: s,
|
|
2639
2639
|
file_type: e.type,
|
|
2640
2640
|
extension: e.name.split(".").pop(),
|
|
@@ -2643,12 +2643,12 @@ class F extends O {
|
|
|
2643
2643
|
return await this.client.files.addCache(e, s), i;
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
|
-
class
|
|
2646
|
+
class Ee extends F {
|
|
2647
2647
|
async _bulkAdd(e) {
|
|
2648
2648
|
var c;
|
|
2649
2649
|
const { store: s } = this.client, i = (c = s.getState().userReducer.currentUser) == null ? void 0 : c.id, n = (/* @__PURE__ */ new Date()).toISOString(), a = [], o = [], r = {};
|
|
2650
|
-
for (const
|
|
2651
|
-
const { modelId: h, file: m } =
|
|
2650
|
+
for (const l of e) {
|
|
2651
|
+
const { modelId: h, file: m } = l, f = await this.getFilePayload(m);
|
|
2652
2652
|
f.sha1 in r || (r[f.sha1] = f);
|
|
2653
2653
|
const b = this.buildOfflineAttachment({
|
|
2654
2654
|
file: m,
|
|
@@ -2670,7 +2670,7 @@ class ke extends F {
|
|
|
2670
2670
|
);
|
|
2671
2671
|
}
|
|
2672
2672
|
this.dispatch(this.addAttachments(a));
|
|
2673
|
-
const
|
|
2673
|
+
const u = this.enqueueRequest({
|
|
2674
2674
|
description: `Add ${this.name}`,
|
|
2675
2675
|
method: d.POST,
|
|
2676
2676
|
url: `${this.url}/bulk/`,
|
|
@@ -2679,14 +2679,14 @@ class ke extends F {
|
|
|
2679
2679
|
attachments: o,
|
|
2680
2680
|
files: Object.values(r)
|
|
2681
2681
|
},
|
|
2682
|
-
blocks: a.map((
|
|
2683
|
-
blockers: a.map((
|
|
2682
|
+
blocks: a.map((l) => l.offline_id),
|
|
2683
|
+
blockers: a.map((l) => l.file_sha1)
|
|
2684
2684
|
});
|
|
2685
|
-
return
|
|
2686
|
-
this.dispatch(this.updateAttachments(
|
|
2685
|
+
return u.then(({ attachments: l, presigned_urls: h }) => {
|
|
2686
|
+
this.dispatch(this.updateAttachments(l)), this.processPresignedUrls(h);
|
|
2687
2687
|
}).catch(() => {
|
|
2688
|
-
this.dispatch(this.removeAttachments(a.map((
|
|
2689
|
-
}), [a,
|
|
2688
|
+
this.dispatch(this.removeAttachments(a.map((l) => l.offline_id)));
|
|
2689
|
+
}), [a, u.then(({ attachments: l }) => l)];
|
|
2690
2690
|
}
|
|
2691
2691
|
async _delete(e) {
|
|
2692
2692
|
const { store: s } = this.client, i = this.selectAttachment(e)(s.getState());
|
|
@@ -2709,12 +2709,12 @@ class ke extends F {
|
|
|
2709
2709
|
}), n;
|
|
2710
2710
|
}
|
|
2711
2711
|
}
|
|
2712
|
-
class Jp extends
|
|
2712
|
+
class Jp extends Ee {
|
|
2713
2713
|
constructor() {
|
|
2714
2714
|
super(...arguments);
|
|
2715
2715
|
y(this, "name", "Asset Attachment");
|
|
2716
2716
|
y(this, "url", "/asset-attachments");
|
|
2717
|
-
y(this, "initializeAttachments",
|
|
2717
|
+
y(this, "initializeAttachments", Tt);
|
|
2718
2718
|
y(this, "addAttachments", mi);
|
|
2719
2719
|
y(this, "updateAttachments", xa);
|
|
2720
2720
|
y(this, "removeAttachments", pi);
|
|
@@ -2757,10 +2757,10 @@ class Jp extends ke {
|
|
|
2757
2757
|
blocks: [],
|
|
2758
2758
|
blockers: []
|
|
2759
2759
|
});
|
|
2760
|
-
this.dispatch(
|
|
2760
|
+
this.dispatch(Tt(i));
|
|
2761
2761
|
}
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2763
|
+
function ft(t, e) {
|
|
2764
2764
|
const s = [];
|
|
2765
2765
|
let i = 0;
|
|
2766
2766
|
const n = t.length;
|
|
@@ -2779,7 +2779,7 @@ class Xp extends O {
|
|
|
2779
2779
|
created_by: i,
|
|
2780
2780
|
submitted_at: n
|
|
2781
2781
|
});
|
|
2782
|
-
this.dispatch(
|
|
2782
|
+
this.dispatch(wt(a));
|
|
2783
2783
|
const o = this.enqueueRequest({
|
|
2784
2784
|
description: "Create asset",
|
|
2785
2785
|
method: d.POST,
|
|
@@ -2789,13 +2789,13 @@ class Xp extends O {
|
|
|
2789
2789
|
blocks: [a.offline_id]
|
|
2790
2790
|
});
|
|
2791
2791
|
return o.then((r) => {
|
|
2792
|
-
this.dispatch(
|
|
2792
|
+
this.dispatch(ke(r));
|
|
2793
2793
|
}).catch(() => {
|
|
2794
|
-
this.dispatch(
|
|
2794
|
+
this.dispatch(Ot(a.offline_id));
|
|
2795
2795
|
}), [a, o];
|
|
2796
2796
|
}
|
|
2797
2797
|
update(e) {
|
|
2798
|
-
const { store: s } = this.client, i =
|
|
2798
|
+
const { store: s } = this.client, i = vt(e.offline_id)(s.getState());
|
|
2799
2799
|
if (!i)
|
|
2800
2800
|
throw new Error(`No asset with id ${e.offline_id} found in the store`);
|
|
2801
2801
|
const n = {
|
|
@@ -2804,7 +2804,7 @@ class Xp extends O {
|
|
|
2804
2804
|
};
|
|
2805
2805
|
if (!n.canvas_marker && !n.geo_marker)
|
|
2806
2806
|
throw new Error("Asset must have either a canvas_marker or geo_marker");
|
|
2807
|
-
this.dispatch(
|
|
2807
|
+
this.dispatch(ke(n));
|
|
2808
2808
|
const a = this.enqueueRequest({
|
|
2809
2809
|
description: "Edit asset",
|
|
2810
2810
|
method: d.PATCH,
|
|
@@ -2814,26 +2814,26 @@ class Xp extends O {
|
|
|
2814
2814
|
blocks: [e.offline_id]
|
|
2815
2815
|
});
|
|
2816
2816
|
return a.then((o) => {
|
|
2817
|
-
this.dispatch(
|
|
2817
|
+
this.dispatch(ke(o));
|
|
2818
2818
|
}).catch(() => {
|
|
2819
|
-
this.dispatch(
|
|
2819
|
+
this.dispatch(ke(i));
|
|
2820
2820
|
}), [n, a];
|
|
2821
2821
|
}
|
|
2822
2822
|
async remove(e) {
|
|
2823
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
2823
|
+
const { store: s } = this.client, i = s.getState(), n = vt(e)(i);
|
|
2824
2824
|
if (!n) throw new Error(`No asset with id ${e} found in the store`);
|
|
2825
2825
|
const a = Ua(e)(i), o = Nc(e)(i), r = cr(e)(i);
|
|
2826
|
-
if (this.dispatch(
|
|
2827
|
-
const
|
|
2828
|
-
this.dispatch(pi(
|
|
2826
|
+
if (this.dispatch(Ot(e)), a.length > 0) {
|
|
2827
|
+
const u = a.map(({ offline_id: c }) => c);
|
|
2828
|
+
this.dispatch(pi(u));
|
|
2829
2829
|
}
|
|
2830
2830
|
if (o.length > 0) {
|
|
2831
|
-
const
|
|
2832
|
-
this.dispatch(
|
|
2831
|
+
const u = o.map(({ offline_id: c }) => c);
|
|
2832
|
+
this.dispatch(lt(u));
|
|
2833
2833
|
}
|
|
2834
2834
|
if (r.length > 0) {
|
|
2835
|
-
const
|
|
2836
|
-
this.dispatch(sn(
|
|
2835
|
+
const u = r.map(({ offline_id: c }) => c);
|
|
2836
|
+
this.dispatch(sn(u));
|
|
2837
2837
|
}
|
|
2838
2838
|
return this.enqueueRequest({
|
|
2839
2839
|
description: "Delete asset",
|
|
@@ -2841,15 +2841,15 @@ class Xp extends O {
|
|
|
2841
2841
|
url: `/assets/${e}/`,
|
|
2842
2842
|
blockers: [e],
|
|
2843
2843
|
blocks: []
|
|
2844
|
-
}).catch((
|
|
2845
|
-
throw this.dispatch(
|
|
2844
|
+
}).catch((u) => {
|
|
2845
|
+
throw this.dispatch(wt(n)), this.dispatch(mi(a)), this.dispatch(dt(o)), this.dispatch(tn(r)), u;
|
|
2846
2846
|
});
|
|
2847
2847
|
}
|
|
2848
2848
|
bulkAdd(e, s, i, n) {
|
|
2849
|
-
const a = (/* @__PURE__ */ new Date()).toISOString(), o =
|
|
2850
|
-
const h =
|
|
2849
|
+
const a = (/* @__PURE__ */ new Date()).toISOString(), o = le(), r = ft(e, n).map((l) => {
|
|
2850
|
+
const h = l.map((m) => R(m));
|
|
2851
2851
|
return {
|
|
2852
|
-
batchId:
|
|
2852
|
+
batchId: le(),
|
|
2853
2853
|
payload: {
|
|
2854
2854
|
transaction_id: o,
|
|
2855
2855
|
submitted_at: a,
|
|
@@ -2858,10 +2858,10 @@ class Xp extends O {
|
|
|
2858
2858
|
assets: h
|
|
2859
2859
|
}
|
|
2860
2860
|
};
|
|
2861
|
-
}),
|
|
2861
|
+
}), u = [];
|
|
2862
2862
|
let c = null;
|
|
2863
|
-
for (const
|
|
2864
|
-
const { batchId: h, payload: m } =
|
|
2863
|
+
for (const l of r) {
|
|
2864
|
+
const { batchId: h, payload: m } = l, f = m.assets.map((E) => E.offline_id), b = [s];
|
|
2865
2865
|
c && b.push(c);
|
|
2866
2866
|
const T = f;
|
|
2867
2867
|
T.push(h);
|
|
@@ -2873,12 +2873,12 @@ class Xp extends O {
|
|
|
2873
2873
|
blockers: b,
|
|
2874
2874
|
blocks: T
|
|
2875
2875
|
});
|
|
2876
|
-
c =
|
|
2876
|
+
c = l.batchId, u.push(S);
|
|
2877
2877
|
}
|
|
2878
|
-
return Promise.all(
|
|
2879
|
-
const h =
|
|
2878
|
+
return Promise.all(u).then((l) => {
|
|
2879
|
+
const h = l.flat();
|
|
2880
2880
|
this.dispatch(Ai(h));
|
|
2881
|
-
}),
|
|
2881
|
+
}), u;
|
|
2882
2882
|
}
|
|
2883
2883
|
async refreshStore(e) {
|
|
2884
2884
|
const s = await this.enqueueRequest({
|
|
@@ -2901,7 +2901,7 @@ class Qp extends O {
|
|
|
2901
2901
|
created_by: i,
|
|
2902
2902
|
submitted_at: n
|
|
2903
2903
|
});
|
|
2904
|
-
this.dispatch(
|
|
2904
|
+
this.dispatch(Et(a));
|
|
2905
2905
|
const o = this.enqueueRequest({
|
|
2906
2906
|
description: "Add asset stage completion",
|
|
2907
2907
|
method: d.POST,
|
|
@@ -2918,14 +2918,14 @@ class Qp extends O {
|
|
|
2918
2918
|
return o.then((r) => {
|
|
2919
2919
|
this.dispatch(Ha(r));
|
|
2920
2920
|
}).catch(() => {
|
|
2921
|
-
this.dispatch(
|
|
2921
|
+
this.dispatch(Ft(a.offline_id));
|
|
2922
2922
|
}), [a, o];
|
|
2923
2923
|
}
|
|
2924
2924
|
delete(e) {
|
|
2925
2925
|
const { store: s } = this.client, i = Ya(e)(s.getState());
|
|
2926
2926
|
if (!i)
|
|
2927
2927
|
throw new Error(`Expected asset stage completion with id ${e} to exist`);
|
|
2928
|
-
this.dispatch(
|
|
2928
|
+
this.dispatch(Ft(e));
|
|
2929
2929
|
const n = this.enqueueRequest({
|
|
2930
2930
|
description: "Delete asset stage completion",
|
|
2931
2931
|
method: d.DELETE,
|
|
@@ -2934,7 +2934,7 @@ class Qp extends O {
|
|
|
2934
2934
|
blocks: []
|
|
2935
2935
|
});
|
|
2936
2936
|
return n.catch(() => {
|
|
2937
|
-
this.dispatch(
|
|
2937
|
+
this.dispatch(Et(i));
|
|
2938
2938
|
}), n;
|
|
2939
2939
|
}
|
|
2940
2940
|
bulkAdd(e) {
|
|
@@ -2943,8 +2943,8 @@ class Qp extends O {
|
|
|
2943
2943
|
created_by: n,
|
|
2944
2944
|
submitted_at: i
|
|
2945
2945
|
})), r = o.map(({ offline_id: c }) => c);
|
|
2946
|
-
this.dispatch(
|
|
2947
|
-
const
|
|
2946
|
+
this.dispatch(kt(o));
|
|
2947
|
+
const u = this.enqueueRequest({
|
|
2948
2948
|
description: "Bulk create asset stage completions",
|
|
2949
2949
|
method: d.POST,
|
|
2950
2950
|
url: "/asset-stage-completions/bulk/",
|
|
@@ -2955,15 +2955,15 @@ class Qp extends O {
|
|
|
2955
2955
|
blockers: [...e.map((c) => c.asset), ...e.map((c) => c.stage)],
|
|
2956
2956
|
blocks: r
|
|
2957
2957
|
});
|
|
2958
|
-
return
|
|
2958
|
+
return u.then((c) => {
|
|
2959
2959
|
this.dispatch(Ka(c));
|
|
2960
2960
|
}).catch(() => {
|
|
2961
|
-
this.dispatch(
|
|
2962
|
-
}), [o,
|
|
2961
|
+
this.dispatch(qt(r));
|
|
2962
|
+
}), [o, u];
|
|
2963
2963
|
}
|
|
2964
2964
|
bulkDelete(e) {
|
|
2965
2965
|
const { store: s } = this.client, i = Ja(e)(s.getState());
|
|
2966
|
-
this.dispatch(
|
|
2966
|
+
this.dispatch(qt(e));
|
|
2967
2967
|
const n = this.enqueueRequest({
|
|
2968
2968
|
description: "Deleting asset stage completions",
|
|
2969
2969
|
method: d.DELETE,
|
|
@@ -2975,7 +2975,7 @@ class Qp extends O {
|
|
|
2975
2975
|
blocks: []
|
|
2976
2976
|
});
|
|
2977
2977
|
return n.catch(() => {
|
|
2978
|
-
this.dispatch(
|
|
2978
|
+
this.dispatch(kt(i));
|
|
2979
2979
|
}), n;
|
|
2980
2980
|
}
|
|
2981
2981
|
async refreshStore(e) {
|
|
@@ -2994,8 +2994,8 @@ class Qp extends O {
|
|
|
2994
2994
|
}
|
|
2995
2995
|
class Zp extends O {
|
|
2996
2996
|
bulkAdd(e, s) {
|
|
2997
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), n = this.client.store.getState().userReducer.currentUser.id, a = e.map((
|
|
2998
|
-
this.dispatch(
|
|
2997
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), n = this.client.store.getState().userReducer.currentUser.id, a = e.map((u) => R(u)), o = a.map((u) => ({ ...u, asset_type: s, created_by: n, submitted_at: i }));
|
|
2998
|
+
this.dispatch(Je(o));
|
|
2999
2999
|
const r = this.enqueueRequest({
|
|
3000
3000
|
description: "Add asset stages",
|
|
3001
3001
|
method: d.POST,
|
|
@@ -3006,17 +3006,17 @@ class Zp extends O {
|
|
|
3006
3006
|
stages: a
|
|
3007
3007
|
},
|
|
3008
3008
|
blockers: [s],
|
|
3009
|
-
blocks: a.map(({ offline_id:
|
|
3009
|
+
blocks: a.map(({ offline_id: u }) => u)
|
|
3010
3010
|
});
|
|
3011
|
-
return r.then((
|
|
3012
|
-
this.dispatch(
|
|
3011
|
+
return r.then((u) => {
|
|
3012
|
+
this.dispatch(Ge(u));
|
|
3013
3013
|
}).catch(() => {
|
|
3014
|
-
this.dispatch(
|
|
3014
|
+
this.dispatch(Xe(o.map(({ offline_id: u }) => u)));
|
|
3015
3015
|
}), [o, r];
|
|
3016
3016
|
}
|
|
3017
3017
|
async bulkUpdate(e, s) {
|
|
3018
|
-
const n = this.client.store.getState(), a =
|
|
3019
|
-
return this.dispatch(
|
|
3018
|
+
const n = this.client.store.getState(), a = Dt(e.map(({ offline_id: o }) => o))(n);
|
|
3019
|
+
return this.dispatch(Ge(e)), this.enqueueRequest({
|
|
3020
3020
|
description: "Edit asset stages",
|
|
3021
3021
|
method: d.PATCH,
|
|
3022
3022
|
url: `/asset-types/${s}/bulk-update-stages/`,
|
|
@@ -3026,12 +3026,12 @@ class Zp extends O {
|
|
|
3026
3026
|
blockers: [s],
|
|
3027
3027
|
blocks: e.map(({ offline_id: o }) => o)
|
|
3028
3028
|
}).catch((o) => {
|
|
3029
|
-
throw this.dispatch(
|
|
3029
|
+
throw this.dispatch(Ge(a)), o;
|
|
3030
3030
|
});
|
|
3031
3031
|
}
|
|
3032
3032
|
async bulkDelete(e) {
|
|
3033
|
-
const { store: s } = this.client, i =
|
|
3034
|
-
this.dispatch(
|
|
3033
|
+
const { store: s } = this.client, i = Dt(e)(s.getState());
|
|
3034
|
+
this.dispatch(Xe(e));
|
|
3035
3035
|
const n = this.enqueueRequest({
|
|
3036
3036
|
description: "Delete asset stages",
|
|
3037
3037
|
method: d.DELETE,
|
|
@@ -3043,7 +3043,7 @@ class Zp extends O {
|
|
|
3043
3043
|
blocks: []
|
|
3044
3044
|
});
|
|
3045
3045
|
return n.catch(() => {
|
|
3046
|
-
this.dispatch(
|
|
3046
|
+
this.dispatch(Je(i));
|
|
3047
3047
|
}), n;
|
|
3048
3048
|
}
|
|
3049
3049
|
update(e) {
|
|
@@ -3053,7 +3053,7 @@ class Zp extends O {
|
|
|
3053
3053
|
...i,
|
|
3054
3054
|
...e
|
|
3055
3055
|
};
|
|
3056
|
-
this.dispatch(
|
|
3056
|
+
this.dispatch(Pt(n));
|
|
3057
3057
|
const a = this.enqueueRequest({
|
|
3058
3058
|
description: "Update asset stage",
|
|
3059
3059
|
method: d.PATCH,
|
|
@@ -3068,7 +3068,7 @@ class Zp extends O {
|
|
|
3068
3068
|
blocks: [i.offline_id]
|
|
3069
3069
|
});
|
|
3070
3070
|
return a.then((o) => {
|
|
3071
|
-
this.dispatch(
|
|
3071
|
+
this.dispatch(Pt(o));
|
|
3072
3072
|
}).catch(() => {
|
|
3073
3073
|
this.dispatch(Za(i));
|
|
3074
3074
|
}), [n, a];
|
|
@@ -3087,7 +3087,7 @@ class Zp extends O {
|
|
|
3087
3087
|
this.dispatch(Qa(s));
|
|
3088
3088
|
}
|
|
3089
3089
|
}
|
|
3090
|
-
class ef extends
|
|
3090
|
+
class ef extends Ee {
|
|
3091
3091
|
constructor() {
|
|
3092
3092
|
super(...arguments);
|
|
3093
3093
|
y(this, "name", "Asset Type Attachment");
|
|
@@ -3139,10 +3139,10 @@ class ef extends ke {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
class tf extends F {
|
|
3141
3141
|
async bulkAdd(e) {
|
|
3142
|
-
var
|
|
3143
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (
|
|
3142
|
+
var u;
|
|
3143
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (u = this.client.store.getState().userReducer.currentUser) == null ? void 0 : u.id, n = {}, a = [], o = [];
|
|
3144
3144
|
for (const c of e) {
|
|
3145
|
-
const { fieldsRevisionId:
|
|
3145
|
+
const { fieldsRevisionId: l, fieldIdentifier: h, file: m } = c, f = await this.getFilePayload(m);
|
|
3146
3146
|
f.sha1 in n || (n[f.sha1] = f);
|
|
3147
3147
|
const b = R({
|
|
3148
3148
|
file: URL.createObjectURL(m),
|
|
@@ -3150,7 +3150,7 @@ class tf extends F {
|
|
|
3150
3150
|
file_name: m.name,
|
|
3151
3151
|
file_sha1: f.sha1,
|
|
3152
3152
|
created_by: i,
|
|
3153
|
-
fields_revision:
|
|
3153
|
+
fields_revision: l,
|
|
3154
3154
|
submitted_at: s,
|
|
3155
3155
|
field_identifier: h
|
|
3156
3156
|
});
|
|
@@ -3161,7 +3161,7 @@ class tf extends F {
|
|
|
3161
3161
|
field_identifier: h,
|
|
3162
3162
|
file_extension: f.extension,
|
|
3163
3163
|
file_sha1: f.sha1,
|
|
3164
|
-
fields_revision:
|
|
3164
|
+
fields_revision: l
|
|
3165
3165
|
};
|
|
3166
3166
|
o.push(T);
|
|
3167
3167
|
}
|
|
@@ -3219,10 +3219,10 @@ class sf extends O {
|
|
|
3219
3219
|
blockers: [a.asset_type],
|
|
3220
3220
|
blocks: [a.offline_id]
|
|
3221
3221
|
});
|
|
3222
|
-
return o.then((
|
|
3223
|
-
this.dispatch(To(
|
|
3224
|
-
}).catch((
|
|
3225
|
-
throw this.dispatch(Ro(a.offline_id)),
|
|
3222
|
+
return o.then((u) => {
|
|
3223
|
+
this.dispatch(To(u));
|
|
3224
|
+
}).catch((u) => {
|
|
3225
|
+
throw this.dispatch(Ro(a.offline_id)), u;
|
|
3226
3226
|
}), [a, o];
|
|
3227
3227
|
}
|
|
3228
3228
|
async refreshStore(e) {
|
|
@@ -3242,10 +3242,10 @@ class sf extends O {
|
|
|
3242
3242
|
class nf extends F {
|
|
3243
3243
|
async bulkAdd(e, s) {
|
|
3244
3244
|
var c;
|
|
3245
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), n = (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id, a =
|
|
3246
|
-
for (const
|
|
3245
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), n = (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id, a = ft(e, s ?? e.length), o = [], r = [];
|
|
3246
|
+
for (const l of a) {
|
|
3247
3247
|
const h = {}, m = [];
|
|
3248
|
-
for (const f of
|
|
3248
|
+
for (const f of l) {
|
|
3249
3249
|
const { fieldValuesId: b, fieldIdentifier: T, file: S } = f, E = await this.getFilePayload(S);
|
|
3250
3250
|
E.sha1 in h || (h[E.sha1] = E);
|
|
3251
3251
|
const ee = R({
|
|
@@ -3259,7 +3259,7 @@ class nf extends F {
|
|
|
3259
3259
|
field_identifier: T
|
|
3260
3260
|
});
|
|
3261
3261
|
o.push(ee);
|
|
3262
|
-
const
|
|
3262
|
+
const yt = {
|
|
3263
3263
|
offline_id: ee.offline_id,
|
|
3264
3264
|
file_name: S.name,
|
|
3265
3265
|
file_sha1: E.sha1,
|
|
@@ -3267,7 +3267,7 @@ class nf extends F {
|
|
|
3267
3267
|
field_identifier: T,
|
|
3268
3268
|
field_values: b
|
|
3269
3269
|
};
|
|
3270
|
-
m.push(
|
|
3270
|
+
m.push(yt);
|
|
3271
3271
|
}
|
|
3272
3272
|
r.push({
|
|
3273
3273
|
submitted_at: i,
|
|
@@ -3275,33 +3275,33 @@ class nf extends F {
|
|
|
3275
3275
|
files: Object.values(h)
|
|
3276
3276
|
});
|
|
3277
3277
|
}
|
|
3278
|
-
this.dispatch(
|
|
3279
|
-
const
|
|
3278
|
+
this.dispatch(Qe(o));
|
|
3279
|
+
const u = r.map((l) => this.enqueueRequest({
|
|
3280
3280
|
description: "Add asset type field values attachments",
|
|
3281
3281
|
method: d.POST,
|
|
3282
3282
|
url: "/asset-type-field-values-attachments/bulk/",
|
|
3283
|
-
payload:
|
|
3284
|
-
blockers:
|
|
3285
|
-
blocks:
|
|
3283
|
+
payload: l,
|
|
3284
|
+
blockers: l.attachments.map((h) => h.field_values),
|
|
3285
|
+
blocks: l.attachments.map((h) => h.offline_id)
|
|
3286
3286
|
}));
|
|
3287
|
-
return Promise.all(
|
|
3288
|
-
for (const m of
|
|
3289
|
-
const h =
|
|
3287
|
+
return Promise.all(u).then((l) => {
|
|
3288
|
+
for (const m of l) this.processPresignedUrls(m.presigned_urls);
|
|
3289
|
+
const h = l.flatMap((m) => m.attachments);
|
|
3290
3290
|
this.dispatch(Io(h));
|
|
3291
|
-
}).catch((
|
|
3291
|
+
}).catch((l) => {
|
|
3292
3292
|
throw this.dispatch(
|
|
3293
|
-
|
|
3293
|
+
Ze(
|
|
3294
3294
|
o.map((h) => h.offline_id)
|
|
3295
3295
|
)
|
|
3296
|
-
),
|
|
3296
|
+
), l;
|
|
3297
3297
|
}), [
|
|
3298
3298
|
o,
|
|
3299
|
-
|
|
3299
|
+
u.map((l) => l.then(({ attachments: h }) => h))
|
|
3300
3300
|
];
|
|
3301
3301
|
}
|
|
3302
3302
|
async bulkDelete(e) {
|
|
3303
3303
|
const { store: s } = this.client, i = s.getState(), n = ko(e)(i);
|
|
3304
|
-
this.dispatch(
|
|
3304
|
+
this.dispatch(Ze(e));
|
|
3305
3305
|
try {
|
|
3306
3306
|
await this.enqueueRequest({
|
|
3307
3307
|
description: "Delete asset type field values attachments",
|
|
@@ -3312,7 +3312,7 @@ class nf extends F {
|
|
|
3312
3312
|
blocks: []
|
|
3313
3313
|
});
|
|
3314
3314
|
} catch (a) {
|
|
3315
|
-
throw this.dispatch(
|
|
3315
|
+
throw this.dispatch(Qe(n)), a;
|
|
3316
3316
|
}
|
|
3317
3317
|
}
|
|
3318
3318
|
async refreshStore(e) {
|
|
@@ -3329,7 +3329,7 @@ class nf extends F {
|
|
|
3329
3329
|
this.dispatch(vo(s));
|
|
3330
3330
|
}
|
|
3331
3331
|
}
|
|
3332
|
-
const Nl = (t) => Array.isArray(t) && t[0] instanceof File,
|
|
3332
|
+
const Nl = (t) => Array.isArray(t) && t[0] instanceof File, ii = (t) => {
|
|
3333
3333
|
const e = {}, s = {};
|
|
3334
3334
|
for (const i in t) {
|
|
3335
3335
|
const n = t[i];
|
|
@@ -3339,64 +3339,57 @@ const Nl = (t) => Array.isArray(t) && t[0] instanceof File, ie = (t) => {
|
|
|
3339
3339
|
};
|
|
3340
3340
|
class af extends F {
|
|
3341
3341
|
add(e) {
|
|
3342
|
-
var
|
|
3343
|
-
const { store: s } = this.client, i = s.getState(),
|
|
3342
|
+
var o;
|
|
3343
|
+
const { store: s } = this.client, i = s.getState(), n = R({
|
|
3344
3344
|
...e,
|
|
3345
|
-
|
|
3346
|
-
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
3345
|
+
created_by: (o = i.userReducer.currentUser) == null ? void 0 : o.id,
|
|
3347
3346
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3348
|
-
}),
|
|
3347
|
+
}), a = this.enqueueRequest({
|
|
3349
3348
|
description: "Add form submission",
|
|
3350
3349
|
method: d.POST,
|
|
3351
3350
|
url: "/form-submissions/",
|
|
3352
|
-
payload:
|
|
3351
|
+
payload: n,
|
|
3353
3352
|
blockers: [
|
|
3354
3353
|
"add-form-entry",
|
|
3355
3354
|
e.form_revision,
|
|
3356
3355
|
...e.issue ? [e.issue] : [],
|
|
3357
3356
|
...e.asset ? [e.asset] : []
|
|
3358
3357
|
],
|
|
3359
|
-
blocks: [
|
|
3358
|
+
blocks: [n.offline_id]
|
|
3360
3359
|
});
|
|
3361
|
-
return this.dispatch(
|
|
3362
|
-
this.dispatch(
|
|
3363
|
-
}), [
|
|
3360
|
+
return this.dispatch(ds(n)), a.then((r) => (this.dispatch(Le(r)), r)).catch(() => {
|
|
3361
|
+
this.dispatch(ls(n.offline_id));
|
|
3362
|
+
}), [n, a];
|
|
3364
3363
|
}
|
|
3365
3364
|
update(e) {
|
|
3366
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
3365
|
+
const { store: s } = this.client, i = s.getState(), n = us(e.offline_id)(i);
|
|
3367
3366
|
if (!n)
|
|
3368
3367
|
throw new Error(`Expected submission with offline_id ${e.offline_id} to exist`);
|
|
3369
|
-
const
|
|
3368
|
+
const a = {
|
|
3370
3369
|
...n,
|
|
3371
|
-
...e
|
|
3372
|
-
// values could also have a partial update
|
|
3373
|
-
values: {
|
|
3374
|
-
...n.values,
|
|
3375
|
-
...a
|
|
3376
|
-
}
|
|
3370
|
+
...e
|
|
3377
3371
|
};
|
|
3378
|
-
this.dispatch(Gc(
|
|
3379
|
-
const
|
|
3372
|
+
this.dispatch(Gc(a));
|
|
3373
|
+
const o = this.enqueueRequest({
|
|
3380
3374
|
description: "Delete user form submissions",
|
|
3381
3375
|
method: d.PATCH,
|
|
3382
|
-
url: `/form-submissions/${
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
blocks: [o.offline_id]
|
|
3376
|
+
url: `/form-submissions/${a.offline_id}/`,
|
|
3377
|
+
payload: e,
|
|
3378
|
+
blockers: [a.offline_id],
|
|
3379
|
+
blocks: [a.offline_id]
|
|
3387
3380
|
});
|
|
3388
|
-
return
|
|
3389
|
-
this.dispatch(
|
|
3381
|
+
return o.then((r) => {
|
|
3382
|
+
this.dispatch(Le(r));
|
|
3390
3383
|
}).catch(() => {
|
|
3391
|
-
this.dispatch(
|
|
3392
|
-
}), [
|
|
3384
|
+
this.dispatch(Le(n));
|
|
3385
|
+
}), [a, o];
|
|
3393
3386
|
}
|
|
3394
3387
|
async delete(e) {
|
|
3395
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
3388
|
+
const { store: s } = this.client, i = s.getState(), n = us(e)(i);
|
|
3396
3389
|
if (!n)
|
|
3397
3390
|
throw new Error(`Expected submission with offline_id ${e} to exist`);
|
|
3398
3391
|
const a = $c(e)(i);
|
|
3399
|
-
this.dispatch(
|
|
3392
|
+
this.dispatch(ls(e)), this.dispatch(tt(a.map((o) => o.offline_id)));
|
|
3400
3393
|
try {
|
|
3401
3394
|
return await this.enqueueRequest({
|
|
3402
3395
|
description: "Delete user form submissions",
|
|
@@ -3406,7 +3399,7 @@ class af extends F {
|
|
|
3406
3399
|
blocks: []
|
|
3407
3400
|
});
|
|
3408
3401
|
} catch (o) {
|
|
3409
|
-
throw this.dispatch(
|
|
3402
|
+
throw this.dispatch(ds(n)), this.dispatch(et(a)), o;
|
|
3410
3403
|
}
|
|
3411
3404
|
}
|
|
3412
3405
|
async refreshStore(e) {
|
|
@@ -3425,33 +3418,32 @@ class af extends F {
|
|
|
3425
3418
|
}
|
|
3426
3419
|
class of extends O {
|
|
3427
3420
|
add(e) {
|
|
3428
|
-
var
|
|
3429
|
-
const { store: s } = this.client, i = s.getState(),
|
|
3421
|
+
var o;
|
|
3422
|
+
const { store: s } = this.client, i = s.getState(), n = R({
|
|
3430
3423
|
...e,
|
|
3431
|
-
|
|
3432
|
-
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
3424
|
+
created_by: (o = i.userReducer.currentUser) == null ? void 0 : o.id,
|
|
3433
3425
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3434
|
-
}),
|
|
3426
|
+
}), a = this.enqueueRequest({
|
|
3435
3427
|
description: "Add asset type field values",
|
|
3436
3428
|
method: d.POST,
|
|
3437
3429
|
url: "/asset-type-field-values/",
|
|
3438
|
-
payload:
|
|
3430
|
+
payload: n,
|
|
3439
3431
|
blockers: [e.asset, e.fields_revision],
|
|
3440
|
-
blocks: [
|
|
3432
|
+
blocks: [n.offline_id]
|
|
3441
3433
|
});
|
|
3442
|
-
return this.dispatch(
|
|
3443
|
-
this.dispatch(
|
|
3444
|
-
}), [
|
|
3434
|
+
return this.dispatch(Ut(n)), a.then((r) => (this.dispatch(Fe(r)), r)).catch(() => {
|
|
3435
|
+
this.dispatch(Vt(n.offline_id));
|
|
3436
|
+
}), [n, a];
|
|
3445
3437
|
}
|
|
3446
3438
|
bulkAdd(e, s) {
|
|
3447
3439
|
var c;
|
|
3448
|
-
const i = (/* @__PURE__ */ new Date()).toISOString(), { values: n } =
|
|
3449
|
-
for (const
|
|
3440
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), { values: n } = ii(e.values), a = [], o = ft(e.payloads, s ?? e.payloads.length), r = [];
|
|
3441
|
+
for (const l of o) {
|
|
3450
3442
|
const h = [];
|
|
3451
|
-
for (const m of
|
|
3443
|
+
for (const m of l) {
|
|
3452
3444
|
const f = R({
|
|
3453
3445
|
...m,
|
|
3454
|
-
values:
|
|
3446
|
+
values: ii(m.values).values,
|
|
3455
3447
|
created_by: (c = this.client.store.getState().userReducer.currentUser) == null ? void 0 : c.id,
|
|
3456
3448
|
submitted_at: i
|
|
3457
3449
|
});
|
|
@@ -3470,61 +3462,57 @@ class of extends O {
|
|
|
3470
3462
|
});
|
|
3471
3463
|
}
|
|
3472
3464
|
this.dispatch(Po(a));
|
|
3473
|
-
const
|
|
3474
|
-
for (const
|
|
3475
|
-
const h =
|
|
3465
|
+
const u = [];
|
|
3466
|
+
for (const l of r) {
|
|
3467
|
+
const h = l.field_values.map((T) => T.asset), m = l.field_values.map((T) => T.fields_revision), f = l.field_values.map((T) => T.offline_id), b = this.enqueueRequest({
|
|
3476
3468
|
description: "Bulk add asset type field values",
|
|
3477
3469
|
method: d.POST,
|
|
3478
3470
|
url: "/asset-type-field-values/bulk/",
|
|
3479
|
-
payload:
|
|
3471
|
+
payload: l,
|
|
3480
3472
|
blockers: [...h, ...m],
|
|
3481
3473
|
blocks: f
|
|
3482
3474
|
});
|
|
3483
|
-
|
|
3475
|
+
u.push(b);
|
|
3484
3476
|
}
|
|
3485
|
-
return Promise.all(
|
|
3486
|
-
this.dispatch(Do(
|
|
3477
|
+
return Promise.all(u).then((l) => {
|
|
3478
|
+
this.dispatch(Do(l.flat()));
|
|
3487
3479
|
}).catch(() => {
|
|
3488
|
-
this.dispatch(Co(a.map((
|
|
3489
|
-
}), [a,
|
|
3480
|
+
this.dispatch(Co(a.map((l) => l.offline_id)));
|
|
3481
|
+
}), [a, u];
|
|
3490
3482
|
}
|
|
3491
3483
|
update(e) {
|
|
3492
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
3484
|
+
const { store: s } = this.client, i = s.getState(), n = Gt(e.offline_id)(i);
|
|
3493
3485
|
if (!n)
|
|
3494
3486
|
throw new Error(`Expected AssetTypeFieldValues with offline_id ${e.offline_id} to exist`);
|
|
3495
|
-
const
|
|
3487
|
+
const a = {
|
|
3496
3488
|
...n,
|
|
3497
|
-
...e
|
|
3498
|
-
values: a
|
|
3489
|
+
...e
|
|
3499
3490
|
};
|
|
3500
|
-
this.dispatch(
|
|
3501
|
-
const
|
|
3491
|
+
this.dispatch(Fe(a));
|
|
3492
|
+
const o = this.enqueueRequest({
|
|
3502
3493
|
description: "Delete asset type field values",
|
|
3503
3494
|
method: d.PATCH,
|
|
3504
3495
|
url: `/asset-type-field-values/${e.offline_id}/`,
|
|
3505
|
-
payload:
|
|
3506
|
-
...e,
|
|
3507
|
-
values: a
|
|
3508
|
-
},
|
|
3496
|
+
payload: e,
|
|
3509
3497
|
blockers: [
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3498
|
+
a.offline_id,
|
|
3499
|
+
a.fields_revision,
|
|
3500
|
+
a.asset
|
|
3513
3501
|
],
|
|
3514
|
-
blocks: [
|
|
3502
|
+
blocks: [a.offline_id]
|
|
3515
3503
|
});
|
|
3516
|
-
return
|
|
3517
|
-
this.dispatch(
|
|
3504
|
+
return o.then((r) => {
|
|
3505
|
+
this.dispatch(Fe(r));
|
|
3518
3506
|
}).catch(() => {
|
|
3519
|
-
this.dispatch(
|
|
3520
|
-
}), [
|
|
3507
|
+
this.dispatch(Fe(n));
|
|
3508
|
+
}), [a, o];
|
|
3521
3509
|
}
|
|
3522
3510
|
async delete(e) {
|
|
3523
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
3511
|
+
const { store: s } = this.client, i = s.getState(), n = Gt(e)(i);
|
|
3524
3512
|
if (!n)
|
|
3525
3513
|
throw new Error(`Expected submission with offline_id ${e} to exist`);
|
|
3526
3514
|
const a = Fo(e)(i);
|
|
3527
|
-
this.dispatch(
|
|
3515
|
+
this.dispatch(Vt(e)), this.dispatch(Ze(a.map((o) => o.offline_id)));
|
|
3528
3516
|
try {
|
|
3529
3517
|
await this.enqueueRequest({
|
|
3530
3518
|
description: "Delete asset type field values",
|
|
@@ -3534,7 +3522,7 @@ class of extends O {
|
|
|
3534
3522
|
blocks: []
|
|
3535
3523
|
});
|
|
3536
3524
|
} catch (o) {
|
|
3537
|
-
throw this.dispatch(
|
|
3525
|
+
throw this.dispatch(Ut(n)), this.dispatch(Qe(a)), o;
|
|
3538
3526
|
}
|
|
3539
3527
|
}
|
|
3540
3528
|
async refreshStore(e) {
|
|
@@ -3558,7 +3546,7 @@ class cf extends O {
|
|
|
3558
3546
|
created_by: i,
|
|
3559
3547
|
submitted_at: n
|
|
3560
3548
|
});
|
|
3561
|
-
this.dispatch(
|
|
3549
|
+
this.dispatch(Bt(a));
|
|
3562
3550
|
const o = this.enqueueRequest({
|
|
3563
3551
|
description: "Create asset type",
|
|
3564
3552
|
method: d.POST,
|
|
@@ -3568,20 +3556,20 @@ class cf extends O {
|
|
|
3568
3556
|
blocks: [a.offline_id]
|
|
3569
3557
|
});
|
|
3570
3558
|
return o.then((r) => {
|
|
3571
|
-
this.dispatch(
|
|
3559
|
+
this.dispatch(qe(r));
|
|
3572
3560
|
}).catch(() => {
|
|
3573
|
-
this.dispatch(
|
|
3561
|
+
this.dispatch(Nt(a.offline_id));
|
|
3574
3562
|
}), [a, o];
|
|
3575
3563
|
}
|
|
3576
3564
|
update(e) {
|
|
3577
|
-
const { store: s } = this.client, i =
|
|
3565
|
+
const { store: s } = this.client, i = Wt(e.offline_id)(s.getState());
|
|
3578
3566
|
if (!i)
|
|
3579
3567
|
throw new Error(`Expected asset type with offline_id ${e.offline_id} to exist`);
|
|
3580
3568
|
const n = {
|
|
3581
3569
|
...i,
|
|
3582
3570
|
...e
|
|
3583
3571
|
};
|
|
3584
|
-
this.dispatch(
|
|
3572
|
+
this.dispatch(qe(n));
|
|
3585
3573
|
const a = this.enqueueRequest({
|
|
3586
3574
|
description: "Update asset type",
|
|
3587
3575
|
method: d.PATCH,
|
|
@@ -3596,24 +3584,24 @@ class cf extends O {
|
|
|
3596
3584
|
blocks: [i.offline_id]
|
|
3597
3585
|
});
|
|
3598
3586
|
return a.then((o) => {
|
|
3599
|
-
this.dispatch(
|
|
3587
|
+
this.dispatch(qe(o));
|
|
3600
3588
|
}).catch(() => {
|
|
3601
|
-
this.dispatch(
|
|
3589
|
+
this.dispatch(qe(i));
|
|
3602
3590
|
}), [n, a];
|
|
3603
3591
|
}
|
|
3604
3592
|
async delete(e) {
|
|
3605
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
3593
|
+
const { store: s } = this.client, i = s.getState(), n = Wt(e)(i);
|
|
3606
3594
|
if (!n)
|
|
3607
3595
|
throw new Error(`Expected asset type with offline_id ${e} to exist`);
|
|
3608
3596
|
const a = bi(e)(i), o = io(e)(i), r = uo(e)(i);
|
|
3609
|
-
return this.dispatch(
|
|
3597
|
+
return this.dispatch(Nt(e)), this.dispatch(La(a.map((u) => u.offline_id))), this.dispatch(Xe(o.map((u) => u.offline_id))), this.dispatch(Oi(r.map(({ offline_id: u }) => u))), this.enqueueRequest({
|
|
3610
3598
|
description: "Delete asset type",
|
|
3611
3599
|
method: d.DELETE,
|
|
3612
3600
|
url: `/asset-types/${e}/`,
|
|
3613
3601
|
blockers: [e],
|
|
3614
3602
|
blocks: []
|
|
3615
|
-
}).catch((
|
|
3616
|
-
throw this.dispatch(
|
|
3603
|
+
}).catch((u) => {
|
|
3604
|
+
throw this.dispatch(Bt(n)), this.dispatch(Ai(a)), this.dispatch(Je(o)), this.dispatch(wi(r)), u;
|
|
3617
3605
|
});
|
|
3618
3606
|
}
|
|
3619
3607
|
async refreshStore(e) {
|
|
@@ -3638,7 +3626,7 @@ class rf extends O {
|
|
|
3638
3626
|
created_by: i,
|
|
3639
3627
|
submitted_at: n
|
|
3640
3628
|
});
|
|
3641
|
-
this.dispatch(
|
|
3629
|
+
this.dispatch(Yt(a));
|
|
3642
3630
|
const o = this.enqueueRequest({
|
|
3643
3631
|
description: "Create Category",
|
|
3644
3632
|
method: d.POST,
|
|
@@ -3650,7 +3638,7 @@ class rf extends O {
|
|
|
3650
3638
|
return [a, o];
|
|
3651
3639
|
}
|
|
3652
3640
|
update(e) {
|
|
3653
|
-
const s = this.client.store.getState(), i =
|
|
3641
|
+
const s = this.client.store.getState(), i = Jt(e.offline_id)(s);
|
|
3654
3642
|
if (!i)
|
|
3655
3643
|
throw new Error(`Expected an existing category with offline_id ${e.offline_id}`);
|
|
3656
3644
|
const n = { ...i, ...e };
|
|
@@ -3666,7 +3654,7 @@ class rf extends O {
|
|
|
3666
3654
|
return [n, a];
|
|
3667
3655
|
}
|
|
3668
3656
|
remove(e) {
|
|
3669
|
-
const { store: s } = this.client, i =
|
|
3657
|
+
const { store: s } = this.client, i = Jt(e)(s.getState());
|
|
3670
3658
|
if (!i)
|
|
3671
3659
|
throw new Error(`No category with id ${e} found in the store`);
|
|
3672
3660
|
this.dispatch(Bo(e));
|
|
@@ -3678,7 +3666,7 @@ class rf extends O {
|
|
|
3678
3666
|
blocks: []
|
|
3679
3667
|
});
|
|
3680
3668
|
return n.catch(() => {
|
|
3681
|
-
this.dispatch(
|
|
3669
|
+
this.dispatch(Yt(i));
|
|
3682
3670
|
}), n;
|
|
3683
3671
|
}
|
|
3684
3672
|
async refreshStore(e) {
|
|
@@ -3692,7 +3680,7 @@ class rf extends O {
|
|
|
3692
3680
|
this.dispatch(Go(s));
|
|
3693
3681
|
}
|
|
3694
3682
|
}
|
|
3695
|
-
class df extends
|
|
3683
|
+
class df extends Ee {
|
|
3696
3684
|
constructor() {
|
|
3697
3685
|
super(...arguments);
|
|
3698
3686
|
y(this, "name", "Document Attachment");
|
|
@@ -3725,10 +3713,10 @@ class df extends ke {
|
|
|
3725
3713
|
// NOTE: overriding the method from BaseAttachmentService since document attachments get vectorized
|
|
3726
3714
|
async bulkAdd(s) {
|
|
3727
3715
|
var h;
|
|
3728
|
-
const { store: i } = this.client, n = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, a = (/* @__PURE__ */ new Date()).toISOString(), o = [], r = [],
|
|
3716
|
+
const { store: i } = this.client, n = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, a = (/* @__PURE__ */ new Date()).toISOString(), o = [], r = [], u = {}, c = {};
|
|
3729
3717
|
for (const m of s) {
|
|
3730
3718
|
const { documentId: f, file: b } = m, T = await this.getFilePayload(b);
|
|
3731
|
-
T.sha1 in
|
|
3719
|
+
T.sha1 in u || (u[T.sha1] = T, c[T.sha1] = []);
|
|
3732
3720
|
const S = this.buildOfflineAttachment({
|
|
3733
3721
|
file: b,
|
|
3734
3722
|
file_sha1: T.sha1,
|
|
@@ -3747,19 +3735,19 @@ class df extends ke {
|
|
|
3747
3735
|
}), c[T.sha1].push(S.offline_id);
|
|
3748
3736
|
}
|
|
3749
3737
|
this.dispatch(this.addAttachments(o));
|
|
3750
|
-
const
|
|
3738
|
+
const l = this.enqueueRequest({
|
|
3751
3739
|
description: "Attach files to document",
|
|
3752
3740
|
method: d.POST,
|
|
3753
3741
|
url: "/document-attachments/bulk/",
|
|
3754
3742
|
payload: {
|
|
3755
3743
|
submitted_at: a,
|
|
3756
3744
|
attachments: r,
|
|
3757
|
-
files: Object.values(
|
|
3745
|
+
files: Object.values(u)
|
|
3758
3746
|
},
|
|
3759
3747
|
blocks: o.map((m) => m.offline_id),
|
|
3760
3748
|
blockers: o.map((m) => m.file_sha1)
|
|
3761
3749
|
});
|
|
3762
|
-
return
|
|
3750
|
+
return l.then(({ attachments: m, presigned_urls: f }) => {
|
|
3763
3751
|
this.dispatch(this.updateAttachments(m));
|
|
3764
3752
|
const b = this.processPresignedUrls(f);
|
|
3765
3753
|
for (const [T, S] of Object.entries(b))
|
|
@@ -3770,7 +3758,7 @@ class df extends ke {
|
|
|
3770
3758
|
});
|
|
3771
3759
|
}).catch(() => {
|
|
3772
3760
|
this.dispatch(this.removeAttachments(o.map((m) => m.offline_id)));
|
|
3773
|
-
}), [o,
|
|
3761
|
+
}), [o, l.then(({ attachments: m }) => m)];
|
|
3774
3762
|
}
|
|
3775
3763
|
async delete(s) {
|
|
3776
3764
|
return this._delete(s);
|
|
@@ -3815,7 +3803,7 @@ class lf extends O {
|
|
|
3815
3803
|
created_by: i,
|
|
3816
3804
|
submitted_at: n
|
|
3817
3805
|
});
|
|
3818
|
-
this.dispatch(
|
|
3806
|
+
this.dispatch(Zt([a]));
|
|
3819
3807
|
const o = this.enqueueRequest({
|
|
3820
3808
|
description: "Create Document",
|
|
3821
3809
|
method: d.POST,
|
|
@@ -3829,7 +3817,7 @@ class lf extends O {
|
|
|
3829
3817
|
blocks: [a.offline_id]
|
|
3830
3818
|
});
|
|
3831
3819
|
return o.catch(() => {
|
|
3832
|
-
this.dispatch(
|
|
3820
|
+
this.dispatch(es([a.offline_id]));
|
|
3833
3821
|
}), [a, o];
|
|
3834
3822
|
}
|
|
3835
3823
|
update(e) {
|
|
@@ -3842,7 +3830,7 @@ class lf extends O {
|
|
|
3842
3830
|
...i,
|
|
3843
3831
|
...e
|
|
3844
3832
|
};
|
|
3845
|
-
this.dispatch(
|
|
3833
|
+
this.dispatch(ne([n]));
|
|
3846
3834
|
const a = this.enqueueRequest({
|
|
3847
3835
|
description: "Update Document",
|
|
3848
3836
|
method: d.PATCH,
|
|
@@ -3852,11 +3840,11 @@ class lf extends O {
|
|
|
3852
3840
|
blocks: [e.offline_id]
|
|
3853
3841
|
});
|
|
3854
3842
|
return a.catch(() => {
|
|
3855
|
-
|
|
3843
|
+
ne([i]);
|
|
3856
3844
|
}), [n, a];
|
|
3857
3845
|
}
|
|
3858
3846
|
move(e, s, i) {
|
|
3859
|
-
const { store: n } = this.client, a =
|
|
3847
|
+
const { store: n } = this.client, a = Oe(n.getState()), o = [], r = a[e];
|
|
3860
3848
|
if (!r)
|
|
3861
3849
|
throw new Error(
|
|
3862
3850
|
`attempting to move a document with offline_id ${e} that does not exist in store.documents`
|
|
@@ -3870,7 +3858,7 @@ class lf extends O {
|
|
|
3870
3858
|
o.push(c), c.parent_document && o.push(a[c.parent_document]);
|
|
3871
3859
|
}
|
|
3872
3860
|
this.dispatch(sc({ documentId: e, targetDocumentId: s, position: i }));
|
|
3873
|
-
const
|
|
3861
|
+
const u = this.enqueueRequest({
|
|
3874
3862
|
description: "Move Document",
|
|
3875
3863
|
method: d.PATCH,
|
|
3876
3864
|
url: `/documents/${e}/move/`,
|
|
@@ -3881,20 +3869,20 @@ class lf extends O {
|
|
|
3881
3869
|
blockers: [e],
|
|
3882
3870
|
blocks: []
|
|
3883
3871
|
});
|
|
3884
|
-
return
|
|
3885
|
-
this.dispatch(
|
|
3872
|
+
return u.then((c) => {
|
|
3873
|
+
this.dispatch(ne(c));
|
|
3886
3874
|
}).catch(() => {
|
|
3887
|
-
this.dispatch(
|
|
3888
|
-
}),
|
|
3875
|
+
this.dispatch(ne(o));
|
|
3876
|
+
}), u;
|
|
3889
3877
|
}
|
|
3890
3878
|
delete(e) {
|
|
3891
|
-
const { store: s } = this.client, i =
|
|
3879
|
+
const { store: s } = this.client, i = Oe(s.getState()), n = nc(e)(s.getState());
|
|
3892
3880
|
if (!n)
|
|
3893
3881
|
throw new Error(
|
|
3894
3882
|
`attempting to delete a document with offline_id ${e} that does not exist in store.documents`
|
|
3895
3883
|
);
|
|
3896
3884
|
const a = n.parent_document ? i[n.parent_document] : void 0;
|
|
3897
|
-
this.dispatch(
|
|
3885
|
+
this.dispatch(es([e]));
|
|
3898
3886
|
const o = this.enqueueRequest({
|
|
3899
3887
|
description: "Delete Document",
|
|
3900
3888
|
method: d.DELETE,
|
|
@@ -3903,9 +3891,9 @@ class lf extends O {
|
|
|
3903
3891
|
blocks: []
|
|
3904
3892
|
});
|
|
3905
3893
|
return o.then((r) => {
|
|
3906
|
-
this.dispatch(
|
|
3894
|
+
this.dispatch(ne(r));
|
|
3907
3895
|
}).catch(() => {
|
|
3908
|
-
this.dispatch(
|
|
3896
|
+
this.dispatch(ne([n])), a && this.dispatch(ne([a]));
|
|
3909
3897
|
}), o;
|
|
3910
3898
|
}
|
|
3911
3899
|
async refreshStore(e, s) {
|
|
@@ -3922,7 +3910,7 @@ class lf extends O {
|
|
|
3922
3910
|
blockers: [],
|
|
3923
3911
|
blocks: []
|
|
3924
3912
|
});
|
|
3925
|
-
this.dispatch(tc(await i)), this.dispatch(
|
|
3913
|
+
this.dispatch(tc(await i)), this.dispatch(Zt(await n));
|
|
3926
3914
|
}
|
|
3927
3915
|
}
|
|
3928
3916
|
class uf extends O {
|
|
@@ -3981,8 +3969,8 @@ class hf extends O {
|
|
|
3981
3969
|
});
|
|
3982
3970
|
}
|
|
3983
3971
|
}
|
|
3984
|
-
const
|
|
3985
|
-
let
|
|
3972
|
+
const xe = {}, We = /* @__PURE__ */ new Set();
|
|
3973
|
+
let Me = 0, He = 0, Ke = 0;
|
|
3986
3974
|
const Wl = 20;
|
|
3987
3975
|
class mf extends O {
|
|
3988
3976
|
constructor() {
|
|
@@ -3999,12 +3987,12 @@ class mf extends O {
|
|
|
3999
3987
|
async renewUploadUrl(s) {
|
|
4000
3988
|
const i = await this.fetchCache(s);
|
|
4001
3989
|
if (!i) throw new Error(`File with sha1 ${s} not found in cache`);
|
|
4002
|
-
const n = await
|
|
3990
|
+
const n = await gt(i, s), a = await this.enqueueRequest({
|
|
4003
3991
|
description: "Get S3 URL",
|
|
4004
3992
|
method: d.GET,
|
|
4005
3993
|
url: "/authentication/files/presigned-upload-url/",
|
|
4006
3994
|
queryParams: {
|
|
4007
|
-
sha1: await
|
|
3995
|
+
sha1: await we(i),
|
|
4008
3996
|
file_type: i.type,
|
|
4009
3997
|
extension: i.name.split(".").pop(),
|
|
4010
3998
|
size: i.size.toString()
|
|
@@ -4021,7 +4009,7 @@ class mf extends O {
|
|
|
4021
4009
|
* @param sha1 The sha1 hash of the file to cache.
|
|
4022
4010
|
*/
|
|
4023
4011
|
async addCache(s, i) {
|
|
4024
|
-
if (
|
|
4012
|
+
if (We.has(i))
|
|
4025
4013
|
return;
|
|
4026
4014
|
if (!s.type) {
|
|
4027
4015
|
const o = s.name.split("."), r = o[o.length - 1];
|
|
@@ -4030,12 +4018,12 @@ class mf extends O {
|
|
|
4030
4018
|
if (!s.name || !s.size || !s.type)
|
|
4031
4019
|
throw new Error("Cannot add files to cache that do not have a name, size and type.");
|
|
4032
4020
|
const n = await this._dbPromise;
|
|
4033
|
-
!!await n.get("files", i) ? (console.error("File already cached (this is unexpected at this point):", s.name, i),
|
|
4034
|
-
`File cache summary: ${
|
|
4021
|
+
!!await n.get("files", i) ? (console.error("File already cached (this is unexpected at this point):", s.name, i), Me++) : (await n.put("files", s, i), He++), We.add(i), Ke++, Ke % Wl === 0 && console.debug(
|
|
4022
|
+
`File cache summary: ${Me} hits and ${He} misses, ${Me / (Me + He) * 100}% hit rate over ${Ke} calls to addCache.`
|
|
4035
4023
|
);
|
|
4036
4024
|
}
|
|
4037
4025
|
async removeCache(s) {
|
|
4038
|
-
await (await this._dbPromise).delete("files", s),
|
|
4026
|
+
await (await this._dbPromise).delete("files", s), We.delete(s);
|
|
4039
4027
|
}
|
|
4040
4028
|
async fetchCache(s) {
|
|
4041
4029
|
return (await this._dbPromise).get("files", s);
|
|
@@ -4048,7 +4036,7 @@ class mf extends O {
|
|
|
4048
4036
|
async uploadFileToS3(s) {
|
|
4049
4037
|
const i = await this.fetchCache(s);
|
|
4050
4038
|
if (!i) throw new Error(`File with sha1 ${s} not found in cache`);
|
|
4051
|
-
const n = await
|
|
4039
|
+
const n = await gt(i, s), a = {
|
|
4052
4040
|
file_name: i.name,
|
|
4053
4041
|
file_sha1: s,
|
|
4054
4042
|
file: n
|
|
@@ -4058,7 +4046,7 @@ class mf extends O {
|
|
|
4058
4046
|
return [a, Promise.resolve(void 0).then()];
|
|
4059
4047
|
throw new Error(o.warning);
|
|
4060
4048
|
}
|
|
4061
|
-
const r = o.url,
|
|
4049
|
+
const r = o.url, u = this.enqueueRequest({
|
|
4062
4050
|
url: r,
|
|
4063
4051
|
description: "Upload file",
|
|
4064
4052
|
method: d.POST,
|
|
@@ -4069,7 +4057,7 @@ class mf extends O {
|
|
|
4069
4057
|
blocks: [s],
|
|
4070
4058
|
s3url: o
|
|
4071
4059
|
});
|
|
4072
|
-
return [a,
|
|
4060
|
+
return [a, u];
|
|
4073
4061
|
}
|
|
4074
4062
|
/**
|
|
4075
4063
|
* Fetches a file based on its URL and SHA1. SHA1 values should be known ahead of time because the SHA1 and URL of
|
|
@@ -4089,11 +4077,11 @@ class mf extends O {
|
|
|
4089
4077
|
return o;
|
|
4090
4078
|
}
|
|
4091
4079
|
if (s.startsWith("blob:")) {
|
|
4092
|
-
const
|
|
4080
|
+
const l = await Ia(s), h = new File([l], n ?? i, { type: l.type });
|
|
4093
4081
|
return await this.addCache(h, i), h;
|
|
4094
4082
|
}
|
|
4095
|
-
let r =
|
|
4096
|
-
r ?
|
|
4083
|
+
let r = xe[a], u = !0;
|
|
4084
|
+
r ? u = !1 : (r = new Promise((l) => {
|
|
4097
4085
|
this.enqueueRequest({
|
|
4098
4086
|
description: "Download file",
|
|
4099
4087
|
method: d.GET,
|
|
@@ -4107,19 +4095,19 @@ class mf extends O {
|
|
|
4107
4095
|
blocks: [i]
|
|
4108
4096
|
}).then((h) => {
|
|
4109
4097
|
const m = new File([h], n ?? i, { type: h.type });
|
|
4110
|
-
|
|
4098
|
+
l(m);
|
|
4111
4099
|
});
|
|
4112
|
-
}),
|
|
4100
|
+
}), xe[a] = r);
|
|
4113
4101
|
let c;
|
|
4114
4102
|
try {
|
|
4115
4103
|
c = await r;
|
|
4116
|
-
} catch (
|
|
4117
|
-
throw
|
|
4104
|
+
} catch (l) {
|
|
4105
|
+
throw u && l instanceof k && delete xe[a], l;
|
|
4118
4106
|
}
|
|
4119
|
-
if (
|
|
4120
|
-
const
|
|
4121
|
-
if (
|
|
4122
|
-
const f = `The hash of the file returned from the server (${
|
|
4107
|
+
if (u) {
|
|
4108
|
+
const l = await we(c);
|
|
4109
|
+
if (l !== i) {
|
|
4110
|
+
const f = `The hash of the file returned from the server (${l}) does not match the
|
|
4123
4111
|
expected hash (${i}). This can happen if you're using a local development server and the
|
|
4124
4112
|
isExternalUrl flag in the request details is set to true, because instead of requesting the local
|
|
4125
4113
|
REST API, you will be requesting localhost:80 (where this app runs), resulting in a transformed blob
|
|
@@ -4131,10 +4119,10 @@ class mf extends O {
|
|
|
4131
4119
|
const h = c.type.split("/")[1];
|
|
4132
4120
|
if (!h)
|
|
4133
4121
|
throw new Error("File has no extension");
|
|
4134
|
-
const m = n ??
|
|
4122
|
+
const m = n ?? l + "." + h;
|
|
4135
4123
|
if (c = va(c, m), !c.name)
|
|
4136
4124
|
throw new Error("Failed to set file's name");
|
|
4137
|
-
await this.addCache(c,
|
|
4125
|
+
await this.addCache(c, l), xe[a] = new Promise((f) => {
|
|
4138
4126
|
f(c);
|
|
4139
4127
|
});
|
|
4140
4128
|
}
|
|
@@ -4143,10 +4131,10 @@ class mf extends O {
|
|
|
4143
4131
|
}
|
|
4144
4132
|
class pf extends F {
|
|
4145
4133
|
async bulkAdd(e) {
|
|
4146
|
-
var
|
|
4147
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (
|
|
4134
|
+
var u;
|
|
4135
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (u = this.client.store.getState().userReducer.currentUser) == null ? void 0 : u.id, n = {}, a = [], o = [];
|
|
4148
4136
|
for (const c of e) {
|
|
4149
|
-
const { revisionId:
|
|
4137
|
+
const { revisionId: l, fieldIdentifier: h, file: m } = c, f = await this.getFilePayload(m);
|
|
4150
4138
|
f.sha1 in n || (n[f.sha1] = f);
|
|
4151
4139
|
const b = R({
|
|
4152
4140
|
file: URL.createObjectURL(m),
|
|
@@ -4154,7 +4142,7 @@ class pf extends F {
|
|
|
4154
4142
|
file_name: m.name,
|
|
4155
4143
|
file_sha1: f.sha1,
|
|
4156
4144
|
created_by: i,
|
|
4157
|
-
form_revision:
|
|
4145
|
+
form_revision: l,
|
|
4158
4146
|
submitted_at: s,
|
|
4159
4147
|
field_identifier: h
|
|
4160
4148
|
});
|
|
@@ -4165,7 +4153,7 @@ class pf extends F {
|
|
|
4165
4153
|
field_identifier: h,
|
|
4166
4154
|
file_extension: f.extension,
|
|
4167
4155
|
file_sha1: f.sha1,
|
|
4168
|
-
form_revision:
|
|
4156
|
+
form_revision: l
|
|
4169
4157
|
};
|
|
4170
4158
|
o.push(T);
|
|
4171
4159
|
}
|
|
@@ -4224,8 +4212,8 @@ class ff extends F {
|
|
|
4224
4212
|
blockers: [e.form],
|
|
4225
4213
|
blocks: [a.offline_id]
|
|
4226
4214
|
});
|
|
4227
|
-
return o.then((
|
|
4228
|
-
this.dispatch(wc(
|
|
4215
|
+
return o.then((u) => {
|
|
4216
|
+
this.dispatch(wc(u));
|
|
4229
4217
|
}).catch(() => {
|
|
4230
4218
|
this.dispatch(Wi(a.offline_id));
|
|
4231
4219
|
}), [a, o];
|
|
@@ -4282,8 +4270,8 @@ class Af extends F {
|
|
|
4282
4270
|
submitted_at: n,
|
|
4283
4271
|
created_by: a
|
|
4284
4272
|
});
|
|
4285
|
-
this.dispatch(
|
|
4286
|
-
const
|
|
4273
|
+
this.dispatch(as(o)), this.dispatch(Ni(r));
|
|
4274
|
+
const u = this.enqueueRequest({
|
|
4287
4275
|
description: "Create form",
|
|
4288
4276
|
method: d.POST,
|
|
4289
4277
|
url: "/forms/",
|
|
@@ -4300,18 +4288,18 @@ class Af extends F {
|
|
|
4300
4288
|
blockers: [],
|
|
4301
4289
|
blocks: [o.offline_id, r.offline_id]
|
|
4302
4290
|
});
|
|
4303
|
-
return
|
|
4304
|
-
throw this.dispatch(
|
|
4305
|
-
}), [o, r,
|
|
4291
|
+
return u.catch((l) => {
|
|
4292
|
+
throw this.dispatch(os(o.offline_id)), this.dispatch(Wi(r.offline_id)), l;
|
|
4293
|
+
}), [o, r, u];
|
|
4306
4294
|
}
|
|
4307
4295
|
async delete(e) {
|
|
4308
4296
|
const { store: s } = this.client, i = s.getState(), n = Cc(e)(i);
|
|
4309
4297
|
if (!n)
|
|
4310
4298
|
throw new Error("Expected form to exist");
|
|
4311
4299
|
const a = Lc(e)(i);
|
|
4312
|
-
a.length > 0 && this.dispatch(
|
|
4300
|
+
a.length > 0 && this.dispatch(lt(a.map(({ offline_id: r }) => r)));
|
|
4313
4301
|
const o = Fc(e)(i);
|
|
4314
|
-
o.length > 0 && this.dispatch(Ic(o.map(({ offline_id: r }) => r))), this.dispatch(
|
|
4302
|
+
o.length > 0 && this.dispatch(Ic(o.map(({ offline_id: r }) => r))), this.dispatch(os(e));
|
|
4315
4303
|
try {
|
|
4316
4304
|
return await this.enqueueRequest({
|
|
4317
4305
|
description: "Delete form",
|
|
@@ -4321,7 +4309,7 @@ class Af extends F {
|
|
|
4321
4309
|
blocks: []
|
|
4322
4310
|
});
|
|
4323
4311
|
} catch (r) {
|
|
4324
|
-
throw this.dispatch(
|
|
4312
|
+
throw this.dispatch(as(n)), o.length > 0 && this.dispatch(vc(o)), a.length > 0 && this.dispatch(dt(a)), r;
|
|
4325
4313
|
}
|
|
4326
4314
|
}
|
|
4327
4315
|
async refreshStore(e) {
|
|
@@ -4340,10 +4328,10 @@ class Af extends F {
|
|
|
4340
4328
|
}
|
|
4341
4329
|
class gf extends F {
|
|
4342
4330
|
async bulkAdd(e) {
|
|
4343
|
-
var
|
|
4344
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (
|
|
4331
|
+
var u;
|
|
4332
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (u = this.client.store.getState().userReducer.currentUser) == null ? void 0 : u.id, n = {}, a = [], o = [];
|
|
4345
4333
|
for (const c of e) {
|
|
4346
|
-
const { submissionId:
|
|
4334
|
+
const { submissionId: l, fieldIdentifier: h, file: m } = c, f = await this.getFilePayload(m);
|
|
4347
4335
|
f.sha1 in n || (n[f.sha1] = f);
|
|
4348
4336
|
const b = R({
|
|
4349
4337
|
file: URL.createObjectURL(m),
|
|
@@ -4351,7 +4339,7 @@ class gf extends F {
|
|
|
4351
4339
|
file_name: m.name,
|
|
4352
4340
|
file_sha1: f.sha1,
|
|
4353
4341
|
created_by: i,
|
|
4354
|
-
form_submission:
|
|
4342
|
+
form_submission: l,
|
|
4355
4343
|
submitted_at: s,
|
|
4356
4344
|
field_identifier: h
|
|
4357
4345
|
});
|
|
@@ -4362,11 +4350,11 @@ class gf extends F {
|
|
|
4362
4350
|
file_sha1: f.sha1,
|
|
4363
4351
|
file_extension: f.extension,
|
|
4364
4352
|
field_identifier: h,
|
|
4365
|
-
form_submission:
|
|
4353
|
+
form_submission: l
|
|
4366
4354
|
};
|
|
4367
4355
|
o.push(T);
|
|
4368
4356
|
}
|
|
4369
|
-
this.dispatch(
|
|
4357
|
+
this.dispatch(et(a));
|
|
4370
4358
|
const r = this.enqueueRequest({
|
|
4371
4359
|
description: "Attach files to form submission",
|
|
4372
4360
|
method: d.POST,
|
|
@@ -4383,15 +4371,15 @@ class gf extends F {
|
|
|
4383
4371
|
this.processPresignedUrls(c.presigned_urls), this.dispatch(Mc(c.attachments));
|
|
4384
4372
|
}).catch((c) => {
|
|
4385
4373
|
throw this.dispatch(
|
|
4386
|
-
|
|
4387
|
-
a.map((
|
|
4374
|
+
tt(
|
|
4375
|
+
a.map((l) => l.offline_id)
|
|
4388
4376
|
)
|
|
4389
4377
|
), c;
|
|
4390
4378
|
}), [a, r.then(({ attachments: c }) => c)];
|
|
4391
4379
|
}
|
|
4392
4380
|
async bulkDelete(e) {
|
|
4393
4381
|
const { store: s } = this.client, i = s.getState(), n = zc(e)(i);
|
|
4394
|
-
this.dispatch(
|
|
4382
|
+
this.dispatch(tt(e));
|
|
4395
4383
|
try {
|
|
4396
4384
|
await this.enqueueRequest({
|
|
4397
4385
|
description: "Delete form submission attachments",
|
|
@@ -4402,7 +4390,7 @@ class gf extends F {
|
|
|
4402
4390
|
blocks: []
|
|
4403
4391
|
});
|
|
4404
4392
|
} catch (a) {
|
|
4405
|
-
throw this.dispatch(
|
|
4393
|
+
throw this.dispatch(et(n)), a;
|
|
4406
4394
|
}
|
|
4407
4395
|
}
|
|
4408
4396
|
async refreshStore(e) {
|
|
@@ -4422,16 +4410,16 @@ class gf extends F {
|
|
|
4422
4410
|
class bf extends F {
|
|
4423
4411
|
async add(e) {
|
|
4424
4412
|
var h;
|
|
4425
|
-
const { store: s } = this.client, { file: i, ...n } = e, a = (/* @__PURE__ */ new Date()).toISOString(), o = (h = s.getState().userReducer.currentUser) == null ? void 0 : h.id, r = n.project,
|
|
4413
|
+
const { store: s } = this.client, { file: i, ...n } = e, a = (/* @__PURE__ */ new Date()).toISOString(), o = (h = s.getState().userReducer.currentUser) == null ? void 0 : h.id, r = n.project, u = await this.getFilePayload(i), c = R({
|
|
4426
4414
|
...n,
|
|
4427
4415
|
file_name: i.name,
|
|
4428
|
-
file_sha1:
|
|
4416
|
+
file_sha1: u.sha1,
|
|
4429
4417
|
file: URL.createObjectURL(i),
|
|
4430
4418
|
submitted_at: a,
|
|
4431
4419
|
created_by: o
|
|
4432
4420
|
});
|
|
4433
4421
|
this.dispatch(Yc(c));
|
|
4434
|
-
const
|
|
4422
|
+
const l = this.enqueueRequest({
|
|
4435
4423
|
description: "Add geo image",
|
|
4436
4424
|
method: d.POST,
|
|
4437
4425
|
url: "/geo-images/",
|
|
@@ -4447,20 +4435,20 @@ class bf extends F {
|
|
|
4447
4435
|
file_name: c.file_name,
|
|
4448
4436
|
direction: c.direction,
|
|
4449
4437
|
original_date: c.original_date,
|
|
4450
|
-
file:
|
|
4438
|
+
file: u
|
|
4451
4439
|
},
|
|
4452
4440
|
blocks: [r.toString()],
|
|
4453
4441
|
blockers: [r.toString()]
|
|
4454
4442
|
});
|
|
4455
|
-
return
|
|
4456
|
-
this.processPresignedUrls(m.presigned_urls), this.dispatch(
|
|
4443
|
+
return l.then((m) => {
|
|
4444
|
+
this.processPresignedUrls(m.presigned_urls), this.dispatch(je(m.geo_image));
|
|
4457
4445
|
}).catch(() => {
|
|
4458
|
-
this.dispatch(
|
|
4459
|
-
}), [c,
|
|
4446
|
+
this.dispatch(ms(c.offline_id));
|
|
4447
|
+
}), [c, l.then((m) => m.geo_image)];
|
|
4460
4448
|
}
|
|
4461
4449
|
async bulkAdd(e, s) {
|
|
4462
4450
|
var h;
|
|
4463
|
-
const { store: i } = this.client, n = (/* @__PURE__ */ new Date()).toISOString(), a = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, o = [], r = [],
|
|
4451
|
+
const { store: i } = this.client, n = (/* @__PURE__ */ new Date()).toISOString(), a = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, o = [], r = [], u = [], c = {};
|
|
4464
4452
|
for (const m of e) {
|
|
4465
4453
|
const { file: f, ...b } = m, T = await this.getFilePayload(f);
|
|
4466
4454
|
T.sha1 in c || (c[T.sha1] = T);
|
|
@@ -4473,7 +4461,7 @@ class bf extends F {
|
|
|
4473
4461
|
created_by: a,
|
|
4474
4462
|
project: s
|
|
4475
4463
|
});
|
|
4476
|
-
o.push(S), r.push(S.offline_id),
|
|
4464
|
+
o.push(S), r.push(S.offline_id), u.push({
|
|
4477
4465
|
offline_id: S.offline_id,
|
|
4478
4466
|
sha1: S.file_sha1,
|
|
4479
4467
|
file_name: S.file_name,
|
|
@@ -4486,27 +4474,27 @@ class bf extends F {
|
|
|
4486
4474
|
});
|
|
4487
4475
|
}
|
|
4488
4476
|
this.dispatch(Jc(o));
|
|
4489
|
-
const
|
|
4477
|
+
const l = this.enqueueRequest({
|
|
4490
4478
|
description: "Bulk add geo images",
|
|
4491
4479
|
method: d.POST,
|
|
4492
4480
|
url: "/geo-images/bulk/",
|
|
4493
4481
|
payload: {
|
|
4494
4482
|
submitted_at: n,
|
|
4495
4483
|
project: s,
|
|
4496
|
-
geo_images:
|
|
4484
|
+
geo_images: u,
|
|
4497
4485
|
files: Object.values(c)
|
|
4498
4486
|
},
|
|
4499
4487
|
blocks: [s.toString()],
|
|
4500
4488
|
blockers: r
|
|
4501
4489
|
});
|
|
4502
|
-
return
|
|
4490
|
+
return l.then((m) => {
|
|
4503
4491
|
this.processPresignedUrls(m.presigned_urls), this.dispatch(Kc(m.geo_images));
|
|
4504
4492
|
}).catch(() => {
|
|
4505
4493
|
this.dispatch(Qc(r));
|
|
4506
|
-
}), [o,
|
|
4494
|
+
}), [o, l.then((m) => m.geo_images)];
|
|
4507
4495
|
}
|
|
4508
4496
|
update(e) {
|
|
4509
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
4497
|
+
const { store: s } = this.client, i = s.getState(), n = ps(e.offline_id)(i);
|
|
4510
4498
|
if (!n)
|
|
4511
4499
|
throw new Error(`Map image with offline_id ${e.offline_id} does not exist in the store`);
|
|
4512
4500
|
const a = { ...n, ...e };
|
|
@@ -4520,16 +4508,16 @@ class bf extends F {
|
|
|
4520
4508
|
blockers: [e.offline_id]
|
|
4521
4509
|
});
|
|
4522
4510
|
return o.then((r) => {
|
|
4523
|
-
this.dispatch(
|
|
4511
|
+
this.dispatch(je(r));
|
|
4524
4512
|
}).catch(() => {
|
|
4525
|
-
this.dispatch(
|
|
4513
|
+
this.dispatch(je(n));
|
|
4526
4514
|
}), [a, o];
|
|
4527
4515
|
}
|
|
4528
4516
|
async delete(e) {
|
|
4529
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
4517
|
+
const { store: s } = this.client, i = s.getState(), n = ps(e)(i);
|
|
4530
4518
|
if (!n)
|
|
4531
4519
|
throw new Error(`Map image with offline_id ${e} does not exist in the store`);
|
|
4532
|
-
this.dispatch(
|
|
4520
|
+
this.dispatch(ms(e));
|
|
4533
4521
|
const a = this.enqueueRequest({
|
|
4534
4522
|
description: "Delete geo image",
|
|
4535
4523
|
method: d.DELETE,
|
|
@@ -4538,7 +4526,7 @@ class bf extends F {
|
|
|
4538
4526
|
blockers: [e]
|
|
4539
4527
|
});
|
|
4540
4528
|
return a.catch(() => {
|
|
4541
|
-
this.dispatch(
|
|
4529
|
+
this.dispatch(je(n));
|
|
4542
4530
|
}), a;
|
|
4543
4531
|
}
|
|
4544
4532
|
async refreshStore(e) {
|
|
@@ -4560,7 +4548,7 @@ class _f extends O {
|
|
|
4560
4548
|
submitted_at: i,
|
|
4561
4549
|
created_by: n
|
|
4562
4550
|
});
|
|
4563
|
-
this.dispatch(
|
|
4551
|
+
this.dispatch(ys(a));
|
|
4564
4552
|
const o = this.enqueueRequest({
|
|
4565
4553
|
description: "Add issue association",
|
|
4566
4554
|
method: d.POST,
|
|
@@ -4577,17 +4565,17 @@ class _f extends O {
|
|
|
4577
4565
|
],
|
|
4578
4566
|
blocks: [a.offline_id]
|
|
4579
4567
|
});
|
|
4580
|
-
return o.then((
|
|
4581
|
-
this.dispatch(ir(
|
|
4568
|
+
return o.then((u) => {
|
|
4569
|
+
this.dispatch(ir(u));
|
|
4582
4570
|
}).catch(() => {
|
|
4583
|
-
this.dispatch(
|
|
4571
|
+
this.dispatch(As(a.offline_id));
|
|
4584
4572
|
}), [a, o];
|
|
4585
4573
|
}
|
|
4586
4574
|
async delete(e) {
|
|
4587
4575
|
const { store: s } = this.client, i = nr(e)(s.getState());
|
|
4588
4576
|
if (!i)
|
|
4589
4577
|
throw new Error(`Issue association with id ${e} not found in store.`);
|
|
4590
|
-
this.dispatch(
|
|
4578
|
+
this.dispatch(As(e));
|
|
4591
4579
|
const n = this.enqueueRequest({
|
|
4592
4580
|
description: "Delete issue association",
|
|
4593
4581
|
method: d.DELETE,
|
|
@@ -4596,7 +4584,7 @@ class _f extends O {
|
|
|
4596
4584
|
blocks: []
|
|
4597
4585
|
});
|
|
4598
4586
|
return n.catch(() => {
|
|
4599
|
-
this.dispatch(
|
|
4587
|
+
this.dispatch(ys(i));
|
|
4600
4588
|
}), n;
|
|
4601
4589
|
}
|
|
4602
4590
|
async refreshStore(e) {
|
|
@@ -4611,7 +4599,7 @@ class _f extends O {
|
|
|
4611
4599
|
this.dispatch(sr(s));
|
|
4612
4600
|
}
|
|
4613
4601
|
}
|
|
4614
|
-
class Sf extends
|
|
4602
|
+
class Sf extends Ee {
|
|
4615
4603
|
constructor() {
|
|
4616
4604
|
super(...arguments);
|
|
4617
4605
|
y(this, "name", "Issue Attachment");
|
|
@@ -4669,7 +4657,7 @@ class Tf extends O {
|
|
|
4669
4657
|
author: (a = s.getState().userReducer.currentUser) == null ? void 0 : a.id,
|
|
4670
4658
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4671
4659
|
});
|
|
4672
|
-
this.dispatch(
|
|
4660
|
+
this.dispatch(Ss(i));
|
|
4673
4661
|
const n = this.enqueueRequest({
|
|
4674
4662
|
description: "Add issue comment",
|
|
4675
4663
|
method: d.POST,
|
|
@@ -4679,7 +4667,7 @@ class Tf extends O {
|
|
|
4679
4667
|
blocks: [i.offline_id]
|
|
4680
4668
|
});
|
|
4681
4669
|
return n.catch(() => {
|
|
4682
|
-
this.dispatch(
|
|
4670
|
+
this.dispatch(Ts(i.offline_id));
|
|
4683
4671
|
}), [i, n];
|
|
4684
4672
|
}
|
|
4685
4673
|
update(e) {
|
|
@@ -4690,7 +4678,7 @@ class Tf extends O {
|
|
|
4690
4678
|
...i,
|
|
4691
4679
|
...e
|
|
4692
4680
|
};
|
|
4693
|
-
this.dispatch(
|
|
4681
|
+
this.dispatch(_s(n));
|
|
4694
4682
|
const a = this.enqueueRequest({
|
|
4695
4683
|
description: "Edit issue comment",
|
|
4696
4684
|
method: d.PATCH,
|
|
@@ -4700,14 +4688,14 @@ class Tf extends O {
|
|
|
4700
4688
|
blocks: [e.offline_id]
|
|
4701
4689
|
});
|
|
4702
4690
|
return a.catch(() => {
|
|
4703
|
-
this.dispatch(
|
|
4691
|
+
this.dispatch(_s(i));
|
|
4704
4692
|
}), [n, a];
|
|
4705
4693
|
}
|
|
4706
4694
|
remove(e) {
|
|
4707
4695
|
const s = this.client.store.getState().issueCommentReducer.instances[e];
|
|
4708
4696
|
if (!s)
|
|
4709
4697
|
throw new Error(`Comment with offline_id ${e} not found in store`);
|
|
4710
|
-
this.dispatch(
|
|
4698
|
+
this.dispatch(Ts(e));
|
|
4711
4699
|
const i = this.enqueueRequest({
|
|
4712
4700
|
description: "Delete comment",
|
|
4713
4701
|
method: d.DELETE,
|
|
@@ -4716,7 +4704,7 @@ class Tf extends O {
|
|
|
4716
4704
|
blocks: []
|
|
4717
4705
|
});
|
|
4718
4706
|
return i.catch(() => {
|
|
4719
|
-
this.dispatch(
|
|
4707
|
+
this.dispatch(Ss(s));
|
|
4720
4708
|
}), i;
|
|
4721
4709
|
}
|
|
4722
4710
|
async refreshStore(e) {
|
|
@@ -4735,13 +4723,13 @@ class Tf extends O {
|
|
|
4735
4723
|
}
|
|
4736
4724
|
class Rf extends O {
|
|
4737
4725
|
add(e) {
|
|
4738
|
-
var
|
|
4739
|
-
const { store: s } = this.client, i = s.getState(), n = (/* @__PURE__ */ new Date()).toISOString(), a = (
|
|
4726
|
+
var u;
|
|
4727
|
+
const { store: s } = this.client, i = s.getState(), n = (/* @__PURE__ */ new Date()).toISOString(), a = (u = i.userReducer.currentUser) == null ? void 0 : u.id, o = R({
|
|
4740
4728
|
...e,
|
|
4741
4729
|
submitted_at: n,
|
|
4742
4730
|
created_by: a
|
|
4743
4731
|
});
|
|
4744
|
-
this.dispatch(
|
|
4732
|
+
this.dispatch(ws(o));
|
|
4745
4733
|
const r = this.enqueueRequest({
|
|
4746
4734
|
description: "Create issue",
|
|
4747
4735
|
method: d.POST,
|
|
@@ -4751,20 +4739,20 @@ class Rf extends O {
|
|
|
4751
4739
|
blocks: [o.offline_id]
|
|
4752
4740
|
});
|
|
4753
4741
|
return r.then((c) => {
|
|
4754
|
-
this.dispatch(
|
|
4742
|
+
this.dispatch(Be(c));
|
|
4755
4743
|
}).catch((c) => {
|
|
4756
|
-
throw this.dispatch(
|
|
4744
|
+
throw this.dispatch(Os(o.offline_id)), c;
|
|
4757
4745
|
}), [o, r];
|
|
4758
4746
|
}
|
|
4759
4747
|
update(e) {
|
|
4760
|
-
var
|
|
4761
|
-
const s = this.client.store.getState(), i =
|
|
4748
|
+
var u;
|
|
4749
|
+
const s = this.client.store.getState(), i = vs(e.offline_id)(s);
|
|
4762
4750
|
if (!i)
|
|
4763
4751
|
throw new Error(
|
|
4764
4752
|
`Attempting to update an issue with offline_id ${e.offline_id} that doesn't exist in the store`
|
|
4765
4753
|
);
|
|
4766
4754
|
const n = { ...i, ...e };
|
|
4767
|
-
this.dispatch(
|
|
4755
|
+
this.dispatch(Be(n));
|
|
4768
4756
|
const a = {};
|
|
4769
4757
|
for (const c of [
|
|
4770
4758
|
I.TITLE,
|
|
@@ -4779,8 +4767,8 @@ class Rf extends O {
|
|
|
4779
4767
|
switch (c) {
|
|
4780
4768
|
case I.PRIORITY:
|
|
4781
4769
|
case I.STATUS: {
|
|
4782
|
-
const
|
|
4783
|
-
a[c] =
|
|
4770
|
+
const l = e[c];
|
|
4771
|
+
a[c] = l !== void 0 ? Number(l) : null;
|
|
4784
4772
|
break;
|
|
4785
4773
|
}
|
|
4786
4774
|
case I.DUE_DATE:
|
|
@@ -4789,35 +4777,35 @@ class Rf extends O {
|
|
|
4789
4777
|
a[c] = e[c] ?? null;
|
|
4790
4778
|
break;
|
|
4791
4779
|
case I.CATEGORY: {
|
|
4792
|
-
let
|
|
4780
|
+
let l = null;
|
|
4793
4781
|
const h = e[c];
|
|
4794
|
-
if (h && (
|
|
4782
|
+
if (h && (l = s.categoryReducer.instances[h] ?? null, !l))
|
|
4795
4783
|
throw new Error(
|
|
4796
4784
|
`Trying to update issue category to ${h} which does not exist in store`
|
|
4797
4785
|
);
|
|
4798
|
-
a[c] =
|
|
4799
|
-
name:
|
|
4800
|
-
color:
|
|
4801
|
-
offline_id:
|
|
4786
|
+
a[c] = l ? {
|
|
4787
|
+
name: l.name,
|
|
4788
|
+
color: l.color,
|
|
4789
|
+
offline_id: l.offline_id
|
|
4802
4790
|
} : null;
|
|
4803
4791
|
break;
|
|
4804
4792
|
}
|
|
4805
4793
|
case I.ASSIGNED_TO: {
|
|
4806
|
-
let
|
|
4794
|
+
let l = null;
|
|
4807
4795
|
const h = e[c];
|
|
4808
|
-
if (h && (
|
|
4796
|
+
if (h && (l = s.userReducer.users[h] ?? null, !l))
|
|
4809
4797
|
throw new Error(
|
|
4810
4798
|
`Trying to update issue assigned_to to ${h} which does not exist in store`
|
|
4811
4799
|
);
|
|
4812
|
-
a[c] =
|
|
4813
|
-
full_name:
|
|
4814
|
-
id:
|
|
4800
|
+
a[c] = l ? {
|
|
4801
|
+
full_name: l.username,
|
|
4802
|
+
id: l.id
|
|
4815
4803
|
} : null;
|
|
4816
4804
|
break;
|
|
4817
4805
|
}
|
|
4818
4806
|
}
|
|
4819
4807
|
const o = R({
|
|
4820
|
-
created_by: (
|
|
4808
|
+
created_by: (u = s.userReducer.currentUser) == null ? void 0 : u.id,
|
|
4821
4809
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4822
4810
|
issue: i.offline_id,
|
|
4823
4811
|
changes: a
|
|
@@ -4832,20 +4820,20 @@ class Rf extends O {
|
|
|
4832
4820
|
blocks: [e.offline_id]
|
|
4833
4821
|
});
|
|
4834
4822
|
return r.catch(() => {
|
|
4835
|
-
this.dispatch(
|
|
4823
|
+
this.dispatch(Be(i)), this.dispatch(id(o.offline_id));
|
|
4836
4824
|
}), [n, r];
|
|
4837
4825
|
}
|
|
4838
4826
|
async remove(e) {
|
|
4839
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
4827
|
+
const { store: s } = this.client, i = s.getState(), n = vs(e)(i);
|
|
4840
4828
|
if (!n)
|
|
4841
4829
|
throw new Error(`No issue with id ${e} found in the store`);
|
|
4842
|
-
const a = pr(e)(i), o = od(e)(i), r = Bc(e)(i),
|
|
4843
|
-
for (const
|
|
4844
|
-
l
|
|
4845
|
-
for (const
|
|
4846
|
-
l
|
|
4847
|
-
const c = Object.values(
|
|
4848
|
-
this.dispatch(
|
|
4830
|
+
const a = pr(e)(i), o = od(e)(i), r = Bc(e)(i), u = {};
|
|
4831
|
+
for (const l of ar(e)(i))
|
|
4832
|
+
u[l.offline_id] = l;
|
|
4833
|
+
for (const l of or(e)(i))
|
|
4834
|
+
u[l.offline_id] = l;
|
|
4835
|
+
const c = Object.values(u);
|
|
4836
|
+
this.dispatch(Os(e)), a.length > 0 && this.dispatch(on(a.map(({ offline_id: l }) => l))), o.length > 0 && this.dispatch(nd(o.map(({ offline_id: l }) => l))), r.length > 0 && this.dispatch(lt(r.map(({ offline_id: l }) => l))), c.length > 0 && this.dispatch(sn(c.map(({ offline_id: l }) => l)));
|
|
4849
4837
|
try {
|
|
4850
4838
|
return await this.enqueueRequest({
|
|
4851
4839
|
description: "Delete issue",
|
|
@@ -4854,8 +4842,8 @@ class Rf extends O {
|
|
|
4854
4842
|
blockers: [e],
|
|
4855
4843
|
blocks: []
|
|
4856
4844
|
});
|
|
4857
|
-
} catch (
|
|
4858
|
-
throw this.dispatch(
|
|
4845
|
+
} catch (l) {
|
|
4846
|
+
throw this.dispatch(ws(n)), this.dispatch(an(a)), this.dispatch(sd(o)), this.dispatch(dt(r)), this.dispatch(tn(c)), l;
|
|
4859
4847
|
}
|
|
4860
4848
|
}
|
|
4861
4849
|
async refreshStore(e) {
|
|
@@ -4874,10 +4862,10 @@ class Rf extends O {
|
|
|
4874
4862
|
}
|
|
4875
4863
|
class wf extends F {
|
|
4876
4864
|
async bulkAdd(e) {
|
|
4877
|
-
var
|
|
4878
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (
|
|
4865
|
+
var u;
|
|
4866
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (u = this.client.store.getState().userReducer.currentUser) == null ? void 0 : u.id, n = {}, a = [], o = [];
|
|
4879
4867
|
for (const c of e) {
|
|
4880
|
-
const { fieldsRevisionId:
|
|
4868
|
+
const { fieldsRevisionId: l, fieldIdentifier: h, file: m } = c, f = await this.getFilePayload(m);
|
|
4881
4869
|
f.sha1 in n || (n[f.sha1] = f);
|
|
4882
4870
|
const b = R({
|
|
4883
4871
|
file: URL.createObjectURL(m),
|
|
@@ -4885,7 +4873,7 @@ class wf extends F {
|
|
|
4885
4873
|
file_name: m.name,
|
|
4886
4874
|
file_sha1: f.sha1,
|
|
4887
4875
|
created_by: i,
|
|
4888
|
-
fields_revision:
|
|
4876
|
+
fields_revision: l,
|
|
4889
4877
|
submitted_at: s,
|
|
4890
4878
|
field_identifier: h
|
|
4891
4879
|
});
|
|
@@ -4896,7 +4884,7 @@ class wf extends F {
|
|
|
4896
4884
|
file_extension: f.extension,
|
|
4897
4885
|
field_identifier: h,
|
|
4898
4886
|
file_sha1: f.sha1,
|
|
4899
|
-
fields_revision:
|
|
4887
|
+
fields_revision: l
|
|
4900
4888
|
};
|
|
4901
4889
|
o.push(T);
|
|
4902
4890
|
}
|
|
@@ -4954,10 +4942,10 @@ class Of extends O {
|
|
|
4954
4942
|
blockers: [a.issue_type],
|
|
4955
4943
|
blocks: [a.offline_id]
|
|
4956
4944
|
});
|
|
4957
|
-
return o.then((
|
|
4958
|
-
this.dispatch(zr(
|
|
4959
|
-
}).catch((
|
|
4960
|
-
throw this.dispatch($r(a.offline_id)),
|
|
4945
|
+
return o.then((u) => {
|
|
4946
|
+
this.dispatch(zr(u));
|
|
4947
|
+
}).catch((u) => {
|
|
4948
|
+
throw this.dispatch($r(a.offline_id)), u;
|
|
4961
4949
|
}), [a, o];
|
|
4962
4950
|
}
|
|
4963
4951
|
async refreshStore(e) {
|
|
@@ -4976,10 +4964,10 @@ class Of extends O {
|
|
|
4976
4964
|
}
|
|
4977
4965
|
class vf extends F {
|
|
4978
4966
|
async bulkAdd(e) {
|
|
4979
|
-
var
|
|
4980
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (
|
|
4967
|
+
var u;
|
|
4968
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = (u = this.client.store.getState().userReducer.currentUser) == null ? void 0 : u.id, n = {}, a = [], o = [];
|
|
4981
4969
|
for (const c of e) {
|
|
4982
|
-
const { fieldValuesId:
|
|
4970
|
+
const { fieldValuesId: l, fieldIdentifier: h, file: m } = c, f = await this.getFilePayload(m);
|
|
4983
4971
|
f.sha1 in n || (n[f.sha1] = f);
|
|
4984
4972
|
const b = R({
|
|
4985
4973
|
file: URL.createObjectURL(m),
|
|
@@ -4987,7 +4975,7 @@ class vf extends F {
|
|
|
4987
4975
|
file_name: m.name,
|
|
4988
4976
|
file_sha1: f.sha1,
|
|
4989
4977
|
created_by: i,
|
|
4990
|
-
field_values:
|
|
4978
|
+
field_values: l,
|
|
4991
4979
|
submitted_at: s,
|
|
4992
4980
|
field_identifier: h
|
|
4993
4981
|
});
|
|
@@ -4998,11 +4986,11 @@ class vf extends F {
|
|
|
4998
4986
|
file_sha1: f.sha1,
|
|
4999
4987
|
file_extension: f.extension,
|
|
5000
4988
|
field_identifier: h,
|
|
5001
|
-
field_values:
|
|
4989
|
+
field_values: l
|
|
5002
4990
|
};
|
|
5003
4991
|
o.push(T);
|
|
5004
4992
|
}
|
|
5005
|
-
this.dispatch(
|
|
4993
|
+
this.dispatch(st(a));
|
|
5006
4994
|
const r = this.enqueueRequest({
|
|
5007
4995
|
description: "Add issue type field values attachments",
|
|
5008
4996
|
method: d.POST,
|
|
@@ -5015,19 +5003,19 @@ class vf extends F {
|
|
|
5015
5003
|
blockers: a.map((c) => c.field_values),
|
|
5016
5004
|
blocks: a.map((c) => c.offline_id)
|
|
5017
5005
|
});
|
|
5018
|
-
return r.then(({ presigned_urls: c, attachments:
|
|
5019
|
-
this.processPresignedUrls(c), this.dispatch(Lr(
|
|
5006
|
+
return r.then(({ presigned_urls: c, attachments: l }) => {
|
|
5007
|
+
this.processPresignedUrls(c), this.dispatch(Lr(l));
|
|
5020
5008
|
}).catch((c) => {
|
|
5021
5009
|
throw this.dispatch(
|
|
5022
|
-
|
|
5023
|
-
a.map((
|
|
5010
|
+
it(
|
|
5011
|
+
a.map((l) => l.offline_id)
|
|
5024
5012
|
)
|
|
5025
5013
|
), c;
|
|
5026
5014
|
}), [a, r.then(({ attachments: c }) => c)];
|
|
5027
5015
|
}
|
|
5028
5016
|
async bulkDelete(e) {
|
|
5029
5017
|
const { store: s } = this.client, i = s.getState(), n = Nr(e)(i);
|
|
5030
|
-
this.dispatch(
|
|
5018
|
+
this.dispatch(it(e));
|
|
5031
5019
|
try {
|
|
5032
5020
|
await this.enqueueRequest({
|
|
5033
5021
|
description: "Delete issue type field values attachments",
|
|
@@ -5038,7 +5026,7 @@ class vf extends F {
|
|
|
5038
5026
|
blocks: []
|
|
5039
5027
|
});
|
|
5040
5028
|
} catch (a) {
|
|
5041
|
-
throw this.dispatch(
|
|
5029
|
+
throw this.dispatch(st(n)), a;
|
|
5042
5030
|
}
|
|
5043
5031
|
}
|
|
5044
5032
|
async refreshStore(e) {
|
|
@@ -5057,61 +5045,56 @@ class vf extends F {
|
|
|
5057
5045
|
}
|
|
5058
5046
|
class If extends O {
|
|
5059
5047
|
add(e) {
|
|
5060
|
-
var
|
|
5061
|
-
const { store: s } = this.client, i = s.getState(),
|
|
5048
|
+
var o;
|
|
5049
|
+
const { store: s } = this.client, i = s.getState(), n = R({
|
|
5062
5050
|
...e,
|
|
5063
|
-
|
|
5064
|
-
created_by: (r = i.userReducer.currentUser) == null ? void 0 : r.id,
|
|
5051
|
+
created_by: (o = i.userReducer.currentUser) == null ? void 0 : o.id,
|
|
5065
5052
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5066
|
-
}),
|
|
5053
|
+
}), a = this.enqueueRequest({
|
|
5067
5054
|
description: "Add issue type field values",
|
|
5068
5055
|
method: d.POST,
|
|
5069
5056
|
url: "/issue-type-field-values/",
|
|
5070
|
-
payload:
|
|
5057
|
+
payload: n,
|
|
5071
5058
|
blockers: [e.issue, e.fields_revision],
|
|
5072
|
-
blocks: [
|
|
5059
|
+
blocks: [n.offline_id]
|
|
5073
5060
|
});
|
|
5074
|
-
return this.dispatch(
|
|
5075
|
-
this.dispatch(
|
|
5076
|
-
}), [
|
|
5061
|
+
return this.dispatch(ks(n)), a.then((r) => (this.dispatch(Pe(r)), r)).catch(() => {
|
|
5062
|
+
this.dispatch(Fs(n.offline_id));
|
|
5063
|
+
}), [n, a];
|
|
5077
5064
|
}
|
|
5078
5065
|
update(e) {
|
|
5079
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
5066
|
+
const { store: s } = this.client, i = s.getState(), n = qs(e.offline_id)(i);
|
|
5080
5067
|
if (!n)
|
|
5081
5068
|
throw new Error(`Expected IssueTypeFieldValues with offline_id ${e.offline_id} to exist`);
|
|
5082
|
-
const
|
|
5069
|
+
const a = {
|
|
5083
5070
|
...n,
|
|
5084
|
-
...e
|
|
5085
|
-
values: a
|
|
5071
|
+
...e
|
|
5086
5072
|
};
|
|
5087
|
-
this.dispatch(
|
|
5088
|
-
const
|
|
5073
|
+
this.dispatch(Pe(a));
|
|
5074
|
+
const o = this.enqueueRequest({
|
|
5089
5075
|
description: "Update issue type field values",
|
|
5090
5076
|
method: d.PATCH,
|
|
5091
5077
|
url: `/issue-type-field-values/${e.offline_id}/`,
|
|
5092
|
-
payload:
|
|
5093
|
-
...e,
|
|
5094
|
-
values: a
|
|
5095
|
-
},
|
|
5078
|
+
payload: e,
|
|
5096
5079
|
blockers: [
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5080
|
+
a.offline_id,
|
|
5081
|
+
a.fields_revision,
|
|
5082
|
+
a.issue
|
|
5100
5083
|
],
|
|
5101
|
-
blocks: [
|
|
5084
|
+
blocks: [a.offline_id]
|
|
5102
5085
|
});
|
|
5103
|
-
return
|
|
5104
|
-
this.dispatch(
|
|
5086
|
+
return o.then((r) => {
|
|
5087
|
+
this.dispatch(Pe(r));
|
|
5105
5088
|
}).catch(() => {
|
|
5106
|
-
this.dispatch(
|
|
5107
|
-
}), [
|
|
5089
|
+
this.dispatch(Pe(n));
|
|
5090
|
+
}), [a, o];
|
|
5108
5091
|
}
|
|
5109
5092
|
async delete(e) {
|
|
5110
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
5093
|
+
const { store: s } = this.client, i = s.getState(), n = qs(e)(i);
|
|
5111
5094
|
if (!n)
|
|
5112
5095
|
throw new Error(`Expected submission with offline_id ${e} to exist`);
|
|
5113
5096
|
const a = Wr(e)(i);
|
|
5114
|
-
this.dispatch(
|
|
5097
|
+
this.dispatch(Fs(e)), this.dispatch(it(a.map((o) => o.offline_id)));
|
|
5115
5098
|
try {
|
|
5116
5099
|
await this.enqueueRequest({
|
|
5117
5100
|
description: "Delete issue type field values",
|
|
@@ -5121,7 +5104,7 @@ class If extends O {
|
|
|
5121
5104
|
blocks: []
|
|
5122
5105
|
});
|
|
5123
5106
|
} catch (o) {
|
|
5124
|
-
throw this.dispatch(
|
|
5107
|
+
throw this.dispatch(ks(n)), this.dispatch(st(a)), o;
|
|
5125
5108
|
}
|
|
5126
5109
|
}
|
|
5127
5110
|
async refreshStore(e) {
|
|
@@ -5155,13 +5138,13 @@ class Ef extends O {
|
|
|
5155
5138
|
blocks: [n.offline_id]
|
|
5156
5139
|
});
|
|
5157
5140
|
return a.then((r) => {
|
|
5158
|
-
this.dispatch(
|
|
5141
|
+
this.dispatch(De(r));
|
|
5159
5142
|
}).catch(() => {
|
|
5160
|
-
this.dispatch(
|
|
5143
|
+
this.dispatch(Cs(n.offline_id));
|
|
5161
5144
|
}), [n, a];
|
|
5162
5145
|
}
|
|
5163
5146
|
update(e) {
|
|
5164
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
5147
|
+
const { store: s } = this.client, i = s.getState(), n = xs(e.offline_id)(i);
|
|
5165
5148
|
if (!n)
|
|
5166
5149
|
throw new Error(`IssueType with offline_id ${e.offline_id} does not exist in the store.`);
|
|
5167
5150
|
const a = {
|
|
@@ -5177,17 +5160,17 @@ class Ef extends O {
|
|
|
5177
5160
|
blocks: [e.offline_id]
|
|
5178
5161
|
});
|
|
5179
5162
|
return o.then((r) => {
|
|
5180
|
-
this.dispatch(
|
|
5163
|
+
this.dispatch(De(r));
|
|
5181
5164
|
}).catch(() => {
|
|
5182
|
-
this.dispatch(
|
|
5165
|
+
this.dispatch(De(n));
|
|
5183
5166
|
}), [a, o];
|
|
5184
5167
|
}
|
|
5185
5168
|
delete(e) {
|
|
5186
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
5169
|
+
const { store: s } = this.client, i = s.getState(), n = xs(e)(i);
|
|
5187
5170
|
if (!n)
|
|
5188
5171
|
throw new Error(`IssueType with offline_id ${e} does not exist in the store.`);
|
|
5189
5172
|
const a = An(e)(i);
|
|
5190
|
-
this.dispatch(
|
|
5173
|
+
this.dispatch(Cs(e)), this.dispatch(Rr(a.map((r) => r.offline_id)));
|
|
5191
5174
|
const o = this.enqueueRequest({
|
|
5192
5175
|
method: d.DELETE,
|
|
5193
5176
|
url: `/issue-types/${e}/`,
|
|
@@ -5195,7 +5178,7 @@ class Ef extends O {
|
|
|
5195
5178
|
blocks: []
|
|
5196
5179
|
});
|
|
5197
5180
|
return o.catch(() => {
|
|
5198
|
-
this.dispatch(
|
|
5181
|
+
this.dispatch(De(n)), this.dispatch(Tr(a));
|
|
5199
5182
|
}), o;
|
|
5200
5183
|
}
|
|
5201
5184
|
async refreshStore(e) {
|
|
@@ -5319,7 +5302,7 @@ class Ff extends Hl {
|
|
|
5319
5302
|
try {
|
|
5320
5303
|
await this.renewTokens();
|
|
5321
5304
|
} catch (s) {
|
|
5322
|
-
return s instanceof k && this.clearAuth(), s instanceof Error ? Promise.reject(s) : Promise.reject(new Error((s ??
|
|
5305
|
+
return s instanceof k && this.clearAuth(), s instanceof Error ? Promise.reject(s) : Promise.reject(new Error((s ?? ve).toString()));
|
|
5323
5306
|
}
|
|
5324
5307
|
}
|
|
5325
5308
|
}
|
|
@@ -5342,7 +5325,7 @@ class Ff extends Hl {
|
|
|
5342
5325
|
});
|
|
5343
5326
|
}
|
|
5344
5327
|
async initAuth(s) {
|
|
5345
|
-
const i =
|
|
5328
|
+
const i = le();
|
|
5346
5329
|
return console.debug(this.constructor.name, "Initiating auth"), this.enqueueRequest({
|
|
5347
5330
|
uuid: i,
|
|
5348
5331
|
description: "Get token pair",
|
|
@@ -5580,7 +5563,7 @@ class Df extends O {
|
|
|
5580
5563
|
this.dispatch(wn(s));
|
|
5581
5564
|
}
|
|
5582
5565
|
}
|
|
5583
|
-
class Cf extends
|
|
5566
|
+
class Cf extends Ee {
|
|
5584
5567
|
constructor() {
|
|
5585
5568
|
super(...arguments);
|
|
5586
5569
|
y(this, "name", "Project Attachment");
|
|
@@ -5646,7 +5629,7 @@ class xf extends O {
|
|
|
5646
5629
|
blocks: [e.offline_id]
|
|
5647
5630
|
});
|
|
5648
5631
|
return i.then((n) => {
|
|
5649
|
-
this.dispatch(
|
|
5632
|
+
this.dispatch(Hs(n));
|
|
5650
5633
|
}), i;
|
|
5651
5634
|
}
|
|
5652
5635
|
// TODO: This needs to be seperated into a update and create method
|
|
@@ -5661,32 +5644,32 @@ class xf extends O {
|
|
|
5661
5644
|
throw new Error("Project file must either have bounds or canvas_bounds set");
|
|
5662
5645
|
let a;
|
|
5663
5646
|
if (typeof n.file == "string" && !n.file.startsWith("blob:")) {
|
|
5664
|
-
const
|
|
5665
|
-
delete
|
|
5647
|
+
const u = { ...n };
|
|
5648
|
+
delete u.file, a = {
|
|
5666
5649
|
method: d.PATCH,
|
|
5667
5650
|
url: `/projects/files/${i}/`,
|
|
5668
|
-
payload:
|
|
5651
|
+
payload: u,
|
|
5669
5652
|
blockers: [i],
|
|
5670
5653
|
blocks: [i]
|
|
5671
5654
|
};
|
|
5672
5655
|
} else
|
|
5673
|
-
a = new Promise((
|
|
5674
|
-
this.client.files.uploadFileToS3(n.file_sha1).then(([
|
|
5675
|
-
|
|
5656
|
+
a = new Promise((u, c) => {
|
|
5657
|
+
this.client.files.uploadFileToS3(n.file_sha1).then(([l]) => {
|
|
5658
|
+
u({
|
|
5676
5659
|
method: d.POST,
|
|
5677
5660
|
url: `/projects/${n.project}/files/`,
|
|
5678
5661
|
payload: {
|
|
5679
5662
|
...n,
|
|
5680
|
-
...
|
|
5663
|
+
...l
|
|
5681
5664
|
},
|
|
5682
5665
|
blockers: [i],
|
|
5683
5666
|
blocks: [i]
|
|
5684
5667
|
});
|
|
5685
5668
|
}).catch(c);
|
|
5686
5669
|
});
|
|
5687
|
-
const r = Promise.resolve(a).then((
|
|
5688
|
-
return r.then((
|
|
5689
|
-
this.dispatch(
|
|
5670
|
+
const r = Promise.resolve(a).then((u) => this.enqueueRequest(u));
|
|
5671
|
+
return r.then((u) => {
|
|
5672
|
+
this.dispatch(Hs(u));
|
|
5690
5673
|
}), this.dispatch(al), this.dispatch(nl(null)), this.dispatch(il(!1)), [n, r];
|
|
5691
5674
|
}
|
|
5692
5675
|
delete(e) {
|
|
@@ -5744,12 +5727,12 @@ class Mf extends O {
|
|
|
5744
5727
|
const { store: s } = this.client, i = s.getState(), n = In(i), a = n[e];
|
|
5745
5728
|
if (!a)
|
|
5746
5729
|
throw new Error("Expected project to exist");
|
|
5747
|
-
const o = cl(i).filter((
|
|
5748
|
-
this.dispatch(sl(o.map(({ offline_id:
|
|
5730
|
+
const o = cl(i).filter((l) => l.project === e);
|
|
5731
|
+
this.dispatch(sl(o.map(({ offline_id: l }) => l)));
|
|
5749
5732
|
const r = Xd(a.id)(i);
|
|
5750
|
-
this.dispatch(qn(r.map(({ offline_id:
|
|
5751
|
-
const
|
|
5752
|
-
this.dispatch(Sd(
|
|
5733
|
+
this.dispatch(qn(r.map(({ offline_id: l }) => l)));
|
|
5734
|
+
const u = Td(i);
|
|
5735
|
+
this.dispatch(Sd(u.map(({ offline_id: l }) => l))), this.dispatch({ type: "rehydrated/setRehydrated", payload: !1 }), this.dispatch(Id(a));
|
|
5753
5736
|
const c = dd(a.id)(i);
|
|
5754
5737
|
c && this.dispatch(se({ ...c, project: null }));
|
|
5755
5738
|
try {
|
|
@@ -5760,12 +5743,12 @@ class Mf extends O {
|
|
|
5760
5743
|
blockers: [e.toString()],
|
|
5761
5744
|
blocks: []
|
|
5762
5745
|
}), this.dispatch({ type: "rehydrated/setRehydrated", payload: !0 });
|
|
5763
|
-
} catch (
|
|
5764
|
-
throw this.dispatch(Od(Object.values(n))), this.dispatch(wn(Object.values(
|
|
5746
|
+
} catch (l) {
|
|
5747
|
+
throw this.dispatch(Od(Object.values(n))), this.dispatch(wn(Object.values(u))), this.dispatch(el(o)), this.dispatch(Wd(r)), this.dispatch({ type: "rehydrated/setRehydrated", payload: !0 }), c && this.dispatch(se({ ...c, project: a.id })), l;
|
|
5765
5748
|
}
|
|
5766
5749
|
}
|
|
5767
5750
|
invite(e, s) {
|
|
5768
|
-
const i =
|
|
5751
|
+
const i = le();
|
|
5769
5752
|
return this.enqueueRequest({
|
|
5770
5753
|
description: "Invite user to project",
|
|
5771
5754
|
method: d.POST,
|
|
@@ -5818,20 +5801,20 @@ class zf extends O {
|
|
|
5818
5801
|
blocks: [s.offline_id]
|
|
5819
5802
|
});
|
|
5820
5803
|
return i.then((n) => {
|
|
5821
|
-
this.dispatch(
|
|
5804
|
+
this.dispatch(ge(n));
|
|
5822
5805
|
}).catch(() => {
|
|
5823
|
-
this.dispatch(
|
|
5806
|
+
this.dispatch(Js(s.offline_id));
|
|
5824
5807
|
}), [s, i];
|
|
5825
5808
|
}
|
|
5826
5809
|
update(e) {
|
|
5827
|
-
const { store: s } = this.client, i =
|
|
5810
|
+
const { store: s } = this.client, i = be(e.offline_id)(s.getState());
|
|
5828
5811
|
if (!i)
|
|
5829
5812
|
throw new Error(`Expected team with offline_id ${e.offline_id} to exist`);
|
|
5830
5813
|
const n = {
|
|
5831
5814
|
...i,
|
|
5832
5815
|
...e
|
|
5833
5816
|
};
|
|
5834
|
-
this.dispatch(
|
|
5817
|
+
this.dispatch(Ys(n));
|
|
5835
5818
|
const a = this.enqueueRequest({
|
|
5836
5819
|
description: "Update team",
|
|
5837
5820
|
method: d.PATCH,
|
|
@@ -5841,16 +5824,16 @@ class zf extends O {
|
|
|
5841
5824
|
blocks: [e.offline_id]
|
|
5842
5825
|
});
|
|
5843
5826
|
return a.then((o) => {
|
|
5844
|
-
this.dispatch(
|
|
5827
|
+
this.dispatch(ge(o));
|
|
5845
5828
|
}).catch(() => {
|
|
5846
|
-
this.dispatch(
|
|
5829
|
+
this.dispatch(ge(i));
|
|
5847
5830
|
}), [n, a];
|
|
5848
5831
|
}
|
|
5849
5832
|
async delete(e) {
|
|
5850
|
-
const { store: s } = this.client, i = s.getState(), n =
|
|
5833
|
+
const { store: s } = this.client, i = s.getState(), n = be(e)(i);
|
|
5851
5834
|
if (!n)
|
|
5852
5835
|
throw new Error(`Expected team with id ${e} to exist`);
|
|
5853
|
-
this.dispatch(
|
|
5836
|
+
this.dispatch(Js(e));
|
|
5854
5837
|
try {
|
|
5855
5838
|
return await this.enqueueRequest({
|
|
5856
5839
|
description: "Delete team",
|
|
@@ -5860,16 +5843,16 @@ class zf extends O {
|
|
|
5860
5843
|
blocks: [e]
|
|
5861
5844
|
});
|
|
5862
5845
|
} catch (a) {
|
|
5863
|
-
throw this.dispatch(
|
|
5846
|
+
throw this.dispatch(ge(n)), a;
|
|
5864
5847
|
}
|
|
5865
5848
|
}
|
|
5866
5849
|
async setMembers(e, s) {
|
|
5867
|
-
const { store: i } = this.client, n =
|
|
5850
|
+
const { store: i } = this.client, n = be(e)(i.getState());
|
|
5868
5851
|
if (!n)
|
|
5869
5852
|
throw new Error(`Expected team with id ${e} to exist`);
|
|
5870
5853
|
if (s.length !== new Set(s).size)
|
|
5871
5854
|
throw new Error("Duplicate members found in the list");
|
|
5872
|
-
this.dispatch(
|
|
5855
|
+
this.dispatch(Ys({ ...n, members: s }));
|
|
5873
5856
|
const a = this.enqueueRequest({
|
|
5874
5857
|
description: "Set team members",
|
|
5875
5858
|
method: d.PUT,
|
|
@@ -5881,18 +5864,18 @@ class zf extends O {
|
|
|
5881
5864
|
blocks: [e]
|
|
5882
5865
|
});
|
|
5883
5866
|
return a.catch(() => {
|
|
5884
|
-
this.dispatch(
|
|
5867
|
+
this.dispatch(ge(n));
|
|
5885
5868
|
}), a;
|
|
5886
5869
|
}
|
|
5887
5870
|
async addMembers(e, s) {
|
|
5888
|
-
const { store: i } = this.client, n =
|
|
5871
|
+
const { store: i } = this.client, n = be(e)(i.getState());
|
|
5889
5872
|
if (!n)
|
|
5890
5873
|
throw new Error(`Expected team with id ${e} to exist`);
|
|
5891
5874
|
const a = [...n.members, ...s];
|
|
5892
5875
|
return this.setMembers(e, a);
|
|
5893
5876
|
}
|
|
5894
5877
|
async removeMembers(e, s) {
|
|
5895
|
-
const { store: i } = this.client, n =
|
|
5878
|
+
const { store: i } = this.client, n = be(e)(i.getState());
|
|
5896
5879
|
if (!n)
|
|
5897
5880
|
throw new Error(`Expected team with id ${e} to exist`);
|
|
5898
5881
|
const a = n.members.filter((o) => !s.includes(o));
|
|
@@ -5940,7 +5923,7 @@ class Uf extends O {
|
|
|
5940
5923
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5941
5924
|
created_by: i
|
|
5942
5925
|
});
|
|
5943
|
-
this.dispatch(
|
|
5926
|
+
this.dispatch(Xs(n));
|
|
5944
5927
|
const a = this.enqueueRequest({
|
|
5945
5928
|
description: "Create Workspace",
|
|
5946
5929
|
method: d.POST,
|
|
@@ -5950,17 +5933,17 @@ class Uf extends O {
|
|
|
5950
5933
|
blocks: [n.offline_id]
|
|
5951
5934
|
});
|
|
5952
5935
|
return a.then((r) => {
|
|
5953
|
-
this.dispatch(
|
|
5936
|
+
this.dispatch(Ce(r));
|
|
5954
5937
|
}).catch(() => {
|
|
5955
|
-
this.dispatch(
|
|
5938
|
+
this.dispatch(Qs(n.offline_id));
|
|
5956
5939
|
}), [n, a];
|
|
5957
5940
|
}
|
|
5958
5941
|
update(e) {
|
|
5959
|
-
const { store: s } = this.client, i =
|
|
5942
|
+
const { store: s } = this.client, i = Zs(e.offline_id)(s.getState());
|
|
5960
5943
|
if (!i)
|
|
5961
5944
|
throw new Error(`Expected an existing workspace with offline_id ${e.offline_id}`);
|
|
5962
5945
|
const n = { ...i, ...e };
|
|
5963
|
-
this.dispatch(
|
|
5946
|
+
this.dispatch(Ce(n));
|
|
5964
5947
|
const a = this.enqueueRequest({
|
|
5965
5948
|
description: "Update Workspace",
|
|
5966
5949
|
method: d.PATCH,
|
|
@@ -5970,16 +5953,16 @@ class Uf extends O {
|
|
|
5970
5953
|
blocks: [i.offline_id]
|
|
5971
5954
|
});
|
|
5972
5955
|
return a.then((o) => {
|
|
5973
|
-
this.dispatch(
|
|
5956
|
+
this.dispatch(Ce(o));
|
|
5974
5957
|
}).catch(() => {
|
|
5975
|
-
this.dispatch(
|
|
5958
|
+
this.dispatch(Ce(i));
|
|
5976
5959
|
}), [i, a];
|
|
5977
5960
|
}
|
|
5978
5961
|
delete(e) {
|
|
5979
|
-
const { store: s } = this.client, i =
|
|
5962
|
+
const { store: s } = this.client, i = Zs(e)(s.getState());
|
|
5980
5963
|
if (!i)
|
|
5981
5964
|
throw new Error(`Expected an existing workspace with id ${e}`);
|
|
5982
|
-
this.dispatch(
|
|
5965
|
+
this.dispatch(Qs(e));
|
|
5983
5966
|
const n = this.enqueueRequest({
|
|
5984
5967
|
description: "Delete Workspace",
|
|
5985
5968
|
method: d.DELETE,
|
|
@@ -5988,7 +5971,7 @@ class Uf extends O {
|
|
|
5988
5971
|
blocks: []
|
|
5989
5972
|
});
|
|
5990
5973
|
return n.catch((a) => {
|
|
5991
|
-
throw this.dispatch(
|
|
5974
|
+
throw this.dispatch(Xs(i)), a;
|
|
5992
5975
|
}), n;
|
|
5993
5976
|
}
|
|
5994
5977
|
async refreshStore(e) {
|
|
@@ -6058,7 +6041,7 @@ export {
|
|
|
6058
6041
|
oi as OrganizationAccessLevel,
|
|
6059
6042
|
jf as OrganizationAccessService,
|
|
6060
6043
|
Pf as OrganizationService,
|
|
6061
|
-
|
|
6044
|
+
Re as OutboxCoordinator,
|
|
6062
6045
|
fa as PaddleCheckoutEvent,
|
|
6063
6046
|
ai as ProjectAccessLevel,
|
|
6064
6047
|
Df as ProjectAccessService,
|
|
@@ -6066,7 +6049,7 @@ export {
|
|
|
6066
6049
|
xf as ProjectFileService,
|
|
6067
6050
|
Mf as ProjectService,
|
|
6068
6051
|
zf as TeamService,
|
|
6069
|
-
|
|
6052
|
+
ve as UNKNOWN_ERROR_MESSAGE,
|
|
6070
6053
|
$f as UserService,
|
|
6071
6054
|
Kn as VERSION_REDUCER_KEY,
|
|
6072
6055
|
Jl as VerificationCodeType,
|
|
@@ -6074,19 +6057,19 @@ export {
|
|
|
6074
6057
|
kc as _selectLatestFormRevision,
|
|
6075
6058
|
Vd as _setLatestRetryTime,
|
|
6076
6059
|
Ed as acceptProjectInvite,
|
|
6077
|
-
|
|
6060
|
+
wt as addAsset,
|
|
6078
6061
|
ju as addAssetAttachment,
|
|
6079
6062
|
mi as addAssetAttachments,
|
|
6080
6063
|
Lu as addAssetStage,
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6064
|
+
Et as addAssetStageCompletion,
|
|
6065
|
+
kt as addAssetStageCompletions,
|
|
6066
|
+
Je as addAssetStages,
|
|
6067
|
+
Bt as addAssetType,
|
|
6085
6068
|
Wu as addAssetTypeAttachment,
|
|
6086
6069
|
wi as addAssetTypeAttachments,
|
|
6087
|
-
|
|
6070
|
+
Ut as addAssetTypeFieldValues,
|
|
6088
6071
|
uh as addAssetTypeFieldValuesAttachment,
|
|
6089
|
-
|
|
6072
|
+
Qe as addAssetTypeFieldValuesAttachments,
|
|
6090
6073
|
Po as addAssetTypeFieldValuesMany,
|
|
6091
6074
|
So as addAssetTypeFields,
|
|
6092
6075
|
Ju as addAssetTypeFieldsAttachment,
|
|
@@ -6094,35 +6077,35 @@ export {
|
|
|
6094
6077
|
ih as addAssetTypeFieldsMany,
|
|
6095
6078
|
Rh as addAssetTypes,
|
|
6096
6079
|
Ai as addAssets,
|
|
6097
|
-
|
|
6080
|
+
Yt as addCategory,
|
|
6098
6081
|
qa as addConversation,
|
|
6099
6082
|
Ch as addDocumentAttachment,
|
|
6100
6083
|
Ho as addDocumentAttachments,
|
|
6101
|
-
|
|
6084
|
+
Zt as addDocuments,
|
|
6102
6085
|
rc as addEmailDomain,
|
|
6103
|
-
|
|
6086
|
+
as as addForm,
|
|
6104
6087
|
Ni as addFormRevision,
|
|
6105
6088
|
Bh as addFormRevisionAttachment,
|
|
6106
6089
|
gc as addFormRevisionAttachments,
|
|
6107
6090
|
vc as addFormRevisions,
|
|
6108
|
-
|
|
6091
|
+
ds as addFormSubmission,
|
|
6109
6092
|
im as addFormSubmissionAttachment,
|
|
6110
|
-
|
|
6111
|
-
|
|
6093
|
+
et as addFormSubmissionAttachments,
|
|
6094
|
+
dt as addFormSubmissions,
|
|
6112
6095
|
Zh as addForms,
|
|
6113
6096
|
Yc as addGeoImage,
|
|
6114
6097
|
Jc as addGeoImages,
|
|
6115
|
-
|
|
6116
|
-
|
|
6098
|
+
ws as addIssue,
|
|
6099
|
+
ys as addIssueAssociation,
|
|
6117
6100
|
tn as addIssueAssociations,
|
|
6118
6101
|
ym as addIssueAttachment,
|
|
6119
6102
|
an as addIssueAttachments,
|
|
6120
|
-
|
|
6103
|
+
Ss as addIssueComment,
|
|
6121
6104
|
_m as addIssueComments,
|
|
6122
6105
|
Yr as addIssueType,
|
|
6123
|
-
|
|
6106
|
+
ks as addIssueTypeFieldValues,
|
|
6124
6107
|
Wm as addIssueTypeFieldValuesAttachment,
|
|
6125
|
-
|
|
6108
|
+
st as addIssueTypeFieldValuesAttachments,
|
|
6126
6109
|
qm as addIssueTypeFieldValuesMany,
|
|
6127
6110
|
Mr as addIssueTypeFields,
|
|
6128
6111
|
wm as addIssueTypeFieldsAttachment,
|
|
@@ -6138,7 +6121,7 @@ export {
|
|
|
6138
6121
|
el as addProjectFiles,
|
|
6139
6122
|
hl as addTeam,
|
|
6140
6123
|
rp as addUsers,
|
|
6141
|
-
|
|
6124
|
+
Xs as addWorkspace,
|
|
6142
6125
|
Da as agentsReducer,
|
|
6143
6126
|
li as agentsSlice,
|
|
6144
6127
|
fu as areArraysEqual,
|
|
@@ -6163,7 +6146,7 @@ export {
|
|
|
6163
6146
|
$o as assetTypeReducer,
|
|
6164
6147
|
Pi as assetTypeSlice,
|
|
6165
6148
|
Vo as authReducer,
|
|
6166
|
-
|
|
6149
|
+
ct as authSlice,
|
|
6167
6150
|
Su as blobToBase64,
|
|
6168
6151
|
No as categoryReducer,
|
|
6169
6152
|
Ci as categorySlice,
|
|
@@ -6173,19 +6156,19 @@ export {
|
|
|
6173
6156
|
mu as createMultiPointGeometry,
|
|
6174
6157
|
zd as createOfflineAction,
|
|
6175
6158
|
hu as createPointGeometry,
|
|
6176
|
-
|
|
6159
|
+
Ot as deleteAsset,
|
|
6177
6160
|
Ma as deleteAssetAttachment,
|
|
6178
6161
|
pi as deleteAssetAttachments,
|
|
6179
6162
|
Bu as deleteAssetStage,
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6163
|
+
Ft as deleteAssetStageCompletion,
|
|
6164
|
+
qt as deleteAssetStageCompletions,
|
|
6165
|
+
Xe as deleteAssetStages,
|
|
6166
|
+
Nt as deleteAssetType,
|
|
6184
6167
|
co as deleteAssetTypeAttachment,
|
|
6185
6168
|
Oi as deleteAssetTypeAttachments,
|
|
6186
|
-
|
|
6169
|
+
Vt as deleteAssetTypeFieldValues,
|
|
6187
6170
|
fh as deleteAssetTypeFieldValuesAttachment,
|
|
6188
|
-
|
|
6171
|
+
Ze as deleteAssetTypeFieldValuesAttachments,
|
|
6189
6172
|
Co as deleteAssetTypeFieldValuesMany,
|
|
6190
6173
|
Ro as deleteAssetTypeFields,
|
|
6191
6174
|
eh as deleteAssetTypeFieldsAttachment,
|
|
@@ -6197,27 +6180,27 @@ export {
|
|
|
6197
6180
|
Jo as deleteDocumentAttachment,
|
|
6198
6181
|
Xo as deleteDocumentAttachments,
|
|
6199
6182
|
dc as deleteEmailDomain,
|
|
6200
|
-
|
|
6183
|
+
os as deleteForm,
|
|
6201
6184
|
Wi as deleteFormRevision,
|
|
6202
6185
|
Kh as deleteFormRevisionAttachment,
|
|
6203
6186
|
_c as deleteFormRevisionAttachments,
|
|
6204
6187
|
Ic as deleteFormRevisions,
|
|
6205
|
-
|
|
6188
|
+
ls as deleteFormSubmission,
|
|
6206
6189
|
cm as deleteFormSubmissionAttachment,
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6190
|
+
tt as deleteFormSubmissionAttachments,
|
|
6191
|
+
lt as deleteFormSubmissions,
|
|
6192
|
+
ms as deleteGeoImage,
|
|
6210
6193
|
Qc as deleteGeoImages,
|
|
6211
|
-
|
|
6212
|
-
|
|
6194
|
+
Os as deleteIssue,
|
|
6195
|
+
As as deleteIssueAssociation,
|
|
6213
6196
|
sn as deleteIssueAssociations,
|
|
6214
6197
|
hr as deleteIssueAttachment,
|
|
6215
6198
|
on as deleteIssueAttachments,
|
|
6216
|
-
|
|
6199
|
+
Ts as deleteIssueComment,
|
|
6217
6200
|
Sm as deleteIssueComments,
|
|
6218
|
-
|
|
6201
|
+
Fs as deleteIssueTypeFieldValues,
|
|
6219
6202
|
Jm as deleteIssueTypeFieldValuesAttachment,
|
|
6220
|
-
|
|
6203
|
+
it as deleteIssueTypeFieldValuesAttachments,
|
|
6221
6204
|
Cm as deleteIssueTypeFieldValuesMany,
|
|
6222
6205
|
$r as deleteIssueTypeFields,
|
|
6223
6206
|
Em as deleteIssueTypeFieldsAttachment,
|
|
@@ -6234,8 +6217,8 @@ export {
|
|
|
6234
6217
|
qn as deleteProjectAttachments,
|
|
6235
6218
|
tl as deleteProjectFile,
|
|
6236
6219
|
sl as deleteProjectFiles,
|
|
6237
|
-
|
|
6238
|
-
|
|
6220
|
+
Js as deleteTeam,
|
|
6221
|
+
Qs as deleteWorkspace,
|
|
6239
6222
|
ql as dequeue,
|
|
6240
6223
|
Qn as discard,
|
|
6241
6224
|
ec as documentAttachmentReducer,
|
|
@@ -6250,7 +6233,7 @@ export {
|
|
|
6250
6233
|
Fl as enqueue,
|
|
6251
6234
|
$d as enqueueRequest,
|
|
6252
6235
|
g as fallbackToEmptyArray,
|
|
6253
|
-
|
|
6236
|
+
ye as fallbackToEmptyObject,
|
|
6254
6237
|
yc as fileReducer,
|
|
6255
6238
|
Gi as fileSlice,
|
|
6256
6239
|
Ia as fileToBlob,
|
|
@@ -6267,14 +6250,14 @@ export {
|
|
|
6267
6250
|
tr as geoImageReducer,
|
|
6268
6251
|
Zi as geoImageSlice,
|
|
6269
6252
|
gu as getFileIdentifier,
|
|
6270
|
-
|
|
6253
|
+
gt as getFileS3Key,
|
|
6271
6254
|
Ta as getLocalDateString,
|
|
6272
6255
|
Au as getLocalRelativeDateString,
|
|
6273
|
-
|
|
6256
|
+
fe as getOutboxCoordinator,
|
|
6274
6257
|
va as getRenamedFile,
|
|
6275
|
-
|
|
6258
|
+
we as hashFile,
|
|
6276
6259
|
Kp as initSDK,
|
|
6277
|
-
|
|
6260
|
+
Tt as initializeAssetAttachments,
|
|
6278
6261
|
Wa as initializeAssetStageCompletions,
|
|
6279
6262
|
Qa as initializeAssetStages,
|
|
6280
6263
|
no as initializeAssetTypeAttachments,
|
|
@@ -6361,8 +6344,8 @@ export {
|
|
|
6361
6344
|
vn as projectSlice,
|
|
6362
6345
|
ll as rehydratedReducer,
|
|
6363
6346
|
Dn as rehydratedSlice,
|
|
6364
|
-
|
|
6365
|
-
|
|
6347
|
+
es as removeDocuments,
|
|
6348
|
+
Cs as removeIssueType,
|
|
6366
6349
|
hd as removeUser,
|
|
6367
6350
|
Pp as resetProjectFileObjectUrls,
|
|
6368
6351
|
El as resetStore,
|
|
@@ -6378,26 +6361,26 @@ export {
|
|
|
6378
6361
|
$a as selectAssetAttachmentById,
|
|
6379
6362
|
za as selectAssetAttachmentMapping,
|
|
6380
6363
|
fi as selectAssetAttachments,
|
|
6381
|
-
|
|
6364
|
+
vt as selectAssetById,
|
|
6382
6365
|
to as selectAssetStageById,
|
|
6383
6366
|
Ya as selectAssetStageCompletionById,
|
|
6384
6367
|
Si as selectAssetStageCompletionMapping,
|
|
6385
6368
|
Ja as selectAssetStageCompletionsByIds,
|
|
6386
6369
|
so as selectAssetStages,
|
|
6387
|
-
|
|
6370
|
+
Dt as selectAssetStagesByIds,
|
|
6388
6371
|
lo as selectAssetTypeAttachmentById,
|
|
6389
6372
|
ro as selectAssetTypeAttachmentMapping,
|
|
6390
6373
|
vi as selectAssetTypeAttachments,
|
|
6391
|
-
|
|
6374
|
+
Wt as selectAssetTypeById,
|
|
6392
6375
|
ji as selectAssetTypeFieldValues,
|
|
6393
6376
|
yh as selectAssetTypeFieldValuesAttachmentById,
|
|
6394
6377
|
Eo as selectAssetTypeFieldValuesAttachments,
|
|
6395
6378
|
ko as selectAssetTypeFieldValuesAttachmentsByIds,
|
|
6396
6379
|
Fi as selectAssetTypeFieldValuesAttachmentsMapping,
|
|
6397
|
-
|
|
6380
|
+
Gt as selectAssetTypeFieldValuesById,
|
|
6398
6381
|
xo as selectAssetTypeFieldValuesMapping,
|
|
6399
6382
|
bh as selectAssetTypeFieldValuesOfAsset,
|
|
6400
|
-
|
|
6383
|
+
ot as selectAssetTypeFields,
|
|
6401
6384
|
sh as selectAssetTypeFieldsAttachmentById,
|
|
6402
6385
|
go as selectAssetTypeFieldsAttachments,
|
|
6403
6386
|
Ao as selectAssetTypeFieldsAttachmentsMapping,
|
|
@@ -6431,21 +6414,21 @@ export {
|
|
|
6431
6414
|
Ep as selectAttachmentsOfProjectByType,
|
|
6432
6415
|
jh as selectCategories,
|
|
6433
6416
|
Ph as selectCategoriesByIds,
|
|
6434
|
-
|
|
6417
|
+
Jt as selectCategoryById,
|
|
6435
6418
|
xi as selectCategoryMapping,
|
|
6436
6419
|
Tm as selectCommentsOfIssue,
|
|
6437
6420
|
Vu as selectCompletedStagesByAsset,
|
|
6438
6421
|
qu as selectConversation,
|
|
6439
6422
|
ui as selectConversationMapping,
|
|
6440
6423
|
Fu as selectConversations,
|
|
6441
|
-
|
|
6424
|
+
mt as selectCurrentUser,
|
|
6442
6425
|
Rp as selectDeletedRequests,
|
|
6443
6426
|
Zo as selectDocumentAttachmentById,
|
|
6444
6427
|
Qo as selectDocumentAttachmentMapping,
|
|
6445
6428
|
nc as selectDocumentById,
|
|
6446
6429
|
ic as selectDocuments,
|
|
6447
6430
|
Uh as selectDocumentsByIds,
|
|
6448
|
-
|
|
6431
|
+
Oe as selectDocumentsMapping,
|
|
6449
6432
|
uc as selectEmailDomains,
|
|
6450
6433
|
lc as selectEmailDomainsAsMapping,
|
|
6451
6434
|
Lh as selectEmailDomainsOfOrganization,
|
|
@@ -6454,26 +6437,26 @@ export {
|
|
|
6454
6437
|
Dc as selectFormMapping,
|
|
6455
6438
|
Sc as selectFormRevisionAttachmentsMapping,
|
|
6456
6439
|
Jh as selectFormRevisionById,
|
|
6457
|
-
|
|
6440
|
+
rt as selectFormRevisionMapping,
|
|
6458
6441
|
Ec as selectFormRevisions,
|
|
6459
6442
|
Fc as selectFormRevisionsOfForm,
|
|
6460
6443
|
zc as selectFormSubmissionAttachemntsByIds,
|
|
6461
6444
|
Yi as selectFormSubmissionAttachmentsMapping,
|
|
6462
|
-
|
|
6445
|
+
us as selectFormSubmissionById,
|
|
6463
6446
|
Qi as selectFormSubmissions,
|
|
6464
6447
|
Xi as selectFormSubmissionsMapping,
|
|
6465
6448
|
Nc as selectFormSubmissionsOfAsset,
|
|
6466
6449
|
Lc as selectFormSubmissionsOfForm,
|
|
6467
6450
|
Bc as selectFormSubmissionsOfIssue,
|
|
6468
6451
|
tm as selectForms,
|
|
6469
|
-
|
|
6452
|
+
ps as selectGeoImageById,
|
|
6470
6453
|
Zc as selectGeoImageMapping,
|
|
6471
6454
|
er as selectGeoImages,
|
|
6472
6455
|
um as selectGeoImagesOfProject,
|
|
6473
6456
|
xp as selectIsImportingProjectFile,
|
|
6474
6457
|
qh as selectIsLoggedIn,
|
|
6475
6458
|
nr as selectIssueAssociationById,
|
|
6476
|
-
|
|
6459
|
+
Ve as selectIssueAssociationMapping,
|
|
6477
6460
|
fm as selectIssueAssociations,
|
|
6478
6461
|
cr as selectIssueAssociationsOfAsset,
|
|
6479
6462
|
or as selectIssueAssociationsOfIssue,
|
|
@@ -6481,21 +6464,21 @@ export {
|
|
|
6481
6464
|
fr as selectIssueAttachmentById,
|
|
6482
6465
|
mr as selectIssueAttachmentMapping,
|
|
6483
6466
|
cn as selectIssueAttachments,
|
|
6484
|
-
|
|
6467
|
+
vs as selectIssueById,
|
|
6485
6468
|
br as selectIssueCommentById,
|
|
6486
6469
|
gr as selectIssueCommentMapping,
|
|
6487
6470
|
Dh as selectIssueCountOfCategory,
|
|
6488
6471
|
wr as selectIssueMapping,
|
|
6489
|
-
|
|
6472
|
+
xs as selectIssueTypeById,
|
|
6490
6473
|
hn as selectIssueTypeFieldValues,
|
|
6491
6474
|
Xm as selectIssueTypeFieldValuesAttachmentById,
|
|
6492
6475
|
Br as selectIssueTypeFieldValuesAttachments,
|
|
6493
6476
|
Nr as selectIssueTypeFieldValuesAttachmentsByIds,
|
|
6494
6477
|
fn as selectIssueTypeFieldValuesAttachmentsMapping,
|
|
6495
|
-
|
|
6478
|
+
qs as selectIssueTypeFieldValuesById,
|
|
6496
6479
|
Dr as selectIssueTypeFieldValuesMapping,
|
|
6497
6480
|
xm as selectIssueTypeFieldValuesOfIssue,
|
|
6498
|
-
|
|
6481
|
+
ut as selectIssueTypeFields,
|
|
6499
6482
|
Fm as selectIssueTypeFieldsAttachmentById,
|
|
6500
6483
|
qr as selectIssueTypeFieldsAttachments,
|
|
6501
6484
|
Fr as selectIssueTypeFieldsAttachmentsMapping,
|
|
@@ -6518,7 +6501,7 @@ export {
|
|
|
6518
6501
|
wp as selectLatestRetryTime,
|
|
6519
6502
|
ip as selectLicense,
|
|
6520
6503
|
dd as selectLicenseForProject,
|
|
6521
|
-
|
|
6504
|
+
ht as selectLicenses,
|
|
6522
6505
|
ap as selectLicensesForProjectsMapping,
|
|
6523
6506
|
Sp as selectLicensesOfOrganization,
|
|
6524
6507
|
Lp as selectMainWorkspace,
|
|
@@ -6553,9 +6536,9 @@ export {
|
|
|
6553
6536
|
Gh as selectRootDocuments,
|
|
6554
6537
|
Tp as selectSortedOrganizationUsers,
|
|
6555
6538
|
Ap as selectSortedProjectUsers,
|
|
6556
|
-
|
|
6539
|
+
at as selectStageMapping,
|
|
6557
6540
|
io as selectStagesOfAssetType,
|
|
6558
|
-
|
|
6541
|
+
be as selectTeamById,
|
|
6559
6542
|
Mn as selectTeams,
|
|
6560
6543
|
$p as selectTeamsByIds,
|
|
6561
6544
|
xn as selectTeamsMapping,
|
|
@@ -6564,11 +6547,11 @@ export {
|
|
|
6564
6547
|
fc as selectUploadUrl,
|
|
6565
6548
|
dp as selectUserById,
|
|
6566
6549
|
lp as selectUsersByIds,
|
|
6567
|
-
|
|
6568
|
-
|
|
6550
|
+
pt as selectUsersMapping,
|
|
6551
|
+
Zs as selectWorkspaceById,
|
|
6569
6552
|
$n as selectWorkspaceMapping,
|
|
6570
6553
|
bl as selectWorkspaces,
|
|
6571
|
-
|
|
6554
|
+
ii as separateFilesFromValues,
|
|
6572
6555
|
yf as separateImageFromFields,
|
|
6573
6556
|
nl as setActiveProjectFileId,
|
|
6574
6557
|
Mu as setAsset,
|
|
@@ -6598,20 +6581,20 @@ export {
|
|
|
6598
6581
|
wc as setFormRevision,
|
|
6599
6582
|
Nh as setFormRevisionAttachment,
|
|
6600
6583
|
Wh as setFormRevisionAttachments,
|
|
6601
|
-
|
|
6584
|
+
Le as setFormSubmission,
|
|
6602
6585
|
nm as setFormSubmissionAttachment,
|
|
6603
6586
|
am as setFormSubmissionAttachments,
|
|
6604
6587
|
rm as setFormSubmissions,
|
|
6605
|
-
|
|
6588
|
+
je as setGeoImage,
|
|
6606
6589
|
Kc as setGeoImages,
|
|
6607
6590
|
il as setIsImportingProjectFile,
|
|
6608
6591
|
mm as setIssueAssociation,
|
|
6609
6592
|
hm as setIssueAssociations,
|
|
6610
6593
|
lr as setIssueAttachment,
|
|
6611
6594
|
Am as setIssueAttachments,
|
|
6612
|
-
|
|
6595
|
+
_s as setIssueComment,
|
|
6613
6596
|
Ar as setIssueComments,
|
|
6614
|
-
|
|
6597
|
+
De as setIssueType,
|
|
6615
6598
|
jm as setIssueTypeFieldValues,
|
|
6616
6599
|
Hm as setIssueTypeFieldValuesAttachment,
|
|
6617
6600
|
Km as setIssueTypeFieldValuesAttachments,
|
|
@@ -6630,7 +6613,7 @@ export {
|
|
|
6630
6613
|
Fp as setProjectFiles,
|
|
6631
6614
|
Od as setProjects,
|
|
6632
6615
|
Mp as setRehydrated,
|
|
6633
|
-
|
|
6616
|
+
ge as setTeam,
|
|
6634
6617
|
Eh as setTokens,
|
|
6635
6618
|
pc as setUploadUrl,
|
|
6636
6619
|
ud as setUsers,
|
|
@@ -6643,17 +6626,17 @@ export {
|
|
|
6643
6626
|
wu as toFileNameSafeString,
|
|
6644
6627
|
Ea as toOfflineIdRecord,
|
|
6645
6628
|
Iu as truncate,
|
|
6646
|
-
|
|
6629
|
+
ke as updateAsset,
|
|
6647
6630
|
Du as updateAssetAttachment,
|
|
6648
6631
|
xa as updateAssetAttachments,
|
|
6649
|
-
|
|
6632
|
+
Pt as updateAssetStage,
|
|
6650
6633
|
Ha as updateAssetStageCompletion,
|
|
6651
6634
|
Ka as updateAssetStageCompletions,
|
|
6652
|
-
|
|
6653
|
-
|
|
6635
|
+
Ge as updateAssetStages,
|
|
6636
|
+
qe as updateAssetType,
|
|
6654
6637
|
Ku as updateAssetTypeAttachment,
|
|
6655
6638
|
oo as updateAssetTypeAttachments,
|
|
6656
|
-
|
|
6639
|
+
Fe as updateAssetTypeFieldValues,
|
|
6657
6640
|
ph as updateAssetTypeFieldValuesAttachment,
|
|
6658
6641
|
Io as updateAssetTypeFieldValuesAttachments,
|
|
6659
6642
|
Do as updateAssetTypeFieldValuesMany,
|
|
@@ -6667,7 +6650,7 @@ export {
|
|
|
6667
6650
|
Pa as updateConversation,
|
|
6668
6651
|
Mh as updateDocumentAttachment,
|
|
6669
6652
|
Yo as updateDocumentAttachments,
|
|
6670
|
-
|
|
6653
|
+
ne as updateDocuments,
|
|
6671
6654
|
em as updateForm,
|
|
6672
6655
|
Hh as updateFormRevisionAttachment,
|
|
6673
6656
|
bc as updateFormRevisionAttachments,
|
|
@@ -6677,13 +6660,13 @@ export {
|
|
|
6677
6660
|
dm as updateFormSubmissions,
|
|
6678
6661
|
Xc as updateGeoImage,
|
|
6679
6662
|
lm as updateGeoImages,
|
|
6680
|
-
|
|
6663
|
+
Be as updateIssue,
|
|
6681
6664
|
ir as updateIssueAssociation,
|
|
6682
6665
|
pm as updateIssueAssociations,
|
|
6683
6666
|
gm as updateIssueAttachment,
|
|
6684
6667
|
ur as updateIssueAttachments,
|
|
6685
6668
|
Jr as updateIssueType,
|
|
6686
|
-
|
|
6669
|
+
Pe as updateIssueTypeFieldValues,
|
|
6687
6670
|
Ym as updateIssueTypeFieldValuesAttachment,
|
|
6688
6671
|
Lr as updateIssueTypeFieldValuesAttachments,
|
|
6689
6672
|
Dm as updateIssueTypeFieldValuesMany,
|
|
@@ -6697,10 +6680,10 @@ export {
|
|
|
6697
6680
|
bd as updateProjectAccess,
|
|
6698
6681
|
Ip as updateProjectAttachment,
|
|
6699
6682
|
Hd as updateProjectAttachments,
|
|
6700
|
-
|
|
6683
|
+
Hs as updateProjectFile,
|
|
6701
6684
|
jp as updateProjectFiles,
|
|
6702
|
-
|
|
6703
|
-
|
|
6685
|
+
Ys as updateTeam,
|
|
6686
|
+
Ce as updateWorkspace,
|
|
6704
6687
|
md as userReducer,
|
|
6705
6688
|
_n as userSlice,
|
|
6706
6689
|
yl as versioningReducer,
|