@webiny/app-admin 0.0.0-unstable.97a151f74d → 0.0.0-unstable.98511f29f1
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/assets/icons/add-18px.svg +1 -1
- package/assets/icons/arrow_drop_down-24px.svg +1 -1
- package/assets/icons/filter-24px.svg +1 -1
- package/assets/icons/highlight-24px.svg +1 -1
- package/assets/icons/info.svg +1 -1
- package/assets/icons/insert_drive_file-24px.svg +1 -1
- package/assets/icons/insert_photo-24px.svg +1 -1
- package/assets/icons/label-24px.svg +1 -1
- package/assets/icons/round-account_circle-24px.svg +1 -1
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
- package/assets/icons/round-help-24px.svg +1 -1
- package/assets/icons/round-settings-24px.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.js +10 -23
- package/base/Admin.js.map +1 -1
- package/base/Base.js +13 -48
- package/base/Base.js.map +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +5 -9
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/ApolloProvider.js +0 -5
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/TelemetryProvider.js +1 -9
- package/base/providers/TelemetryProvider.js.map +1 -1
- package/base/providers/UiStateProvider.js +0 -5
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/providers/ViewCompositionProvider.js +3 -16
- package/base/providers/ViewCompositionProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +2 -2
- package/base/ui/Brand.js +3 -7
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.js +2 -7
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +2 -2
- package/base/ui/Dashboard.js +3 -7
- package/base/ui/Dashboard.js.map +1 -1
- package/{components → base/ui}/FileManager.d.ts +7 -6
- package/base/ui/FileManager.js +70 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +2 -2
- package/base/ui/Layout.js +4 -9
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LocaleSelector.d.ts +2 -2
- package/base/ui/LocaleSelector.js +3 -7
- package/base/ui/LocaleSelector.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +1 -1
- package/base/ui/LoginScreen.js +2 -8
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +2 -2
- package/base/ui/Logo.js +4 -10
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Menu.js +2 -31
- package/base/ui/Menu.js.map +1 -1
- package/base/ui/Navigation.d.ts +3 -3
- package/base/ui/Navigation.js +16 -49
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +2 -2
- package/base/ui/NotFound.js +3 -7
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Search.d.ts +2 -2
- package/base/ui/Search.js +8 -26
- package/base/ui/Search.js.map +1 -1
- package/base/ui/Tags.js +1 -8
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/UserMenu.d.ts +7 -7
- package/base/ui/UserMenu.js +13 -37
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +1 -6
- package/components/AdminLayout.js.map +1 -1
- package/components/AppInstaller/AppInstaller.js +18 -84
- package/components/AppInstaller/AppInstaller.js.map +1 -1
- package/components/AppInstaller/Sidebar.js +11 -44
- package/components/AppInstaller/Sidebar.js.map +1 -1
- package/components/AppInstaller/index.js +0 -7
- package/components/AppInstaller/index.js.map +1 -1
- package/components/AppInstaller/styled.d.ts +17 -5
- package/components/AppInstaller/styled.js +0 -4
- package/components/AppInstaller/styled.js.map +1 -1
- package/components/AppInstaller/useInstaller.d.ts +1 -7
- package/components/AppInstaller/useInstaller.js +72 -183
- package/components/AppInstaller/useInstaller.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +20 -0
- package/components/Buttons/Buttons.js +59 -0
- package/components/Buttons/Buttons.js.map +1 -0
- package/components/Buttons/Buttons.styles.d.ts +7 -0
- package/components/Buttons/Buttons.styles.js +13 -0
- package/components/Buttons/Buttons.styles.js.map +1 -0
- package/components/Buttons/index.d.ts +2 -0
- package/components/Buttons/index.js +19 -0
- package/components/Buttons/index.js.map +1 -0
- package/components/Buttons/useButtons.d.ts +14 -0
- package/components/Buttons/useButtons.js +30 -0
- package/components/Buttons/useButtons.js.map +1 -0
- package/components/EmptyView.js +4 -12
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +15 -0
- package/components/Filters/Filters.js +28 -0
- package/components/Filters/Filters.js.map +1 -0
- package/components/Filters/Filters.styles.d.ts +15 -0
- package/components/Filters/Filters.styles.js +23 -0
- package/components/Filters/Filters.styles.js.map +1 -0
- package/components/Filters/index.d.ts +1 -0
- package/components/Filters/index.js +16 -0
- package/components/Filters/index.js.map +1 -0
- package/components/FloatingActionButton.js +2 -8
- package/components/FloatingActionButton.js.map +1 -1
- package/components/LexicalEditor/LexicalEditor.d.ts +8 -0
- package/components/LexicalEditor/LexicalEditor.js +28 -0
- package/components/LexicalEditor/LexicalEditor.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +12 -0
- package/components/LexicalEditor/index.js.map +1 -0
- package/components/MultiImageUpload.js +4 -9
- package/components/MultiImageUpload.js.map +1 -1
- package/components/OptionsMenu/OptionsMenu.d.ts +9 -0
- package/components/OptionsMenu/OptionsMenu.js +28 -0
- package/components/OptionsMenu/OptionsMenu.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.styles.d.ts +31 -0
- package/components/OptionsMenu/OptionsMenu.styles.js +14 -0
- package/components/OptionsMenu/OptionsMenu.styles.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuItem.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenuItem.js +22 -0
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -0
- package/components/OptionsMenu/index.d.ts +3 -0
- package/components/OptionsMenu/index.js +39 -0
- package/components/OptionsMenu/index.js.map +1 -0
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +11 -0
- package/components/OptionsMenu/useOptionsMenuItem.js +27 -0
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -0
- package/components/OverlayLayout/OverlayLayout.js +9 -38
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/index.js +0 -2
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/CannotUseAaclAlert.d.ts +2 -0
- package/components/Permissions/CannotUseAaclAlert.js +20 -0
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -0
- package/components/Permissions/Permissions.d.ts +2 -0
- package/components/Permissions/Permissions.js +25 -27
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/StyledComponents.js +0 -7
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +1 -0
- package/components/Permissions/index.js +10 -5
- package/components/Permissions/index.js.map +1 -1
- package/components/RichTextEditor/RichTextEditor.js +0 -7
- package/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/components/RichTextEditor/index.js +0 -2
- package/components/RichTextEditor/index.js.map +1 -1
- package/components/RichTextEditor/tools/header/index.js +62 -112
- package/components/RichTextEditor/tools/header/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/index.js +15 -43
- package/components/RichTextEditor/tools/image/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -1
- package/components/RichTextEditor/tools/image/tunes.js +5 -27
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -1
- package/components/RichTextEditor/tools/image/ui.js +16 -45
- package/components/RichTextEditor/tools/image/ui.js.map +1 -1
- package/components/RichTextEditor/tools/paragraph/index.js +65 -92
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -1
- package/components/RichTextEditor/tools/textColor/index.js +15 -51
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -1
- package/components/RichTextEditor/tools/utils.js +4 -6
- package/components/RichTextEditor/tools/utils.js.map +1 -1
- package/components/Routes.js +6 -13
- package/components/Routes.js.map +1 -1
- package/components/SearchUI.d.ts +1 -0
- package/components/SearchUI.js +14 -14
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.js +3 -32
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.js +0 -1
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +2 -0
- package/components/SimpleUI/InputField.js +16 -30
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +1 -1
- package/components/SingleImageUpload.js +14 -30
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.js +5 -24
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.js +0 -1
- package/components/SplitView/index.js.map +1 -1
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -2
- package/components/index.js.map +1 -1
- package/hooks/useConfirmationDialog.d.ts +5 -3
- package/hooks/useConfirmationDialog.js +16 -22
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.js +1 -4
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useSnackbar.js +0 -5
- package/hooks/useSnackbar.js.map +1 -1
- package/index.d.ts +10 -5
- package/index.js +71 -64
- package/index.js.map +1 -1
- package/package.json +36 -46
- package/plugins/MenuPlugin.js +0 -17
- package/plugins/MenuPlugin.js.map +1 -1
- package/plugins/PermissionRendererPlugin.js +0 -17
- package/plugins/PermissionRendererPlugin.js.map +1 -1
- package/plugins/globalSearch/SearchBar.js +16 -61
- package/plugins/globalSearch/SearchBar.js.map +1 -1
- package/plugins/globalSearch/SearchBarDropdown.js +15 -33
- package/plugins/globalSearch/SearchBarDropdown.js.map +1 -1
- package/plugins/globalSearch/index.js.map +1 -1
- package/plugins/globalSearch/styled.d.ts +13 -4
- package/plugins/globalSearch/styled.js +1 -5
- package/plugins/globalSearch/styled.js.map +1 -1
- package/plugins/uiLayoutRenderer/index.js +2 -16
- package/plugins/uiLayoutRenderer/index.js.map +1 -1
- package/styles/theme.scss +31 -1
- package/types.d.ts +34 -27
- package/types.js.map +1 -1
- package/ui/UIElement.js +0 -1
- package/ui/UIElement.js.map +1 -1
- package/ui/UILayout.js +0 -1
- package/ui/UILayout.js.map +1 -1
- package/ui/UIRenderer.js +0 -1
- package/ui/UIRenderer.js.map +1 -1
- package/ui/UIView.js +0 -1
- package/ui/UIView.js.map +1 -1
- package/ui/elements/AccordionElement.js +2 -28
- package/ui/elements/AccordionElement.js.map +1 -1
- package/ui/elements/ButtonElement.js +2 -21
- package/ui/elements/ButtonElement.js.map +1 -1
- package/ui/elements/ButtonGroupElement.js +0 -19
- package/ui/elements/ButtonGroupElement.js.map +1 -1
- package/ui/elements/GenericElement.js +0 -2
- package/ui/elements/GenericElement.js.map +1 -1
- package/ui/elements/LabelElement.js +0 -14
- package/ui/elements/LabelElement.js.map +1 -1
- package/ui/elements/NavigationMenuElement.js +7 -40
- package/ui/elements/NavigationMenuElement.js.map +1 -1
- package/ui/elements/PanelElement.js +0 -11
- package/ui/elements/PanelElement.js.map +1 -1
- package/ui/elements/PlaceholderElement.js +0 -11
- package/ui/elements/PlaceholderElement.js.map +1 -1
- package/ui/elements/SmallButtonElement.js +0 -19
- package/ui/elements/SmallButtonElement.js.map +1 -1
- package/ui/elements/TypographyElement.js +0 -19
- package/ui/elements/TypographyElement.js.map +1 -1
- package/ui/elements/ViewElement.js +0 -2
- package/ui/elements/ViewElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -16
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement.js +11 -34
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +0 -15
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +5 -27
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +4 -23
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +23 -16
- package/ui/elements/form/FileManagerElement/styled.js +1 -6
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -1
- package/ui/elements/form/FileManagerElement.js +0 -23
- package/ui/elements/form/FileManagerElement.js.map +1 -1
- package/ui/elements/form/FormElement.js +0 -21
- package/ui/elements/form/FormElement.js.map +1 -1
- package/ui/elements/form/FormFieldElement.js +0 -33
- package/ui/elements/form/FormFieldElement.js.map +1 -1
- package/ui/elements/form/HiddenElement.js +0 -17
- package/ui/elements/form/HiddenElement.js.map +1 -1
- package/ui/elements/form/InputElement.js +0 -18
- package/ui/elements/form/InputElement.js.map +1 -1
- package/ui/elements/form/PasswordElement.js +0 -15
- package/ui/elements/form/PasswordElement.js.map +1 -1
- package/ui/elements/form/SelectElement.js +1 -19
- package/ui/elements/form/SelectElement.js.map +1 -1
- package/ui/elements/form/TextareaElement.js +0 -17
- package/ui/elements/form/TextareaElement.js.map +1 -1
- package/ui/views/AdminView/ContentElement.js +1 -25
- package/ui/views/AdminView/ContentElement.js.map +1 -1
- package/ui/views/AdminView/HeaderElement.js +3 -43
- package/ui/views/AdminView/HeaderElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -20
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -20
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +0 -20
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -1
- package/ui/views/AdminView/components/Dialog.js +13 -24
- package/ui/views/AdminView/components/Dialog.js.map +1 -1
- package/ui/views/AdminView/components/Hamburger.js +2 -10
- package/ui/views/AdminView/components/Hamburger.js.map +1 -1
- package/ui/views/AdminView/components/Snackbar.js +3 -12
- package/ui/views/AdminView/components/Snackbar.js.map +1 -1
- package/ui/views/FormView/FormContainerElement.js +0 -21
- package/ui/views/FormView/FormContainerElement.js.map +1 -1
- package/ui/views/FormView/FormContentElement.js +0 -11
- package/ui/views/FormView/FormContentElement.js.map +1 -1
- package/ui/views/FormView/FormFooterElement.js +0 -19
- package/ui/views/FormView/FormFooterElement.js.map +1 -1
- package/ui/views/FormView/FormHeaderElement.js +2 -24
- package/ui/views/FormView/FormHeaderElement.js.map +1 -1
- package/ui/views/FormView.js +0 -41
- package/ui/views/FormView.js.map +1 -1
- package/ui/views/OverlayView/ContentElement.js +0 -19
- package/ui/views/OverlayView/ContentElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderElement.js +4 -27
- package/ui/views/OverlayView/HeaderElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderTitleElement.js +0 -22
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -1
- package/ui/views/OverlayView/useOverlayView.js +3 -13
- package/ui/views/OverlayView/useOverlayView.js.map +1 -1
- package/ui/views/OverlayView.js +6 -42
- package/ui/views/OverlayView.js.map +1 -1
- package/ui/views/SplitView/SplitViewPanelElement.js +2 -22
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -1
- package/ui/views/SplitView.js +0 -42
- package/ui/views/SplitView.js.map +1 -1
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -55
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -60
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
- package/components/FileManager/BottomInfoBar.d.ts +0 -5
- package/components/FileManager/BottomInfoBar.js +0 -60
- package/components/FileManager/BottomInfoBar.js.map +0 -1
- package/components/FileManager/DropFilesHere.d.ts +0 -10
- package/components/FileManager/DropFilesHere.js +0 -76
- package/components/FileManager/DropFilesHere.js.map +0 -1
- package/components/FileManager/File.d.ts +0 -17
- package/components/FileManager/File.js +0 -155
- package/components/FileManager/File.js.map +0 -1
- package/components/FileManager/FileDetails/Name.d.ts +0 -8
- package/components/FileManager/FileDetails/Name.js +0 -138
- package/components/FileManager/FileDetails/Name.js.map +0 -1
- package/components/FileManager/FileDetails/Tags.d.ts +0 -10
- package/components/FileManager/FileDetails/Tags.js +0 -339
- package/components/FileManager/FileDetails/Tags.js.map +0 -1
- package/components/FileManager/FileDetails.d.ts +0 -24
- package/components/FileManager/FileDetails.js +0 -474
- package/components/FileManager/FileDetails.js.map +0 -1
- package/components/FileManager/FileManagerContext.d.ts +0 -42
- package/components/FileManager/FileManagerContext.js +0 -224
- package/components/FileManager/FileManagerContext.js.map +0 -1
- package/components/FileManager/FileManagerView.d.ts +0 -18
- package/components/FileManager/FileManagerView.js +0 -728
- package/components/FileManager/FileManagerView.js.map +0 -1
- package/components/FileManager/LeftSidebar.d.ts +0 -10
- package/components/FileManager/LeftSidebar.js +0 -127
- package/components/FileManager/LeftSidebar.js.map +0 -1
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -87
- package/components/FileManager/NoPermissionView.js.map +0 -1
- package/components/FileManager/NoResults.d.ts +0 -3
- package/components/FileManager/NoResults.js +0 -28
- package/components/FileManager/NoResults.js.map +0 -1
- package/components/FileManager/getFileTypePlugin.d.ts +0 -4
- package/components/FileManager/getFileTypePlugin.js +0 -57
- package/components/FileManager/getFileTypePlugin.js.map +0 -1
- package/components/FileManager/getFileUploader.d.ts +0 -3
- package/components/FileManager/getFileUploader.js +0 -20
- package/components/FileManager/getFileUploader.js.map +0 -1
- package/components/FileManager/graphql.d.ts +0 -96
- package/components/FileManager/graphql.js +0 -58
- package/components/FileManager/graphql.js.map +0 -1
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -7
- package/components/FileManager/outputFileSelectionError.js +0 -54
- package/components/FileManager/outputFileSelectionError.js.map +0 -1
- package/components/FileManager/types.d.ts +0 -21
- package/components/FileManager/types.js +0 -5
- package/components/FileManager/types.js.map +0 -1
- package/components/FileManager.js +0 -144
- package/components/FileManager.js.map +0 -1
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -63
- package/plugins/FileManagerFileTypePlugin.js.map +0 -1
- package/plugins/fileManager/fileDefault.d.ts +0 -2
- package/plugins/fileManager/fileDefault.js +0 -34
- package/plugins/fileManager/fileDefault.js.map +0 -1
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -83
- package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
- package/plugins/fileManager/fileImage/EditAction.js +0 -179
- package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
- package/plugins/fileManager/fileImage/index.d.ts +0 -2
- package/plugins/fileManager/fileImage/index.js +0 -46
- package/plugins/fileManager/fileImage/index.js.map +0 -1
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -21
- package/plugins/fileManager/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SimpleFormContainer","styled","position","margin","header","css","borderBottom","color","title","display","alignItems","actions","justifyContent","icon","marginRight","footer","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_styled","_interopRequireDefault","_emotion","_classnames","_Grid","_Typography","_Elevation","_Icon","SimpleFormContainer","styled","target","label","position","margin","header","css","borderBottom","color","title","display","alignItems","actions","justifyContent","icon","marginRight","footer","SimpleForm","props","createElement","className","classNames","noElevation","children","Elevation","z","exports","SimpleFormHeader","Grid","Cell","span","Fragment","Icon","Typography","use","SimpleFormFooter","SimpleFormContent"],"sources":["SimpleForm.tsx"],"sourcesContent":["import * as React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { Elevation } from \"@webiny/ui/Elevation\";\nimport { Icon } from \"@webiny/ui/Icon\";\n\nconst SimpleFormContainer = styled(\"div\")({\n position: \"relative\",\n margin: \"17px 50px\"\n});\n\nconst header = css({\n borderBottom: \"1px solid var(--mdc-theme-on-background)\",\n color: \"var(--mdc-theme-text-primary-on-background)\"\n});\n\nconst title = css({\n display: \"flex\",\n alignItems: \"center\"\n});\n\nconst actions = css({\n display: \"flex\",\n justifyContent: \"flex-end\",\n alignItems: \"center\"\n});\n\nconst icon = css({\n marginRight: 15,\n color: \"var(--mdc-theme-text-primary-on-background)\"\n});\n\nconst footer = css`\n display: flex;\n justify-content: flex-end;\n flex-wrap: wrap;\n border-top: 1px solid var(--mdc-theme-on-background);\n padding: 24px;\n box-sizing: border-box;\n min-height: 52px;\n button:last-of-type {\n margin-left: 8px;\n }\n`;\n\ninterface SimpleFormProps {\n children: React.ReactNode;\n \"data-testid\"?: string;\n noElevation?: boolean;\n className?: string;\n}\nexport const SimpleForm: React.FC<SimpleFormProps> = props => {\n return (\n <SimpleFormContainer\n className={classNames(\"webiny-data-list\", props.className)}\n data-testid={props[\"data-testid\"]}\n >\n {props.noElevation ? props.children : <Elevation z={1}>{props.children}</Elevation>}\n </SimpleFormContainer>\n );\n};\n\ninterface SimpleFormHeaderProps {\n title: React.ReactNode;\n icon?: React.ReactElement<any>;\n children?: React.ReactNode;\n}\nexport const SimpleFormHeader: React.FC<SimpleFormHeaderProps> = props => {\n return (\n <Grid className={header}>\n <Cell span={props.children ? 6 : 12} className={title}>\n <React.Fragment>\n {props.icon && <Icon className={icon} icon={props.icon} />}\n <Typography use=\"headline5\">{props.title}</Typography>\n </React.Fragment>\n </Cell>\n {props.children && (\n <Cell span={6} className={actions}>\n {props.children}\n </Cell>\n )}\n </Grid>\n );\n};\n\ninterface SimpleFormFooterProps {\n children: React.ReactNode;\n className?: string;\n}\nexport const SimpleFormFooter: React.FC<SimpleFormFooterProps> = props => {\n return <div className={classNames(footer, props.className)}>{props.children}</div>;\n};\n\nexport const SimpleFormContent: React.FC = props => {\n return props.children as unknown as React.ReactElement;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAEA,IAAMS,mBAAmB,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;E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ACxB,KAAA,CAAAkC,IAAI;IAACC,IAAI,EAAEZ,KAAK,CAACK,QAAQ,GAAG,CAAC,GAAG,EAAG;IAACH,SAAS,EAAEX;EAAM,gBAClDrB,KAAA,CAAA+B,aAAA,CAAC/B,KAAK,CAAC2C,QAAQ,QACVb,KAAK,CAACJ,IAAI,iBAAI1B,KAAA,CAAA+B,aAAA,CAACrB,KAAA,CAAAkC,IAAI;IAACZ,SAAS,EAAEN,IAAK;IAACA,IAAI,EAAEI,KAAK,CAACJ;EAAK,CAAE,CAAC,eAC1D1B,KAAA,CAAA+B,aAAA,CAACvB,WAAA,CAAAqC,UAAU;IAACC,GAAG,EAAC;EAAW,GAAEhB,KAAK,CAACT,KAAkB,CACzC,CACd,CAAC,EACNS,KAAK,CAACK,QAAQ,iBACXnC,KAAA,CAAA+B,aAAA,CAACxB,KAAA,CAAAkC,IAAI;IAACC,IAAI,EAAE,CAAE;IAACV,SAAS,EAAER;EAAQ,GAC7BM,KAAK,CAACK,QACL,CAER,CAAC;AAEf,CAAC;AAACG,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAMK,IAAMQ,gBAAiD,GAAG,SAApDA,gBAAiDA,CAAGjB,KAAK,EAAI;EACtE,oBAAO9B,KAAA,CAAA+B,aAAA;IAAKC,SAAS,EAAE,IAAAC,mBAAU,EAACL,MAAM,EAAEE,KAAK,CAACE,SAAS;EAAE,GAAEF,KAAK,CAACK,QAAc,CAAC;AACtF,CAAC;AAACG,OAAA,CAAAS,gBAAA,GAAAA,gBAAA;AAEK,IAAMC,iBAA2B,GAAG,SAA9BA,iBAA2BA,CAAGlB,KAAK,EAAI;EAChD,OAAOA,KAAK,CAACK,QAAQ;AACzB,CAAC;AAACG,OAAA,CAAAU,iBAAA,GAAAA,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { SimpleForm, SimpleFormHeader, SimpleFormFooter, SimpleFormContent } from \"./SimpleForm\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_SimpleForm","require"],"sources":["index.ts"],"sourcesContent":["export { SimpleForm, SimpleFormHeader, SimpleFormFooter, SimpleFormContent } from \"./SimpleForm\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="web" />
|
|
1
2
|
import React from "react";
|
|
2
3
|
interface InputBoxProps {
|
|
3
4
|
value?: string | number;
|
|
4
5
|
onChange?: (value: any) => void;
|
|
6
|
+
onKeyDown?: (e: React.SyntheticEvent<HTMLInputElement>) => any;
|
|
5
7
|
defaultValue?: string | number;
|
|
6
8
|
type?: "string" | "number";
|
|
7
9
|
[key: string]: any;
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _emotion = require("emotion");
|
|
15
|
-
|
|
16
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
12
|
var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
19
|
-
|
|
20
13
|
var _Typography = require("@webiny/ui/Typography");
|
|
21
|
-
|
|
22
14
|
var _FormElementMessage = require("@webiny/ui/FormElementMessage");
|
|
23
|
-
|
|
24
|
-
var _excluded = ["className", "value", "onChange", "label", "description", "validation", "defaultValue"];
|
|
15
|
+
var _excluded = ["className", "value", "onChange", "onKeyDown", "label", "description", "validation", "defaultValue"];
|
|
25
16
|
var inputStyle = /*#__PURE__*/(0, _emotion.css)({
|
|
26
17
|
boxSizing: "border-box",
|
|
27
18
|
border: "1px solid var(--mdc-theme-on-background)",
|
|
@@ -62,32 +53,29 @@ var labelStyle = /*#__PURE__*/(0, _emotion.css)({
|
|
|
62
53
|
color: "var(--mdc-theme-text-primary-on-background)"
|
|
63
54
|
}
|
|
64
55
|
}, "label:labelStyle;");
|
|
65
|
-
|
|
66
56
|
var getValue = function getValue(params) {
|
|
67
57
|
var value = params.value,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
58
|
+
defaultValue = params.defaultValue,
|
|
59
|
+
type = params.type;
|
|
71
60
|
if (type === "number") {
|
|
72
61
|
return isNaN(value) ? defaultValue : value;
|
|
73
62
|
}
|
|
74
|
-
|
|
75
63
|
return value || defaultValue;
|
|
76
64
|
};
|
|
77
|
-
|
|
78
65
|
var InputField = function InputField(_ref) {
|
|
79
66
|
var className = _ref.className,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
67
|
+
value = _ref.value,
|
|
68
|
+
_onChange = _ref.onChange,
|
|
69
|
+
onKeyDown = _ref.onKeyDown,
|
|
70
|
+
label = _ref.label,
|
|
71
|
+
description = _ref.description,
|
|
72
|
+
_ref$validation = _ref.validation,
|
|
73
|
+
validation = _ref$validation === void 0 ? {
|
|
74
|
+
isValid: true
|
|
75
|
+
} : _ref$validation,
|
|
76
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
77
|
+
defaultValue = _ref$defaultValue === void 0 ? "" : _ref$defaultValue,
|
|
78
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
91
79
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, label && /*#__PURE__*/_react.default.createElement("div", {
|
|
92
80
|
className: labelStyle
|
|
93
81
|
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
@@ -99,18 +87,16 @@ var InputField = function InputField(_ref) {
|
|
|
99
87
|
type: props.type || "string",
|
|
100
88
|
defaultValue: defaultValue
|
|
101
89
|
}),
|
|
90
|
+
onKeyDown: onKeyDown,
|
|
102
91
|
onChange: function onChange(ev) {
|
|
103
92
|
if (!_onChange) {
|
|
104
93
|
return;
|
|
105
94
|
}
|
|
106
|
-
|
|
107
95
|
_onChange((ev.target.value || "").toLowerCase());
|
|
108
96
|
}
|
|
109
97
|
}, (0, _omit.default)(props, "validate"))), validation.isValid === false && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, {
|
|
110
98
|
error: true
|
|
111
99
|
}, validation.message), validation.isValid !== false && description && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description));
|
|
112
100
|
};
|
|
113
|
-
|
|
114
101
|
var _default = /*#__PURE__*/_react.default.memo(InputField);
|
|
115
|
-
|
|
116
102
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["inputStyle","css","boxSizing","border","width","height","padding","textAlign","minHeight","backgroundColor","transition","opacity","cursor","WebkitAppearance","margin","labelStyle","marginBottom","color","getValue","params","value","defaultValue","type","isNaN","InputField","className","onChange","label","description","validation","isValid","props","classNames","ev","target","toLowerCase","omit","message","React","memo"],"sources":["InputField.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\n\nconst inputStyle = css({\n boxSizing: \"border-box\",\n border: \"1px solid var(--mdc-theme-on-background)\",\n width: \"100%\",\n height: \"100%\",\n padding: \"4px 8px\",\n textAlign: \"left\",\n minHeight: 32,\n backgroundColor: \"var(--mdc-theme-surface)\",\n transition: \"150ms all ease-in-out\",\n \"&:focus:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:hover:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:disabled\": {\n opacity: 0.5,\n cursor: \"not-allowed\"\n },\n\n \"&.text-center\": {\n textAlign: \"center\",\n padding: 4\n },\n\n \"&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n },\n \"&::-webkit-outer-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n }\n});\n\nconst labelStyle = css({\n marginBottom: 8,\n padding: \"0px 8px\",\n \"& span\": {\n color: \"var(--mdc-theme-text-primary-on-background)\"\n }\n});\n\ninterface GetValueParams {\n value: string | number | undefined;\n defaultValue: string | number;\n type: \"number\" | \"string\";\n}\nconst getValue = (params: GetValueParams): string => {\n const { value, defaultValue, type } = params;\n if (type === \"number\") {\n return (isNaN(value as number) ? defaultValue : value) as string;\n }\n return (value || defaultValue) as string;\n};\n\ninterface InputBoxProps {\n value?: string | number;\n onChange?: (value: any) => void;\n defaultValue?: string | number;\n type?: \"string\" | \"number\";\n [key: string]: any;\n}\nconst InputField: React.FC<InputBoxProps> = ({\n className,\n value,\n onChange,\n label,\n description,\n validation = { isValid: true },\n defaultValue = \"\",\n ...props\n}) => {\n return (\n <React.Fragment>\n {label && (\n <div className={labelStyle}>\n <Typography use={\"body2\"}>{label}</Typography>\n </div>\n )}\n <input\n className={classNames(inputStyle, className)}\n value={getValue({\n value,\n type: props.type || \"string\",\n defaultValue\n })}\n onChange={ev => {\n if (!onChange) {\n return;\n }\n onChange((ev.target.value || \"\").toLowerCase());\n }}\n {...omit(props, \"validate\")}\n />\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </React.Fragment>\n );\n};\n\nexport default React.memo(InputField);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_emotion","_classnames","_omit","_Typography","_FormElementMessage","_excluded","inputStyle","css","boxSizing","border","width","height","padding","textAlign","minHeight","backgroundColor","transition","opacity","cursor","WebkitAppearance","margin","labelStyle","marginBottom","color","getValue","params","value","defaultValue","type","isNaN","InputField","_ref","className","onChange","onKeyDown","label","description","_ref$validation","validation","isValid","_ref$defaultValue","props","_objectWithoutProperties2","default","createElement","Fragment","Typography","use","Object","assign","classNames","ev","target","toLowerCase","omit","FormElementMessage","error","message","_default","React","memo","exports"],"sources":["InputField.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\n\nconst inputStyle = css({\n boxSizing: \"border-box\",\n border: \"1px solid var(--mdc-theme-on-background)\",\n width: \"100%\",\n height: \"100%\",\n padding: \"4px 8px\",\n textAlign: \"left\",\n minHeight: 32,\n backgroundColor: \"var(--mdc-theme-surface)\",\n transition: \"150ms all ease-in-out\",\n \"&:focus:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:hover:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:disabled\": {\n opacity: 0.5,\n cursor: \"not-allowed\"\n },\n\n \"&.text-center\": {\n textAlign: \"center\",\n padding: 4\n },\n\n \"&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n },\n \"&::-webkit-outer-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n }\n});\n\nconst labelStyle = css({\n marginBottom: 8,\n padding: \"0px 8px\",\n \"& span\": {\n color: \"var(--mdc-theme-text-primary-on-background)\"\n }\n});\n\ninterface GetValueParams {\n value: string | number | undefined;\n defaultValue: string | number;\n type: \"number\" | \"string\";\n}\nconst getValue = (params: GetValueParams): string => {\n const { value, defaultValue, type } = params;\n if (type === \"number\") {\n return (isNaN(value as number) ? defaultValue : value) as string;\n }\n return (value || defaultValue) as string;\n};\n\ninterface InputBoxProps {\n value?: string | number;\n onChange?: (value: any) => void;\n onKeyDown?: (e: React.SyntheticEvent<HTMLInputElement>) => any;\n defaultValue?: string | number;\n type?: \"string\" | \"number\";\n [key: string]: any;\n}\nconst InputField: React.FC<InputBoxProps> = ({\n className,\n value,\n onChange,\n onKeyDown,\n label,\n description,\n validation = { isValid: true },\n defaultValue = \"\",\n ...props\n}) => {\n return (\n <React.Fragment>\n {label && (\n <div className={labelStyle}>\n <Typography use={\"body2\"}>{label}</Typography>\n </div>\n )}\n <input\n className={classNames(inputStyle, className)}\n value={getValue({\n value,\n type: props.type || \"string\",\n defaultValue\n })}\n onKeyDown={onKeyDown}\n onChange={ev => {\n if (!onChange) {\n return;\n }\n onChange((ev.target.value || \"\").toLowerCase());\n }}\n {...omit(props, \"validate\")}\n />\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </React.Fragment>\n );\n};\n\nexport default React.memo(InputField);\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAAmE,IAAAM,SAAA;AAEnE,IAAMC,UAAU,gBAAG,IAAAC,YAAG,EAAC;EACnBC,SAAS,EAAE,YAAY;EACvBC,MAAM,EAAE,0CAA0C;EAClDC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,MAAM;EACjBC,SAAS,EAAE,EAAE;EACbC,eAAe,EAAE,0BAA0B;EAC3CC,UAAU,EAAE,uBAAuB;EACnC,wBAA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kB;IAACC,KAAK;EAAA,GAAElB,UAAU,CAACmB,OAA4B,CACrE,EACAnB,UAAU,CAACC,OAAO,KAAK,KAAK,IAAIH,WAAW,iBACxCvC,MAAA,CAAA8C,OAAA,CAAAC,aAAA,CAACxC,mBAAA,CAAAmD,kBAAkB,QAAEnB,WAAgC,CAE7C,CAAC;AAEzB,CAAC;AAAC,IAAAsB,QAAA,gBAEaC,cAAK,CAACC,IAAI,CAAC9B,UAAU,CAAC;AAAA+B,OAAA,CAAAlB,OAAA,GAAAe,QAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { FileManagerFileItem } from "
|
|
2
|
+
import { FileManagerFileItem } from "../index";
|
|
3
3
|
import { FormComponentProps } from "@webiny/ui/types";
|
|
4
4
|
export interface SingleImageUploadProps extends FormComponentProps {
|
|
5
5
|
/**
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _Image = require("@webiny/app/components/Image");
|
|
15
|
-
|
|
16
11
|
var Ui = _interopRequireWildcard(require("@webiny/ui/ImageUpload"));
|
|
17
|
-
|
|
18
|
-
var _FileManager = require("./FileManager");
|
|
19
|
-
|
|
12
|
+
var _ = require("./..");
|
|
20
13
|
var _FormElementMessage = require("@webiny/ui/FormElementMessage");
|
|
21
|
-
|
|
22
14
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
23
|
-
|
|
24
15
|
var ImageUploadWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
25
16
|
target: "ek1tjbh0",
|
|
26
17
|
label: "ImageUploadWrapper"
|
|
@@ -40,29 +31,25 @@ var ImageUploadWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
|
40
31
|
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
41
32
|
}
|
|
42
33
|
});
|
|
43
|
-
|
|
44
34
|
var SingleImageUpload = function SingleImageUpload(props) {
|
|
45
35
|
var className = props.className,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
value = props.value,
|
|
37
|
+
validation = props.validation,
|
|
38
|
+
label = props.label,
|
|
39
|
+
description = props.description,
|
|
40
|
+
accept = props.accept,
|
|
41
|
+
_props$includeFileMet = props.includeFileMeta,
|
|
42
|
+
includeFileMeta = _props$includeFileMet === void 0 ? false : _props$includeFileMet,
|
|
43
|
+
maxSize = props.maxSize,
|
|
44
|
+
imagePreviewProps = props.imagePreviewProps,
|
|
45
|
+
round = props.round;
|
|
57
46
|
var _ref = validation || {},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
validationIsValid = _ref.isValid,
|
|
48
|
+
validationMessage = _ref.message;
|
|
61
49
|
var onChange = (0, React.useCallback)(function (value) {
|
|
62
50
|
if (!props.onChange) {
|
|
63
51
|
return;
|
|
64
52
|
}
|
|
65
|
-
|
|
66
53
|
if (value && !includeFileMeta) {
|
|
67
54
|
props.onChange({
|
|
68
55
|
id: value.id,
|
|
@@ -70,19 +57,17 @@ var SingleImageUpload = function SingleImageUpload(props) {
|
|
|
70
57
|
});
|
|
71
58
|
return;
|
|
72
59
|
}
|
|
73
|
-
|
|
74
60
|
if (value && includeFileMeta) {
|
|
75
61
|
props.onChange(value);
|
|
76
62
|
return;
|
|
77
63
|
}
|
|
78
|
-
|
|
79
64
|
props.onChange(null);
|
|
80
65
|
}, [props.onChange]);
|
|
81
66
|
return /*#__PURE__*/React.createElement(ImageUploadWrapper, {
|
|
82
67
|
className: className
|
|
83
68
|
}, label && /*#__PURE__*/React.createElement("div", {
|
|
84
69
|
className: "mdc-floating-label mdc-floating-label--float-above"
|
|
85
|
-
}, label), /*#__PURE__*/React.createElement(
|
|
70
|
+
}, label), /*#__PURE__*/React.createElement(_.FileManager, {
|
|
86
71
|
onChange: onChange,
|
|
87
72
|
accept: accept,
|
|
88
73
|
images: !accept,
|
|
@@ -109,6 +94,5 @@ var SingleImageUpload = function SingleImageUpload(props) {
|
|
|
109
94
|
error: true
|
|
110
95
|
}, validationMessage), validationIsValid !== false && description && /*#__PURE__*/React.createElement(_FormElementMessage.FormElementMessage, null, description));
|
|
111
96
|
};
|
|
112
|
-
|
|
113
97
|
var _default = SingleImageUpload;
|
|
114
98
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ImageUploadWrapper","styled","position","opacity","pointerEvents","transform","top","left","color","SingleImageUpload","props","className","value","validation","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_Image","Ui","_","_FormElementMessage","_styled","_interopRequireDefault","ImageUploadWrapper","styled","target","label","position","opacity","pointerEvents","transform","top","left","color","SingleImageUpload","props","className","value","validation","description","accept","_props$includeFileMet","includeFileMeta","maxSize","imagePreviewProps","round","_ref","validationIsValid","isValid","validationMessage","message","onChange","useCallback","id","src","createElement","FileManager","images","render","_ref2","showFileManager","Image","renderImagePreview","renderImageProps","Object","assign","style","width","height","uploadImage","removeImage","FormElementMessage","error","_default","exports","default"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Image } from \"@webiny/app/components/Image\";\nimport * as Ui from \"@webiny/ui/ImageUpload\";\nimport { FileManager, FileManagerFileItem } from \"~/index\";\nimport { FormComponentProps } from \"@webiny/ui/types\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\nimport styled from \"@emotion/styled\";\nimport { useCallback } from \"react\";\n\nconst ImageUploadWrapper = styled(\"div\")({\n position: \"relative\",\n \".disabled\": {\n opacity: 0.75,\n pointerEvents: \"none\"\n },\n \".mdc-floating-label--float-above\": {\n transform: \"scale(0.75)\",\n top: 10,\n left: 10,\n color: \"var(--mdc-theme-text-secondary-on-background)\"\n },\n \".mdc-text-field-helper-text\": {\n color: \"var(--mdc-theme-text-secondary-on-background)\"\n }\n});\n\nexport interface SingleImageUploadProps extends FormComponentProps {\n /**\n * Accept types\n */\n accept?: string[];\n\n /**\n * Component label.\n */\n label?: string;\n\n /**\n * Is component disabled?\n */\n disabled?: boolean;\n\n /**\n * Description beneath the image.\n */\n description?: React.ReactNode;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * Define file's max allowed size (default is \"10mb\").\n * Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n */\n maxSize?: number | string;\n\n /**\n * onChange callback when a file is set or unset.\n * It is marked as `optional` because this component is often used in conjunction with <Bind>, which injects the\n * `onChange` into its child element. In that case, that prop is not passed by the developer.\n */\n onChange?: (value: FileManagerFileItem | null) => void;\n\n /**\n * Optional custom props, passed to the preview image.\n */\n imagePreviewProps?: any;\n\n /**\n * By default, file meta is not included in the data passed to `onChange`. If you need it, set this flag to true.\n */\n includeFileMeta?: boolean;\n\n /**\n * Is the wrapper round?\n */\n round?: boolean;\n\n /**\n * Define the properties that are returned on file(s) selection.\n * @deprecated Pick the desired file attributes in the `onChange` callback, or `beforeChange` on the `<Bind>` element.\n */\n onChangePick?: string[];\n}\n\nconst SingleImageUpload: React.FC<SingleImageUploadProps> = props => {\n const {\n className,\n value,\n validation,\n label,\n description,\n accept,\n includeFileMeta = false,\n maxSize,\n imagePreviewProps,\n round\n } = props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n const onChange = useCallback(\n (value: FileManagerFileItem | null) => {\n if (!props.onChange) {\n return;\n }\n\n if (value && !includeFileMeta) {\n props.onChange({ id: value.id, src: value.src });\n return;\n }\n\n if (value && includeFileMeta) {\n props.onChange(value);\n return;\n }\n\n props.onChange(null);\n },\n [props.onChange]\n );\n\n return (\n <ImageUploadWrapper className={className}>\n {label && (\n <div className=\"mdc-floating-label mdc-floating-label--float-above\">{label}</div>\n )}\n\n <FileManager\n onChange={onChange}\n accept={accept}\n images={!accept}\n maxSize={maxSize}\n render={({ showFileManager }) => (\n <Ui.Image\n renderImagePreview={renderImageProps => (\n <Image {...renderImageProps} {...imagePreviewProps} />\n )}\n style={{ width: \"100%\", height: \"auto\" }}\n value={value}\n uploadImage={showFileManager}\n removeImage={() => onChange(null)}\n round={round}\n />\n )}\n />\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </ImageUploadWrapper>\n );\n};\n\nexport default SingleImageUpload;\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,CAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AAGA,IAAMO,kBAAkB,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EACrCC,QAAQ,EAAE,UAAU;EACpB,WAAW,EAAE;IACTC,OAAO,EAAE,IAAI;IACbC,aAAa,EAAE;EACnB,CAAC;EACD,kCAAkC,EAAE;IAChCC,SAAS,EAAE,aAAa;IACxBC,GAAG,EAAE,EAAE;IACPC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE;EACX,CAAC;EACD,6BAA6B,EAAE;IAC3BA,KAAK,EAAE;EACX;AACJ,CAAC,CAAC;AA+DF,IAAMC,iBAAmD,GAAG,S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
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.leftPanel = exports.SplitView = exports.RightPanel = exports.LeftPanel = void 0;
|
|
11
|
-
|
|
12
|
-
var _clone2 = _interopRequireDefault(require("lodash/clone"));
|
|
13
|
-
|
|
14
9
|
var React = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
11
|
var _Grid = require("@webiny/ui/Grid");
|
|
19
|
-
|
|
20
12
|
var _emotion = require("emotion");
|
|
21
|
-
|
|
22
13
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
23
|
-
|
|
14
|
+
var _clone = _interopRequireDefault(require("lodash/clone"));
|
|
24
15
|
var _Helpers = require("@webiny/ui/Helpers");
|
|
25
|
-
|
|
26
16
|
var grid = /*#__PURE__*/(0, _emotion.css)({
|
|
27
17
|
"&.mdc-layout-grid": {
|
|
28
18
|
padding: 0,
|
|
19
|
+
margin: "-3px auto 0 auto",
|
|
29
20
|
backgroundColor: "var(--mdc-theme-background)",
|
|
30
21
|
">.mdc-layout-grid__inner": {
|
|
31
22
|
gridGap: 0
|
|
@@ -58,38 +49,28 @@ var leftPanel = /*#__PURE__*/(0, _emotion.css)({
|
|
|
58
49
|
}
|
|
59
50
|
}, "label:leftPanel;");
|
|
60
51
|
exports.leftPanel = leftPanel;
|
|
61
|
-
|
|
62
52
|
var SplitView = function SplitView(props) {
|
|
63
53
|
return /*#__PURE__*/React.createElement(_Grid.Grid, {
|
|
64
54
|
className: (0, _classnames.default)(grid, props.className, "webiny-split-view")
|
|
65
55
|
}, props.children);
|
|
66
56
|
};
|
|
67
|
-
|
|
68
57
|
exports.SplitView = SplitView;
|
|
69
|
-
|
|
70
58
|
var LeftPanel = function LeftPanel(props) {
|
|
71
|
-
var propList = (0,
|
|
72
|
-
|
|
59
|
+
var propList = (0, _clone.default)(props);
|
|
73
60
|
if (!propList.hasOwnProperty("span")) {
|
|
74
61
|
propList.span = 5;
|
|
75
62
|
}
|
|
76
|
-
|
|
77
63
|
return /*#__PURE__*/React.createElement(_Grid.Cell, (0, _Helpers.getClasses)(propList, (0, _classnames.default)(leftPanel, props.className, "webiny-split-view__left-panel")), propList.children);
|
|
78
64
|
};
|
|
79
|
-
|
|
80
65
|
exports.LeftPanel = LeftPanel;
|
|
81
|
-
|
|
82
66
|
var RightPanel = function RightPanel(props) {
|
|
83
|
-
var propList = (0,
|
|
84
|
-
|
|
67
|
+
var propList = (0, _clone.default)(props);
|
|
85
68
|
if (!propList.hasOwnProperty("span")) {
|
|
86
69
|
propList.span = 7;
|
|
87
70
|
}
|
|
88
|
-
|
|
89
71
|
return /*#__PURE__*/React.createElement(_Grid.Cell, (0, _Helpers.getClasses)(propList, "webiny-split-view__right-panel"), /*#__PURE__*/React.createElement(RightPanelWrapper, {
|
|
90
72
|
className: "webiny-split-view__right-panel-wrapper",
|
|
91
73
|
id: "webiny-split-view-right-panel"
|
|
92
74
|
}, propList.children));
|
|
93
75
|
};
|
|
94
|
-
|
|
95
76
|
exports.RightPanel = RightPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["grid","css","padding","backgroundColor","gridGap","RightPanelWrapper","styled","overflow","height","leftPanel","display","flexDirection","maxHeight","SplitView","props","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Grid","_emotion","_styled","_clone","_Helpers","grid","css","padding","margin","backgroundColor","gridGap","RightPanelWrapper","styled","target","label","overflow","height","leftPanel","display","flexDirection","maxHeight","exports","SplitView","props","createElement","Grid","className","classSet","children","LeftPanel","propList","clone","hasOwnProperty","span","Cell","getClasses","RightPanel","id"],"sources":["SplitView.tsx"],"sourcesContent":["import * as React from \"react\";\nimport classSet from \"classnames\";\nimport { Cell, Grid, CellProps } from \"@webiny/ui/Grid\";\nimport { css } from \"emotion\";\nimport styled from \"@emotion/styled\";\nimport clone from \"lodash/clone\";\nimport { getClasses } from \"@webiny/ui/Helpers\";\n\nconst grid = css({\n \"&.mdc-layout-grid\": {\n padding: 0,\n margin: \"-3px auto 0 auto\",\n backgroundColor: \"var(--mdc-theme-background)\",\n \">.mdc-layout-grid__inner\": {\n gridGap: 0\n }\n }\n});\n\nconst RightPanelWrapper = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n overflow: \"auto\",\n height: \"calc(100vh - 70px)\"\n});\n\nexport const leftPanel = css({\n backgroundColor: \"var(--mdc-theme-surface)\",\n \">.webiny-data-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100vh - 70px)\",\n \".mdc-list\": {\n overflow: \"auto\"\n }\n },\n \">.mdc-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n maxHeight: \"calc(100vh - 70px)\",\n overflow: \"auto\"\n }\n});\n\ninterface SplitViewProps {\n children: React.ReactElement<any> | React.ReactElement<any>[];\n className?: string;\n}\n\nconst SplitView: React.FC<SplitViewProps> = props => {\n return (\n <Grid className={classSet(grid, props.className, \"webiny-split-view\")}>\n {props.children}\n </Grid>\n );\n};\n\nconst LeftPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 5;\n }\n\n return (\n <Cell\n {...getClasses(\n propList,\n classSet(leftPanel, props.className, \"webiny-split-view__left-panel\")\n )}\n >\n {propList.children}\n </Cell>\n );\n};\n\nconst RightPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 7;\n }\n\n return (\n <Cell {...getClasses(propList, \"webiny-split-view__right-panel\")}>\n <RightPanelWrapper\n className={\"webiny-split-view__right-panel-wrapper\"}\n id={\"webiny-split-view-right-panel\"}\n >\n {propList.children}\n </RightPanelWrapper>\n </Cell>\n );\n};\n\nexport { SplitView, LeftPanel, RightPanel };\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAEA,IAAMQ,IAAI,gBAAG,IAAAC,YAAG,EAAC;EACb,mBAAmB,EAAE;IACjBC,OAAO,EAAE,CAAC;IACVC,MAAM,EAAE,kBAAkB;IAC1BC,eAAe,EAAE,6BAA6B;IAC9C,0BAA0B,EAAE;MACxBC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC,gBAAC;AAEF,IAAMC,iBAAiB,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EACpCL,eAAe,EAAE,6BAA6B;EAC9CM,QAAQ,EAAE,MAAM;EAChBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEK,IAAMC,SAAS,gBAAG,IAAAX,YAAG,EAAC;EACzBG,eAAe,EAAE,0BAA0B;EAC3C,oBAAoB,EAAE;IAClBS,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBH,MAAM,EAAE,oBAAoB;IAC5B,WAAW,EAAE;MACTD,QAAQ,EAAE;IACd;EACJ,CAAC;EACD,YAAY,EAAE;IACVG,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBC,SAAS,EAAE,oBAAoB;IAC/BL,QAAQ,EAAE;EACd;AACJ,C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de,SAAS,EAAE,wCAAyC;IACpDW,EAAE,EAAE;EAAgC,GAEnCP,QAAQ,CAACF,QACK,CACjB,CAAC;AAEf,CAAC;AAACP,OAAA,CAAAe,UAAA,GAAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { SplitView, LeftPanel, RightPanel } from \"./SplitView\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_SplitView","require"],"sources":["index.ts"],"sourcesContent":["export { SplitView, LeftPanel, RightPanel } from \"./SplitView\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA"}
|
package/components/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FileManager } from "
|
|
1
|
+
export { FileManager } from "../base/ui/FileManager";
|
package/components/index.js
CHANGED
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"
|
|
1
|
+
{"version":3,"names":["_FileManager","require"],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager\";\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA"}
|
|
@@ -4,10 +4,12 @@ interface Params {
|
|
|
4
4
|
message?: React.ReactNode;
|
|
5
5
|
acceptLabel?: React.ReactNode;
|
|
6
6
|
cancelLabel?: React.ReactNode;
|
|
7
|
+
loading?: React.ReactNode;
|
|
7
8
|
[key: string]: any;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
export declare type ShowConfirmationOnAccept = (() => void) | (() => Promise<void>);
|
|
11
|
+
export interface UseConfirmationDialogResponse {
|
|
12
|
+
showConfirmation: (onAccept: ShowConfirmationOnAccept, onCancel?: () => void) => void;
|
|
11
13
|
}
|
|
12
|
-
declare const useConfirmationDialog: ({ title, message, acceptLabel, cancelLabel, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
14
|
+
declare const useConfirmationDialog: ({ title, message, acceptLabel, cancelLabel, loading, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
13
15
|
export { useConfirmationDialog };
|
|
@@ -1,47 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.useConfirmationDialog = void 0;
|
|
9
|
-
|
|
10
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
16
12
|
var _useUi = require("@webiny/app/hooks/useUi");
|
|
17
|
-
|
|
18
13
|
var _i18n = require("@webiny/app/i18n");
|
|
19
|
-
|
|
14
|
+
var _Progress = require("@webiny/ui/Progress");
|
|
20
15
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
21
|
-
|
|
22
|
-
var _excluded = ["title", "message", "acceptLabel", "cancelLabel"];
|
|
23
|
-
|
|
16
|
+
var _excluded = ["title", "message", "acceptLabel", "cancelLabel", "loading"];
|
|
24
17
|
var t = _i18n.i18n.ns("app-admin/hooks/use-confirmation-dialog");
|
|
25
|
-
|
|
26
18
|
var useConfirmationDialog = function useConfirmationDialog() {
|
|
27
19
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
var _ref$title = _ref.title,
|
|
21
|
+
title = _ref$title === void 0 ? t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Confirmation"]))) : _ref$title,
|
|
22
|
+
message = _ref.message,
|
|
23
|
+
_ref$acceptLabel = _ref.acceptLabel,
|
|
24
|
+
acceptLabel = _ref$acceptLabel === void 0 ? t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Confirm"]))) : _ref$acceptLabel,
|
|
25
|
+
_ref$cancelLabel = _ref.cancelLabel,
|
|
26
|
+
cancelLabel = _ref$cancelLabel === void 0 ? t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Cancel"]))) : _ref$cancelLabel,
|
|
27
|
+
_ref$loading = _ref.loading,
|
|
28
|
+
loading = _ref$loading === void 0 ? /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, null) : _ref$loading,
|
|
29
|
+
options = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
30
|
var ui = (0, _useUi.useUi)();
|
|
37
31
|
return {
|
|
38
32
|
showConfirmation: function showConfirmation(onAccept, onCancel) {
|
|
39
33
|
ui.setState(function (ui) {
|
|
40
34
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ui), {}, {
|
|
41
35
|
dialog: {
|
|
42
|
-
message: message || t(
|
|
36
|
+
message: message || t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Are you sure you want to continue?"]))),
|
|
43
37
|
options: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, options), {}, {
|
|
44
|
-
title: title
|
|
38
|
+
title: title,
|
|
39
|
+
loading: loading,
|
|
45
40
|
actions: {
|
|
46
41
|
accept: {
|
|
47
42
|
label: acceptLabel,
|
|
@@ -59,5 +54,4 @@ var useConfirmationDialog = function useConfirmationDialog() {
|
|
|
59
54
|
}
|
|
60
55
|
};
|
|
61
56
|
};
|
|
62
|
-
|
|
63
57
|
exports.useConfirmationDialog = useConfirmationDialog;
|