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