@overmap-ai/core 1.0.35-projects-licensing.6 → 1.0.35-projects-licensing.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +20 -2
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +20 -2
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/store/slices/licenseSlice.d.ts +4 -1
- package/dist/typings/models/license.d.ts +7 -0
- package/dist/typings/models/organizations.d.ts +2 -0
- package/package.json +1 -1
package/dist/overmap-core.js
CHANGED
|
@@ -2287,6 +2287,13 @@ var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
|
2287
2287
|
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
2288
2288
|
return LicenseLevel2;
|
|
2289
2289
|
})(LicenseLevel || {});
|
|
2290
|
+
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
2291
|
+
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
2292
|
+
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
2293
|
+
LicenseStatus2[LicenseStatus2["CANCELED"] = 4] = "CANCELED";
|
|
2294
|
+
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
2295
|
+
return LicenseStatus2;
|
|
2296
|
+
})(LicenseStatus || {});
|
|
2290
2297
|
const initialState$c = {
|
|
2291
2298
|
users: {},
|
|
2292
2299
|
currentUser: {
|
|
@@ -2643,7 +2650,7 @@ const licenseSlice = createSlice({
|
|
|
2643
2650
|
reducers: {
|
|
2644
2651
|
setLicenses: (state, action) => {
|
|
2645
2652
|
if (!Array.isArray(action.payload))
|
|
2646
|
-
throw new Error("Expected an array of
|
|
2653
|
+
throw new Error("Expected an array of Licenses");
|
|
2647
2654
|
if (action.payload.filter(onlyUniqueOfflineIds).length !== action.payload.length) {
|
|
2648
2655
|
throw new Error("Tried to use setLicenses reducer with duplicate ID's");
|
|
2649
2656
|
}
|
|
@@ -2653,6 +2660,13 @@ const licenseSlice = createSlice({
|
|
|
2653
2660
|
}
|
|
2654
2661
|
state.licenses = licenses;
|
|
2655
2662
|
},
|
|
2663
|
+
addLicenses: (state, action) => {
|
|
2664
|
+
if (!Array.isArray(action.payload))
|
|
2665
|
+
throw new Error("Expected an array of Licenses");
|
|
2666
|
+
for (const license of action.payload) {
|
|
2667
|
+
state.licenses[license.offline_id] = license;
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2656
2670
|
updateLicense: (state, action) => {
|
|
2657
2671
|
if (!(action.payload.offline_id in state.licenses)) {
|
|
2658
2672
|
throw new Error("Tried to update license that does not exist.");
|
|
@@ -2661,7 +2675,7 @@ const licenseSlice = createSlice({
|
|
|
2661
2675
|
}
|
|
2662
2676
|
}
|
|
2663
2677
|
});
|
|
2664
|
-
const { setLicenses, updateLicense } = licenseSlice.actions;
|
|
2678
|
+
const { setLicenses, addLicenses, updateLicense } = licenseSlice.actions;
|
|
2665
2679
|
const selectLicenses = (state) => {
|
|
2666
2680
|
return state.licenseReducer.licenses;
|
|
2667
2681
|
};
|
|
@@ -6072,10 +6086,12 @@ class OrganizationService extends BaseApiService {
|
|
|
6072
6086
|
const organizationAccesses = data.organization_accesses;
|
|
6073
6087
|
const emailDomains = data.email_domains;
|
|
6074
6088
|
const users = data.users;
|
|
6089
|
+
const licenses = data.licenses;
|
|
6075
6090
|
store.dispatch(addUsers(users));
|
|
6076
6091
|
store.dispatch(setActiveOrganizationId(activeOrganization.id));
|
|
6077
6092
|
store.dispatch(setOrganizationAccesses(organizationAccesses));
|
|
6078
6093
|
store.dispatch(setEmailDomains(emailDomains));
|
|
6094
|
+
store.dispatch(addLicenses(licenses));
|
|
6079
6095
|
if (showLoading) {
|
|
6080
6096
|
store.dispatch(setIsFetchingInitialData(false));
|
|
6081
6097
|
}
|
|
@@ -11411,6 +11427,7 @@ export {
|
|
|
11411
11427
|
IssueStatus,
|
|
11412
11428
|
LicenseLevel,
|
|
11413
11429
|
LicenseService,
|
|
11430
|
+
LicenseStatus,
|
|
11414
11431
|
MainService,
|
|
11415
11432
|
MapStyle,
|
|
11416
11433
|
MultiSelectField,
|
|
@@ -11458,6 +11475,7 @@ export {
|
|
|
11458
11475
|
addEmailDomain,
|
|
11459
11476
|
addFavouriteProjectId,
|
|
11460
11477
|
addIssue,
|
|
11478
|
+
addLicenses,
|
|
11461
11479
|
addOrReplaceCategories,
|
|
11462
11480
|
addOrReplaceIssueComment,
|
|
11463
11481
|
addOrReplaceProjectFile,
|