@payloadcms/ui 4.0.0-canary.9 → 4.0.0-internal.016994f
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/APIKeyInput/index.css +4 -4
- package/dist/elements/AddNewRelation/index.css +0 -5
- package/dist/elements/AddNewRelation/index.js +2 -2
- package/dist/elements/AddNewRelation/index.js.map +1 -1
- package/dist/elements/AnimateHeight/usePatchAnimateHeight.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.css +7 -18
- package/dist/elements/AppHeader/index.d.ts +1 -8
- package/dist/elements/AppHeader/index.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.js +8 -17
- 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/AddFilesView/index.css +10 -4
- package/dist/elements/BulkUpload/AddFilesView/index.d.ts.map +1 -1
- package/dist/elements/BulkUpload/AddFilesView/index.js +71 -51
- package/dist/elements/BulkUpload/AddFilesView/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 +25 -2
- package/dist/elements/Button/index.d.ts.map +1 -1
- package/dist/elements/Button/index.js +2 -0
- package/dist/elements/Button/index.js.map +1 -1
- package/dist/elements/Button/types.d.ts +1 -1
- package/dist/elements/Button/types.d.ts.map +1 -1
- package/dist/elements/Button/types.js.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 +65 -3
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js.map +1 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js +345 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.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/ColumnSelection/Popup.d.ts.map +1 -1
- package/dist/elements/ColumnSelection/Popup.js +5 -1
- 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/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/DefaultListViewTabs/index.css +1 -0
- package/dist/elements/DefaultListViewTabs/index.d.ts.map +1 -1
- package/dist/elements/DefaultListViewTabs/index.js +84 -62
- package/dist/elements/DefaultListViewTabs/index.js.map +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.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.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/DocumentDrawer/types.d.ts +1 -1
- package/dist/elements/DocumentDrawer/types.d.ts.map +1 -1
- package/dist/elements/DocumentDrawer/types.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/types.d.ts +2 -2
- package/dist/elements/Drawer/types.d.ts.map +1 -1
- package/dist/elements/Drawer/types.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/Dropzone/index.css +10 -4
- 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 +35 -52
- 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 +385 -282
- 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/Column/index.css +26 -4
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js +117 -67
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.css +100 -16
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js +97 -137
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/index.js +76 -27
- package/dist/elements/Hierarchy/ColumnBrowser/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +33 -3
- 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/CreateNewButton/index.css +9 -0
- package/dist/elements/Hierarchy/CreateNewButton/index.d.ts +9 -0
- package/dist/elements/Hierarchy/CreateNewButton/index.d.ts.map +1 -0
- package/dist/elements/Hierarchy/CreateNewButton/index.js +111 -0
- package/dist/elements/Hierarchy/CreateNewButton/index.js.map +1 -0
- package/dist/elements/Hierarchy/DocHeaderButton/index.css +21 -0
- package/dist/elements/Hierarchy/DocHeaderButton/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.js +116 -11
- package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.server.js +1 -3
- package/dist/elements/Hierarchy/DocHeaderButton/index.server.js.map +1 -1
- package/dist/elements/Hierarchy/Field/index.client.d.ts +5 -0
- package/dist/elements/Hierarchy/Field/index.client.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Field/index.client.js +120 -95
- package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
- package/dist/elements/Hierarchy/Field/index.css +3 -34
- package/dist/elements/Hierarchy/Modal/Footer/index.css +45 -0
- package/dist/elements/Hierarchy/Modal/Footer/index.d.ts +28 -0
- package/dist/elements/Hierarchy/Modal/Footer/index.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Modal/Footer/index.js +166 -0
- package/dist/elements/Hierarchy/Modal/Footer/index.js.map +1 -0
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts +18 -4
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js +88 -24
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/index.css +4 -53
- package/dist/elements/Hierarchy/Modal/index.d.ts +5 -2
- package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/index.js +145 -99
- package/dist/elements/Hierarchy/Modal/index.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/types.d.ts +15 -0
- package/dist/elements/Hierarchy/Modal/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/types.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.css +6 -0
- package/dist/elements/Hierarchy/MoveMany/index.d.ts +8 -3
- package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.js +103 -171
- package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/index.css +2 -9
- package/dist/elements/Hierarchy/Search/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Search/index.js +6 -73
- package/dist/elements/Hierarchy/Search/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/types.d.ts +2 -6
- package/dist/elements/Hierarchy/Search/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Search/types.js.map +1 -1
- package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts +0 -4
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js +93 -101
- 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 +3 -21
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.server.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/LoadMore/index.css +3 -3
- 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 +59 -30
- package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts +1 -1
- package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/TreeNode/index.js +54 -10
- package/dist/elements/Hierarchy/Tree/TreeNode/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.css +8 -9
- package/dist/elements/Hierarchy/Tree/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.js +29 -47
- package/dist/elements/Hierarchy/Tree/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/types.d.ts +9 -1
- package/dist/elements/Hierarchy/Tree/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/types.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/useChildren.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/useChildren.js +11 -1
- package/dist/elements/Hierarchy/Tree/useChildren.js.map +1 -1
- package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts +22 -0
- package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts.map +1 -0
- package/dist/elements/Hierarchy/getFolderHierarchySlug.js +17 -0
- package/dist/elements/Hierarchy/getFolderHierarchySlug.js.map +1 -0
- package/dist/elements/Hierarchy/move/moveDocuments.d.ts +34 -0
- package/dist/elements/Hierarchy/move/moveDocuments.d.ts.map +1 -0
- package/dist/elements/Hierarchy/move/moveDocuments.js +94 -0
- package/dist/elements/Hierarchy/move/moveDocuments.js.map +1 -0
- 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/ListControls/index.d.ts.map +1 -1
- package/dist/elements/ListControls/index.js +4 -3
- package/dist/elements/ListControls/index.js.map +1 -1
- package/dist/elements/ListControls/types.d.ts +4 -0
- package/dist/elements/ListControls/types.d.ts.map +1 -1
- package/dist/elements/ListControls/types.js.map +1 -1
- package/dist/elements/ListDrawer/index.d.ts.map +1 -1
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.d.ts +8 -0
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.d.ts.map +1 -0
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.js +65 -0
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.js.map +1 -0
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerCreateNewDocButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerCreateNewDocButton.js +1 -1
- package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerCreateNewDocButton.js.map +1 -1
- package/dist/elements/ListHeader/DrawerTitleActions/index.d.ts +1 -0
- package/dist/elements/ListHeader/DrawerTitleActions/index.d.ts.map +1 -1
- package/dist/elements/ListHeader/DrawerTitleActions/index.js +1 -0
- package/dist/elements/ListHeader/DrawerTitleActions/index.js.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 -5
- 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 +38 -19
- package/dist/elements/Locked/index.js.map +1 -1
- package/dist/elements/MiniCarousel/index.css +39 -37
- package/dist/elements/Nav/NavSidebarToggle/index.js +1 -1
- package/dist/elements/Nav/NavSidebarToggle/index.js.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.d.ts +1 -0
- package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.js +12 -18
- package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
- 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 +1 -7
- 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/Nav/context.d.ts +0 -1
- package/dist/elements/Nav/context.d.ts.map +1 -1
- package/dist/elements/Nav/context.js +92 -67
- package/dist/elements/Nav/context.js.map +1 -1
- package/dist/elements/Nav/index.css +47 -47
- package/dist/elements/Nav/index.d.ts +4 -0
- package/dist/elements/Nav/index.d.ts.map +1 -1
- package/dist/elements/Nav/index.js +16 -1
- package/dist/elements/Nav/index.js.map +1 -1
- package/dist/elements/NavGroup/index.css +29 -16
- 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/PopupButtonList/index.css +33 -17
- package/dist/elements/Popup/index.css +6 -0
- package/dist/elements/Popup/index.d.ts +10 -0
- package/dist/elements/Popup/index.d.ts.map +1 -1
- package/dist/elements/Popup/index.js +13 -6
- 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 +8 -4
- 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 +6 -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/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 +21 -18
- package/dist/elements/Search/SearchInput/index.js.map +1 -1
- package/dist/elements/SegmentedControl/index.css +58 -0
- package/dist/elements/SegmentedControl/index.d.ts +19 -0
- package/dist/elements/SegmentedControl/index.d.ts.map +1 -0
- package/dist/elements/SegmentedControl/index.js +104 -0
- package/dist/elements/SegmentedControl/index.js.map +1 -0
- package/dist/elements/SelectAll/index.css +3 -1
- package/dist/elements/SelectAll/index.d.ts.map +1 -1
- package/dist/elements/SelectAll/index.js +1 -2
- package/dist/elements/SelectAll/index.js.map +1 -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 +11 -9
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/SidebarRow/index.css +1 -5
- package/dist/elements/SidebarToggle/index.css +3 -18
- 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/DropTarget/index.css +20 -0
- package/dist/elements/StepNav/DropTarget/index.d.ts +16 -0
- package/dist/elements/StepNav/DropTarget/index.d.ts.map +1 -0
- package/dist/elements/StepNav/DropTarget/index.js +71 -0
- package/dist/elements/StepNav/DropTarget/index.js.map +1 -0
- package/dist/elements/StepNav/index.css +64 -14
- package/dist/elements/StepNav/index.d.ts.map +1 -1
- package/dist/elements/StepNav/index.js +147 -69
- package/dist/elements/StepNav/index.js.map +1 -1
- package/dist/elements/StepNav/types.d.ts +6 -0
- package/dist/elements/StepNav/types.d.ts.map +1 -1
- package/dist/elements/StepNav/types.js.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/File/index.css +24 -13
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.css +26 -7
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +149 -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/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 +42 -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/UploadFromURLModal/index.d.ts +1 -1
- package/dist/elements/Upload/UploadFromURLModal/index.d.ts.map +1 -1
- package/dist/elements/Upload/UploadFromURLModal/index.js.map +1 -1
- package/dist/elements/Upload/index.css +39 -37
- package/dist/elements/Upload/index.d.ts.map +1 -1
- package/dist/elements/Upload/index.js +37 -99
- package/dist/elements/Upload/index.js.map +1 -1
- package/dist/elements/Upload/usePasteFromClipboard.d.ts +14 -0
- package/dist/elements/Upload/usePasteFromClipboard.d.ts.map +1 -0
- package/dist/elements/Upload/usePasteFromClipboard.js +93 -0
- package/dist/elements/Upload/usePasteFromClipboard.js.map +1 -0
- package/dist/elements/Upload/useUploadFromUrl.d.ts +20 -0
- package/dist/elements/Upload/useUploadFromUrl.d.ts.map +1 -0
- package/dist/elements/Upload/useUploadFromUrl.js +201 -0
- package/dist/elements/Upload/useUploadFromUrl.js.map +1 -0
- package/dist/elements/UploadDropzoneContent/index.css +31 -0
- package/dist/elements/UploadDropzoneContent/index.d.ts +17 -0
- package/dist/elements/UploadDropzoneContent/index.d.ts.map +1 -0
- package/dist/elements/UploadDropzoneContent/index.js +62 -0
- package/dist/elements/UploadDropzoneContent/index.js.map +1 -0
- package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts +18 -0
- package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts.map +1 -0
- package/dist/elements/UserMenu/HoverSubmenuGroup.js +38 -0
- package/dist/elements/UserMenu/HoverSubmenuGroup.js.map +1 -0
- package/dist/elements/UserMenu/LanguageMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/LanguageMenu/index.js +83 -39
- package/dist/elements/UserMenu/LanguageMenu/index.js.map +1 -1
- package/dist/elements/UserMenu/SettingsMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/SettingsMenu/index.js +57 -21
- package/dist/elements/UserMenu/SettingsMenu/index.js.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/ThemeMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/ThemeMenu/index.js +83 -39
- package/dist/elements/UserMenu/ThemeMenu/index.js.map +1 -1
- package/dist/elements/UserMenu/index.css +58 -3
- 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 +77 -51
- package/dist/elements/UserMenu/index.js.map +1 -1
- package/dist/elements/UserMenu/useHoverSubmenu.d.ts +21 -0
- package/dist/elements/UserMenu/useHoverSubmenu.d.ts.map +1 -0
- package/dist/elements/UserMenu/useHoverSubmenu.js +260 -0
- package/dist/elements/UserMenu/useHoverSubmenu.js.map +1 -0
- package/dist/elements/ViewModeToggle/index.d.ts +8 -0
- package/dist/elements/ViewModeToggle/index.d.ts.map +1 -0
- package/dist/elements/ViewModeToggle/index.js +29 -0
- package/dist/elements/ViewModeToggle/index.js.map +1 -0
- 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/conditionValue.d.ts +32 -0
- package/dist/elements/WhereBuilder/conditionValue.d.ts.map +1 -0
- package/dist/elements/WhereBuilder/conditionValue.js +32 -0
- package/dist/elements/WhereBuilder/conditionValue.js.map +1 -0
- package/dist/elements/WhereBuilder/conditionValue.spec.js +65 -0
- package/dist/elements/WhereBuilder/conditionValue.spec.js.map +1 -0
- package/dist/elements/WhereBuilder/field-types.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/index.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/index.js +15 -4
- package/dist/elements/WhereBuilder/index.js.map +1 -1
- package/dist/exports/client/index.d.ts +9 -2
- 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 +45 -14
- 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 +44 -13
- package/dist/fields/Blocks/index.js.map +1 -1
- package/dist/fields/Checkbox/Input.d.ts +4 -2
- package/dist/fields/Checkbox/Input.d.ts.map +1 -1
- package/dist/fields/Checkbox/Input.js +136 -148
- package/dist/fields/Checkbox/Input.js.map +1 -1
- package/dist/fields/Checkbox/index.css +163 -186
- 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/Password/types.d.ts +3 -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/RadioGroup/index.css +0 -7
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +53 -17
- 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/optionsReducer.js +2 -0
- package/dist/fields/Relationship/optionsReducer.js.map +1 -1
- package/dist/fields/Relationship/select-components/MultiValueLabel/index.css +1 -1
- package/dist/fields/Relationship/types.d.ts +24 -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/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/Text/types.d.ts +2 -2
- package/dist/fields/Text/types.d.ts.map +1 -1
- package/dist/fields/Text/types.js.map +1 -1
- package/dist/fields/Textarea/index.d.ts +1 -1
- package/dist/fields/Upload/Input.d.ts.map +1 -1
- package/dist/fields/Upload/Input.js +61 -22
- package/dist/fields/Upload/Input.js.map +1 -1
- package/dist/fields/Upload/Input.spec.js +241 -0
- package/dist/fields/Upload/Input.spec.js.map +1 -0
- 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 +14 -5
- 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/Arrow/index.d.ts +1 -1
- package/dist/icons/Arrow/index.d.ts.map +1 -1
- package/dist/icons/Arrow/index.js +7 -1
- package/dist/icons/Arrow/index.js.map +1 -1
- package/dist/icons/CollapseLayers/index.css +5 -0
- package/dist/icons/CollapseLayers/index.d.ts +7 -0
- package/dist/icons/CollapseLayers/index.d.ts.map +1 -0
- package/dist/icons/CollapseLayers/index.js +23 -0
- package/dist/icons/CollapseLayers/index.js.map +1 -0
- 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/icons/Table/index.css +5 -0
- package/dist/icons/Table/index.d.ts +7 -0
- package/dist/icons/Table/index.d.ts.map +1 -0
- package/dist/icons/Table/index.js +25 -0
- package/dist/icons/Table/index.js.map +1 -0
- 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 +15 -5
- 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/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/Hierarchy/index.d.ts.map +1 -1
- package/dist/providers/Hierarchy/index.js +53 -24
- package/dist/providers/Hierarchy/index.js.map +1 -1
- package/dist/providers/Hierarchy/types.d.ts +2 -0
- package/dist/providers/Hierarchy/types.d.ts.map +1 -1
- package/dist/providers/Hierarchy/types.js.map +1 -1
- package/dist/providers/HierarchyDnd/index.css +51 -0
- package/dist/providers/HierarchyDnd/index.d.ts +21 -0
- package/dist/providers/HierarchyDnd/index.d.ts.map +1 -0
- package/dist/providers/HierarchyDnd/index.js +163 -0
- package/dist/providers/HierarchyDnd/index.js.map +1 -0
- package/dist/providers/HierarchyDnd/types.d.ts +56 -0
- package/dist/providers/HierarchyDnd/types.d.ts.map +1 -0
- package/dist/providers/HierarchyDnd/types.js +21 -0
- package/dist/providers/HierarchyDnd/types.js.map +1 -0
- 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/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/Wrapper/index.css +2 -1
- package/dist/templates/Default/Wrapper/index.d.ts +2 -0
- package/dist/templates/Default/Wrapper/index.d.ts.map +1 -1
- package/dist/templates/Default/Wrapper/index.js +12 -6
- package/dist/templates/Default/Wrapper/index.js.map +1 -1
- package/dist/templates/Default/index.css +3 -1
- 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 +19 -15
- 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/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/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/getFilesFromClipboard.d.ts +10 -0
- package/dist/utilities/getFilesFromClipboard.d.ts.map +1 -0
- package/dist/utilities/getFilesFromClipboard.js +49 -0
- package/dist/utilities/getFilesFromClipboard.js.map +1 -0
- 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/isURLAllowed.js +9 -3
- package/dist/utilities/isURLAllowed.js.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 +50 -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/SetDocumentTitle/index.d.ts.map +1 -1
- package/dist/views/Edit/SetDocumentTitle/index.js +4 -1
- package/dist/views/Edit/SetDocumentTitle/index.js.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 +3 -2
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/HierarchyList/DocumentListSelection/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/DocumentListSelection/index.js +100 -105
- package/dist/views/HierarchyList/DocumentListSelection/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.css +216 -0
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts +20 -0
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js +186 -0
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.css +38 -0
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts +15 -0
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js +85 -0
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.css +98 -0
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts +27 -0
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js +84 -0
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts +19 -0
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js +100 -0
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts +53 -0
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js +145 -0
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts +8 -0
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js +21 -0
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/index.css +115 -0
- package/dist/views/HierarchyList/HierarchyCards/index.d.ts +80 -0
- package/dist/views/HierarchyList/HierarchyCards/index.d.ts.map +1 -0
- package/dist/views/HierarchyList/HierarchyCards/index.js +457 -0
- package/dist/views/HierarchyList/HierarchyCards/index.js.map +1 -0
- package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts +6 -1
- package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyListHeader/index.js +10 -8
- package/dist/views/HierarchyList/HierarchyListHeader/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js +76 -62
- package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.js +82 -108
- package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.css +5 -164
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts +8 -2
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.js +20 -17
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/index.css +64 -36
- package/dist/views/HierarchyList/HierarchyTable/index.d.ts +13 -1
- package/dist/views/HierarchyList/HierarchyTable/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/index.js +156 -38
- package/dist/views/HierarchyList/HierarchyTable/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/types.d.ts +8 -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.css +1 -1
- package/dist/views/HierarchyList/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/index.js +103 -24
- package/dist/views/HierarchyList/index.js.map +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 +3 -5
- package/dist/views/List/ListHeader/index.js.map +1 -1
- package/dist/views/List/ListSelection/index.d.ts.map +1 -1
- package/dist/views/List/ListSelection/index.js +138 -122
- package/dist/views/List/ListSelection/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 +7 -2
- package/dist/views/List/handleHierarchy.d.ts.map +1 -1
- package/dist/views/List/handleHierarchy.js +50 -10
- package/dist/views/List/handleHierarchy.js.map +1 -1
- package/dist/views/List/index.client.d.ts.map +1 -1
- package/dist/views/List/index.client.js +132 -32
- package/dist/views/List/index.client.js.map +1 -1
- package/dist/views/List/index.css +1 -16
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +61 -15
- 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/getRouteData.js +8 -2
- package/dist/views/Root/getRouteData.js.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 +7 -11
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.css +0 -36
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts +0 -13
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.js +0 -141
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.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/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,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { getTranslation } from '@payloadcms/translations';
|
|
6
5
|
import React, { useCallback, useState } from 'react';
|
|
6
|
+
import { toast } from 'sonner';
|
|
7
7
|
import { Button } from '../../elements/Button/index.js';
|
|
8
8
|
import { FieldDescription } from '../../fields/FieldDescription/index.js';
|
|
9
9
|
import { FieldError } from '../../fields/FieldError/index.js';
|
|
@@ -15,6 +15,7 @@ import { LockIcon } from '../../icons/Lock/index.js';
|
|
|
15
15
|
import { LockOpenIcon } from '../../icons/LockOpen/index.js';
|
|
16
16
|
import { RefreshIcon } from '../../icons/Refresh/index.js';
|
|
17
17
|
import { useDocumentInfo } from '../../providers/DocumentInfo/index.js';
|
|
18
|
+
import { useLocale } from '../../providers/Locale/index.js';
|
|
18
19
|
import { useServerFunctions } from '../../providers/ServerFunctions/index.js';
|
|
19
20
|
import { useTranslation } from '../../providers/Translation/index.js';
|
|
20
21
|
import './index.css';
|
|
@@ -22,12 +23,10 @@ const baseClass = 'slug-field-component';
|
|
|
22
23
|
/**
|
|
23
24
|
* @experimental This component is experimental and may change or be removed in the future. Use at your own risk.
|
|
24
25
|
*/
|
|
25
|
-
const SlugFieldComponent =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
path
|
|
30
|
-
} = t0;
|
|
26
|
+
const SlugFieldComponent = ({
|
|
27
|
+
field,
|
|
28
|
+
path
|
|
29
|
+
}) => {
|
|
31
30
|
const {
|
|
32
31
|
admin,
|
|
33
32
|
label,
|
|
@@ -44,159 +43,124 @@ const SlugFieldComponent = t0 => {
|
|
|
44
43
|
t
|
|
45
44
|
} = useTranslation();
|
|
46
45
|
const {
|
|
46
|
+
id,
|
|
47
47
|
collectionSlug,
|
|
48
48
|
globalSlug
|
|
49
49
|
} = useDocumentInfo();
|
|
50
50
|
const {
|
|
51
51
|
slugify
|
|
52
52
|
} = useServerFunctions();
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
t2 = {
|
|
57
|
-
path: t1
|
|
58
|
-
};
|
|
59
|
-
$[0] = t1;
|
|
60
|
-
$[1] = t2;
|
|
61
|
-
} else {
|
|
62
|
-
t2 = $[1];
|
|
63
|
-
}
|
|
53
|
+
const {
|
|
54
|
+
code: locale
|
|
55
|
+
} = useLocale();
|
|
64
56
|
const {
|
|
65
57
|
path: fieldPath,
|
|
66
58
|
setValue,
|
|
67
59
|
showError,
|
|
68
60
|
value
|
|
69
|
-
} = useField(
|
|
61
|
+
} = useField({
|
|
62
|
+
path: path || field.name
|
|
63
|
+
});
|
|
70
64
|
const {
|
|
71
65
|
getData,
|
|
72
66
|
getDataByPath
|
|
73
67
|
} = useForm();
|
|
74
68
|
const [isLocked, setIsLocked] = useState(true);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
69
|
+
/**
|
|
70
|
+
* This method allows the user to generate their slug on demand, e.g. when they click the "generate" button.
|
|
71
|
+
* It uses the `slugify` server function to gain access to their custom slugify function defined in their field config.
|
|
72
|
+
*/
|
|
73
|
+
const handleGenerate = useCallback(async e => {
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
const valueToSlugify = useAsSlug ? getDataByPath(useAsSlug) : undefined;
|
|
76
|
+
let formattedSlug;
|
|
77
|
+
try {
|
|
78
|
+
formattedSlug = await slugify({
|
|
79
|
+
id: id ?? undefined,
|
|
81
80
|
collectionSlug,
|
|
82
81
|
data: getData(),
|
|
83
82
|
globalSlug,
|
|
83
|
+
locale,
|
|
84
84
|
path: fieldPath,
|
|
85
85
|
valueToSlugify
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
|
-
t4 = e_0 => {
|
|
112
|
-
e_0.preventDefault();
|
|
113
|
-
setIsLocked(_temp);
|
|
114
|
-
};
|
|
115
|
-
$[12] = t4;
|
|
116
|
-
} else {
|
|
117
|
-
t4 = $[12];
|
|
118
|
-
}
|
|
119
|
-
const toggleLock = t4;
|
|
120
|
-
let t5;
|
|
121
|
-
if ($[13] !== setValue) {
|
|
122
|
-
t5 = e_1 => {
|
|
123
|
-
setValue(e_1.target.value);
|
|
124
|
-
};
|
|
125
|
-
$[13] = setValue;
|
|
126
|
-
$[14] = t5;
|
|
127
|
-
} else {
|
|
128
|
-
t5 = $[14];
|
|
129
|
-
}
|
|
130
|
-
const handleChange = t5;
|
|
87
|
+
} catch (_err) {
|
|
88
|
+
toast.error(t('error:unspecific'));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Empty only comes back for globals (no counter fallback) — keep the current value. For
|
|
92
|
+
// collections the server returns the `<singular>-N` fallback when there's no source.
|
|
93
|
+
if (formattedSlug === null || formattedSlug === undefined || formattedSlug === '') {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The result may be the same as the current value, and if so, we don't want to trigger a re-render.
|
|
98
|
+
*/
|
|
99
|
+
if (value !== formattedSlug) {
|
|
100
|
+
setValue(formattedSlug);
|
|
101
|
+
}
|
|
102
|
+
}, [setValue, value, useAsSlug, getData, slugify, getDataByPath, id, collectionSlug, globalSlug, locale, fieldPath, t]);
|
|
103
|
+
const toggleLock = useCallback(e_0 => {
|
|
104
|
+
e_0.preventDefault();
|
|
105
|
+
setIsLocked(prev => !prev);
|
|
106
|
+
}, []);
|
|
107
|
+
const handleChange = useCallback(e_1 => {
|
|
108
|
+
setValue(e_1.target.value);
|
|
109
|
+
}, [setValue]);
|
|
131
110
|
const isReadOnly = Boolean(readOnlyFromProps || isLocked);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
path: fieldPath,
|
|
140
|
-
showError
|
|
141
|
-
});
|
|
142
|
-
const t9 = showError && "form-input-group-error";
|
|
143
|
-
let t10;
|
|
144
|
-
if ($[15] !== t9) {
|
|
145
|
-
t10 = ["form-input-group", `${baseClass}__input-container`, t9].filter(Boolean);
|
|
146
|
-
$[15] = t9;
|
|
147
|
-
$[16] = t10;
|
|
148
|
-
} else {
|
|
149
|
-
t10 = $[16];
|
|
150
|
-
}
|
|
151
|
-
return _jsxs("div", {
|
|
152
|
-
className: t6,
|
|
153
|
-
children: [t7, _jsxs("div", {
|
|
111
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
112
|
+
className: ['field-type', baseClass, showError && `${baseClass}--error`, isLocked && `${baseClass}--locked`, readOnlyFromProps && `${baseClass}--read-only`].filter(Boolean).join(' '),
|
|
113
|
+
children: [/*#__PURE__*/_jsx(FieldLabel, {
|
|
114
|
+
htmlFor: `field-${fieldPath}`,
|
|
115
|
+
label: label,
|
|
116
|
+
required: required
|
|
117
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
154
118
|
className: `${baseClass}__wrap`,
|
|
155
|
-
children: [
|
|
156
|
-
|
|
157
|
-
|
|
119
|
+
children: [/*#__PURE__*/_jsx(FieldError, {
|
|
120
|
+
path: fieldPath,
|
|
121
|
+
showError: showError
|
|
122
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
123
|
+
className: ['form-input-group', `${baseClass}__input-container`, showError && 'form-input-group-error'].filter(Boolean).join(' '),
|
|
124
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
158
125
|
"aria-label": getTranslation(label, i18n) || path,
|
|
159
126
|
className: `form-input ${baseClass}__input`,
|
|
160
127
|
disabled: isReadOnly,
|
|
161
|
-
id: `field-${fieldPath?.replace(/\./g,
|
|
128
|
+
id: `field-${fieldPath?.replace(/\./g, '__')}`,
|
|
162
129
|
name: fieldPath,
|
|
163
130
|
onChange: handleChange,
|
|
164
131
|
placeholder: getTranslation(placeholder, i18n),
|
|
165
132
|
type: "text",
|
|
166
|
-
value: value ||
|
|
167
|
-
}), !readOnlyFromProps && _jsxs("div", {
|
|
133
|
+
value: value || ''
|
|
134
|
+
}), !readOnlyFromProps && /*#__PURE__*/_jsxs("div", {
|
|
168
135
|
className: `${baseClass}__actions`,
|
|
169
|
-
children: [!isLocked && _jsx(Button, {
|
|
170
|
-
"aria-label": t(
|
|
136
|
+
children: [!isLocked && /*#__PURE__*/_jsx(Button, {
|
|
137
|
+
"aria-label": t('authentication:generate'),
|
|
171
138
|
buttonStyle: "ghost",
|
|
172
139
|
className: `${baseClass}__action-btn`,
|
|
173
|
-
icon: _jsx(RefreshIcon, {}),
|
|
174
|
-
id: `field-${fieldPath?.replace(/\./g,
|
|
140
|
+
icon: /*#__PURE__*/_jsx(RefreshIcon, {}),
|
|
141
|
+
id: `field-${fieldPath?.replace(/\./g, '__')}-generate`,
|
|
175
142
|
margin: false,
|
|
176
143
|
onClick: handleGenerate
|
|
177
|
-
}), _jsx(Button, {
|
|
178
|
-
"aria-label": isLocked ? t(
|
|
144
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
145
|
+
"aria-label": isLocked ? t('general:unlock') : t('general:lock'),
|
|
179
146
|
buttonStyle: "ghost",
|
|
180
147
|
className: `${baseClass}__action-btn`,
|
|
181
|
-
icon: isLocked ? _jsx(LockIcon, {
|
|
148
|
+
icon: isLocked ? /*#__PURE__*/_jsx(LockIcon, {
|
|
182
149
|
size: 16
|
|
183
|
-
}) : _jsx(LockOpenIcon, {
|
|
150
|
+
}) : /*#__PURE__*/_jsx(LockOpenIcon, {
|
|
184
151
|
size: 16
|
|
185
152
|
}),
|
|
186
|
-
id: `field-${fieldPath?.replace(/\./g,
|
|
153
|
+
id: `field-${fieldPath?.replace(/\./g, '__')}-lock`,
|
|
187
154
|
margin: false,
|
|
188
155
|
onClick: toggleLock
|
|
189
156
|
})]
|
|
190
157
|
})]
|
|
191
|
-
}), _jsx(FieldDescription, {
|
|
192
|
-
description,
|
|
158
|
+
}), /*#__PURE__*/_jsx(FieldDescription, {
|
|
159
|
+
description: description,
|
|
193
160
|
path: fieldPath
|
|
194
161
|
})]
|
|
195
162
|
})]
|
|
196
163
|
});
|
|
197
164
|
};
|
|
198
165
|
export const SlugField = withCondition(SlugFieldComponent);
|
|
199
|
-
function _temp(prev) {
|
|
200
|
-
return !prev;
|
|
201
|
-
}
|
|
202
166
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,QAAQ,QAAQ;AAE7C,SAASC,MAAM,QAAQ;AACvB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,OAAO,QAAQ;AACxB,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AACzB,SAASC,YAAY,QAAQ;AAC7B,SAASC,WAAW,QAAQ;AAC5B,SAASC,eAAe,QAA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file":"index.js","names":["getTranslation","React","useCallback","useState","toast","Button","FieldDescription","FieldError","FieldLabel","useForm","useField","withCondition","LockIcon","LockOpenIcon","RefreshIcon","useDocumentInfo","useLocale","useServerFunctions","useTranslation","baseClass","SlugFieldComponent","field","path","admin","label","required","useAsSlug","description","placeholder","readOnly","readOnlyFromProps","i18n","t","id","collectionSlug","globalSlug","slugify","code","locale","fieldPath","setValue","showError","value","name","getData","getDataByPath","isLocked","setIsLocked","handleGenerate","e","preventDefault","valueToSlugify","undefined","formattedSlug","data","_err","error","toggleLock","prev","handleChange","target","isReadOnly","Boolean","_jsxs","className","filter","join","_jsx","htmlFor","disabled","replace","onChange","type","buttonStyle","icon","margin","onClick","size","SlugField"],"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'\nimport { toast } from 'sonner'\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 { useLocale } from '../../providers/Locale/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 { id, collectionSlug, globalSlug } = useDocumentInfo()\n\n const { slugify } = useServerFunctions()\n\n const { code: locale } = useLocale()\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 = useAsSlug ? getDataByPath(useAsSlug) : undefined\n\n let formattedSlug: null | string | undefined\n\n try {\n formattedSlug = await slugify({\n id: id ?? undefined,\n collectionSlug,\n data: getData(),\n globalSlug,\n locale,\n path: fieldPath,\n valueToSlugify,\n })\n } catch (_err) {\n toast.error(t('error:unspecific'))\n return\n }\n\n // Empty only comes back for globals (no counter fallback) — keep the current value. For\n // collections the server returns the `<singular>-N` fallback when there's no source.\n if (formattedSlug === null || formattedSlug === undefined || formattedSlug === '') {\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 id,\n collectionSlug,\n globalSlug,\n locale,\n fieldPath,\n t,\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;;;AAIA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,QAAQ,QAAQ;AAC7C,SAASC,KAAK,QAAQ;AAEtB,SAASC,MAAM,QAAQ;AACvB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,UAAU,QAAQ;AAC3B,SAASC,OAAO,QAAQ;AACxB,SAASC,QAAQ,QAAQ;AACzB,SAAS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W,GAAG7C,SAAA,cAAuB;YACrCuD,IAAA,EAAM5B,QAAA,gBAAWqB,IAAA,CAACvD,QAAA;cAASiE,IAAA,EAAM;8BAASV,IAAA,CAACtD,YAAA;cAAagE,IAAA,EAAM;;YAC9D5C,EAAA,EAAI,SAASM,SAAA,EAAW+B,OAAA,CAAQ,OAAO,YAAY;YACnDK,MAAA,EAAQ;YACRC,OAAA,EAASnB;;;uBAMjBU,IAAA,CAAC7D,gBAAA;QAAiBqB,WAAA,EAAaA,WAAA;QAAaL,IAAA,EAAMiB;;;;AAI1D;AAEA,OAAO,MAAMuC,SAAA,GAAYnE,aAAA,CAAcS,kBAAA","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
|
|
@@ -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
|
/**
|
|
@@ -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,C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AO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,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":[]}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/fields/Upload/Input.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A;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAqwBlD"}
|
|
@@ -5,6 +5,7 @@ import { useModal } from '@faceless-ui/modal';
|
|
|
5
5
|
import { formatAdminURL } from 'payload/shared';
|
|
6
6
|
import * as qs from 'qs-esm';
|
|
7
7
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
8
|
+
import { toast } from 'sonner';
|
|
8
9
|
import { useBulkUpload } from '../../elements/BulkUpload/index.js';
|
|
9
10
|
import { Button } from '../../elements/Button/index.js';
|
|
10
11
|
import { useDocumentDrawer } from '../../elements/DocumentDrawer/index.js';
|
|
@@ -18,6 +19,8 @@ import { FieldLabel } from '../../fields/FieldLabel/index.js';
|
|
|
18
19
|
import { useAuth } from '../../providers/Auth/index.js';
|
|
19
20
|
import { useLocale } from '../../providers/Locale/index.js';
|
|
20
21
|
import { useTranslation } from '../../providers/Translation/index.js';
|
|
22
|
+
import { abortAndIgnore } from '../../utilities/abortAndIgnore.js';
|
|
23
|
+
import { getFilesFromClipboard } from '../../utilities/getFilesFromClipboard.js';
|
|
21
24
|
import { normalizeRelationshipValue } from '../../utilities/normalizeRelationshipValue.js';
|
|
22
25
|
import { fieldBaseClass } from '../shared/index.js';
|
|
23
26
|
import { UploadComponentHasMany } from './HasMany/index.js';
|
|
@@ -139,10 +142,6 @@ export function UploadInput(props) {
|
|
|
139
142
|
}] = useDocumentDrawer({
|
|
140
143
|
collectionSlug: activeRelationTo
|
|
141
144
|
});
|
|
142
|
-
/**
|
|
143
|
-
* Track the last loaded value to prevent unnecessary reloads
|
|
144
|
-
*/
|
|
145
|
-
const loadedValueRef = React.useRef(null);
|
|
146
145
|
const canCreate = useMemo(() => {
|
|
147
146
|
if (!allowCreate) {
|
|
148
147
|
return false;
|
|
@@ -159,7 +158,7 @@ export function UploadInput(props) {
|
|
|
159
158
|
onChangeFromProps(newValue);
|
|
160
159
|
}
|
|
161
160
|
}, [onChangeFromProps]);
|
|
162
|
-
const populateDocs = React.useCallback(async items => {
|
|
161
|
+
const populateDocs = React.useCallback(async (items, options) => {
|
|
163
162
|
if (!items?.length) {
|
|
164
163
|
return [];
|
|
165
164
|
}
|
|
@@ -205,7 +204,8 @@ export function UploadInput(props) {
|
|
|
205
204
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
206
205
|
'X-Payload-HTTP-Method-Override': 'GET'
|
|
207
206
|
},
|
|
208
|
-
method: 'POST'
|
|
207
|
+
method: 'POST',
|
|
208
|
+
signal: options?.signal
|
|
209
209
|
});
|
|
210
210
|
let docs = [];
|
|
211
211
|
if (response.ok) {
|
|
@@ -298,7 +298,18 @@ export function UploadInput(props) {
|
|
|
298
298
|
}
|
|
299
299
|
openModal(drawerSlug);
|
|
300
300
|
}, [hasMany, relationTo, activeRelationTo, setCollectionSlug, collectionSlugsWithCreatePermission, maxRows, openModal, drawerSlug, setInitialFiles, setSelectableCollections, setMaxFiles]);
|
|
301
|
-
|
|
301
|
+
const handlePasteFromClipboard = useCallback(async () => {
|
|
302
|
+
try {
|
|
303
|
+
const files = await getFilesFromClipboard();
|
|
304
|
+
if (!files) {
|
|
305
|
+
toast.error(t('error:noFileFoundInClipboard'));
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
onLocalFileSelection(files);
|
|
309
|
+
} catch (_err) {
|
|
310
|
+
toast.error(t('error:unableToReadClipboard'));
|
|
311
|
+
}
|
|
312
|
+
}, [onLocalFileSelection, t]);
|
|
302
313
|
const onListBulkSelect = React.useCallback(async (docs_0, collectionSlug) => {
|
|
303
314
|
const isPoly_1 = Array.isArray(relationTo);
|
|
304
315
|
const relationToUse = isPoly_1 ? collectionSlug || activeRelationTo : activeRelationTo;
|
|
@@ -308,23 +319,34 @@ export function UploadInput(props) {
|
|
|
308
319
|
selectedDocIDs.push(id_0);
|
|
309
320
|
}
|
|
310
321
|
}
|
|
311
|
-
|
|
322
|
+
if (!selectedDocIDs.length) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
// A single-value field only has room for one pick, so it takes the first and replaces rather
|
|
326
|
+
// than appending - otherwise confirming would hand a scalar field an array.
|
|
327
|
+
const idsToApply = hasMany ? selectedDocIDs : selectedDocIDs.slice(0, 1);
|
|
328
|
+
const itemsToLoad = idsToApply.map(id_1 => ({
|
|
312
329
|
relationTo: relationToUse,
|
|
313
330
|
value: id_1
|
|
314
331
|
}));
|
|
315
332
|
const loadedDocs = await populateDocs(itemsToLoad);
|
|
316
333
|
if (loadedDocs) {
|
|
317
|
-
setPopulatedDocs(currentDocs_0 => [...(currentDocs_0 || []), ...loadedDocs]);
|
|
334
|
+
setPopulatedDocs(currentDocs_0 => hasMany ? [...(currentDocs_0 || []), ...loadedDocs] : loadedDocs);
|
|
318
335
|
}
|
|
319
|
-
const newValues_0 =
|
|
336
|
+
const newValues_0 = idsToApply.map(id_2 => isPoly_1 ? {
|
|
320
337
|
relationTo: relationToUse,
|
|
321
338
|
value: id_2
|
|
322
339
|
} : id_2);
|
|
340
|
+
if (!hasMany) {
|
|
341
|
+
onChange(newValues_0[0]);
|
|
342
|
+
closeListDrawer();
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
323
345
|
// Normalize existing values before merging
|
|
324
346
|
const normalizedExisting_0 = Array.isArray(value) ? value.map(normalizeValue) : [];
|
|
325
347
|
onChange([...normalizedExisting_0, ...newValues_0]);
|
|
326
348
|
closeListDrawer();
|
|
327
|
-
}, [activeRelationTo, closeListDrawer, onChange, populateDocs, value, relationTo, normalizeValue]);
|
|
349
|
+
}, [activeRelationTo, closeListDrawer, hasMany, onChange, populateDocs, value, relationTo, normalizeValue]);
|
|
328
350
|
const onDocCreate = React.useCallback(data_0 => {
|
|
329
351
|
const isPoly_2 = Array.isArray(relationTo);
|
|
330
352
|
if (data_0.doc) {
|
|
@@ -433,6 +455,7 @@ export function UploadInput(props) {
|
|
|
433
455
|
setPopulatedDocs(newValue_4);
|
|
434
456
|
}, [onChange, hasMany, relationTo]);
|
|
435
457
|
useEffect(() => {
|
|
458
|
+
const abortController = new AbortController();
|
|
436
459
|
async function loadInitialDocs() {
|
|
437
460
|
if (value) {
|
|
438
461
|
let itemsToLoad_0 = [];
|
|
@@ -469,23 +492,26 @@ export function UploadInput(props) {
|
|
|
469
492
|
}
|
|
470
493
|
}
|
|
471
494
|
if (itemsToLoad_0.length > 0) {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
495
|
+
try {
|
|
496
|
+
const loadedDocs_1 = await populateDocs(itemsToLoad_0, {
|
|
497
|
+
signal: abortController.signal
|
|
498
|
+
});
|
|
499
|
+
if (loadedDocs_1 && !abortController.signal.aborted) {
|
|
500
|
+
setPopulatedDocs(loadedDocs_1);
|
|
501
|
+
}
|
|
502
|
+
} catch (_err_0) {
|
|
503
|
+
// Ignore aborted requests from superseded values / unmount
|
|
476
504
|
}
|
|
477
505
|
}
|
|
478
506
|
} else {
|
|
479
507
|
// Clear populated docs when value is cleared
|
|
480
508
|
setPopulatedDocs([]);
|
|
481
|
-
loadedValueRef.current = null;
|
|
482
509
|
}
|
|
483
510
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
511
|
+
void loadInitialDocs();
|
|
512
|
+
return () => {
|
|
513
|
+
abortAndIgnore(abortController);
|
|
514
|
+
};
|
|
489
515
|
}, [populateDocs, value, relationTo]);
|
|
490
516
|
useEffect(() => {
|
|
491
517
|
setOnSuccess(onUploadSuccess);
|
|
@@ -579,11 +605,24 @@ export function UploadInput(props) {
|
|
|
579
605
|
onClick: openListDrawer,
|
|
580
606
|
size: "medium",
|
|
581
607
|
children: t('fields:chooseFromExisting')
|
|
608
|
+
}), canCreate && !readOnly && /*#__PURE__*/_jsxs(_Fragment, {
|
|
609
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
610
|
+
className: `${baseClass}__dropzoneContent__orText`,
|
|
611
|
+
children: t('general:or')
|
|
612
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
613
|
+
buttonStyle: "secondary",
|
|
614
|
+
className: `${baseClass}__pasteFromClipboard`,
|
|
615
|
+
icon: "clipboard",
|
|
616
|
+
onClick: handlePasteFromClipboard,
|
|
617
|
+
size: "medium",
|
|
618
|
+
tooltip: t('upload:pasteFromClipboard')
|
|
619
|
+
})]
|
|
582
620
|
}), /*#__PURE__*/_jsx(CreateDocDrawer, {
|
|
583
621
|
onSave: onDocCreate
|
|
584
622
|
}), /*#__PURE__*/_jsx(ListDrawer, {
|
|
585
623
|
allowCreate: canCreate,
|
|
586
|
-
|
|
624
|
+
// Single-value fields select too, so the drawer always has a Confirm action.
|
|
625
|
+
enableRowSelections: true,
|
|
587
626
|
onBulkSelect: onListBulkSelect,
|
|
588
627
|
onSelect: onListSelect
|
|
589
628
|
})]
|