@payloadcms/ui 4.0.0-internal.e387174 → 4.0.0-internal.e38d3ac
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/dist/css/app.css +121 -0
- package/dist/css/forms.css +0 -6
- package/dist/css/spacing.css +11 -3
- package/dist/css/z-index.css +10 -0
- package/dist/elements/AddNewRelation/index.css +0 -1
- package/dist/elements/AnimateHeight/usePatchAnimateHeight.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.css +1 -3
- package/dist/elements/AppHeader/index.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.js +5 -1
- package/dist/elements/AppHeader/index.js.map +1 -1
- package/dist/elements/ArrayAction/index.d.ts +3 -0
- package/dist/elements/ArrayAction/index.d.ts.map +1 -1
- package/dist/elements/ArrayAction/index.js +83 -29
- package/dist/elements/ArrayAction/index.js.map +1 -1
- package/dist/elements/BulkUpload/EditMany/DrawerContent.js +2 -2
- package/dist/elements/BulkUpload/EditMany/DrawerContent.js.map +1 -1
- package/dist/elements/BulkUpload/FileSidebar/index.css +4 -0
- package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts +2 -2
- package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts.map +1 -1
- package/dist/elements/BulkUpload/FormsManager/createFormData.js +4 -15
- package/dist/elements/BulkUpload/FormsManager/createFormData.js.map +1 -1
- package/dist/elements/BulkUpload/FormsManager/index.d.ts.map +1 -1
- package/dist/elements/BulkUpload/FormsManager/index.js +1 -1
- package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
- package/dist/elements/Button/index.css +2 -2
- package/dist/elements/Button/index.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/ClipboardActionLabel.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/clipboardUtilities.d.ts +8 -1
- package/dist/elements/ClipboardAction/clipboardUtilities.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/clipboardUtilities.js +40 -8
- package/dist/elements/ClipboardAction/clipboardUtilities.js.map +1 -1
- package/dist/elements/ClipboardAction/clipboardUtilities.spec.js +120 -0
- package/dist/elements/ClipboardAction/clipboardUtilities.spec.js.map +1 -0
- package/dist/elements/ClipboardAction/index.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/index.js +17 -1
- package/dist/elements/ClipboardAction/index.js.map +1 -1
- package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js +144 -0
- package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js.map +1 -0
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts +10 -0
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js +55 -0
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js.map +1 -1
- package/dist/elements/ClipboardAction/types.d.ts +3 -0
- package/dist/elements/ClipboardAction/types.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/types.js.map +1 -1
- package/dist/elements/ClipboardAction/useCanPasteClipboard.d.ts +10 -0
- package/dist/elements/ClipboardAction/useCanPasteClipboard.d.ts.map +1 -0
- package/dist/elements/ClipboardAction/useCanPasteClipboard.js +21 -0
- package/dist/elements/ClipboardAction/useCanPasteClipboard.js.map +1 -0
- package/dist/elements/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/elements/CodeEditor/index.css +5 -5
- package/dist/elements/CommandPalette/index.css +0 -7
- package/dist/elements/CopyToClipboard/index.d.ts +1 -0
- package/dist/elements/CopyToClipboard/index.d.ts.map +1 -1
- package/dist/elements/CopyToClipboard/index.js +10 -8
- package/dist/elements/CopyToClipboard/index.js.map +1 -1
- package/dist/elements/CreateDocumentButton/index.d.ts.map +1 -1
- package/dist/elements/CreateDocumentButton/index.js +4 -1
- package/dist/elements/CreateDocumentButton/index.js.map +1 -1
- package/dist/elements/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/elements/DatePicker/DatePicker.js +1 -0
- package/dist/elements/DatePicker/DatePicker.js.map +1 -1
- package/dist/elements/DatePicker/getFormattedLocale.d.ts.map +1 -1
- package/dist/elements/DatePicker/index.css +1 -1
- package/dist/elements/DeleteDocument/index.d.ts.map +1 -1
- package/dist/elements/DeleteDocument/index.js +16 -1
- package/dist/elements/DeleteDocument/index.js.map +1 -1
- package/dist/elements/Dialog/DialogTitle/index.d.ts.map +1 -1
- 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.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/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/useDraggableSortable/index.d.ts.map +1 -1
- package/dist/elements/Drawer/index.css +10 -4
- 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/DuplicateDocument/SelectLocalesDrawer/index.js +3 -2
- package/dist/elements/DuplicateDocument/SelectLocalesDrawer/index.js.map +1 -1
- package/dist/elements/EditMany/DrawerContent.js +2 -2
- package/dist/elements/EditMany/DrawerContent.js.map +1 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.d.ts.map +1 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.js +3 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.js.map +1 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.spec.js +143 -0
- package/dist/elements/FieldSelect/reduceFieldOptions.spec.js.map +1 -0
- package/dist/elements/FileDetails/StaticFileDetails/index.css +8 -9
- package/dist/elements/FileManager/FilePreview/index.css +3 -3
- package/dist/elements/FileManager/FileToolbar/index.d.ts.map +1 -1
- package/dist/elements/FileManager/FileToolbar/index.js +3 -0
- package/dist/elements/FileManager/FileToolbar/index.js.map +1 -1
- package/dist/elements/FileManager/index.css +36 -23
- package/dist/elements/FileManager/index.d.ts +1 -1
- package/dist/elements/FileManager/index.d.ts.map +1 -1
- package/dist/elements/FileManager/index.js +15 -4
- package/dist/elements/FileManager/index.js.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/ColumnItem/index.css +0 -1
- package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js +109 -89
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.js +2 -0
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.js.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 +0 -1
- package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/useChildren.d.ts.map +1 -1
- package/dist/elements/IDLabel/index.css +6 -0
- package/dist/elements/IDLabel/index.d.ts +1 -1
- package/dist/elements/IDLabel/index.d.ts.map +1 -1
- package/dist/elements/IDLabel/index.js +16 -21
- package/dist/elements/IDLabel/index.js.map +1 -1
- package/dist/elements/InputStepper/index.css +0 -1
- package/dist/elements/LeaveWithoutSaving/index.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -1
- package/dist/elements/ListDrawer/index.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts +1 -7
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js +26 -32
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js.map +1 -1
- package/dist/elements/LoadingOverlay/reducer.d.ts.map +1 -1
- package/dist/elements/Locked/index.css +0 -8
- 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 +70 -64
- package/dist/elements/Locked/index.js.map +1 -1
- package/dist/elements/MiniCarousel/index.css +39 -37
- package/dist/elements/Nav/SidebarTabs/index.client.d.ts.map +1 -1
- package/dist/elements/Nav/SidebarTabs/index.client.js +12 -5
- package/dist/elements/Nav/SidebarTabs/index.client.js.map +1 -1
- package/dist/elements/Nav/SidebarTabs/index.css +0 -5
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.d.ts +1 -0
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.d.ts.map +1 -1
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js +2 -1
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js.map +1 -1
- package/dist/elements/NavGroup/index.css +0 -1
- package/dist/elements/Popup/PopupButtonList/index.css +1 -1
- package/dist/elements/Popup/index.js +1 -1
- package/dist/elements/Popup/index.js.map +1 -1
- package/dist/elements/PreviewButton/index.d.ts +1 -2
- package/dist/elements/PreviewButton/index.d.ts.map +1 -1
- package/dist/elements/PreviewButton/index.js +11 -5
- package/dist/elements/PreviewButton/index.js.map +1 -1
- package/dist/elements/PreviewSizes/index.css +8 -9
- 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/PublishButton/ScheduleDrawer/index.js +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/index.js.map +1 -1
- package/dist/elements/QueryPresets/QueryPresetBar/index.js +1 -3
- package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
- package/dist/elements/ReactSelect/ClearIndicator/index.css +0 -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/MultiValue/index.css +0 -1
- package/dist/elements/ReactSelect/MultiValueLabel/index.css +2 -2
- 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 +7 -3
- package/dist/elements/ReactSelect/index.d.ts.map +1 -1
- package/dist/elements/ReactSelect/index.js +24 -101
- package/dist/elements/ReactSelect/index.js.map +1 -1
- package/dist/elements/ReactSelect/types.d.ts +1 -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/Pagination.d.ts +0 -1
- package/dist/elements/RelationshipTable/Pagination.d.ts.map +1 -1
- package/dist/elements/RelationshipTable/Pagination.js +27 -77
- package/dist/elements/RelationshipTable/Pagination.js.map +1 -1
- package/dist/elements/RelationshipTable/index.css +0 -2
- package/dist/elements/RelationshipTable/index.d.ts +1 -0
- package/dist/elements/RelationshipTable/index.d.ts.map +1 -1
- package/dist/elements/RelationshipTable/index.js +41 -5
- package/dist/elements/RelationshipTable/index.js.map +1 -1
- package/dist/elements/RenderTitle/index.css +4 -0
- package/dist/elements/RenderTitle/index.d.ts.map +1 -1
- package/dist/elements/RenderTitle/index.js +18 -13
- package/dist/elements/RenderTitle/index.js.map +1 -1
- package/dist/elements/SelectAll/index.css +3 -1
- package/dist/elements/SelectRow/index.d.ts +5 -4
- package/dist/elements/SelectRow/index.d.ts.map +1 -1
- package/dist/elements/SelectRow/index.js +10 -7
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/SidebarToggle/index.css +0 -17
- package/dist/elements/SortColumn/index.d.ts.map +1 -1
- package/dist/elements/SortColumn/index.js +42 -38
- package/dist/elements/SortColumn/index.js.map +1 -1
- package/dist/elements/SortHeader/index.d.ts.map +1 -1
- package/dist/elements/SortHeader/index.js +29 -26
- package/dist/elements/SortHeader/index.js.map +1 -1
- package/dist/elements/StepNav/index.css +64 -14
- package/dist/elements/StepNav/index.d.ts.map +1 -1
- package/dist/elements/StepNav/index.js +143 -69
- package/dist/elements/StepNav/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/DefaultCell/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/index.js +3 -11
- package/dist/elements/Table/DefaultCell/index.js.map +1 -1
- package/dist/elements/Table/OrderableRow.d.ts +3 -1
- package/dist/elements/Table/OrderableRow.d.ts.map +1 -1
- package/dist/elements/Table/OrderableRow.js +17 -1
- package/dist/elements/Table/OrderableRow.js.map +1 -1
- package/dist/elements/Table/OrderableRowDragPreview.d.ts.map +1 -1
- package/dist/elements/Table/OrderableTable.d.ts.map +1 -1
- package/dist/elements/Table/OrderableTable.js +19 -2
- package/dist/elements/Table/OrderableTable.js.map +1 -1
- package/dist/elements/Table/index.css +7 -0
- package/dist/elements/TableSection/index.css +0 -1
- package/dist/elements/Tabs/index.d.ts.map +1 -1
- package/dist/elements/Thumbnail/createThumbnail.d.ts.map +1 -1
- package/dist/elements/Thumbnail/index.d.ts +1 -1
- package/dist/elements/Thumbnail/index.d.ts.map +1 -1
- package/dist/elements/Thumbnail/index.js.map +1 -1
- package/dist/elements/TimezonePicker/index.d.ts.map +1 -1
- package/dist/elements/TimezonePicker/index.js +5 -1
- package/dist/elements/TimezonePicker/index.js.map +1 -1
- package/dist/elements/Tooltip/index.css +15 -34
- package/dist/elements/Tooltip/index.d.ts +11 -3
- package/dist/elements/Tooltip/index.d.ts.map +1 -1
- package/dist/elements/Tooltip/index.js +151 -85
- package/dist/elements/Tooltip/index.js.map +1 -1
- package/dist/elements/Upload/index.css +0 -5
- package/dist/elements/Upload/index.d.ts.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 +5 -1
- 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/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/ArrayRow.d.ts +1 -0
- package/dist/fields/Array/ArrayRow.d.ts.map +1 -1
- package/dist/fields/Array/ArrayRow.js +99 -160
- package/dist/fields/Array/ArrayRow.js.map +1 -1
- 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 +38 -10
- package/dist/fields/Array/index.js.map +1 -1
- package/dist/fields/Blocks/BlockRow.d.ts +1 -0
- package/dist/fields/Blocks/BlockRow.d.ts.map +1 -1
- package/dist/fields/Blocks/BlockRow.js +136 -195
- package/dist/fields/Blocks/BlockRow.js.map +1 -1
- package/dist/fields/Blocks/RowActions.d.ts +3 -0
- package/dist/fields/Blocks/RowActions.d.ts.map +1 -1
- package/dist/fields/Blocks/RowActions.js +26 -20
- package/dist/fields/Blocks/RowActions.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 +38 -10
- package/dist/fields/Blocks/index.js.map +1 -1
- package/dist/fields/Checkbox/Input.d.ts +2 -0
- package/dist/fields/Checkbox/Input.d.ts.map +1 -1
- package/dist/fields/Checkbox/Input.js +32 -26
- package/dist/fields/Checkbox/Input.js.map +1 -1
- package/dist/fields/Checkbox/index.css +37 -73
- 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/DateTime/index.d.ts +1 -1
- package/dist/fields/Email/index.d.ts +1 -1
- package/dist/fields/FieldError/index.css +0 -9
- package/dist/fields/FieldError/index.d.ts.map +1 -1
- package/dist/fields/FieldError/index.js +19 -9
- package/dist/fields/FieldError/index.js.map +1 -1
- package/dist/fields/Group/index.d.ts +2 -2
- package/dist/fields/JSON/index.d.ts +1 -1
- package/dist/fields/Join/index.css +9 -0
- package/dist/fields/Join/index.d.ts +1 -1
- package/dist/fields/Join/index.d.ts.map +1 -1
- package/dist/fields/Join/index.js +13 -9
- package/dist/fields/Join/index.js.map +1 -1
- package/dist/fields/Number/index.d.ts +1 -1
- package/dist/fields/Point/index.d.ts +1 -1
- package/dist/fields/RadioGroup/index.css +0 -7
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +32 -14
- 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/Row/index.d.ts +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.css +0 -1
- package/dist/fields/Slug/index.d.ts.map +1 -1
- package/dist/fields/Slug/index.js +75 -111
- package/dist/fields/Slug/index.js.map +1 -1
- package/dist/fields/Tabs/index.d.ts +1 -1
- package/dist/fields/Text/index.d.ts +1 -1
- package/dist/fields/Textarea/index.d.ts +1 -1
- package/dist/fields/Upload/index.css +19 -4
- 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/fieldReducer.d.ts.map +1 -1
- package/dist/forms/Form/fieldReducer.js +3 -1
- package/dist/forms/Form/fieldReducer.js.map +1 -1
- package/dist/forms/Form/index.d.ts.map +1 -1
- package/dist/forms/Form/index.js +12 -15
- package/dist/forms/Form/index.js.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 +1 -1
- 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/index.css +16 -2
- package/dist/forms/WatchChildErrors/buildPathSegments.d.ts.map +1 -1
- package/dist/forms/WatchChildErrors/index.d.ts.map +1 -1
- package/dist/forms/WatchChildErrors/index.js +2 -2
- package/dist/forms/WatchChildErrors/index.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/index.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/iterateFields.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/index.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.js +1 -3
- package/dist/forms/fieldSchemasToFormState/renderField.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/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/icons/Edit/index.d.ts +0 -1
- package/dist/icons/Edit/index.d.ts.map +1 -1
- package/dist/icons/Edit/index.js +4 -4
- package/dist/icons/Edit/index.js.map +1 -1
- package/dist/layouts/Root/index.d.ts +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +12 -4
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/layouts/Root/viewport.d.ts +1 -0
- package/dist/layouts/Root/viewport.d.ts.map +1 -1
- package/dist/layouts/Root/viewport.js +4 -1
- package/dist/layouts/Root/viewport.js.map +1 -1
- package/dist/providers/Actions/index.d.ts +1 -0
- package/dist/providers/Actions/index.d.ts.map +1 -1
- package/dist/providers/Actions/index.js +43 -11
- package/dist/providers/Actions/index.js.map +1 -1
- package/dist/providers/Auth/AuthSessionDebug/index.css +48 -0
- package/dist/providers/Auth/AuthSessionDebug/index.d.ts +13 -0
- package/dist/providers/Auth/AuthSessionDebug/index.d.ts.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/index.js +93 -0
- package/dist/providers/Auth/AuthSessionDebug/index.js.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts +21 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.js +53 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.js.map +1 -0
- package/dist/providers/Auth/authSessionRequests.d.ts +27 -0
- package/dist/providers/Auth/authSessionRequests.d.ts.map +1 -0
- package/dist/providers/Auth/authSessionRequests.js +119 -0
- package/dist/providers/Auth/authSessionRequests.js.map +1 -0
- package/dist/providers/Auth/authSessionRequests.spec.js +121 -0
- package/dist/providers/Auth/authSessionRequests.spec.js.map +1 -0
- package/dist/providers/Auth/index.d.ts +5 -59
- package/dist/providers/Auth/index.d.ts.map +1 -1
- package/dist/providers/Auth/index.js +283 -135
- package/dist/providers/Auth/index.js.map +1 -1
- package/dist/providers/Auth/sessionActivity.d.ts +23 -0
- package/dist/providers/Auth/sessionActivity.d.ts.map +1 -0
- package/dist/providers/Auth/sessionActivity.js +49 -0
- package/dist/providers/Auth/sessionActivity.js.map +1 -0
- package/dist/providers/Auth/sessionActivity.spec.js +44 -0
- package/dist/providers/Auth/sessionActivity.spec.js.map +1 -0
- package/dist/providers/Auth/sessionTiming.d.ts +11 -0
- package/dist/providers/Auth/sessionTiming.d.ts.map +1 -0
- package/dist/providers/Auth/sessionTiming.js +18 -0
- package/dist/providers/Auth/sessionTiming.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/index.d.ts +17 -0
- package/dist/providers/Auth/tabSessionSync/index.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/index.js +263 -0
- package/dist/providers/Auth/tabSessionSync/index.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/index.spec.js +463 -0
- package/dist/providers/Auth/tabSessionSync/index.spec.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/types.d.ts +107 -0
- package/dist/providers/Auth/tabSessionSync/types.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/types.js +6 -0
- package/dist/providers/Auth/tabSessionSync/types.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts +11 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js +90 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/utilities.d.ts +26 -0
- package/dist/providers/Auth/tabSessionSync/utilities.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/utilities.js +159 -0
- package/dist/providers/Auth/tabSessionSync/utilities.js.map +1 -0
- package/dist/providers/Auth/types.d.ts +65 -0
- package/dist/providers/Auth/types.d.ts.map +1 -0
- package/dist/providers/Auth/types.js +2 -0
- package/dist/providers/Auth/types.js.map +1 -0
- package/dist/providers/Auth/useAuthSessionTimers.d.ts +26 -0
- package/dist/providers/Auth/useAuthSessionTimers.d.ts.map +1 -0
- package/dist/providers/Auth/useAuthSessionTimers.js +203 -0
- package/dist/providers/Auth/useAuthSessionTimers.js.map +1 -0
- package/dist/providers/Auth/useAuthSessionTimers.spec.js +311 -0
- package/dist/providers/Auth/useAuthSessionTimers.spec.js.map +1 -0
- 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 +5 -5
- 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/DocumentTitle/index.d.ts +1 -0
- package/dist/providers/DocumentTitle/index.d.ts.map +1 -1
- package/dist/providers/DocumentTitle/index.js +2 -0
- package/dist/providers/DocumentTitle/index.js.map +1 -1
- package/dist/providers/Embed/index.d.ts +24 -0
- package/dist/providers/Embed/index.d.ts.map +1 -0
- package/dist/providers/Embed/index.js +105 -0
- package/dist/providers/Embed/index.js.map +1 -0
- package/dist/providers/FormErrorHandler/index.d.ts +24 -0
- package/dist/providers/FormErrorHandler/index.d.ts.map +1 -0
- package/dist/providers/FormErrorHandler/index.js +6 -0
- package/dist/providers/FormErrorHandler/index.js.map +1 -0
- 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/Locale/index.d.ts.map +1 -1
- package/dist/providers/Locale/index.js +41 -36
- package/dist/providers/Locale/index.js.map +1 -1
- package/dist/providers/Root/index.d.ts +1 -0
- package/dist/providers/Root/index.d.ts.map +1 -1
- package/dist/providers/Root/index.js +37 -31
- package/dist/providers/Root/index.js.map +1 -1
- package/dist/providers/RouteTransition/ProgressBar/index.js +4 -1
- package/dist/providers/RouteTransition/ProgressBar/index.js.map +1 -1
- package/dist/providers/RouteTransition/ProgressBar/index.spec.js +44 -0
- package/dist/providers/RouteTransition/ProgressBar/index.spec.js.map +1 -0
- package/dist/providers/RouteTransition/index.d.ts +2 -0
- package/dist/providers/RouteTransition/index.d.ts.map +1 -1
- package/dist/providers/RouteTransition/index.js +42 -14
- package/dist/providers/RouteTransition/index.js.map +1 -1
- package/dist/providers/SidebarTabs/index.d.ts +3 -2
- package/dist/providers/SidebarTabs/index.d.ts.map +1 -1
- package/dist/providers/SidebarTabs/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/buildColumnState/index.js +1 -1
- package/dist/providers/TableColumns/buildColumnState/index.js.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/index.spec.js +40 -0
- package/dist/providers/TableColumns/buildColumnState/index.spec.js.map +1 -0
- 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 +5 -2
- package/dist/providers/Theme/index.d.ts.map +1 -1
- package/dist/providers/Theme/index.js +109 -96
- 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 +2 -7
- package/dist/providers/UploadHandlers/index.d.ts.map +1 -1
- package/dist/providers/UploadHandlers/index.js +102 -42
- package/dist/providers/UploadHandlers/index.js.map +1 -1
- package/dist/styles.css +23 -10
- package/dist/templates/Default/index.d.ts +1 -0
- package/dist/templates/Default/index.d.ts.map +1 -1
- package/dist/templates/Default/index.js +2 -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.map +1 -1
- package/dist/utilities/checkDependencies.d.ts.map +1 -1
- package/dist/utilities/combineFieldLabel.d.ts.map +1 -1
- package/dist/utilities/combineFieldLabel.js +5 -1
- package/dist/utilities/combineFieldLabel.js.map +1 -1
- package/dist/utilities/copyDataFromLocale.d.ts.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/formatFields.d.ts.map +1 -1
- package/dist/utilities/formatMetadata.d.ts.map +1 -1
- package/dist/utilities/formatMetadata.js +0 -5
- package/dist/utilities/formatMetadata.js.map +1 -1
- package/dist/utilities/generateFieldID.d.ts +1 -1
- package/dist/utilities/generateFieldID.d.ts.map +1 -1
- package/dist/utilities/generateFieldID.js +2 -2
- package/dist/utilities/generateFieldID.js.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.map +1 -1
- package/dist/utilities/getDocumentData.d.ts.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.map +1 -1
- package/dist/utilities/getIsLocked.d.ts.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/getRequestEmbed.d.ts +14 -0
- package/dist/utilities/getRequestEmbed.d.ts.map +1 -0
- package/dist/utilities/getRequestEmbed.js +10 -0
- package/dist/utilities/getRequestEmbed.js.map +1 -0
- 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.map +1 -1
- package/dist/utilities/handleAuthRedirect.d.ts.map +1 -1
- package/dist/utilities/handleBackToDashboard.d.ts.map +1 -1
- package/dist/utilities/handleFormStateLocking.d.ts.map +1 -1
- package/dist/utilities/handleGoBack.d.ts.map +1 -1
- package/dist/utilities/handleLivePreview.d.ts.map +1 -1
- package/dist/utilities/handlePreview.d.ts.map +1 -1
- package/dist/utilities/handleServerFunctions.d.ts +32 -8
- package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
- package/dist/utilities/handleServerFunctions.js +17 -37
- package/dist/utilities/handleServerFunctions.js.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/recentlyViewed.d.ts.map +1 -1
- 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/renderTable.js +18 -2
- package/dist/utilities/renderTable.js.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/serverFunctionRegistry.d.ts +12 -7
- package/dist/utilities/serverFunctionRegistry.d.ts.map +1 -1
- package/dist/utilities/serverFunctionRegistry.js +25 -7
- package/dist/utilities/serverFunctionRegistry.js.map +1 -1
- package/dist/utilities/setsAreEqual.d.ts.map +1 -1
- package/dist/utilities/slugify.d.ts.map +1 -1
- package/dist/utilities/slugify.js +49 -6
- 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/CollectionTrash/generateCollectionTrashMetadata.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +3 -2
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js +7 -7
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +104 -66
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.css +29 -144
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js +4 -4
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +10 -10
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.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/recordRecentlyViewed.d.ts.map +1 -1
- package/dist/views/Edit/index.css +61 -53
- package/dist/views/Edit/index.d.ts.map +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/index.css +1 -1
- package/dist/views/List/ListHeader/index.d.ts +1 -10
- package/dist/views/List/ListHeader/index.d.ts.map +1 -1
- package/dist/views/List/ListHeader/index.js +1 -3
- package/dist/views/List/ListHeader/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.client.d.ts.map +1 -1
- package/dist/views/List/index.client.js +0 -14
- package/dist/views/List/index.client.js.map +1 -1
- package/dist/views/List/index.css +6 -1
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +4 -0
- 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/index.d.ts.map +1 -1
- package/dist/views/Logout/index.js +11 -0
- package/dist/views/Logout/index.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/getCustomCollectionViewByRoute.js.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/getCustomGlobalViewByRoute.js.map +1 -1
- package/dist/views/Root/getCustomViewByKey.d.ts.map +1 -1
- package/dist/views/Root/getCustomViewByKey.js.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 +12 -1
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +11 -3
- package/dist/views/Root/index.js.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/index.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/index.d.ts.map +1 -1
- package/dist/views/Version/generateVersionViewMetadata.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 +4 -4
- package/dist/views/Versions/fetchVersions.d.ts.map +1 -1
- package/dist/views/Versions/generateVersionsViewMetadata.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/WidgetCard/index.css +1 -1
- package/package.json +6 -10
- package/dist/elements/RelationshipTable/Pagination.css +0 -39
- package/dist/scss/app.scss +0 -183
- package/dist/scss/colors.scss +0 -191
- package/dist/scss/custom.css +0 -1
- package/dist/scss/queries.scss +0 -27
- package/dist/scss/styles.scss +0 -9
- package/dist/scss/svg.scss +0 -10
- package/dist/scss/toastify.scss +0 -61
- package/dist/scss/vars.scss +0 -192
- package/dist/scss/z-index.scss +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FilterOptions, FilterOptionsProps, ResolvedFilterOptions } from 'payload';
|
|
2
2
|
export declare const resolveFilterOptions: (filterOptions: FilterOptions, options: {
|
|
3
3
|
relationTo: string | string[];
|
|
4
|
-
} & Omit<FilterOptionsProps,
|
|
4
|
+
} & Omit<FilterOptionsProps, 'relationTo'>) => Promise<ResolvedFilterOptions>;
|
|
5
5
|
//# sourceMappingURL=resolveFilterOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFilterOptions.d.ts","sourceRoot":"","sources":["../../src/utilities/resolveFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEvF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"resolveFilterOptions.d.ts","sourceRoot":"","sources":["../../src/utilities/resolveFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEvF,eAAO,MAAM,oBAAoB,kBAChB,aAAa,WACnB;IAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,KAClF,OAAO,CAAC,qBAAqB,CA4B/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeFilterOptionsQuery.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeFilterOptionsQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"sanitizeFilterOptionsQuery.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeFilterOptionsQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,eAAO,MAAM,0BAA0B,UAAW,KAAK,KAAG,KAqBzD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollToID.d.ts","sourceRoot":"","sources":["../../src/utilities/scrollToID.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"scrollToID.d.ts","sourceRoot":"","sources":["../../src/utilities/scrollToID.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,OAAQ,MAAM,KAAG,IAUvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectiveCache.d.ts","sourceRoot":"","sources":["../../src/utilities/selectiveCache.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,CAAA;AAazB;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAS,MAAM,GAAG,WAAW,EAAE,SAAS,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"selectiveCache.d.ts","sourceRoot":"","sources":["../../src/utilities/selectiveCache.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,MAAM,CAAA;AAazB;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAS,MAAM,GAAG,WAAW,EAAE,SAAS,EAAE,MAAM;IAgCjF,GAAG,YAlB6B,MAAM,OAAO,CAAC,MAAM,CAAC,0BAAiB,OAAO,CAAC,MAAM,CAAC;EAoBxF"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { ServerFunction } from 'payload';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The complete, framework-agnostic set of Payload server functions.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* Every adapter (`@payloadcms/next`, `@payloadcms/tanstack-start`) dispatches
|
|
6
|
+
* from this single registry via `createServerFunctionHandler`, so a handler
|
|
7
|
+
* added here reaches every framework and the adapter lists can't drift.
|
|
8
|
+
*
|
|
9
|
+
* Handlers may return values containing React elements (e.g. `customComponents`
|
|
10
|
+
* inside form state, the `Document` / `List` nodes from render-document /
|
|
11
|
+
* render-list, the render-field / render-widget output). Adapters ship those
|
|
12
|
+
* over the wire as RSC payloads: Next.js does this natively, while the TanStack
|
|
13
|
+
* Start adapter passes a `transformResult` (`serializeForRsc`) to
|
|
14
|
+
* `createServerFunctionHandler` that converts elements into
|
|
15
|
+
* `renderServerComponent` handles.
|
|
11
16
|
*/
|
|
12
17
|
export declare const sharedServerFunctions: Record<string, ServerFunction<any, any>>;
|
|
13
18
|
//# sourceMappingURL=serverFunctionRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverFunctionRegistry.d.ts","sourceRoot":"","sources":["../../src/utilities/serverFunctionRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"serverFunctionRegistry.d.ts","sourceRoot":"","sources":["../../src/utilities/serverFunctionRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAe7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAc1E,CAAA"}
|
|
@@ -1,25 +1,43 @@
|
|
|
1
|
+
import { renderTabHandler } from '../elements/Nav/SidebarTabs/renderTabServerFn.js';
|
|
2
|
+
import { _internal_renderFieldHandler } from '../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js';
|
|
3
|
+
import { getDefaultLayoutHandler, renderWidgetHandler } from '../views/Dashboard/serverFunctions.js';
|
|
1
4
|
import { renderDocumentHandler } from '../views/Document/handleServerFunction.js';
|
|
5
|
+
import { renderDocumentSlotsHandler } from '../views/Document/renderDocumentSlots.js';
|
|
2
6
|
import { renderListHandler } from '../views/List/handleServerFunction.js';
|
|
3
7
|
import { buildFormStateHandler } from './buildFormState.js';
|
|
4
8
|
import { buildTableStateHandler } from './buildTableState.js';
|
|
5
9
|
import { copyDataFromLocaleHandler } from './copyDataFromLocale.js';
|
|
6
10
|
import { schedulePublishHandler } from './schedulePublishHandler.js';
|
|
11
|
+
import { slugifyHandler } from './slugify.js';
|
|
12
|
+
import { switchLanguageHandler } from './switchLanguageHandler.js';
|
|
7
13
|
/**
|
|
8
|
-
*
|
|
14
|
+
* The complete, framework-agnostic set of Payload server functions.
|
|
9
15
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* Every adapter (`@payloadcms/next`, `@payloadcms/tanstack-start`) dispatches
|
|
17
|
+
* from this single registry via `createServerFunctionHandler`, so a handler
|
|
18
|
+
* added here reaches every framework and the adapter lists can't drift.
|
|
19
|
+
*
|
|
20
|
+
* Handlers may return values containing React elements (e.g. `customComponents`
|
|
21
|
+
* inside form state, the `Document` / `List` nodes from render-document /
|
|
22
|
+
* render-list, the render-field / render-widget output). Adapters ship those
|
|
23
|
+
* over the wire as RSC payloads: Next.js does this natively, while the TanStack
|
|
24
|
+
* Start adapter passes a `transformResult` (`serializeForRsc`) to
|
|
25
|
+
* `createServerFunctionHandler` that converts elements into
|
|
26
|
+
* `renderServerComponent` handles.
|
|
16
27
|
*/
|
|
17
28
|
export const sharedServerFunctions = {
|
|
18
29
|
'copy-data-from-locale': copyDataFromLocaleHandler,
|
|
19
30
|
'form-state': buildFormStateHandler,
|
|
31
|
+
'get-default-layout': getDefaultLayoutHandler,
|
|
20
32
|
'render-document': renderDocumentHandler,
|
|
33
|
+
'render-document-slots': renderDocumentSlotsHandler,
|
|
34
|
+
'render-field': _internal_renderFieldHandler,
|
|
21
35
|
'render-list': renderListHandler,
|
|
36
|
+
'render-tab': renderTabHandler,
|
|
37
|
+
'render-widget': renderWidgetHandler,
|
|
22
38
|
'schedule-publish': schedulePublishHandler,
|
|
39
|
+
slugify: slugifyHandler,
|
|
40
|
+
'switch-language': switchLanguageHandler,
|
|
23
41
|
'table-state': buildTableStateHandler
|
|
24
42
|
};
|
|
25
43
|
//# sourceMappingURL=serverFunctionRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverFunctionRegistry.js","names":["renderDocumentHandler","renderListHandler","buildFormStateHandler","buildTableStateHandler","copyDataFromLocaleHandler","schedulePublishHandler","sharedServerFunctions"],"sources":["../../src/utilities/serverFunctionRegistry.ts"],"sourcesContent":["import type { ServerFunction } from 'payload'\n\nimport { renderDocumentHandler } from '../views/Document/handleServerFunction.js'\nimport { renderListHandler } from '../views/List/handleServerFunction.js'\nimport { buildFormStateHandler } from './buildFormState.js'\nimport { buildTableStateHandler } from './buildTableState.js'\nimport { copyDataFromLocaleHandler } from './copyDataFromLocale.js'\nimport { schedulePublishHandler } from './schedulePublishHandler.js'\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"serverFunctionRegistry.js","names":["renderTabHandler","_internal_renderFieldHandler","getDefaultLayoutHandler","renderWidgetHandler","renderDocumentHandler","renderDocumentSlotsHandler","renderListHandler","buildFormStateHandler","buildTableStateHandler","copyDataFromLocaleHandler","schedulePublishHandler","slugifyHandler","switchLanguageHandler","sharedServerFunctions","slugify"],"sources":["../../src/utilities/serverFunctionRegistry.ts"],"sourcesContent":["import type { ServerFunction } from 'payload'\n\nimport { renderTabHandler } from '../elements/Nav/SidebarTabs/renderTabServerFn.js'\nimport { _internal_renderFieldHandler } from '../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js'\nimport { getDefaultLayoutHandler, renderWidgetHandler } from '../views/Dashboard/serverFunctions.js'\nimport { renderDocumentHandler } from '../views/Document/handleServerFunction.js'\nimport { renderDocumentSlotsHandler } from '../views/Document/renderDocumentSlots.js'\nimport { renderListHandler } from '../views/List/handleServerFunction.js'\nimport { buildFormStateHandler } from './buildFormState.js'\nimport { buildTableStateHandler } from './buildTableState.js'\nimport { copyDataFromLocaleHandler } from './copyDataFromLocale.js'\nimport { schedulePublishHandler } from './schedulePublishHandler.js'\nimport { slugifyHandler } from './slugify.js'\nimport { switchLanguageHandler } from './switchLanguageHandler.js'\n\n/**\n * The complete, framework-agnostic set of Payload server functions.\n *\n * Every adapter (`@payloadcms/next`, `@payloadcms/tanstack-start`) dispatches\n * from this single registry via `createServerFunctionHandler`, so a handler\n * added here reaches every framework and the adapter lists can't drift.\n *\n * Handlers may return values containing React elements (e.g. `customComponents`\n * inside form state, the `Document` / `List` nodes from render-document /\n * render-list, the render-field / render-widget output). Adapters ship those\n * over the wire as RSC payloads: Next.js does this natively, while the TanStack\n * Start adapter passes a `transformResult` (`serializeForRsc`) to\n * `createServerFunctionHandler` that converts elements into\n * `renderServerComponent` handles.\n */\nexport const sharedServerFunctions: Record<string, ServerFunction<any, any>> = {\n 'copy-data-from-locale': copyDataFromLocaleHandler,\n 'form-state': buildFormStateHandler,\n 'get-default-layout': getDefaultLayoutHandler,\n 'render-document': renderDocumentHandler,\n 'render-document-slots': renderDocumentSlotsHandler,\n 'render-field': _internal_renderFieldHandler,\n 'render-list': renderListHandler,\n 'render-tab': renderTabHandler,\n 'render-widget': renderWidgetHandler,\n 'schedule-publish': schedulePublishHandler,\n slugify: slugifyHandler,\n 'switch-language': switchLanguageHandler,\n 'table-state': buildTableStateHandler,\n}\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ;AACjC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,uBAAuB,EAAEC,mBAAmB,QAAQ;AAC7D,SAASC,qBAAqB,QAAQ;AACtC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,iBAAiB,QAAQ;AAClC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,sBAAsB,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ;AAEtC;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,qBAAA,GAAkE;EAC7E,yBAAyBJ,yBAAA;EACzB,cAAcF,qBAAA;EACd,sBAAsBL,uBAAA;EACtB,mBAAmBE,qBAAA;EACnB,yBAAyBC,0BAAA;EACzB,gBAAgBJ,4BAAA;EAChB,eAAeK,iBAAA;EACf,cAAcN,gBAAA;EACd,iBAAiBG,mBAAA;EACjB,oBAAoBO,sBAAA;EACpBI,OAAA,EAASH,cAAA;EACT,mBAAmBC,qBAAA;EACnB,eAAeJ;AACjB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setsAreEqual.d.ts","sourceRoot":"","sources":["../../src/utilities/setsAreEqual.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"setsAreEqual.d.ts","sourceRoot":"","sources":["../../src/utilities/setsAreEqual.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,YAEvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../../src/utilities/slugify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,
|
|
1
|
+
{"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../../src/utilities/slugify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAE/B,MAAM,SAAS,CAAA;AAGhB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CACzC,yBAAyB,EACzB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAkF7B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { executeAccess, getFieldByPath, getSlugFallbackValue, getUniqueFieldValue, hasDraftsEnabled, UnauthorizedError } from 'payload';
|
|
2
2
|
import { slugify as defaultSlugify } from 'payload/shared';
|
|
3
3
|
/**
|
|
4
4
|
* This server function is directly related to the {@link https://payloadcms.com/docs/fields/slug | Slug Field}.
|
|
@@ -13,9 +13,11 @@ import { slugify as defaultSlugify } from 'payload/shared';
|
|
|
13
13
|
*/
|
|
14
14
|
export const slugifyHandler = async args => {
|
|
15
15
|
const {
|
|
16
|
+
id,
|
|
16
17
|
collectionSlug,
|
|
17
18
|
data,
|
|
18
19
|
globalSlug,
|
|
20
|
+
locale,
|
|
19
21
|
path,
|
|
20
22
|
req,
|
|
21
23
|
valueToSlugify
|
|
@@ -31,17 +33,58 @@ export const slugifyHandler = async args => {
|
|
|
31
33
|
field
|
|
32
34
|
} = getFieldByPath({
|
|
33
35
|
config: req.payload.config,
|
|
34
|
-
fields:
|
|
35
|
-
fields: docConfig.fields
|
|
36
|
-
}),
|
|
36
|
+
fields: docConfig.flattenedFields,
|
|
37
37
|
path
|
|
38
38
|
});
|
|
39
39
|
const customSlugify = typeof field?.custom?.slugify === 'function' ? field.custom.slugify : undefined;
|
|
40
|
-
const
|
|
40
|
+
const slugify = valueToSlugify => customSlugify ? customSlugify({
|
|
41
41
|
data,
|
|
42
42
|
req,
|
|
43
43
|
valueToSlugify
|
|
44
44
|
}) : defaultSlugify(valueToSlugify);
|
|
45
|
-
|
|
45
|
+
const result = await slugify(valueToSlugify);
|
|
46
|
+
const collectionConfig = collectionSlug ? req.payload.collections[collectionSlug]?.config : null;
|
|
47
|
+
// Uniqueness dedupe only applies to a collection's slug field. Globals have no collection to
|
|
48
|
+
// dedupe against, so their result is returned as-is.
|
|
49
|
+
if (!collectionConfig || !field || field.type !== 'slug' || !('name' in field)) {
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
// Probing reads across the whole collection with the raw db, so require unrestricted read access —
|
|
53
|
+
// a row-filtered (`Where`) result is treated as not allowed, since scoping the probe to readable
|
|
54
|
+
// rows would break uniqueness.
|
|
55
|
+
const canRead = await executeAccess({
|
|
56
|
+
disableErrors: true,
|
|
57
|
+
req
|
|
58
|
+
}, collectionConfig.access.read);
|
|
59
|
+
if (canRead !== true) {
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
// A localized slug is unique per-locale, so scope the probe to the current locale — otherwise it
|
|
63
|
+
// dedupes against the default locale and can hand back a colliding value. The client passes the
|
|
64
|
+
// active admin locale; fall back to the request's own locale.
|
|
65
|
+
const localeToScope = field.localized ? locale ?? req.locale ?? undefined : undefined;
|
|
66
|
+
// The current doc is excluded so a regenerate can reuse its own value rather than bump past it.
|
|
67
|
+
const excludeId = typeof id === 'string' || typeof id === 'number' ? id : undefined;
|
|
68
|
+
// A source resolved to a value: dedupe it the same way the next save would, so the generate button
|
|
69
|
+
// can't hand back a slug that's already taken. With no source, return the `<singular>-N` fallback.
|
|
70
|
+
if (result) {
|
|
71
|
+
return getUniqueFieldValue({
|
|
72
|
+
id: excludeId,
|
|
73
|
+
collection: collectionConfig.slug,
|
|
74
|
+
draftsEnabled: hasDraftsEnabled(collectionConfig),
|
|
75
|
+
field: field.name,
|
|
76
|
+
locale: localeToScope,
|
|
77
|
+
req,
|
|
78
|
+
value: result
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return getSlugFallbackValue({
|
|
82
|
+
id: excludeId,
|
|
83
|
+
collection: collectionConfig,
|
|
84
|
+
field: field.name,
|
|
85
|
+
locale: localeToScope,
|
|
86
|
+
req,
|
|
87
|
+
slugify
|
|
88
|
+
});
|
|
46
89
|
};
|
|
47
90
|
//# sourceMappingURL=slugify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugify.js","names":["
|
|
1
|
+
{"version":3,"file":"slugify.js","names":["executeAccess","getFieldByPath","getSlugFallbackValue","getUniqueFieldValue","hasDraftsEnabled","UnauthorizedError","slugify","defaultSlugify","slugifyHandler","args","id","collectionSlug","data","globalSlug","locale","path","req","valueToSlugify","user","docConfig","payload","collections","config","globals","find","g","slug","Error","field","fields","flattenedFields","customSlugify","custom","undefined","result","collectionConfig","type","canRead","disableErrors","access","read","localeToScope","localized","excludeId","collection","draftsEnabled","name","value"],"sources":["../../src/utilities/slugify.ts"],"sourcesContent":["import type { Slugify } from 'payload/shared'\n\nimport {\n executeAccess,\n getFieldByPath,\n getSlugFallbackValue,\n getUniqueFieldValue,\n hasDraftsEnabled,\n type ServerFunction,\n type SlugifyServerFunctionArgs,\n UnauthorizedError,\n} from 'payload'\nimport { slugify as defaultSlugify } from 'payload/shared'\n\n/**\n * This server function is directly related to the {@link https://payloadcms.com/docs/fields/slug | Slug Field}.\n * This is a server function that is used to invoke the user's custom slugify function from the client.\n * This pattern is required, as there is no other way for us to pass their function across the client-server boundary.\n * - Not through props\n * - Not from a server function defined within a server component (see below)\n * When a server function contains non-serializable data within its closure, it gets passed through the boundary (and breaks).\n * The only way to pass server functions to the client (that contain non-serializable data) is if it is globally defined.\n * But we also cannot define this function alongside the server component, as we will not have access to their custom slugify function.\n * See `ServerFunctionsProvider` for more details.\n */\nexport const slugifyHandler: ServerFunction<\n SlugifyServerFunctionArgs,\n Promise<ReturnType<Slugify>>\n> = async (args) => {\n const { id, collectionSlug, data, globalSlug, locale, path, req, valueToSlugify } = args\n\n if (!req.user) {\n throw new UnauthorizedError()\n }\n\n const docConfig = collectionSlug\n ? req.payload.collections[collectionSlug]?.config\n : globalSlug\n ? req.payload.config.globals.find((g) => g.slug === globalSlug)\n : null\n\n if (!docConfig) {\n throw new Error()\n }\n\n const { field } = getFieldByPath({\n config: req.payload.config,\n fields: docConfig.flattenedFields,\n path,\n })\n\n const customSlugify = (\n typeof field?.custom?.slugify === 'function' ? field.custom.slugify : undefined\n ) as Slugify\n\n const slugify = (valueToSlugify: unknown) =>\n customSlugify\n ? customSlugify({ data, req, valueToSlugify })\n : defaultSlugify(valueToSlugify as string)\n\n const result = await slugify(valueToSlugify)\n\n const collectionConfig = collectionSlug ? req.payload.collections[collectionSlug]?.config : null\n\n // Uniqueness dedupe only applies to a collection's slug field. Globals have no collection to\n // dedupe against, so their result is returned as-is.\n if (!collectionConfig || !field || field.type !== 'slug' || !('name' in field)) {\n return result\n }\n\n // Probing reads across the whole collection with the raw db, so require unrestricted read access —\n // a row-filtered (`Where`) result is treated as not allowed, since scoping the probe to readable\n // rows would break uniqueness.\n const canRead = await executeAccess({ disableErrors: true, req }, collectionConfig.access.read)\n\n if (canRead !== true) {\n return result\n }\n\n // A localized slug is unique per-locale, so scope the probe to the current locale — otherwise it\n // dedupes against the default locale and can hand back a colliding value. The client passes the\n // active admin locale; fall back to the request's own locale.\n const localeToScope = field.localized ? (locale ?? req.locale ?? undefined) : undefined\n\n // The current doc is excluded so a regenerate can reuse its own value rather than bump past it.\n const excludeId = typeof id === 'string' || typeof id === 'number' ? id : undefined\n\n // A source resolved to a value: dedupe it the same way the next save would, so the generate button\n // can't hand back a slug that's already taken. With no source, return the `<singular>-N` fallback.\n if (result) {\n return getUniqueFieldValue({\n id: excludeId,\n collection: collectionConfig.slug,\n draftsEnabled: hasDraftsEnabled(collectionConfig),\n field: field.name,\n locale: localeToScope,\n req,\n value: result,\n })\n }\n\n return getSlugFallbackValue({\n id: excludeId,\n collection: collectionConfig,\n field: field.name,\n locale: localeToScope,\n req,\n slugify,\n })\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverseForLocalizedFields.d.ts","sourceRoot":"","sources":["../../src/utilities/traverseForLocalizedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"traverseForLocalizedFields.d.ts","sourceRoot":"","sources":["../../src/utilities/traverseForLocalizedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,0BAA0B,WAAY,WAAW,EAAE,GAAG,KAAK,EAAE,KAAG,OA6C5E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsertPreferences.d.ts","sourceRoot":"","sources":["../../src/utilities/upsertPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7E,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,EAAE,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CACtB,CAAA;AAED,KAAK,YAAY,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,SAAS,KAAK,CAAC,CAAA;AAQ5E,eAAO,MAAM,cAAc,GAClB,CAAC,OACD,MAAM,WACF,OAAO,UACR,qBAAqB,YACnB,MAAM,KACf,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CA+B5B,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"upsertPreferences.d.ts","sourceRoot":"","sources":["../../src/utilities/upsertPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7E,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,EAAE,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CACtB,CAAA;AAED,KAAK,YAAY,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,SAAS,KAAK,CAAC,CAAA;AAQ5E,eAAO,MAAM,cAAc,GAClB,CAAC,OACD,MAAM,WACF,OAAO,UACR,qBAAqB,YACnB,MAAM,KACf,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CA+B5B,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,oDAK/E;IACD,WAAW,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,YAAY,EAAE,YAAY,KAAK,CAAC,CAAA;IACnF,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,cAAc,CAAA;IACnB,KAAK,EAAE,CAAC,CAAA;CACT,KAAG,OAAO,CAAC,CAAC,CA0DZ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateCollectionTrashMetadata.d.ts","sourceRoot":"","sources":["../../../src/views/CollectionTrash/generateCollectionTrashMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAMrF,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"generateCollectionTrashMetadata.d.ts","sourceRoot":"","sources":["../../../src/views/CollectionTrash/generateCollectionTrashMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAMrF,eAAO,MAAM,+BAA+B,SAAgB;IAC1D,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,MAAM,EAAE,eAAe,CAAA;IACvB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAC9C,KAAG,OAAO,CAAC,UAAU,CAqBrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardStepNav.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/DashboardStepNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAa3C,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,MAAM,EACN,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,GACR,EAAE;IACD,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,+BAoCA;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;CAC1B,+
|
|
1
|
+
{"version":3,"file":"DashboardStepNav.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/DashboardStepNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAa3C,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,MAAM,EACN,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,GACR,EAAE;IACD,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,+BAoCA;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;CAC1B,+BAoEA"}
|
|
@@ -169,7 +169,7 @@ export function DashboardBreadcrumbDropdown(props) {
|
|
|
169
169
|
if ($[9] !== t) {
|
|
170
170
|
t1 = t2 => {
|
|
171
171
|
const {
|
|
172
|
-
active
|
|
172
|
+
active,
|
|
173
173
|
onClick,
|
|
174
174
|
onKeyDown,
|
|
175
175
|
...ariaProps
|
|
@@ -181,6 +181,7 @@ export function DashboardBreadcrumbDropdown(props) {
|
|
|
181
181
|
onKeyDown
|
|
182
182
|
},
|
|
183
183
|
onClick,
|
|
184
|
+
selected: active,
|
|
184
185
|
...ariaProps,
|
|
185
186
|
children: _jsxs("span", {
|
|
186
187
|
className: "dashboard-breadcrumb-dropdown__label",
|
|
@@ -203,7 +204,7 @@ export function DashboardBreadcrumbDropdown(props) {
|
|
|
203
204
|
horizontalAlign: "left",
|
|
204
205
|
render: t0,
|
|
205
206
|
renderButton: t1,
|
|
206
|
-
size: "
|
|
207
|
+
size: "fit-content"
|
|
207
208
|
});
|
|
208
209
|
$[11] = t0;
|
|
209
210
|
$[12] = t1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardStepNav.js","names":["c","_c","useEffect","useId","Button","DrawerToggler","ItemsDrawer","Popup","PopupList","useStepNav","ChevronIcon","useTranslation","DashboardStepNav","t0","$","addWidget","cancel","isEditing","resetLayout","saveLayout","setIsEditing","widgets","t","setStepNav","uuid","drawerSlug","t1","t2","label","_jsx","DashboardBreadcrumbDropdown","onCancel","onEditClick","onResetLayout","onSaveChanges","widgetsDrawerSlug","t3","_Fragment","children","items","onItemClick","widget","slug","searchPlaceholder","title","props","_jsxs","className","buttonStyle","el","size","onClick","close","ButtonGroup","active","
|
|
1
|
+
{"version":3,"file":"DashboardStepNav.js","names":["c","_c","useEffect","useId","Button","DrawerToggler","ItemsDrawer","Popup","PopupList","useStepNav","ChevronIcon","useTranslation","DashboardStepNav","t0","$","addWidget","cancel","isEditing","resetLayout","saveLayout","setIsEditing","widgets","t","setStepNav","uuid","drawerSlug","t1","t2","label","_jsx","DashboardBreadcrumbDropdown","onCancel","onEditClick","onResetLayout","onSaveChanges","widgetsDrawerSlug","t3","_Fragment","children","items","onItemClick","widget","slug","searchPlaceholder","title","props","_jsxs","className","buttonStyle","el","size","onClick","close","ButtonGroup","active","onKeyDown","ariaProps","extraButtonProps","selected","direction","horizontalAlign","render"],"sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/DashboardStepNav.tsx"],"sourcesContent":["'use client'\nimport type { ClientWidget } from 'payload'\n\nimport { useEffect, useId } from 'react'\n\nimport { Button } from '../../../../elements/Button/index.js'\nimport { DrawerToggler } from '../../../../elements/Drawer/index.js'\nimport { ItemsDrawer } from '../../../../elements/ItemsDrawer/index.js'\nimport { Popup } from '../../../../elements/Popup/index.js'\nimport * as PopupList from '../../../../elements/Popup/PopupButtonList/index.js'\nimport { useStepNav } from '../../../../elements/StepNav/index.js'\nimport { ChevronIcon } from '../../../../icons/Chevron/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\n\nexport function DashboardStepNav({\n addWidget,\n cancel,\n isEditing,\n resetLayout,\n saveLayout,\n setIsEditing,\n widgets,\n}: {\n addWidget: (slug: string) => void\n cancel: () => void\n isEditing: boolean\n resetLayout: () => Promise<void>\n saveLayout: () => Promise<void>\n setIsEditing: (isEditing: boolean) => void\n widgets: ClientWidget[]\n}) {\n const { t } = useTranslation()\n const { setStepNav } = useStepNav()\n const uuid = useId()\n const drawerSlug = `widgets-drawer-${uuid}`\n\n useEffect(() => {\n setStepNav([\n {\n label: (\n <DashboardBreadcrumbDropdown\n isEditing={isEditing}\n onCancel={cancel}\n onEditClick={() => setIsEditing(true)}\n onResetLayout={resetLayout}\n onSaveChanges={saveLayout}\n widgetsDrawerSlug={drawerSlug}\n />\n ),\n },\n ])\n }, [isEditing, drawerSlug, cancel, resetLayout, saveLayout, setIsEditing, setStepNav])\n\n return (\n <>\n {isEditing && (\n <ItemsDrawer\n drawerSlug={drawerSlug}\n items={widgets}\n onItemClick={(widget) => addWidget(widget.slug)}\n searchPlaceholder={t('dashboard:searchWidgets')}\n title={t('dashboard:addWidget')}\n />\n )}\n </>\n )\n}\n\nexport function DashboardBreadcrumbDropdown(props: {\n isEditing: boolean\n onCancel: () => void\n onEditClick: () => void\n onResetLayout: () => void\n onSaveChanges: () => void\n widgetsDrawerSlug: string\n}) {\n const { isEditing, onCancel, onEditClick, onResetLayout, onSaveChanges, widgetsDrawerSlug } =\n props\n const { t } = useTranslation()\n\n if (isEditing) {\n return (\n <div className=\"dashboard-breadcrumb-dropdown__editing\">\n <span>{t('dashboard:editingDashboard')}</span>\n <div className=\"dashboard-breadcrumb-dropdown__actions\">\n <DrawerToggler className=\"drawer-toggler--unstyled\" slug={widgetsDrawerSlug}>\n <Button buttonStyle=\"primary\" el=\"span\" size=\"medium\">\n {t('dashboard:addButton')}\n </Button>\n </DrawerToggler>\n <Button buttonStyle=\"pill\" onClick={onSaveChanges} size=\"medium\">\n {t('fields:saveChanges')}\n </Button>\n <Button buttonStyle=\"pill\" onClick={onCancel} size=\"medium\">\n {t('general:cancel')}\n </Button>\n </div>\n </div>\n )\n }\n\n return (\n <Popup\n className=\"dashboard-breadcrumb-dropdown\"\n horizontalAlign=\"left\"\n render={({ close }) => (\n <PopupList.ButtonGroup>\n <PopupList.Button\n onClick={() => {\n close()\n onEditClick()\n }}\n >\n {t('dashboard:editDashboard')}\n </PopupList.Button>\n <PopupList.Button\n onClick={() => {\n close()\n onResetLayout()\n }}\n >\n {t('dashboard:resetLayout')}\n </PopupList.Button>\n </PopupList.ButtonGroup>\n )}\n renderButton={({ active, onClick, onKeyDown, ...ariaProps }) => (\n <Button\n aria-label={t('general:dashboard')}\n buttonStyle=\"ghost\"\n extraButtonProps={{ onKeyDown }}\n onClick={onClick}\n selected={active}\n {...ariaProps}\n >\n <span className=\"dashboard-breadcrumb-dropdown__label\">\n {t('general:dashboard')}\n <ChevronIcon direction=\"down\" size={16} />\n </span>\n </Button>\n )}\n size=\"fit-content\"\n />\n )\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetEditControl.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/WidgetEditControl.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,KAAgB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"WidgetEditControl.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/WidgetEditControl.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,KAAgB,MAAM,OAAO,CAAA;AAYpC,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,UAAU,EACV,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAA;CACjB,qBAoCA"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
5
|
import React, { useId } from 'react';
|
|
6
|
+
import { Button } from '../../../../elements/Button/index.js';
|
|
6
7
|
import { useModal } from '../../../../elements/Modal/index.js';
|
|
7
8
|
import { EditIcon } from '../../../../icons/Edit/index.js';
|
|
8
9
|
import { useConfig } from '../../../../providers/Config/index.js';
|
|
@@ -62,14 +63,13 @@ export function WidgetEditControl(t0) {
|
|
|
62
63
|
t4 = $[6];
|
|
63
64
|
}
|
|
64
65
|
return _jsxs(_Fragment, {
|
|
65
|
-
children: [
|
|
66
|
+
children: [_jsx(Button, {
|
|
67
|
+
"aria-label": `${t("general:edit")} ${widgetID}`,
|
|
68
|
+
buttonStyle: "secondary",
|
|
66
69
|
className: "widget-wrapper__edit-btn",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className: "sr-only",
|
|
71
|
-
children: [t("general:edit"), " ", widgetID]
|
|
72
|
-
}), _jsx(EditIcon, {})]
|
|
70
|
+
icon: _jsx(EditIcon, {}),
|
|
71
|
+
margin: false,
|
|
72
|
+
onClick: t4
|
|
73
73
|
}), _jsx(WidgetConfigDrawer, {
|
|
74
74
|
drawerSlug,
|
|
75
75
|
onSave,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetEditControl.js","names":["c","_c","React","useId","useModal","EditIcon","useConfig","useTranslation","WidgetConfigDrawer","getWidgetSlugFromID","widgetID","slice","lastIndexOf","WidgetEditControl","t0","$","onSave","widgetData","t","openModal","widgets","t1","config","admin","dashboard","configWidgets","undefined","t2","widgetSlug","t3","widget","slug","widgetConfig","find","hasEditableFields","Boolean","fields","length","drawerID","drawerSlug","t4","_jsxs","_Fragment","children","className","
|
|
1
|
+
{"version":3,"file":"WidgetEditControl.js","names":["c","_c","React","useId","Button","useModal","EditIcon","useConfig","useTranslation","WidgetConfigDrawer","getWidgetSlugFromID","widgetID","slice","lastIndexOf","WidgetEditControl","t0","$","onSave","widgetData","t","openModal","widgets","t1","config","admin","dashboard","configWidgets","undefined","t2","widgetSlug","t3","widget","slug","widgetConfig","find","hasEditableFields","Boolean","fields","length","drawerID","drawerSlug","t4","_jsxs","_Fragment","children","_jsx","buttonStyle","className","icon","margin","onClick"],"sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/WidgetEditControl.tsx"],"sourcesContent":["'use client'\n\nimport type { Data } from 'payload'\n\nimport React, { useId } from 'react'\n\nimport { Button } from '../../../../elements/Button/index.js'\nimport { useModal } from '../../../../elements/Modal/index.js'\nimport { EditIcon } from '../../../../icons/Edit/index.js'\nimport { useConfig } from '../../../../providers/Config/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { WidgetConfigDrawer } from './WidgetConfigDrawer.js'\n\nconst getWidgetSlugFromID = (widgetID: string): string =>\n widgetID.slice(0, widgetID.lastIndexOf('-'))\n\nexport function WidgetEditControl({\n onSave,\n widgetData,\n widgetID,\n}: {\n onSave: (data: Data) => void\n widgetData?: Record<string, unknown>\n widgetID: string\n}) {\n const { t } = useTranslation()\n const { openModal } = useModal()\n const { widgets: configWidgets = [] } = useConfig().config.admin.dashboard ?? {}\n\n const widgetSlug = getWidgetSlugFromID(widgetID)\n const widgetConfig = configWidgets.find((widget) => widget.slug === widgetSlug)\n const hasEditableFields = Boolean(widgetConfig?.fields?.length)\n\n const drawerID = useId()\n const drawerSlug = `widget-editor-${drawerID}`\n\n if (!hasEditableFields) {\n return null\n }\n\n return (\n <>\n <Button\n aria-label={`${t('general:edit')} ${widgetID}`}\n buttonStyle=\"secondary\"\n className=\"widget-wrapper__edit-btn\"\n icon={<EditIcon />}\n margin={false}\n onClick={() => {\n openModal(drawerSlug)\n }}\n />\n <WidgetConfigDrawer\n drawerSlug={drawerSlug}\n onSave={onSave}\n widget={widgetConfig}\n widgetData={widgetData}\n />\n </>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,OAAOC,KAAA,IAASC,KAAK,QAAQ;AAE7B,SAASC,MAAM,QAAQ;AACvB,SAASC,QAAQ,QAAQ;AACzB,SAASC,QAAQ,QAAQ;AACzB,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,kBAAkB,QAAQ;AAEnC,MAAMC,mBAAA,GAAuBC,QAAA,IAC3BA,QAAA,CAASC,KAAK,CAAC,GAAGD,QAAA,CAASE,WAAW,CAAC;AAEzC,OAAO,SAAAC,kBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAf,EAAA;EAA2B;IAAAgB,MAAA;IAAAC,UAAA;IAAAP;EAAA,IAAAI,EAQjC;EACC;IAAAI;EAAA,IAAcX,cAAA;EACd;IAAAY;EAAA,IAAsBf,QAAA;EACtB;IAAAgB,OAAA,EAAAC;EAAA,IAAwCf,SAAA,GAAAgB,MAAA,CAAAC,KAAA,CAAAC,SAAA,MAAuC;EAA9D,MAAAC,aAAA,GAAAJ,EAAkB,KAAAK,SAAA,QAAlBL,EAAkB;EAAA,IAAAM,EAAA;EAAA,IAAAZ,CAAA,QAAAL,QAAA;IAEhBiB,EAAA,GAAAlB,mBAAA,CAAoBC,QAAA;IAAAK,CAAA,MAAAL,QAAA;IAAAK,CAAA,MAAAY,EAAA;EAAA;IAAAA,EAAA,GAAAZ,CAAA;EAAA;EAAvC,MAAAa,UAAA,GAAmBD,EAAoB;EAAA,IAAAE,EAAA;EAAA,IAAAd,CAAA,QAAAa,UAAA;IACCC,EAAA,GAAAC,MAAA,IAAYA,MAAA,CAAAC,IAAA,KAAgBH,UAAA;IAAAb,CAAA,MAAAa,UAAA;IAAAb,CAAA,MAAAc,EAAA;EAAA;IAAAA,EAAA,GAAAd,CAAA;EAAA;EAApE,MAAAiB,YAAA,GAAqBP,aAAA,CAAAQ,IAAA,CAAmBJ,EAA4B;EACpE,MAAAK,iBAAA,GAA0BC,OAAA,CAAQH,YAAA,EAAAI,MAAA,EAAAC,MAAsB;EAExD,MAAAC,QAAA,GAAiBpC,KAAA;EACjB,MAAAqC,UAAA,GAAmB,iBAAiBD,QAAA,EAAU;EAAA,KAEzCJ,iBAAA;IAAA;EAAA;EAAA,IAAAM,EAAA;EAAA,IAAAzB,CAAA,QAAAwB,UAAA,IAAAxB,CAAA,QAAAI,SAAA;IAYUqB,EAAA,GAAAA,CAAA;MACPrB,SAAA,CAAUoB,UAAA;IAAA;IACZxB,CAAA,MAAAwB,UAAA;IAAAxB,CAAA,MAAAI,SAAA;IAAAJ,CAAA,MAAAyB,EAAA;EAAA;IAAAA,EAAA,GAAAzB,CAAA;EAAA;EAAA,OATJ0B,KAAA,CAAAC,SAAA;IAAAC,QAAA,GACEC,IAAA,CAAAzC,MAAA;MAAA,cACc,GAAGe,CAAA,CAAE,mBAAmBR,QAAA,EAAU;MAAAmC,WAAA,EAClC;MAAAC,SAAA,EACF;MAAAC,IAAA,EACJH,IAAA,CAAAvC,QAAA,IAAC;MAAA2C,MAAA;MAAAC,OAAA,EAEET;IAET,C,GAEFI,IAAA,CAAApC,kBAAA;MAAA+B,UAAA;MAAAvB,MAAA;MAAAc,MAAA,EAGUE,YAAA;MAAAf;IAAA,C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/index.client.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIxD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../../../src/views/Dashboard/Default/ModularDashboard/index.client.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIxD,OAAO,KAAuC,MAAM,OAAO,CAAA;AA6B3D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,WAAW,CAAA;IACrB,QAAQ,EAAE,WAAW,CAAA;IACrB,KAAK,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC5B,MAAM,EAAE,oBAAoB,CAAA;CAC7B,GAAG,IAAI,CAAA;AAYR,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,EAAE,aAAa,EAC3B,OAAO,GACR,EAAE;IACD,YAAY,EAAE,oBAAoB,EAAE,CAAA;IACpC,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,qBAiMA"}
|