@overmap-ai/core 1.0.78-procedure-step-issue-link.1 → 1.0.78-procedure-step-issue-link.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
CHANGED
|
@@ -3,12 +3,12 @@ var rd = (t, s, e) => s in t ? nd(t, s, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var h = (t, s, e) => rd(t, typeof s != "symbol" ? s + "" : s, e);
|
|
4
4
|
import "@redux-offline/redux-offline/lib/types";
|
|
5
5
|
import { createAction as rs, createSelector as p, createSlice as _, isAnyOf as g, combineReducers as An, compose as ad } from "@reduxjs/toolkit";
|
|
6
|
-
import
|
|
6
|
+
import vt from "superagent";
|
|
7
7
|
import { v4 as bt } from "uuid";
|
|
8
8
|
import { useMemo as cd } from "react";
|
|
9
9
|
import { saveAs as dd } from "file-saver";
|
|
10
10
|
import Pn from "fast-tree-builder";
|
|
11
|
-
import { Tree as
|
|
11
|
+
import { Tree as Lt } from "ts-tree-lib";
|
|
12
12
|
import { offline as od } from "@redux-offline/redux-offline";
|
|
13
13
|
import Bs from "@redux-offline/redux-offline/lib/defaults";
|
|
14
14
|
import ud from "localforage";
|
|
@@ -108,7 +108,7 @@ function uR(t) {
|
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const Nt = "versioning", T = rs("RESET"), D = rs("RESET_PROJECT_STATE"), b = rs("RESET_ORGANIZATION_STATE");
|
|
112
112
|
function lR(t, s) {
|
|
113
113
|
return cd(t, s);
|
|
114
114
|
}
|
|
@@ -147,9 +147,9 @@ class Vs {
|
|
|
147
147
|
throw new Error("`finally` not implemented");
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
let
|
|
150
|
+
let ns = !1;
|
|
151
151
|
const bd = "";
|
|
152
|
-
["true", "1"].includes(bd.toLowerCase()) && (
|
|
152
|
+
["true", "1"].includes(bd.toLowerCase()) && (ns = !0);
|
|
153
153
|
function hR(t, s) {
|
|
154
154
|
if (t === s) return !0;
|
|
155
155
|
if (typeof t != typeof s)
|
|
@@ -167,7 +167,7 @@ function Tn(t) {
|
|
|
167
167
|
const s = {};
|
|
168
168
|
return function() {
|
|
169
169
|
const e = Array.prototype.slice.call(arguments);
|
|
170
|
-
return e in s ? (
|
|
170
|
+
return e in s ? (ns && console.debug(`Memoization debug: Using memorized return value for ${t.toString()}(`, e, ")"), s[e]) : (ns && console.debug(`Memoization debug: Cache miss! Memoizing ${t.toString()}(`, e, ")"), s[e] = t.apply(this, e));
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
function pR(t, s) {
|
|
@@ -176,7 +176,7 @@ function pR(t, s) {
|
|
|
176
176
|
if (t[e] !== s[e]) return !1;
|
|
177
177
|
return !0;
|
|
178
178
|
}
|
|
179
|
-
const S = (t) => t.length === 0 ? md : t,
|
|
179
|
+
const S = (t) => t.length === 0 ? md : t, Ht = (t) => Object.keys(t).length === 0 ? fd : t, gd = Tn((t) => {
|
|
180
180
|
if (!t) return "";
|
|
181
181
|
const s = new Date(t), e = s.getFullYear() === as.getFullYear(), i = { day: "numeric", month: "short" };
|
|
182
182
|
return e || (i.year = "numeric"), s.toLocaleDateString([], i);
|
|
@@ -187,7 +187,7 @@ const S = (t) => t.length === 0 ? md : t, Nt = (t) => Object.keys(t).length ===
|
|
|
187
187
|
function wd(t) {
|
|
188
188
|
return new Uint8Array(t).reduce((e, i) => e + i.toString(16).padStart(2, "0"), "");
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function ts(t) {
|
|
191
191
|
return new Promise((s, e) => {
|
|
192
192
|
const i = new FileReader();
|
|
193
193
|
i.onload = () => {
|
|
@@ -249,7 +249,7 @@ function TR(t) {
|
|
|
249
249
|
s[e.uuid] = e;
|
|
250
250
|
return s;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function E(t) {
|
|
253
253
|
return t.map(({ uuid: s }) => s);
|
|
254
254
|
}
|
|
255
255
|
function cs(t, s) {
|
|
@@ -297,12 +297,12 @@ const In = (t) => {
|
|
|
297
297
|
});
|
|
298
298
|
}, FR = (t) => {
|
|
299
299
|
const { roots: s } = In(t);
|
|
300
|
-
return s.map((e) => new
|
|
300
|
+
return s.map((e) => new Lt(e));
|
|
301
301
|
}, Vd = (t, s) => {
|
|
302
302
|
const { nodes: e } = In(s), i = e.get(t);
|
|
303
303
|
if (!i)
|
|
304
304
|
throw new Error(`Node with uuid ${t} does not exist in asset procedure step tree.`);
|
|
305
|
-
return new
|
|
305
|
+
return new Lt(i);
|
|
306
306
|
}, zd = (t, s) => t.type !== s.type ? t.type - s.type : t.order - s.order, Dd = (t, s) => t.type !== s.type ? t.type - s.type : t.order - s.order, bn = (t) => Pn(t, {
|
|
307
307
|
id: (s) => s.uuid,
|
|
308
308
|
parentId: (s) => s.parent_document,
|
|
@@ -310,12 +310,12 @@ const In = (t) => {
|
|
|
310
310
|
valueKey: !1
|
|
311
311
|
}), wR = (t) => {
|
|
312
312
|
const { roots: s } = bn(t);
|
|
313
|
-
return s.map((e) => new
|
|
313
|
+
return s.map((e) => new Lt(e));
|
|
314
314
|
}, qd = (t, s) => {
|
|
315
315
|
const { nodes: e } = bn(s), i = e.get(t);
|
|
316
316
|
if (!i)
|
|
317
317
|
throw new Error(`Node with uuid ${t} does not exist in document tree.`);
|
|
318
|
-
return new
|
|
318
|
+
return new Lt(i);
|
|
319
319
|
};
|
|
320
320
|
class RR {
|
|
321
321
|
constructor(s) {
|
|
@@ -965,27 +965,27 @@ const f = (
|
|
|
965
965
|
updateAssetProcedureStepFieldValuesMany: Ml,
|
|
966
966
|
deleteAssetProcedureStepFieldValues: Fl,
|
|
967
967
|
deleteAssetProcedureStepFieldValuesMany: wl
|
|
968
|
-
} = er.actions, Rl = (t) => t.assetProcedureStepFieldValuesReducer.instances,
|
|
968
|
+
} = er.actions, Rl = (t) => t.assetProcedureStepFieldValuesReducer.instances, Gt = p(
|
|
969
969
|
[Rl],
|
|
970
970
|
(t) => Object.values(t)
|
|
971
971
|
), YR = f(
|
|
972
972
|
p(
|
|
973
|
-
[
|
|
973
|
+
[Gt, (t, s) => s],
|
|
974
974
|
(t, s) => S(t.filter((e) => e.asset === s))
|
|
975
975
|
)
|
|
976
976
|
), JR = f(
|
|
977
977
|
p(
|
|
978
|
-
[
|
|
978
|
+
[Gt, (t, s) => s],
|
|
979
979
|
(t, s) => S(t.filter((e) => e.asset_procedure === s))
|
|
980
980
|
)
|
|
981
981
|
), ZR = f(
|
|
982
982
|
p(
|
|
983
|
-
[
|
|
983
|
+
[Gt, (t, s) => s],
|
|
984
984
|
(t, s) => S(t.filter((e) => e.asset_procedure_step === s))
|
|
985
985
|
)
|
|
986
986
|
), El = (t) => (s) => s.assetProcedureStepFieldValuesReducer.instances[t], vl = f(
|
|
987
987
|
p(
|
|
988
|
-
[
|
|
988
|
+
[Gt, (t, s) => s],
|
|
989
989
|
(t, s) => {
|
|
990
990
|
const e = new Set(s);
|
|
991
991
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
@@ -1028,7 +1028,7 @@ const f = (
|
|
|
1028
1028
|
const e = {};
|
|
1029
1029
|
for (const [i, n] of Object.entries(t))
|
|
1030
1030
|
n.asset_procedure_type === s && (e[i] = n);
|
|
1031
|
-
return
|
|
1031
|
+
return Ht(e);
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
), XR = f(
|
|
@@ -1167,7 +1167,7 @@ const f = (
|
|
|
1167
1167
|
const e = {};
|
|
1168
1168
|
for (const [i, n] of Object.entries(t))
|
|
1169
1169
|
n.asset_procedure_type === s && (e[i] = n);
|
|
1170
|
-
return
|
|
1170
|
+
return Ht(e);
|
|
1171
1171
|
})
|
|
1172
1172
|
), sE = f(
|
|
1173
1173
|
p([or, (t, s) => s], (t, s) => S(t.filter((e) => e.asset_procedure_type === s)))
|
|
@@ -1295,12 +1295,12 @@ const f = (
|
|
|
1295
1295
|
updateAssetTypeFieldsMany: cp,
|
|
1296
1296
|
deleteAssetTypeFields: dp,
|
|
1297
1297
|
deleteAssetTypeFieldsMany: op
|
|
1298
|
-
} = fr.actions, up = (t) => t.assetTypeFieldsReducer.instances,
|
|
1299
|
-
p([
|
|
1298
|
+
} = fr.actions, up = (t) => t.assetTypeFieldsReducer.instances, Wt = p([up], (t) => Object.values(t)), nE = f(
|
|
1299
|
+
p([Wt, (t, s) => s], (t, s) => S(t.filter((e) => e.asset_type === s)))
|
|
1300
1300
|
), rE = f(
|
|
1301
|
-
p([
|
|
1301
|
+
p([Wt, (t, s) => s], (t, s) => t.filter((e) => e.asset_type === s).sort((e, i) => e.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
1302
1302
|
), lp = (t) => (s) => s.assetTypeFieldsReducer.instances[t], hp = f(
|
|
1303
|
-
p([
|
|
1303
|
+
p([Wt, (t, s) => s], (t, s) => {
|
|
1304
1304
|
const e = new Set(s);
|
|
1305
1305
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
1306
1306
|
})
|
|
@@ -1384,7 +1384,7 @@ const f = (
|
|
|
1384
1384
|
p([ys, (t, s) => s], (t, s) => S(t.filter((e) => e.asset === s)))
|
|
1385
1385
|
), cE = f(
|
|
1386
1386
|
p(
|
|
1387
|
-
[
|
|
1387
|
+
[Wt, ys, (t, s) => s],
|
|
1388
1388
|
(t, s, e) => {
|
|
1389
1389
|
const i = new Set(
|
|
1390
1390
|
t.filter((n) => n.asset_type === e).map((n) => n.uuid)
|
|
@@ -2137,16 +2137,16 @@ const f = (
|
|
|
2137
2137
|
addIssueAssociations: _t,
|
|
2138
2138
|
deleteIssueAssociation: gS,
|
|
2139
2139
|
deleteIssueAssociations: It
|
|
2140
|
-
} = na.actions, MS = (t) => t.issueAssociationReducer.instances,
|
|
2141
|
-
p([
|
|
2140
|
+
} = na.actions, MS = (t) => t.issueAssociationReducer.instances, Rt = p([MS], (t) => Object.values(t)), FS = (t) => (s) => s.issueAssociationReducer.instances[t], wS = f(
|
|
2141
|
+
p([Rt, (t, s) => s], (t, s) => {
|
|
2142
2142
|
const e = new Set(s);
|
|
2143
2143
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
2144
2144
|
})
|
|
2145
2145
|
), RS = f(
|
|
2146
|
-
p([
|
|
2146
|
+
p([Rt, (t, s) => s], (t, s) => S(t.filter(({ associated_issue: e }) => e === s)))
|
|
2147
2147
|
), ES = f(
|
|
2148
2148
|
p(
|
|
2149
|
-
[
|
|
2149
|
+
[Rt, (t, s) => s],
|
|
2150
2150
|
(t, s) => {
|
|
2151
2151
|
const e = new Set(s);
|
|
2152
2152
|
return S(
|
|
@@ -2156,19 +2156,19 @@ const f = (
|
|
|
2156
2156
|
)
|
|
2157
2157
|
), vS = f(
|
|
2158
2158
|
p(
|
|
2159
|
-
[
|
|
2159
|
+
[Rt, (t, s) => s],
|
|
2160
2160
|
(t, s) => {
|
|
2161
2161
|
const e = new Set(s);
|
|
2162
2162
|
return S(t.filter(({ issue: i }) => i && e.has(i)));
|
|
2163
2163
|
}
|
|
2164
2164
|
)
|
|
2165
2165
|
), kS = f(
|
|
2166
|
-
p([
|
|
2166
|
+
p([Rt, (t, s) => s], (t, s) => S(t.filter(({ issue: e }) => e === s)))
|
|
2167
2167
|
), BS = f(
|
|
2168
|
-
p([
|
|
2168
|
+
p([Rt, (t, s) => s], (t, s) => S(t.filter(({ asset: e }) => e === s)))
|
|
2169
2169
|
), VS = f(
|
|
2170
2170
|
p(
|
|
2171
|
-
[
|
|
2171
|
+
[Rt, (t, s) => s],
|
|
2172
2172
|
(t, s) => {
|
|
2173
2173
|
const e = new Set(s);
|
|
2174
2174
|
return S(t.filter(({ asset: i }) => i && e.has(i)));
|
|
@@ -2327,13 +2327,13 @@ const f = (
|
|
|
2327
2327
|
}), {
|
|
2328
2328
|
initializeIssueProcedureStepLinks: PA,
|
|
2329
2329
|
addIssueProcedureStepLink: OA,
|
|
2330
|
-
addIssueProcedureStepLinks:
|
|
2330
|
+
addIssueProcedureStepLinks: gt,
|
|
2331
2331
|
setIssueProcedureStepLink: TA,
|
|
2332
2332
|
setIssueProcedureStepLinks: _A,
|
|
2333
2333
|
updateIssueProcedureStepLink: IA,
|
|
2334
2334
|
updateIssueProcedureStepLinks: bA,
|
|
2335
2335
|
deleteIssueProcedureStepLink: gA,
|
|
2336
|
-
deleteIssueProcedureStepLinks:
|
|
2336
|
+
deleteIssueProcedureStepLinks: Mt
|
|
2337
2337
|
} = pa.actions, MA = (t) => t.issueProcedureStepLinkReducer.instances, Ot = p([MA], (t) => Object.values(t)), FA = (t) => (s) => s.issueProcedureStepLinkReducer.instances[t], wA = f(
|
|
2338
2338
|
p(
|
|
2339
2339
|
[Ot, (t, s) => s],
|
|
@@ -2351,7 +2351,7 @@ const f = (
|
|
|
2351
2351
|
})
|
|
2352
2352
|
), vA = f(
|
|
2353
2353
|
p([Ot, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure === s)))
|
|
2354
|
-
),
|
|
2354
|
+
), Ut = f(
|
|
2355
2355
|
p([Ot, (t, s) => s], (t, s) => {
|
|
2356
2356
|
const e = new Set(s);
|
|
2357
2357
|
return S(t.filter(({ procedure: i }) => e.has(i)));
|
|
@@ -2580,13 +2580,13 @@ const f = (
|
|
|
2580
2580
|
updateIssueTypeFieldsMany: qP,
|
|
2581
2581
|
deleteIssueTypeFields: $P,
|
|
2582
2582
|
deleteIssueTypeFieldsMany: xP
|
|
2583
|
-
} = _a.actions, jP = (t) => t.issueTypeFieldsReducer.instances,
|
|
2584
|
-
p([
|
|
2583
|
+
} = _a.actions, jP = (t) => t.issueTypeFieldsReducer.instances, Kt = p([jP], (t) => Object.values(t)), $E = f(
|
|
2584
|
+
p([Kt, (t, s) => s], (t, s) => S(t.filter((e) => e.issue_type === s)))
|
|
2585
2585
|
), xE = f(
|
|
2586
|
-
p([
|
|
2586
|
+
p([Kt, (t, s) => s], (t, s) => t.filter((e) => e.issue_type === s).sort((e, i) => e.submitted_at > i.submitted_at ? -1 : 1)[0])
|
|
2587
2587
|
), jE = f(
|
|
2588
2588
|
p(
|
|
2589
|
-
[
|
|
2589
|
+
[Kt, _s, (t, s) => s],
|
|
2590
2590
|
(t, s, e) => {
|
|
2591
2591
|
const i = new Set(
|
|
2592
2592
|
t.filter((n) => n.issue_type === e).map((n) => n.uuid)
|
|
@@ -2595,7 +2595,7 @@ const f = (
|
|
|
2595
2595
|
}
|
|
2596
2596
|
)
|
|
2597
2597
|
), CP = (t) => (s) => s.issueTypeFieldsReducer.instances[t], UP = f(
|
|
2598
|
-
p([
|
|
2598
|
+
p([Kt, (t, s) => s], (t, s) => {
|
|
2599
2599
|
const e = new Set(s);
|
|
2600
2600
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
2601
2601
|
})
|
|
@@ -2960,7 +2960,7 @@ const f = (
|
|
|
2960
2960
|
const s = {};
|
|
2961
2961
|
for (const e of Object.values(t))
|
|
2962
2962
|
s[e.user] = e;
|
|
2963
|
-
return
|
|
2963
|
+
return Ht(s);
|
|
2964
2964
|
}), YE = f(
|
|
2965
2965
|
p(
|
|
2966
2966
|
[Ha, ET, (t, s) => s],
|
|
@@ -3084,11 +3084,11 @@ const f = (
|
|
|
3084
3084
|
updateProjectAccesses: s_,
|
|
3085
3085
|
deleteProjectAccess: i_,
|
|
3086
3086
|
deleteProjectAccesses: n_
|
|
3087
|
-
} = Ya.actions, r_ = Ya.reducer, Ja = (t) => t.projectAccessReducer.instances,
|
|
3087
|
+
} = Ya.actions, r_ = Ya.reducer, Ja = (t) => t.projectAccessReducer.instances, Yt = p(
|
|
3088
3088
|
Ja,
|
|
3089
3089
|
(t) => Object.values(t)
|
|
3090
3090
|
), a_ = (t) => (s) => s.projectAccessReducer.instances[t], c_ = f(
|
|
3091
|
-
p([
|
|
3091
|
+
p([Yt, (t, s) => s], (t, s) => {
|
|
3092
3092
|
const e = new Set(s);
|
|
3093
3093
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3094
3094
|
})
|
|
@@ -3100,7 +3100,7 @@ const f = (
|
|
|
3100
3100
|
)
|
|
3101
3101
|
)
|
|
3102
3102
|
), ev = f(
|
|
3103
|
-
p([
|
|
3103
|
+
p([Yt, (t, s) => s], (t, s) => {
|
|
3104
3104
|
const e = {};
|
|
3105
3105
|
for (const i of t.filter((n) => n.project === s))
|
|
3106
3106
|
e[i.user] = i;
|
|
@@ -3108,7 +3108,7 @@ const f = (
|
|
|
3108
3108
|
})
|
|
3109
3109
|
), tv = f(
|
|
3110
3110
|
p(
|
|
3111
|
-
[bs,
|
|
3111
|
+
[bs, Yt, (t, s) => s],
|
|
3112
3112
|
(t, s, e) => {
|
|
3113
3113
|
const i = new Set(s.filter((n) => n.project === e).map((n) => n.user));
|
|
3114
3114
|
return S(t.filter((n) => i.has(n.id)));
|
|
@@ -3227,7 +3227,7 @@ const f = (
|
|
|
3227
3227
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3228
3228
|
})
|
|
3229
3229
|
), iv = f(
|
|
3230
|
-
p([Fs,
|
|
3230
|
+
p([Fs, Yt, (t, s) => s], (t, s, e) => {
|
|
3231
3231
|
const i = new Set(s.filter((n) => n.user === e).map((n) => n.project));
|
|
3232
3232
|
return S(t.filter((n) => i.has(n.uuid)));
|
|
3233
3233
|
})
|
|
@@ -3301,13 +3301,13 @@ const f = (
|
|
|
3301
3301
|
}), {
|
|
3302
3302
|
initializeProcedures: cI,
|
|
3303
3303
|
addProcedure: dI,
|
|
3304
|
-
addProcedures:
|
|
3304
|
+
addProcedures: Ft,
|
|
3305
3305
|
setProcedure: oI,
|
|
3306
3306
|
setProcedures: uI,
|
|
3307
3307
|
updateProcedure: lI,
|
|
3308
3308
|
updateProcedures: hI,
|
|
3309
3309
|
deleteProcedure: pI,
|
|
3310
|
-
deleteProcedures:
|
|
3310
|
+
deleteProcedures: wt
|
|
3311
3311
|
} = sc.actions, yI = sc.reducer, mI = (t) => t.procedureReducer.instances, Tt = p(
|
|
3312
3312
|
[mI],
|
|
3313
3313
|
(t) => Object.values(t)
|
|
@@ -3366,22 +3366,22 @@ const f = (
|
|
|
3366
3366
|
updateProcedureStepAssignees: EI,
|
|
3367
3367
|
deleteProcedureStepAssignee: vI,
|
|
3368
3368
|
deleteProcedureStepAssignees: kI
|
|
3369
|
-
} = ic.actions, BI = (t) => t.procedureStepAssigneeReducer.instances,
|
|
3369
|
+
} = ic.actions, BI = (t) => t.procedureStepAssigneeReducer.instances, Jt = p([BI], (t) => Object.values(t)), VI = (t) => (s) => s.procedureStepAssigneeReducer.instances[t], zI = f(
|
|
3370
3370
|
p(
|
|
3371
|
-
[
|
|
3371
|
+
[Jt, (t, s) => s],
|
|
3372
3372
|
(t, s) => {
|
|
3373
3373
|
const e = new Set(s);
|
|
3374
3374
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3375
3375
|
}
|
|
3376
3376
|
)
|
|
3377
3377
|
), dv = f(
|
|
3378
|
-
p([
|
|
3378
|
+
p([Jt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure === s)))
|
|
3379
3379
|
), ov = f(
|
|
3380
|
-
p([
|
|
3380
|
+
p([Jt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure_step === s)))
|
|
3381
3381
|
), uv = f(
|
|
3382
3382
|
p(
|
|
3383
3383
|
[
|
|
3384
|
-
|
|
3384
|
+
Jt,
|
|
3385
3385
|
(t, s) => s,
|
|
3386
3386
|
(t, s, e) => e
|
|
3387
3387
|
],
|
|
@@ -3421,22 +3421,22 @@ const f = (
|
|
|
3421
3421
|
updateProcedureStepComments: LI,
|
|
3422
3422
|
deleteProcedureStepComment: NI,
|
|
3423
3423
|
deleteProcedureStepComments: HI
|
|
3424
|
-
} = nc.actions, GI = (t) => t.procedureStepCommentReducer.instances,
|
|
3424
|
+
} = nc.actions, GI = (t) => t.procedureStepCommentReducer.instances, Zt = p([GI], (t) => Object.values(t)), WI = (t) => (s) => s.procedureStepCommentReducer.instances[t], KI = f(
|
|
3425
3425
|
p(
|
|
3426
|
-
[
|
|
3426
|
+
[Zt, (t, s) => s],
|
|
3427
3427
|
(t, s) => {
|
|
3428
3428
|
const e = new Set(s);
|
|
3429
3429
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3430
3430
|
}
|
|
3431
3431
|
)
|
|
3432
3432
|
), lv = f(
|
|
3433
|
-
p([
|
|
3433
|
+
p([Zt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure === s)))
|
|
3434
3434
|
), hv = f(
|
|
3435
|
-
p([
|
|
3435
|
+
p([Zt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure_step === s)))
|
|
3436
3436
|
), pv = f(
|
|
3437
3437
|
p(
|
|
3438
3438
|
[
|
|
3439
|
-
|
|
3439
|
+
Zt,
|
|
3440
3440
|
(t, s) => s,
|
|
3441
3441
|
(t, s, e) => e
|
|
3442
3442
|
],
|
|
@@ -3568,22 +3568,22 @@ const f = (
|
|
|
3568
3568
|
updateProcedureStepEvents: wb,
|
|
3569
3569
|
deleteProcedureStepEvent: Rb,
|
|
3570
3570
|
deleteProcedureStepEvents: Eb
|
|
3571
|
-
} = oc.actions, vb = (t) => t.procedureStepEventReducer.instances,
|
|
3571
|
+
} = oc.actions, vb = (t) => t.procedureStepEventReducer.instances, Qt = p([vb], (t) => Object.values(t)), kb = (t) => (s) => s.procedureStepEventReducer.instances[t], Bb = f(
|
|
3572
3572
|
p(
|
|
3573
|
-
[
|
|
3573
|
+
[Qt, (t, s) => s],
|
|
3574
3574
|
(t, s) => {
|
|
3575
3575
|
const e = new Set(s);
|
|
3576
3576
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3577
3577
|
}
|
|
3578
3578
|
)
|
|
3579
3579
|
), fv = f(
|
|
3580
|
-
p([
|
|
3580
|
+
p([Qt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure === s)))
|
|
3581
3581
|
), Sv = f(
|
|
3582
|
-
p([
|
|
3582
|
+
p([Qt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure_step === s)))
|
|
3583
3583
|
), Av = f(
|
|
3584
3584
|
p(
|
|
3585
3585
|
[
|
|
3586
|
-
|
|
3586
|
+
Qt,
|
|
3587
3587
|
(t, s) => s,
|
|
3588
3588
|
(t, s, e) => e
|
|
3589
3589
|
],
|
|
@@ -3863,7 +3863,7 @@ const f = (
|
|
|
3863
3863
|
],
|
|
3864
3864
|
(t, s, e, i) => {
|
|
3865
3865
|
const n = new Set(
|
|
3866
|
-
|
|
3866
|
+
E(
|
|
3867
3867
|
t.filter(
|
|
3868
3868
|
({ procedure_step: r, procedure: a }) => e === a && r === i
|
|
3869
3869
|
)
|
|
@@ -3913,22 +3913,22 @@ const f = (
|
|
|
3913
3913
|
updateProcedureStepReviewers: Kg,
|
|
3914
3914
|
deleteProcedureStepReviewer: Yg,
|
|
3915
3915
|
deleteProcedureStepReviewers: Jg
|
|
3916
|
-
} = bc.actions, Zg = (t) => t.procedureStepReviewerReducer.instances,
|
|
3916
|
+
} = bc.actions, Zg = (t) => t.procedureStepReviewerReducer.instances, Xt = p([Zg], (t) => Object.values(t)), Qg = (t) => (s) => s.procedureStepReviewerReducer.instances[t], Xg = f(
|
|
3917
3917
|
p(
|
|
3918
|
-
[
|
|
3918
|
+
[Xt, (t, s) => s],
|
|
3919
3919
|
(t, s) => {
|
|
3920
3920
|
const e = new Set(s);
|
|
3921
3921
|
return S(t.filter(({ uuid: i }) => e.has(i)));
|
|
3922
3922
|
}
|
|
3923
3923
|
)
|
|
3924
3924
|
), wv = f(
|
|
3925
|
-
p([
|
|
3925
|
+
p([Xt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure === s)))
|
|
3926
3926
|
), Rv = f(
|
|
3927
|
-
p([
|
|
3927
|
+
p([Xt, (t, s) => s], (t, s) => S(t.filter((e) => e.procedure_step === s)))
|
|
3928
3928
|
), Ev = f(
|
|
3929
3929
|
p(
|
|
3930
3930
|
[
|
|
3931
|
-
|
|
3931
|
+
Xt,
|
|
3932
3932
|
(t, s) => s,
|
|
3933
3933
|
(t, s, e) => e
|
|
3934
3934
|
],
|
|
@@ -3977,7 +3977,7 @@ const f = (
|
|
|
3977
3977
|
const e = {};
|
|
3978
3978
|
for (const [i, n] of Object.entries(t))
|
|
3979
3979
|
n.procedure_type === s && (e[i] = n);
|
|
3980
|
-
return
|
|
3980
|
+
return Ht(e);
|
|
3981
3981
|
}
|
|
3982
3982
|
)
|
|
3983
3983
|
), kv = f(
|
|
@@ -4367,7 +4367,7 @@ const f = (
|
|
|
4367
4367
|
authReducer: $y
|
|
4368
4368
|
}, Nv = An(Hc), pw = {
|
|
4369
4369
|
...Hc,
|
|
4370
|
-
[
|
|
4370
|
+
[Nt]: hw,
|
|
4371
4371
|
assetReducer: ih,
|
|
4372
4372
|
assetAttachmentReducer: eo,
|
|
4373
4373
|
assetStageCompletionReducer: ph,
|
|
@@ -4475,18 +4475,18 @@ class Kc {
|
|
|
4475
4475
|
return s(this.client.store.getState());
|
|
4476
4476
|
}
|
|
4477
4477
|
}
|
|
4478
|
-
const Yc = () => Zc.length - 1, Jc = (t) => (t[
|
|
4478
|
+
const Yc = () => Zc.length - 1, Jc = (t) => (t[Nt] = { version: Yc() }, t), yn = () => Jc({}), fw = (t) => (t.outboxReducer && (t.outboxReducer.deletedRequests = []), t), Sw = (t) => (s) => {
|
|
4479
4479
|
var e;
|
|
4480
|
-
return s === void 0 && (s = {}), ((e = s[
|
|
4480
|
+
return s === void 0 && (s = {}), ((e = s[Nt]) == null ? void 0 : e.version) === Yc() ? s : t(s);
|
|
4481
4481
|
}, Zc = [Jc, yn, yn, fw], Aw = Object.fromEntries(Zc.map((t, s) => [s, Sw(t)])), Pw = (t) => {
|
|
4482
4482
|
if (t) throw t;
|
|
4483
4483
|
const s = jt();
|
|
4484
4484
|
s ? s.dispatch({ type: "rehydrated/setRehydrated", payload: !0 }) : console.error("Client store not set");
|
|
4485
4485
|
}, Ow = (t, s, e) => {
|
|
4486
|
-
const i =
|
|
4486
|
+
const i = kt();
|
|
4487
4487
|
return i ? (i.addRequest(s), i.getQueue()) : (console.warn("Outbox coordinator not set; cannot enqueue request yet."), []);
|
|
4488
4488
|
}, Tw = (t, s, e) => {
|
|
4489
|
-
const i =
|
|
4489
|
+
const i = kt();
|
|
4490
4490
|
if (!i)
|
|
4491
4491
|
return console.warn("Outbox coordinator not set; cannot dequeue request yet."), [];
|
|
4492
4492
|
const r = s.meta.offlineAction.payload.uuid;
|
|
@@ -4519,7 +4519,7 @@ const Iw = {
|
|
|
4519
4519
|
// Bad typing, undefined is actually fine, and the action is a FullOfflineAction, not just an OfflineAction.
|
|
4520
4520
|
peek: (...t) => Fw(...t)
|
|
4521
4521
|
}
|
|
4522
|
-
}, bw = ld(Aw,
|
|
4522
|
+
}, bw = ld(Aw, Nt), Gv = ad(od(Iw), bw);
|
|
4523
4523
|
async function gw(t, s, e) {
|
|
4524
4524
|
if (s.store.getState().outboxReducer.deletedRequests.includes(t.payload.uuid))
|
|
4525
4525
|
throw new Error("Request was marked for deletion");
|
|
@@ -4555,7 +4555,7 @@ Retries:`,
|
|
|
4555
4555
|
const i = jt(), r = i.getState().outboxReducer.deletedRequests, a = s.payload.uuid;
|
|
4556
4556
|
function c() {
|
|
4557
4557
|
i.dispatch(WT(a));
|
|
4558
|
-
const l =
|
|
4558
|
+
const l = kt();
|
|
4559
4559
|
if (!l)
|
|
4560
4560
|
throw new Error("Outbox coordinator not set");
|
|
4561
4561
|
l.remove(s.payload.uuid);
|
|
@@ -4567,21 +4567,21 @@ Retries:`,
|
|
|
4567
4567
|
if (l || console.warn("Error has no status code:", t), l !== void 0 && Gc.includes(l)) {
|
|
4568
4568
|
console.warn("Discarding request due to error:", t, `
|
|
4569
4569
|
Action:`, s);
|
|
4570
|
-
const y =
|
|
4570
|
+
const y = kt();
|
|
4571
4571
|
if (!y)
|
|
4572
4572
|
throw new Error("Outbox coordinator not set");
|
|
4573
4573
|
y.remove(s.payload.uuid), t.options.discard = !0, c();
|
|
4574
4574
|
}
|
|
4575
4575
|
}
|
|
4576
4576
|
console.debug("Registering a retry for request:", s.payload.uuid);
|
|
4577
|
-
const d =
|
|
4577
|
+
const d = kt();
|
|
4578
4578
|
if (!d)
|
|
4579
4579
|
throw new Error("Outbox coordinator not set");
|
|
4580
4580
|
return d.registerRetry(s.payload.uuid), !1;
|
|
4581
4581
|
}
|
|
4582
4582
|
function Fw(t, s, e) {
|
|
4583
4583
|
var i;
|
|
4584
|
-
return (i =
|
|
4584
|
+
return (i = kt()) == null ? void 0 : i.peek();
|
|
4585
4585
|
}
|
|
4586
4586
|
function ww(t, s) {
|
|
4587
4587
|
return jt().dispatch(KT((/* @__PURE__ */ new Date()).getTime())), Id;
|
|
@@ -4774,9 +4774,9 @@ class $ extends B {
|
|
|
4774
4774
|
const { addOne: i, updateOne: n, deleteOne: r } = this.actions;
|
|
4775
4775
|
let a, c = null, d = null;
|
|
4776
4776
|
if ("file" in e) {
|
|
4777
|
-
const { file: F, ...
|
|
4777
|
+
const { file: F, ...v } = e;
|
|
4778
4778
|
c = await this.client.files.getFilePayload(F), d = URL.createObjectURL(F), a = {
|
|
4779
|
-
...
|
|
4779
|
+
...v,
|
|
4780
4780
|
file_sha1: c.sha1,
|
|
4781
4781
|
file_type: c.file_type,
|
|
4782
4782
|
file_name: F.name,
|
|
@@ -4805,9 +4805,9 @@ class $ extends B {
|
|
|
4805
4805
|
}).finally(() => {
|
|
4806
4806
|
d && URL.revokeObjectURL(d);
|
|
4807
4807
|
});
|
|
4808
|
-
const m = y.then(({ instance: F }) => F), P = y.then(async ({ instance: F, presigned_url:
|
|
4808
|
+
const m = y.then(({ instance: F }) => F), P = y.then(async ({ instance: F, presigned_url: v }) => {
|
|
4809
4809
|
try {
|
|
4810
|
-
return
|
|
4810
|
+
return v && await this.client.files.processPresignedUrl(F.file_sha1, v), F.file_sha1;
|
|
4811
4811
|
} catch (M) {
|
|
4812
4812
|
throw console.error("Upload to s3 using presigned url failed.", M), M;
|
|
4813
4813
|
}
|
|
@@ -4816,20 +4816,20 @@ class $ extends B {
|
|
|
4816
4816
|
}
|
|
4817
4817
|
async bulkAdd(e, i) {
|
|
4818
4818
|
const { addMany: n, updateMany: r, deleteMany: a } = this.actions, c = (/* @__PURE__ */ new Date()).toISOString(), d = [], o = /* @__PURE__ */ new Set(), l = Pt(e, Math.min(i ?? e.length, At)), y = [];
|
|
4819
|
-
for (const
|
|
4819
|
+
for (const v of l) {
|
|
4820
4820
|
const M = [], w = {}, k = [], q = [];
|
|
4821
|
-
for (const V of
|
|
4821
|
+
for (const V of v) {
|
|
4822
4822
|
let j;
|
|
4823
4823
|
if ("file" in V) {
|
|
4824
|
-
const { file:
|
|
4825
|
-
|
|
4826
|
-
const ks = URL.createObjectURL(
|
|
4824
|
+
const { file: es, ...id } = V, Et = await this.client.files.getFilePayload(es);
|
|
4825
|
+
Et.sha1 in w || (w[Et.sha1] = Et);
|
|
4826
|
+
const ks = URL.createObjectURL(es);
|
|
4827
4827
|
o.add(ks), j = {
|
|
4828
4828
|
...id,
|
|
4829
|
-
file_sha1:
|
|
4830
|
-
file_type:
|
|
4831
|
-
file_name:
|
|
4832
|
-
file_extension:
|
|
4829
|
+
file_sha1: Et.sha1,
|
|
4830
|
+
file_type: Et.file_type,
|
|
4831
|
+
file_name: es.name,
|
|
4832
|
+
file_extension: Et.extension,
|
|
4833
4833
|
file_url: ks
|
|
4834
4834
|
};
|
|
4835
4835
|
} else
|
|
@@ -4853,8 +4853,8 @@ class $ extends B {
|
|
|
4853
4853
|
y.push(x);
|
|
4854
4854
|
}
|
|
4855
4855
|
this.dispatch(n(d));
|
|
4856
|
-
const m = y.map((
|
|
4857
|
-
const { submittedAt: M, files: w, payloads: k, blocks: q, blockers: x } =
|
|
4856
|
+
const m = y.map((v) => {
|
|
4857
|
+
const { submittedAt: M, files: w, payloads: k, blocks: q, blockers: x } = v;
|
|
4858
4858
|
return this.enqueueRequest({
|
|
4859
4859
|
description: A(u.POST, this.name, !0),
|
|
4860
4860
|
method: u.POST,
|
|
@@ -4868,18 +4868,18 @@ class $ extends B {
|
|
|
4868
4868
|
blocks: q
|
|
4869
4869
|
});
|
|
4870
4870
|
});
|
|
4871
|
-
Promise.all(m).then((
|
|
4872
|
-
const M =
|
|
4871
|
+
Promise.all(m).then((v) => {
|
|
4872
|
+
const M = v.flatMap((w) => w.instances);
|
|
4873
4873
|
this.dispatch(r(M));
|
|
4874
|
-
}).catch((
|
|
4875
|
-
throw this.dispatch(a(d.map((M) => this.getId(M)))), console.error(
|
|
4874
|
+
}).catch((v) => {
|
|
4875
|
+
throw this.dispatch(a(d.map((M) => this.getId(M)))), console.error(v), v;
|
|
4876
4876
|
}).finally(() => {
|
|
4877
|
-
for (const
|
|
4878
|
-
URL.revokeObjectURL(
|
|
4877
|
+
for (const v of o)
|
|
4878
|
+
URL.revokeObjectURL(v);
|
|
4879
4879
|
});
|
|
4880
|
-
const P = Promise.all(m).then((
|
|
4880
|
+
const P = Promise.all(m).then((v) => v.flatMap(({ instances: M }) => M)), F = Promise.all(m).then(async (v) => {
|
|
4881
4881
|
const M = [];
|
|
4882
|
-
for (const { presigned_urls: w } of
|
|
4882
|
+
for (const { presigned_urls: w } of v) {
|
|
4883
4883
|
const k = this.client.files.processPresignedUrls(w);
|
|
4884
4884
|
for (const [q, x] of Object.entries(k))
|
|
4885
4885
|
try {
|
|
@@ -5318,8 +5318,8 @@ class Xv extends B {
|
|
|
5318
5318
|
}), [l, y];
|
|
5319
5319
|
}
|
|
5320
5320
|
bulkAdd(e, i) {
|
|
5321
|
-
var
|
|
5322
|
-
const { values: n, payloads: r } = e, { addMany: a, setMany: c, deleteMany: d } = this.actions, o = (/* @__PURE__ */ new Date()).toISOString(), l = ((
|
|
5321
|
+
var v;
|
|
5322
|
+
const { values: n, payloads: r } = e, { addMany: a, setMany: c, deleteMany: d } = this.actions, o = (/* @__PURE__ */ new Date()).toISOString(), l = ((v = this.client.store.getState().userReducer.currentUser) == null ? void 0 : v.id) ?? null, y = [], m = Pt(r, Math.min(i ?? r.length, At)), P = [];
|
|
5323
5323
|
for (const M of m) {
|
|
5324
5324
|
const w = [];
|
|
5325
5325
|
for (const k of M) {
|
|
@@ -5360,7 +5360,7 @@ class Xv extends B {
|
|
|
5360
5360
|
return Promise.all(F).then((M) => {
|
|
5361
5361
|
this.dispatch(c(M.flat()));
|
|
5362
5362
|
}).catch(() => {
|
|
5363
|
-
this.dispatch(d(
|
|
5363
|
+
this.dispatch(d(E(y)));
|
|
5364
5364
|
}), [y, F];
|
|
5365
5365
|
}
|
|
5366
5366
|
update(e) {
|
|
@@ -5395,7 +5395,7 @@ class Xv extends B {
|
|
|
5395
5395
|
if (!d)
|
|
5396
5396
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
5397
5397
|
const o = Qo(e)(c);
|
|
5398
|
-
this.dispatch(n(e)), this.dispatch($n(
|
|
5398
|
+
this.dispatch(n(e)), this.dispatch($n(E(o)));
|
|
5399
5399
|
try {
|
|
5400
5400
|
return await this.enqueueRequest({
|
|
5401
5401
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -5587,7 +5587,7 @@ class tk extends B {
|
|
|
5587
5587
|
if (!d)
|
|
5588
5588
|
throw new Error(`Expected asset procedure type with uuid ${e} to exist`);
|
|
5589
5589
|
const o = Tu(e)(c);
|
|
5590
|
-
this.dispatch(n(e)), this.dispatch(Ln(
|
|
5590
|
+
this.dispatch(n(e)), this.dispatch(Ln(E(o)));
|
|
5591
5591
|
try {
|
|
5592
5592
|
return await this.enqueueRequest({
|
|
5593
5593
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -5912,8 +5912,8 @@ class rk extends B {
|
|
|
5912
5912
|
}), [l, y];
|
|
5913
5913
|
}
|
|
5914
5914
|
bulkAdd(e, i) {
|
|
5915
|
-
var
|
|
5916
|
-
const { payloads: n, values: r } = e, { addMany: a, setMany: c, deleteMany: d } = this.actions, o = (/* @__PURE__ */ new Date()).toISOString(), l = ((
|
|
5915
|
+
var v;
|
|
5916
|
+
const { payloads: n, values: r } = e, { addMany: a, setMany: c, deleteMany: d } = this.actions, o = (/* @__PURE__ */ new Date()).toISOString(), l = ((v = this.client.store.getState().userReducer.currentUser) == null ? void 0 : v.id) ?? null, y = [], m = Pt(n, Math.min(i ?? n.length, At)), P = [];
|
|
5917
5917
|
for (const M of m) {
|
|
5918
5918
|
const w = [];
|
|
5919
5919
|
for (const k of M) {
|
|
@@ -5955,7 +5955,7 @@ class rk extends B {
|
|
|
5955
5955
|
return Promise.all(F).then((M) => {
|
|
5956
5956
|
this.dispatch(c(M.flat()));
|
|
5957
5957
|
}).catch(() => {
|
|
5958
|
-
this.dispatch(d(
|
|
5958
|
+
this.dispatch(d(E(y)));
|
|
5959
5959
|
}), [y, F];
|
|
5960
5960
|
}
|
|
5961
5961
|
update(e) {
|
|
@@ -5991,7 +5991,7 @@ class rk extends B {
|
|
|
5991
5991
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
5992
5992
|
const o = Al(e)(c);
|
|
5993
5993
|
this.dispatch(n(e)), this.dispatch(
|
|
5994
|
-
Qn(
|
|
5994
|
+
Qn(E(o))
|
|
5995
5995
|
);
|
|
5996
5996
|
try {
|
|
5997
5997
|
return await this.enqueueRequest({
|
|
@@ -6092,7 +6092,7 @@ class ak extends B {
|
|
|
6092
6092
|
const { store: i } = this.client, { deleteMany: n, addMany: r, addOne: a, deleteOne: c } = this.actions, { selectById: d } = this.selectors, o = i.getState(), l = d(e)(o);
|
|
6093
6093
|
if (!l) throw new Error(`No asset procedure step with uuid ${e} found in the store`);
|
|
6094
6094
|
const y = Hl(e)(o);
|
|
6095
|
-
this.dispatch(c(e)), this.dispatch(n(
|
|
6095
|
+
this.dispatch(c(e)), this.dispatch(n(E(y)));
|
|
6096
6096
|
try {
|
|
6097
6097
|
return await this.enqueueRequest({
|
|
6098
6098
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -6187,7 +6187,7 @@ class ck extends B {
|
|
|
6187
6187
|
const { store: i } = this.client, { addOne: n, deleteOne: r } = this.actions, { selectById: a } = this.selectors, c = i.getState(), d = a(e)(c);
|
|
6188
6188
|
if (!d) throw new Error(`No asset with uuid ${e} found in the store`);
|
|
6189
6189
|
const o = Xd(e)(c), l = BS(e)(c), y = PI(e)(c);
|
|
6190
|
-
this.dispatch(r(e)), this.dispatch(Rn(
|
|
6190
|
+
this.dispatch(r(e)), this.dispatch(Rn(E(o))), this.dispatch(It(E(l))), this.dispatch(wt(E(y)));
|
|
6191
6191
|
try {
|
|
6192
6192
|
return await this.enqueueRequest({
|
|
6193
6193
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -6197,7 +6197,7 @@ class ck extends B {
|
|
|
6197
6197
|
blocks: []
|
|
6198
6198
|
});
|
|
6199
6199
|
} catch (m) {
|
|
6200
|
-
throw this.dispatch(n(d)), this.dispatch(wn(o)), this.dispatch(_t(l)), this.dispatch(
|
|
6200
|
+
throw this.dispatch(n(d)), this.dispatch(wn(o)), this.dispatch(_t(l)), this.dispatch(Ft(y)), m;
|
|
6201
6201
|
}
|
|
6202
6202
|
}
|
|
6203
6203
|
bulkAdd(e, i) {
|
|
@@ -6216,12 +6216,12 @@ class ck extends B {
|
|
|
6216
6216
|
}), c = [];
|
|
6217
6217
|
let d = null;
|
|
6218
6218
|
for (const o of a) {
|
|
6219
|
-
const { batchId: l, payload: y } = o, m = y.assets.map(({ uuid: w }) => w), P = y.assets.map(({ asset_type: w }) => w), F = y.assets.map(({ project: w }) => w),
|
|
6219
|
+
const { batchId: l, payload: y } = o, m = y.assets.map(({ uuid: w }) => w), P = y.assets.map(({ asset_type: w }) => w), F = y.assets.map(({ project: w }) => w), v = y.assets.map(({ status: w }) => w), M = this.enqueueRequest({
|
|
6220
6220
|
description: A(u.POST, this.name, !0),
|
|
6221
6221
|
method: u.POST,
|
|
6222
6222
|
url: `${this.url}/bulk/`,
|
|
6223
6223
|
payload: y,
|
|
6224
|
-
blockers: (d ? [d] : []).concat(P).concat(F).concat(
|
|
6224
|
+
blockers: (d ? [d] : []).concat(P).concat(F).concat(v),
|
|
6225
6225
|
blocks: [l].concat(m)
|
|
6226
6226
|
});
|
|
6227
6227
|
d = o.batchId, c.push(M);
|
|
@@ -6232,7 +6232,7 @@ class ck extends B {
|
|
|
6232
6232
|
}), c;
|
|
6233
6233
|
}
|
|
6234
6234
|
bulkUpdate(e, i) {
|
|
6235
|
-
const { store: n } = this.client, { updateMany: r } = this.actions, { selectByIds: a } = this.selectors, c =
|
|
6235
|
+
const { store: n } = this.client, { updateMany: r } = this.actions, { selectByIds: a } = this.selectors, c = E(e).toSorted(cs);
|
|
6236
6236
|
if (c.length !== e.length)
|
|
6237
6237
|
throw new Error("payloads contains duplicate uuids.");
|
|
6238
6238
|
const d = a(c)(n.getState()).toSorted(_n);
|
|
@@ -6250,15 +6250,15 @@ class ck extends B {
|
|
|
6250
6250
|
const l = Pt(e, Math.min(i ?? e.length, At)), y = [];
|
|
6251
6251
|
let m = null;
|
|
6252
6252
|
for (const P of l) {
|
|
6253
|
-
const F = bt(),
|
|
6253
|
+
const F = bt(), v = E(P), M = P.map(({ status: k }) => k).filter(Boolean), w = this.enqueueRequest({
|
|
6254
6254
|
description: A(u.PATCH, this.name, !0),
|
|
6255
6255
|
method: u.PATCH,
|
|
6256
6256
|
url: `${this.url}/bulk/`,
|
|
6257
6257
|
payload: {
|
|
6258
6258
|
payloads: P
|
|
6259
6259
|
},
|
|
6260
|
-
blockers: (m ? [m] : []).concat(
|
|
6261
|
-
blocks: [F].concat(
|
|
6260
|
+
blockers: (m ? [m] : []).concat(v).concat(M),
|
|
6261
|
+
blocks: [F].concat(v)
|
|
6262
6262
|
});
|
|
6263
6263
|
y.push(w), m = F;
|
|
6264
6264
|
}
|
|
@@ -6270,7 +6270,7 @@ class ck extends B {
|
|
|
6270
6270
|
}
|
|
6271
6271
|
async bulkDelete(e) {
|
|
6272
6272
|
const { store: i } = this.client, { addMany: n, deleteMany: r } = this.actions, { selectByIds: a } = this.selectors, c = i.getState(), d = a(e)(c), o = VS(e)(c), l = OI(e)(c);
|
|
6273
|
-
this.dispatch(r(e)), this.dispatch(It(
|
|
6273
|
+
this.dispatch(r(e)), this.dispatch(It(E(o))), this.dispatch(wt(E(l)));
|
|
6274
6274
|
try {
|
|
6275
6275
|
return await this.enqueueRequest({
|
|
6276
6276
|
description: A(u.DELETE, this.name, !0),
|
|
@@ -6281,7 +6281,7 @@ class ck extends B {
|
|
|
6281
6281
|
blocks: []
|
|
6282
6282
|
});
|
|
6283
6283
|
} catch (y) {
|
|
6284
|
-
throw this.dispatch(n(d)), this.dispatch(_t(o)), this.dispatch(
|
|
6284
|
+
throw this.dispatch(n(d)), this.dispatch(_t(o)), this.dispatch(Ft(l)), y;
|
|
6285
6285
|
}
|
|
6286
6286
|
}
|
|
6287
6287
|
async refreshStore(e, i) {
|
|
@@ -6840,9 +6840,9 @@ class yk extends B {
|
|
|
6840
6840
|
bulkAdd(e, i) {
|
|
6841
6841
|
var F;
|
|
6842
6842
|
const { payloads: n, values: r } = e, { addMany: a, setMany: c, deleteMany: d } = this.actions, o = (/* @__PURE__ */ new Date()).toISOString(), l = [], y = Pt(n, Math.min(i ?? n.length, At)), m = [];
|
|
6843
|
-
for (const
|
|
6843
|
+
for (const v of y) {
|
|
6844
6844
|
const M = [];
|
|
6845
|
-
for (const w of
|
|
6845
|
+
for (const w of v) {
|
|
6846
6846
|
const k = O({
|
|
6847
6847
|
...w,
|
|
6848
6848
|
values: w.values,
|
|
@@ -6865,21 +6865,21 @@ class yk extends B {
|
|
|
6865
6865
|
}
|
|
6866
6866
|
this.dispatch(a(l));
|
|
6867
6867
|
const P = [];
|
|
6868
|
-
for (const
|
|
6869
|
-
const { field_values: M } =
|
|
6868
|
+
for (const v of m) {
|
|
6869
|
+
const { field_values: M } = v, w = M.map(({ asset: V }) => V), k = M.map(({ fields_revision: V }) => V), q = M.map(({ uuid: V }) => V), x = this.enqueueRequest({
|
|
6870
6870
|
description: A(u.POST, this.name, !0),
|
|
6871
6871
|
method: u.POST,
|
|
6872
6872
|
url: `${this.url}/bulk/`,
|
|
6873
|
-
payload:
|
|
6873
|
+
payload: v,
|
|
6874
6874
|
blockers: w.concat(k),
|
|
6875
6875
|
blocks: q
|
|
6876
6876
|
});
|
|
6877
6877
|
P.push(x);
|
|
6878
6878
|
}
|
|
6879
|
-
return Promise.all(P).then((
|
|
6880
|
-
this.dispatch(c(
|
|
6879
|
+
return Promise.all(P).then((v) => {
|
|
6880
|
+
this.dispatch(c(v.flat()));
|
|
6881
6881
|
}).catch(() => {
|
|
6882
|
-
this.dispatch(d(
|
|
6882
|
+
this.dispatch(d(E(l)));
|
|
6883
6883
|
}), [l, P];
|
|
6884
6884
|
}
|
|
6885
6885
|
update(e) {
|
|
@@ -6914,7 +6914,7 @@ class yk extends B {
|
|
|
6914
6914
|
if (!d)
|
|
6915
6915
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
6916
6916
|
const o = bp(e)(c);
|
|
6917
|
-
this.dispatch(n(e)), this.dispatch(Pr(
|
|
6917
|
+
this.dispatch(n(e)), this.dispatch(Pr(E(o)));
|
|
6918
6918
|
try {
|
|
6919
6919
|
return await this.enqueueRequest({
|
|
6920
6920
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -7079,8 +7079,8 @@ class fk extends B {
|
|
|
7079
7079
|
}), [o, l];
|
|
7080
7080
|
}
|
|
7081
7081
|
bulkAdd(e, i) {
|
|
7082
|
-
var
|
|
7083
|
-
const { store: n } = this.client, { addMany: r, updateMany: a, deleteMany: c } = this.actions, d = (/* @__PURE__ */ new Date()).toISOString(), o = ((
|
|
7082
|
+
var v;
|
|
7083
|
+
const { store: n } = this.client, { addMany: r, updateMany: a, deleteMany: c } = this.actions, d = (/* @__PURE__ */ new Date()).toISOString(), o = ((v = n.getState().userReducer.currentUser) == null ? void 0 : v.id) ?? null, l = Pt(e, Math.min(i ?? e.length, At)), y = [], m = [];
|
|
7084
7084
|
for (const M of l) {
|
|
7085
7085
|
const w = [], k = [], q = [];
|
|
7086
7086
|
for (const V of M) {
|
|
@@ -7124,7 +7124,7 @@ class fk extends B {
|
|
|
7124
7124
|
Promise.all(P).then((M) => {
|
|
7125
7125
|
this.dispatch(a(M.flat()));
|
|
7126
7126
|
}).catch((M) => {
|
|
7127
|
-
throw this.dispatch(c(
|
|
7127
|
+
throw this.dispatch(c(E(m))), M;
|
|
7128
7128
|
});
|
|
7129
7129
|
const F = Promise.all(P).then((M) => M.flat());
|
|
7130
7130
|
return [m, F];
|
|
@@ -7230,7 +7230,7 @@ class Sk extends B {
|
|
|
7230
7230
|
if (!d)
|
|
7231
7231
|
throw new Error(`Expected asset type with uuid ${e} to exist`);
|
|
7232
7232
|
const o = eh(e)(c), l = jh(e)(c);
|
|
7233
|
-
this.dispatch(n(e)), this.dispatch(rr(
|
|
7233
|
+
this.dispatch(n(e)), this.dispatch(rr(E(o))), this.dispatch(hr(E(l)));
|
|
7234
7234
|
try {
|
|
7235
7235
|
return await this.enqueueRequest({
|
|
7236
7236
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -7520,7 +7520,7 @@ class Ok extends B {
|
|
|
7520
7520
|
if (!l)
|
|
7521
7521
|
throw new Error(`attempting to delete a document with uuid ${e} that does not exist in store.documents`);
|
|
7522
7522
|
const y = um(e)(o);
|
|
7523
|
-
this.dispatch(n(e)), this.dispatch(c(
|
|
7523
|
+
this.dispatch(n(e)), this.dispatch(c(E(y)));
|
|
7524
7524
|
try {
|
|
7525
7525
|
return await this.enqueueRequest({
|
|
7526
7526
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -7660,7 +7660,7 @@ class _k extends Bt {
|
|
|
7660
7660
|
});
|
|
7661
7661
|
}
|
|
7662
7662
|
}
|
|
7663
|
-
const zt = {},
|
|
7663
|
+
const zt = {}, ss = /* @__PURE__ */ new Set();
|
|
7664
7664
|
class Ik extends Bt {
|
|
7665
7665
|
constructor() {
|
|
7666
7666
|
super(...arguments);
|
|
@@ -7687,13 +7687,13 @@ class Ik extends Bt {
|
|
|
7687
7687
|
throw new Error(`Cant add a file without a type to cache: ${e.name}`);
|
|
7688
7688
|
if (!e.size)
|
|
7689
7689
|
throw new Error(`Cant add an empty file to cache: ${e.name}`);
|
|
7690
|
-
const i = await
|
|
7691
|
-
if (
|
|
7690
|
+
const i = await ts(e);
|
|
7691
|
+
if (ss.has(i)) return;
|
|
7692
7692
|
const n = await this.getDB();
|
|
7693
|
-
!!await n.get("files", i) ? console.warn(`Attempting to add a file already cached, ${e.name}`) : await n.put("files", e, i),
|
|
7693
|
+
!!await n.get("files", i) ? console.warn(`Attempting to add a file already cached, ${e.name}`) : await n.put("files", e, i), ss.add(i);
|
|
7694
7694
|
}
|
|
7695
7695
|
async removeCache(e) {
|
|
7696
|
-
await (await this.getDB()).delete("files", e),
|
|
7696
|
+
await (await this.getDB()).delete("files", e), ss.delete(e);
|
|
7697
7697
|
}
|
|
7698
7698
|
async fetchCache(e) {
|
|
7699
7699
|
return (await this.getDB()).get("files", e);
|
|
@@ -7732,7 +7732,7 @@ class Ik extends Bt {
|
|
|
7732
7732
|
} catch (l) {
|
|
7733
7733
|
throw l instanceof U && delete zt[r], l;
|
|
7734
7734
|
}
|
|
7735
|
-
const o = await
|
|
7735
|
+
const o = await ts(d);
|
|
7736
7736
|
if (o !== i) {
|
|
7737
7737
|
const l = `The hash of the file returned from the server (${o}) does not match the
|
|
7738
7738
|
expected hash (${i}). This can happen if you're using a local development server and the
|
|
@@ -7772,7 +7772,7 @@ class Ik extends Bt {
|
|
|
7772
7772
|
}
|
|
7773
7773
|
async getFilePayload(e) {
|
|
7774
7774
|
const n = {
|
|
7775
|
-
sha1: await
|
|
7775
|
+
sha1: await ts(e),
|
|
7776
7776
|
file_type: e.type,
|
|
7777
7777
|
extension: Rd(e),
|
|
7778
7778
|
size: e.size
|
|
@@ -8148,7 +8148,7 @@ class wk extends B {
|
|
|
8148
8148
|
if (!d)
|
|
8149
8149
|
throw new Error("Expected form to exist");
|
|
8150
8150
|
const o = nS(e)(c), l = _f(e)(c);
|
|
8151
|
-
this.dispatch(n(e)), this.dispatch(ea(
|
|
8151
|
+
this.dispatch(n(e)), this.dispatch(ea(E(o))), this.dispatch(Lr(E(l)));
|
|
8152
8152
|
try {
|
|
8153
8153
|
return await this.enqueueRequest({
|
|
8154
8154
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -8332,7 +8332,7 @@ class Ek extends B {
|
|
|
8332
8332
|
if (!d)
|
|
8333
8333
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
8334
8334
|
const o = Gf(e)(c);
|
|
8335
|
-
this.dispatch(n(e)), this.dispatch(Kr(
|
|
8335
|
+
this.dispatch(n(e)), this.dispatch(Kr(E(o)));
|
|
8336
8336
|
try {
|
|
8337
8337
|
return await this.enqueueRequest({
|
|
8338
8338
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -8525,12 +8525,12 @@ class kk extends B {
|
|
|
8525
8525
|
...m.issue ? [m.issue] : [],
|
|
8526
8526
|
...m.asset ? [m.asset] : []
|
|
8527
8527
|
]),
|
|
8528
|
-
blocks:
|
|
8528
|
+
blocks: E(o)
|
|
8529
8529
|
});
|
|
8530
8530
|
return l.then((m) => {
|
|
8531
8531
|
this.dispatch(a(m));
|
|
8532
8532
|
}).catch(() => {
|
|
8533
|
-
this.dispatch(r(
|
|
8533
|
+
this.dispatch(r(E(o)));
|
|
8534
8534
|
}), [o, l];
|
|
8535
8535
|
}
|
|
8536
8536
|
async delete(e) {
|
|
@@ -8803,13 +8803,13 @@ class Dk extends B {
|
|
|
8803
8803
|
h(this, "url", "/issue-procedure-step-links");
|
|
8804
8804
|
h(this, "actions", {
|
|
8805
8805
|
addOne: OA,
|
|
8806
|
-
addMany:
|
|
8806
|
+
addMany: gt,
|
|
8807
8807
|
setOne: TA,
|
|
8808
8808
|
setMany: _A,
|
|
8809
8809
|
updateOne: IA,
|
|
8810
8810
|
updateMany: bA,
|
|
8811
8811
|
deleteOne: gA,
|
|
8812
|
-
deleteMany:
|
|
8812
|
+
deleteMany: Mt,
|
|
8813
8813
|
initialize: PA
|
|
8814
8814
|
});
|
|
8815
8815
|
h(this, "selectors", {
|
|
@@ -8858,12 +8858,12 @@ class Dk extends B {
|
|
|
8858
8858
|
submitted_at: d
|
|
8859
8859
|
},
|
|
8860
8860
|
blockers: o.flatMap((m) => [m.issue, m.procedure, m.procedure_step]),
|
|
8861
|
-
blocks:
|
|
8861
|
+
blocks: E(o)
|
|
8862
8862
|
});
|
|
8863
8863
|
return l.then((m) => {
|
|
8864
8864
|
this.dispatch(r(m));
|
|
8865
8865
|
}).catch(() => {
|
|
8866
|
-
this.dispatch(a(
|
|
8866
|
+
this.dispatch(a(E(o)));
|
|
8867
8867
|
}), [o, l];
|
|
8868
8868
|
}
|
|
8869
8869
|
async delete(e) {
|
|
@@ -9036,7 +9036,7 @@ class qk extends B {
|
|
|
9036
9036
|
}), [c, l];
|
|
9037
9037
|
}
|
|
9038
9038
|
bulkUpdate(e, i) {
|
|
9039
|
-
const { store: n } = this.client, { updateMany: r } = this.actions, { selectByIds: a } = this.selectors, c =
|
|
9039
|
+
const { store: n } = this.client, { updateMany: r } = this.actions, { selectByIds: a } = this.selectors, c = E(e).toSorted(cs);
|
|
9040
9040
|
if (c.length !== e.length)
|
|
9041
9041
|
throw new Error("payloads contains duplicate uuids.");
|
|
9042
9042
|
const d = a(c)(n.getState()).toSorted(_n);
|
|
@@ -9054,15 +9054,15 @@ class qk extends B {
|
|
|
9054
9054
|
const l = Pt(e, Math.min(i ?? e.length, At)), y = [];
|
|
9055
9055
|
let m = null;
|
|
9056
9056
|
for (const P of l) {
|
|
9057
|
-
const F = bt(),
|
|
9057
|
+
const F = bt(), v = E(P), M = P.map(({ status: k }) => k).filter(Boolean), w = this.enqueueRequest({
|
|
9058
9058
|
description: A(u.PATCH, this.name, !0),
|
|
9059
9059
|
method: u.PATCH,
|
|
9060
9060
|
url: `${this.url}/bulk/`,
|
|
9061
9061
|
payload: {
|
|
9062
9062
|
payloads: P
|
|
9063
9063
|
},
|
|
9064
|
-
blockers: (m ? [m] : []).concat(
|
|
9065
|
-
blocks: [F].concat(
|
|
9064
|
+
blockers: (m ? [m] : []).concat(v).concat(M),
|
|
9065
|
+
blocks: [F].concat(v)
|
|
9066
9066
|
});
|
|
9067
9067
|
y.push(w), m = F;
|
|
9068
9068
|
}
|
|
@@ -9078,10 +9078,10 @@ class qk extends B {
|
|
|
9078
9078
|
throw new Error(`No issue with uuid ${e} found in the store`);
|
|
9079
9079
|
const o = RS(e)(c), l = kS(e)(c), y = NS(e)(c), m = aT(e)(c), P = TI(e)(c), F = fn(
|
|
9080
9080
|
RA(e)(c).concat(
|
|
9081
|
-
|
|
9081
|
+
Ut(E(P))(c)
|
|
9082
9082
|
)
|
|
9083
9083
|
);
|
|
9084
|
-
this.dispatch(n(e)), this.dispatch(ca(
|
|
9084
|
+
this.dispatch(n(e)), this.dispatch(ca(E(y))), this.dispatch(xa(E(m))), this.dispatch(It(E(o))), this.dispatch(It(E(l))), this.dispatch(Mt(E(F))), this.dispatch(wt(E(P)));
|
|
9085
9085
|
try {
|
|
9086
9086
|
return await this.enqueueRequest({
|
|
9087
9087
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -9090,17 +9090,17 @@ class qk extends B {
|
|
|
9090
9090
|
blockers: [e],
|
|
9091
9091
|
blocks: []
|
|
9092
9092
|
});
|
|
9093
|
-
} catch (
|
|
9094
|
-
throw this.dispatch(r(d)), this.dispatch(aa(y)), this.dispatch(qa(m)), this.dispatch(_t(o)), this.dispatch(_t(l)), this.dispatch(
|
|
9093
|
+
} catch (v) {
|
|
9094
|
+
throw this.dispatch(r(d)), this.dispatch(aa(y)), this.dispatch(qa(m)), this.dispatch(_t(o)), this.dispatch(_t(l)), this.dispatch(gt(F)), this.dispatch(Ft(P)), v;
|
|
9095
9095
|
}
|
|
9096
9096
|
}
|
|
9097
9097
|
async bulkDelete(e) {
|
|
9098
9098
|
const { store: i } = this.client, { addMany: n, deleteMany: r } = this.actions, { selectByIds: a } = this.selectors, c = i.getState(), d = a(e)(c), o = ES(e)(c), l = vS(e)(c), y = _I(e)(c), m = fn(
|
|
9099
9099
|
EA(e)(c).concat(
|
|
9100
|
-
|
|
9100
|
+
Ut(E(y))(c)
|
|
9101
9101
|
)
|
|
9102
9102
|
);
|
|
9103
|
-
this.dispatch(r(e)), this.dispatch(It(
|
|
9103
|
+
this.dispatch(r(e)), this.dispatch(It(E(o))), this.dispatch(It(E(l))), this.dispatch(Mt(E(m))), this.dispatch(wt(E(y)));
|
|
9104
9104
|
try {
|
|
9105
9105
|
return await this.enqueueRequest({
|
|
9106
9106
|
description: A(u.DELETE, this.name, !0),
|
|
@@ -9111,7 +9111,7 @@ class qk extends B {
|
|
|
9111
9111
|
blocks: []
|
|
9112
9112
|
});
|
|
9113
9113
|
} catch (P) {
|
|
9114
|
-
throw this.dispatch(n(d)), this.dispatch(_t(o)), this.dispatch(_t(l)), this.dispatch(
|
|
9114
|
+
throw this.dispatch(n(d)), this.dispatch(_t(o)), this.dispatch(_t(l)), this.dispatch(gt(m)), this.dispatch(Ft(y)), P;
|
|
9115
9115
|
}
|
|
9116
9116
|
}
|
|
9117
9117
|
async refreshStore(e, i) {
|
|
@@ -9489,7 +9489,7 @@ class Uk extends B {
|
|
|
9489
9489
|
if (!d)
|
|
9490
9490
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
9491
9491
|
const o = eO(e)(c);
|
|
9492
|
-
this.dispatch(n(e)), this.dispatch(ga(
|
|
9492
|
+
this.dispatch(n(e)), this.dispatch(ga(E(o)));
|
|
9493
9493
|
try {
|
|
9494
9494
|
return await this.enqueueRequest({
|
|
9495
9495
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -9752,7 +9752,7 @@ class Hk extends B {
|
|
|
9752
9752
|
if (!d)
|
|
9753
9753
|
throw new Error(`IssueType with uuid ${e} does not exist in the store.`);
|
|
9754
9754
|
const o = NA(e)(c);
|
|
9755
|
-
this.dispatch(n(e)), this.dispatch(fa(
|
|
9755
|
+
this.dispatch(n(e)), this.dispatch(fa(E(o)));
|
|
9756
9756
|
try {
|
|
9757
9757
|
return await this.enqueueRequest({
|
|
9758
9758
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -10489,13 +10489,13 @@ class tB extends B {
|
|
|
10489
10489
|
h(this, "url", "/procedures");
|
|
10490
10490
|
h(this, "actions", {
|
|
10491
10491
|
addOne: dI,
|
|
10492
|
-
addMany:
|
|
10492
|
+
addMany: Ft,
|
|
10493
10493
|
setOne: oI,
|
|
10494
10494
|
setMany: uI,
|
|
10495
10495
|
updateOne: lI,
|
|
10496
10496
|
updateMany: hI,
|
|
10497
10497
|
deleteOne: pI,
|
|
10498
|
-
deleteMany:
|
|
10498
|
+
deleteMany: wt,
|
|
10499
10499
|
initialize: cI
|
|
10500
10500
|
});
|
|
10501
10501
|
h(this, "selectors", {
|
|
@@ -10534,9 +10534,9 @@ class tB extends B {
|
|
|
10534
10534
|
bulkAdd(e, i) {
|
|
10535
10535
|
var F;
|
|
10536
10536
|
const { store: n } = this.client, { addMany: r, updateMany: a, deleteMany: c } = this.actions, d = (/* @__PURE__ */ new Date()).toISOString(), o = ((F = n.getState().userReducer.currentUser) == null ? void 0 : F.id) ?? null, l = [], y = Pt(e, Math.min(i ?? e.length, At)), m = [];
|
|
10537
|
-
for (const
|
|
10537
|
+
for (const v of y) {
|
|
10538
10538
|
const M = [], w = [], k = [];
|
|
10539
|
-
for (const x of
|
|
10539
|
+
for (const x of v) {
|
|
10540
10540
|
const V = O({
|
|
10541
10541
|
...x,
|
|
10542
10542
|
submitted_at: d,
|
|
@@ -10561,8 +10561,8 @@ class tB extends B {
|
|
|
10561
10561
|
m.push(q);
|
|
10562
10562
|
}
|
|
10563
10563
|
this.dispatch(r(l));
|
|
10564
|
-
const P = m.map((
|
|
10565
|
-
const { payload: M, blocks: w, blockers: k } =
|
|
10564
|
+
const P = m.map((v) => {
|
|
10565
|
+
const { payload: M, blocks: w, blockers: k } = v;
|
|
10566
10566
|
return this.enqueueRequest({
|
|
10567
10567
|
description: A(u.POST, this.name, !0),
|
|
10568
10568
|
method: u.POST,
|
|
@@ -10572,11 +10572,11 @@ class tB extends B {
|
|
|
10572
10572
|
blocks: w
|
|
10573
10573
|
});
|
|
10574
10574
|
});
|
|
10575
|
-
return Promise.all(P).then((
|
|
10576
|
-
this.dispatch(a(
|
|
10575
|
+
return Promise.all(P).then((v) => {
|
|
10576
|
+
this.dispatch(a(v.flat()));
|
|
10577
10577
|
}).catch(() => {
|
|
10578
|
-
this.dispatch(c(
|
|
10579
|
-
}), [l, Promise.all(P).then((
|
|
10578
|
+
this.dispatch(c(E(l)));
|
|
10579
|
+
}), [l, Promise.all(P).then((v) => v.flat())];
|
|
10580
10580
|
}
|
|
10581
10581
|
update(e) {
|
|
10582
10582
|
const { store: i } = this.client, { updateOne: n } = this.actions, { selectById: r } = this.selectors, a = r(e.uuid)(i.getState());
|
|
@@ -10606,7 +10606,7 @@ class tB extends B {
|
|
|
10606
10606
|
if (!c)
|
|
10607
10607
|
throw new Error(`Expected procedure with uuid ${e} to exist`);
|
|
10608
10608
|
const d = vA(e)(i.getState());
|
|
10609
|
-
this.dispatch(n(e)), this.dispatch(
|
|
10609
|
+
this.dispatch(n(e)), this.dispatch(Mt(d.map(({ uuid: o }) => o)));
|
|
10610
10610
|
try {
|
|
10611
10611
|
return await this.enqueueRequest({
|
|
10612
10612
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -10616,7 +10616,23 @@ class tB extends B {
|
|
|
10616
10616
|
blocks: []
|
|
10617
10617
|
});
|
|
10618
10618
|
} catch (o) {
|
|
10619
|
-
throw this.dispatch(r(c)), this.dispatch(
|
|
10619
|
+
throw this.dispatch(r(c)), this.dispatch(gt(d)), o;
|
|
10620
|
+
}
|
|
10621
|
+
}
|
|
10622
|
+
async bulkDelete(e) {
|
|
10623
|
+
const { addMany: i, deleteMany: n } = this.actions, { selectByIds: r } = this.selectors, a = this.select(r(e)), c = this.select(Ut(E(a)));
|
|
10624
|
+
this.dispatch(n(E(a))), this.dispatch(Mt(E(c)));
|
|
10625
|
+
try {
|
|
10626
|
+
return await this.enqueueRequest({
|
|
10627
|
+
description: A(u.DELETE, this.name, !0),
|
|
10628
|
+
method: u.DELETE,
|
|
10629
|
+
url: `${this.url}/bulk/`,
|
|
10630
|
+
payload: { uuids: e },
|
|
10631
|
+
blockers: e,
|
|
10632
|
+
blocks: []
|
|
10633
|
+
});
|
|
10634
|
+
} catch (d) {
|
|
10635
|
+
throw this.dispatch(i(a)), this.dispatch(gt(c)), d;
|
|
10620
10636
|
}
|
|
10621
10637
|
}
|
|
10622
10638
|
async refreshStore(e, i) {
|
|
@@ -10696,12 +10712,12 @@ class sB extends B {
|
|
|
10696
10712
|
m.procedure,
|
|
10697
10713
|
m.procedure_step
|
|
10698
10714
|
]),
|
|
10699
|
-
blocks:
|
|
10715
|
+
blocks: E(o)
|
|
10700
10716
|
});
|
|
10701
10717
|
return l.then((m) => {
|
|
10702
10718
|
this.dispatch(r(m));
|
|
10703
10719
|
}).catch(() => {
|
|
10704
|
-
this.dispatch(a(
|
|
10720
|
+
this.dispatch(a(E(o)));
|
|
10705
10721
|
}), [o, l];
|
|
10706
10722
|
}
|
|
10707
10723
|
async delete(e) {
|
|
@@ -11143,7 +11159,7 @@ class dB extends B {
|
|
|
11143
11159
|
if (!d)
|
|
11144
11160
|
throw new Error(`Expected procedure step fields with uuid ${e} to exist`);
|
|
11145
11161
|
const o = Lb(e)(c);
|
|
11146
|
-
this.dispatch(n(e)), this.dispatch(hc(
|
|
11162
|
+
this.dispatch(n(e)), this.dispatch(hc(E(o)));
|
|
11147
11163
|
try {
|
|
11148
11164
|
return await this.enqueueRequest({
|
|
11149
11165
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -11428,7 +11444,7 @@ class lB extends B {
|
|
|
11428
11444
|
if (!d)
|
|
11429
11445
|
throw new Error(`Expected ProcedureStepFieldValues with uuid ${e} to exist`);
|
|
11430
11446
|
const o = mg(e)(c), l = jg(e)(c);
|
|
11431
|
-
this.dispatch(n(e)), this.dispatch(Ac(
|
|
11447
|
+
this.dispatch(n(e)), this.dispatch(Ac(E(o))), this.dispatch(Ic(E(l)));
|
|
11432
11448
|
try {
|
|
11433
11449
|
return await this.enqueueRequest({
|
|
11434
11450
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -11638,8 +11654,8 @@ class pB extends B {
|
|
|
11638
11654
|
const { deleteOne: i, addOne: n } = this.actions, { selectById: r } = this.selectors, a = this.select(r(e));
|
|
11639
11655
|
if (!a)
|
|
11640
11656
|
throw new Error(`Expected ${this.name} with uuid ${e} to exist`);
|
|
11641
|
-
const c = this.select(II(e)), d = this.select(
|
|
11642
|
-
this.dispatch(i(e)), this.dispatch(
|
|
11657
|
+
const c = this.select(II(e)), d = this.select(Ut(E(c)));
|
|
11658
|
+
this.dispatch(i(e)), this.dispatch(wt(E(c))), this.dispatch(Mt(E(d)));
|
|
11643
11659
|
try {
|
|
11644
11660
|
return await this.enqueueRequest({
|
|
11645
11661
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -11649,7 +11665,7 @@ class pB extends B {
|
|
|
11649
11665
|
blocks: []
|
|
11650
11666
|
});
|
|
11651
11667
|
} catch (o) {
|
|
11652
|
-
throw this.dispatch(n(a)), this.dispatch(
|
|
11668
|
+
throw this.dispatch(n(a)), this.dispatch(Ft(c)), this.dispatch(gt(d)), o;
|
|
11653
11669
|
}
|
|
11654
11670
|
}
|
|
11655
11671
|
async refreshStore(e, i) {
|
|
@@ -11733,7 +11749,7 @@ class yB extends B {
|
|
|
11733
11749
|
const { store: i } = this.client, { addOne: n, deleteOne: r } = this.actions, { selectById: a } = this.selectors, c = i.getState(), d = a(e)(c);
|
|
11734
11750
|
if (!d) throw new Error(`No procedure step with uuid ${e} found in the store`);
|
|
11735
11751
|
const o = kA(e)(c);
|
|
11736
|
-
this.dispatch(r(e)), this.dispatch(
|
|
11752
|
+
this.dispatch(r(e)), this.dispatch(Mt(E(o)));
|
|
11737
11753
|
try {
|
|
11738
11754
|
return await this.enqueueRequest({
|
|
11739
11755
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -11743,7 +11759,7 @@ class yB extends B {
|
|
|
11743
11759
|
blocks: []
|
|
11744
11760
|
});
|
|
11745
11761
|
} catch (l) {
|
|
11746
|
-
throw this.dispatch(n(d)), this.dispatch(
|
|
11762
|
+
throw this.dispatch(n(d)), this.dispatch(gt(o)), l;
|
|
11747
11763
|
}
|
|
11748
11764
|
}
|
|
11749
11765
|
async refreshStore(e, i) {
|
|
@@ -12122,7 +12138,7 @@ class PB extends B {
|
|
|
12122
12138
|
if (!d)
|
|
12123
12139
|
throw new Error(`Expected submission with uuid ${e} to exist`);
|
|
12124
12140
|
const o = oF(e)(c);
|
|
12125
|
-
this.dispatch(n(e)), this.dispatch(zc(
|
|
12141
|
+
this.dispatch(n(e)), this.dispatch(zc(E(o)));
|
|
12126
12142
|
try {
|
|
12127
12143
|
return await this.enqueueRequest({
|
|
12128
12144
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -12219,7 +12235,7 @@ class OB extends B {
|
|
|
12219
12235
|
if (!d)
|
|
12220
12236
|
throw new Error(`Expected procedure type with uuid ${e} to exist`);
|
|
12221
12237
|
const o = AI(e)(c);
|
|
12222
|
-
this.dispatch(n(e)), this.dispatch(
|
|
12238
|
+
this.dispatch(n(e)), this.dispatch(wt(E(o)));
|
|
12223
12239
|
try {
|
|
12224
12240
|
return await this.enqueueRequest({
|
|
12225
12241
|
description: A(u.DELETE, this.name, !1),
|
|
@@ -12229,7 +12245,7 @@ class OB extends B {
|
|
|
12229
12245
|
blocks: []
|
|
12230
12246
|
});
|
|
12231
12247
|
} catch (l) {
|
|
12232
|
-
throw this.dispatch(r(d)), this.dispatch(
|
|
12248
|
+
throw this.dispatch(r(d)), this.dispatch(Ft(o)), l;
|
|
12233
12249
|
}
|
|
12234
12250
|
}
|
|
12235
12251
|
async refreshStore(e, i) {
|
|
@@ -12485,7 +12501,7 @@ async function Qc(t, s, e, i, n) {
|
|
|
12485
12501
|
attachmentHash: m,
|
|
12486
12502
|
isExternalUrl: P,
|
|
12487
12503
|
isAuthNeeded: F,
|
|
12488
|
-
isResponseBlob:
|
|
12504
|
+
isResponseBlob: v
|
|
12489
12505
|
} = {
|
|
12490
12506
|
...a,
|
|
12491
12507
|
...s
|
|
@@ -12506,21 +12522,21 @@ async function Qc(t, s, e, i, n) {
|
|
|
12506
12522
|
}
|
|
12507
12523
|
return z.send(d);
|
|
12508
12524
|
}, x = {
|
|
12509
|
-
[u.GET]: () =>
|
|
12525
|
+
[u.GET]: () => v ? vt.get(M.toString()).responseType("blob") : vt.get(M.toString()),
|
|
12510
12526
|
[u.POST]: () => {
|
|
12511
|
-
const z =
|
|
12527
|
+
const z = vt.post(M.toString());
|
|
12512
12528
|
return k(z);
|
|
12513
12529
|
},
|
|
12514
12530
|
[u.PATCH]: () => {
|
|
12515
|
-
const z =
|
|
12531
|
+
const z = vt.patch(M.toString());
|
|
12516
12532
|
return k(z);
|
|
12517
12533
|
},
|
|
12518
12534
|
[u.PUT]: () => {
|
|
12519
|
-
const z =
|
|
12535
|
+
const z = vt.put(M.toString());
|
|
12520
12536
|
return k(z);
|
|
12521
12537
|
},
|
|
12522
12538
|
[u.DELETE]: () => {
|
|
12523
|
-
const z =
|
|
12539
|
+
const z = vt.delete(M.toString());
|
|
12524
12540
|
return k(z);
|
|
12525
12541
|
}
|
|
12526
12542
|
}[l];
|
|
@@ -12789,15 +12805,15 @@ function Dw(t) {
|
|
|
12789
12805
|
function qw() {
|
|
12790
12806
|
return ed;
|
|
12791
12807
|
}
|
|
12792
|
-
let
|
|
12793
|
-
function
|
|
12808
|
+
let is = null;
|
|
12809
|
+
function kt() {
|
|
12794
12810
|
const t = jt();
|
|
12795
12811
|
if (!t)
|
|
12796
12812
|
return console.warn("Client store not set; cannot get outbox coordinator yet."), null;
|
|
12797
|
-
if (
|
|
12798
|
-
return
|
|
12813
|
+
if (is)
|
|
12814
|
+
return is;
|
|
12799
12815
|
const s = t.getState().offline.outbox, e = Dt._fromOutbox(s);
|
|
12800
|
-
return
|
|
12816
|
+
return is = e, e;
|
|
12801
12817
|
}
|
|
12802
12818
|
const gB = (t, s) => {
|
|
12803
12819
|
const e = new s(t);
|
|
@@ -12976,7 +12992,7 @@ export {
|
|
|
12976
12992
|
_B as TeamService,
|
|
12977
12993
|
qt as UNKNOWN_ERROR_MESSAGE,
|
|
12978
12994
|
IB as UserService,
|
|
12979
|
-
|
|
12995
|
+
Nt as VERSION_REDUCER_KEY,
|
|
12980
12996
|
Lw as VerificationCodeType,
|
|
12981
12997
|
KT as _setLatestRetryTime,
|
|
12982
12998
|
Wl as addAsset,
|
|
@@ -13063,7 +13079,7 @@ export {
|
|
|
13063
13079
|
JS as addIssueCommentAttachments,
|
|
13064
13080
|
oA as addIssueComments,
|
|
13065
13081
|
OA as addIssueProcedureStepLink,
|
|
13066
|
-
|
|
13082
|
+
gt as addIssueProcedureStepLinks,
|
|
13067
13083
|
RO as addIssueType,
|
|
13068
13084
|
WA as addIssueTypeAttachment,
|
|
13069
13085
|
KA as addIssueTypeAttachments,
|
|
@@ -13128,7 +13144,7 @@ export {
|
|
|
13128
13144
|
wM as addProcedureTypeFieldsAttachments,
|
|
13129
13145
|
CM as addProcedureTypeFieldsMany,
|
|
13130
13146
|
gF as addProcedureTypes,
|
|
13131
|
-
|
|
13147
|
+
Ft as addProcedures,
|
|
13132
13148
|
x_ as addProject,
|
|
13133
13149
|
ZT as addProjectAccess,
|
|
13134
13150
|
QT as addProjectAccesses,
|
|
@@ -13290,7 +13306,7 @@ export {
|
|
|
13290
13306
|
sA as deleteIssueCommentAttachments,
|
|
13291
13307
|
mA as deleteIssueComments,
|
|
13292
13308
|
gA as deleteIssueProcedureStepLink,
|
|
13293
|
-
|
|
13309
|
+
Mt as deleteIssueProcedureStepLinks,
|
|
13294
13310
|
zO as deleteIssueType,
|
|
13295
13311
|
XA as deleteIssueTypeAttachment,
|
|
13296
13312
|
eP as deleteIssueTypeAttachments,
|
|
@@ -13355,7 +13371,7 @@ export {
|
|
|
13355
13371
|
VM as deleteProcedureTypeFieldsAttachments,
|
|
13356
13372
|
WM as deleteProcedureTypeFieldsMany,
|
|
13357
13373
|
vF as deleteProcedureTypes,
|
|
13358
|
-
|
|
13374
|
+
wt as deleteProcedures,
|
|
13359
13375
|
U_ as deleteProject,
|
|
13360
13376
|
i_ as deleteProjectAccess,
|
|
13361
13377
|
n_ as deleteProjectAccesses,
|
|
@@ -13384,7 +13400,7 @@ export {
|
|
|
13384
13400
|
GT as enqueueRequest,
|
|
13385
13401
|
vw as extractResponseFromError,
|
|
13386
13402
|
S as fallbackToEmptyArray,
|
|
13387
|
-
|
|
13403
|
+
Ht as fallbackToEmptyObject,
|
|
13388
13404
|
Ed as fetchBlobFromObjectUrl,
|
|
13389
13405
|
vd as fetchFileFromObjectUrl,
|
|
13390
13406
|
gm as fileReducer,
|
|
@@ -13414,11 +13430,11 @@ export {
|
|
|
13414
13430
|
Rd as getFileExtension,
|
|
13415
13431
|
gd as getLocalDateString,
|
|
13416
13432
|
mR as getLocalRelativeDateString,
|
|
13417
|
-
|
|
13433
|
+
kt as getOutboxCoordinator,
|
|
13418
13434
|
SR as getRenamedFile,
|
|
13419
13435
|
A as getRequestDescription,
|
|
13420
13436
|
fR as getS3FileKey,
|
|
13421
|
-
|
|
13437
|
+
ts as hashFile,
|
|
13422
13438
|
gB as initSDK,
|
|
13423
13439
|
Ld as initializeAssetAttachments,
|
|
13424
13440
|
Ol as initializeAssetProcedureStepFieldValues,
|
|
@@ -13617,7 +13633,7 @@ export {
|
|
|
13617
13633
|
th as selectAssetById,
|
|
13618
13634
|
_u as selectAssetProcedureById,
|
|
13619
13635
|
Ll as selectAssetProcedureStepById,
|
|
13620
|
-
|
|
13636
|
+
Gt as selectAssetProcedureStepFieldValues,
|
|
13621
13637
|
fl as selectAssetProcedureStepFieldValuesAttachmentById,
|
|
13622
13638
|
Xn as selectAssetProcedureStepFieldValuesAttachments,
|
|
13623
13639
|
Sl as selectAssetProcedureStepFieldValuesAttachmentsByIds,
|
|
@@ -13697,7 +13713,7 @@ export {
|
|
|
13697
13713
|
qp as selectAssetTypeFieldValuesByIds,
|
|
13698
13714
|
zp as selectAssetTypeFieldValuesMapping,
|
|
13699
13715
|
aE as selectAssetTypeFieldValuesOfAsset,
|
|
13700
|
-
|
|
13716
|
+
Wt as selectAssetTypeFields,
|
|
13701
13717
|
Qh as selectAssetTypeFieldsAttachmentById,
|
|
13702
13718
|
mr as selectAssetTypeFieldsAttachments,
|
|
13703
13719
|
Xh as selectAssetTypeFieldsAttachmentsByIds,
|
|
@@ -13820,7 +13836,7 @@ export {
|
|
|
13820
13836
|
fE as selectIsLoggedIn,
|
|
13821
13837
|
FS as selectIssueAssociationById,
|
|
13822
13838
|
MS as selectIssueAssociationMapping,
|
|
13823
|
-
|
|
13839
|
+
Rt as selectIssueAssociations,
|
|
13824
13840
|
wS as selectIssueAssociationsByIds,
|
|
13825
13841
|
BS as selectIssueAssociationsOfAsset,
|
|
13826
13842
|
VS as selectIssueAssociationsOfAssets,
|
|
@@ -13851,7 +13867,7 @@ export {
|
|
|
13851
13867
|
BE as selectIssueProcedureStepLinksOfProcedureAndProcedureStep,
|
|
13852
13868
|
kA as selectIssueProcedureStepLinksOfProcedureStep,
|
|
13853
13869
|
kE as selectIssueProcedureStepLinksOfProcedureSteps,
|
|
13854
|
-
|
|
13870
|
+
Ut as selectIssueProcedureStepLinksOfProcedures,
|
|
13855
13871
|
sP as selectIssueTypeAttachmentById,
|
|
13856
13872
|
tP as selectIssueTypeAttachmentMapping,
|
|
13857
13873
|
Aa as selectIssueTypeAttachments,
|
|
@@ -13866,7 +13882,7 @@ export {
|
|
|
13866
13882
|
RP as selectIssueTypeFieldValuesByIds,
|
|
13867
13883
|
FP as selectIssueTypeFieldValuesMapping,
|
|
13868
13884
|
qE as selectIssueTypeFieldValuesOfIssue,
|
|
13869
|
-
|
|
13885
|
+
Kt as selectIssueTypeFields,
|
|
13870
13886
|
mP as selectIssueTypeFieldsAttachmentById,
|
|
13871
13887
|
Oa as selectIssueTypeFieldsAttachments,
|
|
13872
13888
|
fP as selectIssueTypeFieldsAttachmentsByIds,
|
|
@@ -13943,7 +13959,7 @@ export {
|
|
|
13943
13959
|
av as selectProcedureInitiativesOfProcedureType,
|
|
13944
13960
|
rv as selectProcedureInitiativesOfProject,
|
|
13945
13961
|
VI as selectProcedureStepAssigneeById,
|
|
13946
|
-
|
|
13962
|
+
Jt as selectProcedureStepAssignees,
|
|
13947
13963
|
zI as selectProcedureStepAssigneesByIds,
|
|
13948
13964
|
BI as selectProcedureStepAssigneesMapping,
|
|
13949
13965
|
dv as selectProcedureStepAssigneesOfProcedure,
|
|
@@ -13951,7 +13967,7 @@ export {
|
|
|
13951
13967
|
ov as selectProcedureStepAssigneesOfProcedureStep,
|
|
13952
13968
|
lM as selectProcedureStepById,
|
|
13953
13969
|
WI as selectProcedureStepCommentById,
|
|
13954
|
-
|
|
13970
|
+
Zt as selectProcedureStepComments,
|
|
13955
13971
|
KI as selectProcedureStepCommentsByIds,
|
|
13956
13972
|
GI as selectProcedureStepCommentsMapping,
|
|
13957
13973
|
lv as selectProcedureStepCommentsOfProcedure,
|
|
@@ -13968,7 +13984,7 @@ export {
|
|
|
13968
13984
|
Ab as selectProcedureStepDefaultReviewersMapping,
|
|
13969
13985
|
mv as selectProcedureStepDefaultReviewersOfProcedureStep,
|
|
13970
13986
|
kb as selectProcedureStepEventById,
|
|
13971
|
-
|
|
13987
|
+
Qt as selectProcedureStepEvents,
|
|
13972
13988
|
Bb as selectProcedureStepEventsByIds,
|
|
13973
13989
|
vb as selectProcedureStepEventsMapping,
|
|
13974
13990
|
fv as selectProcedureStepEventsOfProcedure,
|
|
@@ -14000,7 +14016,7 @@ export {
|
|
|
14000
14016
|
mc as selectProcedureStepFieldsMapping,
|
|
14001
14017
|
Pv as selectProcedureStepFieldsOfProcedureStep,
|
|
14002
14018
|
Qg as selectProcedureStepReviewerById,
|
|
14003
|
-
|
|
14019
|
+
Xt as selectProcedureStepReviewers,
|
|
14004
14020
|
Xg as selectProcedureStepReviewersByIds,
|
|
14005
14021
|
Zg as selectProcedureStepReviewersMapping,
|
|
14006
14022
|
wv as selectProcedureStepReviewersOfProcedure,
|
|
@@ -14041,7 +14057,7 @@ export {
|
|
|
14041
14057
|
cv as selectProceduresOfProject,
|
|
14042
14058
|
a_ as selectProjectAccessById,
|
|
14043
14059
|
Ja as selectProjectAccessMapping,
|
|
14044
|
-
|
|
14060
|
+
Yt as selectProjectAccesses,
|
|
14045
14061
|
c_ as selectProjectAccessesByIds,
|
|
14046
14062
|
XE as selectProjectAccessesOfProject,
|
|
14047
14063
|
A_ as selectProjectAttachmentById,
|
|
@@ -14258,7 +14274,7 @@ export {
|
|
|
14258
14274
|
ow as teamReducer,
|
|
14259
14275
|
Lc as teamSlice,
|
|
14260
14276
|
_R as toFileNameSafeString,
|
|
14261
|
-
|
|
14277
|
+
E as toUuidArray,
|
|
14262
14278
|
TR as toUuidIdRecord,
|
|
14263
14279
|
gR as truncate,
|
|
14264
14280
|
Kl as updateAsset,
|