@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.
Files changed (74) hide show
  1. package/dist/enums/access.d.ts +8 -0
  2. package/dist/enums/attachments.d.ts +7 -0
  3. package/dist/enums/index.d.ts +3 -0
  4. package/dist/enums/issue.d.ts +9 -0
  5. package/dist/enums/licenses.d.ts +14 -0
  6. package/dist/overmap-core.js +205 -245
  7. package/dist/overmap-core.js.map +1 -1
  8. package/dist/overmap-core.umd.cjs +202 -242
  9. package/dist/overmap-core.umd.cjs.map +1 -1
  10. package/dist/sdk/base.d.ts +1 -1
  11. package/dist/sdk/globals.d.ts +2 -2
  12. package/dist/sdk/sdk.d.ts +3 -3
  13. package/dist/sdk/services/AgentService.d.ts +1 -1
  14. package/dist/sdk/services/AssetAttachmentService.d.ts +3 -2
  15. package/dist/sdk/services/AssetService.d.ts +2 -2
  16. package/dist/sdk/services/AssetStageCompletionService.d.ts +2 -2
  17. package/dist/sdk/services/AssetStageService.d.ts +1 -1
  18. package/dist/sdk/services/AssetTypeAttachmentService.d.ts +3 -2
  19. package/dist/sdk/services/AssetTypeService.d.ts +2 -2
  20. package/dist/sdk/services/BaseApiService.d.ts +1 -1
  21. package/dist/sdk/services/BaseAttachmentService.d.ts +3 -2
  22. package/dist/sdk/services/BaseAuthService.d.ts +1 -1
  23. package/dist/sdk/services/BaseService.d.ts +2 -2
  24. package/dist/sdk/services/BaseUploadService.d.ts +2 -2
  25. package/dist/sdk/services/CategoryService.d.ts +2 -2
  26. package/dist/sdk/services/DocumentAttachmentService.d.ts +3 -2
  27. package/dist/sdk/services/DocumentService.d.ts +2 -2
  28. package/dist/sdk/services/EmailDomainsService.d.ts +1 -1
  29. package/dist/sdk/services/EmailVerificationService.d.ts +1 -1
  30. package/dist/sdk/services/FileService.d.ts +1 -1
  31. package/dist/sdk/services/FormService.d.ts +1 -2
  32. package/dist/sdk/services/FormSubmissionService.d.ts +2 -3
  33. package/dist/sdk/services/GeoImageService.d.ts +2 -2
  34. package/dist/sdk/services/IssueAttachmentService.d.ts +3 -2
  35. package/dist/sdk/services/IssueCommentService.d.ts +2 -2
  36. package/dist/sdk/services/IssueService.d.ts +2 -2
  37. package/dist/sdk/services/IssueTypeService.d.ts +2 -2
  38. package/dist/sdk/services/IssueUpdateService.d.ts +1 -1
  39. package/dist/sdk/services/JWTAuthService.d.ts +2 -2
  40. package/dist/sdk/services/LicenseService.d.ts +1 -1
  41. package/dist/sdk/services/OrganizationAccessService.d.ts +1 -1
  42. package/dist/sdk/services/OrganizationService.d.ts +1 -1
  43. package/dist/sdk/services/ProjectAccessService.d.ts +1 -1
  44. package/dist/sdk/services/ProjectAttachmentService.d.ts +3 -2
  45. package/dist/sdk/services/ProjectFileService.d.ts +2 -3
  46. package/dist/sdk/services/ProjectService.d.ts +1 -2
  47. package/dist/sdk/services/TeamService.d.ts +2 -2
  48. package/dist/sdk/services/UserService.d.ts +2 -2
  49. package/dist/sdk/services/WorkspaceService.d.ts +2 -4
  50. package/dist/store/slices/assetStageCompletionSlice.d.ts +1 -1
  51. package/dist/store/slices/assetStageSlice.d.ts +0 -1
  52. package/dist/typings/models/access.d.ts +2 -9
  53. package/dist/typings/models/agents.d.ts +1 -1
  54. package/dist/typings/models/assets.d.ts +2 -2
  55. package/dist/typings/models/attachments.d.ts +2 -9
  56. package/dist/typings/models/base.d.ts +2 -2
  57. package/dist/typings/models/categories.d.ts +2 -2
  58. package/dist/typings/models/documents.d.ts +1 -1
  59. package/dist/typings/models/emailDomain.d.ts +1 -1
  60. package/dist/typings/models/emailVerification.d.ts +2 -2
  61. package/dist/typings/models/forms.d.ts +2 -2
  62. package/dist/typings/models/geoImages.d.ts +3 -3
  63. package/dist/typings/models/issueTypes.d.ts +2 -2
  64. package/dist/typings/models/issues.d.ts +1 -10
  65. package/dist/typings/models/license.d.ts +2 -15
  66. package/dist/typings/models/organizations.d.ts +1 -1
  67. package/dist/typings/models/projects.d.ts +3 -3
  68. package/dist/typings/models/store.d.ts +1 -1
  69. package/dist/typings/models/teams.d.ts +3 -3
  70. package/dist/typings/models/users.d.ts +1 -1
  71. package/dist/typings/models/workspace.d.ts +1 -1
  72. package/dist/typings/store.d.ts +1 -1
  73. package/dist/utils/colors.d.ts +0 -2
  74. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ export declare enum ProjectAccessLevel {
2
+ BASIC = 0,
3
+ ADMIN = 2
4
+ }
5
+ export declare enum OrganizationAccessLevel {
6
+ BASIC = 0,
7
+ ADMIN = 2
8
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum AttachmentModel {
2
+ Issue = "issue",
3
+ Asset = "asset",
4
+ AssetType = "asset_type",
5
+ Project = "project",
6
+ Document = "document"
7
+ }
@@ -1,2 +1,5 @@
1
1
  export * from "./api";
2
+ export * from "./attachments";
2
3
  export * from "./issue";
4
+ export * from "./access";
5
+ export * from "./licenses";
@@ -10,3 +10,12 @@ export declare enum IssueStatus {
10
10
  SELECTED = 2,
11
11
  DONE = 4
12
12
  }
13
+ export declare enum IssueUpdateChange {
14
+ STATUS = "status",
15
+ PRIORITY = "priority",
16
+ CATEGORY = "category",
17
+ DESCRIPTION = "description",
18
+ TITLE = "title",
19
+ ASSIGNED_TO = "assigned_to",
20
+ DUE_DATE = "due_date"
21
+ }
@@ -0,0 +1,14 @@
1
+ export declare enum PaddleCheckoutEvent {
2
+ COMPLETED = "checkout.completed",
3
+ CLOSED = "checkout.closed"
4
+ }
5
+ export declare enum LicenseLevel {
6
+ PRO = 0
7
+ }
8
+ export declare enum LicenseStatus {
9
+ ACTIVE = 0,
10
+ PAUSED = 2,
11
+ CANCELLED = 4,
12
+ INACTIVE = 6,
13
+ PAST_DUE = 8
14
+ }
@@ -7,20 +7,20 @@ var __publicField = (obj, key, value) => {
7
7
  var _a;
8
8
  import { DepGraph } from "dependency-graph";
9
9
  import { v4 } from "uuid";
10
+ import { saveAs } from "file-saver";
11
+ import React, { useRef, useEffect } from "react";
12
+ import ColorCls from "color";
13
+ import { gray, gold, brown, yellow, amber, orange, red, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, jade, grass, lime, mint, sky } from "@radix-ui/colors";
10
14
  import { offline as offline$1 } from "@redux-offline/redux-offline";
11
15
  import offlineConfig from "@redux-offline/redux-offline/lib/defaults";
12
16
  import localforage from "localforage";
13
17
  import createMigration from "redux-persist-migrate";
14
18
  import { createSlice, createSelector, combineReducers, createNextState } from "@reduxjs/toolkit";
15
19
  import request from "superagent";
16
- import { saveAs } from "file-saver";
17
- import React, { useRef, useEffect } from "react";
18
- import ColorCls from "color";
19
- import { gray, gold, brown, yellow, amber, orange, red, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, jade, grass, lime, mint, sky } from "@radix-ui/colors";
20
20
  import { RESET_STATE } from "@redux-offline/redux-offline/lib/constants";
21
21
  import jwtDecode from "jwt-decode";
22
- import { unsafeShowToast } from "@overmap-ai/blocks";
23
22
  import { openDB } from "idb";
23
+ import { unsafeShowToast } from "@overmap-ai/blocks";
24
24
  var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
25
25
  HttpMethod2["GET"] = "GET";
26
26
  HttpMethod2["POST"] = "POST";
@@ -29,6 +29,14 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
29
29
  HttpMethod2["DELETE"] = "DELETE";
30
30
  return HttpMethod2;
31
31
  })(HttpMethod || {});
32
+ var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
33
+ AttachmentModel2["Issue"] = "issue";
34
+ AttachmentModel2["Asset"] = "asset";
35
+ AttachmentModel2["AssetType"] = "asset_type";
36
+ AttachmentModel2["Project"] = "project";
37
+ AttachmentModel2["Document"] = "document";
38
+ return AttachmentModel2;
39
+ })(AttachmentModel || {});
32
40
  var IssuePriority = /* @__PURE__ */ ((IssuePriority2) => {
33
41
  IssuePriority2[IssuePriority2["LOWEST"] = 0] = "LOWEST";
34
42
  IssuePriority2[IssuePriority2["LOW"] = 2] = "LOW";
@@ -43,6 +51,43 @@ var IssueStatus = /* @__PURE__ */ ((IssueStatus2) => {
43
51
  IssueStatus2[IssueStatus2["DONE"] = 4] = "DONE";
44
52
  return IssueStatus2;
45
53
  })(IssueStatus || {});
54
+ var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
55
+ IssueUpdateChange2["STATUS"] = "status";
56
+ IssueUpdateChange2["PRIORITY"] = "priority";
57
+ IssueUpdateChange2["CATEGORY"] = "category";
58
+ IssueUpdateChange2["DESCRIPTION"] = "description";
59
+ IssueUpdateChange2["TITLE"] = "title";
60
+ IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
61
+ IssueUpdateChange2["DUE_DATE"] = "due_date";
62
+ return IssueUpdateChange2;
63
+ })(IssueUpdateChange || {});
64
+ var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
65
+ ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
66
+ ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
67
+ return ProjectAccessLevel2;
68
+ })(ProjectAccessLevel || {});
69
+ var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
70
+ OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
71
+ OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
72
+ return OrganizationAccessLevel2;
73
+ })(OrganizationAccessLevel || {});
74
+ var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
75
+ PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
76
+ PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
77
+ return PaddleCheckoutEvent2;
78
+ })(PaddleCheckoutEvent || {});
79
+ var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
80
+ LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
81
+ return LicenseLevel2;
82
+ })(LicenseLevel || {});
83
+ var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
84
+ LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
85
+ LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
86
+ LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
87
+ LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
88
+ LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
89
+ return LicenseStatus2;
90
+ })(LicenseStatus || {});
46
91
  class OutboxCoordinator {
47
92
  constructor() {
48
93
  __publicField(this, "graph");
@@ -285,130 +330,6 @@ class APIError extends Error {
285
330
  this.options = options;
286
331
  }
287
332
  }
288
- class DeferredPromise {
289
- constructor() {
290
- __publicField(this, _a, "Promise");
291
- __publicField(this, "_promise");
292
- __publicField(this, "_resolve");
293
- __publicField(this, "_reject");
294
- __publicField(this, "_state", "pending");
295
- this._resolve = null;
296
- this._reject = null;
297
- this._promise = new Promise((resolve, reject) => {
298
- this._resolve = resolve;
299
- this._reject = reject;
300
- });
301
- }
302
- get state() {
303
- return this._state;
304
- }
305
- then(onFulfilled, onRejected) {
306
- return this._promise.then(onFulfilled, onRejected);
307
- }
308
- catch(onRejected) {
309
- return this._promise.catch(onRejected);
310
- }
311
- resolve(value) {
312
- if (!this._resolve)
313
- throw new Error("No resolve callback");
314
- this._resolve(value);
315
- this._state = "fulfilled";
316
- }
317
- reject(reason) {
318
- if (!this._reject)
319
- throw reason;
320
- this._reject(reason);
321
- this._state = "rejected";
322
- }
323
- finally(_onFinally) {
324
- throw new Error("`finally` not implemented");
325
- }
326
- }
327
- _a = Symbol.toStringTag;
328
- var randomString = function randomString2() {
329
- return Math.random().toString(36).substring(7).split("").join(".");
330
- };
331
- ({
332
- INIT: "@@redux/INIT" + randomString(),
333
- REPLACE: "@@redux/REPLACE" + randomString(),
334
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
335
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
336
- }
337
- });
338
- function compose() {
339
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
340
- funcs[_key] = arguments[_key];
341
- }
342
- if (funcs.length === 0) {
343
- return function(arg) {
344
- return arg;
345
- };
346
- }
347
- if (funcs.length === 1) {
348
- return funcs[0];
349
- }
350
- return funcs.reduce(function(a, b) {
351
- return function() {
352
- return a(b.apply(void 0, arguments));
353
- };
354
- });
355
- }
356
- const VERSION_REDUCER_KEY$1 = "versioning";
357
- const latestVersion = () => migrations.length - 1;
358
- const initialVersioning = (state) => {
359
- state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
360
- return state;
361
- };
362
- const signOut = () => {
363
- return initialVersioning({});
364
- };
365
- const createOutboxState = (state) => {
366
- if (state.outboxReducer) {
367
- state.outboxReducer.deletedRequests = [];
368
- }
369
- return state;
370
- };
371
- const wrapMigration = (migrator) => (state) => {
372
- var _a2;
373
- if (state === void 0) {
374
- state = {};
375
- }
376
- if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
377
- return state;
378
- return migrator(state);
379
- };
380
- const migrations = [initialVersioning, signOut, signOut, createOutboxState];
381
- const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
382
- const initialState$B = {
383
- accessToken: "",
384
- refreshToken: "",
385
- isLoggedIn: false
386
- };
387
- const authSlice = createSlice({
388
- name: "auth",
389
- initialState: initialState$B,
390
- extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
391
- reducers: {
392
- setTokens: (state, action) => {
393
- state.accessToken = action.payload.accessToken;
394
- state.refreshToken = action.payload.refreshToken;
395
- },
396
- clearTokens: (state) => {
397
- state.accessToken = "";
398
- state.refreshToken = "";
399
- },
400
- setLoggedIn: (state, action) => {
401
- if (!action.payload) {
402
- authSlice.caseReducers.clearTokens(state);
403
- }
404
- state.isLoggedIn = action.payload;
405
- }
406
- }
407
- });
408
- const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
409
- const selectAccessToken = (state) => state.authReducer.accessToken;
410
- const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
411
- const authReducer = authSlice.reducer;
412
333
  const coordinatesToLiteral = (coordinates) => {
413
334
  return { lng: coordinates[0], lat: coordinates[1] };
414
335
  };
@@ -753,19 +674,6 @@ const Colors = {
753
674
  mint: mint.mint9,
754
675
  sky: sky.sky9
755
676
  };
756
- const AssetStageColors = {
757
- indigo: indigo.indigo9,
758
- red: red.red9,
759
- violet: violet.violet9,
760
- yellow: yellow.yellow9,
761
- jade: jade.jade9,
762
- cyan: cyan.cyan9,
763
- gold: gold.gold9,
764
- orange: orange.orange9,
765
- lime: lime.lime9,
766
- sky: sky.sky9,
767
- pink: pink.pink9
768
- };
769
677
  const defaultBadgeColor = "#868686";
770
678
  const generateBadgeColors = (rawColor) => {
771
679
  const color = ColorCls(rawColor);
@@ -774,9 +682,6 @@ const generateBadgeColors = (rawColor) => {
774
682
  const textColor = color.hex() === safety.hex() ? "#000000" : "#FFFFFF";
775
683
  return { backgroundColor, textColor };
776
684
  };
777
- function getStageColor(index) {
778
- return Object.values(AssetStageColors)[index % Object.keys(AssetStageColors).length];
779
- }
780
685
  const getLocalDateString = memoize((date) => {
781
686
  if (!date)
782
687
  return "";
@@ -799,6 +704,130 @@ const getLocalRelativeDateString = memoize((date, min, max) => {
799
704
  return getLocalDateString(date);
800
705
  return relative.format(days, "days");
801
706
  });
707
+ class DeferredPromise {
708
+ constructor() {
709
+ __publicField(this, _a, "Promise");
710
+ __publicField(this, "_promise");
711
+ __publicField(this, "_resolve");
712
+ __publicField(this, "_reject");
713
+ __publicField(this, "_state", "pending");
714
+ this._resolve = null;
715
+ this._reject = null;
716
+ this._promise = new Promise((resolve, reject) => {
717
+ this._resolve = resolve;
718
+ this._reject = reject;
719
+ });
720
+ }
721
+ get state() {
722
+ return this._state;
723
+ }
724
+ then(onFulfilled, onRejected) {
725
+ return this._promise.then(onFulfilled, onRejected);
726
+ }
727
+ catch(onRejected) {
728
+ return this._promise.catch(onRejected);
729
+ }
730
+ resolve(value) {
731
+ if (!this._resolve)
732
+ throw new Error("No resolve callback");
733
+ this._resolve(value);
734
+ this._state = "fulfilled";
735
+ }
736
+ reject(reason) {
737
+ if (!this._reject)
738
+ throw reason;
739
+ this._reject(reason);
740
+ this._state = "rejected";
741
+ }
742
+ finally(_onFinally) {
743
+ throw new Error("`finally` not implemented");
744
+ }
745
+ }
746
+ _a = Symbol.toStringTag;
747
+ var randomString = function randomString2() {
748
+ return Math.random().toString(36).substring(7).split("").join(".");
749
+ };
750
+ ({
751
+ INIT: "@@redux/INIT" + randomString(),
752
+ REPLACE: "@@redux/REPLACE" + randomString(),
753
+ PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
754
+ return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
755
+ }
756
+ });
757
+ function compose() {
758
+ for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
759
+ funcs[_key] = arguments[_key];
760
+ }
761
+ if (funcs.length === 0) {
762
+ return function(arg) {
763
+ return arg;
764
+ };
765
+ }
766
+ if (funcs.length === 1) {
767
+ return funcs[0];
768
+ }
769
+ return funcs.reduce(function(a, b) {
770
+ return function() {
771
+ return a(b.apply(void 0, arguments));
772
+ };
773
+ });
774
+ }
775
+ const VERSION_REDUCER_KEY$1 = "versioning";
776
+ const latestVersion = () => migrations.length - 1;
777
+ const initialVersioning = (state) => {
778
+ state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
779
+ return state;
780
+ };
781
+ const signOut = () => {
782
+ return initialVersioning({});
783
+ };
784
+ const createOutboxState = (state) => {
785
+ if (state.outboxReducer) {
786
+ state.outboxReducer.deletedRequests = [];
787
+ }
788
+ return state;
789
+ };
790
+ const wrapMigration = (migrator) => (state) => {
791
+ var _a2;
792
+ if (state === void 0) {
793
+ state = {};
794
+ }
795
+ if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
796
+ return state;
797
+ return migrator(state);
798
+ };
799
+ const migrations = [initialVersioning, signOut, signOut, createOutboxState];
800
+ const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
801
+ const initialState$B = {
802
+ accessToken: "",
803
+ refreshToken: "",
804
+ isLoggedIn: false
805
+ };
806
+ const authSlice = createSlice({
807
+ name: "auth",
808
+ initialState: initialState$B,
809
+ extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
810
+ reducers: {
811
+ setTokens: (state, action) => {
812
+ state.accessToken = action.payload.accessToken;
813
+ state.refreshToken = action.payload.refreshToken;
814
+ },
815
+ clearTokens: (state) => {
816
+ state.accessToken = "";
817
+ state.refreshToken = "";
818
+ },
819
+ setLoggedIn: (state, action) => {
820
+ if (!action.payload) {
821
+ authSlice.caseReducers.clearTokens(state);
822
+ }
823
+ state.isLoggedIn = action.payload;
824
+ }
825
+ }
826
+ });
827
+ const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
828
+ const selectAccessToken = (state) => state.authReducer.accessToken;
829
+ const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
830
+ const authReducer = authSlice.reducer;
802
831
  function createModelAdapter(computeModelId) {
803
832
  const addOne = (state, action) => {
804
833
  const id = computeModelId(action.payload);
@@ -1058,30 +1087,36 @@ const {
1058
1087
  deleteAssetStageCompletion,
1059
1088
  deleteAssetStageCompletions
1060
1089
  } = assetStageCompletionSlice.actions;
1061
- const selectCompletedStages = (state) => {
1090
+ const selectAssetStageCompletionMapping = (state) => {
1062
1091
  return state.assetStageCompletionReducer.instances;
1063
1092
  };
1064
- const selectCompletedStagesByAsset = createSelector([selectCompletedStages], (completedStagesMapping) => {
1065
- const completedStagesByAsset = {};
1066
- for (const stageCompletion of Object.values(completedStagesMapping)) {
1067
- const { asset, stage, submitted_at } = stageCompletion;
1068
- if (!completedStagesByAsset[asset])
1069
- completedStagesByAsset[asset] = {};
1070
- completedStagesByAsset[asset][stage] = submitted_at;
1071
- }
1072
- return completedStagesByAsset;
1073
- });
1093
+ const selectCompletedStagesByAsset = createSelector(
1094
+ [selectAssetStageCompletionMapping],
1095
+ (completedStagesMapping) => {
1096
+ const completedStagesByAsset = {};
1097
+ for (const stageCompletion of Object.values(completedStagesMapping)) {
1098
+ const { asset, stage, submitted_at } = stageCompletion;
1099
+ if (!completedStagesByAsset[asset])
1100
+ completedStagesByAsset[asset] = {};
1101
+ completedStagesByAsset[asset][stage] = submitted_at;
1102
+ }
1103
+ return completedStagesByAsset;
1104
+ }
1105
+ );
1074
1106
  const selectCompletedStageIdsForAsset = restructureCreateSelectorWithArgs(
1075
- createSelector([selectCompletedStages, (_state, asset) => asset], (completedStages, asset) => {
1076
- return Object.keys(completedStages[asset.offline_id] ?? {});
1077
- })
1107
+ createSelector(
1108
+ [selectAssetStageCompletionMapping, (_state, asset) => asset],
1109
+ (completedStages, asset) => {
1110
+ return Object.keys(completedStages[asset.offline_id] ?? {});
1111
+ }
1112
+ )
1078
1113
  );
1079
1114
  const selectAssetStageCompletionById = (id) => (state) => {
1080
1115
  return state.assetStageCompletionReducer.instances[id];
1081
1116
  };
1082
1117
  const selectAssetStageCompletionsByIds = restructureCreateSelectorWithArgs(
1083
1118
  createSelector(
1084
- [selectCompletedStages, (_, stageCompletionIds) => stageCompletionIds],
1119
+ [selectAssetStageCompletionMapping, (_, stageCompletionIds) => stageCompletionIds],
1085
1120
  (stageCompletionMapping, stageCompletionIds) => {
1086
1121
  const stageCompletionIdsSet = new Set(stageCompletionIds);
1087
1122
  return fallbackToEmptyArray(
@@ -1130,24 +1165,6 @@ const selectAssetStageById = (id) => (state) => {
1130
1165
  const selectAssetStages = createSelector([selectStageMapping], (stageMapping) => {
1131
1166
  return Object.values(stageMapping);
1132
1167
  });
1133
- const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
1134
- createSelector([selectAssetStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
1135
- const assetTypeIdsSet = new Set(assetTypeIds);
1136
- const ret = {};
1137
- for (const stage of stages) {
1138
- if (assetTypeIdsSet.has(stage.asset_type)) {
1139
- if (!ret[stage.asset_type]) {
1140
- ret[stage.asset_type] = [];
1141
- }
1142
- ret[stage.asset_type].push(stage);
1143
- }
1144
- }
1145
- for (const key in ret) {
1146
- ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
1147
- }
1148
- return ret;
1149
- })
1150
- );
1151
1168
  const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
1152
1169
  createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
1153
1170
  const assetTypeStagesMapping = {};
@@ -1611,60 +1628,6 @@ const selectUploadUrl = (sha1) => (state) => {
1611
1628
  return url;
1612
1629
  };
1613
1630
  const fileReducer = fileSlice.reducer;
1614
- var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
1615
- ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
1616
- ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
1617
- return ProjectAccessLevel2;
1618
- })(ProjectAccessLevel || {});
1619
- var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
1620
- OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
1621
- OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
1622
- return OrganizationAccessLevel2;
1623
- })(OrganizationAccessLevel || {});
1624
- var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
1625
- AttachmentModel2["Issue"] = "issue";
1626
- AttachmentModel2["Asset"] = "asset";
1627
- AttachmentModel2["AssetType"] = "asset_type";
1628
- AttachmentModel2["Project"] = "project";
1629
- AttachmentModel2["Document"] = "document";
1630
- return AttachmentModel2;
1631
- })(AttachmentModel || {});
1632
- var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
1633
- IssueUpdateChange2["STATUS"] = "status";
1634
- IssueUpdateChange2["PRIORITY"] = "priority";
1635
- IssueUpdateChange2["CATEGORY"] = "category";
1636
- IssueUpdateChange2["DESCRIPTION"] = "description";
1637
- IssueUpdateChange2["TITLE"] = "title";
1638
- IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
1639
- IssueUpdateChange2["DUE_DATE"] = "due_date";
1640
- return IssueUpdateChange2;
1641
- })(IssueUpdateChange || {});
1642
- var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
1643
- VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
1644
- VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
1645
- VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
1646
- VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
1647
- VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
1648
- VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
1649
- return VerificationCodeType2;
1650
- })(VerificationCodeType || {});
1651
- var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
1652
- PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
1653
- PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
1654
- return PaddleCheckoutEvent2;
1655
- })(PaddleCheckoutEvent || {});
1656
- var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
1657
- LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
1658
- return LicenseLevel2;
1659
- })(LicenseLevel || {});
1660
- var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
1661
- LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
1662
- LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
1663
- LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
1664
- LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
1665
- LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
1666
- return LicenseStatus2;
1667
- })(LicenseStatus || {});
1668
1631
  const initialState$p = {
1669
1632
  users: {},
1670
1633
  currentUser: {
@@ -5119,15 +5082,6 @@ class IssueService extends BaseApiService {
5119
5082
  void promise.then((result) => {
5120
5083
  this.dispatch(updateIssue(result));
5121
5084
  }).catch((error) => {
5122
- var _a2;
5123
- console.error(error);
5124
- if (error instanceof APIError) {
5125
- (_a2 = unsafeShowToast) == null ? void 0 : _a2({
5126
- title: "Could not create issue",
5127
- description: error.message,
5128
- accentColor: "red"
5129
- });
5130
- }
5131
5085
  this.dispatch(deleteIssue(issuePayload.offline_id));
5132
5086
  this.dispatch(addActiveProjectIssuesCount(-1));
5133
5087
  throw error;
@@ -7683,12 +7637,20 @@ class IssueAssociationService extends BaseUploadService {
7683
7637
  this.dispatch(initializeIssueAssociations(issueAssociations));
7684
7638
  }
7685
7639
  }
7640
+ var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
7641
+ VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
7642
+ VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
7643
+ VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
7644
+ VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
7645
+ VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
7646
+ VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
7647
+ return VerificationCodeType2;
7648
+ })(VerificationCodeType || {});
7686
7649
  export {
7687
7650
  APIError,
7688
7651
  AgentService,
7689
7652
  AssetAttachmentService,
7690
7653
  AssetService,
7691
- AssetStageColors,
7692
7654
  AssetStageCompletionService,
7693
7655
  AssetStageService,
7694
7656
  AssetTypeAttachmentService,
@@ -7918,7 +7880,6 @@ export {
7918
7880
  getLocalRelativeDateString,
7919
7881
  getOutboxCoordinator,
7920
7882
  getRenamedFile,
7921
- getStageColor,
7922
7883
  hashFile,
7923
7884
  initSDK,
7924
7885
  initializeAssetAttachments,
@@ -8026,6 +7987,7 @@ export {
8026
7987
  selectAssetById,
8027
7988
  selectAssetStageById,
8028
7989
  selectAssetStageCompletionById,
7990
+ selectAssetStageCompletionMapping,
8029
7991
  selectAssetStageCompletionsByIds,
8030
7992
  selectAssetStages,
8031
7993
  selectAssetStagesByIds,
@@ -8062,7 +8024,6 @@ export {
8062
8024
  selectCategoryMapping,
8063
8025
  selectCommentsOfIssue,
8064
8026
  selectCompletedStageIdsForAsset,
8065
- selectCompletedStages,
8066
8027
  selectCompletedStagesByAsset,
8067
8028
  selectConversation,
8068
8029
  selectConversationMapping,
@@ -8177,7 +8138,6 @@ export {
8177
8138
  selectSortedProjectUsers,
8178
8139
  selectStageFormIdsFromStageIds,
8179
8140
  selectStageMapping,
8180
- selectStagesFromAssetTypeIds,
8181
8141
  selectStagesOfAssetType,
8182
8142
  selectTeamById,
8183
8143
  selectTeams,