@overmap-ai/core 1.0.38-component-fields.12 → 1.0.38-component-fields.14

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.
@@ -24,5 +24,5 @@ interface FormSubmissionBrowserProps {
24
24
  /** Content displayed within the container but after the list */
25
25
  after?: ReactNode;
26
26
  }
27
- export declare const FormSubmissionBrowser: import("react").NamedExoticComponent<FormSubmissionBrowserProps>;
27
+ export declare const FormSubmissionBrowser: import("react").MemoExoticComponent<(props: FormSubmissionBrowserProps) => import("react/jsx-runtime").JSX.Element>;
28
28
  export {};
@@ -10401,7 +10401,14 @@ const FormBrowser = memo(
10401
10401
  }, [filter, maxResults, ownerFilter]);
10402
10402
  const userForms = useAppSelector(selectFilteredUserForms(ownerFilterOptions)) ?? [];
10403
10403
  const userFormMapping = useAppSelector(selectUserFormMapping);
10404
- const attachableUserForms = userForms.filter((form) => !form.component_type && !form.component_stage);
10404
+ let componentUserFormCount = 0;
10405
+ const attachableUserForms = userForms.filter((form) => {
10406
+ if (form.component_type || form.component_stage) {
10407
+ componentUserFormCount++;
10408
+ return false;
10409
+ }
10410
+ return true;
10411
+ });
10405
10412
  const attachableUserFormMapping = Object.values(userFormMapping).filter(
10406
10413
  (form) => !form.component_type && !form.component_stage
10407
10414
  );
@@ -10433,7 +10440,7 @@ const FormBrowser = memo(
10433
10440
  const handleChange = useCallback((e) => {
10434
10441
  setFilter(e.currentTarget.value);
10435
10442
  }, []);
10436
- const numberOfForms = useAppSelector(selectNumberOfUserForms) - (userForms.length - attachableUserForms.length);
10443
+ const numberOfForms = useAppSelector(selectNumberOfUserForms) - componentUserFormCount;
10437
10444
  const numberOfHiddenForms = numberOfForms - attachableUserForms.length;
10438
10445
  const overflowMessage = attachableUserForms.length == maxResults && numberOfHiddenForms > 0 ? `Only the first ${maxResults} results are shown (${numberOfHiddenForms} hidden)` : numberOfHiddenForms > 0 && `${numberOfHiddenForms} hidden forms`;
10439
10446
  return /* @__PURE__ */ jsxs(Flex, { ref, direction: "column", gap: "2", children: [
@@ -10522,7 +10529,7 @@ const styles$2 = {
10522
10529
  submissionsContainer,
10523
10530
  stopHorizontalOverflow
10524
10531
  };
10525
- const FormSubmissionBrowserEntry = memo(function FormSubmissionBrowserEntry2(props) {
10532
+ const FormSubmissionBrowserEntry = memo((props) => {
10526
10533
  var _a2;
10527
10534
  const { submission, onSubmissionClick, compact, labelType, rowDecorator } = props;
10528
10535
  const currentUser = useAppSelector(selectCurrentUser);
@@ -10566,11 +10573,12 @@ const FormSubmissionBrowserEntry = memo(function FormSubmissionBrowserEntry2(pro
10566
10573
  }
10567
10574
  return row;
10568
10575
  });
10576
+ FormSubmissionBrowserEntry.displayName = "FormSubmissionBrowserEntry";
10569
10577
  const getCreatedAtOrSubmittedAtDate = (submission) => {
10570
10578
  const date = "created_at" in submission ? submission.created_at : submission.submitted_at;
10571
10579
  return new Date(date);
10572
10580
  };
10573
- const FormSubmissionBrowser = memo(function FormSubmissionBrowser2(props) {
10581
+ const FormSubmissionBrowser = memo((props) => {
10574
10582
  const {
10575
10583
  formId: formId2,
10576
10584
  submissions: propSubmissions,
@@ -10616,6 +10624,7 @@ const FormSubmissionBrowser = memo(function FormSubmissionBrowser2(props) {
10616
10624
  }
10617
10625
  );
10618
10626
  });
10627
+ FormSubmissionBrowser.displayName = "FormSubmissionBrowser";
10619
10628
  const PatchField = memo((props) => {
10620
10629
  const { name, render } = props;
10621
10630
  const { submitForm } = useFormikContext();