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