@webiny/app-admin 0.0.0-mt-1
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/LICENSE +21 -0
- package/README.md +21 -0
- package/assets/icons/add-18px.svg +3 -0
- package/assets/icons/arrow_drop_down-24px.svg +4 -0
- package/assets/icons/attach_file_black_24dp.svg +1 -0
- package/assets/icons/baseline-menu-24px.svg +4 -0
- package/assets/icons/baseline-notification_important-24px.svg +4 -0
- package/assets/icons/baseline-security-24px.svg +4 -0
- package/assets/icons/filter-24px.svg +8 -0
- package/assets/icons/github-brands.svg +1 -0
- package/assets/icons/highlight-24px.svg +1 -0
- package/assets/icons/icon-community.svg +16 -0
- package/assets/icons/icon-documentation.svg +16 -0
- package/assets/icons/info.svg +1 -0
- package/assets/icons/insert_drive_file-24px.svg +1 -0
- package/assets/icons/insert_photo-24px.svg +1 -0
- package/assets/icons/label-24px.svg +1 -0
- package/assets/icons/round-account_circle-24px.svg +1 -0
- package/assets/icons/round-add-24px.svg +16 -0
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -0
- package/assets/icons/round-chevron_right-24px.svg +12 -0
- package/assets/icons/round-feedback-24px.svg +54 -0
- package/assets/icons/round-help-24px.svg +1 -0
- package/assets/icons/round-invert_colors-24px.svg +52 -0
- package/assets/icons/round-keyboard_arrow_down-24px.svg +16 -0
- package/assets/icons/round-keyboard_arrow_up-24px.svg +16 -0
- package/assets/icons/round-lock_open-24px.svg +60 -0
- package/assets/icons/round-more_vert-24px.svg +12 -0
- package/assets/icons/round-open_in_new-24px.svg +44 -0
- package/assets/icons/round-settings-24px.svg +4 -0
- package/assets/icons/search-24px.svg +20 -0
- package/assets/icons/slack-logo.svg +1 -0
- package/assets/icons/today-24px.svg +1 -0
- package/assets/icons/touch_app.svg +1 -0
- package/assets/images/arr.png +0 -0
- package/assets/images/arr_2.png +0 -0
- package/assets/images/header_bg.jpg +0 -0
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/logo_orange.png +0 -0
- package/assets/images/public/bg-login.png +0 -0
- package/assets/images/public/favicon.ico +0 -0
- package/assets/images/public/logo_orange.png +0 -0
- package/assets/images/public/preloader_2.png +0 -0
- package/assets/images/swich.png +0 -0
- package/assets/images/table_img.jpg +0 -0
- package/assets/images/webiny-logo.svg +20 -0
- package/assets/images/webiny-orange-logo.svg +20 -0
- package/components/AdminLayout.d.ts +7 -0
- package/components/AdminLayout.js +35 -0
- package/components/AppInstaller/Sidebar.d.ts +7 -0
- package/components/AppInstaller/Sidebar.js +158 -0
- package/components/AppInstaller/assets/sign-in-divider.svg +19 -0
- package/components/AppInstaller/index.d.ts +5 -0
- package/components/AppInstaller/index.js +134 -0
- package/components/AppInstaller/styled.d.ts +7 -0
- package/components/AppInstaller/styled.js +73 -0
- package/components/AppInstaller/useInstaller.d.ts +11 -0
- package/components/AppInstaller/useInstaller.js +279 -0
- package/components/EmptyView.d.ts +8 -0
- package/components/EmptyView.js +56 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +5 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +35 -0
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +5 -0
- package/components/FileManager/BottomInfoBar/UploadStatus.js +47 -0
- package/components/FileManager/BottomInfoBar.d.ts +3 -0
- package/components/FileManager/BottomInfoBar.js +42 -0
- package/components/FileManager/DropFilesHere.d.ts +8 -0
- package/components/FileManager/DropFilesHere.js +58 -0
- package/components/FileManager/File.d.ts +18 -0
- package/components/FileManager/File.js +129 -0
- package/components/FileManager/FileDetails/Name.d.ts +6 -0
- package/components/FileManager/FileDetails/Name.js +113 -0
- package/components/FileManager/FileDetails/Tags.d.ts +6 -0
- package/components/FileManager/FileDetails/Tags.js +241 -0
- package/components/FileManager/FileDetails.d.ts +23 -0
- package/components/FileManager/FileDetails.js +392 -0
- package/components/FileManager/FileManagerContext.d.ts +23 -0
- package/components/FileManager/FileManagerContext.js +174 -0
- package/components/FileManager/FileManagerView.d.ts +23 -0
- package/components/FileManager/FileManagerView.js +632 -0
- package/components/FileManager/LeftSidebar.d.ts +8 -0
- package/components/FileManager/LeftSidebar.js +95 -0
- package/components/FileManager/NoPermissionView.d.ts +3 -0
- package/components/FileManager/NoPermissionView.js +70 -0
- package/components/FileManager/NoResults.d.ts +2 -0
- package/components/FileManager/NoResults.js +13 -0
- package/components/FileManager/getFileTypePlugin.d.ts +1 -0
- package/components/FileManager/getFileTypePlugin.js +27 -0
- package/components/FileManager/getFileUploader.d.ts +2 -0
- package/components/FileManager/getFileUploader.js +10 -0
- package/components/FileManager/graphql.d.ts +6 -0
- package/components/FileManager/graphql.js +17 -0
- package/components/FileManager/icons/content_copy-black-24px.svg +1 -0
- package/components/FileManager/icons/delete.svg +12 -0
- package/components/FileManager/icons/privacy_tip-24px.svg +10 -0
- package/components/FileManager/icons/round-check_box-24px.svg +4 -0
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +4 -0
- package/components/FileManager/icons/round-cloud_download-24px.svg +4 -0
- package/components/FileManager/icons/round-cloud_upload-24px.svg +4 -0
- package/components/FileManager/icons/round-description-24px.svg +4 -0
- package/components/FileManager/icons/round-edit-24px.svg +4 -0
- package/components/FileManager/icons/round-info-24px.svg +4 -0
- package/components/FileManager/icons/round-label-24px.svg +4 -0
- package/components/FileManager/icons/round-more_vert-24px.svg +4 -0
- package/components/FileManager/icons/round-search-24px.svg +20 -0
- package/components/FileManager/outputFileSelectionError.d.ts +2 -0
- package/components/FileManager/outputFileSelectionError.js +39 -0
- package/components/FileManager.d.ts +18 -0
- package/components/FileManager.js +133 -0
- package/components/FloatingActionButton.d.ts +3 -0
- package/components/FloatingActionButton.js +17 -0
- package/components/MultiImageUpload.d.ts +4 -0
- package/components/MultiImageUpload.js +20 -0
- package/components/OverlayLayout/OverlayLayout.d.ts +25 -0
- package/components/OverlayLayout/OverlayLayout.js +159 -0
- package/components/OverlayLayout/icons/close.svg +13 -0
- package/components/OverlayLayout/icons/navigate_before.svg +16 -0
- package/components/OverlayLayout/index.d.ts +1 -0
- package/components/OverlayLayout/index.js +1 -0
- package/components/Permissions/Permissions.d.ts +7 -0
- package/components/Permissions/Permissions.js +37 -0
- package/components/Permissions/StyledComponents.d.ts +6 -0
- package/components/Permissions/StyledComponents.js +19 -0
- package/components/Permissions/index.d.ts +2 -0
- package/components/Permissions/index.js +2 -0
- package/components/RichTextEditor/RichTextEditor.d.ts +3 -0
- package/components/RichTextEditor/RichTextEditor.js +15 -0
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/RichTextEditor/index.js +2 -0
- package/components/RichTextEditor/styles.scss +64 -0
- package/components/RichTextEditor/tools/header/index.d.ts +228 -0
- package/components/RichTextEditor/tools/header/index.js +731 -0
- package/components/RichTextEditor/tools/header/styles.scss +48 -0
- package/components/RichTextEditor/tools/image/index.d.ts +97 -0
- package/components/RichTextEditor/tools/image/index.js +257 -0
- package/components/RichTextEditor/tools/image/styles.scss +90 -0
- package/components/RichTextEditor/tools/image/svgs.d.ts +6 -0
- package/components/RichTextEditor/tools/image/svgs.js +5 -0
- package/components/RichTextEditor/tools/image/tunes.d.ts +58 -0
- package/components/RichTextEditor/tools/image/tunes.js +134 -0
- package/components/RichTextEditor/tools/image/ui.d.ts +111 -0
- package/components/RichTextEditor/tools/image/ui.js +281 -0
- package/components/RichTextEditor/tools/paragraph/index.d.ts +211 -0
- package/components/RichTextEditor/tools/paragraph/index.js +520 -0
- package/components/RichTextEditor/tools/paragraph/styles.scss +29 -0
- package/components/RichTextEditor/tools/textColor/index.d.ts +58 -0
- package/components/RichTextEditor/tools/textColor/index.js +232 -0
- package/components/RichTextEditor/tools/textColor/styles.scss +21 -0
- package/components/RichTextEditor/tools/utils.d.ts +19 -0
- package/components/RichTextEditor/tools/utils.js +24 -0
- package/components/SearchUI.d.ts +8 -0
- package/components/SearchUI.js +59 -0
- package/components/SimpleForm/SimpleForm.d.ts +21 -0
- package/components/SimpleForm/SimpleForm.js +75 -0
- package/components/SimpleForm/index.d.ts +1 -0
- package/components/SimpleForm/index.js +1 -0
- package/components/SimpleUI/InputField.d.ts +9 -0
- package/components/SimpleUI/InputField.js +97 -0
- package/components/SingleImageUpload.d.ts +25 -0
- package/components/SingleImageUpload.js +102 -0
- package/components/SplitView/SplitView.d.ts +10 -0
- package/components/SplitView/SplitView.js +76 -0
- package/components/SplitView/index.d.ts +1 -0
- package/components/SplitView/index.js +1 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/hooks/useConfirmationDialog.d.ts +10 -0
- package/hooks/useConfirmationDialog.js +47 -0
- package/hooks/useDialog.d.ts +5 -0
- package/hooks/useDialog.js +27 -0
- package/hooks/useSnackbar.d.ts +4 -0
- package/hooks/useSnackbar.js +25 -0
- package/package.json +101 -0
- package/plugins/FileManagerFileTypePlugin.d.ts +33 -0
- package/plugins/FileManagerFileTypePlugin.js +46 -0
- package/plugins/MenuPlugin.d.ts +20 -0
- package/plugins/MenuPlugin.js +41 -0
- package/plugins/PermissionRendererPlugin.d.ts +22 -0
- package/plugins/PermissionRendererPlugin.js +41 -0
- package/plugins/fileManager/fileDefault.d.ts +3 -0
- package/plugins/fileManager/fileDefault.js +20 -0
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +3 -0
- package/plugins/fileManager/fileImage/DeleteAction.js +62 -0
- package/plugins/fileManager/fileImage/EditAction.d.ts +9 -0
- package/plugins/fileManager/fileImage/EditAction.js +143 -0
- package/plugins/fileManager/fileImage/index.d.ts +3 -0
- package/plugins/fileManager/fileImage/index.js +29 -0
- package/plugins/fileManager/icons/edit.svg +17 -0
- package/plugins/fileManager/icons/round-description-24px.svg +1 -0
- package/plugins/fileManager/index.d.ts +2 -0
- package/plugins/fileManager/index.js +3 -0
- package/plugins/globalSearch/SearchBar.d.ts +3 -0
- package/plugins/globalSearch/SearchBar.js +241 -0
- package/plugins/globalSearch/SearchBarDropdown.d.ts +5 -0
- package/plugins/globalSearch/SearchBarDropdown.js +82 -0
- package/plugins/globalSearch/icons/round-search-24px.svg +20 -0
- package/plugins/globalSearch/index.d.ts +8 -0
- package/plugins/globalSearch/index.js +30 -0
- package/plugins/globalSearch/styled.d.ts +9 -0
- package/plugins/globalSearch/styled.js +115 -0
- package/plugins/index.d.ts +6 -0
- package/plugins/index.js +8 -0
- package/plugins/logo/Logo.d.ts +22 -0
- package/plugins/logo/Logo.js +108 -0
- package/plugins/logo/index.d.ts +5 -0
- package/plugins/logo/index.js +32 -0
- package/plugins/menu/documentation.d.ts +4 -0
- package/plugins/menu/documentation.js +16 -0
- package/plugins/menu/fileManager.d.ts +4 -0
- package/plugins/menu/fileManager.js +64 -0
- package/plugins/menu/index.d.ts +6 -0
- package/plugins/menu/index.js +24 -0
- package/plugins/menu/renderers/MenuGroupRenderer.d.ts +7 -0
- package/plugins/menu/renderers/MenuGroupRenderer.js +126 -0
- package/plugins/menu/renderers/MenuLinkRenderer.d.ts +7 -0
- package/plugins/menu/renderers/MenuLinkRenderer.js +52 -0
- package/plugins/menu/renderers/MenuSectionItemRenderer.d.ts +7 -0
- package/plugins/menu/renderers/MenuSectionItemRenderer.js +77 -0
- package/plugins/menu/renderers/MenuSectionRenderer.d.ts +7 -0
- package/plugins/menu/renderers/MenuSectionRenderer.js +51 -0
- package/plugins/menu/slack.d.ts +4 -0
- package/plugins/menu/slack.js +16 -0
- package/plugins/menu/source.d.ts +4 -0
- package/plugins/menu/source.js +16 -0
- package/plugins/uiLayoutRenderer/index.d.ts +3 -0
- package/plugins/uiLayoutRenderer/index.js +63 -0
- package/plugins/userMenu/UserMenuElement.d.ts +7 -0
- package/plugins/userMenu/UserMenuElement.js +43 -0
- package/plugins/userMenu/UserMenuRenderer.d.ts +6 -0
- package/plugins/userMenu/UserMenuRenderer.js +47 -0
- package/plugins/userMenu/index.d.ts +4 -0
- package/plugins/userMenu/index.js +16 -0
- package/styles/material-theme-assignments.scss +333 -0
- package/styles/material.scss +74 -0
- package/styles/theme.scss +43 -0
- package/styles.scss +2 -0
- package/types.d.ts +100 -0
- package/types.js +1 -0
- package/ui/UIElement.d.ts +2 -0
- package/ui/UIElement.js +1 -0
- package/ui/UILayout.d.ts +1 -0
- package/ui/UILayout.js +1 -0
- package/ui/UIRenderer.d.ts +2 -0
- package/ui/UIRenderer.js +1 -0
- package/ui/UIView.d.ts +2 -0
- package/ui/UIView.js +1 -0
- package/ui/elements/AccordionElement.d.ts +27 -0
- package/ui/elements/AccordionElement.js +86 -0
- package/ui/elements/ButtonElement.d.ts +24 -0
- package/ui/elements/ButtonElement.js +78 -0
- package/ui/elements/ButtonGroupElement.d.ts +6 -0
- package/ui/elements/ButtonGroupElement.js +48 -0
- package/ui/elements/GenericElement.d.ts +1 -0
- package/ui/elements/GenericElement.js +1 -0
- package/ui/elements/LabelElement.d.ts +16 -0
- package/ui/elements/LabelElement.js +47 -0
- package/ui/elements/NavigationMenuElement.d.ts +32 -0
- package/ui/elements/NavigationMenuElement.js +158 -0
- package/ui/elements/PanelElement.d.ts +3 -0
- package/ui/elements/PanelElement.js +17 -0
- package/ui/elements/PlaceholderElement.d.ts +5 -0
- package/ui/elements/PlaceholderElement.js +30 -0
- package/ui/elements/SmallButtonElement.d.ts +6 -0
- package/ui/elements/SmallButtonElement.js +47 -0
- package/ui/elements/TypographyElement.d.ts +13 -0
- package/ui/elements/TypographyElement.js +49 -0
- package/ui/elements/ViewElement.d.ts +1 -0
- package/ui/elements/ViewElement.js +1 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +6 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +44 -0
- package/ui/elements/form/DynamicFieldsetElement.d.ts +42 -0
- package/ui/elements/form/DynamicFieldsetElement.js +127 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.d.ts +4 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +24 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +7 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +72 -0
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +13 -0
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +95 -0
- package/ui/elements/form/FileManagerElement/styled.d.ts +14 -0
- package/ui/elements/form/FileManagerElement/styled.js +106 -0
- package/ui/elements/form/FileManagerElement.d.ts +24 -0
- package/ui/elements/form/FileManagerElement.js +91 -0
- package/ui/elements/form/FormElement.d.ts +21 -0
- package/ui/elements/form/FormElement.js +45 -0
- package/ui/elements/form/FormFieldElement.d.ts +55 -0
- package/ui/elements/form/FormFieldElement.js +183 -0
- package/ui/elements/form/HiddenElement.d.ts +6 -0
- package/ui/elements/form/HiddenElement.js +49 -0
- package/ui/elements/form/InputElement.d.ts +6 -0
- package/ui/elements/form/InputElement.js +55 -0
- package/ui/elements/form/PasswordElement.d.ts +6 -0
- package/ui/elements/form/PasswordElement.js +50 -0
- package/ui/elements/form/README.md +2 -0
- package/ui/elements/form/SelectElement.d.ts +15 -0
- package/ui/elements/form/SelectElement.js +71 -0
- package/ui/elements/form/TextareaElement.d.ts +15 -0
- package/ui/elements/form/TextareaElement.js +56 -0
- package/ui/views/AdminView/ContentElement.d.ts +4 -0
- package/ui/views/AdminView/ContentElement.js +62 -0
- package/ui/views/AdminView/HeaderElement.d.ts +13 -0
- package/ui/views/AdminView/HeaderElement.js +111 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +6 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.js +42 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +6 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.js +42 -0
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +6 -0
- package/ui/views/AdminView/HeaderSectionRightElement.js +42 -0
- package/ui/views/AdminView/components/Dialog.d.ts +2 -0
- package/ui/views/AdminView/components/Dialog.js +40 -0
- package/ui/views/AdminView/components/Hamburger.d.ts +3 -0
- package/ui/views/AdminView/components/Hamburger.js +25 -0
- package/ui/views/AdminView/components/Snackbar.d.ts +3 -0
- package/ui/views/AdminView/components/Snackbar.js +28 -0
- package/ui/views/AdminView.d.ts +12 -0
- package/ui/views/AdminView.js +90 -0
- package/ui/views/FormView/FormContainerElement.d.ts +12 -0
- package/ui/views/FormView/FormContainerElement.js +51 -0
- package/ui/views/FormView/FormContentElement.d.ts +3 -0
- package/ui/views/FormView/FormContentElement.js +17 -0
- package/ui/views/FormView/FormFooterElement.d.ts +6 -0
- package/ui/views/FormView/FormFooterElement.js +49 -0
- package/ui/views/FormView/FormHeaderElement.d.ts +14 -0
- package/ui/views/FormView/FormHeaderElement.js +81 -0
- package/ui/views/FormView.d.ts +40 -0
- package/ui/views/FormView.js +160 -0
- package/ui/views/NavigationView/ContentElement.d.ts +10 -0
- package/ui/views/NavigationView/ContentElement.js +86 -0
- package/ui/views/NavigationView/FooterElement.d.ts +13 -0
- package/ui/views/NavigationView/FooterElement.js +57 -0
- package/ui/views/NavigationView/HeaderElement.d.ts +16 -0
- package/ui/views/NavigationView/HeaderElement.js +66 -0
- package/ui/views/NavigationView/NavigationViewRenderer.d.ts +6 -0
- package/ui/views/NavigationView/NavigationViewRenderer.js +38 -0
- package/ui/views/NavigationView/Styled.d.ts +7 -0
- package/ui/views/NavigationView/Styled.js +47 -0
- package/ui/views/NavigationView/legacyMenu.d.ts +22 -0
- package/ui/views/NavigationView/legacyMenu.js +1 -0
- package/ui/views/NavigationView/useNavigation.d.ts +6 -0
- package/ui/views/NavigationView/useNavigation.js +22 -0
- package/ui/views/NavigationView.d.ts +26 -0
- package/ui/views/NavigationView.js +204 -0
- package/ui/views/OverlayView/ContentElement.d.ts +6 -0
- package/ui/views/OverlayView/ContentElement.js +42 -0
- package/ui/views/OverlayView/HeaderElement.d.ts +24 -0
- package/ui/views/OverlayView/HeaderElement.js +115 -0
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +13 -0
- package/ui/views/OverlayView/HeaderTitleElement.js +54 -0
- package/ui/views/OverlayView/useOverlayView.d.ts +6 -0
- package/ui/views/OverlayView/useOverlayView.js +38 -0
- package/ui/views/OverlayView.d.ts +31 -0
- package/ui/views/OverlayView.js +176 -0
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +11 -0
- package/ui/views/SplitView/SplitViewPanelElement.js +72 -0
- package/ui/views/SplitView.d.ts +21 -0
- package/ui/views/SplitView.js +142 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Image } from "@webiny/app/components/Image";
|
|
8
|
+
import * as Ui from "@webiny/ui/ImageUpload";
|
|
9
|
+
import { FileManager } from "./FileManager";
|
|
10
|
+
import { FormElementMessage } from "@webiny/ui/FormElementMessage";
|
|
11
|
+
import styled from "@emotion/styled";
|
|
12
|
+
var ImageUploadWrapper = /*#__PURE__*/styled("div", {
|
|
13
|
+
target: "ek1tjbh0",
|
|
14
|
+
label: "ImageUploadWrapper"
|
|
15
|
+
})({
|
|
16
|
+
position: "relative",
|
|
17
|
+
".disabled": {
|
|
18
|
+
opacity: 0.75,
|
|
19
|
+
pointerEvents: "none"
|
|
20
|
+
},
|
|
21
|
+
".mdc-floating-label--float-above": {
|
|
22
|
+
transform: "scale(0.75)",
|
|
23
|
+
top: 10,
|
|
24
|
+
left: 10,
|
|
25
|
+
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
26
|
+
},
|
|
27
|
+
".mdc-text-field-helper-text": {
|
|
28
|
+
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var SingleImageUpload = /*#__PURE__*/function (_React$Component) {
|
|
33
|
+
_inherits(SingleImageUpload, _React$Component);
|
|
34
|
+
|
|
35
|
+
var _super = _createSuper(SingleImageUpload);
|
|
36
|
+
|
|
37
|
+
function SingleImageUpload() {
|
|
38
|
+
_classCallCheck(this, SingleImageUpload);
|
|
39
|
+
|
|
40
|
+
return _super.apply(this, arguments);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
_createClass(SingleImageUpload, [{
|
|
44
|
+
key: "render",
|
|
45
|
+
value: function render() {
|
|
46
|
+
var _this$props = this.props,
|
|
47
|
+
className = _this$props.className,
|
|
48
|
+
onChange = _this$props.onChange,
|
|
49
|
+
value = _this$props.value,
|
|
50
|
+
validation = _this$props.validation,
|
|
51
|
+
label = _this$props.label,
|
|
52
|
+
description = _this$props.description,
|
|
53
|
+
accept = _this$props.accept,
|
|
54
|
+
onChangePick = _this$props.onChangePick,
|
|
55
|
+
maxSize = _this$props.maxSize,
|
|
56
|
+
multipleMaxCount = _this$props.multipleMaxCount,
|
|
57
|
+
multipleMaxSize = _this$props.multipleMaxSize,
|
|
58
|
+
imagePreviewProps = _this$props.imagePreviewProps,
|
|
59
|
+
round = _this$props.round;
|
|
60
|
+
return /*#__PURE__*/React.createElement(ImageUploadWrapper, {
|
|
61
|
+
className: className
|
|
62
|
+
}, label && /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: "mdc-floating-label mdc-floating-label--float-above"
|
|
64
|
+
}, label), /*#__PURE__*/React.createElement(FileManager, {
|
|
65
|
+
onChange: onChange,
|
|
66
|
+
onChangePick: onChangePick,
|
|
67
|
+
accept: accept,
|
|
68
|
+
images: !accept,
|
|
69
|
+
maxSize: maxSize,
|
|
70
|
+
multipleMaxCount: multipleMaxCount,
|
|
71
|
+
multipleMaxSize: multipleMaxSize
|
|
72
|
+
}, function (_ref) {
|
|
73
|
+
var showFileManager = _ref.showFileManager;
|
|
74
|
+
return /*#__PURE__*/React.createElement(Ui.Image, {
|
|
75
|
+
renderImagePreview: function renderImagePreview(renderImageProps) {
|
|
76
|
+
return /*#__PURE__*/React.createElement(Image, Object.assign({}, renderImageProps, imagePreviewProps));
|
|
77
|
+
},
|
|
78
|
+
style: {
|
|
79
|
+
width: "100%",
|
|
80
|
+
height: "auto"
|
|
81
|
+
},
|
|
82
|
+
value: value,
|
|
83
|
+
uploadImage: showFileManager,
|
|
84
|
+
removeImage: onChange,
|
|
85
|
+
round: round
|
|
86
|
+
});
|
|
87
|
+
}), validation.isValid === false && /*#__PURE__*/React.createElement(FormElementMessage, {
|
|
88
|
+
error: true
|
|
89
|
+
}, validation.message), validation.isValid !== false && description && /*#__PURE__*/React.createElement(FormElementMessage, null, description));
|
|
90
|
+
}
|
|
91
|
+
}]);
|
|
92
|
+
|
|
93
|
+
return SingleImageUpload;
|
|
94
|
+
}(React.Component);
|
|
95
|
+
|
|
96
|
+
_defineProperty(SingleImageUpload, "defaultProps", {
|
|
97
|
+
validation: {
|
|
98
|
+
isValid: null
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { SingleImageUpload as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CellProps } from "@webiny/ui/Grid";
|
|
3
|
+
declare type SplitViewProps = {
|
|
4
|
+
children: React.ReactElement<any> | React.ReactElement<any>[];
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const SplitView: (props: SplitViewProps) => JSX.Element;
|
|
8
|
+
declare const LeftPanel: (props: CellProps) => JSX.Element;
|
|
9
|
+
declare const RightPanel: (props: CellProps) => JSX.Element;
|
|
10
|
+
export { SplitView, LeftPanel, RightPanel };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import _clone from "lodash/clone";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import classSet from "classnames";
|
|
4
|
+
import { Cell, Grid, GridInner } from "@webiny/ui/Grid";
|
|
5
|
+
import { css } from "emotion";
|
|
6
|
+
import styled from "@emotion/styled";
|
|
7
|
+
import { getClasses } from "@webiny/ui/Helpers";
|
|
8
|
+
var grid = /*#__PURE__*/css({
|
|
9
|
+
"&.mdc-layout-grid": {
|
|
10
|
+
padding: 0,
|
|
11
|
+
backgroundColor: "var(--mdc-theme-background)"
|
|
12
|
+
}
|
|
13
|
+
}, "label:grid;");
|
|
14
|
+
var gridInner = /*#__PURE__*/css({
|
|
15
|
+
"&.mdc-layout-grid__inner": {
|
|
16
|
+
gridGap: 0
|
|
17
|
+
}
|
|
18
|
+
}, "label:gridInner;");
|
|
19
|
+
var RightPanelWrapper = /*#__PURE__*/styled("div", {
|
|
20
|
+
target: "em0s1980",
|
|
21
|
+
label: "RightPanelWrapper"
|
|
22
|
+
})({
|
|
23
|
+
backgroundColor: "var(--mdc-theme-background)",
|
|
24
|
+
overflow: "auto",
|
|
25
|
+
height: "calc(100vh - 70px)"
|
|
26
|
+
});
|
|
27
|
+
var leftPanel = /*#__PURE__*/css({
|
|
28
|
+
backgroundColor: "var(--mdc-theme-surface)",
|
|
29
|
+
">.webiny-data-list": {
|
|
30
|
+
display: "flex",
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
height: "calc(100vh - 70px)",
|
|
33
|
+
".mdc-list": {
|
|
34
|
+
overflow: "auto"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
">.mdc-list": {
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
maxHeight: "calc(100vh - 70px)",
|
|
41
|
+
overflow: "auto"
|
|
42
|
+
}
|
|
43
|
+
}, "label:leftPanel;");
|
|
44
|
+
|
|
45
|
+
var SplitView = function SplitView(props) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
47
|
+
className: classSet(grid, props.className, "webiny-split-view")
|
|
48
|
+
}, /*#__PURE__*/React.createElement(GridInner, {
|
|
49
|
+
className: gridInner + " webiny-split-view__inner"
|
|
50
|
+
}, props.children));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var LeftPanel = function LeftPanel(props) {
|
|
54
|
+
var propList = _clone(props);
|
|
55
|
+
|
|
56
|
+
if (!propList.hasOwnProperty("span")) {
|
|
57
|
+
propList.span = 5;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return /*#__PURE__*/React.createElement(Cell, getClasses(propList, classSet(leftPanel, props.className, "webiny-split-view__left-panel")), propList.children);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var RightPanel = function RightPanel(props) {
|
|
64
|
+
var propList = _clone(props);
|
|
65
|
+
|
|
66
|
+
if (!propList.hasOwnProperty("span")) {
|
|
67
|
+
propList.span = 7;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return /*#__PURE__*/React.createElement(Cell, getClasses(propList, "webiny-split-view__right-panel"), /*#__PURE__*/React.createElement(RightPanelWrapper, {
|
|
71
|
+
className: "webiny-split-view__right-panel-wrapper",
|
|
72
|
+
id: "webiny-split-view-right-panel"
|
|
73
|
+
}, propList.children));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { SplitView, LeftPanel, RightPanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SplitView, LeftPanel, RightPanel } from "./SplitView";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SplitView, LeftPanel, RightPanel } from "./SplitView";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FileManager } from "./FileManager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FileManager } from "./FileManager";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type Args = {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
message?: React.ReactNode;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
declare const useConfirmationDialog: ({ title, message, ...options }?: Args) => {
|
|
8
|
+
showConfirmation: (onAccept: any, onCancel?: any) => void;
|
|
9
|
+
};
|
|
10
|
+
export { useConfirmationDialog };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
|
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
|
+
|
|
7
|
+
var _excluded = ["title", "message"];
|
|
8
|
+
import { useUi } from "@webiny/app/hooks/useUi";
|
|
9
|
+
import { i18n } from "@webiny/app/i18n";
|
|
10
|
+
var t = i18n.ns("app-admin/hooks/use-confirmation-dialog");
|
|
11
|
+
|
|
12
|
+
var useConfirmationDialog = function useConfirmationDialog() {
|
|
13
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
|
+
|
|
15
|
+
var title = _ref.title,
|
|
16
|
+
message = _ref.message,
|
|
17
|
+
options = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
|
|
19
|
+
var ui = useUi();
|
|
20
|
+
return {
|
|
21
|
+
showConfirmation: function showConfirmation(onAccept) {
|
|
22
|
+
var onCancel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
23
|
+
ui.setState(function (ui) {
|
|
24
|
+
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
25
|
+
dialog: {
|
|
26
|
+
message: message || t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Are you sure you want to continue?"]))),
|
|
27
|
+
options: _objectSpread(_objectSpread({}, options), {}, {
|
|
28
|
+
title: title || t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Confirmation"]))),
|
|
29
|
+
actions: {
|
|
30
|
+
accept: {
|
|
31
|
+
label: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Confirm"]))),
|
|
32
|
+
onClick: onAccept
|
|
33
|
+
},
|
|
34
|
+
cancel: {
|
|
35
|
+
label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Cancel"]))),
|
|
36
|
+
onClick: onCancel
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { useConfirmationDialog };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import { useUi } from "@webiny/app/hooks/useUi";
|
|
3
|
+
|
|
4
|
+
var useDialog = function useDialog() {
|
|
5
|
+
var ui = useUi();
|
|
6
|
+
return {
|
|
7
|
+
showDialog: function showDialog(message, options) {
|
|
8
|
+
ui.setState(function (ui) {
|
|
9
|
+
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
10
|
+
dialog: {
|
|
11
|
+
message: message,
|
|
12
|
+
options: options
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
hideDialog: function hideDialog() {
|
|
18
|
+
ui.setState(function (ui) {
|
|
19
|
+
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
20
|
+
dialog: null
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { useDialog };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import { useUi } from "@webiny/app/hooks/useUi";
|
|
3
|
+
export var useSnackbar = function useSnackbar() {
|
|
4
|
+
var ui = useUi();
|
|
5
|
+
return {
|
|
6
|
+
showSnackbar: function showSnackbar(message) {
|
|
7
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8
|
+
ui.setState(function (ui) {
|
|
9
|
+
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
10
|
+
snackbar: {
|
|
11
|
+
message: message,
|
|
12
|
+
options: options
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
hideSnackbar: function hideSnackbar() {
|
|
18
|
+
ui.setState(function (ui) {
|
|
19
|
+
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
20
|
+
snackbar: null
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/app-admin",
|
|
3
|
+
"version": "0.0.0-mt-1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Pavel Denisjuk",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@apollo/react-hooks": "3.1.5",
|
|
14
|
+
"@babel/runtime": "7.15.4",
|
|
15
|
+
"@editorjs/editorjs": "2.22.3",
|
|
16
|
+
"@emotion/core": "10.1.1",
|
|
17
|
+
"@emotion/styled": "10.0.27",
|
|
18
|
+
"@svgr/webpack": "4.3.3",
|
|
19
|
+
"@types/mime": "2.0.3",
|
|
20
|
+
"@types/react": "16.14.2",
|
|
21
|
+
"@webiny/app": "0.0.0-mt-1",
|
|
22
|
+
"@webiny/app-security": "0.0.0-mt-1",
|
|
23
|
+
"@webiny/form": "0.0.0-mt-1",
|
|
24
|
+
"@webiny/plugins": "0.0.0-mt-1",
|
|
25
|
+
"@webiny/react-router": "0.0.0-mt-1",
|
|
26
|
+
"@webiny/ui": "0.0.0-mt-1",
|
|
27
|
+
"@webiny/ui-composer": "0.0.0-mt-1",
|
|
28
|
+
"@webiny/validation": "0.0.0-mt-1",
|
|
29
|
+
"apollo-cache": "1.3.5",
|
|
30
|
+
"apollo-client": "2.6.10",
|
|
31
|
+
"apollo-link": "1.2.14",
|
|
32
|
+
"apollo-utilities": "1.3.4",
|
|
33
|
+
"bytes": "3.1.0",
|
|
34
|
+
"classnames": "2.3.1",
|
|
35
|
+
"dataurl-to-blob": "0.0.1",
|
|
36
|
+
"dayjs": "1.10.7",
|
|
37
|
+
"dot-prop-immutable": "2.1.1",
|
|
38
|
+
"downshift": "3.4.8",
|
|
39
|
+
"emotion": "10.0.27",
|
|
40
|
+
"graphlib": "2.1.8",
|
|
41
|
+
"graphql": "14.7.0",
|
|
42
|
+
"graphql-tag": "2.12.5",
|
|
43
|
+
"invariant": "2.2.4",
|
|
44
|
+
"lodash": "4.17.21",
|
|
45
|
+
"mime": "2.5.2",
|
|
46
|
+
"minimatch": "3.0.4",
|
|
47
|
+
"nanoid": "3.1.29",
|
|
48
|
+
"prop-types": "15.7.2",
|
|
49
|
+
"react": "16.14.0",
|
|
50
|
+
"react-butterfiles": "1.3.3",
|
|
51
|
+
"react-dom": "16.14.0",
|
|
52
|
+
"react-helmet": "5.2.1",
|
|
53
|
+
"react-hotkeyz": "1.0.4",
|
|
54
|
+
"react-lazy-load": "3.1.13",
|
|
55
|
+
"react-transition-group": "4.4.2",
|
|
56
|
+
"semver": "7.3.5",
|
|
57
|
+
"store": "2.0.12"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@babel/cli": "^7.5.5",
|
|
61
|
+
"@babel/core": "^7.5.5",
|
|
62
|
+
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
|
63
|
+
"@babel/preset-env": "^7.5.5",
|
|
64
|
+
"@babel/preset-react": "^7.0.0",
|
|
65
|
+
"@babel/preset-typescript": "^7.8.3",
|
|
66
|
+
"@webiny/cli": "^0.0.0-mt-1",
|
|
67
|
+
"@webiny/project-utils": "^0.0.0-mt-1",
|
|
68
|
+
"babel-plugin-emotion": "^9.2.8",
|
|
69
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
70
|
+
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
|
|
71
|
+
"rimraf": "^3.0.2",
|
|
72
|
+
"ttypescript": "^1.5.12",
|
|
73
|
+
"typescript": "^4.1.3"
|
|
74
|
+
},
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public",
|
|
77
|
+
"directory": "dist"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "yarn webiny run build",
|
|
81
|
+
"watch": "yarn webiny run watch"
|
|
82
|
+
},
|
|
83
|
+
"svgo": {
|
|
84
|
+
"plugins": {
|
|
85
|
+
"removeViewBox": false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"adio": {
|
|
89
|
+
"ignore": {
|
|
90
|
+
"dependencies": [
|
|
91
|
+
"@svgr/webpack",
|
|
92
|
+
"@emotion/core",
|
|
93
|
+
"@types/mime"
|
|
94
|
+
],
|
|
95
|
+
"peerDependencies": [
|
|
96
|
+
"react-dom"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"gitHead": "37736d8456a6ecb342a6c3645060bd9a3f2d4bb0"
|
|
101
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Plugin } from "@webiny/plugins";
|
|
3
|
+
interface File {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
key: string;
|
|
7
|
+
src: string;
|
|
8
|
+
size: number;
|
|
9
|
+
type: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
createdOn: string;
|
|
12
|
+
createdBy: {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export interface RenderParams {
|
|
18
|
+
file: File;
|
|
19
|
+
}
|
|
20
|
+
interface Config {
|
|
21
|
+
types: string[];
|
|
22
|
+
actions?: React.ComponentType<any>[];
|
|
23
|
+
render(params: RenderParams): React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare class FileManagerFileTypePlugin extends Plugin {
|
|
26
|
+
static readonly type = "admin-file-manager-file-type";
|
|
27
|
+
private config;
|
|
28
|
+
constructor(config?: Config);
|
|
29
|
+
get types(): string[];
|
|
30
|
+
get actions(): React.ComponentType<any>[];
|
|
31
|
+
render(params: RenderParams): React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { Plugin } from "@webiny/plugins";
|
|
8
|
+
export var FileManagerFileTypePlugin = /*#__PURE__*/function (_Plugin) {
|
|
9
|
+
_inherits(FileManagerFileTypePlugin, _Plugin);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(FileManagerFileTypePlugin);
|
|
12
|
+
|
|
13
|
+
function FileManagerFileTypePlugin(config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, FileManagerFileTypePlugin);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this);
|
|
19
|
+
|
|
20
|
+
_defineProperty(_assertThisInitialized(_this), "config", void 0);
|
|
21
|
+
|
|
22
|
+
_this.config = config || {};
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_createClass(FileManagerFileTypePlugin, [{
|
|
27
|
+
key: "types",
|
|
28
|
+
get: function get() {
|
|
29
|
+
return this.config.types || [];
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "actions",
|
|
33
|
+
get: function get() {
|
|
34
|
+
return this.config.actions || [];
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "render",
|
|
38
|
+
value: function render(params) {
|
|
39
|
+
return this.config.render(params);
|
|
40
|
+
}
|
|
41
|
+
}]);
|
|
42
|
+
|
|
43
|
+
return FileManagerFileTypePlugin;
|
|
44
|
+
}(Plugin);
|
|
45
|
+
|
|
46
|
+
_defineProperty(FileManagerFileTypePlugin, "type", "admin-file-manager-file-type");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Plugin } from "@webiny/plugins";
|
|
3
|
+
import { ItemProps, MenuProps, SectionProps } from "../ui/views/NavigationView/legacyMenu";
|
|
4
|
+
interface Props {
|
|
5
|
+
Menu: React.ComponentType<MenuProps>;
|
|
6
|
+
Section: React.ComponentType<SectionProps>;
|
|
7
|
+
Item: React.ComponentType<ItemProps>;
|
|
8
|
+
}
|
|
9
|
+
interface Config {
|
|
10
|
+
render(props: Props): React.ReactNode;
|
|
11
|
+
order?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class MenuPlugin extends Plugin {
|
|
14
|
+
static readonly type = "admin-menu";
|
|
15
|
+
private _config;
|
|
16
|
+
constructor(config?: Config);
|
|
17
|
+
get order(): number;
|
|
18
|
+
render(props: any): React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { Plugin } from "@webiny/plugins";
|
|
8
|
+
export var MenuPlugin = /*#__PURE__*/function (_Plugin) {
|
|
9
|
+
_inherits(MenuPlugin, _Plugin);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(MenuPlugin);
|
|
12
|
+
|
|
13
|
+
function MenuPlugin(config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, MenuPlugin);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this);
|
|
19
|
+
|
|
20
|
+
_defineProperty(_assertThisInitialized(_this), "_config", void 0);
|
|
21
|
+
|
|
22
|
+
_this._config = config || {};
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_createClass(MenuPlugin, [{
|
|
27
|
+
key: "order",
|
|
28
|
+
get: function get() {
|
|
29
|
+
return this._config.order;
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "render",
|
|
33
|
+
value: function render(props) {
|
|
34
|
+
return this._config.render(props);
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
|
|
38
|
+
return MenuPlugin;
|
|
39
|
+
}(Plugin);
|
|
40
|
+
|
|
41
|
+
_defineProperty(MenuPlugin, "type", "admin-menu");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Plugin } from "@webiny/plugins";
|
|
3
|
+
interface Permission {
|
|
4
|
+
name: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
interface RenderParams {
|
|
8
|
+
value: Permission[];
|
|
9
|
+
onChange: (value: Permission[]) => void;
|
|
10
|
+
}
|
|
11
|
+
interface Config {
|
|
12
|
+
render(props: RenderParams): React.ReactElement;
|
|
13
|
+
system?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare class PermissionRendererPlugin extends Plugin {
|
|
16
|
+
static readonly type = "admin-app-permissions-renderer";
|
|
17
|
+
private _config;
|
|
18
|
+
constructor(config?: Config);
|
|
19
|
+
get system(): boolean;
|
|
20
|
+
render(props: RenderParams): React.ReactElement;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { Plugin } from "@webiny/plugins";
|
|
8
|
+
export var PermissionRendererPlugin = /*#__PURE__*/function (_Plugin) {
|
|
9
|
+
_inherits(PermissionRendererPlugin, _Plugin);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(PermissionRendererPlugin);
|
|
12
|
+
|
|
13
|
+
function PermissionRendererPlugin(config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, PermissionRendererPlugin);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this);
|
|
19
|
+
|
|
20
|
+
_defineProperty(_assertThisInitialized(_this), "_config", void 0);
|
|
21
|
+
|
|
22
|
+
_this._config = config || {};
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_createClass(PermissionRendererPlugin, [{
|
|
27
|
+
key: "system",
|
|
28
|
+
get: function get() {
|
|
29
|
+
return Boolean(this._config.system);
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "render",
|
|
33
|
+
value: function render(props) {
|
|
34
|
+
return this._config.render(props);
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
|
|
38
|
+
return PermissionRendererPlugin;
|
|
39
|
+
}(Plugin);
|
|
40
|
+
|
|
41
|
+
_defineProperty(PermissionRendererPlugin, "type", "admin-app-permissions-renderer");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ReactComponent as FileIcon } from "@svgr/webpack!./icons/round-description-24px.svg";
|
|
3
|
+
import { css } from "emotion";
|
|
4
|
+
import { FileManagerFileTypePlugin } from "../FileManagerFileTypePlugin";
|
|
5
|
+
var style = {
|
|
6
|
+
centering: /*#__PURE__*/css({
|
|
7
|
+
display: "flex",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
height: 200
|
|
11
|
+
}, "label:centering;")
|
|
12
|
+
};
|
|
13
|
+
export default new FileManagerFileTypePlugin({
|
|
14
|
+
types: ["*/*"],
|
|
15
|
+
render: function render() {
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: style.centering
|
|
18
|
+
}, /*#__PURE__*/React.createElement(FileIcon, null));
|
|
19
|
+
}
|
|
20
|
+
});
|