@overmap-ai/core 1.0.38-component-fields.11 → 1.0.38-component-fields.13

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.
@@ -10397,7 +10397,11 @@ var __publicField = (obj, key, value) => {
10397
10397
  }, [filter, maxResults, ownerFilter]);
10398
10398
  const userForms = useAppSelector(selectFilteredUserForms(ownerFilterOptions)) ?? [];
10399
10399
  const userFormMapping = useAppSelector(selectUserFormMapping);
10400
- const attachableUserForms = userForms.filter((form) => !form.component_type && !form.component_stage);
10400
+ let componentUserFormCount = 0;
10401
+ const attachableUserForms = userForms.filter((form) => {
10402
+ componentUserFormCount++;
10403
+ return !form.component_type && !form.component_stage;
10404
+ });
10401
10405
  const attachableUserFormMapping = Object.values(userFormMapping).filter(
10402
10406
  (form) => !form.component_type && !form.component_stage
10403
10407
  );
@@ -10429,7 +10433,7 @@ var __publicField = (obj, key, value) => {
10429
10433
  const handleChange = React.useCallback((e) => {
10430
10434
  setFilter(e.currentTarget.value);
10431
10435
  }, []);
10432
- const numberOfForms = useAppSelector(selectNumberOfUserForms) || 0;
10436
+ const numberOfForms = useAppSelector(selectNumberOfUserForms) - componentUserFormCount;
10433
10437
  const numberOfHiddenForms = numberOfForms - attachableUserForms.length;
10434
10438
  const overflowMessage = attachableUserForms.length == maxResults && numberOfHiddenForms > 0 ? `Only the first ${maxResults} results are shown (${numberOfHiddenForms} hidden)` : numberOfHiddenForms > 0 && `${numberOfHiddenForms} hidden forms`;
10435
10439
  return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { ref, direction: "column", gap: "2", children: [
@@ -10518,7 +10522,7 @@ var __publicField = (obj, key, value) => {
10518
10522
  submissionsContainer,
10519
10523
  stopHorizontalOverflow
10520
10524
  };
10521
- const FormSubmissionBrowserEntry = React.memo(function FormSubmissionBrowserEntry2(props) {
10525
+ const FormSubmissionBrowserEntry = React.memo((props) => {
10522
10526
  var _a2;
10523
10527
  const { submission, onSubmissionClick, compact, labelType, rowDecorator } = props;
10524
10528
  const currentUser = useAppSelector(selectCurrentUser);
@@ -10562,11 +10566,12 @@ var __publicField = (obj, key, value) => {
10562
10566
  }
10563
10567
  return row;
10564
10568
  });
10569
+ FormSubmissionBrowserEntry.displayName = "FormSubmissionBrowserEntry";
10565
10570
  const getCreatedAtOrSubmittedAtDate = (submission) => {
10566
10571
  const date = "created_at" in submission ? submission.created_at : submission.submitted_at;
10567
10572
  return new Date(date);
10568
10573
  };
10569
- const FormSubmissionBrowser = React.memo(function FormSubmissionBrowser2(props) {
10574
+ const FormSubmissionBrowser = React.memo((props) => {
10570
10575
  const {
10571
10576
  formId: formId2,
10572
10577
  submissions: propSubmissions,
@@ -10612,6 +10617,7 @@ var __publicField = (obj, key, value) => {
10612
10617
  }
10613
10618
  );
10614
10619
  });
10620
+ FormSubmissionBrowser.displayName = "FormSubmissionBrowser";
10615
10621
  const PatchField = React.memo((props) => {
10616
10622
  const { name, render } = props;
10617
10623
  const { submitForm } = formik.useFormikContext();