@payloadcms/ui 4.0.0-internal.d1cc1d3 → 4.0.0-internal.d21c039
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 +7 -6
- package/dist/css/forms.css +1 -0
- package/dist/css/preflight.css +1 -0
- package/dist/css/spacing.css +18 -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/AppHeader/EditViewWidthSettings/index.css +6 -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 +96 -0
- package/dist/elements/AppHeader/EditViewWidthSettings/index.js.map +1 -0
- package/dist/elements/AppHeader/SettingsMenu/index.css +5 -0
- 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 +4 -0
- package/dist/elements/AppHeader/index.d.ts.map +1 -1
- package/dist/elements/AppHeader/index.js +3 -2
- package/dist/elements/AppHeader/index.js.map +1 -1
- package/dist/elements/ArrayAction/index.d.ts +1 -0
- package/dist/elements/ArrayAction/index.d.ts.map +1 -1
- package/dist/elements/ArrayAction/index.js +45 -32
- package/dist/elements/ArrayAction/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/AddFilesView/index.css +10 -4
- package/dist/elements/BulkUpload/AddFilesView/index.d.ts.map +1 -1
- package/dist/elements/BulkUpload/AddFilesView/index.js +71 -51
- package/dist/elements/BulkUpload/AddFilesView/index.js.map +1 -1
- package/dist/elements/BulkUpload/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 +2 -2
- package/dist/elements/Button/index.d.ts.map +1 -1
- package/dist/elements/Button/index.js +2 -0
- package/dist/elements/Button/index.js.map +1 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts +10 -0
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts.map +1 -1
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js +65 -3
- package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js.map +1 -1
- package/dist/elements/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/CopyToClipboard/index.d.ts +1 -0
- package/dist/elements/CopyToClipboard/index.d.ts.map +1 -1
- package/dist/elements/CopyToClipboard/index.js +10 -8
- package/dist/elements/CopyToClipboard/index.js.map +1 -1
- package/dist/elements/DatePicker/index.css +2 -0
- 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/DocumentFields/index.css +2 -0
- package/dist/elements/DocumentHeader/DocumentHeaderRoot/index.js +4 -1
- package/dist/elements/DocumentHeader/DocumentHeaderRoot/index.js.map +1 -1
- 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 +22 -2
- 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 +6 -3
- package/dist/elements/DocumentHeader/index.js.map +1 -1
- package/dist/elements/Drawer/index.css +10 -4
- package/dist/elements/Dropzone/index.css +10 -4
- package/dist/elements/DuplicateDocument/SelectLocalesDrawer/index.js +3 -2
- package/dist/elements/DuplicateDocument/SelectLocalesDrawer/index.js.map +1 -1
- package/dist/elements/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/FileManager/FileToolbar/index.d.ts.map +1 -1
- package/dist/elements/FileManager/FileToolbar/index.js +3 -0
- package/dist/elements/FileManager/FileToolbar/index.js.map +1 -1
- package/dist/elements/FileManager/index.css +0 -30
- package/dist/elements/FileManager/index.d.ts.map +1 -1
- package/dist/elements/FileManager/index.js +379 -287
- package/dist/elements/FileManager/index.js.map +1 -1
- package/dist/elements/HTMLDiff/index.css +1 -0
- package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
- package/dist/elements/Hierarchy/MoveMany/index.js +2 -3
- package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
- package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
- package/dist/elements/Hierarchy/Search/useHierarchySearch.js +2 -3
- package/dist/elements/Hierarchy/Search/useHierarchySearch.js.map +1 -1
- package/dist/elements/IDLabel/index.css +6 -0
- package/dist/elements/IDLabel/index.d.ts +1 -1
- package/dist/elements/IDLabel/index.d.ts.map +1 -1
- package/dist/elements/IDLabel/index.js +16 -21
- package/dist/elements/IDLabel/index.js.map +1 -1
- package/dist/elements/ItemsDrawer/index.css +3 -0
- package/dist/elements/ListControls/index.css +10 -4
- package/dist/elements/ListControls/index.d.ts.map +1 -1
- package/dist/elements/ListControls/index.js +7 -1
- package/dist/elements/ListControls/index.js.map +1 -1
- package/dist/elements/ListControls/types.d.ts +3 -1
- 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 +8 -3
- package/dist/elements/ListControlsBar/index.js +4 -1
- package/dist/elements/ListControlsBar/index.js.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts +1 -7
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js +26 -32
- package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js.map +1 -1
- package/dist/elements/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/ListHeader/index.css +6 -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/SidebarTabs/renderTabServerFn.js +3 -2
- package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js.map +1 -1
- package/dist/elements/Nav/index.css +2 -0
- package/dist/elements/PageControls/index.css +1 -0
- package/dist/elements/PillSelector/index.css +1 -0
- package/dist/elements/Popup/PopupButtonList/index.css +1 -1
- package/dist/elements/Popup/index.js +1 -1
- package/dist/elements/Popup/index.js.map +1 -1
- package/dist/elements/PreviewSizes/index.css +2 -0
- package/dist/elements/PublishButton/ScheduleDrawer/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/ScheduleDrawer/index.js +9 -31
- 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 +15 -4
- package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
- package/dist/elements/QueryPresets/fields/Heading/index.css +1 -0
- package/dist/elements/RelationshipTable/index.d.ts.map +1 -1
- package/dist/elements/RelationshipTable/index.js +5 -2
- package/dist/elements/RelationshipTable/index.js.map +1 -1
- package/dist/elements/RenderTitle/index.css +12 -0
- package/dist/elements/RenderTitle/index.d.ts +1 -0
- package/dist/elements/RenderTitle/index.d.ts.map +1 -1
- package/dist/elements/RenderTitle/index.js +30 -17
- package/dist/elements/RenderTitle/index.js.map +1 -1
- 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/SortHeader/index.d.ts.map +1 -1
- package/dist/elements/SortHeader/index.js +29 -26
- package/dist/elements/SortHeader/index.js.map +1 -1
- package/dist/elements/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.css +64 -14
- package/dist/elements/StepNav/index.d.ts.map +1 -1
- package/dist/elements/StepNav/index.js +143 -69
- package/dist/elements/StepNav/index.js.map +1 -1
- package/dist/elements/Table/DefaultCell/index.d.ts.map +1 -1
- package/dist/elements/Table/DefaultCell/index.js +3 -11
- package/dist/elements/Table/DefaultCell/index.js.map +1 -1
- package/dist/elements/Table/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/Upload/UploadFromURLModal/index.d.ts +1 -1
- package/dist/elements/Upload/UploadFromURLModal/index.d.ts.map +1 -1
- package/dist/elements/Upload/UploadFromURLModal/index.js.map +1 -1
- package/dist/elements/Upload/index.css +39 -32
- package/dist/elements/Upload/index.d.ts.map +1 -1
- package/dist/elements/Upload/index.js +37 -99
- package/dist/elements/Upload/index.js.map +1 -1
- package/dist/elements/Upload/usePasteFromClipboard.d.ts +14 -0
- package/dist/elements/Upload/usePasteFromClipboard.d.ts.map +1 -0
- package/dist/elements/Upload/usePasteFromClipboard.js +93 -0
- package/dist/elements/Upload/usePasteFromClipboard.js.map +1 -0
- package/dist/elements/Upload/useUploadFromUrl.d.ts +20 -0
- package/dist/elements/Upload/useUploadFromUrl.d.ts.map +1 -0
- package/dist/elements/Upload/useUploadFromUrl.js +201 -0
- package/dist/elements/Upload/useUploadFromUrl.js.map +1 -0
- package/dist/elements/UploadDropzoneContent/index.css +31 -0
- package/dist/elements/UploadDropzoneContent/index.d.ts +17 -0
- package/dist/elements/UploadDropzoneContent/index.d.ts.map +1 -0
- package/dist/elements/UploadDropzoneContent/index.js +62 -0
- package/dist/elements/UploadDropzoneContent/index.js.map +1 -0
- package/dist/elements/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/conditionValue.d.ts +32 -0
- package/dist/elements/WhereBuilder/conditionValue.d.ts.map +1 -0
- package/dist/elements/WhereBuilder/conditionValue.js +32 -0
- package/dist/elements/WhereBuilder/conditionValue.js.map +1 -0
- package/dist/elements/WhereBuilder/index.css +2 -0
- package/dist/elements/WhereBuilder/index.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/index.js +15 -4
- package/dist/elements/WhereBuilder/index.js.map +1 -1
- package/dist/exports/client/index.d.ts +4 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +1 -1
- package/dist/exports/client/index.js.map +3 -3
- package/dist/exports/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/ArrayRow.d.ts +1 -0
- package/dist/fields/Array/ArrayRow.d.ts.map +1 -1
- package/dist/fields/Array/ArrayRow.js +2 -0
- package/dist/fields/Array/ArrayRow.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 +40 -13
- package/dist/fields/Array/index.js.map +1 -1
- package/dist/fields/Blocks/BlockRow.d.ts +1 -0
- package/dist/fields/Blocks/BlockRow.d.ts.map +1 -1
- package/dist/fields/Blocks/BlockRow.js +2 -0
- package/dist/fields/Blocks/BlockRow.js.map +1 -1
- package/dist/fields/Blocks/RowActions.d.ts +1 -0
- package/dist/fields/Blocks/RowActions.d.ts.map +1 -1
- package/dist/fields/Blocks/RowActions.js +22 -19
- package/dist/fields/Blocks/RowActions.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 +37 -10
- package/dist/fields/Blocks/index.js.map +1 -1
- package/dist/fields/Checkbox/Input.d.ts +2 -2
- package/dist/fields/Checkbox/Input.js.map +1 -1
- package/dist/fields/Checkbox/index.css +48 -67
- package/dist/fields/FieldDescription/index.css +5 -0
- package/dist/fields/FieldLabel/index.css +22 -28
- package/dist/fields/FieldLabel/index.js +7 -8
- package/dist/fields/FieldLabel/index.js.map +1 -1
- package/dist/fields/Group/index.css +11 -4
- package/dist/fields/RadioGroup/Radio/index.css +42 -19
- package/dist/fields/RadioGroup/index.css +2 -20
- package/dist/fields/Relationship/Input.d.ts.map +1 -1
- package/dist/fields/Relationship/Input.js +2 -3
- package/dist/fields/Relationship/Input.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 +9 -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 +46 -19
- 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 +19 -8
- 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/addFieldStatePromise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js +1 -0
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js.map +1 -1
- 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/icons/Edit/index.d.ts +0 -1
- package/dist/icons/Edit/index.d.ts.map +1 -1
- package/dist/icons/Edit/index.js +4 -4
- package/dist/icons/Edit/index.js.map +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +22 -5
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/providers/Actions/index.d.ts +1 -0
- package/dist/providers/Actions/index.d.ts.map +1 -1
- package/dist/providers/Actions/index.js +43 -11
- package/dist/providers/Actions/index.js.map +1 -1
- package/dist/providers/Auth/AuthSessionDebug/index.css +48 -0
- package/dist/providers/Auth/AuthSessionDebug/index.d.ts +13 -0
- package/dist/providers/Auth/AuthSessionDebug/index.d.ts.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/index.js +93 -0
- package/dist/providers/Auth/AuthSessionDebug/index.js.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts +21 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts.map +1 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.js +53 -0
- package/dist/providers/Auth/AuthSessionDebug/utilities.js.map +1 -0
- package/dist/providers/Auth/authSessionRequests.d.ts +27 -0
- package/dist/providers/Auth/authSessionRequests.d.ts.map +1 -0
- package/dist/providers/Auth/authSessionRequests.js +119 -0
- package/dist/providers/Auth/authSessionRequests.js.map +1 -0
- package/dist/providers/Auth/index.d.ts +2 -56
- package/dist/providers/Auth/index.d.ts.map +1 -1
- package/dist/providers/Auth/index.js +283 -135
- package/dist/providers/Auth/index.js.map +1 -1
- package/dist/providers/Auth/sessionActivity.d.ts +23 -0
- package/dist/providers/Auth/sessionActivity.d.ts.map +1 -0
- package/dist/providers/Auth/sessionActivity.js +49 -0
- package/dist/providers/Auth/sessionActivity.js.map +1 -0
- package/dist/providers/Auth/sessionTiming.d.ts +11 -0
- package/dist/providers/Auth/sessionTiming.d.ts.map +1 -0
- package/dist/providers/Auth/sessionTiming.js +18 -0
- package/dist/providers/Auth/sessionTiming.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/index.d.ts +17 -0
- package/dist/providers/Auth/tabSessionSync/index.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/index.js +263 -0
- package/dist/providers/Auth/tabSessionSync/index.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/types.d.ts +107 -0
- package/dist/providers/Auth/tabSessionSync/types.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/types.js +6 -0
- package/dist/providers/Auth/tabSessionSync/types.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts +11 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js +90 -0
- package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js.map +1 -0
- package/dist/providers/Auth/tabSessionSync/utilities.d.ts +26 -0
- package/dist/providers/Auth/tabSessionSync/utilities.d.ts.map +1 -0
- package/dist/providers/Auth/tabSessionSync/utilities.js +159 -0
- package/dist/providers/Auth/tabSessionSync/utilities.js.map +1 -0
- package/dist/providers/Auth/types.d.ts +65 -0
- package/dist/providers/Auth/types.d.ts.map +1 -0
- package/dist/providers/Auth/types.js +2 -0
- package/dist/providers/Auth/types.js.map +1 -0
- package/dist/providers/Auth/useAuthSessionTimers.d.ts +26 -0
- package/dist/providers/Auth/useAuthSessionTimers.d.ts.map +1 -0
- package/dist/providers/Auth/useAuthSessionTimers.js +203 -0
- package/dist/providers/Auth/useAuthSessionTimers.js.map +1 -0
- package/dist/providers/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/FormErrorHandler/index.d.ts +5 -1
- package/dist/providers/FormErrorHandler/index.d.ts.map +1 -1
- package/dist/providers/FormErrorHandler/index.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 +64 -138
- package/dist/providers/Locale/index.js.map +1 -1
- package/dist/providers/Root/index.d.ts +5 -1
- package/dist/providers/Root/index.d.ts.map +1 -1
- package/dist/providers/Root/index.js +32 -20
- package/dist/providers/Root/index.js.map +1 -1
- package/dist/providers/RouteTransition/ProgressBar/index.js +4 -1
- package/dist/providers/RouteTransition/ProgressBar/index.js.map +1 -1
- package/dist/providers/RouteTransition/index.d.ts +2 -0
- package/dist/providers/RouteTransition/index.d.ts.map +1 -1
- package/dist/providers/RouteTransition/index.js +42 -14
- package/dist/providers/RouteTransition/index.js.map +1 -1
- package/dist/providers/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 +22 -1
- package/dist/providers/Theme/index.d.ts.map +1 -1
- package/dist/providers/Theme/index.js +313 -84
- 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 +186 -21
- package/dist/templates/Default/Wrapper/index.css +2 -0
- package/dist/templates/Default/index.css +1 -0
- package/dist/templates/Default/index.d.ts +1 -0
- package/dist/templates/Default/index.d.ts.map +1 -1
- package/dist/templates/Default/index.js +2 -0
- package/dist/templates/Default/index.js.map +1 -1
- package/dist/utilities/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/formatMetadata.d.ts.map +1 -1
- package/dist/utilities/formatMetadata.js +0 -5
- package/dist/utilities/formatMetadata.js.map +1 -1
- package/dist/utilities/getFilesFromClipboard.d.ts +10 -0
- package/dist/utilities/getFilesFromClipboard.d.ts.map +1 -0
- package/dist/utilities/getFilesFromClipboard.js +49 -0
- package/dist/utilities/getFilesFromClipboard.js.map +1 -0
- package/dist/utilities/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 +3 -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 +9 -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/DashboardStepNav.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +3 -2
- package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js +7 -7
- package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +104 -66
- package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
- package/dist/views/Dashboard/Default/ModularDashboard/index.css +35 -140
- 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/SetDocumentTitle/index.d.ts.map +1 -1
- package/dist/views/Edit/SetDocumentTitle/index.js +4 -1
- package/dist/views/Edit/SetDocumentTitle/index.js.map +1 -1
- package/dist/views/Edit/index.css +19 -0
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +16 -2
- 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/HierarchyTable/SlotTable.css +1 -0
- package/dist/views/HierarchyList/index.css +16 -0
- package/dist/views/List/ListHeader/index.css +6 -0
- package/dist/views/List/ListHeader/index.d.ts +1 -11
- package/dist/views/List/ListHeader/index.d.ts.map +1 -1
- package/dist/views/List/ListHeader/index.js +3 -9
- package/dist/views/List/ListHeader/index.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 +3 -16
- package/dist/views/List/index.client.js.map +1 -1
- package/dist/views/List/index.css +19 -0
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +2 -1
- 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/getCustomCollectionViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getCustomCollectionViewByRoute.js.map +1 -1
- package/dist/views/Root/getCustomGlobalViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getCustomGlobalViewByRoute.js.map +1 -1
- package/dist/views/Root/getCustomViewByKey.d.ts.map +1 -1
- package/dist/views/Root/getCustomViewByKey.js.map +1 -1
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +32 -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 +29 -9
- package/dist/views/Version/Default/index.d.ts.map +1 -1
- package/dist/views/Version/Default/index.js +16 -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/Version/generateVersionViewMetadata.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/generateVersionsViewMetadata.js.map +1 -1
- package/dist/views/Versions/index.css +7 -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 +40 -35
- package/dist/widgets/CollectionCards/index.js +1 -1
- package/dist/widgets/CollectionCards/index.js.map +1 -1
- package/dist/widgets/RecentlyViewed/DocumentActivity/index.css +184 -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 +180 -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 -541
- 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/Toasts/fieldErrors.spec.js +0 -46
- package/dist/elements/Toasts/fieldErrors.spec.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/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/layouts/Root/index.spec.js +0 -20
- package/dist/layouts/Root/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/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,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
4
|
import { formatAdminURL } from 'payload/shared';
|
|
6
5
|
import React, { createContext, use, useEffect, useRef, useState } from 'react';
|
|
@@ -8,163 +7,90 @@ import { findLocaleFromCode } from '../../utilities/findLocaleFromCode.js';
|
|
|
8
7
|
import { useAuth } from '../Auth/index.js';
|
|
9
8
|
import { useConfig } from '../Config/index.js';
|
|
10
9
|
import { useSearchParams } from '../RouterAdapter/index.js';
|
|
11
|
-
|
|
10
|
+
import { useRouteTransition } from '../RouteTransition/index.js';
|
|
11
|
+
const LocaleContext = /*#__PURE__*/createContext(null);
|
|
12
12
|
export const LocaleLoadingContext = /*#__PURE__*/createContext({
|
|
13
13
|
localeIsLoading: false,
|
|
14
14
|
setLocaleIsLoading: _ => undefined
|
|
15
15
|
});
|
|
16
|
-
const fetchPreferences = async (key,
|
|
16
|
+
const fetchPreferences = async (key, apiRoute) => await fetch(formatAdminURL({
|
|
17
|
+
apiRoute,
|
|
18
|
+
path: `/payload-preferences/${key}`
|
|
19
|
+
}), {
|
|
17
20
|
credentials: 'include',
|
|
18
21
|
headers: {
|
|
19
22
|
'Content-Type': 'application/json'
|
|
20
23
|
},
|
|
21
24
|
method: 'GET'
|
|
22
25
|
})?.then(res => res.json());
|
|
23
|
-
export const LocaleProvider =
|
|
24
|
-
|
|
26
|
+
export const LocaleProvider = ({
|
|
27
|
+
children,
|
|
28
|
+
/**
|
|
29
|
+
The `locale` prop originates from the root layout, which does not have access to search params
|
|
30
|
+
This component uses the `useSearchParams` hook to get the locale from the URL as precedence over this prop
|
|
31
|
+
This prop does not update as the user navigates the site, because the root layout does not re-render
|
|
32
|
+
*/
|
|
33
|
+
locale: initialLocaleFromPrefs
|
|
34
|
+
}) => {
|
|
25
35
|
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
config: {
|
|
37
|
+
localization = false,
|
|
38
|
+
routes: {
|
|
39
|
+
api: apiRoute
|
|
40
|
+
}
|
|
41
|
+
}
|
|
31
42
|
} = useConfig();
|
|
32
|
-
const {
|
|
33
|
-
localization: t2,
|
|
34
|
-
routes: t3
|
|
35
|
-
} = t1;
|
|
36
|
-
const localization = t2 === undefined ? false : t2;
|
|
37
|
-
const {
|
|
38
|
-
api: apiRoute
|
|
39
|
-
} = t3;
|
|
40
43
|
const {
|
|
41
44
|
user
|
|
42
45
|
} = useAuth();
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let t6;
|
|
55
|
-
if ($[2] !== defaultLocale || $[3] !== initialLocaleFromPrefs || $[4] !== localeFromParams || $[5] !== localization) {
|
|
56
|
-
t6 = () => {
|
|
57
|
-
if (!localization || localization && !localization.locales.length) {
|
|
58
|
-
return {};
|
|
59
|
-
}
|
|
60
|
-
return findLocaleFromCode(localization, localeFromParams) || findLocaleFromCode(localization, initialLocaleFromPrefs) || findLocaleFromCode(localization, defaultLocale) || findLocaleFromCode(localization, localization.locales[0].code);
|
|
61
|
-
};
|
|
62
|
-
$[2] = defaultLocale;
|
|
63
|
-
$[3] = initialLocaleFromPrefs;
|
|
64
|
-
$[4] = localeFromParams;
|
|
65
|
-
$[5] = localization;
|
|
66
|
-
$[6] = t6;
|
|
67
|
-
} else {
|
|
68
|
-
t6 = $[6];
|
|
69
|
-
}
|
|
70
|
-
const [locale, setLocale] = React.useState(t6);
|
|
46
|
+
const {
|
|
47
|
+
isTransitioning
|
|
48
|
+
} = useRouteTransition();
|
|
49
|
+
const defaultLocale = localization ? localization.defaultLocale : 'en';
|
|
50
|
+
const localeFromParams = useSearchParams().get('locale');
|
|
51
|
+
const [locale, setLocale] = React.useState(() => {
|
|
52
|
+
if (!localization || localization && !localization.locales.length) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return findLocaleFromCode(localization, localeFromParams) || findLocaleFromCode(localization, initialLocaleFromPrefs) || findLocaleFromCode(localization, defaultLocale) || findLocaleFromCode(localization, localization.locales[0].code);
|
|
56
|
+
});
|
|
71
57
|
const [isLoading, setLocaleIsLoading] = useState(false);
|
|
72
58
|
const prevLocale = useRef(locale);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (locale.code !== prevLocale.current.code) {
|
|
78
|
-
setLocaleIsLoading(false);
|
|
79
|
-
}
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
// Keep fields disabled until the new locale's document state finishes loading.
|
|
61
|
+
if (locale?.code !== prevLocale.current?.code && !isTransitioning) {
|
|
62
|
+
setLocaleIsLoading(false);
|
|
80
63
|
prevLocale.current = locale;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
path: ""
|
|
96
|
-
});
|
|
97
|
-
$[10] = apiRoute;
|
|
98
|
-
$[11] = t9;
|
|
99
|
-
} else {
|
|
100
|
-
t9 = $[11];
|
|
101
|
-
}
|
|
102
|
-
const fetchURL = t9;
|
|
103
|
-
let t10;
|
|
104
|
-
if ($[12] !== defaultLocale || $[13] !== fetchURL || $[14] !== localeFromParams || $[15] !== localization || $[16] !== user?.id) {
|
|
105
|
-
t10 = () => {
|
|
106
|
-
const resetLocale = async function resetLocale() {
|
|
107
|
-
if (localization && user?.id) {
|
|
108
|
-
const localeToUse = localeFromParams || (await fetchPreferences("locale", fetchURL)?.then(_temp));
|
|
109
|
-
const newLocale = findLocaleFromCode(localization, localeToUse) || findLocaleFromCode(localization, defaultLocale) || findLocaleFromCode(localization, localization?.locales?.[0]?.code);
|
|
110
|
-
if (newLocale) {
|
|
111
|
-
setLocale(newLocale);
|
|
112
|
-
}
|
|
64
|
+
}
|
|
65
|
+
}, [isTransitioning, locale]);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
/**
|
|
68
|
+
* This effect should only run when `localeFromParams` changes, i.e. when the user clicks an anchor link
|
|
69
|
+
* The root layout, which sends the initial locale from prefs, will not re-render as the user navigates the site
|
|
70
|
+
* For this reason, we need to fetch the locale from prefs if the search params clears the `locale` query param
|
|
71
|
+
*/
|
|
72
|
+
async function resetLocale() {
|
|
73
|
+
if (localization && user?.id) {
|
|
74
|
+
const localeToUse = localeFromParams || (await fetchPreferences('locale', apiRoute)?.then(res => res.value));
|
|
75
|
+
const newLocale = findLocaleFromCode(localization, localeToUse) || findLocaleFromCode(localization, defaultLocale) || findLocaleFromCode(localization, localization?.locales?.[0]?.code);
|
|
76
|
+
if (newLocale) {
|
|
77
|
+
setLocale(newLocale);
|
|
113
78
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if ($[18] !== defaultLocale || $[19] !== fetchURL || $[20] !== localeFromParams || $[21] !== localization || $[22] !== t11) {
|
|
129
|
-
t12 = [defaultLocale, localization, fetchURL, localeFromParams, t11];
|
|
130
|
-
$[18] = defaultLocale;
|
|
131
|
-
$[19] = fetchURL;
|
|
132
|
-
$[20] = localeFromParams;
|
|
133
|
-
$[21] = localization;
|
|
134
|
-
$[22] = t11;
|
|
135
|
-
$[23] = t12;
|
|
136
|
-
} else {
|
|
137
|
-
t12 = $[23];
|
|
138
|
-
}
|
|
139
|
-
useEffect(t10, t12);
|
|
140
|
-
let t13;
|
|
141
|
-
if ($[24] !== children || $[25] !== isLoading || $[26] !== locale) {
|
|
142
|
-
t13 = _jsx(LocaleContext, {
|
|
143
|
-
value: locale,
|
|
144
|
-
children: _jsx(LocaleLoadingContext, {
|
|
145
|
-
value: {
|
|
146
|
-
localeIsLoading: isLoading,
|
|
147
|
-
setLocaleIsLoading
|
|
148
|
-
},
|
|
149
|
-
children
|
|
150
|
-
})
|
|
151
|
-
});
|
|
152
|
-
$[24] = children;
|
|
153
|
-
$[25] = isLoading;
|
|
154
|
-
$[26] = locale;
|
|
155
|
-
$[27] = t13;
|
|
156
|
-
} else {
|
|
157
|
-
t13 = $[27];
|
|
158
|
-
}
|
|
159
|
-
return t13;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
void resetLocale();
|
|
82
|
+
}, [apiRoute, defaultLocale, localization, localeFromParams, user?.id]);
|
|
83
|
+
return /*#__PURE__*/_jsx(LocaleContext, {
|
|
84
|
+
value: locale,
|
|
85
|
+
children: /*#__PURE__*/_jsx(LocaleLoadingContext, {
|
|
86
|
+
value: {
|
|
87
|
+
localeIsLoading: isLoading,
|
|
88
|
+
setLocaleIsLoading
|
|
89
|
+
},
|
|
90
|
+
children: children
|
|
91
|
+
})
|
|
92
|
+
});
|
|
160
93
|
};
|
|
161
94
|
export const useLocaleLoading = () => use(LocaleLoadingContext);
|
|
162
|
-
/**
|
|
163
|
-
* TODO: V4
|
|
164
|
-
* The return type of the `useLocale` hook will change in v4. It will return `null | Locale` instead of `false | {} | Locale`.
|
|
165
|
-
*/
|
|
166
95
|
export const useLocale = () => use(LocaleContext);
|
|
167
|
-
function _temp(res) {
|
|
168
|
-
return res.value;
|
|
169
|
-
}
|
|
170
96
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["formatAdminURL","React","createContext","use","useEffect","useRef","useState","findLocaleFromCode","useAuth","useConfig","useSearchParams","useRouteTransition","LocaleContext","LocaleLoadingContext","localeIsLoading","setLocaleIsLoading","_","undefined","fetchPreferences","key","apiRoute","fetch","path","credentials","headers","method","then","res","json","LocaleProvider","children","locale","initialLocaleFromPrefs","config","localization","routes","api","user","isTransitioning","defaultLocale","localeFromParams","get","setLocale","locales","length","code","isLoading","prevLocale","current","resetLocale","id","localeToUse","value","newLocale","_jsx","useLocaleLoading","useLocale"],"sources":["../../../src/providers/Locale/index.tsx"],"sourcesContent":["'use client'\n\nimport type { Locale } from 'payload'\n\nimport { formatAdminURL } from 'payload/shared'\nimport React, { createContext, use, useEffect, useRef, useState } from 'react'\n\nimport { findLocaleFromCode } from '../../utilities/findLocaleFromCode.js'\nimport { useAuth } from '../Auth/index.js'\nimport { useConfig } from '../Config/index.js'\nimport { useSearchParams } from '../RouterAdapter/index.js'\nimport { useRouteTransition } from '../RouteTransition/index.js'\n\nconst LocaleContext = createContext<Locale | null>(null)\n\nexport const LocaleLoadingContext = createContext({\n localeIsLoading: false,\n setLocaleIsLoading: (_: boolean) => undefined,\n})\n\nconst fetchPreferences = async <T extends Record<string, unknown> | string>(\n key: string,\n apiRoute: string,\n): Promise<{ id: string; value: T }> =>\n await fetch(\n formatAdminURL({\n apiRoute,\n path: `/payload-preferences/${key}`,\n }),\n {\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'GET',\n },\n )?.then((res) => res.json() as Promise<{ id: string; value: T }>)\n\nexport const LocaleProvider: React.FC<{ children?: React.ReactNode; locale?: Locale['code'] }> = ({\n children,\n /**\n The `locale` prop originates from the root layout, which does not have access to search params\n This component uses the `useSearchParams` hook to get the locale from the URL as precedence over this prop\n This prop does not update as the user navigates the site, because the root layout does not re-render\n */\n locale: initialLocaleFromPrefs,\n}) => {\n const {\n config: {\n localization = false,\n routes: { api: apiRoute },\n },\n } = useConfig()\n\n const { user } = useAuth()\n const { isTransitioning } = useRouteTransition()\n\n const defaultLocale = localization ? localization.defaultLocale : 'en'\n\n const localeFromParams = useSearchParams().get('locale')\n\n const [locale, setLocale] = React.useState<Locale | null>(() => {\n if (!localization || (localization && !localization.locales.length)) {\n return null\n }\n\n return (\n findLocaleFromCode(localization, localeFromParams) ||\n findLocaleFromCode(localization, initialLocaleFromPrefs) ||\n findLocaleFromCode(localization, defaultLocale) ||\n findLocaleFromCode(localization, localization.locales[0].code)\n )\n })\n\n const [isLoading, setLocaleIsLoading] = useState(false)\n\n const prevLocale = useRef<Locale | null>(locale)\n\n useEffect(() => {\n // Keep fields disabled until the new locale's document state finishes loading.\n if (locale?.code !== prevLocale.current?.code && !isTransitioning) {\n setLocaleIsLoading(false)\n prevLocale.current = locale\n }\n }, [isTransitioning, locale])\n\n useEffect(() => {\n /**\n * This effect should only run when `localeFromParams` changes, i.e. when the user clicks an anchor link\n * The root layout, which sends the initial locale from prefs, will not re-render as the user navigates the site\n * For this reason, we need to fetch the locale from prefs if the search params clears the `locale` query param\n */\n async function resetLocale() {\n if (localization && user?.id) {\n const localeToUse =\n localeFromParams ||\n (await fetchPreferences<Locale['code']>('locale', apiRoute)?.then((res) => res.value))\n\n const newLocale =\n findLocaleFromCode(localization, localeToUse) ||\n findLocaleFromCode(localization, defaultLocale) ||\n findLocaleFromCode(localization, localization?.locales?.[0]?.code)\n\n if (newLocale) {\n setLocale(newLocale)\n }\n }\n }\n\n void resetLocale()\n }, [apiRoute, defaultLocale, localization, localeFromParams, user?.id])\n\n return (\n <LocaleContext value={locale}>\n <LocaleLoadingContext value={{ localeIsLoading: isLoading, setLocaleIsLoading }}>\n {children}\n </LocaleLoadingContext>\n </LocaleContext>\n )\n}\n\nexport const useLocaleLoading = () => use(LocaleLoadingContext)\n\nexport const useLocale = (): Locale | null => use(LocaleContext)\n"],"mappings":"AAAA;;;AAIA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,aAAa,EAAEC,GAAG,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAEvE,SAASC,kBAAkB,QAAQ;AACnC,SAASC,OAAO,QAAQ;AACxB,SAASC,SAAS,QAAQ;AAC1B,SAASC,eAAe,QAAQ;AAChC,SAASC,kBAAkB,QAAQ;AAEnC,MAAMC,aAAA,gBAAgBV,aAAA,CAA6B;AAEnD,OAAO,MAAMW,oBAAA,gBAAuBX,aAAA,CAAc;EAChDY,eAAA,EAAiB;EACjBC,kBAAA,EAAqBC,CAAA,IAAeC;AACtC;AAEA,MAAMC,gBAAA,GAAmB,MAAAA,CACvBC,GAAA,EACAC,QAAA,KAEA,MAAMC,KAAA,CACJrB,cAAA,CAAe;EACboB,QAAA;EACAE,IAAA,EAAM,wBAAwBH,GAAA;AAChC,IACA;EACEI,WAAA,EAAa;EACbC,OAAA,EAAS;IACP,gBAAgB;EAClB;EACAC,MAAA,EAAQ;AACV,IACCC,IAAA,CAAMC,GAAA,IAAQA,GAAA,CAAIC,IAAI;AAE3B,OAAO,MAAMC,cAAA,GAAoFA,CAAC;EAChGC,QAAQ;EACR;;;;;EAKAC,MAAA,EAAQC;AAAsB,CAC/B;EACC,MAAM;IACJC,MAAA,EAAQ;MACN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,KACC,MAAMtB,gBAAA,CAAiC,UAAUE,QAAA,GAAWM,IAAA,CAAMC,GAAA,IAAQA,GAAA,CAAIyB,KAAK;QAEtF,MAAMC,SAAA,GACJ9C,kBAAA,CAAmB2B,YAAA,EAAciB,WAAA,KACjC5C,kBAAA,CAAmB2B,YAAA,EAAcK,aAAA,KACjChC,kBAAA,CAAmB2B,YAAA,EAAcA,YAAA,EAAcS,OAAA,GAAU,EAAE,EAAEE,IAAA;QAE/D,IAAIQ,SAAA,EAAW;UACbX,SAAA,CAAUW,SAAA;QACZ;MACF;IACF;IAEA,KAAKJ,WAAA;EACP,GAAG,CAAC7B,QAAA,EAAUmB,aAAA,EAAeL,YAAA,EAAcM,gBAAA,EAAkBH,IAAA,EAAMa,EAAA,CAAG;EAEtE,oBACEI,IAAA,CAAC1C,aAAA;IAAcwC,KAAA,EAAOrB,MAAA;cACpB,aAAAuB,IAAA,CAACzC,oBAAA;MAAqBuC,KAAA,EAAO;QAAEtC,eAAA,EAAiBgC,SAAA;QAAW/B;MAAmB;gBAC3Ee;;;AAIT;AAEA,OAAO,MAAMyB,gBAAA,GAAmBA,CAAA,KAAMpD,GAAA,CAAIU,oBAAA;AAE1C,OAAO,MAAM2C,SAAA,GAAYA,CAAA,KAAqBrD,GAAA,CAAIS,aAAA","ignoreList":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { I18nClient, I18nOptions, Language } from '@payloadcms/translations';
|
|
2
2
|
import type { ClientConfig, LanguageOptions, Locale, RouterAdapterComponent, SanitizedPermissions, ServerFunctionClient, User } from 'payload';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import type { Theme } from '../Theme/
|
|
4
|
+
import type { EditViewWidth, Theme, TypeSize } from '../Theme/shared.js';
|
|
5
5
|
type Props = {
|
|
6
6
|
readonly children: React.ReactNode;
|
|
7
7
|
readonly config: ClientConfig;
|
|
8
8
|
readonly dateFNSKey: Language['dateFNSKey'];
|
|
9
|
+
readonly editViewWidth?: EditViewWidth;
|
|
9
10
|
readonly embed?: boolean;
|
|
10
11
|
readonly fallbackLang: I18nOptions['fallbackLanguage'];
|
|
11
12
|
readonly highContrastMode: boolean;
|
|
@@ -16,8 +17,11 @@ type Props = {
|
|
|
16
17
|
readonly permissions: SanitizedPermissions;
|
|
17
18
|
readonly RouterAdapter: RouterAdapterComponent;
|
|
18
19
|
readonly serverFunction: ServerFunctionClient;
|
|
20
|
+
readonly shouldAlignEditViewHeader?: boolean;
|
|
21
|
+
readonly shouldApplyListViewMaxWidth?: boolean;
|
|
19
22
|
readonly theme: Theme;
|
|
20
23
|
readonly translations: I18nClient['translations'];
|
|
24
|
+
readonly typeSize?: TypeSize;
|
|
21
25
|
readonly user: null | User;
|
|
22
26
|
};
|
|
23
27
|
export declare const RootProvider: React.FC<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Root/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACjF,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,MAAM,EACN,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,IAAI,EACL,MAAM,SAAS,CAAA;AAKhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Root/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACjF,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,MAAM,EACN,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,IAAI,EACL,MAAM,SAAS,CAAA;AAKhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAA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 -30,11 +30,12 @@ import { ToastContainer } from '../ToastContainer/index.js';
|
|
|
30
30
|
import { TranslationProvider } from '../Translation/index.js';
|
|
31
31
|
import { UploadHandlersProvider } from '../UploadHandlers/index.js';
|
|
32
32
|
export const RootProvider = t0 => {
|
|
33
|
-
const $ = _c(
|
|
33
|
+
const $ = _c(22);
|
|
34
34
|
const {
|
|
35
35
|
children,
|
|
36
36
|
config,
|
|
37
37
|
dateFNSKey,
|
|
38
|
+
editViewWidth,
|
|
38
39
|
embed,
|
|
39
40
|
fallbackLang,
|
|
40
41
|
highContrastMode,
|
|
@@ -45,18 +46,21 @@ export const RootProvider = t0 => {
|
|
|
45
46
|
permissions,
|
|
46
47
|
RouterAdapter,
|
|
47
48
|
serverFunction,
|
|
49
|
+
shouldAlignEditViewHeader,
|
|
50
|
+
shouldApplyListViewMaxWidth,
|
|
48
51
|
theme,
|
|
49
52
|
translations,
|
|
53
|
+
typeSize,
|
|
50
54
|
user
|
|
51
55
|
} = t0;
|
|
52
56
|
const dndContextID = React.useId();
|
|
53
57
|
let t1;
|
|
54
|
-
if ($[0] !== RouterAdapter || $[1] !== children || $[2] !== config || $[3] !== dateFNSKey || $[4] !== dndContextID || $[5] !==
|
|
58
|
+
if ($[0] !== RouterAdapter || $[1] !== children || $[2] !== config || $[3] !== dateFNSKey || $[4] !== dndContextID || $[5] !== editViewWidth || $[6] !== embed || $[7] !== fallbackLang || $[8] !== highContrastMode || $[9] !== isNavOpen || $[10] !== languageCode || $[11] !== languageOptions || $[12] !== locale || $[13] !== permissions || $[14] !== serverFunction || $[15] !== shouldAlignEditViewHeader || $[16] !== shouldApplyListViewMaxWidth || $[17] !== theme || $[18] !== translations || $[19] !== typeSize || $[20] !== user) {
|
|
55
59
|
t1 = _jsxs(ClickOutsideProvider, {
|
|
56
|
-
children: [_jsx(
|
|
57
|
-
children: _jsx(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
children: [_jsx(RouteTransitionProvider, {
|
|
61
|
+
children: _jsx(RouterAdapter, {
|
|
62
|
+
children: _jsx(ServerFunctionsProvider, {
|
|
63
|
+
serverFunction,
|
|
60
64
|
children: _jsx(RouteCache, {
|
|
61
65
|
cachingEnabled: process.env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH === "true",
|
|
62
66
|
children: _jsx(ConfigProvider, {
|
|
@@ -87,8 +91,12 @@ export const RootProvider = t0 => {
|
|
|
87
91
|
children: [_jsx(PreferencesProvider, {
|
|
88
92
|
children: _jsx(HierarchyProvider, {
|
|
89
93
|
children: _jsx(ThemeProvider, {
|
|
94
|
+
editViewWidth,
|
|
90
95
|
highContrastMode,
|
|
96
|
+
shouldAlignEditViewHeader,
|
|
97
|
+
shouldApplyListViewMaxWidth,
|
|
91
98
|
theme,
|
|
99
|
+
typeSize,
|
|
92
100
|
children: _jsx(EmbedProvider, {
|
|
93
101
|
embed,
|
|
94
102
|
children: _jsx(LocaleProvider, {
|
|
@@ -134,21 +142,25 @@ export const RootProvider = t0 => {
|
|
|
134
142
|
$[2] = config;
|
|
135
143
|
$[3] = dateFNSKey;
|
|
136
144
|
$[4] = dndContextID;
|
|
137
|
-
$[5] =
|
|
138
|
-
$[6] =
|
|
139
|
-
$[7] =
|
|
140
|
-
$[8] =
|
|
141
|
-
$[9] =
|
|
142
|
-
$[10] =
|
|
143
|
-
$[11] =
|
|
144
|
-
$[12] =
|
|
145
|
-
$[13] =
|
|
146
|
-
$[14] =
|
|
147
|
-
$[15] =
|
|
148
|
-
$[16] =
|
|
149
|
-
$[17] =
|
|
145
|
+
$[5] = editViewWidth;
|
|
146
|
+
$[6] = embed;
|
|
147
|
+
$[7] = fallbackLang;
|
|
148
|
+
$[8] = highContrastMode;
|
|
149
|
+
$[9] = isNavOpen;
|
|
150
|
+
$[10] = languageCode;
|
|
151
|
+
$[11] = languageOptions;
|
|
152
|
+
$[12] = locale;
|
|
153
|
+
$[13] = permissions;
|
|
154
|
+
$[14] = serverFunction;
|
|
155
|
+
$[15] = shouldAlignEditViewHeader;
|
|
156
|
+
$[16] = shouldApplyListViewMaxWidth;
|
|
157
|
+
$[17] = theme;
|
|
158
|
+
$[18] = translations;
|
|
159
|
+
$[19] = typeSize;
|
|
160
|
+
$[20] = user;
|
|
161
|
+
$[21] = t1;
|
|
150
162
|
} else {
|
|
151
|
-
t1 = $[
|
|
163
|
+
t1 = $[21];
|
|
152
164
|
}
|
|
153
165
|
return t1;
|
|
154
166
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","DndContext","pointerWithin","ModalContainer","ModalProvider","ScrollInfoProvider","React","CloseModalOnRouteChange","DrawerStackProvider","LoadingOverlayProvider","NavProvider","StayLoggedInModal","StepNavProvider","ClickOutsideProvider","WindowInfoProvider","AuthProvider","ClientFunctionProvider","ConfigProvider","DocumentEventsProvider","EmbedProvider","HierarchyProvider","LocaleProvider","PreferencesProvider","RouteCache","RouteTransitionProvider","ServerFunctionsProvider","ThemeProvider","ToastContainer","TranslationProvider","UploadHandlersProvider","RootProvider","t0","$","children","config","dateFNSKey","embed","fallbackLang","highContrastMode","isNavOpen","languageCode","languageOptions","locale","permissions","RouterAdapter","serverFunction","theme","translations","user","dndContextID","useId","t1","_jsxs","_jsx","cachingEnabled","process","env","NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH","language","breakpoints","l","m","s","xs","classPrefix","transTime","zIndex","initialIsOpen","collisionDetection","id"],"sources":["../../../src/providers/Root/index.tsx"],"sourcesContent":["'use client'\nimport type { I18nClient, I18nOptions, Language } from '@payloadcms/translations'\nimport type {\n ClientConfig,\n LanguageOptions,\n Locale,\n RouterAdapterComponent,\n SanitizedPermissions,\n ServerFunctionClient,\n User,\n} from 'payload'\n\nimport { DndContext, pointerWithin } from '@dnd-kit/core'\nimport { ModalContainer, ModalProvider } from '@faceless-ui/modal'\nimport { ScrollInfoProvider } from '@faceless-ui/scroll-info'\nimport React from 'react'\n\nimport type { Theme } from '../Theme/index.js'\n\nimport { CloseModalOnRouteChange } from '../../elements/CloseModalOnRouteChange/index.js'\nimport { DrawerStackProvider } from '../../elements/Drawer/index.js'\nimport { LoadingOverlayProvider } from '../../elements/LoadingOverlay/index.js'\nimport { NavProvider } from '../../elements/Nav/context.js'\nimport { StayLoggedInModal } from '../../elements/StayLoggedIn/index.js'\nimport { StepNavProvider } from '../../elements/StepNav/index.js'\nimport { ClickOutsideProvider } from '../../providers/ClickOutside/index.js'\nimport { WindowInfoProvider } from '../../providers/WindowInfo/index.js'\nimport { AuthProvider } from '../Auth/index.js'\nimport { ClientFunctionProvider } from '../ClientFunction/index.js'\nimport { ConfigProvider } from '../Config/index.js'\nimport { DocumentEventsProvider } from '../DocumentEvents/index.js'\nimport { EmbedProvider } from '../Embed/index.js'\nimport { HierarchyProvider } from '../Hierarchy/index.js'\nimport { LocaleProvider } from '../Locale/index.js'\nimport { PreferencesProvider } from '../Preferences/index.js'\nimport { RouteCache } from '../RouteCache/index.js'\nimport { RouteTransitionProvider } from '../RouteTransition/index.js'\nimport { ServerFunctionsProvider } from '../ServerFunctions/index.js'\nimport { ThemeProvider } from '../Theme/index.js'\nimport { ToastContainer } from '../ToastContainer/index.js'\nimport { TranslationProvider } from '../Translation/index.js'\nimport { UploadHandlersProvider } from '../UploadHandlers/index.js'\n\ntype Props = {\n readonly children: React.ReactNode\n readonly config: ClientConfig\n readonly dateFNSKey: Language['dateFNSKey']\n readonly embed?: boolean\n readonly fallbackLang: I18nOptions['fallbackLanguage']\n readonly highContrastMode: boolean\n readonly isNavOpen?: boolean\n readonly languageCode: string\n readonly languageOptions: LanguageOptions\n readonly locale?: Locale['code']\n readonly permissions: SanitizedPermissions\n readonly RouterAdapter: RouterAdapterComponent\n readonly serverFunction: ServerFunctionClient\n readonly theme: Theme\n readonly translations: I18nClient['translations']\n readonly user: null | User\n}\n\nexport const RootProvider: React.FC<Props> = ({\n children,\n config,\n dateFNSKey,\n embed,\n fallbackLang,\n highContrastMode,\n isNavOpen,\n languageCode,\n languageOptions,\n locale,\n permissions,\n RouterAdapter,\n serverFunction,\n theme,\n translations,\n user,\n}) => {\n const dndContextID = React.useId()\n\n return (\n <ClickOutsideProvider>\n <RouterAdapter>\n <ServerFunctionsProvider serverFunction={serverFunction}>\n <RouteTransitionProvider>\n <RouteCache\n cachingEnabled={process.env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH === 'true'}\n >\n <ConfigProvider config={config}>\n <ClientFunctionProvider>\n <TranslationProvider\n dateFNSKey={dateFNSKey}\n fallbackLang={fallbackLang}\n language={languageCode}\n languageOptions={languageOptions}\n translations={translations}\n >\n <WindowInfoProvider\n breakpoints={{\n l: '(max-width: 1440px)',\n m: '(max-width: 1024px)',\n s: '(max-width: 768px)',\n xs: '(max-width: 400px)',\n }}\n >\n <ScrollInfoProvider>\n <ModalProvider classPrefix=\"payload\" transTime={0} zIndex=\"var(--z-modal)\">\n <DrawerStackProvider>\n <CloseModalOnRouteChange />\n <AuthProvider permissions={permissions} user={user}>\n <PreferencesProvider>\n <HierarchyProvider>\n <ThemeProvider highContrastMode={highContrastMode} theme={theme}>\n <EmbedProvider embed={embed}>\n <LocaleProvider locale={locale}>\n <StepNavProvider>\n <LoadingOverlayProvider>\n <DocumentEventsProvider>\n <NavProvider initialIsOpen={isNavOpen}>\n <UploadHandlersProvider>\n <DndContext\n collisionDetection={pointerWithin}\n // Provide stable ID to fix hydration issues: https://github.com/clauderic/dnd-kit/issues/926\n id={dndContextID}\n >\n {children}\n </DndContext>\n </UploadHandlersProvider>\n </NavProvider>\n </DocumentEventsProvider>\n </LoadingOverlayProvider>\n </StepNavProvider>\n </LocaleProvider>\n </EmbedProvider>\n </ThemeProvider>\n </HierarchyProvider>\n </PreferencesProvider>\n <ModalContainer />\n <StayLoggedInModal />\n </AuthProvider>\n </DrawerStackProvider>\n </ModalProvider>\n </ScrollInfoProvider>\n </WindowInfoProvider>\n </TranslationProvider>\n </ClientFunctionProvider>\n </ConfigProvider>\n </RouteCache>\n </RouteTransitionPro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,EACEoB,IAAA,CAAAjD,aAAA;0BAAA4D,WAAA,EAA2B;0BAAAC,SAAA;0BAAAC,MAAA,EAA+B;0BAAAjC,QAAA,EACxDmB,KAAA,CAAA5C,mBAAA;4BAAAyB,QAAA,GACEoB,IAAA,CAAA9C,uBAAA,IAAC,GACD6C,KAAA,CAAArC,YAAA;8BAAA4B,WAAA;8BAAAK,IAAA;8BAAAf,QAAA,GACEoB,IAAA,CAAA/B,mBAAA;gCAAAW,QAAA,EACEoB,IAAA,CAAAjC,iBAAA;kCAAAa,QAAA,EACEoB,IAAA,CAAA3B,aAAA;oCAAAY,gBAAA;oCAAAQ,KAAA;oCAAAb,QAAA,EACEoB,IAAA,CAAAlC,aAAA;sCAAAiB,KAAA;sCAAAH,QAAA,EACEoB,IAAA,CAAAhC,cAAA;wCAAAqB,MAAA;wCAAAT,QAAA,EACEoB,IAAA,CAAAzC,eAAA;0CAAAqB,QAAA,EACEoB,IAAA,CAAA5C,sBAAA;4CAAAwB,QAAA,EACEoB,IAAA,CAAAnC,sBAAA;8CAAAe,QAAA,EACEoB,IAAA,CAAA3C,WAAA;gDAAAyD,aAAA,EAA4B5B,SAAA;gDAAAN,QAAA,EAC1BoB,IAAA,CAAAxB,sBAAA;kDAAAI,QAAA,EACEoB,IAAA,CAAApD,UAAA;oDAAAmE,kBAAA,EAAAlE,aAAA;oDAAAmE,EAAA,EAGMpB,YAAA;oDAAAhB;kDAAA,C;;;;;;;;;;kCAc1BoB,IAAA,CAAAlD,cAAA,IAAC,GACDkD,IAAA,CAAA1C,iBAAA,IAAC;4BAAA,C;;;;;;;;;;;UAazB0C,IAAA,CAAA1B,cAAA;QAAAO;MAAA,C;;;;;;;;;;;;;;;;;;;;;;;SAtEFiB,E;CAyEJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","DndContext","pointerWithin","ModalContainer","ModalProvider","ScrollInfoProvider","React","CloseModalOnRouteChange","DrawerStackProvider","LoadingOverlayProvider","NavProvider","StayLoggedInModal","StepNavProvider","ClickOutsideProvider","WindowInfoProvider","AuthProvider","ClientFunctionProvider","ConfigProvider","DocumentEventsProvider","EmbedProvider","HierarchyProvider","LocaleProvider","PreferencesProvider","RouteCache","RouteTransitionProvider","ServerFunctionsProvider","ThemeProvider","ToastContainer","TranslationProvider","UploadHandlersProvider","RootProvider","t0","$","children","config","dateFNSKey","editViewWidth","embed","fallbackLang","highContrastMode","isNavOpen","languageCode","languageOptions","locale","permissions","RouterAdapter","serverFunction","shouldAlignEditViewHeader","shouldApplyListViewMaxWidth","theme","translations","typeSize","user","dndContextID","useId","t1","_jsxs","_jsx","cachingEnabled","process","env","NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH","language","breakpoints","l","m","s","xs","classPrefix","transTime","zIndex","initialIsOpen","collisionDetection","id"],"sources":["../../../src/providers/Root/index.tsx"],"sourcesContent":["'use client'\nimport type { I18nClient, I18nOptions, Language } from '@payloadcms/translations'\nimport type {\n ClientConfig,\n LanguageOptions,\n Locale,\n RouterAdapterComponent,\n SanitizedPermissions,\n ServerFunctionClient,\n User,\n} from 'payload'\n\nimport { DndContext, pointerWithin } from '@dnd-kit/core'\nimport { ModalContainer, ModalProvider } from '@faceless-ui/modal'\nimport { ScrollInfoProvider } from '@faceless-ui/scroll-info'\nimport React from 'react'\n\nimport type { EditViewWidth, Theme, TypeSize } from '../Theme/shared.js'\n\nimport { CloseModalOnRouteChange } from '../../elements/CloseModalOnRouteChange/index.js'\nimport { DrawerStackProvider } from '../../elements/Drawer/index.js'\nimport { LoadingOverlayProvider } from '../../elements/LoadingOverlay/index.js'\nimport { NavProvider } from '../../elements/Nav/context.js'\nimport { StayLoggedInModal } from '../../elements/StayLoggedIn/index.js'\nimport { StepNavProvider } from '../../elements/StepNav/index.js'\nimport { ClickOutsideProvider } from '../../providers/ClickOutside/index.js'\nimport { WindowInfoProvider } from '../../providers/WindowInfo/index.js'\nimport { AuthProvider } from '../Auth/index.js'\nimport { ClientFunctionProvider } from '../ClientFunction/index.js'\nimport { ConfigProvider } from '../Config/index.js'\nimport { DocumentEventsProvider } from '../DocumentEvents/index.js'\nimport { EmbedProvider } from '../Embed/index.js'\nimport { HierarchyProvider } from '../Hierarchy/index.js'\nimport { LocaleProvider } from '../Locale/index.js'\nimport { PreferencesProvider } from '../Preferences/index.js'\nimport { RouteCache } from '../RouteCache/index.js'\nimport { RouteTransitionProvider } from '../RouteTransition/index.js'\nimport { ServerFunctionsProvider } from '../ServerFunctions/index.js'\nimport { ThemeProvider } from '../Theme/index.js'\nimport { ToastContainer } from '../ToastContainer/index.js'\nimport { TranslationProvider } from '../Translation/index.js'\nimport { UploadHandlersProvider } from '../UploadHandlers/index.js'\n\ntype Props = {\n readonly children: React.ReactNode\n readonly config: ClientConfig\n readonly dateFNSKey: Language['dateFNSKey']\n readonly editViewWidth?: EditViewWidth\n readonly embed?: boolean\n readonly fallbackLang: I18nOptions['fallbackLanguage']\n readonly highContrastMode: boolean\n readonly isNavOpen?: boolean\n readonly languageCode: string\n readonly languageOptions: LanguageOptions\n readonly locale?: Locale['code']\n readonly permissions: SanitizedPermissions\n readonly RouterAdapter: RouterAdapterComponent\n readonly serverFunction: ServerFunctionClient\n readonly shouldAlignEditViewHeader?: boolean\n readonly shouldApplyListViewMaxWidth?: boolean\n readonly theme: Theme\n readonly translations: I18nClient['translations']\n readonly typeSize?: TypeSize\n readonly user: null | User\n}\n\nexport const RootProvider: React.FC<Props> = ({\n children,\n config,\n dateFNSKey,\n editViewWidth,\n embed,\n fallbackLang,\n highContrastMode,\n isNavOpen,\n languageCode,\n languageOptions,\n locale,\n permissions,\n RouterAdapter,\n serverFunction,\n shouldAlignEditViewHeader,\n shouldApplyListViewMaxWidth,\n theme,\n translations,\n typeSize,\n user,\n}) => {\n const dndContextID = React.useId()\n\n return (\n <ClickOutsideProvider>\n <RouteTransitionProvider>\n <RouterAdapter>\n <ServerFunctionsProvider serverFunction={serverFunction}>\n <RouteCache\n cachingEnabled={process.env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH === 'true'}\n >\n <ConfigProvider config={config}>\n <ClientFunctionProvider>\n <TranslationProvider\n dateFNSKey={dateFNSKey}\n fallbackLang={fallbackLang}\n language={languageCode}\n languageOptions={languageOptions}\n translations={translations}\n >\n <WindowInfoProvider\n breakpoints={{\n l: '(max-width: 1440px)',\n m: '(max-width: 1024px)',\n s: '(max-width: 768px)',\n xs: '(max-width: 400px)',\n }}\n >\n <ScrollInfoProvider>\n <ModalProvider classPrefix=\"payload\" transTime={0} zIndex=\"var(--z-modal)\">\n <DrawerStackProvider>\n <CloseModalOnRouteChange />\n <AuthProvider permissions={permissions} user={user}>\n <PreferencesProvider>\n <HierarchyProvider>\n <ThemeProvider\n editViewWidth={editViewWidth}\n highContrastMode={highContrastMode}\n shouldAlignEditViewHeader={shouldAlignEditViewHeader}\n shouldApplyListViewMaxWidth={shouldApplyListViewMaxWidth}\n theme={theme}\n typeSize={typeSize}\n >\n <EmbedProvider embed={embed}>\n <LocaleProvider locale={locale}>\n <StepNavProvider>\n <LoadingOverlayProvider>\n <DocumentEventsProvider>\n <NavProvider initialIsOpen={isNavOpen}>\n <UploadHandlersProvider>\n <DndContext\n collisionDetection={pointerWithin}\n // Provide stable ID to fix hydration issues: https://github.com/clauderic/dnd-kit/issues/926\n id={dndContextID}\n >\n {children}\n </DndContext>\n </UploadHandlersProvider>\n </NavProvider>\n </DocumentEventsProvider>\n </LoadingOverlayProvider>\n </StepNavProvider>\n </LocaleProvider>\n </EmbedProvider>\n </ThemeProvider>\n </HierarchyProvider>\n </PreferencesProvider>\n <ModalContainer />\n <StayLoggedInModal />\n </AuthProvider>\n </DrawerStackProvider>\n </ModalProvider>\n </ScrollInfoProvider>\n </WindowInfoProvider>\n </TranslationProvider>\n </ClientFunctionProvider>\n </ConfigProvider>\n </RouteCache>\n </ServerFunctionsProvider>\n </RouterAdapter>\n </RouteTransitionProvider>\n <ToastContainer config={config} />\n </ClickOutsideProvider>\n )\n}\n"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FqB,E;CAgFJ","ignoreList":[]}
|
|
@@ -46,7 +46,7 @@ export const ProgressBar = () => {
|
|
|
46
46
|
}
|
|
47
47
|
} else {
|
|
48
48
|
shouldDelayProgress.current = true;
|
|
49
|
-
setProgressToShow(
|
|
49
|
+
setProgressToShow(_temp);
|
|
50
50
|
clearTimerID = setTimeout(() => {
|
|
51
51
|
setProgressToShow(null);
|
|
52
52
|
}, transitionDuration * 2);
|
|
@@ -101,4 +101,7 @@ export const ProgressBar = () => {
|
|
|
101
101
|
}
|
|
102
102
|
return null;
|
|
103
103
|
};
|
|
104
|
+
function _temp(currentProgress) {
|
|
105
|
+
return currentProgress === null ? null : 1;
|
|
106
|
+
}
|
|
104
107
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","React","useEffect","useRef","useRouteTransition","transitionDuration","baseClass","initialDelay","ProgressBar","$","isTransitioning","transitionProgress","progressToShow","setProgressToShow","useState","shouldDelayProgress","t0","t1","clearTimerID","delayTimerID","current","clearTimeout","t2","t3","filter","Boolean","t4","join","t5","_jsx","className","style","children","width"],"sources":["../../../../src/providers/RouteTransition/ProgressBar/index.tsx"],"sourcesContent":["'use client'\nimport React, { useEffect, useRef } from 'react'\n\nimport { useRouteTransition } from '../index.js'\nimport './index.css'\n\nconst transitionDuration = 200\nconst baseClass = 'progress-bar'\nconst initialDelay = 150\n\n/**\n * Renders a progress bar that shows the progress of a route transition.\n * Place this at the root of your application, inside of the `RouteTransitionProvider`.\n * When a transition is triggered, the progress bar will show the progress of that transition and exit when the transition is complete.\n * @returns A progress bar that shows the progress of a route transition\n * @example\n * import { RouteTransitionProvider, ProgressBar, Link } from '@payloadcms/ui'\n * const App = () => (\n * <RouteTransitionProvider>\n * <ProgressBar />\n * <Link href=\"/somewhere\">Go Somewhere</Link>\n * </RouteTransitionProvider>\n */\nexport const ProgressBar = () => {\n const { isTransitioning, transitionProgress } = useRouteTransition()\n const [progressToShow, setProgressToShow] = React.useState<null | number>(null)\n const shouldDelayProgress = useRef(true)\n\n useEffect(() => {\n let clearTimerID: NodeJS.Timeout\n let delayTimerID: NodeJS.Timeout\n\n if (isTransitioning) {\n if (shouldDelayProgress.current) {\n delayTimerID = setTimeout(() => {\n setProgressToShow(transitionProgress)\n shouldDelayProgress.current = false\n }, initialDelay)\n } else {\n setProgressToShow(transitionProgress)\n }\n } else {\n shouldDelayProgress.current = true\n\n // Fast forward to 100% when the transition is complete\n // Then fade out the progress bar directly after\n setProgressToShow(1)\n\n // Wait for CSS transition to finish before hiding the progress bar\n // This includes both the fast-forward to 100% and the subsequent fade-out\n clearTimerID = setTimeout(() => {\n setProgressToShow(null)\n }, transitionDuration * 2)\n }\n\n return () => {\n clearTimeout(clearTimerID)\n clearTimeout(delayTimerID)\n }\n }, [isTransitioning, transitionProgress])\n\n if (typeof progressToShow === 'number') {\n return (\n <div\n className={[baseClass, progressToShow === 1 && `${baseClass}--fade-out`]\n .filter(Boolean)\n .join(' ')}\n style={{\n // @ts-expect-error - TS doesn't like custom CSS properties\n '--transition-duration': `${transitionDuration}ms`,\n }}\n >\n <div\n className={`${baseClass}__progress`}\n style={{\n width: `${(progressToShow || 0) * 100}%`,\n }}\n />\n </div>\n )\n }\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,OAAOC,KAAA,IAASC,SAAS,EAAEC,MAAM,QAAQ;AAEzC,SAASC,kBAAkB,QAAQ;AACnC,OAAO;AAEP,MAAMC,kBAAA,GAAqB;AAC3B,MAAMC,SAAA,GAAY;AAClB,MAAMC,YAAA,GAAe;AAErB;;;;;;;;;;;;;AAaA,OAAO,MAAMC,WAAA,GAAcA,CAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EACzB;IAAAU,eAAA;IAAAC;EAAA,IAAgDP,kBAAA;EAChD,OAAAQ,cAAA,EAAAC,iBAAA,IAA4CZ,KAAA,CAAAa,QAAA,KAA8B;EAC1E,MAAAC,mBAAA,GAA4BZ,MAAA,KAAO;EAAA,IAAAa,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAR,CAAA,QAAAC,eAAA,IAAAD,CAAA,QAAAE,kBAAA;IAEzBK,EAAA,GAAAA,CAAA;MACJE,GAAA,CAAAA,YAAA;MACAC,GAAA,CAAAA,YAAA;MAAA,IAEAT,eAAA;QAAA,IACEK,mBAAA,CAAAK,OAAA;UACFD,YAAA,CAAAA,CAAA,CAAeA,aAAA,CAAAA,EAAA,CAAAA;YACbN,iBAAA,CAAkBF,kBAAA;YAClBI,mBAAA,CAAAK,OAAA;UAAA,GAAAb,YACC;QAHH;UAKAM,iBAAA,CAAkBF,kBAAA;QAAA;MAAA;QAGpBI,mBAAA,CAAAK,OAAA;QAIAP,iBAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","React","useEffect","useRef","useRouteTransition","transitionDuration","baseClass","initialDelay","ProgressBar","$","isTransitioning","transitionProgress","progressToShow","setProgressToShow","useState","shouldDelayProgress","t0","t1","clearTimerID","delayTimerID","current","_temp","clearTimeout","t2","t3","filter","Boolean","t4","join","t5","_jsx","className","style","children","width","currentProgress"],"sources":["../../../../src/providers/RouteTransition/ProgressBar/index.tsx"],"sourcesContent":["'use client'\nimport React, { useEffect, useRef } from 'react'\n\nimport { useRouteTransition } from '../index.js'\nimport './index.css'\n\nconst transitionDuration = 200\nconst baseClass = 'progress-bar'\nconst initialDelay = 150\n\n/**\n * Renders a progress bar that shows the progress of a route transition.\n * Place this at the root of your application, inside of the `RouteTransitionProvider`.\n * When a transition is triggered, the progress bar will show the progress of that transition and exit when the transition is complete.\n * @returns A progress bar that shows the progress of a route transition\n * @example\n * import { RouteTransitionProvider, ProgressBar, Link } from '@payloadcms/ui'\n * const App = () => (\n * <RouteTransitionProvider>\n * <ProgressBar />\n * <Link href=\"/somewhere\">Go Somewhere</Link>\n * </RouteTransitionProvider>\n */\nexport const ProgressBar = () => {\n const { isTransitioning, transitionProgress } = useRouteTransition()\n const [progressToShow, setProgressToShow] = React.useState<null | number>(null)\n const shouldDelayProgress = useRef(true)\n\n useEffect(() => {\n let clearTimerID: NodeJS.Timeout\n let delayTimerID: NodeJS.Timeout\n\n if (isTransitioning) {\n if (shouldDelayProgress.current) {\n delayTimerID = setTimeout(() => {\n setProgressToShow(transitionProgress)\n shouldDelayProgress.current = false\n }, initialDelay)\n } else {\n setProgressToShow(transitionProgress)\n }\n } else {\n shouldDelayProgress.current = true\n\n // Fast forward to 100% when the transition is complete\n // Then fade out the progress bar directly after\n setProgressToShow((currentProgress) => (currentProgress === null ? null : 1))\n\n // Wait for CSS transition to finish before hiding the progress bar\n // This includes both the fast-forward to 100% and the subsequent fade-out\n clearTimerID = setTimeout(() => {\n setProgressToShow(null)\n }, transitionDuration * 2)\n }\n\n return () => {\n clearTimeout(clearTimerID)\n clearTimeout(delayTimerID)\n }\n }, [isTransitioning, transitionProgress])\n\n if (typeof progressToShow === 'number') {\n return (\n <div\n className={[baseClass, progressToShow === 1 && `${baseClass}--fade-out`]\n .filter(Boolean)\n .join(' ')}\n style={{\n // @ts-expect-error - TS doesn't like custom CSS properties\n '--transition-duration': `${transitionDuration}ms`,\n }}\n >\n <div\n className={`${baseClass}__progress`}\n style={{\n width: `${(progressToShow || 0) * 100}%`,\n }}\n />\n </div>\n )\n }\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,OAAOC,KAAA,IAASC,SAAS,EAAEC,MAAM,QAAQ;AAEzC,SAASC,kBAAkB,QAAQ;AACnC,OAAO;AAEP,MAAMC,kBAAA,GAAqB;AAC3B,MAAMC,SAAA,GAAY;AAClB,MAAMC,YAAA,GAAe;AAErB;;;;;;;;;;;;;AAaA,OAAO,MAAMC,WAAA,GAAcA,CAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EACzB;IAAAU,eAAA;IAAAC;EAAA,IAAgDP,kBAAA;EAChD,OAAAQ,cAAA,EAAAC,iBAAA,I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AAA,MAAAc,EAAA;MAAAd,CAAA,MAAAe,EAAA;IAAA;MAAAA,EAAA,GAAAf,CAAA;IAAA;IADC,MAAAkB,EAAA,GAAAH,EACD,CAAAI,IAAA,CACF;IAAA,IAAAC,EAAA;IAAA,IAAApB,CAAA,QAAAG,cAAA,IAAAH,CAAA,QAAAkB,EAAA;MAHVE,EAAA,GAAAC,IAAA,CAAC;QAAAC,SAAA,EACYJ,EAEH;QAAAK,KAAA;UAAA,yBAGmB,GAAA3B,kBAAA;QAAyB;QAAA4B,QAAA,EAGpDH,IAAA,CAAC;UAAAC,SAAA,EACY,GAAAzB,SAAA,YAAwB;UAAA0B,KAAA;YAAAE,KAAA,EAE1B,GAAG,CAACtB,cAAA,KAAkB,OAAK;UAAM;QAAA,C;;;;;;;;WAZ9CiB,E;;;CAoBN;AA5D2B,SAAAR,MAAAc,eAAA;EAAA,OAuBmBA,eAAA,SAAoB,WAAc;AAAA","ignoreList":[]}
|
|
@@ -21,6 +21,8 @@ type RouteTransitionProps = {
|
|
|
21
21
|
};
|
|
22
22
|
type StartRouteTransition = (callback?: () => void) => void;
|
|
23
23
|
type RouteTransitionContextValue = {
|
|
24
|
+
/** Keeps the transition active until the returned release function is called. */
|
|
25
|
+
holdRouteTransition: () => () => void;
|
|
24
26
|
isTransitioning: boolean;
|
|
25
27
|
startRouteTransition: StartRouteTransition;
|
|
26
28
|
transitionProgress: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/RouteTransition/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyE,MAAM,OAAO,CAAA;AAE7F;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/RouteTransition/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyE,MAAM,OAAO,CAAA;AAE7F;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqFlE,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,oBAAoB,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAE3D,KAAK,2BAA2B,GAAG;IACjC,iFAAiF;IACjF,mBAAmB,EAAE,MAAM,MAAM,IAAI,CAAA;IACrC,eAAe,EAAE,OAAO,CAAA;IACxB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAcD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,mCAA0C,CAAA"}
|