@overmap-ai/core 1.0.65-asset-models-improvements.1 → 1.0.65-asset-models-improvements.3
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/enums/access.d.ts +8 -0
- package/dist/enums/attachments.d.ts +7 -0
- package/dist/enums/index.d.ts +3 -0
- package/dist/enums/issue.d.ts +9 -0
- package/dist/enums/licenses.d.ts +14 -0
- package/dist/overmap-core.js +205 -245
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +202 -242
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +1 -1
- package/dist/sdk/globals.d.ts +2 -2
- package/dist/sdk/sdk.d.ts +3 -3
- package/dist/sdk/services/AgentService.d.ts +1 -1
- package/dist/sdk/services/AssetAttachmentService.d.ts +3 -2
- package/dist/sdk/services/AssetService.d.ts +2 -2
- package/dist/sdk/services/AssetStageCompletionService.d.ts +2 -2
- package/dist/sdk/services/AssetStageService.d.ts +1 -1
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +3 -2
- package/dist/sdk/services/AssetTypeService.d.ts +2 -2
- package/dist/sdk/services/BaseApiService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +3 -2
- package/dist/sdk/services/BaseAuthService.d.ts +1 -1
- package/dist/sdk/services/BaseService.d.ts +2 -2
- package/dist/sdk/services/BaseUploadService.d.ts +2 -2
- package/dist/sdk/services/CategoryService.d.ts +2 -2
- package/dist/sdk/services/DocumentAttachmentService.d.ts +3 -2
- package/dist/sdk/services/DocumentService.d.ts +2 -2
- package/dist/sdk/services/EmailDomainsService.d.ts +1 -1
- package/dist/sdk/services/EmailVerificationService.d.ts +1 -1
- package/dist/sdk/services/FileService.d.ts +1 -1
- package/dist/sdk/services/FormService.d.ts +1 -2
- package/dist/sdk/services/FormSubmissionService.d.ts +2 -3
- package/dist/sdk/services/GeoImageService.d.ts +2 -2
- package/dist/sdk/services/IssueAttachmentService.d.ts +3 -2
- package/dist/sdk/services/IssueCommentService.d.ts +2 -2
- package/dist/sdk/services/IssueService.d.ts +2 -2
- package/dist/sdk/services/IssueTypeService.d.ts +2 -2
- package/dist/sdk/services/IssueUpdateService.d.ts +1 -1
- package/dist/sdk/services/JWTAuthService.d.ts +2 -2
- package/dist/sdk/services/LicenseService.d.ts +1 -1
- package/dist/sdk/services/OrganizationAccessService.d.ts +1 -1
- package/dist/sdk/services/OrganizationService.d.ts +1 -1
- package/dist/sdk/services/ProjectAccessService.d.ts +1 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +3 -2
- package/dist/sdk/services/ProjectFileService.d.ts +2 -3
- package/dist/sdk/services/ProjectService.d.ts +1 -2
- package/dist/sdk/services/TeamService.d.ts +2 -2
- package/dist/sdk/services/UserService.d.ts +2 -2
- package/dist/sdk/services/WorkspaceService.d.ts +2 -4
- package/dist/store/slices/assetStageCompletionSlice.d.ts +1 -1
- package/dist/store/slices/assetStageSlice.d.ts +0 -1
- package/dist/typings/models/access.d.ts +2 -9
- package/dist/typings/models/agents.d.ts +1 -1
- package/dist/typings/models/assets.d.ts +2 -2
- package/dist/typings/models/attachments.d.ts +2 -9
- package/dist/typings/models/base.d.ts +2 -2
- package/dist/typings/models/categories.d.ts +2 -2
- package/dist/typings/models/documents.d.ts +1 -1
- package/dist/typings/models/emailDomain.d.ts +1 -1
- package/dist/typings/models/emailVerification.d.ts +2 -2
- package/dist/typings/models/forms.d.ts +2 -2
- package/dist/typings/models/geoImages.d.ts +3 -3
- package/dist/typings/models/issueTypes.d.ts +2 -2
- package/dist/typings/models/issues.d.ts +1 -10
- package/dist/typings/models/license.d.ts +2 -15
- package/dist/typings/models/organizations.d.ts +1 -1
- package/dist/typings/models/projects.d.ts +3 -3
- package/dist/typings/models/store.d.ts +1 -1
- package/dist/typings/models/teams.d.ts +3 -3
- package/dist/typings/models/users.d.ts +1 -1
- package/dist/typings/models/workspace.d.ts +1 -1
- package/dist/typings/store.d.ts +1 -1
- package/dist/utils/colors.d.ts +0 -2
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
(function(global, factory) {
|
|
8
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("dependency-graph"), require("uuid"), require("
|
|
9
|
-
})(this, function(exports2, dependencyGraph, uuid,
|
|
8
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("dependency-graph"), require("uuid"), require("file-saver"), require("react"), require("color"), require("@radix-ui/colors"), require("@redux-offline/redux-offline"), require("@redux-offline/redux-offline/lib/defaults"), require("localforage"), require("redux-persist-migrate"), require("@reduxjs/toolkit"), require("superagent"), require("@redux-offline/redux-offline/lib/constants"), require("jwt-decode"), require("idb"), require("@overmap-ai/blocks")) : typeof define === "function" && define.amd ? define(["exports", "dependency-graph", "uuid", "file-saver", "react", "color", "@radix-ui/colors", "@redux-offline/redux-offline", "@redux-offline/redux-offline/lib/defaults", "localforage", "redux-persist-migrate", "@reduxjs/toolkit", "superagent", "@redux-offline/redux-offline/lib/constants", "jwt-decode", "idb", "@overmap-ai/blocks"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["overmap-core"] = {}, global.dependencyGraph, global.uuid, global.fileSaver, global.React, global.ColorCls, global.colors, global.reduxOffline, global.offlineConfig, global.localforage, global.createMigration, global.toolkit, global.request, global.constants, global.jwtDecode, global.idb, global.blocks));
|
|
9
|
+
})(this, function(exports2, dependencyGraph, uuid, fileSaver, React, ColorCls, colors, reduxOffline, offlineConfig, localforage, createMigration, toolkit, request, constants, jwtDecode, idb, blocks) {
|
|
10
10
|
var _a;
|
|
11
11
|
"use strict";
|
|
12
12
|
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
@@ -17,6 +17,14 @@ var __publicField = (obj, key, value) => {
|
|
|
17
17
|
HttpMethod2["DELETE"] = "DELETE";
|
|
18
18
|
return HttpMethod2;
|
|
19
19
|
})(HttpMethod || {});
|
|
20
|
+
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
21
|
+
AttachmentModel2["Issue"] = "issue";
|
|
22
|
+
AttachmentModel2["Asset"] = "asset";
|
|
23
|
+
AttachmentModel2["AssetType"] = "asset_type";
|
|
24
|
+
AttachmentModel2["Project"] = "project";
|
|
25
|
+
AttachmentModel2["Document"] = "document";
|
|
26
|
+
return AttachmentModel2;
|
|
27
|
+
})(AttachmentModel || {});
|
|
20
28
|
var IssuePriority = /* @__PURE__ */ ((IssuePriority2) => {
|
|
21
29
|
IssuePriority2[IssuePriority2["LOWEST"] = 0] = "LOWEST";
|
|
22
30
|
IssuePriority2[IssuePriority2["LOW"] = 2] = "LOW";
|
|
@@ -31,6 +39,43 @@ var __publicField = (obj, key, value) => {
|
|
|
31
39
|
IssueStatus2[IssueStatus2["DONE"] = 4] = "DONE";
|
|
32
40
|
return IssueStatus2;
|
|
33
41
|
})(IssueStatus || {});
|
|
42
|
+
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
43
|
+
IssueUpdateChange2["STATUS"] = "status";
|
|
44
|
+
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
45
|
+
IssueUpdateChange2["CATEGORY"] = "category";
|
|
46
|
+
IssueUpdateChange2["DESCRIPTION"] = "description";
|
|
47
|
+
IssueUpdateChange2["TITLE"] = "title";
|
|
48
|
+
IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
|
|
49
|
+
IssueUpdateChange2["DUE_DATE"] = "due_date";
|
|
50
|
+
return IssueUpdateChange2;
|
|
51
|
+
})(IssueUpdateChange || {});
|
|
52
|
+
var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
|
|
53
|
+
ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
54
|
+
ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
55
|
+
return ProjectAccessLevel2;
|
|
56
|
+
})(ProjectAccessLevel || {});
|
|
57
|
+
var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
58
|
+
OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
59
|
+
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
60
|
+
return OrganizationAccessLevel2;
|
|
61
|
+
})(OrganizationAccessLevel || {});
|
|
62
|
+
var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
|
|
63
|
+
PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
|
|
64
|
+
PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
|
|
65
|
+
return PaddleCheckoutEvent2;
|
|
66
|
+
})(PaddleCheckoutEvent || {});
|
|
67
|
+
var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
68
|
+
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
69
|
+
return LicenseLevel2;
|
|
70
|
+
})(LicenseLevel || {});
|
|
71
|
+
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
72
|
+
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
73
|
+
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
74
|
+
LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
|
|
75
|
+
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
76
|
+
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
77
|
+
return LicenseStatus2;
|
|
78
|
+
})(LicenseStatus || {});
|
|
34
79
|
class OutboxCoordinator {
|
|
35
80
|
constructor() {
|
|
36
81
|
__publicField(this, "graph");
|
|
@@ -273,130 +318,6 @@ var __publicField = (obj, key, value) => {
|
|
|
273
318
|
this.options = options;
|
|
274
319
|
}
|
|
275
320
|
}
|
|
276
|
-
class DeferredPromise {
|
|
277
|
-
constructor() {
|
|
278
|
-
__publicField(this, _a, "Promise");
|
|
279
|
-
__publicField(this, "_promise");
|
|
280
|
-
__publicField(this, "_resolve");
|
|
281
|
-
__publicField(this, "_reject");
|
|
282
|
-
__publicField(this, "_state", "pending");
|
|
283
|
-
this._resolve = null;
|
|
284
|
-
this._reject = null;
|
|
285
|
-
this._promise = new Promise((resolve, reject) => {
|
|
286
|
-
this._resolve = resolve;
|
|
287
|
-
this._reject = reject;
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
get state() {
|
|
291
|
-
return this._state;
|
|
292
|
-
}
|
|
293
|
-
then(onFulfilled, onRejected) {
|
|
294
|
-
return this._promise.then(onFulfilled, onRejected);
|
|
295
|
-
}
|
|
296
|
-
catch(onRejected) {
|
|
297
|
-
return this._promise.catch(onRejected);
|
|
298
|
-
}
|
|
299
|
-
resolve(value) {
|
|
300
|
-
if (!this._resolve)
|
|
301
|
-
throw new Error("No resolve callback");
|
|
302
|
-
this._resolve(value);
|
|
303
|
-
this._state = "fulfilled";
|
|
304
|
-
}
|
|
305
|
-
reject(reason) {
|
|
306
|
-
if (!this._reject)
|
|
307
|
-
throw reason;
|
|
308
|
-
this._reject(reason);
|
|
309
|
-
this._state = "rejected";
|
|
310
|
-
}
|
|
311
|
-
finally(_onFinally) {
|
|
312
|
-
throw new Error("`finally` not implemented");
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
_a = Symbol.toStringTag;
|
|
316
|
-
var randomString = function randomString2() {
|
|
317
|
-
return Math.random().toString(36).substring(7).split("").join(".");
|
|
318
|
-
};
|
|
319
|
-
({
|
|
320
|
-
INIT: "@@redux/INIT" + randomString(),
|
|
321
|
-
REPLACE: "@@redux/REPLACE" + randomString(),
|
|
322
|
-
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
|
323
|
-
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
function compose() {
|
|
327
|
-
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
328
|
-
funcs[_key] = arguments[_key];
|
|
329
|
-
}
|
|
330
|
-
if (funcs.length === 0) {
|
|
331
|
-
return function(arg) {
|
|
332
|
-
return arg;
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
if (funcs.length === 1) {
|
|
336
|
-
return funcs[0];
|
|
337
|
-
}
|
|
338
|
-
return funcs.reduce(function(a, b) {
|
|
339
|
-
return function() {
|
|
340
|
-
return a(b.apply(void 0, arguments));
|
|
341
|
-
};
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
const VERSION_REDUCER_KEY$1 = "versioning";
|
|
345
|
-
const latestVersion = () => migrations.length - 1;
|
|
346
|
-
const initialVersioning = (state) => {
|
|
347
|
-
state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
|
|
348
|
-
return state;
|
|
349
|
-
};
|
|
350
|
-
const signOut = () => {
|
|
351
|
-
return initialVersioning({});
|
|
352
|
-
};
|
|
353
|
-
const createOutboxState = (state) => {
|
|
354
|
-
if (state.outboxReducer) {
|
|
355
|
-
state.outboxReducer.deletedRequests = [];
|
|
356
|
-
}
|
|
357
|
-
return state;
|
|
358
|
-
};
|
|
359
|
-
const wrapMigration = (migrator) => (state) => {
|
|
360
|
-
var _a2;
|
|
361
|
-
if (state === void 0) {
|
|
362
|
-
state = {};
|
|
363
|
-
}
|
|
364
|
-
if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
|
|
365
|
-
return state;
|
|
366
|
-
return migrator(state);
|
|
367
|
-
};
|
|
368
|
-
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
369
|
-
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
370
|
-
const initialState$B = {
|
|
371
|
-
accessToken: "",
|
|
372
|
-
refreshToken: "",
|
|
373
|
-
isLoggedIn: false
|
|
374
|
-
};
|
|
375
|
-
const authSlice = toolkit.createSlice({
|
|
376
|
-
name: "auth",
|
|
377
|
-
initialState: initialState$B,
|
|
378
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
379
|
-
reducers: {
|
|
380
|
-
setTokens: (state, action) => {
|
|
381
|
-
state.accessToken = action.payload.accessToken;
|
|
382
|
-
state.refreshToken = action.payload.refreshToken;
|
|
383
|
-
},
|
|
384
|
-
clearTokens: (state) => {
|
|
385
|
-
state.accessToken = "";
|
|
386
|
-
state.refreshToken = "";
|
|
387
|
-
},
|
|
388
|
-
setLoggedIn: (state, action) => {
|
|
389
|
-
if (!action.payload) {
|
|
390
|
-
authSlice.caseReducers.clearTokens(state);
|
|
391
|
-
}
|
|
392
|
-
state.isLoggedIn = action.payload;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
|
|
397
|
-
const selectAccessToken = (state) => state.authReducer.accessToken;
|
|
398
|
-
const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
|
|
399
|
-
const authReducer = authSlice.reducer;
|
|
400
321
|
const coordinatesToLiteral = (coordinates) => {
|
|
401
322
|
return { lng: coordinates[0], lat: coordinates[1] };
|
|
402
323
|
};
|
|
@@ -741,19 +662,6 @@ var __publicField = (obj, key, value) => {
|
|
|
741
662
|
mint: colors.mint.mint9,
|
|
742
663
|
sky: colors.sky.sky9
|
|
743
664
|
};
|
|
744
|
-
const AssetStageColors = {
|
|
745
|
-
indigo: colors.indigo.indigo9,
|
|
746
|
-
red: colors.red.red9,
|
|
747
|
-
violet: colors.violet.violet9,
|
|
748
|
-
yellow: colors.yellow.yellow9,
|
|
749
|
-
jade: colors.jade.jade9,
|
|
750
|
-
cyan: colors.cyan.cyan9,
|
|
751
|
-
gold: colors.gold.gold9,
|
|
752
|
-
orange: colors.orange.orange9,
|
|
753
|
-
lime: colors.lime.lime9,
|
|
754
|
-
sky: colors.sky.sky9,
|
|
755
|
-
pink: colors.pink.pink9
|
|
756
|
-
};
|
|
757
665
|
const defaultBadgeColor = "#868686";
|
|
758
666
|
const generateBadgeColors = (rawColor) => {
|
|
759
667
|
const color = ColorCls(rawColor);
|
|
@@ -762,9 +670,6 @@ var __publicField = (obj, key, value) => {
|
|
|
762
670
|
const textColor = color.hex() === safety.hex() ? "#000000" : "#FFFFFF";
|
|
763
671
|
return { backgroundColor, textColor };
|
|
764
672
|
};
|
|
765
|
-
function getStageColor(index) {
|
|
766
|
-
return Object.values(AssetStageColors)[index % Object.keys(AssetStageColors).length];
|
|
767
|
-
}
|
|
768
673
|
const getLocalDateString = memoize((date) => {
|
|
769
674
|
if (!date)
|
|
770
675
|
return "";
|
|
@@ -787,6 +692,130 @@ var __publicField = (obj, key, value) => {
|
|
|
787
692
|
return getLocalDateString(date);
|
|
788
693
|
return relative.format(days, "days");
|
|
789
694
|
});
|
|
695
|
+
class DeferredPromise {
|
|
696
|
+
constructor() {
|
|
697
|
+
__publicField(this, _a, "Promise");
|
|
698
|
+
__publicField(this, "_promise");
|
|
699
|
+
__publicField(this, "_resolve");
|
|
700
|
+
__publicField(this, "_reject");
|
|
701
|
+
__publicField(this, "_state", "pending");
|
|
702
|
+
this._resolve = null;
|
|
703
|
+
this._reject = null;
|
|
704
|
+
this._promise = new Promise((resolve, reject) => {
|
|
705
|
+
this._resolve = resolve;
|
|
706
|
+
this._reject = reject;
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
get state() {
|
|
710
|
+
return this._state;
|
|
711
|
+
}
|
|
712
|
+
then(onFulfilled, onRejected) {
|
|
713
|
+
return this._promise.then(onFulfilled, onRejected);
|
|
714
|
+
}
|
|
715
|
+
catch(onRejected) {
|
|
716
|
+
return this._promise.catch(onRejected);
|
|
717
|
+
}
|
|
718
|
+
resolve(value) {
|
|
719
|
+
if (!this._resolve)
|
|
720
|
+
throw new Error("No resolve callback");
|
|
721
|
+
this._resolve(value);
|
|
722
|
+
this._state = "fulfilled";
|
|
723
|
+
}
|
|
724
|
+
reject(reason) {
|
|
725
|
+
if (!this._reject)
|
|
726
|
+
throw reason;
|
|
727
|
+
this._reject(reason);
|
|
728
|
+
this._state = "rejected";
|
|
729
|
+
}
|
|
730
|
+
finally(_onFinally) {
|
|
731
|
+
throw new Error("`finally` not implemented");
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
_a = Symbol.toStringTag;
|
|
735
|
+
var randomString = function randomString2() {
|
|
736
|
+
return Math.random().toString(36).substring(7).split("").join(".");
|
|
737
|
+
};
|
|
738
|
+
({
|
|
739
|
+
INIT: "@@redux/INIT" + randomString(),
|
|
740
|
+
REPLACE: "@@redux/REPLACE" + randomString(),
|
|
741
|
+
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
|
742
|
+
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
function compose() {
|
|
746
|
+
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
747
|
+
funcs[_key] = arguments[_key];
|
|
748
|
+
}
|
|
749
|
+
if (funcs.length === 0) {
|
|
750
|
+
return function(arg) {
|
|
751
|
+
return arg;
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
if (funcs.length === 1) {
|
|
755
|
+
return funcs[0];
|
|
756
|
+
}
|
|
757
|
+
return funcs.reduce(function(a, b) {
|
|
758
|
+
return function() {
|
|
759
|
+
return a(b.apply(void 0, arguments));
|
|
760
|
+
};
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
const VERSION_REDUCER_KEY$1 = "versioning";
|
|
764
|
+
const latestVersion = () => migrations.length - 1;
|
|
765
|
+
const initialVersioning = (state) => {
|
|
766
|
+
state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
|
|
767
|
+
return state;
|
|
768
|
+
};
|
|
769
|
+
const signOut = () => {
|
|
770
|
+
return initialVersioning({});
|
|
771
|
+
};
|
|
772
|
+
const createOutboxState = (state) => {
|
|
773
|
+
if (state.outboxReducer) {
|
|
774
|
+
state.outboxReducer.deletedRequests = [];
|
|
775
|
+
}
|
|
776
|
+
return state;
|
|
777
|
+
};
|
|
778
|
+
const wrapMigration = (migrator) => (state) => {
|
|
779
|
+
var _a2;
|
|
780
|
+
if (state === void 0) {
|
|
781
|
+
state = {};
|
|
782
|
+
}
|
|
783
|
+
if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
|
|
784
|
+
return state;
|
|
785
|
+
return migrator(state);
|
|
786
|
+
};
|
|
787
|
+
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
788
|
+
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
789
|
+
const initialState$B = {
|
|
790
|
+
accessToken: "",
|
|
791
|
+
refreshToken: "",
|
|
792
|
+
isLoggedIn: false
|
|
793
|
+
};
|
|
794
|
+
const authSlice = toolkit.createSlice({
|
|
795
|
+
name: "auth",
|
|
796
|
+
initialState: initialState$B,
|
|
797
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
798
|
+
reducers: {
|
|
799
|
+
setTokens: (state, action) => {
|
|
800
|
+
state.accessToken = action.payload.accessToken;
|
|
801
|
+
state.refreshToken = action.payload.refreshToken;
|
|
802
|
+
},
|
|
803
|
+
clearTokens: (state) => {
|
|
804
|
+
state.accessToken = "";
|
|
805
|
+
state.refreshToken = "";
|
|
806
|
+
},
|
|
807
|
+
setLoggedIn: (state, action) => {
|
|
808
|
+
if (!action.payload) {
|
|
809
|
+
authSlice.caseReducers.clearTokens(state);
|
|
810
|
+
}
|
|
811
|
+
state.isLoggedIn = action.payload;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
|
|
816
|
+
const selectAccessToken = (state) => state.authReducer.accessToken;
|
|
817
|
+
const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
|
|
818
|
+
const authReducer = authSlice.reducer;
|
|
790
819
|
function createModelAdapter(computeModelId) {
|
|
791
820
|
const addOne = (state, action) => {
|
|
792
821
|
const id = computeModelId(action.payload);
|
|
@@ -1046,30 +1075,36 @@ var __publicField = (obj, key, value) => {
|
|
|
1046
1075
|
deleteAssetStageCompletion,
|
|
1047
1076
|
deleteAssetStageCompletions
|
|
1048
1077
|
} = assetStageCompletionSlice.actions;
|
|
1049
|
-
const
|
|
1078
|
+
const selectAssetStageCompletionMapping = (state) => {
|
|
1050
1079
|
return state.assetStageCompletionReducer.instances;
|
|
1051
1080
|
};
|
|
1052
|
-
const selectCompletedStagesByAsset = toolkit.createSelector(
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1081
|
+
const selectCompletedStagesByAsset = toolkit.createSelector(
|
|
1082
|
+
[selectAssetStageCompletionMapping],
|
|
1083
|
+
(completedStagesMapping) => {
|
|
1084
|
+
const completedStagesByAsset = {};
|
|
1085
|
+
for (const stageCompletion of Object.values(completedStagesMapping)) {
|
|
1086
|
+
const { asset, stage, submitted_at } = stageCompletion;
|
|
1087
|
+
if (!completedStagesByAsset[asset])
|
|
1088
|
+
completedStagesByAsset[asset] = {};
|
|
1089
|
+
completedStagesByAsset[asset][stage] = submitted_at;
|
|
1090
|
+
}
|
|
1091
|
+
return completedStagesByAsset;
|
|
1092
|
+
}
|
|
1093
|
+
);
|
|
1062
1094
|
const selectCompletedStageIdsForAsset = restructureCreateSelectorWithArgs(
|
|
1063
|
-
toolkit.createSelector(
|
|
1064
|
-
|
|
1065
|
-
|
|
1095
|
+
toolkit.createSelector(
|
|
1096
|
+
[selectAssetStageCompletionMapping, (_state, asset) => asset],
|
|
1097
|
+
(completedStages, asset) => {
|
|
1098
|
+
return Object.keys(completedStages[asset.offline_id] ?? {});
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1066
1101
|
);
|
|
1067
1102
|
const selectAssetStageCompletionById = (id) => (state) => {
|
|
1068
1103
|
return state.assetStageCompletionReducer.instances[id];
|
|
1069
1104
|
};
|
|
1070
1105
|
const selectAssetStageCompletionsByIds = restructureCreateSelectorWithArgs(
|
|
1071
1106
|
toolkit.createSelector(
|
|
1072
|
-
[
|
|
1107
|
+
[selectAssetStageCompletionMapping, (_, stageCompletionIds) => stageCompletionIds],
|
|
1073
1108
|
(stageCompletionMapping, stageCompletionIds) => {
|
|
1074
1109
|
const stageCompletionIdsSet = new Set(stageCompletionIds);
|
|
1075
1110
|
return fallbackToEmptyArray(
|
|
@@ -1118,24 +1153,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1118
1153
|
const selectAssetStages = toolkit.createSelector([selectStageMapping], (stageMapping) => {
|
|
1119
1154
|
return Object.values(stageMapping);
|
|
1120
1155
|
});
|
|
1121
|
-
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1122
|
-
toolkit.createSelector([selectAssetStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1123
|
-
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
1124
|
-
const ret = {};
|
|
1125
|
-
for (const stage of stages) {
|
|
1126
|
-
if (assetTypeIdsSet.has(stage.asset_type)) {
|
|
1127
|
-
if (!ret[stage.asset_type]) {
|
|
1128
|
-
ret[stage.asset_type] = [];
|
|
1129
|
-
}
|
|
1130
|
-
ret[stage.asset_type].push(stage);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
for (const key in ret) {
|
|
1134
|
-
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
1135
|
-
}
|
|
1136
|
-
return ret;
|
|
1137
|
-
})
|
|
1138
|
-
);
|
|
1139
1156
|
const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
|
|
1140
1157
|
toolkit.createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
|
|
1141
1158
|
const assetTypeStagesMapping = {};
|
|
@@ -1599,60 +1616,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1599
1616
|
return url;
|
|
1600
1617
|
};
|
|
1601
1618
|
const fileReducer = fileSlice.reducer;
|
|
1602
|
-
var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
|
|
1603
|
-
ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1604
|
-
ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1605
|
-
return ProjectAccessLevel2;
|
|
1606
|
-
})(ProjectAccessLevel || {});
|
|
1607
|
-
var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
1608
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1609
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1610
|
-
return OrganizationAccessLevel2;
|
|
1611
|
-
})(OrganizationAccessLevel || {});
|
|
1612
|
-
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
1613
|
-
AttachmentModel2["Issue"] = "issue";
|
|
1614
|
-
AttachmentModel2["Asset"] = "asset";
|
|
1615
|
-
AttachmentModel2["AssetType"] = "asset_type";
|
|
1616
|
-
AttachmentModel2["Project"] = "project";
|
|
1617
|
-
AttachmentModel2["Document"] = "document";
|
|
1618
|
-
return AttachmentModel2;
|
|
1619
|
-
})(AttachmentModel || {});
|
|
1620
|
-
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
1621
|
-
IssueUpdateChange2["STATUS"] = "status";
|
|
1622
|
-
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
1623
|
-
IssueUpdateChange2["CATEGORY"] = "category";
|
|
1624
|
-
IssueUpdateChange2["DESCRIPTION"] = "description";
|
|
1625
|
-
IssueUpdateChange2["TITLE"] = "title";
|
|
1626
|
-
IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
|
|
1627
|
-
IssueUpdateChange2["DUE_DATE"] = "due_date";
|
|
1628
|
-
return IssueUpdateChange2;
|
|
1629
|
-
})(IssueUpdateChange || {});
|
|
1630
|
-
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
1631
|
-
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
1632
|
-
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
1633
|
-
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
1634
|
-
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
1635
|
-
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
1636
|
-
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
1637
|
-
return VerificationCodeType2;
|
|
1638
|
-
})(VerificationCodeType || {});
|
|
1639
|
-
var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
|
|
1640
|
-
PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
|
|
1641
|
-
PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
|
|
1642
|
-
return PaddleCheckoutEvent2;
|
|
1643
|
-
})(PaddleCheckoutEvent || {});
|
|
1644
|
-
var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
1645
|
-
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
1646
|
-
return LicenseLevel2;
|
|
1647
|
-
})(LicenseLevel || {});
|
|
1648
|
-
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
1649
|
-
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
1650
|
-
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
1651
|
-
LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
|
|
1652
|
-
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
1653
|
-
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1654
|
-
return LicenseStatus2;
|
|
1655
|
-
})(LicenseStatus || {});
|
|
1656
1619
|
const initialState$p = {
|
|
1657
1620
|
users: {},
|
|
1658
1621
|
currentUser: {
|
|
@@ -5107,15 +5070,6 @@ var __publicField = (obj, key, value) => {
|
|
|
5107
5070
|
void promise.then((result) => {
|
|
5108
5071
|
this.dispatch(updateIssue(result));
|
|
5109
5072
|
}).catch((error) => {
|
|
5110
|
-
var _a2;
|
|
5111
|
-
console.error(error);
|
|
5112
|
-
if (error instanceof APIError) {
|
|
5113
|
-
(_a2 = blocks.unsafeShowToast) == null ? void 0 : _a2.call(blocks, {
|
|
5114
|
-
title: "Could not create issue",
|
|
5115
|
-
description: error.message,
|
|
5116
|
-
accentColor: "red"
|
|
5117
|
-
});
|
|
5118
|
-
}
|
|
5119
5073
|
this.dispatch(deleteIssue(issuePayload.offline_id));
|
|
5120
5074
|
this.dispatch(addActiveProjectIssuesCount(-1));
|
|
5121
5075
|
throw error;
|
|
@@ -7671,11 +7625,19 @@ var __publicField = (obj, key, value) => {
|
|
|
7671
7625
|
this.dispatch(initializeIssueAssociations(issueAssociations));
|
|
7672
7626
|
}
|
|
7673
7627
|
}
|
|
7628
|
+
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
7629
|
+
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
7630
|
+
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
7631
|
+
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
7632
|
+
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
7633
|
+
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
7634
|
+
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
7635
|
+
return VerificationCodeType2;
|
|
7636
|
+
})(VerificationCodeType || {});
|
|
7674
7637
|
exports2.APIError = APIError;
|
|
7675
7638
|
exports2.AgentService = AgentService;
|
|
7676
7639
|
exports2.AssetAttachmentService = AssetAttachmentService;
|
|
7677
7640
|
exports2.AssetService = AssetService;
|
|
7678
|
-
exports2.AssetStageColors = AssetStageColors;
|
|
7679
7641
|
exports2.AssetStageCompletionService = AssetStageCompletionService;
|
|
7680
7642
|
exports2.AssetStageService = AssetStageService;
|
|
7681
7643
|
exports2.AssetTypeAttachmentService = AssetTypeAttachmentService;
|
|
@@ -7905,7 +7867,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7905
7867
|
exports2.getLocalRelativeDateString = getLocalRelativeDateString;
|
|
7906
7868
|
exports2.getOutboxCoordinator = getOutboxCoordinator;
|
|
7907
7869
|
exports2.getRenamedFile = getRenamedFile;
|
|
7908
|
-
exports2.getStageColor = getStageColor;
|
|
7909
7870
|
exports2.hashFile = hashFile;
|
|
7910
7871
|
exports2.initSDK = initSDK;
|
|
7911
7872
|
exports2.initializeAssetAttachments = initializeAssetAttachments;
|
|
@@ -8013,6 +7974,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8013
7974
|
exports2.selectAssetById = selectAssetById;
|
|
8014
7975
|
exports2.selectAssetStageById = selectAssetStageById;
|
|
8015
7976
|
exports2.selectAssetStageCompletionById = selectAssetStageCompletionById;
|
|
7977
|
+
exports2.selectAssetStageCompletionMapping = selectAssetStageCompletionMapping;
|
|
8016
7978
|
exports2.selectAssetStageCompletionsByIds = selectAssetStageCompletionsByIds;
|
|
8017
7979
|
exports2.selectAssetStages = selectAssetStages;
|
|
8018
7980
|
exports2.selectAssetStagesByIds = selectAssetStagesByIds;
|
|
@@ -8049,7 +8011,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8049
8011
|
exports2.selectCategoryMapping = selectCategoryMapping;
|
|
8050
8012
|
exports2.selectCommentsOfIssue = selectCommentsOfIssue;
|
|
8051
8013
|
exports2.selectCompletedStageIdsForAsset = selectCompletedStageIdsForAsset;
|
|
8052
|
-
exports2.selectCompletedStages = selectCompletedStages;
|
|
8053
8014
|
exports2.selectCompletedStagesByAsset = selectCompletedStagesByAsset;
|
|
8054
8015
|
exports2.selectConversation = selectConversation;
|
|
8055
8016
|
exports2.selectConversationMapping = selectConversationMapping;
|
|
@@ -8164,7 +8125,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8164
8125
|
exports2.selectSortedProjectUsers = selectSortedProjectUsers;
|
|
8165
8126
|
exports2.selectStageFormIdsFromStageIds = selectStageFormIdsFromStageIds;
|
|
8166
8127
|
exports2.selectStageMapping = selectStageMapping;
|
|
8167
|
-
exports2.selectStagesFromAssetTypeIds = selectStagesFromAssetTypeIds;
|
|
8168
8128
|
exports2.selectStagesOfAssetType = selectStagesOfAssetType;
|
|
8169
8129
|
exports2.selectTeamById = selectTeamById;
|
|
8170
8130
|
exports2.selectTeams = selectTeams;
|