@overmap-ai/core 1.0.65-asset-models-improvements.2 → 1.0.65-asset-models-improvements.5
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 +192 -248
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +189 -245
- 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/assetStageSlice.d.ts +0 -1
- package/dist/store/slices/userSlice.d.ts +13 -33
- 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/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
|
};
|
|
@@ -771,6 +692,130 @@ var __publicField = (obj, key, value) => {
|
|
|
771
692
|
return getLocalDateString(date);
|
|
772
693
|
return relative.format(days, "days");
|
|
773
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;
|
|
774
819
|
function createModelAdapter(computeModelId) {
|
|
775
820
|
const addOne = (state, action) => {
|
|
776
821
|
const id = computeModelId(action.payload);
|
|
@@ -1108,24 +1153,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1108
1153
|
const selectAssetStages = toolkit.createSelector([selectStageMapping], (stageMapping) => {
|
|
1109
1154
|
return Object.values(stageMapping);
|
|
1110
1155
|
});
|
|
1111
|
-
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1112
|
-
toolkit.createSelector([selectAssetStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1113
|
-
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
1114
|
-
const ret = {};
|
|
1115
|
-
for (const stage of stages) {
|
|
1116
|
-
if (assetTypeIdsSet.has(stage.asset_type)) {
|
|
1117
|
-
if (!ret[stage.asset_type]) {
|
|
1118
|
-
ret[stage.asset_type] = [];
|
|
1119
|
-
}
|
|
1120
|
-
ret[stage.asset_type].push(stage);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
for (const key in ret) {
|
|
1124
|
-
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
1125
|
-
}
|
|
1126
|
-
return ret;
|
|
1127
|
-
})
|
|
1128
|
-
);
|
|
1129
1156
|
const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
|
|
1130
1157
|
toolkit.createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
|
|
1131
1158
|
const assetTypeStagesMapping = {};
|
|
@@ -1589,68 +1616,9 @@ var __publicField = (obj, key, value) => {
|
|
|
1589
1616
|
return url;
|
|
1590
1617
|
};
|
|
1591
1618
|
const fileReducer = fileSlice.reducer;
|
|
1592
|
-
var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
|
|
1593
|
-
ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1594
|
-
ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1595
|
-
return ProjectAccessLevel2;
|
|
1596
|
-
})(ProjectAccessLevel || {});
|
|
1597
|
-
var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
1598
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1599
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1600
|
-
return OrganizationAccessLevel2;
|
|
1601
|
-
})(OrganizationAccessLevel || {});
|
|
1602
|
-
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
1603
|
-
AttachmentModel2["Issue"] = "issue";
|
|
1604
|
-
AttachmentModel2["Asset"] = "asset";
|
|
1605
|
-
AttachmentModel2["AssetType"] = "asset_type";
|
|
1606
|
-
AttachmentModel2["Project"] = "project";
|
|
1607
|
-
AttachmentModel2["Document"] = "document";
|
|
1608
|
-
return AttachmentModel2;
|
|
1609
|
-
})(AttachmentModel || {});
|
|
1610
|
-
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
1611
|
-
IssueUpdateChange2["STATUS"] = "status";
|
|
1612
|
-
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
1613
|
-
IssueUpdateChange2["CATEGORY"] = "category";
|
|
1614
|
-
IssueUpdateChange2["DESCRIPTION"] = "description";
|
|
1615
|
-
IssueUpdateChange2["TITLE"] = "title";
|
|
1616
|
-
IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
|
|
1617
|
-
IssueUpdateChange2["DUE_DATE"] = "due_date";
|
|
1618
|
-
return IssueUpdateChange2;
|
|
1619
|
-
})(IssueUpdateChange || {});
|
|
1620
|
-
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
1621
|
-
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
1622
|
-
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
1623
|
-
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
1624
|
-
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
1625
|
-
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
1626
|
-
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
1627
|
-
return VerificationCodeType2;
|
|
1628
|
-
})(VerificationCodeType || {});
|
|
1629
|
-
var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
|
|
1630
|
-
PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
|
|
1631
|
-
PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
|
|
1632
|
-
return PaddleCheckoutEvent2;
|
|
1633
|
-
})(PaddleCheckoutEvent || {});
|
|
1634
|
-
var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
1635
|
-
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
1636
|
-
return LicenseLevel2;
|
|
1637
|
-
})(LicenseLevel || {});
|
|
1638
|
-
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
1639
|
-
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
1640
|
-
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
1641
|
-
LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
|
|
1642
|
-
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
1643
|
-
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1644
|
-
return LicenseStatus2;
|
|
1645
|
-
})(LicenseStatus || {});
|
|
1646
1619
|
const initialState$p = {
|
|
1647
1620
|
users: {},
|
|
1648
|
-
currentUser:
|
|
1649
|
-
id: 0,
|
|
1650
|
-
username: "",
|
|
1651
|
-
email: "",
|
|
1652
|
-
profile: { file: null, file_sha1: null, favourite_project_ids: [], tour_step: -1 }
|
|
1653
|
-
}
|
|
1621
|
+
currentUser: null
|
|
1654
1622
|
};
|
|
1655
1623
|
const userSlice = toolkit.createSlice({
|
|
1656
1624
|
name: "users",
|
|
@@ -1673,6 +1641,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1673
1641
|
state.currentUser = action.payload;
|
|
1674
1642
|
},
|
|
1675
1643
|
setProfilePicture: (state, action) => {
|
|
1644
|
+
if (!state.currentUser)
|
|
1645
|
+
return;
|
|
1676
1646
|
state.currentUser.profile.file = action.payload.file ?? null;
|
|
1677
1647
|
state.currentUser.profile.file_sha1 = action.payload.file_sha1 ?? null;
|
|
1678
1648
|
const currentUser = state.users[state.currentUser.id];
|
|
@@ -1682,32 +1652,12 @@ var __publicField = (obj, key, value) => {
|
|
|
1682
1652
|
currentUser.profile.file = action.payload.file ?? null;
|
|
1683
1653
|
currentUser.profile.file_sha1 = action.payload.file_sha1 ?? null;
|
|
1684
1654
|
},
|
|
1685
|
-
addFavouriteProjectId: (state, action) => {
|
|
1686
|
-
state.currentUser.profile.favourite_project_ids.push(action.payload);
|
|
1687
|
-
},
|
|
1688
|
-
removeFavouriteProjectId: (state, action) => {
|
|
1689
|
-
state.currentUser.profile.favourite_project_ids = state.currentUser.profile.favourite_project_ids.filter(
|
|
1690
|
-
(id) => id !== action.payload
|
|
1691
|
-
);
|
|
1692
|
-
},
|
|
1693
|
-
setTourStep: (state, action) => {
|
|
1694
|
-
state.currentUser.profile.tour_step = action.payload;
|
|
1695
|
-
},
|
|
1696
1655
|
removeUser: (state, action) => {
|
|
1697
1656
|
delete state.users[action.payload];
|
|
1698
1657
|
}
|
|
1699
1658
|
}
|
|
1700
1659
|
});
|
|
1701
|
-
const {
|
|
1702
|
-
setCurrentUser,
|
|
1703
|
-
setProfilePicture,
|
|
1704
|
-
setUsers,
|
|
1705
|
-
addUsers,
|
|
1706
|
-
addFavouriteProjectId,
|
|
1707
|
-
removeFavouriteProjectId,
|
|
1708
|
-
setTourStep,
|
|
1709
|
-
removeUser
|
|
1710
|
-
} = userSlice.actions;
|
|
1660
|
+
const { setCurrentUser, setProfilePicture, setUsers, addUsers, removeUser } = userSlice.actions;
|
|
1711
1661
|
const userReducer = userSlice.reducer;
|
|
1712
1662
|
const selectCurrentUser = (state) => state.userReducer.currentUser;
|
|
1713
1663
|
const selectUsersMapping = (state) => state.userReducer.users;
|
|
@@ -1728,7 +1678,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1728
1678
|
return fallbackToEmptyArray(users);
|
|
1729
1679
|
})
|
|
1730
1680
|
);
|
|
1731
|
-
const selectFavouriteProjects = (state) => state.userReducer.currentUser.profile.favourite_project_ids;
|
|
1732
1681
|
const organizationAccessAdapter = createModelAdapter(
|
|
1733
1682
|
(organizationAccess) => organizationAccess.offline_id
|
|
1734
1683
|
);
|
|
@@ -1754,7 +1703,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1754
1703
|
[selectCurrentUser, selectOrganizationAccesses],
|
|
1755
1704
|
(currentUser, organizationAccesses) => {
|
|
1756
1705
|
const activeOrganizationAccess = Object.values(organizationAccesses).find(
|
|
1757
|
-
(organizationAccess) => organizationAccess.user === currentUser.id
|
|
1706
|
+
(organizationAccess) => organizationAccess.user === (currentUser == null ? void 0 : currentUser.id)
|
|
1758
1707
|
);
|
|
1759
1708
|
return activeOrganizationAccess ?? null;
|
|
1760
1709
|
}
|
|
@@ -1944,9 +1893,9 @@ var __publicField = (obj, key, value) => {
|
|
|
1944
1893
|
[selectCurrentUser, selectProjectUsersAsMapping, selectProjectAccessUserMapping],
|
|
1945
1894
|
(currentUser, userMapping, projectAccessMapping) => {
|
|
1946
1895
|
return Object.values(userMapping).sort((userA, userB) => {
|
|
1947
|
-
if (userA.id === currentUser.id) {
|
|
1896
|
+
if (userA.id === (currentUser == null ? void 0 : currentUser.id)) {
|
|
1948
1897
|
return -1;
|
|
1949
|
-
} else if (userB.id === currentUser.id) {
|
|
1898
|
+
} else if (userB.id === (currentUser == null ? void 0 : currentUser.id)) {
|
|
1950
1899
|
return 1;
|
|
1951
1900
|
}
|
|
1952
1901
|
const projectAccessesA = projectAccessMapping[userA.id];
|
|
@@ -2023,9 +1972,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2023
1972
|
[selectCurrentUser, selectOrganizationUsersAsMapping, selectOrganizationAccessUserMapping],
|
|
2024
1973
|
(currentUser, userMapping, organizationAccessMapping) => {
|
|
2025
1974
|
return Object.values(userMapping).sort((userA, userB) => {
|
|
2026
|
-
if (userA.id === currentUser.id) {
|
|
1975
|
+
if (userA.id === (currentUser == null ? void 0 : currentUser.id)) {
|
|
2027
1976
|
return -1;
|
|
2028
|
-
} else if (userB.id === currentUser.id) {
|
|
1977
|
+
} else if (userB.id === (currentUser == null ? void 0 : currentUser.id)) {
|
|
2029
1978
|
return 1;
|
|
2030
1979
|
}
|
|
2031
1980
|
const organizationAccessesA = organizationAccessMapping[userA.id];
|
|
@@ -5097,15 +5046,6 @@ var __publicField = (obj, key, value) => {
|
|
|
5097
5046
|
void promise.then((result) => {
|
|
5098
5047
|
this.dispatch(updateIssue(result));
|
|
5099
5048
|
}).catch((error) => {
|
|
5100
|
-
var _a2;
|
|
5101
|
-
console.error(error);
|
|
5102
|
-
if (error instanceof APIError) {
|
|
5103
|
-
(_a2 = blocks.unsafeShowToast) == null ? void 0 : _a2.call(blocks, {
|
|
5104
|
-
title: "Could not create issue",
|
|
5105
|
-
description: error.message,
|
|
5106
|
-
accentColor: "red"
|
|
5107
|
-
});
|
|
5108
|
-
}
|
|
5109
5049
|
this.dispatch(deleteIssue(issuePayload.offline_id));
|
|
5110
5050
|
this.dispatch(addActiveProjectIssuesCount(-1));
|
|
5111
5051
|
throw error;
|
|
@@ -7661,6 +7601,15 @@ var __publicField = (obj, key, value) => {
|
|
|
7661
7601
|
this.dispatch(initializeIssueAssociations(issueAssociations));
|
|
7662
7602
|
}
|
|
7663
7603
|
}
|
|
7604
|
+
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
7605
|
+
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
7606
|
+
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
7607
|
+
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
7608
|
+
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
7609
|
+
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
7610
|
+
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
7611
|
+
return VerificationCodeType2;
|
|
7612
|
+
})(VerificationCodeType || {});
|
|
7664
7613
|
exports2.APIError = APIError;
|
|
7665
7614
|
exports2.AgentService = AgentService;
|
|
7666
7615
|
exports2.AssetAttachmentService = AssetAttachmentService;
|
|
@@ -7741,7 +7690,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7741
7690
|
exports2.addDocumentAttachments = addDocumentAttachments;
|
|
7742
7691
|
exports2.addDocuments = addDocuments;
|
|
7743
7692
|
exports2.addEmailDomain = addEmailDomain;
|
|
7744
|
-
exports2.addFavouriteProjectId = addFavouriteProjectId;
|
|
7745
7693
|
exports2.addForm = addForm;
|
|
7746
7694
|
exports2.addFormRevision = addFormRevision;
|
|
7747
7695
|
exports2.addFormRevisionAttachment = addFormRevisionAttachment;
|
|
@@ -7973,7 +7921,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7973
7921
|
exports2.rehydratedReducer = rehydratedReducer;
|
|
7974
7922
|
exports2.rehydratedSlice = rehydratedSlice;
|
|
7975
7923
|
exports2.removeDocuments = removeDocuments;
|
|
7976
|
-
exports2.removeFavouriteProjectId = removeFavouriteProjectId;
|
|
7977
7924
|
exports2.removeIssueType = removeIssueType;
|
|
7978
7925
|
exports2.removeProjectFile = removeProjectFile;
|
|
7979
7926
|
exports2.removeProjectFilesOfProject = removeProjectFilesOfProject;
|
|
@@ -8053,7 +8000,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8053
8000
|
exports2.selectEmailDomains = selectEmailDomains;
|
|
8054
8001
|
exports2.selectEmailDomainsAsMapping = selectEmailDomainsAsMapping;
|
|
8055
8002
|
exports2.selectEmailDomainsOfOrganization = selectEmailDomainsOfOrganization;
|
|
8056
|
-
exports2.selectFavouriteProjects = selectFavouriteProjects;
|
|
8057
8003
|
exports2.selectFilteredForms = selectFilteredForms;
|
|
8058
8004
|
exports2.selectFormById = selectFormById;
|
|
8059
8005
|
exports2.selectFormMapping = selectFormMapping;
|
|
@@ -8152,7 +8098,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8152
8098
|
exports2.selectSortedProjectUsers = selectSortedProjectUsers;
|
|
8153
8099
|
exports2.selectStageFormIdsFromStageIds = selectStageFormIdsFromStageIds;
|
|
8154
8100
|
exports2.selectStageMapping = selectStageMapping;
|
|
8155
|
-
exports2.selectStagesFromAssetTypeIds = selectStagesFromAssetTypeIds;
|
|
8156
8101
|
exports2.selectStagesOfAssetType = selectStagesOfAssetType;
|
|
8157
8102
|
exports2.selectTeamById = selectTeamById;
|
|
8158
8103
|
exports2.selectTeams = selectTeams;
|
|
@@ -8212,7 +8157,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8212
8157
|
exports2.setRehydrated = setRehydrated;
|
|
8213
8158
|
exports2.setTeam = setTeam;
|
|
8214
8159
|
exports2.setTokens = setTokens;
|
|
8215
|
-
exports2.setTourStep = setTourStep;
|
|
8216
8160
|
exports2.setUploadUrl = setUploadUrl;
|
|
8217
8161
|
exports2.setUsers = setUsers;
|
|
8218
8162
|
exports2.setWorkspaces = setWorkspaces;
|