@overmap-ai/core 1.0.38-component-fields.25 → 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.
@@ -3264,21 +3264,22 @@ var __publicField = (obj, key, value) => {
3264
3264
  }
3265
3265
  )
3266
3266
  );
3267
- const selectLatestRevisionsForComponentStage = restructureCreateSelectorWithArgs(
3267
+ const selectLatestRevisionsFromComponentStageIds = restructureCreateSelectorWithArgs(
3268
3268
  toolkit.createSelector(
3269
3269
  [
3270
3270
  selectUserFormMapping,
3271
3271
  selectRevisionMapping,
3272
- (_state, componentStageId) => componentStageId
3272
+ (_state, componentStageIds) => componentStageIds
3273
3273
  ],
3274
- (userForms, revisions, componentStageId) => {
3275
- const latestRevisions = [];
3274
+ (userForms, revisions, componentStageIds) => {
3275
+ const componentStageIdsSet = new Set(componentStageIds);
3276
+ const ret = {};
3276
3277
  for (const form of Object.values(userForms)) {
3277
- if (form.component_stage === componentStageId) {
3278
- latestRevisions.push(_selectLatestFormRevision(revisions, form.offline_id));
3278
+ if (form.component_stage && componentStageIdsSet.has(form.component_stage)) {
3279
+ ret[form.component_stage] = _selectLatestFormRevision(revisions, form.offline_id);
3279
3280
  }
3280
3281
  }
3281
- return latestRevisions;
3282
+ return ret;
3282
3283
  }
3283
3284
  )
3284
3285
  );
@@ -3312,14 +3313,6 @@ var __publicField = (obj, key, value) => {
3312
3313
  const selectNumberOfGeneralUserForms = toolkit.createSelector([selectUserFormMapping], (userForms) => {
3313
3314
  return Object.values(userForms).filter((form) => !form.component_type && !form.component_stage).length;
3314
3315
  });
3315
- const selectNumberOfComponentStageFormsForStage = restructureCreateSelectorWithArgs(
3316
- toolkit.createSelector(
3317
- [selectUserFormMapping, (_state, stageId) => stageId],
3318
- (userForms, stageId) => {
3319
- return Object.values(userForms).filter((form) => form.component_stage === stageId).length;
3320
- }
3321
- )
3322
- );
3323
3316
  const userFormReducer = userFormSlice.reducer;
3324
3317
  const initialState$1 = {
3325
3318
  emailDomains: {}
@@ -10381,17 +10374,7 @@ var __publicField = (obj, key, value) => {
10381
10374
  ] }) }),
10382
10375
  inputs,
10383
10376
  !readonly && /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { className: styles$6.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
10384
- cancelText && /* @__PURE__ */ jsxRuntime.jsx(
10385
- blocks.Button,
10386
- {
10387
- variant: "solid",
10388
- severity: "info",
10389
- ...buttonProps,
10390
- type: "button",
10391
- onClick: onCancel,
10392
- children: cancelText
10393
- }
10394
- ),
10377
+ cancelText && /* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { severity: "info", ...buttonProps, type: "button", onClick: onCancel, children: cancelText }),
10395
10378
  /* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { ...buttonProps, type: "submit", disabled: !formik$1.isValid, children: submitText })
10396
10379
  ] })
10397
10380
  ] }) }) });
@@ -12181,11 +12164,10 @@ var __publicField = (obj, key, value) => {
12181
12164
  exports2.selectLatestFormRevision = selectLatestFormRevision;
12182
12165
  exports2.selectLatestRetryTime = selectLatestRetryTime;
12183
12166
  exports2.selectLatestRevisionByFormId = selectLatestRevisionByFormId;
12184
- exports2.selectLatestRevisionsForComponentStage = selectLatestRevisionsForComponentStage;
12167
+ exports2.selectLatestRevisionsFromComponentStageIds = selectLatestRevisionsFromComponentStageIds;
12185
12168
  exports2.selectLatestRevisionsFromComponentTypeIds = selectLatestRevisionsFromComponentTypeIds;
12186
12169
  exports2.selectMainWorkspace = selectMainWorkspace;
12187
12170
  exports2.selectMapStyle = selectMapStyle;
12188
- exports2.selectNumberOfComponentStageFormsForStage = selectNumberOfComponentStageFormsForStage;
12189
12171
  exports2.selectNumberOfComponentTypesMatchingCaseInsensitiveName = selectNumberOfComponentTypesMatchingCaseInsensitiveName;
12190
12172
  exports2.selectNumberOfComponentsOfComponentType = selectNumberOfComponentsOfComponentType;
12191
12173
  exports2.selectNumberOfGeneralUserForms = selectNumberOfGeneralUserForms;