@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,81 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _get from "@babel/runtime/helpers/get";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { css } from "emotion";
|
|
9
|
+
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
10
|
+
import { Typography } from "@webiny/ui/Typography";
|
|
11
|
+
import { UIElement } from "../../UIElement";
|
|
12
|
+
import { Icon } from "@webiny/ui/Icon";
|
|
13
|
+
var iconClass = /*#__PURE__*/css({
|
|
14
|
+
marginRight: 15,
|
|
15
|
+
color: "var(--mdc-theme-text-primary-on-background)"
|
|
16
|
+
}, "label:iconClass;");
|
|
17
|
+
var headerClass = /*#__PURE__*/css({
|
|
18
|
+
borderBottom: "1px solid var(--mdc-theme-on-background)",
|
|
19
|
+
color: "var(--mdc-theme-text-primary-on-background)"
|
|
20
|
+
}, "label:headerClass;");
|
|
21
|
+
var titleClass = /*#__PURE__*/css({
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center"
|
|
24
|
+
}, "label:titleClass;");
|
|
25
|
+
var actionsClass = /*#__PURE__*/css({
|
|
26
|
+
display: "flex",
|
|
27
|
+
justifyContent: "flex-end",
|
|
28
|
+
alignItems: "center"
|
|
29
|
+
}, "label:actionsClass;");
|
|
30
|
+
export var FormHeaderElement = /*#__PURE__*/function (_UIElement) {
|
|
31
|
+
_inherits(FormHeaderElement, _UIElement);
|
|
32
|
+
|
|
33
|
+
var _super = _createSuper(FormHeaderElement);
|
|
34
|
+
|
|
35
|
+
function FormHeaderElement(id, config) {
|
|
36
|
+
var _this;
|
|
37
|
+
|
|
38
|
+
_classCallCheck(this, FormHeaderElement);
|
|
39
|
+
|
|
40
|
+
_this = _super.call(this, id, config);
|
|
41
|
+
|
|
42
|
+
_this.useGrid(false);
|
|
43
|
+
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_createClass(FormHeaderElement, [{
|
|
48
|
+
key: "setIcon",
|
|
49
|
+
value: function setIcon(icon) {
|
|
50
|
+
this.config.icon = icon;
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "addAction",
|
|
54
|
+
value: function addAction(element) {
|
|
55
|
+
this.addElement(element);
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "render",
|
|
59
|
+
value: function render(props) {
|
|
60
|
+
var _this$config = this.config,
|
|
61
|
+
icon = _this$config.icon,
|
|
62
|
+
getTitle = _this$config.getTitle;
|
|
63
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
64
|
+
className: headerClass
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Cell, {
|
|
66
|
+
span: 6,
|
|
67
|
+
className: titleClass
|
|
68
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
69
|
+
className: iconClass,
|
|
70
|
+
icon: icon
|
|
71
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
72
|
+
use: "headline5"
|
|
73
|
+
}, getTitle(props)))), /*#__PURE__*/React.createElement(Cell, {
|
|
74
|
+
span: 6,
|
|
75
|
+
className: actionsClass
|
|
76
|
+
}, _get(_getPrototypeOf(FormHeaderElement.prototype), "render", this).call(this, props)));
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
|
|
80
|
+
return FormHeaderElement;
|
|
81
|
+
}(UIElement);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FormOnSubmit } from "@webiny/form";
|
|
2
|
+
import { UIElement, UIElementConfig } from "../UIElement";
|
|
3
|
+
import { FormElementRenderProps } from "../elements/form/FormElement";
|
|
4
|
+
import { ButtonElement } from "../elements/ButtonElement";
|
|
5
|
+
import { FormContentElement } from "./FormView/FormContentElement";
|
|
6
|
+
import { FormHeaderElement } from "./FormView/FormHeaderElement";
|
|
7
|
+
import { FormFooterElement } from "./FormView/FormFooterElement";
|
|
8
|
+
import { FormContainerElement } from "./FormView/FormContainerElement";
|
|
9
|
+
import { UIView } from "../UIView";
|
|
10
|
+
export interface FormViewConfig extends UIElementConfig {
|
|
11
|
+
setupForm?: boolean;
|
|
12
|
+
onSubmit?: FormOnSubmit;
|
|
13
|
+
getTitle?: (props: FormElementRenderProps) => string;
|
|
14
|
+
getFormData?: () => Record<string, any>;
|
|
15
|
+
isLoading?: () => boolean;
|
|
16
|
+
onCancel?: () => void;
|
|
17
|
+
testId?: string;
|
|
18
|
+
noElevation?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
interface GetterWithProps<T> {
|
|
22
|
+
(props: FormElementRenderProps): T;
|
|
23
|
+
}
|
|
24
|
+
interface GetterWithoutProps<T> {
|
|
25
|
+
(): T;
|
|
26
|
+
}
|
|
27
|
+
export declare class FormView extends UIView<FormViewConfig> {
|
|
28
|
+
constructor(id: any, config?: FormViewConfig);
|
|
29
|
+
addElement<TElement extends UIElement = UIElement>(element: TElement): TElement;
|
|
30
|
+
setTitle(title: string | GetterWithProps<string>): void;
|
|
31
|
+
setOnSubmit(onSubmit: FormOnSubmit): void;
|
|
32
|
+
setFormData(getter: GetterWithoutProps<Record<string, any>>): void;
|
|
33
|
+
getFormContainer(): FormContainerElement;
|
|
34
|
+
getFormContentElement(): FormContentElement;
|
|
35
|
+
getFormHeaderElement(): FormHeaderElement;
|
|
36
|
+
getFormFooterElement(): FormFooterElement;
|
|
37
|
+
getSubmitButtonElement(): ButtonElement;
|
|
38
|
+
private addElements;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _get from "@babel/runtime/helpers/get";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { CircularProgress } from "@webiny/ui/Progress";
|
|
9
|
+
import { FormElement } from "../elements/form/FormElement";
|
|
10
|
+
import { ButtonElement } from "../elements/ButtonElement";
|
|
11
|
+
import { GenericElement } from "../elements/GenericElement";
|
|
12
|
+
import { FormContentElement } from "./FormView/FormContentElement";
|
|
13
|
+
import { FormHeaderElement } from "./FormView/FormHeaderElement";
|
|
14
|
+
import { FormFooterElement } from "./FormView/FormFooterElement";
|
|
15
|
+
import { FormContainerElement } from "./FormView/FormContainerElement";
|
|
16
|
+
import { UIView } from "../UIView";
|
|
17
|
+
export var FormView = /*#__PURE__*/function (_UIView) {
|
|
18
|
+
_inherits(FormView, _UIView);
|
|
19
|
+
|
|
20
|
+
var _super = _createSuper(FormView);
|
|
21
|
+
|
|
22
|
+
function FormView(id, config) {
|
|
23
|
+
var _this;
|
|
24
|
+
|
|
25
|
+
_classCallCheck(this, FormView);
|
|
26
|
+
|
|
27
|
+
if (!("setupForm" in config)) {
|
|
28
|
+
config.setupForm = true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
_this = _super.call(this, id, config);
|
|
32
|
+
|
|
33
|
+
_this.addElements();
|
|
34
|
+
|
|
35
|
+
_this.useGrid(false);
|
|
36
|
+
|
|
37
|
+
_this.applyPlugins(FormView);
|
|
38
|
+
|
|
39
|
+
return _this;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
_createClass(FormView, [{
|
|
43
|
+
key: "addElement",
|
|
44
|
+
value: function addElement(element) {
|
|
45
|
+
if (element.id === "form" || element.id === "formContainer") {
|
|
46
|
+
return _get(_getPrototypeOf(FormView.prototype), "addElement", this).call(this, element);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return this.getFormContainer().addElement(element);
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "setTitle",
|
|
53
|
+
value: function setTitle(title) {
|
|
54
|
+
if (typeof title === "string") {
|
|
55
|
+
this.config.getTitle = function () {
|
|
56
|
+
return title;
|
|
57
|
+
};
|
|
58
|
+
} else {
|
|
59
|
+
this.config.getTitle = title;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
key: "setOnSubmit",
|
|
64
|
+
value: function setOnSubmit(onSubmit) {
|
|
65
|
+
this.config.onSubmit = onSubmit;
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
key: "setFormData",
|
|
69
|
+
value: function setFormData(getter) {
|
|
70
|
+
this.config.getFormData = getter;
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "getFormContainer",
|
|
74
|
+
value: function getFormContainer() {
|
|
75
|
+
return this.getElement("formContainer");
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "getFormContentElement",
|
|
79
|
+
value: function getFormContentElement() {
|
|
80
|
+
return this.getElement("formContent");
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "getFormHeaderElement",
|
|
84
|
+
value: function getFormHeaderElement() {
|
|
85
|
+
return this.getElement("formHeader");
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "getFormFooterElement",
|
|
89
|
+
value: function getFormFooterElement() {
|
|
90
|
+
return this.getElement("formFooter");
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "getSubmitButtonElement",
|
|
94
|
+
value: function getSubmitButtonElement() {
|
|
95
|
+
return this.getFormFooterElement().getElement("submit");
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "addElements",
|
|
99
|
+
value: function addElements() {
|
|
100
|
+
var _this2 = this;
|
|
101
|
+
|
|
102
|
+
var formContainer = new FormContainerElement("formContainer", {
|
|
103
|
+
testId: this.config.testId,
|
|
104
|
+
className: this.config.className,
|
|
105
|
+
noElevation: this.config.noElevation
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
if (this.config.setupForm) {
|
|
109
|
+
var form = this.addElement(new FormElement("form", {
|
|
110
|
+
onSubmit: function onSubmit(data, form) {
|
|
111
|
+
return _this2.config.onSubmit(data, form);
|
|
112
|
+
},
|
|
113
|
+
getData: function getData() {
|
|
114
|
+
return _this2.config.getFormData();
|
|
115
|
+
}
|
|
116
|
+
}));
|
|
117
|
+
form.addElement(formContainer);
|
|
118
|
+
} else {
|
|
119
|
+
this.addElement(formContainer);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
this.addElement(new GenericElement("loading", function () {
|
|
123
|
+
if (typeof _this2.config.isLoading !== "function") {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return _this2.config.isLoading() ? /*#__PURE__*/React.createElement(CircularProgress, null) : null;
|
|
128
|
+
}));
|
|
129
|
+
this.addElement(new FormHeaderElement("formHeader", {
|
|
130
|
+
getTitle: function getTitle(props) {
|
|
131
|
+
return _this2.config.getTitle(props);
|
|
132
|
+
}
|
|
133
|
+
}));
|
|
134
|
+
this.addElement(new FormContentElement("formContent"));
|
|
135
|
+
var footer = new FormFooterElement("formFooter");
|
|
136
|
+
this.addElement(footer);
|
|
137
|
+
var submitButton = new ButtonElement("submit", {
|
|
138
|
+
type: "primary",
|
|
139
|
+
label: "Save",
|
|
140
|
+
onClick: function onClick(props) {
|
|
141
|
+
return props.formProps.submit();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
submitButton.moveToTheEndOf(footer);
|
|
145
|
+
var cancelButton = footer.addElement(new ButtonElement("cancel", {
|
|
146
|
+
type: "default",
|
|
147
|
+
label: "Cancel",
|
|
148
|
+
onClick: function onClick() {
|
|
149
|
+
return _this2.config.onCancel();
|
|
150
|
+
},
|
|
151
|
+
shouldRender: function shouldRender() {
|
|
152
|
+
return typeof _this2.config.onCancel === "function";
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
cancelButton.moveToTheBeginningOf(footer);
|
|
156
|
+
}
|
|
157
|
+
}]);
|
|
158
|
+
|
|
159
|
+
return FormView;
|
|
160
|
+
}(UIView);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UIElement } from "../../UIElement";
|
|
3
|
+
export declare class ContentElement extends UIElement {
|
|
4
|
+
private _sorters;
|
|
5
|
+
constructor(id: string);
|
|
6
|
+
addElement<TElement extends UIElement = UIElement>(element: TElement): TElement;
|
|
7
|
+
addSorter(sorter: Function): void;
|
|
8
|
+
render(props?: any): React.ReactNode;
|
|
9
|
+
private runSorters;
|
|
10
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
+
import _get from "@babel/runtime/helpers/get";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { UIElement } from "../../UIElement";
|
|
12
|
+
import { DrawerContent } from "@webiny/ui/Drawer";
|
|
13
|
+
import { navContent } from "./Styled";
|
|
14
|
+
import { TAGS } from "../../elements/NavigationMenuElement";
|
|
15
|
+
export var ContentElement = /*#__PURE__*/function (_UIElement) {
|
|
16
|
+
_inherits(ContentElement, _UIElement);
|
|
17
|
+
|
|
18
|
+
var _super = _createSuper(ContentElement);
|
|
19
|
+
|
|
20
|
+
function ContentElement(id) {
|
|
21
|
+
var _this;
|
|
22
|
+
|
|
23
|
+
_classCallCheck(this, ContentElement);
|
|
24
|
+
|
|
25
|
+
_this = _super.call(this, id);
|
|
26
|
+
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "_sorters", []);
|
|
28
|
+
|
|
29
|
+
_this.useGrid(false);
|
|
30
|
+
|
|
31
|
+
_this.addSorter(function (a, b) {
|
|
32
|
+
if (a.hasTag(TAGS.APP) && b.hasTag(TAGS.UTILS)) {
|
|
33
|
+
return -1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (a.hasTag(TAGS.UTILS) && b.hasTag(TAGS.APP)) {
|
|
37
|
+
return 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return a.config.label.localeCompare(b.config.label);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_createClass(ContentElement, [{
|
|
47
|
+
key: "addElement",
|
|
48
|
+
value: function addElement(element) {
|
|
49
|
+
_get(_getPrototypeOf(ContentElement.prototype), "addElement", this).call(this, element);
|
|
50
|
+
|
|
51
|
+
this.runSorters();
|
|
52
|
+
return element;
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
key: "addSorter",
|
|
56
|
+
value: function addSorter(sorter) {
|
|
57
|
+
this._sorters.push(sorter);
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
key: "render",
|
|
61
|
+
value: function render(props) {
|
|
62
|
+
return /*#__PURE__*/React.createElement(DrawerContent, {
|
|
63
|
+
className: navContent
|
|
64
|
+
}, _get(_getPrototypeOf(ContentElement.prototype), "render", this).call(this, props));
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "runSorters",
|
|
68
|
+
value: function runSorters() {
|
|
69
|
+
var _iterator = _createForOfIteratorHelper(this._sorters),
|
|
70
|
+
_step;
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
74
|
+
var sorter = _step.value;
|
|
75
|
+
this.getLayout().sort(sorter);
|
|
76
|
+
}
|
|
77
|
+
} catch (err) {
|
|
78
|
+
_iterator.e(err);
|
|
79
|
+
} finally {
|
|
80
|
+
_iterator.f();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}]);
|
|
84
|
+
|
|
85
|
+
return ContentElement;
|
|
86
|
+
}(UIElement);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UIElement, UIElementConfig } from "../../UIElement";
|
|
3
|
+
import { NavigationMenuElement } from "../../elements/NavigationMenuElement";
|
|
4
|
+
interface FooterElementConfig extends UIElementConfig {
|
|
5
|
+
closeMenu: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare class FooterElement extends UIElement<FooterElementConfig> {
|
|
8
|
+
private _footerPlaceholder;
|
|
9
|
+
constructor(id: string, config: FooterElementConfig);
|
|
10
|
+
addMenuElement(element: NavigationMenuElement): NavigationMenuElement<import("../../elements/NavigationMenuElement").NavigationMenuElementConfig>;
|
|
11
|
+
render(props?: any): React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 _get from "@babel/runtime/helpers/get";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { List, ListItem } from "@webiny/ui/List";
|
|
11
|
+
import { UIElement } from "../../UIElement";
|
|
12
|
+
import { GenericElement } from "../../elements/GenericElement";
|
|
13
|
+
import { PlaceholderElement } from "../../elements/PlaceholderElement";
|
|
14
|
+
import { MenuFooter, subFooter } from "./Styled";
|
|
15
|
+
export var FooterElement = /*#__PURE__*/function (_UIElement) {
|
|
16
|
+
_inherits(FooterElement, _UIElement);
|
|
17
|
+
|
|
18
|
+
var _super = _createSuper(FooterElement);
|
|
19
|
+
|
|
20
|
+
function FooterElement(id, config) {
|
|
21
|
+
var _this;
|
|
22
|
+
|
|
23
|
+
_classCallCheck(this, FooterElement);
|
|
24
|
+
|
|
25
|
+
_this = _super.call(this, id, config);
|
|
26
|
+
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "_footerPlaceholder", void 0);
|
|
28
|
+
|
|
29
|
+
_this.useGrid(false);
|
|
30
|
+
|
|
31
|
+
_this._footerPlaceholder = _this.addElement(new PlaceholderElement("navigation.footer.placeholder"));
|
|
32
|
+
new GenericElement("webiny.version", function () {
|
|
33
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
34
|
+
ripple: false,
|
|
35
|
+
className: subFooter
|
|
36
|
+
}, "Webiny v", process.env.REACT_APP_WEBINY_VERSION);
|
|
37
|
+
}).moveAfter(_this._footerPlaceholder);
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
_createClass(FooterElement, [{
|
|
42
|
+
key: "addMenuElement",
|
|
43
|
+
value: function addMenuElement(element) {
|
|
44
|
+
element.moveBefore(this._footerPlaceholder);
|
|
45
|
+
return element;
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
key: "render",
|
|
49
|
+
value: function render(props) {
|
|
50
|
+
return /*#__PURE__*/React.createElement(MenuFooter, null, /*#__PURE__*/React.createElement(List, {
|
|
51
|
+
nonInteractive: true
|
|
52
|
+
}, _get(_getPrototypeOf(FooterElement.prototype), "render", this).call(this, props)));
|
|
53
|
+
}
|
|
54
|
+
}]);
|
|
55
|
+
|
|
56
|
+
return FooterElement;
|
|
57
|
+
}(UIElement);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UIElement, UIElementConfig } from "../../UIElement";
|
|
3
|
+
export declare enum ElementID {
|
|
4
|
+
Logo = "headerLogo",
|
|
5
|
+
MenuButton = "headerMenuButton"
|
|
6
|
+
}
|
|
7
|
+
interface HeaderElementConfig extends UIElementConfig {
|
|
8
|
+
closeMenu: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class HeaderElement extends UIElement<HeaderElementConfig> {
|
|
11
|
+
constructor(id: string, config: HeaderElementConfig);
|
|
12
|
+
setLogo(logo: React.ReactElement): void;
|
|
13
|
+
setMenuButton(menuButton: React.ReactElement): void;
|
|
14
|
+
render(props?: any): React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _get from "@babel/runtime/helpers/get";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { UIElement } from "../../UIElement";
|
|
9
|
+
import { DrawerHeader } from "@webiny/ui/Drawer";
|
|
10
|
+
import { GenericElement } from "../../elements/GenericElement";
|
|
11
|
+
import { PlaceholderElement } from "../../elements/PlaceholderElement";
|
|
12
|
+
import { TopAppBarTitle } from "@webiny/ui/TopAppBar";
|
|
13
|
+
import { MenuHeader, navHeader } from "./Styled";
|
|
14
|
+
export var ElementID;
|
|
15
|
+
|
|
16
|
+
(function (ElementID) {
|
|
17
|
+
ElementID["Logo"] = "headerLogo";
|
|
18
|
+
ElementID["MenuButton"] = "headerMenuButton";
|
|
19
|
+
})(ElementID || (ElementID = {}));
|
|
20
|
+
|
|
21
|
+
export var HeaderElement = /*#__PURE__*/function (_UIElement) {
|
|
22
|
+
_inherits(HeaderElement, _UIElement);
|
|
23
|
+
|
|
24
|
+
var _super = _createSuper(HeaderElement);
|
|
25
|
+
|
|
26
|
+
function HeaderElement(id, config) {
|
|
27
|
+
var _this;
|
|
28
|
+
|
|
29
|
+
_classCallCheck(this, HeaderElement);
|
|
30
|
+
|
|
31
|
+
_this = _super.call(this, id, config);
|
|
32
|
+
|
|
33
|
+
_this.useGrid(false);
|
|
34
|
+
|
|
35
|
+
_this.addElement(new PlaceholderElement(ElementID.MenuButton));
|
|
36
|
+
|
|
37
|
+
_this.addElement(new PlaceholderElement(ElementID.Logo));
|
|
38
|
+
|
|
39
|
+
return _this;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
_createClass(HeaderElement, [{
|
|
43
|
+
key: "setLogo",
|
|
44
|
+
value: function setLogo(logo) {
|
|
45
|
+
this.getElement(ElementID.Logo).replaceWith(new GenericElement(ElementID.Logo, function () {
|
|
46
|
+
return /*#__PURE__*/React.createElement(TopAppBarTitle, null, logo);
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
key: "setMenuButton",
|
|
51
|
+
value: function setMenuButton(menuButton) {
|
|
52
|
+
this.getElement(ElementID.MenuButton).replaceWith(new GenericElement(ElementID.MenuButton, function () {
|
|
53
|
+
return menuButton;
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "render",
|
|
58
|
+
value: function render(props) {
|
|
59
|
+
return /*#__PURE__*/React.createElement(DrawerHeader, {
|
|
60
|
+
className: navHeader
|
|
61
|
+
}, /*#__PURE__*/React.createElement(MenuHeader, null, _get(_getPrototypeOf(HeaderElement.prototype), "render", this).call(this, props)));
|
|
62
|
+
}
|
|
63
|
+
}]);
|
|
64
|
+
|
|
65
|
+
return HeaderElement;
|
|
66
|
+
}(UIElement);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UIRenderer, UIRenderParams } from "../../UIRenderer";
|
|
3
|
+
import { NavigationView } from "../NavigationView";
|
|
4
|
+
export declare class NavigationViewRenderer extends UIRenderer<NavigationView> {
|
|
5
|
+
render({ element, children }: UIRenderParams<NavigationView>): React.ReactNode;
|
|
6
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 React from "react";
|
|
6
|
+
import { UIRenderer } from "../../UIRenderer";
|
|
7
|
+
import { Drawer } from "@webiny/ui/Drawer";
|
|
8
|
+
export var NavigationViewRenderer = /*#__PURE__*/function (_UIRenderer) {
|
|
9
|
+
_inherits(NavigationViewRenderer, _UIRenderer);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(NavigationViewRenderer);
|
|
12
|
+
|
|
13
|
+
function NavigationViewRenderer() {
|
|
14
|
+
_classCallCheck(this, NavigationViewRenderer);
|
|
15
|
+
|
|
16
|
+
return _super.apply(this, arguments);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_createClass(NavigationViewRenderer, [{
|
|
20
|
+
key: "render",
|
|
21
|
+
value: function render(_ref) {
|
|
22
|
+
var element = _ref.element,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
|
|
25
|
+
var _element$getNavigatio = element.getNavigationHook(),
|
|
26
|
+
menuIsShown = _element$getNavigatio.menuIsShown,
|
|
27
|
+
hideMenu = _element$getNavigatio.hideMenu;
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
30
|
+
modal: true,
|
|
31
|
+
open: menuIsShown(),
|
|
32
|
+
onClose: hideMenu
|
|
33
|
+
}, children());
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
|
|
37
|
+
return NavigationViewRenderer;
|
|
38
|
+
}(UIRenderer);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const MenuHeader: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultValue" | "id" | "onError" | "className" | "onChange" | "placeholder" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
3
|
+
export declare const navHeader: string;
|
|
4
|
+
export declare const navContent: string;
|
|
5
|
+
export declare const logoStyle: string;
|
|
6
|
+
export declare const MenuFooter: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultValue" | "id" | "onError" | "className" | "onChange" | "placeholder" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
7
|
+
export declare const subFooter: string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { css } from "emotion";
|
|
3
|
+
export var MenuHeader = /*#__PURE__*/styled("div", {
|
|
4
|
+
target: "e1b4rzuv0",
|
|
5
|
+
label: "MenuHeader"
|
|
6
|
+
})({
|
|
7
|
+
display: "flex",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
padding: 5,
|
|
10
|
+
backgroundColor: "var(--mdc-theme-surface)",
|
|
11
|
+
borderBottom: "1px solid var(--mdc-theme-on-background)"
|
|
12
|
+
});
|
|
13
|
+
export var navHeader = /*#__PURE__*/css({
|
|
14
|
+
padding: 0,
|
|
15
|
+
"&.mdc-drawer__header": {
|
|
16
|
+
padding: "0 !important",
|
|
17
|
+
minHeight: 0
|
|
18
|
+
}
|
|
19
|
+
}, "label:navHeader;");
|
|
20
|
+
export var navContent = /*#__PURE__*/css({
|
|
21
|
+
padding: "0 !important"
|
|
22
|
+
}, "label:navContent;");
|
|
23
|
+
export var logoStyle = /*#__PURE__*/css({
|
|
24
|
+
"&.mdc-top-app-bar__title": {
|
|
25
|
+
paddingLeft: 15,
|
|
26
|
+
".webiny-logo": {
|
|
27
|
+
color: "var(--mdc-theme-primary)"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, "label:logoStyle;");
|
|
31
|
+
export var MenuFooter = /*#__PURE__*/styled("div", {
|
|
32
|
+
target: "e1b4rzuv1",
|
|
33
|
+
label: "MenuFooter"
|
|
34
|
+
})({
|
|
35
|
+
borderTop: "1px solid var(--mdc-theme-on-background)",
|
|
36
|
+
a: {
|
|
37
|
+
color: "var(--mdc-theme-text-on-primary)",
|
|
38
|
+
textDecoration: "none"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export var subFooter = /*#__PURE__*/css({
|
|
42
|
+
".mdc-drawer &.mdc-list-item": {
|
|
43
|
+
borderTop: "1px solid var(--mdc-theme-on-background)",
|
|
44
|
+
padding: "10px 16px",
|
|
45
|
+
margin: 0
|
|
46
|
+
}
|
|
47
|
+
}, "label:subFooter;");
|