@payloadcms/ui 4.0.0-internal.bc5cf8c → 4.0.0-internal.c7d5de4
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.
- package/LICENSE.md +1 -1
- package/dist/css/forms.css +6 -3
- package/dist/css/theme.css +2 -1
- package/dist/css/z-index.css +9 -0
- package/dist/elements/APIKeyInput/index.css +4 -4
- package/dist/elements/AddNewRelation/index.css +28 -28
- package/dist/elements/AnimateHeight/usePatchAnimateHeight.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.css +2 -15
- package/dist/elements/AppHeader/index.d.ts +2 -1
- package/dist/elements/AppHeader/index.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.js +6 -8
- package/dist/elements/AppHeader/index.js.map +1 -1
- package/dist/elements/ArrayAction/index.d.ts.map +1 -1
- package/dist/elements/ArrayAction/index.js +1 -0
- package/dist/elements/ArrayAction/index.js.map +1 -1
- package/dist/elements/Button/index.d.ts.map +1 -1
- package/dist/elements/Button/index.js +5 -0
- package/dist/elements/Button/index.js.map +1 -1
- package/dist/elements/ClipboardAction/ClipboardActionLabel.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/index.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/index.js +1 -0
- package/dist/elements/ClipboardAction/index.js.map +1 -1
- package/dist/elements/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/elements/CodeEditor/index.css +5 -0
- package/dist/elements/Collapsible/index.d.ts.map +1 -1
- package/dist/elements/Collapsible/index.js +2 -0
- package/dist/elements/Collapsible/index.js.map +1 -1
- package/dist/elements/ColumnSelection/Popup.d.ts.map +1 -1
- package/dist/elements/ColumnSelection/Popup.js +6 -6
- package/dist/elements/ColumnSelection/Popup.js.map +1 -1
- package/dist/elements/ColumnSelection/matchesColumnSearch.d.ts +10 -0
- package/dist/elements/ColumnSelection/matchesColumnSearch.d.ts.map +1 -0
- package/dist/elements/ColumnSelection/matchesColumnSearch.js +21 -0
- package/dist/elements/ColumnSelection/matchesColumnSearch.js.map +1 -0
- package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js +87 -0
- package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js.map +1 -0
- package/dist/elements/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/elements/DatePicker/getFormattedLocale.d.ts.map +1 -1
- package/dist/elements/DatePicker/index.css +3 -3
- package/dist/elements/DatePicker/index.js +1 -1
- package/dist/elements/DatePicker/index.js.map +1 -1
- package/dist/elements/Dialog/DialogTitle/index.d.ts.map +1 -1
- package/dist/elements/DocumentControls/index.css +0 -2
- package/dist/elements/DocumentControls/index.d.ts +2 -2
- package/dist/elements/DocumentControls/index.d.ts.map +1 -1
- package/dist/elements/DocumentControls/index.js +1 -0
- package/dist/elements/DocumentControls/index.js.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.d.ts +2 -2
- package/dist/elements/DocumentDrawer/DrawerHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.js.map +1 -1
- package/dist/elements/DocumentFields/index.css +9 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.d.ts.map +1 -1
- package/dist/elements/DocumentLocked/index.d.ts +2 -2
- package/dist/elements/DocumentLocked/index.d.ts.map +1 -1
- package/dist/elements/DocumentLocked/index.js.map +1 -1
- package/dist/elements/DraggableSortable/DragOverlayPreview/index.css +1 -1
- package/dist/elements/DraggableSortable/useDraggableSortable/index.d.ts.map +1 -1
- package/dist/elements/Drawer/index.d.ts.map +1 -1
- package/dist/elements/Drawer/index.js +1 -0
- package/dist/elements/Drawer/index.js.map +1 -1
- package/dist/elements/Drawer/useDrawerSlug.d.ts.map +1 -1
- package/dist/elements/DrawerActionHeader/index.d.ts.map +1 -1
- package/dist/elements/EditUpload/index.d.ts.map +1 -1
- package/dist/elements/EditUpload/index.js +4 -0
- package/dist/elements/EditUpload/index.js.map +1 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.d.ts.map +1 -1
- package/dist/elements/HTMLDiff/diff/index.d.ts.map +1 -1
- package/dist/elements/HTMLDiff/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.css +3 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.css +1 -0
- package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.js.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.js +12 -12
- package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
- package/dist/elements/Hierarchy/Field/index.client.js +14 -14
- package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -0
- package/dist/elements/Hierarchy/Modal/index.css +88 -0
- package/dist/elements/Hierarchy/Modal/index.d.ts +20 -0
- package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -0
- package/dist/elements/Hierarchy/{Drawer → Modal}/index.js +105 -81
- package/dist/elements/Hierarchy/Modal/index.js.map +1 -0
- package/dist/elements/Hierarchy/{Drawer → Modal}/types.d.ts +22 -18
- package/dist/elements/Hierarchy/Modal/types.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Modal/types.js.map +1 -0
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts +30 -0
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts.map +1 -0
- package/dist/elements/Hierarchy/{Drawer/useHierarchyDrawer.js → Modal/useHierarchyModal.js} +51 -50
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.js.map +1 -0
- package/dist/elements/Hierarchy/MoveMany/index.d.ts +2 -2
- package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.js +9 -9
- package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/TreeFocusContext.d.ts +1 -1
- package/dist/elements/Hierarchy/Tree/TreeFocusContext.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/TreeNode/index.css +38 -13
- package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/TreeNode/index.js +37 -31
- package/dist/elements/Hierarchy/Tree/TreeNode/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.css +1 -1
- package/dist/elements/Hierarchy/Tree/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.js +18 -5
- package/dist/elements/Hierarchy/Tree/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/useChildren.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/index.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -1
- package/dist/elements/ListControls/index.js +1 -1
- package/dist/elements/ListControls/index.js.map +1 -1
- package/dist/elements/ListDrawer/index.d.ts.map +1 -1
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.d.ts.map +1 -1
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.js +1 -0
- package/dist/elements/LivePreview/Toolbar/SizeInput/index.js.map +1 -1
- package/dist/elements/LivePreview/Window/index.css +6 -0
- package/dist/elements/LoadingOverlay/reducer.d.ts.map +1 -1
- package/dist/elements/Locked/index.css +7 -4
- package/dist/elements/Locked/index.d.ts +2 -2
- package/dist/elements/Locked/index.d.ts.map +1 -1
- package/dist/elements/Locked/index.js +66 -53
- package/dist/elements/Locked/index.js.map +1 -1
- package/dist/elements/Nav/SettingsMenuButton/index.css +5 -0
- package/dist/elements/Nav/SettingsMenuButton/index.d.ts +1 -1
- package/dist/elements/Nav/SettingsMenuButton/index.d.ts.map +1 -1
- package/dist/elements/Nav/SettingsMenuButton/index.js +1 -1
- package/dist/elements/Nav/SettingsMenuButton/index.js.map +1 -1
- package/dist/elements/Nav/index.css +0 -5
- package/dist/elements/Pagination/index.css +5 -0
- package/dist/elements/Pagination/index.d.ts.map +1 -1
- package/dist/elements/Pagination/index.js +21 -21
- package/dist/elements/Pagination/index.js.map +1 -1
- package/dist/elements/Popup/PopupTrigger/index.d.ts +1 -0
- package/dist/elements/Popup/PopupTrigger/index.d.ts.map +1 -1
- package/dist/elements/Popup/PopupTrigger/index.js +3 -0
- package/dist/elements/Popup/PopupTrigger/index.js.map +1 -1
- package/dist/elements/Popup/index.d.ts +6 -0
- package/dist/elements/Popup/index.d.ts.map +1 -1
- package/dist/elements/Popup/index.js +2 -0
- package/dist/elements/Popup/index.js.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/buildUpcomingColumns.d.ts.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/buildUpcomingScheduleWhere.d.ts.map +1 -1
- package/dist/elements/ReactSelect/DefaultMenuPortal.d.ts +7 -0
- package/dist/elements/ReactSelect/DefaultMenuPortal.d.ts.map +1 -0
- package/dist/elements/ReactSelect/DefaultMenuPortal.js +120 -0
- package/dist/elements/ReactSelect/DefaultMenuPortal.js.map +1 -0
- package/dist/elements/ReactSelect/DropdownIndicator/index.css +1 -1
- package/dist/elements/ReactSelect/DropdownIndicator/index.d.ts.map +1 -1
- package/dist/elements/ReactSelect/DropdownIndicator/index.js +19 -12
- package/dist/elements/ReactSelect/DropdownIndicator/index.js.map +1 -1
- package/dist/elements/ReactSelect/getCaptureMenuScroll.d.ts.map +1 -1
- package/dist/elements/ReactSelect/getMenuListStyles.d.ts +1 -1
- package/dist/elements/ReactSelect/getMenuListStyles.d.ts.map +1 -1
- package/dist/elements/ReactSelect/getMenuListStyles.js +13 -5
- package/dist/elements/ReactSelect/getMenuListStyles.js.map +1 -1
- package/dist/elements/ReactSelect/getMenuStyles.d.ts +10 -0
- package/dist/elements/ReactSelect/getMenuStyles.d.ts.map +1 -0
- package/dist/elements/ReactSelect/getMenuStyles.js +21 -0
- package/dist/elements/ReactSelect/getMenuStyles.js.map +1 -0
- package/dist/elements/ReactSelect/index.css +10 -3
- package/dist/elements/ReactSelect/index.d.ts.map +1 -1
- package/dist/elements/ReactSelect/index.js +25 -102
- package/dist/elements/ReactSelect/index.js.map +1 -1
- package/dist/elements/ReactSelect/types.d.ts +2 -2
- package/dist/elements/ReactSelect/types.d.ts.map +1 -1
- package/dist/elements/ReactSelect/types.js.map +1 -1
- package/dist/elements/RelationshipTable/AddNewButton.d.ts +2 -2
- package/dist/elements/RelationshipTable/AddNewButton.d.ts.map +1 -1
- package/dist/elements/RelationshipTable/index.css +1 -2
- package/dist/elements/Search/ListSearchFilter/index.d.ts.map +1 -1
- package/dist/elements/Search/ListSearchFilter/index.js +1 -0
- package/dist/elements/Search/ListSearchFilter/index.js.map +1 -1
- package/dist/elements/Search/SearchInput/index.d.ts +2 -0
- package/dist/elements/Search/SearchInput/index.d.ts.map +1 -1
- package/dist/elements/Search/SearchInput/index.js +22 -19
- package/dist/elements/Search/SearchInput/index.js.map +1 -1
- package/dist/elements/SelectAll/index.css +3 -1
- package/dist/elements/SelectRow/index.d.ts +2 -2
- package/dist/elements/SelectRow/index.d.ts.map +1 -1
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/SidebarRow/index.css +0 -2
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +24 -24
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/index.d.ts +1 -1
- package/dist/elements/Table/DefaultCell/fields/index.d.ts.map +1 -1
- package/dist/elements/Table/OrderableRow.d.ts.map +1 -1
- package/dist/elements/Table/OrderableRowDragPreview.d.ts.map +1 -1
- package/dist/elements/Table/index.css +25 -2
- package/dist/elements/Tabs/index.d.ts.map +1 -1
- package/dist/elements/Thumbnail/createThumbnail.d.ts.map +1 -1
- package/dist/elements/TimezonePicker/index.css +1 -1
- package/dist/elements/Upload/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/SubMenuHeader/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/SubMenuHeader/index.js +8 -9
- package/dist/elements/UserMenu/SubMenuHeader/index.js.map +1 -1
- package/dist/elements/UserMenu/index.css +26 -1
- package/dist/elements/UserMenu/index.d.ts +1 -0
- package/dist/elements/UserMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/index.js +2 -1
- package/dist/elements/UserMenu/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/Condition/Select/formatOptions.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/Condition/validOperators.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/field-types.d.ts.map +1 -1
- package/dist/exports/client/index.d.ts +4 -3
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +1 -1
- package/dist/exports/client/index.js.map +3 -3
- package/dist/exports/layouts.d.ts +1 -0
- package/dist/exports/layouts.d.ts.map +1 -1
- package/dist/exports/layouts.js +1 -0
- package/dist/exports/layouts.js.map +1 -1
- package/dist/exports/rsc/index.d.ts +3 -0
- package/dist/exports/rsc/index.d.ts.map +1 -1
- package/dist/exports/rsc/index.js +3 -0
- package/dist/exports/rsc/index.js.map +1 -1
- package/dist/exports/shared/index.d.ts +1 -0
- package/dist/exports/shared/index.d.ts.map +1 -1
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +4 -4
- package/dist/fields/Array/index.d.ts +1 -1
- package/dist/fields/Array/index.d.ts.map +1 -1
- package/dist/fields/Array/index.js +7 -4
- package/dist/fields/Array/index.js.map +1 -1
- package/dist/fields/Blocks/SectionTitle/index.d.ts.map +1 -1
- package/dist/fields/Blocks/SectionTitle/index.js +1 -0
- package/dist/fields/Blocks/SectionTitle/index.js.map +1 -1
- package/dist/fields/Blocks/index.d.ts +1 -1
- package/dist/fields/Blocks/index.d.ts.map +1 -1
- package/dist/fields/Blocks/index.js +6 -3
- package/dist/fields/Blocks/index.js.map +1 -1
- package/dist/fields/Checkbox/index.d.ts +1 -1
- package/dist/fields/Code/index.css +1 -1
- package/dist/fields/Code/index.d.ts +2 -2
- package/dist/fields/Collapsible/index.d.ts +1 -1
- package/dist/fields/ConfirmPassword/index.d.ts +4 -0
- package/dist/fields/ConfirmPassword/index.d.ts.map +1 -1
- package/dist/fields/ConfirmPassword/index.js +37 -33
- package/dist/fields/ConfirmPassword/index.js.map +1 -1
- package/dist/fields/DateTime/index.d.ts +1 -1
- package/dist/fields/Email/index.d.ts +1 -1
- package/dist/fields/Group/index.css +1 -7
- package/dist/fields/Group/index.d.ts +2 -2
- package/dist/fields/JSON/index.d.ts +1 -1
- package/dist/fields/Join/index.d.ts +1 -1
- package/dist/fields/Number/Input.d.ts.map +1 -1
- package/dist/fields/Number/Input.js +29 -25
- package/dist/fields/Number/Input.js.map +1 -1
- package/dist/fields/Number/index.d.ts +1 -1
- package/dist/fields/Number/types.d.ts +4 -0
- package/dist/fields/Number/types.d.ts.map +1 -1
- package/dist/fields/Number/types.js.map +1 -1
- package/dist/fields/Password/input.d.ts.map +1 -1
- package/dist/fields/Password/input.js +33 -29
- package/dist/fields/Password/input.js.map +1 -1
- package/dist/fields/Password/types.d.ts +7 -3
- package/dist/fields/Password/types.d.ts.map +1 -1
- package/dist/fields/Password/types.js.map +1 -1
- package/dist/fields/Point/index.d.ts +1 -1
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +4 -0
- package/dist/fields/Relationship/Input.js.map +1 -1
- package/dist/fields/Relationship/findOptionsByValue.d.ts.map +1 -1
- package/dist/fields/Relationship/index.d.ts +1 -1
- package/dist/fields/Relationship/optionsReducer.d.ts.map +1 -1
- package/dist/fields/Relationship/select-components/MultiValueLabel/index.css +1 -1
- package/dist/fields/Relationship/types.d.ts +4 -0
- package/dist/fields/Relationship/types.d.ts.map +1 -1
- package/dist/fields/Relationship/types.js.map +1 -1
- package/dist/fields/Row/index.d.ts +1 -1
- package/dist/fields/Select/Input.d.ts +4 -0
- package/dist/fields/Select/Input.d.ts.map +1 -1
- package/dist/fields/Select/Input.js +45 -40
- package/dist/fields/Select/Input.js.map +1 -1
- package/dist/fields/Select/index.d.ts +1 -1
- package/dist/fields/Select/index.d.ts.map +1 -1
- package/dist/fields/Slug/index.d.ts +7 -5
- package/dist/fields/Slug/index.d.ts.map +1 -1
- package/dist/fields/Slug/index.js +6 -4
- package/dist/fields/Slug/index.js.map +1 -1
- package/dist/fields/Tabs/index.d.ts +1 -1
- package/dist/fields/Text/Input.d.ts.map +1 -1
- package/dist/fields/Text/Input.js +25 -21
- package/dist/fields/Text/Input.js.map +1 -1
- package/dist/fields/Text/index.d.ts +1 -1
- package/dist/fields/Text/types.d.ts +6 -2
- package/dist/fields/Text/types.d.ts.map +1 -1
- package/dist/fields/Text/types.js.map +1 -1
- package/dist/fields/Textarea/Input.d.ts.map +1 -1
- package/dist/fields/Textarea/Input.js +27 -23
- package/dist/fields/Textarea/Input.js.map +1 -1
- package/dist/fields/Textarea/index.css +1 -1
- package/dist/fields/Textarea/index.d.ts +1 -1
- package/dist/fields/Textarea/types.d.ts +4 -0
- package/dist/fields/Textarea/types.d.ts.map +1 -1
- package/dist/fields/Textarea/types.js.map +1 -1
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.js +2 -0
- package/dist/fields/index.js.map +1 -1
- package/dist/fields/mergeFieldStyles.d.ts +1 -1
- package/dist/fields/mergeFieldStyles.d.ts.map +1 -1
- package/dist/forms/Form/context.d.ts.map +1 -1
- package/dist/forms/Form/createNestedClientFieldPath.d.ts.map +1 -1
- package/dist/forms/Form/errorMessages.d.ts.map +1 -1
- package/dist/forms/Form/mergeServerFormState.d.ts.map +1 -1
- package/dist/forms/Form/reduceToSerializableFields.d.ts.map +1 -1
- package/dist/forms/Form/rowHelpers.d.ts.map +1 -1
- package/dist/forms/Form/rows.d.ts.map +1 -1
- package/dist/forms/Form/types.d.ts +2 -2
- package/dist/forms/Form/types.d.ts.map +1 -1
- package/dist/forms/Form/types.js.map +1 -1
- package/dist/forms/RenderFields/RenderField.d.ts +1 -1
- package/dist/forms/RenderFields/RenderField.d.ts.map +1 -1
- package/dist/forms/RenderFields/RenderField.js +10 -0
- package/dist/forms/RenderFields/RenderField.js.map +1 -1
- package/dist/forms/RenderFields/index.css +4 -4
- package/dist/forms/WatchChildErrors/buildPathSegments.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts +1 -0
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js +21 -5
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/index.d.ts +2 -2
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/index.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/index.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/iterateFields.d.ts +2 -2
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/iterateFields.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/iterateFields.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.d.ts +2 -2
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/index.d.ts +2 -1
- package/dist/forms/fieldSchemasToFormState/index.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/index.js +2 -0
- package/dist/forms/fieldSchemasToFormState/index.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts +2 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.js +2 -0
- package/dist/forms/fieldSchemasToFormState/iterateFields.js.map +1 -1
- package/dist/forms/useField/index.d.ts.map +1 -1
- package/dist/forms/withCondition/index.d.ts +1 -1
- package/dist/forms/withCondition/index.d.ts.map +1 -1
- package/dist/graphics/Icon/index.js +1 -1
- package/dist/graphics/Icon/index.js.map +1 -1
- package/dist/hooks/useDebouncedCallback.d.ts.map +1 -1
- package/dist/hooks/useDelay.d.ts.map +1 -1
- package/dist/hooks/useElementHeightVariable.d.ts.map +1 -1
- package/dist/hooks/useHotkey.d.ts.map +1 -1
- package/dist/hooks/useIntersect.d.ts.map +1 -1
- package/dist/hooks/usePopupWindow.d.ts +1 -1
- package/dist/hooks/usePopupWindow.d.ts.map +1 -1
- package/dist/hooks/useRelatedCollections.d.ts.map +1 -1
- package/dist/hooks/useResize.d.ts.map +1 -1
- package/dist/hooks/useUseAsTitle.d.ts.map +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +7 -3
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/layouts/Root/index.spec.js +20 -0
- package/dist/layouts/Root/index.spec.js.map +1 -0
- package/dist/layouts/Root/viewport.d.ts +5 -0
- package/dist/layouts/Root/viewport.d.ts.map +1 -0
- package/dist/layouts/Root/viewport.js +17 -0
- package/dist/layouts/Root/viewport.js.map +1 -0
- package/dist/providers/Auth/index.d.ts +8 -10
- package/dist/providers/Auth/index.d.ts.map +1 -1
- package/dist/providers/Auth/index.js +3 -8
- package/dist/providers/Auth/index.js.map +1 -1
- package/dist/providers/ClientFunction/index.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/index.js.map +1 -1
- package/dist/providers/DocumentInfo/types.d.ts +6 -6
- package/dist/providers/DocumentInfo/types.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/types.js.map +1 -1
- package/dist/providers/DocumentInfo/useGetDocPermissions.d.ts.map +1 -1
- package/dist/providers/ListQuery/index.d.ts.map +1 -1
- package/dist/providers/ListQuery/index.js +8 -1
- package/dist/providers/ListQuery/index.js.map +1 -1
- package/dist/providers/ListQuery/mergeQuery.d.ts.map +1 -1
- package/dist/providers/ListQuery/sanitizeQuery.d.ts.map +1 -1
- package/dist/providers/LivePreview/sizeReducer.d.ts +1 -1
- package/dist/providers/LivePreview/sizeReducer.d.ts.map +1 -1
- package/dist/providers/Root/index.d.ts +2 -2
- package/dist/providers/Root/index.d.ts.map +1 -1
- package/dist/providers/Root/index.js.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/filterFields.d.ts.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/filterFieldsWithPermissions.d.ts.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/findValueFromPath.d.ts.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/index.d.ts.map +1 -1
- package/dist/providers/TableColumns/getInitialColumns.d.ts +1 -1
- package/dist/providers/TableColumns/getInitialColumns.d.ts.map +1 -1
- package/dist/providers/Theme/index.d.ts +2 -2
- package/dist/providers/Theme/index.d.ts.map +1 -1
- package/dist/providers/Theme/index.js +2 -1
- package/dist/providers/Theme/index.js.map +1 -1
- package/dist/providers/Theme/shared.d.ts +3 -0
- package/dist/providers/Theme/shared.d.ts.map +1 -0
- package/dist/providers/Theme/shared.js +2 -0
- package/dist/providers/Theme/shared.js.map +1 -0
- package/dist/providers/UploadEdits/index.d.ts.map +1 -1
- package/dist/providers/UploadHandlers/index.d.ts.map +1 -1
- package/dist/styles.css +19 -5
- package/dist/templates/Default/index.d.ts.map +1 -1
- package/dist/templates/Default/index.js +6 -0
- package/dist/templates/Default/index.js.map +1 -1
- package/dist/utilities/api.d.ts.map +1 -1
- package/dist/utilities/buildClientFieldSchemaMap/index.d.ts.map +1 -1
- package/dist/utilities/buildClientFieldSchemaMap/traverseFields.d.ts.map +1 -1
- package/dist/utilities/buildFieldSchemaMap/index.d.ts.map +1 -1
- package/dist/utilities/buildFieldSchemaMap/traverseFields.d.ts.map +1 -1
- package/dist/utilities/buildFormState.d.ts +2 -2
- package/dist/utilities/buildFormState.d.ts.map +1 -1
- package/dist/utilities/buildFormState.js +1 -0
- package/dist/utilities/buildFormState.js.map +1 -1
- package/dist/utilities/checkDependencies.d.ts.map +1 -1
- package/dist/utilities/combineFieldLabel.d.ts.map +1 -1
- package/dist/utilities/copyDataFromLocale.d.ts.map +1 -1
- package/dist/utilities/copyDataFromLocale.js +1 -0
- package/dist/utilities/copyDataFromLocale.js.map +1 -1
- package/dist/utilities/filterOutUploadFields.d.ts.map +1 -1
- package/dist/utilities/findLocaleFromCode.d.ts.map +1 -1
- package/dist/utilities/formatAbsoluteURL.d.ts.map +1 -1
- package/dist/utilities/formatDocTitle/formatDateTitle.d.ts.map +1 -1
- package/dist/utilities/formatDocTitle/formatRelationshipTitle.d.ts.map +1 -1
- package/dist/utilities/formatDocTitle/index.d.ts +1 -1
- package/dist/utilities/formatDocTitle/index.d.ts.map +1 -1
- package/dist/utilities/formatDocTitle/index.js +1 -1
- package/dist/utilities/formatDocTitle/index.js.map +1 -1
- package/dist/utilities/formatFields.d.ts.map +1 -1
- package/dist/utilities/formatMetadata.d.ts.map +1 -1
- package/dist/utilities/formatRelativeDate.d.ts +15 -0
- package/dist/utilities/formatRelativeDate.d.ts.map +1 -0
- package/dist/utilities/formatRelativeDate.js +62 -0
- package/dist/utilities/formatRelativeDate.js.map +1 -0
- package/dist/utilities/generateFieldID.d.ts.map +1 -1
- package/dist/utilities/getColumns.d.ts.map +1 -1
- package/dist/utilities/getDisplayedFieldValue.d.ts.map +1 -1
- package/dist/utilities/getDocPreferences.d.ts +2 -2
- package/dist/utilities/getDocPreferences.d.ts.map +1 -1
- package/dist/utilities/getDocPreferences.js.map +1 -1
- package/dist/utilities/getDocumentData.d.ts +2 -2
- package/dist/utilities/getDocumentData.d.ts.map +1 -1
- package/dist/utilities/getDocumentData.js.map +1 -1
- package/dist/utilities/getDocumentPermissions.d.ts.map +1 -1
- package/dist/utilities/getGlobalData.d.ts +2 -2
- package/dist/utilities/getGlobalData.d.ts.map +1 -1
- package/dist/utilities/getGlobalData.js.map +1 -1
- package/dist/utilities/getHasScheduledPublish.d.ts +2 -2
- package/dist/utilities/getHasScheduledPublish.d.ts.map +1 -1
- package/dist/utilities/getHasScheduledPublish.js.map +1 -1
- package/dist/utilities/getIsLocked.d.ts +2 -2
- package/dist/utilities/getIsLocked.d.ts.map +1 -1
- package/dist/utilities/getIsLocked.js.map +1 -1
- package/dist/utilities/getLanguageDir.d.ts +12 -0
- package/dist/utilities/getLanguageDir.d.ts.map +1 -0
- package/dist/utilities/getLanguageDir.js +12 -0
- package/dist/utilities/getLanguageDir.js.map +1 -0
- package/dist/utilities/getOffsetTop.d.ts.map +1 -1
- package/dist/utilities/getRequestHighContrast.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestTheme.d.ts +1 -1
- package/dist/utilities/getRequestTheme.d.ts.map +1 -1
- package/dist/utilities/getRequestTheme.js +1 -1
- package/dist/utilities/getRequestTheme.js.map +1 -1
- package/dist/utilities/getRouteWithoutAdmin.d.ts.map +1 -1
- package/dist/utilities/getSupportedMonacoLocale.d.ts.map +1 -1
- package/dist/utilities/getVersions.d.ts +2 -2
- package/dist/utilities/getVersions.d.ts.map +1 -1
- package/dist/utilities/getVersions.js +2 -5
- package/dist/utilities/getVersions.js.map +1 -1
- package/dist/utilities/handleAuthRedirect.d.ts +2 -2
- package/dist/utilities/handleAuthRedirect.d.ts.map +1 -1
- package/dist/utilities/handleAuthRedirect.js.map +1 -1
- package/dist/utilities/handleBackToDashboard.d.ts.map +1 -1
- package/dist/utilities/handleFormStateLocking.d.ts +2 -2
- package/dist/utilities/handleFormStateLocking.d.ts.map +1 -1
- package/dist/utilities/handleFormStateLocking.js.map +1 -1
- package/dist/utilities/handleGoBack.d.ts.map +1 -1
- package/dist/utilities/handleLivePreview.d.ts +1 -0
- package/dist/utilities/handleLivePreview.d.ts.map +1 -1
- package/dist/utilities/handlePreview.d.ts.map +1 -1
- package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
- package/dist/utilities/handleStaleDataCheck.d.ts.map +1 -1
- package/dist/utilities/handleTakeOver.d.ts +5 -5
- package/dist/utilities/handleTakeOver.d.ts.map +1 -1
- package/dist/utilities/handleTakeOver.js.map +1 -1
- package/dist/utilities/hasOptionLabelJSXElement.d.ts.map +1 -1
- package/dist/utilities/hasSavePermission.d.ts.map +1 -1
- package/dist/utilities/initReq.d.ts.map +1 -1
- package/dist/utilities/isClientUserObject.d.ts +2 -2
- package/dist/utilities/isClientUserObject.d.ts.map +1 -1
- package/dist/utilities/isClientUserObject.js.map +1 -1
- package/dist/utilities/isCustomAdminView.d.ts.map +1 -1
- package/dist/utilities/isEditing.d.ts.map +1 -1
- package/dist/utilities/isPathMatchingRoute.d.ts.map +1 -1
- package/dist/utilities/isPublicAdminRoute.d.ts.map +1 -1
- package/dist/utilities/isURLAllowed.d.ts.map +1 -1
- package/dist/utilities/isURLAllowed.js +9 -3
- package/dist/utilities/isURLAllowed.js.map +1 -1
- package/dist/utilities/recentlyViewed.d.ts +16 -0
- package/dist/utilities/recentlyViewed.d.ts.map +1 -0
- package/dist/utilities/recentlyViewed.js +21 -0
- package/dist/utilities/recentlyViewed.js.map +1 -0
- package/dist/utilities/recentlyViewed.spec.js +92 -0
- package/dist/utilities/recentlyViewed.spec.js.map +1 -0
- package/dist/utilities/reduceFieldsToOptions.d.ts.map +1 -1
- package/dist/utilities/reduceFieldsToValuesWithValidation.d.ts.map +1 -1
- package/dist/utilities/renderTable.d.ts +2 -2
- package/dist/utilities/renderTable.d.ts.map +1 -1
- package/dist/utilities/resolveFilterOptions.d.ts +1 -1
- package/dist/utilities/resolveFilterOptions.d.ts.map +1 -1
- package/dist/utilities/sanitizeFilterOptionsQuery.d.ts.map +1 -1
- package/dist/utilities/scrollToID.d.ts.map +1 -1
- package/dist/utilities/selectiveCache.d.ts.map +1 -1
- package/dist/utilities/setsAreEqual.d.ts.map +1 -1
- package/dist/utilities/slugify.d.ts +1 -1
- package/dist/utilities/slugify.js +1 -1
- package/dist/utilities/slugify.js.map +1 -1
- package/dist/utilities/traverseForLocalizedFields.d.ts.map +1 -1
- package/dist/utilities/upsertPreferences.d.ts.map +1 -1
- package/dist/views/Account/ResetPreferences/index.d.ts +2 -2
- package/dist/views/Account/ResetPreferences/index.d.ts.map +1 -1
- package/dist/views/Account/ResetPreferences/index.js.map +1 -1
- package/dist/views/Account/Settings/index.d.ts +2 -2
- package/dist/views/Account/Settings/index.d.ts.map +1 -1
- package/dist/views/Account/Settings/index.js.map +1 -1
- package/dist/views/CollectionTrash/generateCollectionTrashMetadata.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetConfigDrawer.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetConfigDrawer.js +27 -23
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetConfigDrawer.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.css +2 -0
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/utils/getItemsFromPreferences.d.ts +2 -2
- package/dist/views/Dashboard/Default/ModularDashboard/utils/getItemsFromPreferences.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/utils/getItemsFromPreferences.js.map +1 -1
- package/dist/views/Dashboard/Default/index.d.ts +2 -2
- package/dist/views/Dashboard/Default/index.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/index.js.map +1 -1
- package/dist/views/Document/getCustomDocumentViewByKey.d.ts +1 -1
- package/dist/views/Document/getCustomDocumentViewByKey.d.ts.map +1 -1
- package/dist/views/Document/getCustomViewByRoute.d.ts +1 -1
- package/dist/views/Document/getCustomViewByRoute.d.ts.map +1 -1
- package/dist/views/Document/getDocumentView.d.ts.map +1 -1
- package/dist/views/Document/getMetaBySegment.d.ts.map +1 -1
- package/dist/views/Document/index.d.ts +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +17 -1
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/Document/recordRecentlyViewed.d.ts +12 -0
- package/dist/views/Document/recordRecentlyViewed.d.ts.map +1 -0
- package/dist/views/Document/recordRecentlyViewed.js +40 -0
- package/dist/views/Document/recordRecentlyViewed.js.map +1 -0
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +1 -1
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts +2 -2
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/types.d.ts +2 -2
- package/dist/views/HierarchyList/HierarchyTable/types.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/types.js.map +1 -1
- package/dist/views/HierarchyList/TypeFilter/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/TypeFilter/index.js +3 -0
- package/dist/views/HierarchyList/TypeFilter/index.js.map +1 -1
- package/dist/views/HierarchyList/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/index.js +2 -6
- package/dist/views/HierarchyList/index.js.map +1 -1
- package/dist/views/List/createSerializableValue.d.ts.map +1 -1
- package/dist/views/List/extractRelationshipDisplayValue.d.ts.map +1 -1
- package/dist/views/List/extractValueOrRelationshipID.d.ts.map +1 -1
- package/dist/views/List/generateListViewMetadata.d.ts.map +1 -1
- package/dist/views/List/handleGroupBy.d.ts.map +1 -1
- package/dist/views/List/handleHierarchy.d.ts +1 -1
- package/dist/views/List/handleHierarchy.d.ts.map +1 -1
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +1 -7
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/List/renderListViewSlots.d.ts.map +1 -1
- package/dist/views/List/resolveAllFilterOptions.d.ts.map +1 -1
- package/dist/views/List/transformColumnsToSelect.d.ts.map +1 -1
- package/dist/views/Logout/LogoutClient.js +28 -32
- package/dist/views/Logout/LogoutClient.js.map +1 -1
- package/dist/views/NotFound/page.d.ts.map +1 -1
- package/dist/views/Root/generateCustomViewMetadata.d.ts.map +1 -1
- package/dist/views/Root/generatePageMetadata.d.ts.map +1 -1
- package/dist/views/Root/getCustomCollectionViewByRoute.d.ts +1 -1
- package/dist/views/Root/getCustomCollectionViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getCustomGlobalViewByRoute.d.ts +1 -1
- package/dist/views/Root/getCustomGlobalViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getCustomViewByKey.d.ts.map +1 -1
- package/dist/views/Root/getCustomViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getRouteData.d.ts.map +1 -1
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Unauthorized/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +1 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/index.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/index.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/index.js +1 -0
- package/dist/views/Version/SelectComparison/index.js.map +1 -1
- package/dist/views/Versions/buildColumns.d.ts +1 -1
- package/dist/views/Versions/buildColumns.d.ts.map +1 -1
- package/dist/views/Versions/fetchVersions.d.ts +8 -8
- package/dist/views/Versions/fetchVersions.d.ts.map +1 -1
- package/dist/views/Versions/fetchVersions.js.map +1 -1
- package/dist/views/Versions/types.d.ts +2 -2
- package/dist/views/Versions/types.d.ts.map +1 -1
- package/dist/views/Versions/types.js.map +1 -1
- package/dist/widgets/CollectionCards/getCollectionCardsData.d.ts +2 -2
- package/dist/widgets/CollectionCards/getCollectionCardsData.d.ts.map +1 -1
- package/dist/widgets/CollectionCards/getCollectionCardsData.js.map +1 -1
- package/dist/widgets/CollectionCards/index.client.js.map +1 -1
- package/dist/widgets/CollectionQuery/SortField/index.d.ts +3 -0
- package/dist/widgets/CollectionQuery/SortField/index.d.ts.map +1 -0
- package/dist/widgets/CollectionQuery/SortField/index.js +118 -0
- package/dist/widgets/CollectionQuery/SortField/index.js.map +1 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.d.ts +18 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.d.ts.map +1 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.js +91 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.js.map +1 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js +100 -0
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js.map +1 -0
- package/dist/widgets/CollectionQuery/index.css +64 -0
- package/dist/widgets/CollectionQuery/index.d.ts +16 -0
- package/dist/widgets/CollectionQuery/index.d.ts.map +1 -0
- package/dist/widgets/CollectionQuery/index.js +328 -0
- package/dist/widgets/CollectionQuery/index.js.map +1 -0
- package/dist/widgets/RecentlyViewed/CollectionsField/index.css +14 -0
- package/dist/widgets/RecentlyViewed/CollectionsField/index.d.ts +10 -0
- package/dist/widgets/RecentlyViewed/CollectionsField/index.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/CollectionsField/index.js +76 -0
- package/dist/widgets/RecentlyViewed/CollectionsField/index.js.map +1 -0
- package/dist/widgets/RecentlyViewed/index.d.ts +10 -0
- package/dist/widgets/RecentlyViewed/index.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/index.js +148 -0
- package/dist/widgets/RecentlyViewed/index.js.map +1 -0
- package/dist/widgets/WidgetCard/index.css +155 -0
- package/dist/widgets/WidgetCard/index.d.ts +19 -0
- package/dist/widgets/WidgetCard/index.d.ts.map +1 -0
- package/dist/widgets/WidgetCard/index.js +49 -0
- package/dist/widgets/WidgetCard/index.js.map +1 -0
- package/package.json +6 -509
- package/dist/elements/Hierarchy/Drawer/fetchAncestorPath.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/fetchAncestorPath.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/index.css +0 -90
- package/dist/elements/Hierarchy/Drawer/index.d.ts +0 -20
- package/dist/elements/Hierarchy/Drawer/index.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/index.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/types.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/types.js.map +0 -1
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.d.ts +0 -30
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Drawer/useHierarchyDrawer.js.map +0 -1
- package/dist/elements/Nav/NavToggler/index.css +0 -12
- package/dist/elements/Nav/NavToggler/index.d.ts +0 -9
- package/dist/elements/Nav/NavToggler/index.d.ts.map +0 -1
- package/dist/elements/Nav/NavToggler/index.js +0 -91
- package/dist/elements/Nav/NavToggler/index.js.map +0 -1
- package/dist/elements/Nav/SettingsMenuButton/index.scss +0 -11
- /package/dist/elements/Hierarchy/{Drawer → Modal}/fetchAncestorPath.d.ts +0 -0
- /package/dist/elements/Hierarchy/{Drawer → Modal}/fetchAncestorPath.js +0 -0
- /package/dist/elements/Hierarchy/{Drawer → Modal}/types.js +0 -0
|
@@ -10,6 +10,6 @@ export declare const SelectField: React.FC<{
|
|
|
10
10
|
readonly value?: string | string[];
|
|
11
11
|
} & {
|
|
12
12
|
readonly field: Omit<import("payload").SelectFieldClient, "type"> & Partial<Pick<import("payload").SelectFieldClient, "type">>;
|
|
13
|
-
} & Omit<import("payload").ClientComponentProps, "
|
|
13
|
+
} & Omit<import("payload").ClientComponentProps, "customComponents" | "field">>;
|
|
14
14
|
export { SelectInput, type SelectInputProps };
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Select/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EAGb,MAAM,SAAS,CAAA;AAEhB,OAAO,KAA+B,MAAM,OAAO,CAAA;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKlD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Select/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EAGb,MAAM,SAAS,CAAA;AAEhB,OAAO,KAA+B,MAAM,OAAO,CAAA;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKlD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,eAAO,MAAM,aAAa,YAAa,MAAM,EAAE,KAAG,YAAY,EAU1D,CAAA;AAgHJ,eAAO,MAAM,WAAW;;;;;;;+EAAsC,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SlugFieldClient } from 'payload';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import './index.css';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
type SlugFieldProps = {
|
|
5
|
+
readonly field: SlugFieldClient;
|
|
6
|
+
readonly path?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const SlugField: React.FC<SlugFieldProps>;
|
|
9
|
+
export {};
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Slug/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Slug/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C,OAAO,KAAgC,MAAM,OAAO,CAAA;AAepD,OAAO,aAAa,CAAA;AAIpB,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAwJD,eAAO,MAAM,SAAS,0BAAoC,CAAA"}
|
|
@@ -10,6 +10,7 @@ import { FieldError } from '../../fields/FieldError/index.js';
|
|
|
10
10
|
import { FieldLabel } from '../../fields/FieldLabel/index.js';
|
|
11
11
|
import { useForm } from '../../forms/Form/index.js';
|
|
12
12
|
import { useField } from '../../forms/useField/index.js';
|
|
13
|
+
import { withCondition } from '../../forms/withCondition/index.js';
|
|
13
14
|
import { LockIcon } from '../../icons/Lock/index.js';
|
|
14
15
|
import { LockOpenIcon } from '../../icons/LockOpen/index.js';
|
|
15
16
|
import { RefreshIcon } from '../../icons/Refresh/index.js';
|
|
@@ -21,17 +22,17 @@ const baseClass = 'slug-field-component';
|
|
|
21
22
|
/**
|
|
22
23
|
* @experimental This component is experimental and may change or be removed in the future. Use at your own risk.
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
const SlugFieldComponent = t0 => {
|
|
25
26
|
const $ = _c(17);
|
|
26
27
|
const {
|
|
27
28
|
field,
|
|
28
|
-
path
|
|
29
|
-
useAsSlug
|
|
29
|
+
path
|
|
30
30
|
} = t0;
|
|
31
31
|
const {
|
|
32
32
|
admin,
|
|
33
33
|
label,
|
|
34
|
-
required
|
|
34
|
+
required,
|
|
35
|
+
useAsSlug
|
|
35
36
|
} = field;
|
|
36
37
|
const {
|
|
37
38
|
description,
|
|
@@ -194,6 +195,7 @@ export const SlugField = t0 => {
|
|
|
194
195
|
})]
|
|
195
196
|
});
|
|
196
197
|
};
|
|
198
|
+
export const SlugField = withCondition(SlugFieldComponent);
|
|
197
199
|
function _temp(prev) {
|
|
198
200
|
return !prev;
|
|
199
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCallback","useState","Button","FieldDescription","FieldError","FieldLabel","useForm","useField","LockIcon","LockOpenIcon","RefreshIcon","useDocumentInfo","useServerFunctions","useTranslation","baseClass","SlugField","t0","$","field","path","useAsSlug","admin","label","required","description","placeholder","readOnly","readOnlyFromProps","i18n","t","collectionSlug","globalSlug","slugify","t1","name","t2","fieldPath","setValue","showError","value","getData","getDataByPath","isLocked","setIsLocked","t3","e","preventDefault","valueToSlugify","formattedSlug","data","undefined","handleGenerate","t4","Symbol","for","e_0","_temp","toggleLock","t5","e_1","target","handleChange","isReadOnly","Boolean","t6","filter","join","t7","_jsx","htmlFor","t8","t9","t10","_jsxs","className","children","disabled","id","replace","onChange","type","buttonStyle","icon","margin","onClick","size","prev"],"sources":["../../../src/fields/Slug/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SlugFieldClientProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback, useState } from 'react'\n\nimport { Button } from '../../elements/Button/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useForm } from '../../forms/Form/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { LockIcon } from '../../icons/Lock/index.js'\nimport { LockOpenIcon } from '../../icons/LockOpen/index.js'\nimport { RefreshIcon } from '../../icons/Refresh/index.js'\nimport { useDocumentInfo } from '../../providers/DocumentInfo/index.js'\nimport { useServerFunctions } from '../../providers/ServerFunctions/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport './index.css'\n\nconst baseClass = 'slug-field-component'\n\n/**\n * @experimental This component is experimental and may change or be removed in the future. Use at your own risk.\n */\nexport const SlugField: React.FC<SlugFieldClientProps> = ({ field, path, useAsSlug }) => {\n const { admin, label, required } = field\n const { description, placeholder, readOnly: readOnlyFromProps } = admin || {}\n\n const { i18n, t } = useTranslation()\n\n const { collectionSlug, globalSlug } = useDocumentInfo()\n\n const { slugify } = useServerFunctions()\n\n const {\n path: fieldPath,\n setValue,\n showError,\n value,\n } = useField<string>({ path: path || field.name })\n\n const { getData, getDataByPath } = useForm()\n\n const [isLocked, setIsLocked] = useState(true)\n\n /**\n * This method allows the user to generate their slug on demand, e.g. when they click the \"generate\" button.\n * It uses the `slugify` server function to gain access to their custom slugify function defined in their field config.\n */\n const handleGenerate = useCallback(\n async (e: React.MouseEvent<Element>) => {\n e.preventDefault()\n\n const valueToSlugify = getDataByPath(useAsSlug)\n\n const formattedSlug = await slugify({\n collectionSlug,\n data: getData(),\n globalSlug,\n path: fieldPath,\n valueToSlugify,\n })\n\n if (formattedSlug === null || formattedSlug === undefined) {\n setValue('')\n return\n }\n\n /**\n * The result may be the same as the current value, and if so, we don't want to trigger a re-render.\n */\n if (value !== formattedSlug) {\n setValue(formattedSlug)\n }\n },\n [\n setValue,\n value,\n useAsSlug,\n getData,\n slugify,\n getDataByPath,\n collectionSlug,\n globalSlug,\n fieldPath,\n ],\n )\n\n const toggleLock = useCallback((e: React.MouseEvent<Element>) => {\n e.preventDefault()\n setIsLocked((prev) => !prev)\n }, [])\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value)\n },\n [setValue],\n )\n\n const isReadOnly = Boolean(readOnlyFromProps || isLocked)\n\n return (\n <div\n className={[\n 'field-type',\n baseClass,\n showError && `${baseClass}--error`,\n isLocked && `${baseClass}--locked`,\n readOnlyFromProps && `${baseClass}--read-only`,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <FieldLabel htmlFor={`field-${fieldPath}`} label={label} required={required} />\n <div className={`${baseClass}__wrap`}>\n <FieldError path={fieldPath} showError={showError} />\n\n <div\n className={[\n 'form-input-group',\n `${baseClass}__input-container`,\n showError && 'form-input-group-error',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <input\n aria-label={getTranslation(label, i18n) || path}\n className={`form-input ${baseClass}__input`}\n disabled={isReadOnly}\n id={`field-${fieldPath?.replace(/\\./g, '__')}`}\n name={fieldPath}\n onChange={handleChange}\n placeholder={getTranslation(placeholder, i18n)}\n type=\"text\"\n value={value || ''}\n />\n\n {!readOnlyFromProps && (\n <div className={`${baseClass}__actions`}>\n {!isLocked && (\n <Button\n aria-label={t('authentication:generate')}\n buttonStyle=\"ghost\"\n className={`${baseClass}__action-btn`}\n icon={<RefreshIcon />}\n id={`field-${fieldPath?.replace(/\\./g, '__')}-generate`}\n margin={false}\n onClick={handleGenerate}\n />\n )}\n <Button\n aria-label={isLocked ? t('general:unlock') : t('general:lock')}\n buttonStyle=\"ghost\"\n className={`${baseClass}__action-btn`}\n icon={isLocked ? <LockIcon size={16} /> : <LockOpenIcon size={16} />}\n id={`field-${fieldPath?.replace(/\\./g, '__')}-lock`}\n margin={false}\n onClick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AAA,cAA0B;YAAAoE,IAAA,EAC/BxC,QAAA,GAAW0B,IAAA,CAAA5D,QAAA;cAAA6E,IAAA;YAAA,C,IAAyBjB,IAAA,CAAA3D,YAAA;cAAA4E,IAAA;YAAA,C;gBACtC,SAASjD,SAAA,EAAA0C,OAAA,QAA0B,YAAY;YAAAK,MAAA;YAAAC,OAAA,EAE1C3B;UAAA,C;;UAMjBW,IAAA,CAAAjE,gBAAA;QAAAqB,WAAA;QAAAL,IAAA,EAAkDiB;MAAA,C;;;CAI1D;AAjJyD,SAAAoB,MAAA8B,IAAA;EAAA,QAkE9BA,IAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useCallback","useState","Button","FieldDescription","FieldError","FieldLabel","useForm","useField","withCondition","LockIcon","LockOpenIcon","RefreshIcon","useDocumentInfo","useServerFunctions","useTranslation","baseClass","SlugFieldComponent","t0","$","field","path","admin","label","required","useAsSlug","description","placeholder","readOnly","readOnlyFromProps","i18n","t","collectionSlug","globalSlug","slugify","t1","name","t2","fieldPath","setValue","showError","value","getData","getDataByPath","isLocked","setIsLocked","t3","e","preventDefault","valueToSlugify","formattedSlug","data","undefined","handleGenerate","t4","Symbol","for","e_0","_temp","toggleLock","t5","e_1","target","handleChange","isReadOnly","Boolean","t6","filter","join","t7","_jsx","htmlFor","t8","t9","t10","_jsxs","className","children","disabled","id","replace","onChange","type","buttonStyle","icon","margin","onClick","size","SlugField","prev"],"sources":["../../../src/fields/Slug/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SlugFieldClient } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useCallback, useState } from 'react'\n\nimport { Button } from '../../elements/Button/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useForm } from '../../forms/Form/index.js'\nimport { useField } from '../../forms/useField/index.js'\nimport { withCondition } from '../../forms/withCondition/index.js'\nimport { LockIcon } from '../../icons/Lock/index.js'\nimport { LockOpenIcon } from '../../icons/LockOpen/index.js'\nimport { RefreshIcon } from '../../icons/Refresh/index.js'\nimport { useDocumentInfo } from '../../providers/DocumentInfo/index.js'\nimport { useServerFunctions } from '../../providers/ServerFunctions/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport './index.css'\n\nconst baseClass = 'slug-field-component'\n\ntype SlugFieldProps = {\n readonly field: SlugFieldClient\n readonly path?: string\n}\n\n/**\n * @experimental This component is experimental and may change or be removed in the future. Use at your own risk.\n */\nconst SlugFieldComponent: React.FC<SlugFieldProps> = ({ field, path }) => {\n const { admin, label, required, useAsSlug } = field\n const { description, placeholder, readOnly: readOnlyFromProps } = admin || {}\n\n const { i18n, t } = useTranslation()\n\n const { collectionSlug, globalSlug } = useDocumentInfo()\n\n const { slugify } = useServerFunctions()\n\n const {\n path: fieldPath,\n setValue,\n showError,\n value,\n } = useField<string>({ path: path || field.name })\n\n const { getData, getDataByPath } = useForm()\n\n const [isLocked, setIsLocked] = useState(true)\n\n /**\n * This method allows the user to generate their slug on demand, e.g. when they click the \"generate\" button.\n * It uses the `slugify` server function to gain access to their custom slugify function defined in their field config.\n */\n const handleGenerate = useCallback(\n async (e: React.MouseEvent<Element>) => {\n e.preventDefault()\n\n const valueToSlugify = getDataByPath(useAsSlug)\n\n const formattedSlug = await slugify({\n collectionSlug,\n data: getData(),\n globalSlug,\n path: fieldPath,\n valueToSlugify,\n })\n\n if (formattedSlug === null || formattedSlug === undefined) {\n setValue('')\n return\n }\n\n /**\n * The result may be the same as the current value, and if so, we don't want to trigger a re-render.\n */\n if (value !== formattedSlug) {\n setValue(formattedSlug)\n }\n },\n [\n setValue,\n value,\n useAsSlug,\n getData,\n slugify,\n getDataByPath,\n collectionSlug,\n globalSlug,\n fieldPath,\n ],\n )\n\n const toggleLock = useCallback((e: React.MouseEvent<Element>) => {\n e.preventDefault()\n setIsLocked((prev) => !prev)\n }, [])\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value)\n },\n [setValue],\n )\n\n const isReadOnly = Boolean(readOnlyFromProps || isLocked)\n\n return (\n <div\n className={[\n 'field-type',\n baseClass,\n showError && `${baseClass}--error`,\n isLocked && `${baseClass}--locked`,\n readOnlyFromProps && `${baseClass}--read-only`,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <FieldLabel htmlFor={`field-${fieldPath}`} label={label} required={required} />\n <div className={`${baseClass}__wrap`}>\n <FieldError path={fieldPath} showError={showError} />\n\n <div\n className={[\n 'form-input-group',\n `${baseClass}__input-container`,\n showError && 'form-input-group-error',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <input\n aria-label={getTranslation(label, i18n) || path}\n className={`form-input ${baseClass}__input`}\n disabled={isReadOnly}\n id={`field-${fieldPath?.replace(/\\./g, '__')}`}\n name={fieldPath}\n onChange={handleChange}\n placeholder={getTranslation(placeholder, i18n)}\n type=\"text\"\n value={value || ''}\n />\n\n {!readOnlyFromProps && (\n <div className={`${baseClass}__actions`}>\n {!isLocked && (\n <Button\n aria-label={t('authentication:generate')}\n buttonStyle=\"ghost\"\n className={`${baseClass}__action-btn`}\n icon={<RefreshIcon />}\n id={`field-${fieldPath?.replace(/\\./g, '__')}-generate`}\n margin={false}\n onClick={handleGenerate}\n />\n )}\n <Button\n aria-label={isLocked ? t('general:unlock') : t('general:lock')}\n buttonStyle=\"ghost\"\n className={`${baseClass}__action-btn`}\n icon={isLocked ? <LockIcon size={16} /> : <LockOpenIcon size={16} />}\n id={`field-${fieldPath?.replace(/\\./g, '__')}-lock`}\n margin={false}\n onClick={toggleLock}\n />\n </div>\n )}\n </div>\n\n <FieldDescription description={description} path={fieldPath} />\n </div>\n </div>\n )\n}\n\nexport const SlugField = withCondition(SlugFieldComponent)\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,cAAc,QAAQ;AAC/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;YAAA,C;gBACtC,SAASjD,SAAA,EAAA0C,OAAA,QAA0B,YAAY;YAAAK,MAAA;YAAAC,OAAA,EAE1C3B;UAAA,C;;UAMjBW,IAAA,CAAAlE,gBAAA;QAAAsB,WAAA;QAAAL,IAAA,EAAkDiB;MAAA,C;;;CAI1D;AAEA,OAAO,MAAMkD,SAAA,GAAY/E,aAAA,CAAcQ,kBAAA;AAnJc,SAAAyC,MAAA+B,IAAA;EAAA,QAkE1BA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -5,5 +5,5 @@ import './index.css';
|
|
|
5
5
|
export { TabsProvider };
|
|
6
6
|
export declare const TabsField: React.FC<import("payload").FieldPaths & {
|
|
7
7
|
readonly field: Omit<import("payload").TabsFieldClient, "type"> & Partial<Pick<import("payload").TabsFieldClient, "type">>;
|
|
8
|
-
} & Omit<ClientComponentProps, "
|
|
8
|
+
} & Omit<ClientComponentProps, "customComponents" | "field">>;
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/fields/Text/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAShD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/fields/Text/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAShD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyK9C,CAAA"}
|
|
@@ -13,7 +13,7 @@ import { useTranslation } from '../../providers/Translation/index.js';
|
|
|
13
13
|
import { fieldBaseClass } from '../shared/index.js';
|
|
14
14
|
import './index.css';
|
|
15
15
|
export const TextInput = props => {
|
|
16
|
-
const $ = _c(
|
|
16
|
+
const $ = _c(34);
|
|
17
17
|
const {
|
|
18
18
|
id: idFromProps,
|
|
19
19
|
AfterInput,
|
|
@@ -37,34 +37,37 @@ export const TextInput = props => {
|
|
|
37
37
|
required,
|
|
38
38
|
rtl,
|
|
39
39
|
showError,
|
|
40
|
+
size: t0,
|
|
40
41
|
style,
|
|
41
42
|
value,
|
|
42
43
|
valueToRender
|
|
43
44
|
} = props;
|
|
45
|
+
const size = t0 === undefined ? "large" : t0;
|
|
44
46
|
const {
|
|
45
47
|
i18n,
|
|
46
48
|
t
|
|
47
49
|
} = useTranslation();
|
|
48
50
|
const editableProps = _temp2;
|
|
49
|
-
let
|
|
50
|
-
if ($[0] !== AfterInput || $[1] !== BeforeInput || $[2] !== Description || $[3] !== Error || $[4] !== Label || $[5] !== className || $[6] !== description || $[7] !== hasMany || $[8] !== htmlAttributes || $[9] !== i18n || $[10] !== idFromProps || $[11] !== inputRef || $[12] !== label || $[13] !== localized || $[14] !== maxRows || $[15] !== onChange || $[16] !== onKeyDown || $[17] !== path || $[18] !== placeholderFromProps || $[19] !== readOnly || $[20] !== required || $[21] !== rtl || $[22] !== showError || $[23] !==
|
|
51
|
+
let t1;
|
|
52
|
+
if ($[0] !== AfterInput || $[1] !== BeforeInput || $[2] !== Description || $[3] !== Error || $[4] !== Label || $[5] !== className || $[6] !== description || $[7] !== hasMany || $[8] !== htmlAttributes || $[9] !== i18n || $[10] !== idFromProps || $[11] !== inputRef || $[12] !== label || $[13] !== localized || $[14] !== maxRows || $[15] !== onChange || $[16] !== onKeyDown || $[17] !== path || $[18] !== placeholderFromProps || $[19] !== readOnly || $[20] !== required || $[21] !== rtl || $[22] !== showError || $[23] !== size || $[24] !== style || $[25] !== t || $[26] !== value || $[27] !== valueToRender) {
|
|
51
53
|
const placeholder = getTranslation(placeholderFromProps, i18n);
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
let
|
|
56
|
-
if ($[
|
|
57
|
-
|
|
58
|
-
$[
|
|
59
|
-
$[29] = t1;
|
|
54
|
+
const t2 = showError && "error";
|
|
55
|
+
const t3 = readOnly && "read-only";
|
|
56
|
+
const t4 = hasMany && "has-many";
|
|
57
|
+
let t5;
|
|
58
|
+
if ($[29] !== className || $[30] !== t2 || $[31] !== t3 || $[32] !== t4) {
|
|
59
|
+
t5 = [fieldBaseClass, "text", className, t2, t3, t4].filter(Boolean);
|
|
60
|
+
$[29] = className;
|
|
60
61
|
$[30] = t2;
|
|
61
62
|
$[31] = t3;
|
|
62
63
|
$[32] = t4;
|
|
64
|
+
$[33] = t5;
|
|
63
65
|
} else {
|
|
64
|
-
|
|
66
|
+
t5 = $[33];
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
className:
|
|
68
|
+
t1 = _jsxs("div", {
|
|
69
|
+
className: t5.join(" "),
|
|
70
|
+
"data-size": size,
|
|
68
71
|
style,
|
|
69
72
|
children: [_jsx(RenderCustomComponent, {
|
|
70
73
|
CustomComponent: Label,
|
|
@@ -158,15 +161,16 @@ export const TextInput = props => {
|
|
|
158
161
|
$[20] = required;
|
|
159
162
|
$[21] = rtl;
|
|
160
163
|
$[22] = showError;
|
|
161
|
-
$[23] =
|
|
162
|
-
$[24] =
|
|
163
|
-
$[25] =
|
|
164
|
-
$[26] =
|
|
165
|
-
$[27] =
|
|
164
|
+
$[23] = size;
|
|
165
|
+
$[24] = style;
|
|
166
|
+
$[25] = t;
|
|
167
|
+
$[26] = value;
|
|
168
|
+
$[27] = valueToRender;
|
|
169
|
+
$[28] = t1;
|
|
166
170
|
} else {
|
|
167
|
-
|
|
171
|
+
t1 = $[28];
|
|
168
172
|
}
|
|
169
|
-
return
|
|
173
|
+
return t1;
|
|
170
174
|
};
|
|
171
175
|
function _temp(event) {
|
|
172
176
|
event.currentTarget.contentEditable = "false";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":["c","_c","getTranslation","React","ReactSelect","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useTranslation","fieldBaseClass","TextInput","props","$","id","idFromProps","AfterInput","BeforeInput","className","Description","description","Error","hasMany","htmlAttributes","inputRef","Label","label","localized","maxRows","onChange","onKeyDown","path","placeholder","placeholderFromProps","readOnly","required","rtl","showError","style","value","valueToRender","i18n","t","editableProps","_temp2","t0","t1","t2","t3","t4","filter","Boolean","_jsxs","join","children","_jsx","CustomComponent","Fallback","htmlFor","replace","components","DropdownIndicator","customProps","disabled","filterOption","Array","isArray","length","isClearable","isCreatable","isMulti","isSortable","menuIsOpen","noOptionsMessage","isOverHasMany","max","options","name","ref","type","_temp","event","currentTarget","contentEditable","data","className_0","selectProps","editableClassName","onBlur","onClick","event_0","classList","add","focus","event_1","nativeEvent","isComposing","key","remove","innerText","replaceAll","action","option","newValues","v","removedValue","preventDefault","stopPropagation"],"sources":["../../../src/fields/Text/Input.tsx"],"sourcesContent":["'use client'\nimport type { ChangeEvent } from 'react'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport type { ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js'\nimport type { TextInputProps } from './types.js'\n\nimport { ReactSelect } from '../../elements/ReactSelect/index.js'\nimport { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport './index.css'\n\nexport const TextInput: React.FC<TextInputProps> = (props) => {\n const {\n id: idFromProps,\n AfterInput,\n BeforeInput,\n className,\n Description,\n description,\n Error,\n hasMany,\n htmlAttributes,\n inputRef,\n Label,\n label,\n localized,\n maxRows,\n onChange,\n onKeyDown,\n path,\n placeholder: placeholderFromProps,\n readOnly,\n required,\n rtl,\n showError,\n style,\n value,\n valueToRender,\n } = props\n\n const { i18n, t } = useTranslation()\n\n const editableProps: ReactSelectAdapterProps['customProps']['editableProps'] = (\n data,\n className,\n selectProps,\n ) => {\n const editableClassName = `${className}--editable`\n\n return {\n onBlur: (event: React.FocusEvent<HTMLDivElement>) => {\n event.currentTarget.contentEditable = 'false'\n },\n onClick: (event: React.MouseEvent<HTMLDivElement>) => {\n event.currentTarget.contentEditable = 'true'\n event.currentTarget.classList.add(editableClassName)\n event.currentTarget.focus()\n },\n onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.nativeEvent.isComposing &&\n (event.key === 'Enter' || event.key === 'Tab' || event.key === 'Escape')\n ) {\n event.currentTarget.contentEditable = 'false'\n event.currentTarget.classList.remove(editableClassName)\n data.value.value = event.currentTarget.innerText\n data.label = event.currentTarget.innerText\n\n if (data.value.value.replaceAll('\\n', '')) {\n selectProps.onChange(selectProps.value, {\n action: 'create-option',\n option: data,\n })\n } else {\n if (Array.isArray(selectProps.value)) {\n const newValues = selectProps.value.filter((v) => v.id !== data.id)\n selectProps.onChange(newValues, {\n action: 'pop-value',\n removedValue: data,\n })\n }\n }\n\n event.preventDefault()\n }\n event.stopPropagation()\n },\n }\n }\n\n const placeholder = getTranslation(placeholderFromProps, i18n)\n\n return (\n <div\n className={[\n fieldBaseClass,\n 'text',\n className,\n showError && 'error',\n readOnly && 'read-only',\n hasMany && 'has-many',\n ]\n .filter(Boolean)\n .join(' ')}\n style={style}\n >\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n htmlFor={idFromProps}\n label={label}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className={`${fieldBaseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {BeforeInput}\n {hasMany ? (\n <ReactSelect\n className={`field-${path.replace(/\\./g, '__')}`}\n components={{ DropdownIndicator: null }}\n customProps={{\n editableProps,\n }}\n disabled={readOnly}\n // prevent adding additional options if maxRows is reached\n filterOption={() =>\n !maxRows ? true : !(Array.isArray(value) && maxRows && value.length >= maxRows)\n }\n isClearable={false}\n isCreatable\n isMulti\n isSortable\n menuIsOpen={false}\n noOptionsMessage={() => {\n const isOverHasMany = Array.isArray(value) && value.length >= maxRows\n if (isOverHasMany) {\n return t('validation:limitReached', { max: maxRows, value: value.length + 1 })\n }\n return null\n }}\n onChange={onChange}\n options={[]}\n placeholder={placeholder}\n showError={showError}\n value={valueToRender}\n />\n ) : (\n <input\n className=\"form-input\"\n data-rtl={rtl}\n disabled={readOnly}\n id={idFromProps ?? `field-${path?.replace(/\\./g, '__')}`}\n name={path}\n onChange={onChange as (e: ChangeEvent<HTMLInputElement>) => void}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n type=\"text\"\n value={value || ''}\n {...(htmlAttributes ?? {})}\n />\n )}\n {AfterInput}\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAKlB,SAASC,WAAW,QAAQ;AAC5B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,OAAO,MAAMC,SAAA,GAAsCC,KAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EACjD;IAAAa,EAAA,EAAAC,WAAA;IAAAC,UAAA;IAAAC,WAAA;IAAAC,SAAA;IAAAC,WAAA;IAAAC,WAAA;IAAAC,KAAA;IAAAC,OAAA;IAAAC,cAAA;IAAAC,QAAA;IAAAC,KAA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A;MAEtBzB,OAAA,CAAA0B,eAAA,CAAqB;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Input.js","names":["c","_c","getTranslation","React","ReactSelect","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useTranslation","fieldBaseClass","TextInput","props","$","id","idFromProps","AfterInput","BeforeInput","className","Description","description","Error","hasMany","htmlAttributes","inputRef","Label","label","localized","maxRows","onChange","onKeyDown","path","placeholder","placeholderFromProps","readOnly","required","rtl","showError","size","t0","style","value","valueToRender","undefined","i18n","t","editableProps","_temp2","t1","t2","t3","t4","t5","filter","Boolean","_jsxs","join","children","_jsx","CustomComponent","Fallback","htmlFor","replace","components","DropdownIndicator","customProps","disabled","filterOption","Array","isArray","length","isClearable","isCreatable","isMulti","isSortable","menuIsOpen","noOptionsMessage","isOverHasMany","max","options","name","ref","type","_temp","event","currentTarget","contentEditable","data","className_0","selectProps","editableClassName","onBlur","onClick","event_0","classList","add","focus","event_1","nativeEvent","isComposing","key","remove","innerText","replaceAll","action","option","newValues","v","removedValue","preventDefault","stopPropagation"],"sources":["../../../src/fields/Text/Input.tsx"],"sourcesContent":["'use client'\nimport type { ChangeEvent } from 'react'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport type { ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js'\nimport type { TextInputProps } from './types.js'\n\nimport { ReactSelect } from '../../elements/ReactSelect/index.js'\nimport { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport './index.css'\n\nexport const TextInput: React.FC<TextInputProps> = (props) => {\n const {\n id: idFromProps,\n AfterInput,\n BeforeInput,\n className,\n Description,\n description,\n Error,\n hasMany,\n htmlAttributes,\n inputRef,\n Label,\n label,\n localized,\n maxRows,\n onChange,\n onKeyDown,\n path,\n placeholder: placeholderFromProps,\n readOnly,\n required,\n rtl,\n showError,\n size = 'large',\n style,\n value,\n valueToRender,\n } = props\n\n const { i18n, t } = useTranslation()\n\n const editableProps: ReactSelectAdapterProps['customProps']['editableProps'] = (\n data,\n className,\n selectProps,\n ) => {\n const editableClassName = `${className}--editable`\n\n return {\n onBlur: (event: React.FocusEvent<HTMLDivElement>) => {\n event.currentTarget.contentEditable = 'false'\n },\n onClick: (event: React.MouseEvent<HTMLDivElement>) => {\n event.currentTarget.contentEditable = 'true'\n event.currentTarget.classList.add(editableClassName)\n event.currentTarget.focus()\n },\n onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.nativeEvent.isComposing &&\n (event.key === 'Enter' || event.key === 'Tab' || event.key === 'Escape')\n ) {\n event.currentTarget.contentEditable = 'false'\n event.currentTarget.classList.remove(editableClassName)\n data.value.value = event.currentTarget.innerText\n data.label = event.currentTarget.innerText\n\n if (data.value.value.replaceAll('\\n', '')) {\n selectProps.onChange(selectProps.value, {\n action: 'create-option',\n option: data,\n })\n } else {\n if (Array.isArray(selectProps.value)) {\n const newValues = selectProps.value.filter((v) => v.id !== data.id)\n selectProps.onChange(newValues, {\n action: 'pop-value',\n removedValue: data,\n })\n }\n }\n\n event.preventDefault()\n }\n event.stopPropagation()\n },\n }\n }\n\n const placeholder = getTranslation(placeholderFromProps, i18n)\n\n return (\n <div\n className={[\n fieldBaseClass,\n 'text',\n className,\n showError && 'error',\n readOnly && 'read-only',\n hasMany && 'has-many',\n ]\n .filter(Boolean)\n .join(' ')}\n data-size={size}\n style={style}\n >\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n htmlFor={idFromProps}\n label={label}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className={`${fieldBaseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {BeforeInput}\n {hasMany ? (\n <ReactSelect\n className={`field-${path.replace(/\\./g, '__')}`}\n components={{ DropdownIndicator: null }}\n customProps={{\n editableProps,\n }}\n disabled={readOnly}\n // prevent adding additional options if maxRows is reached\n filterOption={() =>\n !maxRows ? true : !(Array.isArray(value) && maxRows && value.length >= maxRows)\n }\n isClearable={false}\n isCreatable\n isMulti\n isSortable\n menuIsOpen={false}\n noOptionsMessage={() => {\n const isOverHasMany = Array.isArray(value) && value.length >= maxRows\n if (isOverHasMany) {\n return t('validation:limitReached', { max: maxRows, value: value.length + 1 })\n }\n return null\n }}\n onChange={onChange}\n options={[]}\n placeholder={placeholder}\n showError={showError}\n value={valueToRender}\n />\n ) : (\n <input\n className=\"form-input\"\n data-rtl={rtl}\n disabled={readOnly}\n id={idFromProps ?? `field-${path?.replace(/\\./g, '__')}`}\n name={path}\n onChange={onChange as (e: ChangeEvent<HTMLInputElement>) => void}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n type=\"text\"\n value={value || ''}\n {...(htmlAttributes ?? {})}\n />\n )}\n {AfterInput}\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAKlB,SAASC,WAAW,QAAQ;AAC5B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,OAAO,MAAMC,SAAA,GAAsCC,KAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EACjD;IAAAa,EAAA,EAAAC,WAAA;IAAAC,UAAA;IAAAC,WAAA;IAAAC,SAAA;IAAAC,WAAA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MAAA,CAAAsD,CAAA,IAAgCA,CAAA,CAAA7F,EAAA,KAASyE,IAAA,CAAAzE,EAAO;YAClE2E,WAAA,CAAA5D,QAAA,CAAqB6E,SAAA;cAAAF,MAAA,EACX;cAAAI,YAAA,EACMrB;YAAA,CAChB;UAAA;QAAA;QAIJH,OAAA,CAAAyB,cAAA,CAAoB;MAAA;MAEtBzB,OAAA,CAAA0B,eAAA,CAAqB;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -10,5 +10,5 @@ export declare const TextField: React.FC<{
|
|
|
10
10
|
readonly validate?: import("payload").TextFieldValidation;
|
|
11
11
|
} & {
|
|
12
12
|
readonly field: Omit<import("payload").TextFieldClient, "type"> & Partial<Pick<import("payload").TextFieldClient, "type">>;
|
|
13
|
-
} & Omit<import("payload").ClientComponentProps, "
|
|
13
|
+
} & Omit<import("payload").ClientComponentProps, "customComponents" | "field">>;
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StaticDescription, StaticLabel } from 'payload';
|
|
1
|
+
import type { BrowserAutoComplete, StaticDescription, StaticLabel } from 'payload';
|
|
2
2
|
import type { ChangeEvent, JSX } from 'react';
|
|
3
3
|
import type React from 'react';
|
|
4
4
|
import type { Option, ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js';
|
|
@@ -18,7 +18,7 @@ export type TextInputProps = {
|
|
|
18
18
|
readonly Error?: React.ReactNode;
|
|
19
19
|
readonly htmlAttributes?: {
|
|
20
20
|
'aria-label'?: JSX.IntrinsicElements['input']['aria-label'];
|
|
21
|
-
autoComplete?:
|
|
21
|
+
autoComplete?: BrowserAutoComplete;
|
|
22
22
|
readOnly?: JSX.IntrinsicElements['input']['readOnly'];
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
@@ -39,6 +39,10 @@ export type TextInputProps = {
|
|
|
39
39
|
readonly required?: boolean;
|
|
40
40
|
readonly rtl?: boolean;
|
|
41
41
|
readonly showError?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Controls the height of the input. Defaults to `'large'`.
|
|
44
|
+
*/
|
|
45
|
+
readonly size?: 'large' | 'medium';
|
|
42
46
|
readonly style?: React.CSSProperties;
|
|
43
47
|
readonly value?: string;
|
|
44
48
|
readonly valueToRender?: Option[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/Text/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/Text/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAE1F,MAAM,MAAM,oBAAoB,GAC5B;IACE,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC/D,GACD;IACE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAA;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CACxD,CAAA;AAEL,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MA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QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAClC,GAAG,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/fields/Text/types.ts"],"sourcesContent":["import type { StaticDescription, StaticLabel } from 'payload'\nimport type { ChangeEvent, JSX } from 'react'\nimport type React from 'react'\n\nimport type { Option, ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js'\n\nexport type SharedTextFieldProps =\n | {\n readonly hasMany?: false\n readonly onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n }\n | {\n readonly hasMany?: true\n readonly onChange?: ReactSelectAdapterProps['onChange']\n }\n\nexport type TextInputProps = {\n readonly AfterInput?: React.ReactNode\n readonly BeforeInput?: React.ReactNode\n readonly className?: string\n readonly Description?: React.ReactNode\n readonly description?: StaticDescription\n readonly Error?: React.ReactNode\n readonly htmlAttributes?: {\n 'aria-label'?: JSX.IntrinsicElements['input']['aria-label']\n autoComplete?:
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/fields/Text/types.ts"],"sourcesContent":["import type { BrowserAutoComplete, StaticDescription, StaticLabel } from 'payload'\nimport type { ChangeEvent, JSX } from 'react'\nimport type React from 'react'\n\nimport type { Option, ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js'\n\nexport type SharedTextFieldProps =\n | {\n readonly hasMany?: false\n readonly onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n }\n | {\n readonly hasMany?: true\n readonly onChange?: ReactSelectAdapterProps['onChange']\n }\n\nexport type TextInputProps = {\n readonly AfterInput?: React.ReactNode\n readonly BeforeInput?: React.ReactNode\n readonly className?: string\n readonly Description?: React.ReactNode\n readonly description?: StaticDescription\n readonly Error?: React.ReactNode\n readonly htmlAttributes?: {\n 'aria-label'?: JSX.IntrinsicElements['input']['aria-label']\n autoComplete?: BrowserAutoComplete\n readOnly?: JSX.IntrinsicElements['input']['readOnly']\n }\n /**\n * Overrides the input `id` and label `htmlFor`. Defaults to 'field-' + path.\n * Use to avoid duplicate IDs when two inputs share a path.\n */\n readonly id?: string\n readonly inputRef?: React.RefObject<HTMLInputElement>\n readonly Label?: React.ReactNode\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly maxRows?: number\n readonly minRows?: number\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly path: string\n readonly placeholder?: Record<string, string> | string\n readonly readOnly?: boolean\n readonly required?: boolean\n readonly rtl?: boolean\n readonly showError?: boolean\n /**\n * Controls the height of the input. Defaults to `'large'`.\n */\n readonly size?: 'large' | 'medium'\n readonly style?: React.CSSProperties\n readonly value?: string\n readonly valueToRender?: Option[]\n} & SharedTextFieldProps\n"],"mappings":"AAgBA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAQpD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAQpD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoFtD,CAAA"}
|
|
@@ -12,7 +12,7 @@ import { useTranslation } from '../../providers/Translation/index.js';
|
|
|
12
12
|
import { fieldBaseClass } from '../shared/index.js';
|
|
13
13
|
import './index.css';
|
|
14
14
|
export const TextareaInput = props => {
|
|
15
|
-
const $ = _c(
|
|
15
|
+
const $ = _c(27);
|
|
16
16
|
const {
|
|
17
17
|
AfterInput,
|
|
18
18
|
BeforeInput,
|
|
@@ -31,35 +31,38 @@ export const TextareaInput = props => {
|
|
|
31
31
|
rows,
|
|
32
32
|
rtl,
|
|
33
33
|
showError,
|
|
34
|
+
size: t0,
|
|
34
35
|
style,
|
|
35
36
|
value
|
|
36
37
|
} = props;
|
|
38
|
+
const size = t0 === undefined ? "large" : t0;
|
|
37
39
|
const {
|
|
38
40
|
i18n
|
|
39
41
|
} = useTranslation();
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
let
|
|
43
|
-
if ($[0] !== className || $[1] !==
|
|
44
|
-
|
|
42
|
+
const t1 = showError && "error";
|
|
43
|
+
const t2 = readOnly && "read-only";
|
|
44
|
+
let t3;
|
|
45
|
+
if ($[0] !== className || $[1] !== t1 || $[2] !== t2) {
|
|
46
|
+
t3 = [fieldBaseClass, "textarea", className, t1, t2].filter(Boolean);
|
|
45
47
|
$[0] = className;
|
|
46
|
-
$[1] =
|
|
47
|
-
$[2] =
|
|
48
|
-
$[3] =
|
|
48
|
+
$[1] = t1;
|
|
49
|
+
$[2] = t2;
|
|
50
|
+
$[3] = t3;
|
|
49
51
|
} else {
|
|
50
|
-
|
|
52
|
+
t3 = $[3];
|
|
51
53
|
}
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
if ($[4] !== AfterInput || $[5] !== BeforeInput || $[6] !== Description || $[7] !== Error || $[8] !== Label || $[9] !== description || $[10] !== i18n || $[11] !== label || $[12] !== localized || $[13] !== onChange || $[14] !== path || $[15] !== placeholder || $[16] !== readOnly || $[17] !== required || $[18] !== rows || $[19] !== rtl || $[20] !== showError || $[21] !==
|
|
56
|
-
|
|
57
|
-
className:
|
|
54
|
+
const t4 = t3.join(" ");
|
|
55
|
+
const t5 = `field-${path.replace(/\./g, "__")}`;
|
|
56
|
+
let t6;
|
|
57
|
+
if ($[4] !== AfterInput || $[5] !== BeforeInput || $[6] !== Description || $[7] !== Error || $[8] !== Label || $[9] !== description || $[10] !== i18n || $[11] !== label || $[12] !== localized || $[13] !== onChange || $[14] !== path || $[15] !== placeholder || $[16] !== readOnly || $[17] !== required || $[18] !== rows || $[19] !== rtl || $[20] !== showError || $[21] !== size || $[22] !== style || $[23] !== t4 || $[24] !== t5 || $[25] !== value) {
|
|
58
|
+
t6 = _jsxs("div", {
|
|
59
|
+
className: t4,
|
|
60
|
+
"data-size": size,
|
|
58
61
|
style,
|
|
59
62
|
children: [_jsx(RenderCustomComponent, {
|
|
60
63
|
CustomComponent: Label,
|
|
61
64
|
Fallback: _jsx(FieldLabel, {
|
|
62
|
-
htmlFor:
|
|
65
|
+
htmlFor: t5,
|
|
63
66
|
label,
|
|
64
67
|
localized,
|
|
65
68
|
path,
|
|
@@ -115,14 +118,15 @@ export const TextareaInput = props => {
|
|
|
115
118
|
$[18] = rows;
|
|
116
119
|
$[19] = rtl;
|
|
117
120
|
$[20] = showError;
|
|
118
|
-
$[21] =
|
|
119
|
-
$[22] =
|
|
121
|
+
$[21] = size;
|
|
122
|
+
$[22] = style;
|
|
120
123
|
$[23] = t4;
|
|
121
|
-
$[24] =
|
|
122
|
-
$[25] =
|
|
124
|
+
$[24] = t5;
|
|
125
|
+
$[25] = value;
|
|
126
|
+
$[26] = t6;
|
|
123
127
|
} else {
|
|
124
|
-
|
|
128
|
+
t6 = $[26];
|
|
125
129
|
}
|
|
126
|
-
return
|
|
130
|
+
return t6;
|
|
127
131
|
};
|
|
128
132
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":["c","_c","getTranslation","React","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useTranslation","fieldBaseClass","TextareaInput","props","$","AfterInput","BeforeInput","className","Description","description","Error","Label","label","localized","onChange","path","placeholder","readOnly","required","rows","rtl","showError","style","value","
|
|
1
|
+
{"version":3,"file":"Input.js","names":["c","_c","getTranslation","React","RenderCustomComponent","FieldDescription","FieldError","FieldLabel","useTranslation","fieldBaseClass","TextareaInput","props","$","AfterInput","BeforeInput","className","Description","description","Error","Label","label","localized","onChange","path","placeholder","readOnly","required","rows","rtl","showError","size","t0","style","value","undefined","i18n","t1","t2","t3","filter","Boolean","t4","join","t5","replace","t6","_jsxs","children","_jsx","CustomComponent","Fallback","htmlFor","disabled","id","name"],"sources":["../../../src/fields/Textarea/Input.tsx"],"sourcesContent":["'use client'\nimport type { CSSProperties } from 'react'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport type { TextAreaInputProps } from './types.js'\n\nimport { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js'\nimport { FieldDescription } from '../../fields/FieldDescription/index.js'\nimport { FieldError } from '../../fields/FieldError/index.js'\nimport { FieldLabel } from '../../fields/FieldLabel/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { fieldBaseClass } from '../shared/index.js'\nimport './index.css'\n\nexport const TextareaInput: React.FC<TextAreaInputProps> = (props) => {\n const {\n AfterInput,\n BeforeInput,\n className,\n Description,\n description,\n Error,\n Label,\n label,\n localized,\n onChange,\n path,\n placeholder,\n readOnly,\n required,\n rows,\n rtl,\n showError,\n size = 'large',\n style,\n value,\n } = props\n\n const { i18n } = useTranslation()\n\n return (\n <div\n className={[\n fieldBaseClass,\n 'textarea',\n className,\n showError && 'error',\n readOnly && 'read-only',\n ]\n .filter(Boolean)\n .join(' ')}\n data-size={size}\n style={style}\n >\n <RenderCustomComponent\n CustomComponent={Label}\n Fallback={\n <FieldLabel\n htmlFor={`field-${path.replace(/\\./g, '__')}`}\n label={label}\n localized={localized}\n path={path}\n required={required}\n />\n }\n />\n <div className={`${fieldBaseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {BeforeInput}\n <div className=\"textarea-outer\">\n <textarea\n className=\"form-input\"\n data-rtl={rtl}\n disabled={readOnly}\n id={`field-${path.replace(/\\./g, '__')}`}\n name={path}\n onChange={onChange}\n placeholder={getTranslation(placeholder, i18n)}\n rows={rows}\n style={\n {\n '--rows': rows,\n } as CSSProperties\n }\n value={value || ''}\n />\n </div>\n {AfterInput}\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAIlB,SAASC,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,OAAO,MAAMC,aAAA,GAA8CC,KAAA;EAAA,MAAAC,CAAA,GAAAX,EAAA;EACzD;IAAAY,UAAA;IAAAC,WAAA;IAAAC,SAAA;IAAAC,WAAA;IAAAC,WAAA;IAAAC,KAAA;IAAAC,KAAA;IAAAC,KAAA;IAAAC,SAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,WAAA;IAAAC,QAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,GAAA;IAAAC,SAAA;IAAAC,IAAA,EAAAC,EAAA;IAAAC,KAAA;IAAAC;EAAA,IAqBItB,KAAA;EAHF,MAAAmB,IAAA,GAAAC,EAAc,KAAAG,SAAA,GAAP,OAAO,GAAdH,EAAc;EAKhB;IAAAI;EAAA,IAAiB3B,cAAA;EAQX,MAAA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AAA,aACGX,IAAA;MAAAE,KAAA;MAAAe,QAAA,GAGXC,IAAA,CAAA5C,qBAAA;QAAA6C,eAAA,EACmB9B,KAAA;QAAA+B,QAAA,EAEfF,IAAA,CAAAzC,UAAA;UAAA4C,OAAA,EACWR,EAAoC;UAAAvB,KAAA;UAAAC,SAAA;UAAAE,IAAA;UAAAG;QAAA,C;UAQnDoB,KAAA,CAAC;QAAA/B,SAAA,EAAe,GAAAN,cAAA,QAAyB;QAAAsC,QAAA,GACvCC,IAAA,CAAA5C,qBAAA;UAAA6C,eAAA,EACmB/B,KAAA;UAAAgC,QAAA,EACPF,IAAA,CAAA1C,UAAA;YAAAiB,IAAA;YAAAM;UAAA,C;YAEXf,WAAA,EACDkC,IAAA,CAAC;UAAAjC,SAAA,EAAc;UAAAgC,QAAA,EACbC,IAAA,CAAC;YAAAjC,SAAA,EACW;YAAA,YACAa,GAAA;YAAAwB,QAAA,EACA3B,QAAA;YAAA4B,EAAA,EACN,SAAS9B,IAAA,CAAAqB,OAAA,QAAoB,OAAO;YAAAU,IAAA,EAClC/B,IAAA;YAAAD,QAAA;YAAAE,WAAA,EAEOtB,cAAA,CAAesB,WAAA,EAAaW,IAAA;YAAAR,IAAA;YAAAK,KAAA;cAAA,UAI3BL;YAAA;YAAAM,KAAA,EAGPA,KAAA,IAAS;UAAA,C;YAGnBpB,UAAA,EACDmC,IAAA,CAAA5C,qBAAA;UAAA6C,eAAA,EACmBjC,WAAA;UAAAkC,QAAA,EACPF,IAAA,CAAA3C,gBAAA;YAAAY,WAAA;YAAAM;UAAA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SApDhBsB,E;CAyDJ","ignoreList":[]}
|
|
@@ -11,5 +11,5 @@ export declare const TextareaField: React.FC<{
|
|
|
11
11
|
readonly validate?: TextareaFieldValidation;
|
|
12
12
|
} & {
|
|
13
13
|
readonly field: Omit<import("payload").TextareaFieldClient, "type"> & Partial<Pick<import("payload").TextareaFieldClient, "type">>;
|
|
14
|
-
} & Omit<import("payload").ClientComponentProps, "
|
|
14
|
+
} & Omit<import("payload").ClientComponentProps, "customComponents" | "field">>;
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -21,6 +21,10 @@ export type TextAreaInputProps = {
|
|
|
21
21
|
readonly rows?: number;
|
|
22
22
|
readonly rtl?: boolean;
|
|
23
23
|
readonly showError?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Controls the height of the input. Defaults to `'large'`.
|
|
26
|
+
*/
|
|
27
|
+
readonly size?: 'large' | 'medium';
|
|
24
28
|
readonly style?: React.CSSProperties;
|
|
25
29
|
readonly value?: string;
|
|
26
30
|
readonly valueToRender?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAA;AAExC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAA;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/fields/Textarea/types.ts"],"sourcesContent":["import type { StaticDescription, StaticLabel } from 'payload'\nimport type React from 'react'\n\nimport { type ChangeEvent } from 'react'\n\nexport type TextAreaInputProps = {\n readonly AfterInput?: React.ReactNode\n readonly BeforeInput?: React.ReactNode\n readonly className?: string\n readonly Description?: React.ReactNode\n readonly description?: StaticDescription\n readonly Error?: React.ReactNode\n readonly inputRef?: React.RefObject<HTMLInputElement>\n readonly Label?: React.ReactNode\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly path: string\n readonly placeholder?: string\n readonly readOnly?: boolean\n readonly required?: boolean\n readonly rows?: number\n readonly rtl?: boolean\n readonly showError?: boolean\n readonly style?: React.CSSProperties\n readonly value?: string\n readonly valueToRender?: string\n}\n"],"mappings":"AAKA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/fields/Textarea/types.ts"],"sourcesContent":["import type { StaticDescription, StaticLabel } from 'payload'\nimport type React from 'react'\n\nimport { type ChangeEvent } from 'react'\n\nexport type TextAreaInputProps = {\n readonly AfterInput?: React.ReactNode\n readonly BeforeInput?: React.ReactNode\n readonly className?: string\n readonly Description?: React.ReactNode\n readonly description?: StaticDescription\n readonly Error?: React.ReactNode\n readonly inputRef?: React.RefObject<HTMLInputElement>\n readonly Label?: React.ReactNode\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly path: string\n readonly placeholder?: string\n readonly readOnly?: boolean\n readonly required?: boolean\n readonly rows?: number\n readonly rtl?: boolean\n readonly showError?: boolean\n /**\n * Controls the height of the input. Defaults to `'large'`.\n */\n readonly size?: 'large' | 'medium'\n readonly style?: React.CSSProperties\n readonly value?: string\n readonly valueToRender?: string\n}\n"],"mappings":"AAKA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAiC3E,cAAc,mBAAmB,CAAA;AAEjC,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC;CAC1D,GAAG;IACF,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAAC,CAAA;IACpD,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,oBA2B7B,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAA;IAC9C,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAA;IAClC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAA;IAClC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAA;CACnB,GAAG,oBAAoB,CAAA;AAExB,eAAO,MAAM,kBAAkB,EAAE,wBAMhC,CAAA"}
|
package/dist/fields/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import { RelationshipField } from './Relationship/index.js';
|
|
|
24
24
|
import { RichTextField } from './RichText/index.js';
|
|
25
25
|
import { RowField } from './Row/index.js';
|
|
26
26
|
import { SelectField } from './Select/index.js';
|
|
27
|
+
import { SlugField } from './Slug/index.js';
|
|
27
28
|
import { TabsField } from './Tabs/index.js';
|
|
28
29
|
import { TextField } from './Text/index.js';
|
|
29
30
|
import { TextareaField } from './Textarea/index.js';
|
|
@@ -31,6 +32,7 @@ import { UIField } from './UI/index.js';
|
|
|
31
32
|
import { UploadField } from './Upload/index.js';
|
|
32
33
|
export * from './shared/index.js';
|
|
33
34
|
export const fieldComponents = {
|
|
35
|
+
slug: SlugField,
|
|
34
36
|
array: ArrayField,
|
|
35
37
|
blocks: BlocksField,
|
|
36
38
|
checkbox: CheckboxField,
|
package/dist/fields/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RowLabel","ArrayField","BlocksField","CheckboxField","CodeField","CollapsibleField","ConfirmPasswordField","DateTimeField","EmailField","FieldDescription","FieldError","FieldLabel","GroupField","HiddenField","JoinField","JSONField","NumberField","PasswordField","PointField","RadioGroupField","RelationshipField","RichTextField","RowField","SelectField","TabsField","TextField","TextareaField","UIField","UploadField","fieldComponents","array","blocks","checkbox","code","collapsible","confirmPassword","date","email","group","hidden","join","json","number","password","point","radio","relationship","richText","row","select","tabs","text","textarea","ui","upload","allFieldComponents","Description","Error","Label"],"sources":["../../src/fields/index.tsx"],"sourcesContent":["'use client'\nimport type {\n ClientFieldBase,\n FieldTypes,\n GenericDescriptionProps,\n GenericErrorProps,\n GenericLabelProps,\n HiddenFieldProps,\n} from 'payload'\nimport type React from 'react'\n\nimport type { ConfirmPasswordFieldProps } from './ConfirmPassword/index.js'\n\nimport { RowLabel } from '../forms/RowLabel/index.js'\nimport { ArrayField } from './Array/index.js'\nimport { BlocksField } from './Blocks/index.js'\nimport { CheckboxField } from './Checkbox/index.js'\nimport { CodeField } from './Code/index.js'\nimport { CollapsibleField } from './Collapsible/index.js'\nimport { ConfirmPasswordField } from './ConfirmPassword/index.js'\nimport { DateTimeField } from './DateTime/index.js'\nimport { EmailField } from './Email/index.js'\nimport { FieldDescription } from './FieldDescription/index.js'\nimport { FieldError } from './FieldError/index.js'\nimport { FieldLabel } from './FieldLabel/index.js'\nimport { GroupField } from './Group/index.js'\nimport { HiddenField } from './Hidden/index.js'\nimport { JoinField } from './Join/index.js'\nimport { JSONField } from './JSON/index.js'\nimport { NumberField } from './Number/index.js'\nimport { PasswordField } from './Password/index.js'\nimport { PointField } from './Point/index.js'\nimport { RadioGroupField } from './RadioGroup/index.js'\nimport { RelationshipField } from './Relationship/index.js'\nimport { RichTextField } from './RichText/index.js'\nimport { RowField } from './Row/index.js'\nimport { SelectField } from './Select/index.js'\nimport { TabsField } from './Tabs/index.js'\nimport { TextField } from './Text/index.js'\nimport { TextareaField } from './Textarea/index.js'\nimport { UIField } from './UI/index.js'\nimport { UploadField } from './Upload/index.js'\n\nexport * from './shared/index.js'\n\nexport type FieldTypesComponents = {\n [K in 'password' | FieldTypes]: React.FC<ClientFieldBase>\n} & {\n confirmPassword: React.FC<ConfirmPasswordFieldProps>\n hidden: React.FC<HiddenFieldProps>\n}\n\nexport const fieldComponents: FieldTypesComponents = {\n array: ArrayField,\n blocks: BlocksField,\n checkbox: CheckboxField,\n code: CodeField,\n collapsible: CollapsibleField,\n confirmPassword: ConfirmPasswordField,\n date: DateTimeField,\n email: EmailField,\n group: GroupField,\n hidden: HiddenField,\n join: JoinField,\n json: JSONField,\n number: NumberField,\n password: PasswordField,\n point: PointField,\n radio: RadioGroupField,\n relationship: RelationshipField,\n richText: RichTextField,\n row: RowField,\n select: SelectField,\n tabs: TabsField,\n text: TextField,\n textarea: TextareaField,\n ui: UIField,\n upload: UploadField,\n}\n\nexport type FieldComponentsWithSlots = {\n Description: React.FC<GenericDescriptionProps>\n Error: React.FC<GenericErrorProps>\n Label: React.FC<GenericLabelProps>\n RowLabel: React.FC\n} & FieldTypesComponents\n\nexport const allFieldComponents: FieldComponentsWithSlots = {\n ...fieldComponents,\n Description: FieldDescription,\n Error: FieldError,\n Label: FieldLabel,\n RowLabel,\n}\n"],"mappings":"AAAA;;AAaA,SAASA,QAAQ,QAAQ;AACzB,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,QAAQ;AAC1B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,SAASC,UAAU,QAAQ;AAC3B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAC1B,SAASC,WAAW,QAAQ;AAC5B,SAASC,aAAa,QAAQ;AAC9B,SAASC,UAAU,QAAQ;AAC3B,SAASC,eAAe,QAAQ;AAChC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AACzB,SAASC,WAAW,QAAQ;AAC5B,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAC1B,SAASC,aAAa,QAAQ;AAC9B,SAASC,OAAO,QAAQ;AACxB,SAASC,WAAW,QAAQ;AAE5B,cAAc;AASd,OAAO,MAAMC,eAAA,GAAwC;EACnDC,KAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["RowLabel","ArrayField","BlocksField","CheckboxField","CodeField","CollapsibleField","ConfirmPasswordField","DateTimeField","EmailField","FieldDescription","FieldError","FieldLabel","GroupField","HiddenField","JoinField","JSONField","NumberField","PasswordField","PointField","RadioGroupField","RelationshipField","RichTextField","RowField","SelectField","SlugField","TabsField","TextField","TextareaField","UIField","UploadField","fieldComponents","slug","array","blocks","checkbox","code","collapsible","confirmPassword","date","email","group","hidden","join","json","number","password","point","radio","relationship","richText","row","select","tabs","text","textarea","ui","upload","allFieldComponents","Description","Error","Label"],"sources":["../../src/fields/index.tsx"],"sourcesContent":["'use client'\nimport type {\n ClientFieldBase,\n FieldTypes,\n GenericDescriptionProps,\n GenericErrorProps,\n GenericLabelProps,\n HiddenFieldProps,\n} from 'payload'\nimport type React from 'react'\n\nimport type { ConfirmPasswordFieldProps } from './ConfirmPassword/index.js'\n\nimport { RowLabel } from '../forms/RowLabel/index.js'\nimport { ArrayField } from './Array/index.js'\nimport { BlocksField } from './Blocks/index.js'\nimport { CheckboxField } from './Checkbox/index.js'\nimport { CodeField } from './Code/index.js'\nimport { CollapsibleField } from './Collapsible/index.js'\nimport { ConfirmPasswordField } from './ConfirmPassword/index.js'\nimport { DateTimeField } from './DateTime/index.js'\nimport { EmailField } from './Email/index.js'\nimport { FieldDescription } from './FieldDescription/index.js'\nimport { FieldError } from './FieldError/index.js'\nimport { FieldLabel } from './FieldLabel/index.js'\nimport { GroupField } from './Group/index.js'\nimport { HiddenField } from './Hidden/index.js'\nimport { JoinField } from './Join/index.js'\nimport { JSONField } from './JSON/index.js'\nimport { NumberField } from './Number/index.js'\nimport { PasswordField } from './Password/index.js'\nimport { PointField } from './Point/index.js'\nimport { RadioGroupField } from './RadioGroup/index.js'\nimport { RelationshipField } from './Relationship/index.js'\nimport { RichTextField } from './RichText/index.js'\nimport { RowField } from './Row/index.js'\nimport { SelectField } from './Select/index.js'\nimport { SlugField } from './Slug/index.js'\nimport { TabsField } from './Tabs/index.js'\nimport { TextField } from './Text/index.js'\nimport { TextareaField } from './Textarea/index.js'\nimport { UIField } from './UI/index.js'\nimport { UploadField } from './Upload/index.js'\n\nexport * from './shared/index.js'\n\nexport type FieldTypesComponents = {\n [K in 'password' | FieldTypes]: React.FC<ClientFieldBase>\n} & {\n confirmPassword: React.FC<ConfirmPasswordFieldProps>\n hidden: React.FC<HiddenFieldProps>\n}\n\nexport const fieldComponents: FieldTypesComponents = {\n slug: SlugField,\n array: ArrayField,\n blocks: BlocksField,\n checkbox: CheckboxField,\n code: CodeField,\n collapsible: CollapsibleField,\n confirmPassword: ConfirmPasswordField,\n date: DateTimeField,\n email: EmailField,\n group: GroupField,\n hidden: HiddenField,\n join: JoinField,\n json: JSONField,\n number: NumberField,\n password: PasswordField,\n point: PointField,\n radio: RadioGroupField,\n relationship: RelationshipField,\n richText: RichTextField,\n row: RowField,\n select: SelectField,\n tabs: TabsField,\n text: TextField,\n textarea: TextareaField,\n ui: UIField,\n upload: UploadField,\n}\n\nexport type FieldComponentsWithSlots = {\n Description: React.FC<GenericDescriptionProps>\n Error: React.FC<GenericErrorProps>\n Label: React.FC<GenericLabelProps>\n RowLabel: React.FC\n} & FieldTypesComponents\n\nexport const allFieldComponents: FieldComponentsWithSlots = {\n ...fieldComponents,\n Description: FieldDescription,\n Error: FieldError,\n Label: FieldLabel,\n RowLabel,\n}\n"],"mappings":"AAAA;;AAaA,SAASA,QAAQ,QAAQ;AACzB,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,aAAa,QAAQ;AAC9B,SAASC,SAAS,QAAQ;AAC1B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,SAASC,UAAU,QAAQ;AAC3B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAC1B,SAASC,WA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