@payloadcms/ui 4.0.0-internal.af6aad0 → 4.0.0-internal.b8a92d2
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 +1 -0
- package/dist/css/colors.css +9 -8
- package/dist/css/forms.css +1 -0
- package/dist/css/preflight.css +1 -0
- package/dist/css/spacing.css +12 -0
- package/dist/css/typography.css +158 -14
- package/dist/elements/APIKeyInput/index.d.ts +2 -0
- package/dist/elements/APIKeyInput/index.d.ts.map +1 -1
- package/dist/elements/APIKeyInput/index.js +27 -29
- package/dist/elements/APIKeyInput/index.js.map +1 -1
- package/dist/elements/AddNewRelation/index.css +4 -0
- package/dist/elements/AddNewRelation/index.js +2 -2
- package/dist/elements/AddNewRelation/index.js.map +1 -1
- package/dist/elements/AppHeader/EditViewWidthSettings/index.css +5 -0
- package/dist/elements/AppHeader/EditViewWidthSettings/index.d.ts +4 -0
- package/dist/elements/AppHeader/EditViewWidthSettings/index.d.ts.map +1 -0
- package/dist/elements/AppHeader/EditViewWidthSettings/index.js +77 -0
- package/dist/elements/AppHeader/EditViewWidthSettings/index.js.map +1 -0
- package/dist/{icons/CollapseLayers → elements/AppHeader/SettingsMenu}/index.css +1 -1
- package/dist/elements/AppHeader/SettingsMenu/index.d.ts +4 -0
- package/dist/elements/AppHeader/SettingsMenu/index.d.ts.map +1 -0
- package/dist/elements/AppHeader/SettingsMenu/index.js +59 -0
- package/dist/elements/AppHeader/SettingsMenu/index.js.map +1 -0
- package/dist/elements/AppHeader/TypeSizeSettings/index.d.ts +3 -0
- package/dist/elements/AppHeader/TypeSizeSettings/index.d.ts.map +1 -0
- package/dist/elements/AppHeader/TypeSizeSettings/index.js +58 -0
- package/dist/elements/AppHeader/TypeSizeSettings/index.js.map +1 -0
- package/dist/elements/AppHeader/index.css +3 -4
- package/dist/elements/AppHeader/index.d.ts +8 -1
- package/dist/elements/AppHeader/index.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.js +16 -6
- package/dist/elements/AppHeader/index.js.map +1 -1
- package/dist/elements/Autosave/index.d.ts.map +1 -1
- package/dist/elements/Autosave/index.js +2 -3
- package/dist/elements/Autosave/index.js.map +1 -1
- package/dist/elements/Banner/index.css +4 -0
- package/dist/elements/Banner/index.d.ts.map +1 -1
- package/dist/elements/Banner/index.js +1 -0
- package/dist/elements/Banner/index.js.map +1 -1
- package/dist/elements/BulkUpload/ActionsBar/index.css +1 -0
- package/dist/elements/BulkUpload/AddingFilesView/index.css +2 -4
- package/dist/elements/BulkUpload/FileSidebar/index.css +1 -0
- package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts +1 -1
- package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts.map +1 -1
- package/dist/elements/BulkUpload/FormsManager/createFormData.js +7 -3
- 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 +18 -12
- package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
- package/dist/elements/BulkUpload/index.css +2 -0
- package/dist/elements/Button/index.css +0 -23
- 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/Collapsible/index.css +1 -0
- package/dist/elements/CopyLocaleData/index.d.ts.map +1 -1
- package/dist/elements/CopyLocaleData/index.js +8 -9
- package/dist/elements/CopyLocaleData/index.js.map +1 -1
- package/dist/elements/DatePicker/index.css +2 -0
- package/dist/elements/DefaultListViewTabs/index.css +0 -1
- package/dist/elements/DefaultListViewTabs/index.d.ts.map +1 -1
- package/dist/elements/DefaultListViewTabs/index.js +62 -84
- package/dist/elements/DefaultListViewTabs/index.js.map +1 -1
- package/dist/elements/DeleteMany/index.d.ts.map +1 -1
- package/dist/elements/DeleteMany/index.js +2 -3
- package/dist/elements/DeleteMany/index.js.map +1 -1
- package/dist/elements/Dialog/index.css +1 -0
- package/dist/elements/DocumentControls/index.css +1 -0
- 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/DocumentFields/index.css +2 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +3 -2
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.css +1 -0
- package/dist/elements/DocumentHeader/Tabs/index.d.ts +1 -0
- package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.js +5 -3
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.css +1 -0
- package/dist/elements/DocumentHeader/index.d.ts +1 -0
- package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/index.js +4 -2
- package/dist/elements/DocumentHeader/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/DuplicateDocument/index.d.ts.map +1 -1
- package/dist/elements/DuplicateDocument/index.js +2 -3
- package/dist/elements/DuplicateDocument/index.js.map +1 -1
- package/dist/elements/EditMany/DrawerContent.d.ts.map +1 -1
- package/dist/elements/EditMany/DrawerContent.js +2 -3
- package/dist/elements/EditMany/DrawerContent.js.map +1 -1
- package/dist/elements/EditUpload/index.css +1 -1
- package/dist/elements/FieldDiffContainer/index.css +1 -0
- package/dist/elements/FieldDiffLabel/index.css +1 -0
- package/dist/elements/FileDetails/StaticFileDetails/index.css +2 -0
- package/dist/elements/HTMLDiff/index.css +1 -0
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.css +4 -22
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js +49 -68
- package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.css +15 -100
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js +137 -97
- 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 +23 -51
- package/dist/elements/Hierarchy/ColumnBrowser/index.js.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +3 -26
- package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts.map +1 -1
- package/dist/elements/Hierarchy/ColumnBrowser/types.js.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.js +1 -6
- package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.server.js +3 -1
- package/dist/elements/Hierarchy/DocHeaderButton/index.server.js.map +1 -1
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.css +36 -0
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts +13 -0
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.d.ts.map +1 -0
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.js +141 -0
- package/dist/elements/Hierarchy/Field/SelectedHierarchies.js.map +1 -0
- package/dist/elements/Hierarchy/Field/index.client.d.ts +0 -5
- package/dist/elements/Hierarchy/Field/index.client.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Field/index.client.js +95 -120
- package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
- package/dist/elements/Hierarchy/Field/index.css +34 -3
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts +4 -18
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js +24 -88
- package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/index.css +53 -4
- package/dist/elements/Hierarchy/Modal/index.d.ts +2 -5
- package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Modal/index.js +99 -136
- package/dist/elements/Hierarchy/Modal/index.js.map +1 -1
- package/dist/elements/Hierarchy/Modal/types.d.ts +0 -15
- 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/MoveMany/index.d.ts +3 -7
- package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.js +171 -45
- package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/index.css +9 -2
- package/dist/elements/Hierarchy/Search/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Search/index.js +73 -6
- package/dist/elements/Hierarchy/Search/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/types.d.ts +6 -2
- 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/Search/useHierarchySearch.js +2 -3
- package/dist/elements/Hierarchy/Search/useHierarchySearch.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts +4 -0
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js +186 -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 +21 -1
- 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/TreeNode/index.css +29 -59
- 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 +10 -54
- package/dist/elements/Hierarchy/Tree/TreeNode/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.css +9 -8
- package/dist/elements/Hierarchy/Tree/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Tree/index.js +47 -29
- package/dist/elements/Hierarchy/Tree/index.js.map +1 -1
- package/dist/elements/Hierarchy/Tree/types.d.ts +1 -9
- 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 +1 -11
- package/dist/elements/Hierarchy/Tree/useChildren.js.map +1 -1
- package/dist/elements/ItemsDrawer/index.css +3 -0
- package/dist/elements/ListControls/index.css +1 -0
- package/dist/elements/ListControls/index.d.ts.map +1 -1
- package/dist/elements/ListControls/index.js +7 -2
- package/dist/elements/ListControls/index.js.map +1 -1
- package/dist/elements/ListControls/types.d.ts +3 -5
- package/dist/elements/ListControls/types.d.ts.map +1 -1
- package/dist/elements/ListControls/types.js.map +1 -1
- package/dist/elements/ListControlsBar/index.css +1 -0
- package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js +3 -4
- package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js.map +1 -1
- package/dist/elements/LivePreview/Window/index.css +1 -0
- package/dist/elements/LivePreview/Window/index.js +1 -1
- package/dist/elements/LivePreview/Window/index.js.map +1 -1
- package/dist/elements/Localizer/index.js +1 -1
- package/dist/elements/Localizer/index.js.map +1 -1
- 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 +0 -1
- package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.js +18 -12
- package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
- package/dist/elements/Nav/SidebarTabs/index.css +2 -1
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js +3 -2
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js.map +1 -1
- package/dist/elements/Nav/context.d.ts +1 -0
- package/dist/elements/Nav/context.d.ts.map +1 -1
- package/dist/elements/Nav/context.js +67 -92
- package/dist/elements/Nav/context.js.map +1 -1
- package/dist/elements/Nav/index.css +44 -47
- package/dist/elements/Nav/index.d.ts +0 -4
- package/dist/elements/Nav/index.d.ts.map +1 -1
- package/dist/elements/Nav/index.js +1 -16
- package/dist/elements/Nav/index.js.map +1 -1
- package/dist/elements/NavGroup/index.css +15 -29
- package/dist/elements/PageControls/index.css +1 -0
- package/dist/elements/PillSelector/index.css +1 -0
- package/dist/elements/Popup/PopupButtonList/index.css +16 -32
- package/dist/elements/Popup/index.css +0 -6
- package/dist/elements/Popup/index.d.ts +0 -10
- package/dist/elements/Popup/index.d.ts.map +1 -1
- package/dist/elements/Popup/index.js +5 -12
- package/dist/elements/Popup/index.js.map +1 -1
- package/dist/elements/PreviewSizes/index.css +2 -0
- package/dist/elements/PublishButton/ScheduleDrawer/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/index.js +8 -30
- package/dist/elements/PublishButton/ScheduleDrawer/index.js.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/types.js.map +1 -1
- package/dist/elements/PublishButton/index.css +1 -0
- package/dist/elements/PublishButton/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/index.js +16 -31
- package/dist/elements/PublishButton/index.js.map +1 -1
- package/dist/elements/PublishMany/DrawerContent.d.ts.map +1 -1
- package/dist/elements/PublishMany/DrawerContent.js +2 -3
- package/dist/elements/PublishMany/DrawerContent.js.map +1 -1
- package/dist/elements/QueryPresets/QueryPresetBar/index.d.ts.map +1 -1
- package/dist/elements/QueryPresets/QueryPresetBar/index.js +14 -1
- package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
- package/dist/elements/QueryPresets/fields/Heading/index.css +1 -0
- package/dist/elements/ReactSelect/types.d.ts +0 -5
- package/dist/elements/ReactSelect/types.d.ts.map +1 -1
- package/dist/elements/ReactSelect/types.js.map +1 -1
- package/dist/elements/RenderTitle/index.css +1 -0
- package/dist/elements/RestoreMany/index.d.ts.map +1 -1
- package/dist/elements/RestoreMany/index.js +2 -3
- package/dist/elements/RestoreMany/index.js.map +1 -1
- package/dist/elements/SaveDraftButton/index.d.ts.map +1 -1
- package/dist/elements/SaveDraftButton/index.js +2 -3
- package/dist/elements/SaveDraftButton/index.js.map +1 -1
- package/dist/elements/SelectAll/index.d.ts.map +1 -1
- package/dist/elements/SelectAll/index.js +2 -1
- package/dist/elements/SelectAll/index.js.map +1 -1
- package/dist/elements/SelectRow/index.d.ts.map +1 -1
- package/dist/elements/SelectRow/index.js +2 -1
- package/dist/elements/SelectRow/index.js.map +1 -1
- package/dist/elements/SidebarRow/index.css +5 -1
- package/dist/elements/SidebarToggle/index.css +1 -3
- package/dist/elements/Status/index.d.ts.map +1 -1
- package/dist/elements/Status/index.js +2 -3
- package/dist/elements/Status/index.js.map +1 -1
- package/dist/elements/StepNav/index.d.ts.map +1 -1
- package/dist/elements/StepNav/index.js +10 -14
- package/dist/elements/StepNav/index.js.map +1 -1
- package/dist/elements/StepNav/types.d.ts +0 -6
- 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/Hierarchy/index.css +7 -5
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +3 -14
- package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js.map +1 -1
- package/dist/elements/Table/OrderableTable.d.ts.map +1 -1
- package/dist/elements/Table/OrderableTable.js +2 -3
- package/dist/elements/Table/OrderableTable.js.map +1 -1
- package/dist/elements/Table/RelationshipProvider/index.d.ts.map +1 -1
- package/dist/elements/Table/RelationshipProvider/index.js +2 -3
- package/dist/elements/Table/RelationshipProvider/index.js.map +1 -1
- package/dist/elements/Table/index.css +1 -0
- package/dist/elements/TableSection/index.css +1 -0
- package/dist/elements/Tabs/index.css +1 -0
- package/dist/elements/Thumbnail/index.css +1 -0
- package/dist/elements/TimezonePicker/index.css +1 -0
- package/dist/elements/Tooltip/index.css +7 -0
- package/dist/elements/UnpublishButton/index.d.ts.map +1 -1
- package/dist/elements/UnpublishButton/index.js +3 -4
- package/dist/elements/UnpublishButton/index.js.map +1 -1
- package/dist/elements/UnpublishMany/DrawerContent.d.ts.map +1 -1
- package/dist/elements/UnpublishMany/DrawerContent.js +2 -3
- package/dist/elements/UnpublishMany/DrawerContent.js.map +1 -1
- package/dist/elements/UserMenu/LanguageMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/LanguageMenu/index.js +39 -83
- 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 +21 -57
- package/dist/elements/UserMenu/SettingsMenu/index.js.map +1 -1
- package/dist/elements/UserMenu/ThemeMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/ThemeMenu/index.js +39 -83
- package/dist/elements/UserMenu/ThemeMenu/index.js.map +1 -1
- package/dist/elements/UserMenu/index.css +2 -32
- package/dist/elements/UserMenu/index.d.ts +0 -1
- package/dist/elements/UserMenu/index.d.ts.map +1 -1
- package/dist/elements/UserMenu/index.js +51 -77
- package/dist/elements/UserMenu/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/Relationship/index.js +1 -1
- package/dist/elements/WhereBuilder/Condition/Relationship/index.js.map +1 -1
- package/dist/elements/WhereBuilder/Condition/index.css +1 -0
- package/dist/elements/WhereBuilder/index.css +2 -0
- package/dist/exports/client/index.d.ts +2 -4
- 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/rsc/index.d.ts +2 -0
- package/dist/exports/rsc/index.d.ts.map +1 -1
- package/dist/exports/rsc/index.js +2 -0
- package/dist/exports/rsc/index.js.map +1 -1
- package/dist/fields/Array/index.css +1 -0
- package/dist/fields/Array/index.d.ts.map +1 -1
- package/dist/fields/Array/index.js +2 -3
- package/dist/fields/Array/index.js.map +1 -1
- package/dist/fields/Blocks/index.css +1 -0
- package/dist/fields/Blocks/index.d.ts.map +1 -1
- package/dist/fields/Blocks/index.js +2 -3
- package/dist/fields/Blocks/index.js.map +1 -1
- package/dist/fields/Checkbox/Input.d.ts +2 -2
- package/dist/fields/Checkbox/Input.d.ts.map +1 -1
- package/dist/fields/Checkbox/Input.js +152 -134
- package/dist/fields/Checkbox/Input.js.map +1 -1
- package/dist/fields/Checkbox/index.css +163 -168
- package/dist/fields/FieldDescription/index.css +5 -0
- package/dist/fields/FieldLabel/index.css +8 -27
- package/dist/fields/FieldLabel/index.d.ts.map +1 -1
- package/dist/fields/FieldLabel/index.js +4 -5
- package/dist/fields/FieldLabel/index.js.map +1 -1
- package/dist/fields/Group/index.css +1 -0
- package/dist/fields/RadioGroup/Radio/index.css +1 -0
- package/dist/fields/RadioGroup/index.css +1 -1
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +8 -27
- package/dist/fields/Relationship/Input.js.map +1 -1
- package/dist/fields/Relationship/optionsReducer.d.ts.map +1 -1
- package/dist/fields/Relationship/optionsReducer.js +0 -2
- package/dist/fields/Relationship/optionsReducer.js.map +1 -1
- package/dist/fields/Relationship/types.d.ts +0 -24
- package/dist/fields/Relationship/types.d.ts.map +1 -1
- package/dist/fields/Relationship/types.js.map +1 -1
- package/dist/fields/Row/index.css +2 -0
- package/dist/fields/Slug/index.d.ts.map +1 -1
- package/dist/fields/Slug/index.js +2 -3
- package/dist/fields/Slug/index.js.map +1 -1
- package/dist/fields/Tabs/index.css +1 -0
- package/dist/fields/Textarea/index.css +1 -1
- package/dist/fields/Upload/Input.d.ts.map +1 -1
- package/dist/fields/Upload/Input.js +2 -3
- package/dist/fields/Upload/Input.js.map +1 -1
- package/dist/fields/shared/index.d.ts +1 -1
- package/dist/fields/shared/index.d.ts.map +1 -1
- package/dist/fields/shared/index.js.map +1 -1
- package/dist/forms/Form/context.d.ts +3 -1
- package/dist/forms/Form/context.d.ts.map +1 -1
- package/dist/forms/Form/context.js +3 -1
- package/dist/forms/Form/context.js.map +1 -1
- package/dist/forms/Form/index.d.ts.map +1 -1
- package/dist/forms/Form/index.js +15 -7
- package/dist/forms/Form/index.js.map +1 -1
- package/dist/forms/NullifyField/index.d.ts.map +1 -1
- package/dist/forms/NullifyField/index.js +2 -3
- package/dist/forms/NullifyField/index.js.map +1 -1
- package/dist/forms/RenderFields/index.css +1 -7
- package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.js +3 -2
- package/dist/forms/fieldSchemasToFormState/renderField.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts +12 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts.map +1 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js +42 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js.map +1 -0
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts +8 -6
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js +22 -9
- package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/types.d.ts +1 -0
- package/dist/forms/fieldSchemasToFormState/types.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/types.js.map +1 -1
- package/dist/hooks/useControllableState.js +3 -3
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/usePayloadAPI.d.ts.map +1 -1
- package/dist/hooks/usePayloadAPI.js +2 -3
- package/dist/hooks/usePayloadAPI.js.map +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +19 -5
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/index.js +32 -22
- package/dist/providers/DocumentInfo/index.js.map +1 -1
- package/dist/providers/Hierarchy/index.d.ts.map +1 -1
- package/dist/providers/Hierarchy/index.js +24 -53
- package/dist/providers/Hierarchy/index.js.map +1 -1
- package/dist/providers/Hierarchy/types.d.ts +0 -2
- package/dist/providers/Hierarchy/types.d.ts.map +1 -1
- package/dist/providers/Hierarchy/types.js.map +1 -1
- package/dist/providers/LivePreview/index.d.ts.map +1 -1
- package/dist/providers/LivePreview/index.js +13 -6
- package/dist/providers/LivePreview/index.js.map +1 -1
- package/dist/providers/Locale/index.d.ts +1 -5
- package/dist/providers/Locale/index.d.ts.map +1 -1
- package/dist/providers/Locale/index.js +61 -140
- package/dist/providers/Locale/index.js.map +1 -1
- package/dist/providers/Root/index.d.ts +4 -1
- package/dist/providers/Root/index.d.ts.map +1 -1
- package/dist/providers/Root/index.js +25 -16
- package/dist/providers/Root/index.js.map +1 -1
- package/dist/providers/Selection/index.d.ts.map +1 -1
- package/dist/providers/Selection/index.js +2 -3
- package/dist/providers/Selection/index.js.map +1 -1
- package/dist/providers/ServerFunctions/index.d.ts +5 -1
- package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
- package/dist/providers/ServerFunctions/index.js +15 -0
- package/dist/providers/ServerFunctions/index.js.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/index.d.ts.map +1 -1
- package/dist/providers/TableColumns/buildColumnState/index.js +0 -1
- package/dist/providers/TableColumns/buildColumnState/index.js.map +1 -1
- package/dist/providers/Theme/index.d.ts +17 -1
- package/dist/providers/Theme/index.d.ts.map +1 -1
- package/dist/providers/Theme/index.js +253 -81
- package/dist/providers/Theme/index.js.map +1 -1
- package/dist/providers/Theme/shared.d.ts +8 -0
- package/dist/providers/Theme/shared.d.ts.map +1 -1
- package/dist/providers/Theme/shared.js +6 -0
- package/dist/providers/Theme/shared.js.map +1 -1
- package/dist/styles.css +182 -23
- package/dist/templates/Default/Wrapper/index.css +3 -2
- package/dist/templates/Default/Wrapper/index.d.ts +0 -2
- package/dist/templates/Default/Wrapper/index.d.ts.map +1 -1
- package/dist/templates/Default/Wrapper/index.js +6 -12
- package/dist/templates/Default/Wrapper/index.js.map +1 -1
- package/dist/templates/Default/index.css +2 -3
- package/dist/templates/Default/index.d.ts.map +1 -1
- package/dist/templates/Default/index.js +15 -17
- package/dist/templates/Default/index.js.map +1 -1
- package/dist/utilities/buildFormState.d.ts.map +1 -1
- package/dist/utilities/buildFormState.js +6 -2
- package/dist/utilities/buildFormState.js.map +1 -1
- package/dist/utilities/formatAbsoluteURL.d.ts +1 -1
- package/dist/utilities/formatAbsoluteURL.d.ts.map +1 -1
- package/dist/utilities/formatAbsoluteURL.js +18 -8
- package/dist/utilities/formatAbsoluteURL.js.map +1 -1
- package/dist/utilities/getHasScheduledPublish.d.ts +2 -3
- package/dist/utilities/getHasScheduledPublish.d.ts.map +1 -1
- package/dist/utilities/getHasScheduledPublish.js +2 -5
- package/dist/utilities/getHasScheduledPublish.js.map +1 -1
- package/dist/utilities/handleAuthRedirect.d.ts.map +1 -1
- package/dist/utilities/handleAuthRedirect.js +4 -1
- package/dist/utilities/handleAuthRedirect.js.map +1 -1
- package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
- package/dist/utilities/handleServerFunctions.js +4 -2
- package/dist/utilities/handleServerFunctions.js.map +1 -1
- package/dist/utilities/initReq.d.ts.map +1 -1
- package/dist/utilities/initReq.js +40 -5
- package/dist/utilities/initReq.js.map +1 -1
- package/dist/utilities/isAbsoluteURL.d.ts +3 -0
- package/dist/utilities/isAbsoluteURL.d.ts.map +1 -0
- package/dist/utilities/isAbsoluteURL.js +15 -0
- package/dist/utilities/isAbsoluteURL.js.map +1 -0
- package/dist/utilities/isHttpURL.d.ts +3 -0
- package/dist/utilities/isHttpURL.d.ts.map +1 -0
- package/dist/utilities/isHttpURL.js +12 -0
- package/dist/utilities/isHttpURL.js.map +1 -0
- package/dist/utilities/isPathMatchingRoute.d.ts.map +1 -1
- package/dist/utilities/isPathMatchingRoute.js +7 -5
- package/dist/utilities/isPathMatchingRoute.js.map +1 -1
- package/dist/utilities/isPublicAdminRoute.d.ts.map +1 -1
- package/dist/utilities/isPublicAdminRoute.js +9 -6
- package/dist/utilities/isPublicAdminRoute.js.map +1 -1
- package/dist/utilities/schedulePublishHandler.d.ts +8 -1
- package/dist/utilities/schedulePublishHandler.d.ts.map +1 -1
- package/dist/utilities/schedulePublishHandler.js +72 -5
- package/dist/utilities/schedulePublishHandler.js.map +1 -1
- package/dist/utilities/serverFunctionRegistry.d.ts.map +1 -1
- package/dist/utilities/serverFunctionRegistry.js +2 -1
- package/dist/utilities/serverFunctionRegistry.js.map +1 -1
- package/dist/utilities/slugify.d.ts.map +1 -1
- package/dist/utilities/slugify.js +2 -0
- package/dist/utilities/slugify.js.map +1 -1
- package/dist/views/API/index.client.d.ts.map +1 -1
- package/dist/views/API/index.client.js +2 -3
- package/dist/views/API/index.client.js.map +1 -1
- package/dist/views/API/index.css +1 -0
- package/dist/views/Account/index.d.ts +1 -1
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +8 -5
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.css +2 -0
- package/dist/views/Dashboard/Default/ModularDashboard/index.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.js +1 -0
- package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +3 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +2 -0
- package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
- package/dist/views/Dashboard/index.d.ts.map +1 -1
- package/dist/views/Dashboard/index.js +2 -3
- package/dist/views/Dashboard/index.js.map +1 -1
- package/dist/views/Document/handleServerFunction.d.ts.map +1 -1
- package/dist/views/Document/handleServerFunction.js +2 -0
- package/dist/views/Document/handleServerFunction.js.map +1 -1
- package/dist/views/Document/index.d.ts +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +10 -6
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/Document/renderDocumentSlots.d.ts +1 -0
- package/dist/views/Document/renderDocumentSlots.d.ts.map +1 -1
- package/dist/views/Document/renderDocumentSlots.js +7 -4
- package/dist/views/Document/renderDocumentSlots.js.map +1 -1
- package/dist/views/Edit/Auth/APIKey.d.ts +1 -1
- package/dist/views/Edit/Auth/APIKey.d.ts.map +1 -1
- package/dist/views/Edit/Auth/APIKey.js +233 -59
- package/dist/views/Edit/Auth/APIKey.js.map +1 -1
- package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts +12 -0
- package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts.map +1 -0
- package/dist/views/Edit/Auth/APIKeyGenerationModal.js +117 -0
- package/dist/views/Edit/Auth/APIKeyGenerationModal.js.map +1 -0
- package/dist/views/Edit/Auth/index.css +91 -0
- package/dist/views/Edit/Auth/index.d.ts.map +1 -1
- package/dist/views/Edit/Auth/index.js +10 -28
- package/dist/views/Edit/Auth/index.js.map +1 -1
- package/dist/views/Edit/Auth/types.d.ts +3 -1
- package/dist/views/Edit/Auth/types.d.ts.map +1 -1
- package/dist/views/Edit/Auth/types.js.map +1 -1
- package/dist/views/Edit/index.css +44 -0
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +13 -0
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/Edit/useEditViewWidth.d.ts +8 -0
- package/dist/views/Edit/useEditViewWidth.d.ts.map +1 -0
- package/dist/views/Edit/useEditViewWidth.js +56 -0
- package/dist/views/Edit/useEditViewWidth.js.map +1 -0
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.css +14 -0
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +209 -161
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
- package/dist/views/ForgotPassword/index.d.ts.map +1 -1
- package/dist/views/ForgotPassword/index.js +2 -11
- package/dist/views/ForgotPassword/index.js.map +1 -1
- package/dist/views/HierarchyList/DocumentListSelection/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/DocumentListSelection/index.js +105 -100
- package/dist/views/HierarchyList/DocumentListSelection/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts +1 -6
- package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyListHeader/index.js +8 -10
- 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 +10 -11
- package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.css +1 -0
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.js +6 -3
- package/dist/views/HierarchyList/HierarchyTable/SlotTable.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/index.css +0 -51
- package/dist/views/HierarchyList/HierarchyTable/index.d.ts +1 -13
- package/dist/views/HierarchyList/HierarchyTable/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/index.js +38 -156
- package/dist/views/HierarchyList/HierarchyTable/index.js.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/types.d.ts +0 -6
- package/dist/views/HierarchyList/HierarchyTable/types.d.ts.map +1 -1
- package/dist/views/HierarchyList/HierarchyTable/types.js.map +1 -1
- package/dist/views/HierarchyList/index.css +1 -0
- package/dist/views/HierarchyList/index.d.ts.map +1 -1
- package/dist/views/HierarchyList/index.js +20 -103
- package/dist/views/HierarchyList/index.js.map +1 -1
- package/dist/views/List/ListHeader/index.css +1 -0
- package/dist/views/List/ListHeader/index.d.ts +0 -1
- package/dist/views/List/ListHeader/index.d.ts.map +1 -1
- package/dist/views/List/ListHeader/index.js +2 -6
- 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 +122 -138
- package/dist/views/List/ListSelection/index.js.map +1 -1
- package/dist/views/List/handleHierarchy.d.ts +1 -6
- package/dist/views/List/handleHierarchy.d.ts.map +1 -1
- package/dist/views/List/handleHierarchy.js +3 -34
- package/dist/views/List/handleHierarchy.js.map +1 -1
- package/dist/views/List/handleServerFunction.d.ts.map +1 -1
- package/dist/views/List/handleServerFunction.js +3 -1
- package/dist/views/List/handleServerFunction.js.map +1 -1
- package/dist/views/List/index.client.d.ts.map +1 -1
- package/dist/views/List/index.client.js +6 -129
- package/dist/views/List/index.client.js.map +1 -1
- package/dist/views/List/index.css +2 -0
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +18 -28
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/NotFound/client.d.ts +2 -0
- package/dist/views/NotFound/client.d.ts.map +1 -0
- package/dist/views/NotFound/client.js +4 -0
- package/dist/views/NotFound/client.js.map +1 -0
- package/dist/views/NotFound/page.d.ts.map +1 -1
- package/dist/views/NotFound/page.js +4 -3
- package/dist/views/NotFound/page.js.map +1 -1
- package/dist/views/Root/getRouteData.d.ts.map +1 -1
- package/dist/views/Root/getRouteData.js +2 -8
- package/dist/views/Root/getRouteData.js.map +1 -1
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +31 -22
- package/dist/views/Root/index.js.map +1 -1
- package/dist/views/Verify/index.d.ts +1 -1
- package/dist/views/Verify/index.d.ts.map +1 -1
- package/dist/views/Verify/index.js +4 -4
- package/dist/views/Verify/index.js.map +1 -1
- package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js +10 -13
- package/dist/views/Version/Default/SetStepNav.js.map +1 -1
- package/dist/views/Version/Default/index.css +2 -0
- package/dist/views/Version/Default/index.d.ts.map +1 -1
- package/dist/views/Version/Default/index.js +12 -13
- package/dist/views/Version/Default/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts +1 -0
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +56 -50
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +41 -27
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.css +8 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +10 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.css +1 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.css +1 -0
- package/dist/views/Version/RenderFieldsToDiff/index.css +2 -0
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +33 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +8 -2
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +17 -19
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
- package/dist/views/Version/Restore/index.d.ts.map +1 -1
- package/dist/views/Version/Restore/index.js +9 -6
- package/dist/views/Version/Restore/index.js.map +1 -1
- package/dist/views/Versions/VersionPillLabel/VersionPillLabel.d.ts.map +1 -1
- package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js +2 -3
- package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js.map +1 -1
- package/dist/views/Versions/VersionPillLabel/index.css +1 -0
- package/dist/views/Versions/index.css +1 -0
- package/dist/widgets/CollectionCards/index.client.js +1 -1
- package/dist/widgets/CollectionCards/index.client.js.map +1 -1
- package/dist/widgets/CollectionCards/index.css +43 -33
- package/dist/widgets/CollectionCards/index.js +1 -1
- package/dist/widgets/CollectionCards/index.js.map +1 -1
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.css +193 -0
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.d.ts +5 -0
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.js +225 -0
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.js.map +1 -0
- package/dist/widgets/RecentlyViewed/DocumentItem/index.css +181 -0
- package/dist/widgets/RecentlyViewed/DocumentItem/index.d.ts +11 -0
- package/dist/widgets/RecentlyViewed/DocumentItem/index.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/DocumentItem/index.js +104 -0
- package/dist/widgets/RecentlyViewed/DocumentItem/index.js.map +1 -0
- package/dist/widgets/RecentlyViewed/getDocumentThumbnail.d.ts +10 -0
- package/dist/widgets/RecentlyViewed/getDocumentThumbnail.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/getDocumentThumbnail.js +85 -0
- package/dist/widgets/RecentlyViewed/getDocumentThumbnail.js.map +1 -0
- package/dist/widgets/RecentlyViewed/getDocumentWidgetData.d.ts +7 -0
- package/dist/widgets/RecentlyViewed/getDocumentWidgetData.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/getDocumentWidgetData.js +206 -0
- package/dist/widgets/RecentlyViewed/getDocumentWidgetData.js.map +1 -0
- package/dist/widgets/RecentlyViewed/index.d.ts +3 -5
- package/dist/widgets/RecentlyViewed/index.d.ts.map +1 -1
- package/dist/widgets/RecentlyViewed/index.js +10 -140
- package/dist/widgets/RecentlyViewed/index.js.map +1 -1
- package/dist/widgets/RecentlyViewed/shared.d.ts +38 -0
- package/dist/widgets/RecentlyViewed/shared.d.ts.map +1 -0
- package/dist/widgets/RecentlyViewed/shared.js +70 -0
- package/dist/widgets/RecentlyViewed/shared.js.map +1 -0
- package/dist/widgets/UploadDropzone/index.client.d.ts +7 -0
- package/dist/widgets/UploadDropzone/index.client.d.ts.map +1 -0
- package/dist/widgets/UploadDropzone/index.client.js +134 -0
- package/dist/widgets/UploadDropzone/index.client.js.map +1 -0
- package/dist/widgets/UploadDropzone/index.css +50 -0
- package/dist/widgets/UploadDropzone/index.d.ts +8 -0
- package/dist/widgets/UploadDropzone/index.d.ts.map +1 -0
- package/dist/widgets/UploadDropzone/index.js +29 -0
- package/dist/widgets/UploadDropzone/index.js.map +1 -0
- package/dist/widgets/Welcome/index.css +13 -0
- package/dist/widgets/Welcome/index.d.ts +5 -0
- package/dist/widgets/Welcome/index.d.ts.map +1 -0
- package/dist/widgets/Welcome/index.js +26 -0
- package/dist/widgets/Welcome/index.js.map +1 -0
- package/dist/widgets/WidgetIcon/assets/images.svg +3 -0
- package/dist/widgets/WidgetIcon/assets/pin-solid.svg +3 -0
- package/dist/widgets/WidgetIcon/assets/pin.svg +3 -0
- package/dist/widgets/WidgetIcon/assets/table.svg +3 -0
- package/dist/widgets/WidgetIcon/index.css +23 -0
- package/dist/widgets/WidgetIcon/index.d.ts +6 -0
- package/dist/widgets/WidgetIcon/index.d.ts.map +1 -0
- package/dist/widgets/WidgetIcon/index.js +10 -0
- package/dist/widgets/WidgetIcon/index.js.map +1 -0
- package/package.json +11 -5
- package/dist/elements/ClipboardAction/clipboardUtilities.spec.js +0 -120
- package/dist/elements/ClipboardAction/clipboardUtilities.spec.js.map +0 -1
- package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js +0 -144
- package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js.map +0 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js +0 -885
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js.map +0 -1
- package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js +0 -87
- package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js.map +0 -1
- package/dist/elements/CommandPalette/buildActions.spec.js +0 -158
- package/dist/elements/CommandPalette/buildActions.spec.js.map +0 -1
- package/dist/elements/CommandPalette/highlightLabel.spec.js +0 -78
- package/dist/elements/CommandPalette/highlightLabel.spec.js.map +0 -1
- package/dist/elements/FieldSelect/reduceFieldOptions.spec.js +0 -143
- package/dist/elements/FieldSelect/reduceFieldOptions.spec.js.map +0 -1
- package/dist/elements/Hierarchy/CreateNewButton/index.css +0 -9
- package/dist/elements/Hierarchy/CreateNewButton/index.d.ts +0 -9
- package/dist/elements/Hierarchy/CreateNewButton/index.d.ts.map +0 -1
- package/dist/elements/Hierarchy/CreateNewButton/index.js +0 -111
- package/dist/elements/Hierarchy/CreateNewButton/index.js.map +0 -1
- package/dist/elements/Hierarchy/Modal/Footer/index.css +0 -45
- package/dist/elements/Hierarchy/Modal/Footer/index.d.ts +0 -28
- package/dist/elements/Hierarchy/Modal/Footer/index.d.ts.map +0 -1
- package/dist/elements/Hierarchy/Modal/Footer/index.js +0 -166
- package/dist/elements/Hierarchy/Modal/Footer/index.js.map +0 -1
- package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts +0 -22
- package/dist/elements/Hierarchy/getFolderHierarchySlug.d.ts.map +0 -1
- package/dist/elements/Hierarchy/getFolderHierarchySlug.js +0 -17
- package/dist/elements/Hierarchy/getFolderHierarchySlug.js.map +0 -1
- package/dist/elements/Hierarchy/move/moveDocuments.d.ts +0 -34
- package/dist/elements/Hierarchy/move/moveDocuments.d.ts.map +0 -1
- package/dist/elements/Hierarchy/move/moveDocuments.js +0 -94
- package/dist/elements/Hierarchy/move/moveDocuments.js.map +0 -1
- package/dist/elements/SegmentedControl/index.css +0 -58
- package/dist/elements/SegmentedControl/index.d.ts +0 -19
- package/dist/elements/SegmentedControl/index.d.ts.map +0 -1
- package/dist/elements/SegmentedControl/index.js +0 -104
- package/dist/elements/SegmentedControl/index.js.map +0 -1
- package/dist/elements/StepNav/DropTarget/index.css +0 -20
- package/dist/elements/StepNav/DropTarget/index.d.ts +0 -16
- package/dist/elements/StepNav/DropTarget/index.d.ts.map +0 -1
- package/dist/elements/StepNav/DropTarget/index.js +0 -71
- package/dist/elements/StepNav/DropTarget/index.js.map +0 -1
- package/dist/elements/Toasts/fieldErrors.spec.js +0 -46
- package/dist/elements/Toasts/fieldErrors.spec.js.map +0 -1
- package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts +0 -18
- package/dist/elements/UserMenu/HoverSubmenuGroup.d.ts.map +0 -1
- package/dist/elements/UserMenu/HoverSubmenuGroup.js +0 -38
- package/dist/elements/UserMenu/HoverSubmenuGroup.js.map +0 -1
- package/dist/elements/UserMenu/useHoverSubmenu.d.ts +0 -21
- package/dist/elements/UserMenu/useHoverSubmenu.d.ts.map +0 -1
- package/dist/elements/UserMenu/useHoverSubmenu.js +0 -260
- package/dist/elements/UserMenu/useHoverSubmenu.js.map +0 -1
- package/dist/elements/ViewModeToggle/index.d.ts +0 -8
- package/dist/elements/ViewModeToggle/index.d.ts.map +0 -1
- package/dist/elements/ViewModeToggle/index.js +0 -29
- package/dist/elements/ViewModeToggle/index.js.map +0 -1
- package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js +0 -152
- package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js.map +0 -1
- package/dist/elements/WhereBuilder/conditionValue.spec.js +0 -65
- package/dist/elements/WhereBuilder/conditionValue.spec.js.map +0 -1
- package/dist/fields/Upload/Input.spec.js +0 -241
- package/dist/fields/Upload/Input.spec.js.map +0 -1
- package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts +0 -2
- package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts.map +0 -1
- package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js +0 -67
- package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js.map +0 -1
- package/dist/icons/CollapseLayers/index.d.ts +0 -7
- package/dist/icons/CollapseLayers/index.d.ts.map +0 -1
- package/dist/icons/CollapseLayers/index.js +0 -23
- package/dist/icons/CollapseLayers/index.js.map +0 -1
- package/dist/icons/Table/index.css +0 -5
- package/dist/icons/Table/index.d.ts +0 -7
- package/dist/icons/Table/index.d.ts.map +0 -1
- package/dist/icons/Table/index.js +0 -25
- package/dist/icons/Table/index.js.map +0 -1
- package/dist/layouts/Root/index.spec.js +0 -20
- package/dist/layouts/Root/index.spec.js.map +0 -1
- package/dist/providers/Auth/authSessionRequests.spec.js +0 -121
- package/dist/providers/Auth/authSessionRequests.spec.js.map +0 -1
- package/dist/providers/Auth/sessionActivity.spec.js +0 -44
- package/dist/providers/Auth/sessionActivity.spec.js.map +0 -1
- package/dist/providers/Auth/tabSessionSync/index.spec.js +0 -463
- package/dist/providers/Auth/tabSessionSync/index.spec.js.map +0 -1
- package/dist/providers/Auth/useAuthSessionTimers.spec.js +0 -311
- package/dist/providers/Auth/useAuthSessionTimers.spec.js.map +0 -1
- package/dist/providers/HierarchyDnd/index.css +0 -51
- package/dist/providers/HierarchyDnd/index.d.ts +0 -21
- package/dist/providers/HierarchyDnd/index.d.ts.map +0 -1
- package/dist/providers/HierarchyDnd/index.js +0 -163
- package/dist/providers/HierarchyDnd/index.js.map +0 -1
- package/dist/providers/HierarchyDnd/types.d.ts +0 -56
- package/dist/providers/HierarchyDnd/types.d.ts.map +0 -1
- package/dist/providers/HierarchyDnd/types.js +0 -21
- package/dist/providers/HierarchyDnd/types.js.map +0 -1
- package/dist/providers/RouteTransition/ProgressBar/index.spec.js +0 -44
- package/dist/providers/RouteTransition/ProgressBar/index.spec.js.map +0 -1
- package/dist/providers/TableColumns/buildColumnState/index.spec.js +0 -40
- package/dist/providers/TableColumns/buildColumnState/index.spec.js.map +0 -1
- package/dist/utilities/appendCacheTag.spec.js +0 -34
- package/dist/utilities/appendCacheTag.spec.js.map +0 -1
- package/dist/utilities/formatMetadata.spec.js +0 -83
- package/dist/utilities/formatMetadata.spec.js.map +0 -1
- package/dist/utilities/fuzzyMatch.spec.js +0 -38
- package/dist/utilities/fuzzyMatch.spec.js.map +0 -1
- package/dist/utilities/isCustomAdminView.spec.js +0 -90
- package/dist/utilities/isCustomAdminView.spec.js.map +0 -1
- package/dist/utilities/isPathMatchingRoute.spec.js +0 -178
- package/dist/utilities/isPathMatchingRoute.spec.js.map +0 -1
- package/dist/utilities/normalizeRelationshipValue.spec.js +0 -373
- package/dist/utilities/normalizeRelationshipValue.spec.js.map +0 -1
- package/dist/utilities/recentlyViewed.spec.js +0 -92
- package/dist/utilities/recentlyViewed.spec.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.css +0 -216
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts +0 -20
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js +0 -182
- package/dist/views/HierarchyList/HierarchyCards/DocumentCard/index.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.css +0 -38
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts +0 -15
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js +0 -85
- package/dist/views/HierarchyList/HierarchyCards/DragPreviewItem/index.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.css +0 -98
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts +0 -27
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js +0 -84
- package/dist/views/HierarchyList/HierarchyCards/FolderCard/index.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts +0 -19
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js +0 -100
- package/dist/views/HierarchyList/HierarchyCards/HierarchyCard/index.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts +0 -53
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js +0 -145
- package/dist/views/HierarchyList/HierarchyCards/PlaneItem/index.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts +0 -8
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js +0 -21
- package/dist/views/HierarchyList/HierarchyCards/getThumbnailSrc.js.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/index.css +0 -115
- package/dist/views/HierarchyList/HierarchyCards/index.d.ts +0 -80
- package/dist/views/HierarchyList/HierarchyCards/index.d.ts.map +0 -1
- package/dist/views/HierarchyList/HierarchyCards/index.js +0 -457
- package/dist/views/HierarchyList/HierarchyCards/index.js.map +0 -1
- package/dist/views/Root/getCustomCollectionViewByRoute.spec.js +0 -168
- package/dist/views/Root/getCustomCollectionViewByRoute.spec.js.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +0 -861
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +0 -47
- package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +0 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +0 -135
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +0 -1
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js +0 -100
- package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js.map +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.css';
|
|
3
|
-
export type HierarchyCreateNewButtonProps = {
|
|
4
|
-
collectionSlug: string;
|
|
5
|
-
/** Document the new item is created under. `null` creates at the root level. */
|
|
6
|
-
parentId: null | number | string;
|
|
7
|
-
};
|
|
8
|
-
export declare const HierarchyCreateNewButton: React.FC<HierarchyCreateNewButtonProps>;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/CreateNewButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAA;AASpD,OAAO,aAAa,CAAA;AAIpB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,cAAc,EAAE,MAAM,CAAA;IACtB,gFAAgF;IAChF,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAiD5E,CAAA"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
import React, { Fragment, useCallback } from 'react';
|
|
6
|
-
import { PlusIcon } from '../../../icons/Plus/index.js';
|
|
7
|
-
import { useAuth } from '../../../providers/Auth/index.js';
|
|
8
|
-
import { useConfig } from '../../../providers/Config/index.js';
|
|
9
|
-
import { useHierarchy } from '../../../providers/Hierarchy/index.js';
|
|
10
|
-
import { useTranslation } from '../../../providers/Translation/index.js';
|
|
11
|
-
import { Button } from '../../Button/index.js';
|
|
12
|
-
import { useDocumentDrawer } from '../../DocumentDrawer/index.js';
|
|
13
|
-
import './index.css';
|
|
14
|
-
const baseClass = 'hierarchy-create-new';
|
|
15
|
-
export const HierarchyCreateNewButton = t0 => {
|
|
16
|
-
const $ = _c(17);
|
|
17
|
-
const {
|
|
18
|
-
collectionSlug,
|
|
19
|
-
parentId
|
|
20
|
-
} = t0;
|
|
21
|
-
const {
|
|
22
|
-
t
|
|
23
|
-
} = useTranslation();
|
|
24
|
-
const {
|
|
25
|
-
permissions
|
|
26
|
-
} = useAuth();
|
|
27
|
-
const {
|
|
28
|
-
getEntityConfig
|
|
29
|
-
} = useConfig();
|
|
30
|
-
const {
|
|
31
|
-
refreshTree
|
|
32
|
-
} = useHierarchy();
|
|
33
|
-
let t1;
|
|
34
|
-
if ($[0] !== collectionSlug || $[1] !== getEntityConfig) {
|
|
35
|
-
t1 = getEntityConfig({
|
|
36
|
-
collectionSlug
|
|
37
|
-
});
|
|
38
|
-
$[0] = collectionSlug;
|
|
39
|
-
$[1] = getEntityConfig;
|
|
40
|
-
$[2] = t1;
|
|
41
|
-
} else {
|
|
42
|
-
t1 = $[2];
|
|
43
|
-
}
|
|
44
|
-
const collectionConfig = t1;
|
|
45
|
-
const parentFieldName = collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === "object" ? collectionConfig.hierarchy.parentFieldName : undefined;
|
|
46
|
-
const t2 = `${baseClass}-${collectionSlug}`;
|
|
47
|
-
let t3;
|
|
48
|
-
if ($[3] !== collectionSlug || $[4] !== t2) {
|
|
49
|
-
t3 = {
|
|
50
|
-
collectionSlug,
|
|
51
|
-
drawerSlug: t2
|
|
52
|
-
};
|
|
53
|
-
$[3] = collectionSlug;
|
|
54
|
-
$[4] = t2;
|
|
55
|
-
$[5] = t3;
|
|
56
|
-
} else {
|
|
57
|
-
t3 = $[5];
|
|
58
|
-
}
|
|
59
|
-
const [DocumentDrawer,, t4] = useDocumentDrawer(t3);
|
|
60
|
-
const {
|
|
61
|
-
closeDrawer,
|
|
62
|
-
openDrawer
|
|
63
|
-
} = t4;
|
|
64
|
-
let t5;
|
|
65
|
-
if ($[6] !== closeDrawer || $[7] !== collectionSlug || $[8] !== refreshTree) {
|
|
66
|
-
t5 = () => {
|
|
67
|
-
refreshTree(collectionSlug);
|
|
68
|
-
closeDrawer();
|
|
69
|
-
};
|
|
70
|
-
$[6] = closeDrawer;
|
|
71
|
-
$[7] = collectionSlug;
|
|
72
|
-
$[8] = refreshTree;
|
|
73
|
-
$[9] = t5;
|
|
74
|
-
} else {
|
|
75
|
-
t5 = $[9];
|
|
76
|
-
}
|
|
77
|
-
const handleSave = t5;
|
|
78
|
-
const canCreate = Boolean(permissions?.collections?.[collectionSlug]?.create);
|
|
79
|
-
if (!canCreate || !parentFieldName) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
let t6;
|
|
83
|
-
if ($[10] !== DocumentDrawer || $[11] !== handleSave || $[12] !== openDrawer || $[13] !== parentFieldName || $[14] !== parentId || $[15] !== t) {
|
|
84
|
-
t6 = _jsxs(Fragment, {
|
|
85
|
-
children: [_jsx(Button, {
|
|
86
|
-
"aria-label": t("general:createNew"),
|
|
87
|
-
buttonStyle: "ghost",
|
|
88
|
-
className: baseClass,
|
|
89
|
-
icon: _jsx(PlusIcon, {}),
|
|
90
|
-
onClick: openDrawer,
|
|
91
|
-
round: true
|
|
92
|
-
}), _jsx(DocumentDrawer, {
|
|
93
|
-
initialData: parentId !== null ? {
|
|
94
|
-
[parentFieldName]: parentId
|
|
95
|
-
} : undefined,
|
|
96
|
-
onSave: handleSave
|
|
97
|
-
}, String(parentId))]
|
|
98
|
-
});
|
|
99
|
-
$[10] = DocumentDrawer;
|
|
100
|
-
$[11] = handleSave;
|
|
101
|
-
$[12] = openDrawer;
|
|
102
|
-
$[13] = parentFieldName;
|
|
103
|
-
$[14] = parentId;
|
|
104
|
-
$[15] = t;
|
|
105
|
-
$[16] = t6;
|
|
106
|
-
} else {
|
|
107
|
-
t6 = $[16];
|
|
108
|
-
}
|
|
109
|
-
return t6;
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","Fragment","useCallback","PlusIcon","useAuth","useConfig","useHierarchy","useTranslation","Button","useDocumentDrawer","baseClass","HierarchyCreateNewButton","t0","$","collectionSlug","parentId","t","permissions","getEntityConfig","refreshTree","t1","collectionConfig","parentFieldName","hierarchy","undefined","t2","t3","drawerSlug","DocumentDrawer","t4","closeDrawer","openDrawer","t5","handleSave","canCreate","Boolean","collections","create","t6","_jsxs","children","_jsx","buttonStyle","className","icon","onClick","round","initialData","onSave","String"],"sources":["../../../../src/elements/Hierarchy/CreateNewButton/index.tsx"],"sourcesContent":["'use client'\n\nimport React, { Fragment, useCallback } from 'react'\n\nimport { PlusIcon } from '../../../icons/Plus/index.js'\nimport { useAuth } from '../../../providers/Auth/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useHierarchy } from '../../../providers/Hierarchy/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { Button } from '../../Button/index.js'\nimport { useDocumentDrawer } from '../../DocumentDrawer/index.js'\nimport './index.css'\n\nconst baseClass = 'hierarchy-create-new'\n\nexport type HierarchyCreateNewButtonProps = {\n collectionSlug: string\n /** Document the new item is created under. `null` creates at the root level. */\n parentId: null | number | string\n}\n\nexport const HierarchyCreateNewButton: React.FC<HierarchyCreateNewButtonProps> = ({\n collectionSlug,\n parentId,\n}) => {\n const { t } = useTranslation()\n const { permissions } = useAuth()\n const { getEntityConfig } = useConfig()\n const { refreshTree } = useHierarchy()\n\n const collectionConfig = getEntityConfig({ collectionSlug })\n const parentFieldName =\n collectionConfig?.hierarchy && typeof collectionConfig.hierarchy === 'object'\n ? collectionConfig.hierarchy.parentFieldName\n : undefined\n\n const [DocumentDrawer, , { closeDrawer, openDrawer }] = useDocumentDrawer({\n collectionSlug,\n drawerSlug: `${baseClass}-${collectionSlug}`,\n })\n\n const handleSave = useCallback(() => {\n refreshTree(collectionSlug)\n closeDrawer()\n }, [closeDrawer, collectionSlug, refreshTree])\n\n const canCreate = Boolean(permissions?.collections?.[collectionSlug]?.create)\n\n if (!canCreate || !parentFieldName) {\n return null\n }\n\n return (\n <Fragment>\n <Button\n aria-label={t('general:createNew')}\n buttonStyle=\"ghost\"\n className={baseClass}\n icon={<PlusIcon />}\n onClick={openDrawer}\n round\n />\n <DocumentDrawer\n // Remount the form when the target parent changes so initialData is picked back up\n initialData={parentId !== null ? { [parentFieldName]: parentId } : undefined}\n key={String(parentId)}\n onSave={handleSave}\n />\n </Fragment>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,OAAOC,KAAA,IAASC,QAAQ,EAAEC,WAAW,QAAQ;AAE7C,SAASC,QAAQ,QAAQ;AACzB,SAASC,OAAO,QAAQ;AACxB,SAASC,SAAS,QAAQ;AAC1B,SAASC,YAAY,QAAQ;AAC7B,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,QAAQ;AACvB,SAASC,iBAAiB,QAAQ;AAClC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAQlB,OAAO,MAAMC,wBAAA,GAAoEC,EAAA;EAAA,MAAAC,CAAA,GAAAd,EAAA;EAAC;IAAAe,cAAA;IAAAC;EAAA,IAAAH,EAGjF;EACC;IAAAI;EAAA,IAAcT,cAAA;EACd;IAAAU;EAAA,IAAwBb,OAAA;EACxB;IAAAc;EAAA,IAA4Bb,SAAA;EAC5B;IAAAc;EAAA,IAAwBb,YAAA;EAAA,IAAAc,EAAA;EAAA,IAAAP,CAAA,QAAAC,cAAA,IAAAD,CAAA,QAAAK,eAAA;IAECE,EAAA,GAAAF,eAAA;MAAAJ;IAAA,CAAiC;IAAAD,CA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AA,IAAAgB,EAAA;EAAA,IAAAzB,CAAA,SAAAe,cAAA,IAAAf,CAAA,SAAAoB,UAAA,IAAApB,CAAA,SAAAkB,UAAA,IAAAlB,CAAA,SAAAS,eAAA,IAAAT,CAAA,SAAAE,QAAA,IAAAF,CAAA,SAAAG,CAAA;IAKjBsB,EAAA,GAAAC,KAAA,CAAAtC,QAAA;MAAAuC,QAAA,GACEC,IAAA,CAAAjC,MAAA;QAAA,cACcQ,CAAA,CAAE;QAAA0B,WAAA,EACF;QAAAC,SAAA,EAAAjC,SAAA;QAAAkC,IAAA,EAENH,IAAA,CAAAtC,QAAA,IAAC;QAAA0C,OAAA,EACEd,UAAA;QAAAe,KAAA;MAAA,C,GAGXL,IAAA,CAACb,cAAA;QAAAmB,WAAA,EAEchC,QAAA,SAAa;UAAA,CAAUO,eAAA,GAAkBP;QAAA,IAAAS,SAAa;QAAAwB,MAAA,EAE3Df;MAAA,GADHgB,MAAA,CAAOlC,QAAA;IAAA,C;;;;;;;;;;;SAZhBuB,E;CAiBJ","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
@layer payload-default {
|
|
2
|
-
.hierarchy-modal-footer__lead {
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: var(--spacer-1);
|
|
6
|
-
min-width: 0;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.hierarchy-modal-footer__trail {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
gap: var(--spacer-2);
|
|
14
|
-
flex-shrink: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.hierarchy-modal-footer__placeholder {
|
|
18
|
-
color: var(--color-text-secondary);
|
|
19
|
-
white-space: nowrap;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.hierarchy-modal-footer__arrow {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-shrink: 0;
|
|
25
|
-
color: var(--color-text-secondary);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.hierarchy-modal-footer__chip {
|
|
29
|
-
max-width: 280px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Lets the breadcrumb ellipsize instead of forcing the chip past its max-width */
|
|
33
|
-
.hierarchy-modal-footer__chip .chip__label {
|
|
34
|
-
min-width: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.hierarchy-modal-footer__chip-separator,
|
|
38
|
-
.hierarchy-modal-footer__chip-ellipsis {
|
|
39
|
-
color: var(--color-text-secondary);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.hierarchy-modal-footer__chip-separator {
|
|
43
|
-
padding-inline: calc(var(--spacer-1) / 2);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PathSegment } from '../../ColumnBrowser/types.js';
|
|
3
|
-
import './index.css';
|
|
4
|
-
export type HierarchyModalFooterProps = {
|
|
5
|
-
/** Label for the primary action, e.g. "Move" or "Confirm" */
|
|
6
|
-
readonly confirmLabel: string;
|
|
7
|
-
/** Path of the item the user has picked in this session, root first */
|
|
8
|
-
readonly destinationPath?: PathSegment[];
|
|
9
|
-
/** Leading icon for the breadcrumb chips - falls back to a folder */
|
|
10
|
-
readonly Icon?: React.ReactNode;
|
|
11
|
-
readonly isConfirmDisabled: boolean;
|
|
12
|
-
readonly isMultiSelect: boolean;
|
|
13
|
-
readonly onClear: () => void;
|
|
14
|
-
readonly onConfirm: () => void;
|
|
15
|
-
readonly onMoveToRoot?: () => void;
|
|
16
|
-
/** Called with a chip's path to expand the browser down to that item and focus it */
|
|
17
|
-
readonly onRevealPath: (path: PathSegment[]) => void;
|
|
18
|
-
/** Shown when nothing has been picked yet, e.g. "Select Folder" */
|
|
19
|
-
readonly placeholderLabel: string;
|
|
20
|
-
/** Path the item lived in before the modal was opened, root first */
|
|
21
|
-
readonly previousPath?: PathSegment[];
|
|
22
|
-
readonly selectionCount: number;
|
|
23
|
-
/** Shown in multi-select mode once something is checked, e.g. "3 Tags selected" */
|
|
24
|
-
readonly selectionCountLabel: string;
|
|
25
|
-
readonly showMoveToRoot?: boolean;
|
|
26
|
-
};
|
|
27
|
-
export declare const HierarchyModalFooter: React.FC<HierarchyModalFooterProps>;
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/Hierarchy/Modal/Footer/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAQ/D,OAAO,aAAa,CAAA;AAOpB,MAAM,MAAM,yBAAyB,GAAG;IACtC,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAA;IACxC,qEAAqE;IACrE,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAA;IACnC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,qFAAqF;IACrF,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACpD,mEAAmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,qEAAqE;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAClC,CAAA;AAsCD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqFpE,CAAA"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
import React, { useCallback } from 'react';
|
|
6
|
-
import { FolderIcon } from '../../../../icons/Folder/index.js';
|
|
7
|
-
import { ReplaceIcon } from '../../../../icons/Replace/index.js';
|
|
8
|
-
import { useTranslation } from '../../../../providers/Translation/index.js';
|
|
9
|
-
import { Button } from '../../../Button/index.js';
|
|
10
|
-
import { Chip } from '../../../Chip/index.js';
|
|
11
|
-
import { DialogFooter } from '../../../Dialog/index.js';
|
|
12
|
-
import './index.css';
|
|
13
|
-
const baseClass = 'hierarchy-modal-footer';
|
|
14
|
-
// TODO: replace with a translation key once the hierarchy strings are finalized
|
|
15
|
-
const moveToLabel = 'Move to';
|
|
16
|
-
/** Deeper paths collapse to a leading ellipsis so the chip stays scannable, e.g. "… / Parent / Child" */
|
|
17
|
-
const MAX_VISIBLE_SEGMENTS = 2;
|
|
18
|
-
const Separator = () => /*#__PURE__*/_jsx("span", {
|
|
19
|
-
className: `${baseClass}__chip-separator`,
|
|
20
|
-
children: "/"
|
|
21
|
-
});
|
|
22
|
-
const HierarchyPathChip = ({
|
|
23
|
-
Icon,
|
|
24
|
-
onClick,
|
|
25
|
-
path
|
|
26
|
-
}) => {
|
|
27
|
-
const isTruncated = path.length > MAX_VISIBLE_SEGMENTS;
|
|
28
|
-
const visibleSegments = isTruncated ? path.slice(-MAX_VISIBLE_SEGMENTS) : path;
|
|
29
|
-
return /*#__PURE__*/_jsxs(Chip, {
|
|
30
|
-
"aria-label": path.map(segment => segment.title).join(' / '),
|
|
31
|
-
className: `${baseClass}__chip`,
|
|
32
|
-
icon: Icon ?? /*#__PURE__*/_jsx(FolderIcon, {}),
|
|
33
|
-
onClick: onClick,
|
|
34
|
-
children: [isTruncated ? /*#__PURE__*/_jsxs(React.Fragment, {
|
|
35
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
36
|
-
className: `${baseClass}__chip-ellipsis`,
|
|
37
|
-
children: "…"
|
|
38
|
-
}), /*#__PURE__*/_jsx(Separator, {})]
|
|
39
|
-
}) : null, visibleSegments.map((segment, index) => /*#__PURE__*/_jsxs(React.Fragment, {
|
|
40
|
-
children: [index > 0 && /*#__PURE__*/_jsx(Separator, {}), segment.title]
|
|
41
|
-
}, segment.id))]
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
export const HierarchyModalFooter = t0 => {
|
|
45
|
-
const $ = _c(23);
|
|
46
|
-
const {
|
|
47
|
-
confirmLabel,
|
|
48
|
-
destinationPath,
|
|
49
|
-
Icon,
|
|
50
|
-
isConfirmDisabled,
|
|
51
|
-
isMultiSelect,
|
|
52
|
-
onClear,
|
|
53
|
-
onConfirm,
|
|
54
|
-
onMoveToRoot,
|
|
55
|
-
onRevealPath,
|
|
56
|
-
placeholderLabel,
|
|
57
|
-
previousPath,
|
|
58
|
-
selectionCount,
|
|
59
|
-
selectionCountLabel,
|
|
60
|
-
showMoveToRoot
|
|
61
|
-
} = t0;
|
|
62
|
-
const {
|
|
63
|
-
t
|
|
64
|
-
} = useTranslation();
|
|
65
|
-
let t1;
|
|
66
|
-
if ($[0] !== onRevealPath || $[1] !== previousPath) {
|
|
67
|
-
t1 = () => onRevealPath(previousPath ?? []);
|
|
68
|
-
$[0] = onRevealPath;
|
|
69
|
-
$[1] = previousPath;
|
|
70
|
-
$[2] = t1;
|
|
71
|
-
} else {
|
|
72
|
-
t1 = $[2];
|
|
73
|
-
}
|
|
74
|
-
const revealPrevious = t1;
|
|
75
|
-
let t2;
|
|
76
|
-
if ($[3] !== destinationPath || $[4] !== onRevealPath) {
|
|
77
|
-
t2 = () => onRevealPath(destinationPath ?? []);
|
|
78
|
-
$[3] = destinationPath;
|
|
79
|
-
$[4] = onRevealPath;
|
|
80
|
-
$[5] = t2;
|
|
81
|
-
} else {
|
|
82
|
-
t2 = $[5];
|
|
83
|
-
}
|
|
84
|
-
const revealDestination = t2;
|
|
85
|
-
let t3;
|
|
86
|
-
if ($[6] !== Icon || $[7] !== confirmLabel || $[8] !== destinationPath || $[9] !== isConfirmDisabled || $[10] !== isMultiSelect || $[11] !== onClear || $[12] !== onConfirm || $[13] !== onMoveToRoot || $[14] !== placeholderLabel || $[15] !== previousPath || $[16] !== revealDestination || $[17] !== revealPrevious || $[18] !== selectionCount || $[19] !== selectionCountLabel || $[20] !== showMoveToRoot || $[21] !== t) {
|
|
87
|
-
const placeholder = _jsx("span", {
|
|
88
|
-
className: `${baseClass}__placeholder`,
|
|
89
|
-
children: placeholderLabel
|
|
90
|
-
});
|
|
91
|
-
t3 = _jsxs(DialogFooter, {
|
|
92
|
-
children: [_jsx("div", {
|
|
93
|
-
className: `${baseClass}__lead`,
|
|
94
|
-
children: isMultiSelect ? selectionCount > 0 ? _jsxs(React.Fragment, {
|
|
95
|
-
children: [_jsx("span", {
|
|
96
|
-
className: `${baseClass}__placeholder`,
|
|
97
|
-
children: selectionCountLabel
|
|
98
|
-
}), _jsx(Button, {
|
|
99
|
-
buttonStyle: "link",
|
|
100
|
-
className: `${baseClass}__clear`,
|
|
101
|
-
margin: false,
|
|
102
|
-
onClick: onClear,
|
|
103
|
-
size: "medium",
|
|
104
|
-
children: t("general:clear")
|
|
105
|
-
})]
|
|
106
|
-
}) : placeholder : _jsxs(React.Fragment, {
|
|
107
|
-
children: [previousPath?.length ? _jsxs(React.Fragment, {
|
|
108
|
-
children: [_jsx(HierarchyPathChip, {
|
|
109
|
-
Icon,
|
|
110
|
-
onClick: revealPrevious,
|
|
111
|
-
path: previousPath
|
|
112
|
-
}), _jsx("span", {
|
|
113
|
-
className: `${baseClass}__arrow`,
|
|
114
|
-
children: _jsx(ReplaceIcon, {})
|
|
115
|
-
})]
|
|
116
|
-
}) : null, destinationPath?.length ? _jsxs(React.Fragment, {
|
|
117
|
-
children: [!previousPath?.length && _jsx("span", {
|
|
118
|
-
className: `${baseClass}__placeholder`,
|
|
119
|
-
children: moveToLabel
|
|
120
|
-
}), _jsx(HierarchyPathChip, {
|
|
121
|
-
Icon,
|
|
122
|
-
onClick: revealDestination,
|
|
123
|
-
path: destinationPath
|
|
124
|
-
})]
|
|
125
|
-
}) : placeholder]
|
|
126
|
-
})
|
|
127
|
-
}), _jsxs("div", {
|
|
128
|
-
className: `${baseClass}__trail`,
|
|
129
|
-
children: [showMoveToRoot && onMoveToRoot ? _jsx(Button, {
|
|
130
|
-
buttonStyle: "secondary",
|
|
131
|
-
margin: false,
|
|
132
|
-
onClick: onMoveToRoot,
|
|
133
|
-
size: "medium",
|
|
134
|
-
children: t("hierarchy:moveToRoot")
|
|
135
|
-
}) : null, _jsx(Button, {
|
|
136
|
-
disabled: isConfirmDisabled,
|
|
137
|
-
margin: false,
|
|
138
|
-
onClick: onConfirm,
|
|
139
|
-
size: "medium",
|
|
140
|
-
children: confirmLabel
|
|
141
|
-
})]
|
|
142
|
-
})]
|
|
143
|
-
});
|
|
144
|
-
$[6] = Icon;
|
|
145
|
-
$[7] = confirmLabel;
|
|
146
|
-
$[8] = destinationPath;
|
|
147
|
-
$[9] = isConfirmDisabled;
|
|
148
|
-
$[10] = isMultiSelect;
|
|
149
|
-
$[11] = onClear;
|
|
150
|
-
$[12] = onConfirm;
|
|
151
|
-
$[13] = onMoveToRoot;
|
|
152
|
-
$[14] = placeholderLabel;
|
|
153
|
-
$[15] = previousPath;
|
|
154
|
-
$[16] = revealDestination;
|
|
155
|
-
$[17] = revealPrevious;
|
|
156
|
-
$[18] = selectionCount;
|
|
157
|
-
$[19] = selectionCountLabel;
|
|
158
|
-
$[20] = showMoveToRoot;
|
|
159
|
-
$[21] = t;
|
|
160
|
-
$[22] = t3;
|
|
161
|
-
} else {
|
|
162
|
-
t3 = $[22];
|
|
163
|
-
}
|
|
164
|
-
return t3;
|
|
165
|
-
};
|
|
166
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","useCallback","FolderIcon","ReplaceIcon","useTranslation","Button","Chip","DialogFooter","baseClass","moveToLabel","MAX_VISIBLE_SEGMENTS","Separator","_jsx","className","HierarchyPathChip","Icon","onClick","path","isTruncated","length","visibleSegments","slice","_jsxs","map","segment","title","join","icon","Fragment","index","id","HierarchyModalFooter","t0","$","confirmLabel","destinationPath","isConfirmDisabled","isMultiSelect","onClear","onConfirm","onMoveToRoot","onRevealPath","placeholderLabel","previousPath","selectionCount","selectionCountLabel","showMoveToRoot","t","t1","revealPrevious","t2","revealDestination","t3","placeholder","children","buttonStyle","margin","size","disabled"],"sources":["../../../../../src/elements/Hierarchy/Modal/Footer/index.tsx"],"sourcesContent":["'use client'\nimport React, { useCallback } from 'react'\n\nimport type { PathSegment } from '../../ColumnBrowser/types.js'\n\nimport { FolderIcon } from '../../../../icons/Folder/index.js'\nimport { ReplaceIcon } from '../../../../icons/Replace/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { Button } from '../../../Button/index.js'\nimport { Chip } from '../../../Chip/index.js'\nimport { DialogFooter } from '../../../Dialog/index.js'\nimport './index.css'\n\nconst baseClass = 'hierarchy-modal-footer'\n\n// TODO: replace with a translation key once the hierarchy strings are finalized\nconst moveToLabel = 'Move to'\n\nexport type HierarchyModalFooterProps = {\n /** Label for the primary action, e.g. \"Move\" or \"Confirm\" */\n readonly confirmLabel: string\n /** Path of the item the user has picked in this session, root first */\n readonly destinationPath?: PathSegment[]\n /** Leading icon for the breadcrumb chips - falls back to a folder */\n readonly Icon?: React.ReactNode\n readonly isConfirmDisabled: boolean\n readonly isMultiSelect: boolean\n readonly onClear: () => void\n readonly onConfirm: () => void\n readonly onMoveToRoot?: () => void\n /** Called with a chip's path to expand the browser down to that item and focus it */\n readonly onRevealPath: (path: PathSegment[]) => void\n /** Shown when nothing has been picked yet, e.g. \"Select Folder\" */\n readonly placeholderLabel: string\n /** Path the item lived in before the modal was opened, root first */\n readonly previousPath?: PathSegment[]\n readonly selectionCount: number\n /** Shown in multi-select mode once something is checked, e.g. \"3 Tags selected\" */\n readonly selectionCountLabel: string\n readonly showMoveToRoot?: boolean\n}\n\n/** Deeper paths collapse to a leading ellipsis so the chip stays scannable, e.g. \"… / Parent / Child\" */\nconst MAX_VISIBLE_SEGMENTS = 2\n\nconst Separator: React.FC = () => <span className={`${baseClass}__chip-separator`}>/</span>\n\nconst HierarchyPathChip: React.FC<{\n readonly Icon?: React.ReactNode\n readonly onClick: () => void\n readonly path: PathSegment[]\n}> = ({ Icon, onClick, path }) => {\n const isTruncated = path.length > MAX_VISIBLE_SEGMENTS\n const visibleSegments = isTruncated ? path.slice(-MAX_VISIBLE_SEGMENTS) : path\n\n return (\n <Chip\n aria-label={path.map((segment) => segment.title).join(' / ')}\n className={`${baseClass}__chip`}\n icon={Icon ?? <FolderIcon />}\n onClick={onClick}\n >\n {isTruncated ? (\n <React.Fragment>\n <span className={`${baseClass}__chip-ellipsis`}>…</span>\n <Separator />\n </React.Fragment>\n ) : null}\n {visibleSegments.map((segment, index) => (\n <React.Fragment key={segment.id}>\n {index > 0 && <Separator />}\n {segment.title}\n </React.Fragment>\n ))}\n </Chip>\n )\n}\n\nexport const HierarchyModalFooter: React.FC<HierarchyModalFooterProps> = ({\n confirmLabel,\n destinationPath,\n Icon,\n isConfirmDisabled,\n isMultiSelect,\n onClear,\n onConfirm,\n onMoveToRoot,\n onRevealPath,\n placeholderLabel,\n previousPath,\n selectionCount,\n selectionCountLabel,\n showMoveToRoot,\n}) => {\n const { t } = useTranslation()\n\n const revealPrevious = useCallback(\n () => onRevealPath(previousPath ?? []),\n [onRevealPath, previousPath],\n )\n\n const revealDestination = useCallback(\n () => onRevealPath(destinationPath ?? []),\n [destinationPath, onRevealPath],\n )\n\n const placeholder = <span className={`${baseClass}__placeholder`}>{placeholderLabel}</span>\n\n return (\n <DialogFooter>\n <div className={`${baseClass}__lead`}>\n {isMultiSelect ? (\n selectionCount > 0 ? (\n <React.Fragment>\n <span className={`${baseClass}__placeholder`}>{selectionCountLabel}</span>\n <Button\n buttonStyle=\"link\"\n className={`${baseClass}__clear`}\n margin={false}\n onClick={onClear}\n size=\"medium\"\n >\n {t('general:clear')}\n </Button>\n </React.Fragment>\n ) : (\n placeholder\n )\n ) : (\n <React.Fragment>\n {previousPath?.length ? (\n <React.Fragment>\n <HierarchyPathChip Icon={Icon} onClick={revealPrevious} path={previousPath} />\n <span className={`${baseClass}__arrow`}>\n <ReplaceIcon />\n </span>\n </React.Fragment>\n ) : null}\n {destinationPath?.length ? (\n <React.Fragment>\n {!previousPath?.length && (\n <span className={`${baseClass}__placeholder`}>{moveToLabel}</span>\n )}\n <HierarchyPathChip Icon={Icon} onClick={revealDestination} path={destinationPath} />\n </React.Fragment>\n ) : (\n placeholder\n )}\n </React.Fragment>\n )}\n </div>\n <div className={`${baseClass}__trail`}>\n {showMoveToRoot && onMoveToRoot ? (\n <Button buttonStyle=\"secondary\" margin={false} onClick={onMoveToRoot} size=\"medium\">\n {t('hierarchy:moveToRoot')}\n </Button>\n ) : null}\n <Button disabled={isConfirmDisabled} margin={false} onClick={onConfirm} size=\"medium\">\n {confirmLabel}\n </Button>\n </div>\n </DialogFooter>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,OAAOC,KAAA,IAASC,WAAW,QAAQ;AAInC,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,QAAQ;AAC5B,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,QAAQ;AACvB,SAASC,IAAI,QAAQ;AACrB,SAAS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AAA,EAAwCmC,iBAAA;cAAAlC,IAAA,EAAyBkB;YAAA,C;eAGnEkB,WAAA;QAAA,C;UAKR/B,KAAA,CAAC;QAAAT,SAAA,EAAe,GAAAL,SAAA,SAAqB;QAAA8C,QAAA,GAClCR,cAAA,IAAkBN,YAAA,GACjB5B,IAAA,CAAAP,MAAA;UAAAkD,WAAA,EAAoB;UAAAC,MAAA;UAAAxC,OAAA,EAAoCwB,YAAA;UAAAiB,IAAA,EAAmB;UAAAH,QAAA,EACxEP,CAAA,CAAE;QAAA,C,QAEH,EACJnC,IAAA,CAAAP,MAAA;UAAAqD,QAAA,EAAkBtB,iBAAA;UAAAoB,MAAA;UAAAxC,OAAA,EAA2CuB,SAAA;UAAAkB,IAAA,EAAgB;UAAAH,QAAA,EAC1EpB;QAAA,C;;;;;;;;;;;;;;;;;;;;;;;SAjDPkB,E;CAsDJ","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes
|
|
3
|
-
* of this lookup, so routing (which holds the sanitized config) and client components can share
|
|
4
|
-
* one implementation.
|
|
5
|
-
*/
|
|
6
|
-
type FolderHierarchyCandidate = {
|
|
7
|
-
hierarchy?: {
|
|
8
|
-
relatedCollections?: Record<string, {
|
|
9
|
-
hasMany: boolean;
|
|
10
|
-
}>;
|
|
11
|
-
} | boolean;
|
|
12
|
-
slug: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that
|
|
16
|
-
* `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.
|
|
17
|
-
* Returns undefined if the collection has no folder field (e.g. it only has a tags field,
|
|
18
|
-
* or no hierarchy field at all).
|
|
19
|
-
*/
|
|
20
|
-
export declare const getFolderHierarchySlug: (collections: FolderHierarchyCandidate[], collectionSlug: string) => string | undefined;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=getFolderHierarchySlug.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFolderHierarchySlug.d.ts","sourceRoot":"","sources":["../../../src/elements/Hierarchy/getFolderHierarchySlug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,KAAK,wBAAwB,GAAG;IAC9B,SAAS,CAAC,EACN;QACE,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAC1D,GACD,OAAO,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,gBACpB,wBAAwB,EAAE,kBACvB,MAAM,KACrB,MAAM,GAAG,SASF,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes
|
|
3
|
-
* of this lookup, so routing (which holds the sanitized config) and client components can share
|
|
4
|
-
* one implementation.
|
|
5
|
-
*/ /**
|
|
6
|
-
* Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that
|
|
7
|
-
* `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.
|
|
8
|
-
* Returns undefined if the collection has no folder field (e.g. it only has a tags field,
|
|
9
|
-
* or no hierarchy field at all).
|
|
10
|
-
*/export const getFolderHierarchySlug = (collections, collectionSlug) => collections.find(collection => {
|
|
11
|
-
if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const related = collection.hierarchy.relatedCollections?.[collectionSlug];
|
|
15
|
-
return related !== undefined && related.hasMany === false;
|
|
16
|
-
})?.slug;
|
|
17
|
-
//# sourceMappingURL=getFolderHierarchySlug.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFolderHierarchySlug.js","names":["getFolderHierarchySlug","collections","collectionSlug","find","collection","hierarchy","related","relatedCollections","undefined","hasMany","slug"],"sources":["../../../src/elements/Hierarchy/getFolderHierarchySlug.ts"],"sourcesContent":["/**\n * The shape both `ClientCollectionConfig` and `SanitizedCollectionConfig` satisfy for the purposes\n * of this lookup, so routing (which holds the sanitized config) and client components can share\n * one implementation.\n */\ntype FolderHierarchyCandidate = {\n hierarchy?:\n | {\n relatedCollections?: Record<string, { hasMany: boolean }>\n }\n | boolean\n slug: string\n}\n\n/**\n * Finds the slug of the folder-style hierarchy collection (allowHasMany: false) that\n * `collectionSlug` belongs to, by scanning each collection's `hierarchy.relatedCollections`.\n * Returns undefined if the collection has no folder field (e.g. it only has a tags field,\n * or no hierarchy field at all).\n */\nexport const getFolderHierarchySlug = (\n collections: FolderHierarchyCandidate[],\n collectionSlug: string,\n): string | undefined =>\n collections.find((collection) => {\n if (!collection.hierarchy || typeof collection.hierarchy !== 'object') {\n return false\n }\n\n const related = collection.hierarchy.relatedCollections?.[collectionSlug]\n\n return related !== undefined && related.hasMany === false\n })?.slug\n"],"mappings":"AAAA;;;;GAAA,CAcA;;;;;MAMA,OAAO,MAAMA,sBAAA,GAAyBA,CACpCC,WAAA,EACAC,cAAA,KAEAD,WAAA,CAAYE,IAAI,CAAEC,UAAA;EAChB,IAAI,CAACA,UAAA,CAAWC,SAAS,IAAI,OAAOD,UAAA,CAAWC,SAAS,KAAK,UAAU;IACrE,OAAO;EACT;EAEA,MAAMC,OAAA,GAAUF,UAAA,CAAWC,SAAS,CAACE,kBAAkB,GAAGL,cAAA,CAAe;EAEzE,OAAOI,OAAA,KAAYE,SAAA,IAAaF,OAAA,CAAQG,OAAO,KAAK;AACtD,IAAIC,IAAA","ignoreList":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { I18nClient } from '@payloadcms/translations';
|
|
2
|
-
type MoveDocumentsArgs = {
|
|
3
|
-
apiRoute: string;
|
|
4
|
-
/** Destination hierarchy item, or null for root. */
|
|
5
|
-
destination: {
|
|
6
|
-
id: null | number | string;
|
|
7
|
-
title: string;
|
|
8
|
-
};
|
|
9
|
-
i18n: I18nClient;
|
|
10
|
-
/** Human-readable label for what moved, used in the success toast. */
|
|
11
|
-
label: string;
|
|
12
|
-
locale?: string;
|
|
13
|
-
/** The hierarchy item's parent/folder field name on each moved document. */
|
|
14
|
-
parentFieldName: string;
|
|
15
|
-
/** Documents to move, grouped by collection slug. */
|
|
16
|
-
selections: Record<string, {
|
|
17
|
-
ids: (number | string)[];
|
|
18
|
-
}>;
|
|
19
|
-
t: (key: string, options?: Record<string, unknown>) => string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.
|
|
23
|
-
*
|
|
24
|
-
* Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't
|
|
25
|
-
* strand the rest. Returns how many documents actually moved, leaving it to the caller to decide
|
|
26
|
-
* whether to refresh the view or clear its selection - the same reason it does not take an
|
|
27
|
-
* `onSuccess`: drop and the Move button want different follow-up.
|
|
28
|
-
*/
|
|
29
|
-
export declare const moveDocuments: ({ apiRoute, destination, i18n, label, locale, parentFieldName, selections, t, }: MoveDocumentsArgs) => Promise<{
|
|
30
|
-
hasErrors: boolean;
|
|
31
|
-
totalMoved: number;
|
|
32
|
-
}>;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=moveDocuments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moveDocuments.d.ts","sourceRoot":"","sources":["../../../../src/elements/Hierarchy/move/moveDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAQ1D,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oDAAoD;IACpD,WAAW,EAAE;QAAE,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1D,IAAI,EAAE,UAAU,CAAA;IAChB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAA;IACvB,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;KAAE,CAAC,CAAA;IACxD,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;CAC9D,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,oFASvB,iBAAiB,KAAG,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA6ExE,CAAA"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { formatAdminURL } from 'payload/shared';
|
|
2
|
-
import * as qs from 'qs-esm';
|
|
3
|
-
import { toast } from 'sonner';
|
|
4
|
-
import { requests } from '../../../utilities/api.js';
|
|
5
|
-
/**
|
|
6
|
-
* Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.
|
|
7
|
-
*
|
|
8
|
-
* Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't
|
|
9
|
-
* strand the rest. Returns how many documents actually moved, leaving it to the caller to decide
|
|
10
|
-
* whether to refresh the view or clear its selection - the same reason it does not take an
|
|
11
|
-
* `onSuccess`: drop and the Move button want different follow-up.
|
|
12
|
-
*/
|
|
13
|
-
export const moveDocuments = async ({
|
|
14
|
-
apiRoute,
|
|
15
|
-
destination,
|
|
16
|
-
i18n,
|
|
17
|
-
label,
|
|
18
|
-
locale,
|
|
19
|
-
parentFieldName,
|
|
20
|
-
selections,
|
|
21
|
-
t
|
|
22
|
-
}) => {
|
|
23
|
-
let totalMoved = 0;
|
|
24
|
-
let hasErrors = false;
|
|
25
|
-
try {
|
|
26
|
-
for (const [collectionSlug, {
|
|
27
|
-
ids
|
|
28
|
-
}] of Object.entries(selections)) {
|
|
29
|
-
if (ids.length === 0) {
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
const queryString = qs.stringify({
|
|
33
|
-
locale,
|
|
34
|
-
where: {
|
|
35
|
-
id: {
|
|
36
|
-
in: ids
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}, {
|
|
40
|
-
addQueryPrefix: true
|
|
41
|
-
});
|
|
42
|
-
const url = formatAdminURL({
|
|
43
|
-
apiRoute,
|
|
44
|
-
path: `/${collectionSlug}${queryString}`
|
|
45
|
-
});
|
|
46
|
-
const response = await requests.patch(url, {
|
|
47
|
-
body: JSON.stringify({
|
|
48
|
-
[parentFieldName]: destination.id
|
|
49
|
-
}),
|
|
50
|
-
headers: {
|
|
51
|
-
'Accept-Language': i18n.language,
|
|
52
|
-
'Content-Type': 'application/json',
|
|
53
|
-
credentials: 'include'
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const json = await response.json();
|
|
57
|
-
if (response.status >= 400) {
|
|
58
|
-
hasErrors = true;
|
|
59
|
-
if (json?.errors?.length > 0) {
|
|
60
|
-
toast.error(json.message || t('error:unknown'), {
|
|
61
|
-
description: json.errors.map(error => error.message).join('\n')
|
|
62
|
-
});
|
|
63
|
-
} else {
|
|
64
|
-
toast.error(json?.message || t('error:unknown'));
|
|
65
|
-
}
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
const movedCount = json?.docs?.length || 0;
|
|
69
|
-
totalMoved += movedCount;
|
|
70
|
-
if (json?.errors?.length > 0) {
|
|
71
|
-
hasErrors = true;
|
|
72
|
-
toast.error(json.message, {
|
|
73
|
-
description: json.errors.map(error => error.message).join('\n')
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (totalMoved > 0) {
|
|
78
|
-
const successKey = destination.id === null ? 'hierarchy:itemsMovedToRoot' : 'hierarchy:itemsMovedTo';
|
|
79
|
-
toast.success(t(successKey, {
|
|
80
|
-
count: totalMoved,
|
|
81
|
-
destination: destination.title,
|
|
82
|
-
label
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
} catch (_err) {
|
|
86
|
-
hasErrors = true;
|
|
87
|
-
toast.error(t('error:unknown'));
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
hasErrors,
|
|
91
|
-
totalMoved
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=moveDocuments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moveDocuments.js","names":["formatAdminURL","qs","toast","requests","moveDocuments","apiRoute","destination","i18n","label","locale","parentFieldName","selections","t","totalMoved","hasErrors","collectionSlug","ids","Object","entries","length","queryString","stringify","where","id","in","addQueryPrefix","url","path","response","patch","body","JSON","headers","language","credentials","json","status","errors","error","message","description","map","join","movedCount","docs","successKey","success","count","title","_err"],"sources":["../../../../src/elements/Hierarchy/move/moveDocuments.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\n\nimport { formatAdminURL } from 'payload/shared'\nimport * as qs from 'qs-esm'\nimport { toast } from 'sonner'\n\nimport { requests } from '../../../utilities/api.js'\n\ntype MoveDocumentsArgs = {\n apiRoute: string\n /** Destination hierarchy item, or null for root. */\n destination: { id: null | number | string; title: string }\n i18n: I18nClient\n /** Human-readable label for what moved, used in the success toast. */\n label: string\n locale?: string\n /** The hierarchy item's parent/folder field name on each moved document. */\n parentFieldName: string\n /** Documents to move, grouped by collection slug. */\n selections: Record<string, { ids: (number | string)[] }>\n t: (key: string, options?: Record<string, unknown>) => string\n}\n\n/**\n * Bulk-assigns `parentFieldName` on every selected document, one PATCH per collection.\n *\n * Surfaces per-collection failures as toasts and keeps going, so one rejected collection doesn't\n * strand the rest. Returns how many documents actually moved, leaving it to the caller to decide\n * whether to refresh the view or clear its selection - the same reason it does not take an\n * `onSuccess`: drop and the Move button want different follow-up.\n */\nexport const moveDocuments = async ({\n apiRoute,\n destination,\n i18n,\n label,\n locale,\n parentFieldName,\n selections,\n t,\n}: MoveDocumentsArgs): Promise<{ hasErrors: boolean; totalMoved: number }> => {\n let totalMoved = 0\n let hasErrors = false\n\n try {\n for (const [collectionSlug, { ids }] of Object.entries(selections)) {\n if (ids.length === 0) {\n continue\n }\n\n const queryString = qs.stringify(\n {\n locale,\n where: { id: { in: ids } },\n },\n { addQueryPrefix: true },\n )\n\n const url = formatAdminURL({\n apiRoute,\n path: `/${collectionSlug}${queryString}`,\n })\n\n const response = await requests.patch(url, {\n body: JSON.stringify({ [parentFieldName]: destination.id }),\n headers: {\n 'Accept-Language': i18n.language,\n 'Content-Type': 'application/json',\n credentials: 'include',\n },\n })\n\n const json = await response.json()\n\n if (response.status >= 400) {\n hasErrors = true\n\n if (json?.errors?.length > 0) {\n toast.error(json.message || t('error:unknown'), {\n description: json.errors.map((error: { message: string }) => error.message).join('\\n'),\n })\n } else {\n toast.error(json?.message || t('error:unknown'))\n }\n\n continue\n }\n\n const movedCount = json?.docs?.length || 0\n totalMoved += movedCount\n\n if (json?.errors?.length > 0) {\n hasErrors = true\n toast.error(json.message, {\n description: json.errors.map((error: { message: string }) => error.message).join('\\n'),\n })\n }\n }\n\n if (totalMoved > 0) {\n const successKey =\n destination.id === null ? 'hierarchy:itemsMovedToRoot' : 'hierarchy:itemsMovedTo'\n\n toast.success(\n t(successKey, {\n count: totalMoved,\n destination: destination.title,\n label,\n }),\n )\n }\n } catch (_err) {\n hasErrors = true\n toast.error(t('error:unknown'))\n }\n\n return { hasErrors, totalMoved }\n}\n"],"mappings":"AAEA,SAASA,cAAc,QAAQ;AAC/B,YAAYC,EAAA,MAAQ;AACpB,SAASC,KAAK,QAAQ;AAEtB,SAASC,QAAQ,QAAQ;AAiBzB;;;;;;;;AAQA,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