@overmap-ai/core 1.0.63-selector-standardization.0 → 1.0.63-selector-standardization.1

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.
@@ -999,7 +999,7 @@ var __publicField = (obj, key, value) => {
999
999
  [selectAssetTypesMapping],
1000
1000
  (mapping) => Object.values(mapping)
1001
1001
  );
1002
- const selectAssetTypeId = (id) => (state) => {
1002
+ const selectAssetTypeById = (id) => (state) => {
1003
1003
  return state.assetTypeReducer.instances[id];
1004
1004
  };
1005
1005
  const selectAssetTypesByIds = restructureCreateSelectorWithArgs(
@@ -1781,7 +1781,7 @@ var __publicField = (obj, key, value) => {
1781
1781
  const selectOrganizationAccesses = (state) => {
1782
1782
  return state.organizationAccessReducer.instances;
1783
1783
  };
1784
- const selectOrganizationAccess = (organizationAccessId) => (state) => {
1784
+ const selectOrganizationAccessById = (organizationAccessId) => (state) => {
1785
1785
  return state.organizationAccessReducer.instances[organizationAccessId];
1786
1786
  };
1787
1787
  const selectActiveOrganizationAccess = toolkit.createSelector(
@@ -1955,7 +1955,7 @@ var __publicField = (obj, key, value) => {
1955
1955
  addActiveProjectFormSubmissionsCount
1956
1956
  } = projectSlice.actions;
1957
1957
  const projectReducer = projectSlice.reducer;
1958
- const selectProjects = (state) => state.projectReducer.projects;
1958
+ const selectProjectMapping = (state) => state.projectReducer.projects;
1959
1959
  const selectActiveProjectId = (state) => state.projectReducer.activeProjectId;
1960
1960
  const selectActiveProject = (state) => {
1961
1961
  const activeProjectId = selectActiveProjectId(state);
@@ -1976,7 +1976,7 @@ var __publicField = (obj, key, value) => {
1976
1976
  (projectUserIds, users) => projectUserIds.reduce((accum, userId) => ({ ...accum, [userId]: users[userId] }), {})
1977
1977
  );
1978
1978
  const selectProjectsWithAccess = toolkit.createSelector(
1979
- [selectProjects],
1979
+ [selectProjectMapping],
1980
1980
  (projects) => Object.values(projects).filter((project) => !project.invited)
1981
1981
  );
1982
1982
  const selectSortedProjectUsers = toolkit.createSelector(
@@ -2034,9 +2034,12 @@ var __publicField = (obj, key, value) => {
2034
2034
  (organizationAccesses) => Object.values(organizationAccesses).map((organizationAccess) => organizationAccess.user)
2035
2035
  );
2036
2036
  const selectProjectsOfOrganization = restructureCreateSelectorWithArgs(
2037
- toolkit.createSelector([selectProjects, (_, organizationId) => organizationId], (projects, organizationId) => {
2038
- return Object.values(projects).filter((project) => project.organization_owner === organizationId);
2039
- })
2037
+ toolkit.createSelector(
2038
+ [selectProjectMapping, (_, organizationId) => organizationId],
2039
+ (projects, organizationId) => {
2040
+ return Object.values(projects).filter((project) => project.organization_owner === organizationId);
2041
+ }
2042
+ )
2040
2043
  );
2041
2044
  const selectLicensesOfOrganization = restructureCreateSelectorWithArgs(
2042
2045
  toolkit.createSelector([selectLicenses, (_, organizationId) => organizationId], (licenses, organizationId) => {
@@ -2340,7 +2343,7 @@ var __publicField = (obj, key, value) => {
2340
2343
  [selectFormRevisionMapping],
2341
2344
  (formRevisions) => Object.values(formRevisions)
2342
2345
  );
2343
- const selectFormRevisionId = (formRevisionId) => (state) => {
2346
+ const selectFormRevisionById = (formRevisionId) => (state) => {
2344
2347
  return state.formRevisionReducer.instances[formRevisionId];
2345
2348
  };
2346
2349
  const _selectLatestFormRevision = (formRevisions, formId) => {
@@ -4802,7 +4805,7 @@ var __publicField = (obj, key, value) => {
4802
4805
  async delete(assetTypeId) {
4803
4806
  const { store } = this.client;
4804
4807
  const state = store.getState();
4805
- const assetType = selectAssetTypeId(assetTypeId)(state);
4808
+ const assetType = selectAssetTypeById(assetTypeId)(state);
4806
4809
  if (!assetType) {
4807
4810
  throw new Error(`Expected asset type with offline_id ${assetTypeId} to exist`);
4808
4811
  }
@@ -5522,7 +5525,7 @@ var __publicField = (obj, key, value) => {
5522
5525
  async delete(projectId) {
5523
5526
  const { store } = this.client;
5524
5527
  const state = store.getState();
5525
- const projects = selectProjects(state);
5528
+ const projects = selectProjectMapping(state);
5526
5529
  const project = projects[projectId];
5527
5530
  if (!project) {
5528
5531
  throw new Error("Expected project to exist");
@@ -7851,7 +7854,7 @@ var __publicField = (obj, key, value) => {
7851
7854
  exports2.selectAssetTypeAttachment = selectAssetTypeAttachment;
7852
7855
  exports2.selectAssetTypeAttachmentMapping = selectAssetTypeAttachmentMapping;
7853
7856
  exports2.selectAssetTypeAttachments = selectAssetTypeAttachments;
7854
- exports2.selectAssetTypeId = selectAssetTypeId;
7857
+ exports2.selectAssetTypeById = selectAssetTypeById;
7855
7858
  exports2.selectAssetTypeStagesMapping = selectAssetTypeStagesMapping;
7856
7859
  exports2.selectAssetTypes = selectAssetTypes;
7857
7860
  exports2.selectAssetTypesByIds = selectAssetTypesByIds;
@@ -7904,7 +7907,7 @@ var __publicField = (obj, key, value) => {
7904
7907
  exports2.selectFormOfAssetType = selectFormOfAssetType;
7905
7908
  exports2.selectFormOfIssueType = selectFormOfIssueType;
7906
7909
  exports2.selectFormRevisionAttachmentsMapping = selectFormRevisionAttachmentsMapping;
7907
- exports2.selectFormRevisionId = selectFormRevisionId;
7910
+ exports2.selectFormRevisionById = selectFormRevisionById;
7908
7911
  exports2.selectFormRevisionMapping = selectFormRevisionMapping;
7909
7912
  exports2.selectFormRevisions = selectFormRevisions;
7910
7913
  exports2.selectFormRevisionsOfForm = selectFormRevisionsOfForm;
@@ -7963,7 +7966,7 @@ var __publicField = (obj, key, value) => {
7963
7966
  exports2.selectMainWorkspace = selectMainWorkspace;
7964
7967
  exports2.selectNumberOfAssetsOfAssetType = selectNumberOfAssetsOfAssetType;
7965
7968
  exports2.selectOrganization = selectOrganization;
7966
- exports2.selectOrganizationAccess = selectOrganizationAccess;
7969
+ exports2.selectOrganizationAccessById = selectOrganizationAccessById;
7967
7970
  exports2.selectOrganizationAccessForUser = selectOrganizationAccessForUser;
7968
7971
  exports2.selectOrganizationAccessUserMapping = selectOrganizationAccessUserMapping;
7969
7972
  exports2.selectOrganizationAccesses = selectOrganizationAccesses;
@@ -7985,9 +7988,9 @@ var __publicField = (obj, key, value) => {
7985
7988
  exports2.selectProjectFileById = selectProjectFileById;
7986
7989
  exports2.selectProjectFileMapping = selectProjectFileMapping;
7987
7990
  exports2.selectProjectFiles = selectProjectFiles;
7991
+ exports2.selectProjectMapping = selectProjectMapping;
7988
7992
  exports2.selectProjectUsersAsMapping = selectProjectUsersAsMapping;
7989
7993
  exports2.selectProjectUsersIds = selectProjectUsersIds;
7990
- exports2.selectProjects = selectProjects;
7991
7994
  exports2.selectProjectsOfOrganization = selectProjectsOfOrganization;
7992
7995
  exports2.selectProjectsWithAccess = selectProjectsWithAccess;
7993
7996
  exports2.selectRecentIssueIds = selectRecentIssueIds;