@overmap-ai/core 1.0.38-component-fields.26 → 1.0.38-component-fields.27

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.
@@ -3268,21 +3268,22 @@ const selectLatestRevisionsFromComponentTypeIds = restructureCreateSelectorWithA
3268
3268
  }
3269
3269
  )
3270
3270
  );
3271
- const selectLatestRevisionsForComponentStage = restructureCreateSelectorWithArgs(
3271
+ const selectLatestRevisionsFromComponentStageIds = restructureCreateSelectorWithArgs(
3272
3272
  createSelector(
3273
3273
  [
3274
3274
  selectUserFormMapping,
3275
3275
  selectRevisionMapping,
3276
- (_state, componentStageId) => componentStageId
3276
+ (_state, componentStageIds) => componentStageIds
3277
3277
  ],
3278
- (userForms, revisions, componentStageId) => {
3279
- const latestRevisions = [];
3278
+ (userForms, revisions, componentStageIds) => {
3279
+ const componentStageIdsSet = new Set(componentStageIds);
3280
+ const ret = {};
3280
3281
  for (const form of Object.values(userForms)) {
3281
- if (form.component_stage === componentStageId) {
3282
- latestRevisions.push(_selectLatestFormRevision(revisions, form.offline_id));
3282
+ if (form.component_stage && componentStageIdsSet.has(form.component_stage)) {
3283
+ ret[form.component_stage] = _selectLatestFormRevision(revisions, form.offline_id);
3283
3284
  }
3284
3285
  }
3285
- return latestRevisions;
3286
+ return ret;
3286
3287
  }
3287
3288
  )
3288
3289
  );
@@ -3316,14 +3317,6 @@ const selectNumberOfUserForms = createSelector([selectUserFormMapping], (userFor
3316
3317
  const selectNumberOfGeneralUserForms = createSelector([selectUserFormMapping], (userForms) => {
3317
3318
  return Object.values(userForms).filter((form) => !form.component_type && !form.component_stage).length;
3318
3319
  });
3319
- const selectNumberOfComponentStageFormsForStage = restructureCreateSelectorWithArgs(
3320
- createSelector(
3321
- [selectUserFormMapping, (_state, stageId) => stageId],
3322
- (userForms, stageId) => {
3323
- return Object.values(userForms).filter((form) => form.component_stage === stageId).length;
3324
- }
3325
- )
3326
- );
3327
3320
  const userFormReducer = userFormSlice.reducer;
3328
3321
  const initialState$1 = {
3329
3322
  emailDomains: {}
@@ -12176,11 +12169,10 @@ export {
12176
12169
  selectLatestFormRevision,
12177
12170
  selectLatestRetryTime,
12178
12171
  selectLatestRevisionByFormId,
12179
- selectLatestRevisionsForComponentStage,
12172
+ selectLatestRevisionsFromComponentStageIds,
12180
12173
  selectLatestRevisionsFromComponentTypeIds,
12181
12174
  selectMainWorkspace,
12182
12175
  selectMapStyle,
12183
- selectNumberOfComponentStageFormsForStage,
12184
12176
  selectNumberOfComponentTypesMatchingCaseInsensitiveName,
12185
12177
  selectNumberOfComponentsOfComponentType,
12186
12178
  selectNumberOfGeneralUserForms,