@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,183 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
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 _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
import { UIElement } from "../../UIElement";
|
|
9
|
+
export var FormFieldElement = /*#__PURE__*/function (_UIElement) {
|
|
10
|
+
_inherits(FormFieldElement, _UIElement);
|
|
11
|
+
|
|
12
|
+
var _super = _createSuper(FormFieldElement);
|
|
13
|
+
|
|
14
|
+
function FormFieldElement(id, config) {
|
|
15
|
+
var _this;
|
|
16
|
+
|
|
17
|
+
_classCallCheck(this, FormFieldElement);
|
|
18
|
+
|
|
19
|
+
_this = _super.call(this, id, config);
|
|
20
|
+
|
|
21
|
+
_defineProperty(_assertThisInitialized(_this), "_beforeChange", []);
|
|
22
|
+
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "_afterChange", []);
|
|
24
|
+
|
|
25
|
+
if (config.beforeChange) {
|
|
26
|
+
_this._beforeChange.push(config.beforeChange);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (config.afterChange) {
|
|
30
|
+
_this._afterChange.push(config.afterChange);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_this.applyPlugins(FormFieldElement);
|
|
34
|
+
|
|
35
|
+
return _this;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
_createClass(FormFieldElement, [{
|
|
39
|
+
key: "getName",
|
|
40
|
+
value: function getName() {
|
|
41
|
+
return this.config.name;
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "getValidators",
|
|
45
|
+
value: function getValidators(props) {
|
|
46
|
+
if (!this.config.validators || typeof this.config.validators !== "function") {
|
|
47
|
+
return function () {
|
|
48
|
+
return true;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return this.config.validators(props);
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
key: "getDefaultValue",
|
|
56
|
+
value: function getDefaultValue(props) {
|
|
57
|
+
if (typeof this.config.defaultValue === "function") {
|
|
58
|
+
return this.config.defaultValue(props);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return this.config.defaultValue;
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
key: "getLabel",
|
|
65
|
+
value: function getLabel(props) {
|
|
66
|
+
if (typeof this.config.label === "function") {
|
|
67
|
+
return this.config.label(props);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return this.config.label;
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "getDescription",
|
|
74
|
+
value: function getDescription(props) {
|
|
75
|
+
if (typeof this.config.description === "function") {
|
|
76
|
+
return this.config.description(props);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return this.config.description;
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
key: "getPlaceholder",
|
|
83
|
+
value: function getPlaceholder(props) {
|
|
84
|
+
if (typeof this.config.placeholder === "function") {
|
|
85
|
+
return this.config.placeholder(props);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return this.config.placeholder;
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
key: "setLabel",
|
|
92
|
+
value: function setLabel(label) {
|
|
93
|
+
this.config.label = label;
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
key: "setDescription",
|
|
97
|
+
value: function setDescription(description) {
|
|
98
|
+
this.config.description = description;
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "setPlaceholder",
|
|
102
|
+
value: function setPlaceholder(placeholder) {
|
|
103
|
+
this.config.placeholder = placeholder;
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "setDefaultValue",
|
|
107
|
+
value: function setDefaultValue(value) {
|
|
108
|
+
this.config.defaultValue = value;
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "getIsDisabled",
|
|
112
|
+
value: function getIsDisabled(props) {
|
|
113
|
+
if (typeof this.config.isDisabled === "function") {
|
|
114
|
+
return this.config.isDisabled(props);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return this.config.isDisabled;
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "setIsDisabled",
|
|
121
|
+
value: function setIsDisabled(isDisabled) {
|
|
122
|
+
this.config.isDisabled = isDisabled;
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: "setValidators",
|
|
126
|
+
value: function setValidators(validators) {
|
|
127
|
+
this.config.validators = validators;
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: "onBeforeChange",
|
|
131
|
+
value: function onBeforeChange(value, cb) {
|
|
132
|
+
var callbacks = _toConsumableArray(this._beforeChange);
|
|
133
|
+
|
|
134
|
+
var next = function next(value) {
|
|
135
|
+
if (!callbacks.length) {
|
|
136
|
+
cb(value);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
callbacks.pop()(value, next);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
next(value);
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
key: "onAfterChange",
|
|
147
|
+
value: function onAfterChange(value, form) {
|
|
148
|
+
var callbacks = _toConsumableArray(this._afterChange);
|
|
149
|
+
|
|
150
|
+
var next = function next(value) {
|
|
151
|
+
if (!callbacks.length) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
callbacks.pop()(value, form);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
next(value);
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "addBeforeChange",
|
|
162
|
+
value: function addBeforeChange(cb) {
|
|
163
|
+
this._beforeChange.push(cb);
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "addAfterChange",
|
|
167
|
+
value: function addAfterChange(cb) {
|
|
168
|
+
this._afterChange.push(cb);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "setBeforeChange",
|
|
172
|
+
value: function setBeforeChange(cb) {
|
|
173
|
+
this._beforeChange = [cb];
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
key: "setAfterChange",
|
|
177
|
+
value: function setAfterChange(cb) {
|
|
178
|
+
this._afterChange = [cb];
|
|
179
|
+
}
|
|
180
|
+
}]);
|
|
181
|
+
|
|
182
|
+
return FormFieldElement;
|
|
183
|
+
}(UIElement);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormFieldElement, FormFieldElementConfig, FormFieldElementRenderProps } from "./FormFieldElement";
|
|
3
|
+
export declare class HiddenElement extends FormFieldElement {
|
|
4
|
+
constructor(id: string, config: FormFieldElementConfig);
|
|
5
|
+
render(props: FormFieldElementRenderProps): React.ReactNode;
|
|
6
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { FormFieldElement } from "./FormFieldElement";
|
|
7
|
+
export var HiddenElement = /*#__PURE__*/function (_FormFieldElement) {
|
|
8
|
+
_inherits(HiddenElement, _FormFieldElement);
|
|
9
|
+
|
|
10
|
+
var _super = _createSuper(HiddenElement);
|
|
11
|
+
|
|
12
|
+
function HiddenElement(id, config) {
|
|
13
|
+
var _this;
|
|
14
|
+
|
|
15
|
+
_classCallCheck(this, HiddenElement);
|
|
16
|
+
|
|
17
|
+
_this = _super.call(this, id, config);
|
|
18
|
+
|
|
19
|
+
_this.applyPlugins(HiddenElement);
|
|
20
|
+
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_createClass(HiddenElement, [{
|
|
25
|
+
key: "render",
|
|
26
|
+
value: function render(props) {
|
|
27
|
+
var _this2 = this;
|
|
28
|
+
|
|
29
|
+
if (!props.formProps) {
|
|
30
|
+
throw Error("HiddenElement must be placed inside of a FormElement.");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var Bind = props.formProps.Bind;
|
|
34
|
+
return /*#__PURE__*/React.createElement(Bind, {
|
|
35
|
+
name: this.getName(),
|
|
36
|
+
validators: this.getValidators(props),
|
|
37
|
+
defaultValue: this.getDefaultValue(props),
|
|
38
|
+
beforeChange: function beforeChange(value, cb) {
|
|
39
|
+
return _this2.onBeforeChange(value, cb);
|
|
40
|
+
},
|
|
41
|
+
afterChange: function afterChange(value, form) {
|
|
42
|
+
return _this2.onAfterChange(value, form);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}]);
|
|
47
|
+
|
|
48
|
+
return HiddenElement;
|
|
49
|
+
}(FormFieldElement);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormFieldElement, FormFieldElementConfig, FormFieldElementRenderProps } from "./FormFieldElement";
|
|
3
|
+
export declare class InputElement extends FormFieldElement {
|
|
4
|
+
constructor(id: string, config: FormFieldElementConfig);
|
|
5
|
+
render(props: FormFieldElementRenderProps): React.ReactNode;
|
|
6
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { Input } from "@webiny/ui/Input";
|
|
7
|
+
import { FormFieldElement } from "./FormFieldElement";
|
|
8
|
+
export var InputElement = /*#__PURE__*/function (_FormFieldElement) {
|
|
9
|
+
_inherits(InputElement, _FormFieldElement);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(InputElement);
|
|
12
|
+
|
|
13
|
+
function InputElement(id, config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, InputElement);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this, id, config);
|
|
19
|
+
|
|
20
|
+
_this.applyPlugins(InputElement);
|
|
21
|
+
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_createClass(InputElement, [{
|
|
26
|
+
key: "render",
|
|
27
|
+
value: function render(props) {
|
|
28
|
+
var _this2 = this;
|
|
29
|
+
|
|
30
|
+
if (!props.formProps) {
|
|
31
|
+
throw Error("InputElement must be placed inside of a FormElement.");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var Bind = props.formProps.Bind;
|
|
35
|
+
return /*#__PURE__*/React.createElement(Bind, {
|
|
36
|
+
name: this.getName(),
|
|
37
|
+
validators: this.getValidators(props),
|
|
38
|
+
defaultValue: this.getDefaultValue(props),
|
|
39
|
+
beforeChange: function beforeChange(value, cb) {
|
|
40
|
+
return _this2.onBeforeChange(value, cb);
|
|
41
|
+
},
|
|
42
|
+
afterChange: function afterChange(value, form) {
|
|
43
|
+
return _this2.onAfterChange(value, form);
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
46
|
+
label: this.getLabel(props),
|
|
47
|
+
placeholder: this.getPlaceholder(props),
|
|
48
|
+
disabled: this.getIsDisabled(props),
|
|
49
|
+
description: this.getDescription(props)
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
}]);
|
|
53
|
+
|
|
54
|
+
return InputElement;
|
|
55
|
+
}(FormFieldElement);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputElement } from "./InputElement";
|
|
3
|
+
import { FormFieldElementRenderProps } from "./FormFieldElement";
|
|
4
|
+
export declare class PasswordElement extends InputElement {
|
|
5
|
+
render(props: FormFieldElementRenderProps): React.ReactElement;
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { InputElement } from "./InputElement";
|
|
7
|
+
import { Input } from "@webiny/ui/Input";
|
|
8
|
+
export var PasswordElement = /*#__PURE__*/function (_InputElement) {
|
|
9
|
+
_inherits(PasswordElement, _InputElement);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(PasswordElement);
|
|
12
|
+
|
|
13
|
+
function PasswordElement() {
|
|
14
|
+
_classCallCheck(this, PasswordElement);
|
|
15
|
+
|
|
16
|
+
return _super.apply(this, arguments);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_createClass(PasswordElement, [{
|
|
20
|
+
key: "render",
|
|
21
|
+
value: function render(props) {
|
|
22
|
+
var _this = this;
|
|
23
|
+
|
|
24
|
+
if (!props.formProps) {
|
|
25
|
+
throw Error("PasswordElement must be placed inside of a FormElement.");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var Bind = props.formProps.Bind;
|
|
29
|
+
return /*#__PURE__*/React.createElement(Bind, {
|
|
30
|
+
name: this.getName(),
|
|
31
|
+
validators: this.getValidators(props),
|
|
32
|
+
defaultValue: this.getDefaultValue(props),
|
|
33
|
+
beforeChange: function beforeChange(value, cb) {
|
|
34
|
+
return _this.onBeforeChange(value, cb);
|
|
35
|
+
},
|
|
36
|
+
afterChange: function afterChange(value, form) {
|
|
37
|
+
return _this.onAfterChange(value, form);
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
40
|
+
type: "password",
|
|
41
|
+
label: this.getLabel(props),
|
|
42
|
+
placeholder: this.getPlaceholder(props),
|
|
43
|
+
disabled: this.getIsDisabled(props),
|
|
44
|
+
description: this.getDescription(props)
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
}]);
|
|
48
|
+
|
|
49
|
+
return PasswordElement;
|
|
50
|
+
}(InputElement);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
This folder (`elements/form`) contains elements that are specifically designed to work within a `FormElement`.
|
|
2
|
+
They assume that there is a [Form](../../../../../form/src/Form.tsx) component sitting somewhere above them in the component hierarchy, and will throw errors if `formProps` are not found in the `props` of their `render()` method.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormFieldElement, FormFieldElementConfig, FormFieldElementRenderProps } from "./FormFieldElement";
|
|
3
|
+
export interface SelectElementOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectElementConfig extends FormFieldElementConfig {
|
|
8
|
+
options?: SelectElementOption[];
|
|
9
|
+
}
|
|
10
|
+
export declare class SelectElement extends FormFieldElement<SelectElementConfig> {
|
|
11
|
+
constructor(id: string, config: SelectElementConfig);
|
|
12
|
+
setOptions(options: SelectElementOption[]): void;
|
|
13
|
+
getOptions(): SelectElementOption[];
|
|
14
|
+
render(props: FormFieldElementRenderProps): React.ReactNode;
|
|
15
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { Select } from "@webiny/ui/Select";
|
|
7
|
+
import { FormFieldElement } from "./FormFieldElement";
|
|
8
|
+
export var SelectElement = /*#__PURE__*/function (_FormFieldElement) {
|
|
9
|
+
_inherits(SelectElement, _FormFieldElement);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(SelectElement);
|
|
12
|
+
|
|
13
|
+
function SelectElement(id, config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, SelectElement);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this, id, config);
|
|
19
|
+
|
|
20
|
+
_this.applyPlugins(SelectElement);
|
|
21
|
+
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_createClass(SelectElement, [{
|
|
26
|
+
key: "setOptions",
|
|
27
|
+
value: function setOptions(options) {
|
|
28
|
+
this.config.options = options;
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
key: "getOptions",
|
|
32
|
+
value: function getOptions() {
|
|
33
|
+
return this.config.options;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "render",
|
|
37
|
+
value: function render(props) {
|
|
38
|
+
var _this2 = this;
|
|
39
|
+
|
|
40
|
+
if (!props.formProps) {
|
|
41
|
+
throw Error("SelectElement must be placed inside of a FormElement.");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var Bind = props.formProps.Bind;
|
|
45
|
+
return /*#__PURE__*/React.createElement(Bind, {
|
|
46
|
+
name: this.getName(),
|
|
47
|
+
validators: this.getValidators(props),
|
|
48
|
+
defaultValue: this.getDefaultValue(props),
|
|
49
|
+
beforeChange: function beforeChange(value, cb) {
|
|
50
|
+
return _this2.onBeforeChange(value, cb);
|
|
51
|
+
},
|
|
52
|
+
afterChange: function afterChange(value, form) {
|
|
53
|
+
return _this2.onAfterChange(value, form);
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
56
|
+
label: this.getLabel(props),
|
|
57
|
+
disabled: this.getIsDisabled(props),
|
|
58
|
+
description: this.getDefaultValue(props)
|
|
59
|
+
}, this.getOptions().map(function (_ref) {
|
|
60
|
+
var value = _ref.value,
|
|
61
|
+
label = _ref.label;
|
|
62
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
63
|
+
key: value,
|
|
64
|
+
value: value
|
|
65
|
+
}, label);
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
}]);
|
|
69
|
+
|
|
70
|
+
return SelectElement;
|
|
71
|
+
}(FormFieldElement);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormRenderPropParams } from "@webiny/form";
|
|
3
|
+
import { FormFieldElement, FormFieldElementConfig } from "./FormFieldElement";
|
|
4
|
+
export interface TextareaElementRenderProps {
|
|
5
|
+
formProps: FormRenderPropParams;
|
|
6
|
+
}
|
|
7
|
+
export interface TextareaElementConfig extends FormFieldElementConfig {
|
|
8
|
+
rows: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class TextareaElement extends FormFieldElement<TextareaElementConfig> {
|
|
11
|
+
constructor(id: string, config: TextareaElementConfig);
|
|
12
|
+
setRows(rows: number): void;
|
|
13
|
+
getRows(): number;
|
|
14
|
+
render(props: TextareaElementRenderProps): React.ReactNode;
|
|
15
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { Input } from "@webiny/ui/Input";
|
|
7
|
+
import { FormFieldElement } from "./FormFieldElement";
|
|
8
|
+
export var TextareaElement = /*#__PURE__*/function (_FormFieldElement) {
|
|
9
|
+
_inherits(TextareaElement, _FormFieldElement);
|
|
10
|
+
|
|
11
|
+
var _super = _createSuper(TextareaElement);
|
|
12
|
+
|
|
13
|
+
function TextareaElement(id, config) {
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
_classCallCheck(this, TextareaElement);
|
|
17
|
+
|
|
18
|
+
_this = _super.call(this, id, config);
|
|
19
|
+
|
|
20
|
+
_this.applyPlugins(TextareaElement);
|
|
21
|
+
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_createClass(TextareaElement, [{
|
|
26
|
+
key: "setRows",
|
|
27
|
+
value: function setRows(rows) {
|
|
28
|
+
this.config.rows = rows;
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
key: "getRows",
|
|
32
|
+
value: function getRows() {
|
|
33
|
+
return this.config.rows;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "render",
|
|
37
|
+
value: function render(props) {
|
|
38
|
+
if (!props.formProps) {
|
|
39
|
+
throw Error("TextareaElement must be placed inside of a FormElement.");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var Bind = props.formProps.Bind;
|
|
43
|
+
return /*#__PURE__*/React.createElement(Bind, {
|
|
44
|
+
name: this.getName(),
|
|
45
|
+
validators: this.getValidators(props)
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
47
|
+
label: this.getLabel(props),
|
|
48
|
+
disabled: this.getIsDisabled(props),
|
|
49
|
+
rows: this.getRows(),
|
|
50
|
+
description: this.getDescription(props)
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
}]);
|
|
54
|
+
|
|
55
|
+
return TextareaElement;
|
|
56
|
+
}(FormFieldElement);
|
|
@@ -0,0 +1,62 @@
|
|
|
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 styled from "@emotion/styled";
|
|
7
|
+
import { UIElement } from "../../UIElement";
|
|
8
|
+
import { UIRenderer } from "../../UIRenderer";
|
|
9
|
+
var ContentWrapper = /*#__PURE__*/styled("div", {
|
|
10
|
+
target: "enpnxwx0",
|
|
11
|
+
label: "ContentWrapper"
|
|
12
|
+
})({
|
|
13
|
+
width: "100%",
|
|
14
|
+
paddingTop: 67
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var ContentElementRenderer = /*#__PURE__*/function (_UIRenderer) {
|
|
18
|
+
_inherits(ContentElementRenderer, _UIRenderer);
|
|
19
|
+
|
|
20
|
+
var _super = _createSuper(ContentElementRenderer);
|
|
21
|
+
|
|
22
|
+
function ContentElementRenderer() {
|
|
23
|
+
_classCallCheck(this, ContentElementRenderer);
|
|
24
|
+
|
|
25
|
+
return _super.apply(this, arguments);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_createClass(ContentElementRenderer, [{
|
|
29
|
+
key: "render",
|
|
30
|
+
value: function render(_ref) {
|
|
31
|
+
var next = _ref.next,
|
|
32
|
+
props = _ref.props;
|
|
33
|
+
return /*#__PURE__*/React.createElement(ContentWrapper, null, props.children ? props.children : next());
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
|
|
37
|
+
return ContentElementRenderer;
|
|
38
|
+
}(UIRenderer);
|
|
39
|
+
|
|
40
|
+
export var ContentElement = /*#__PURE__*/function (_UIElement) {
|
|
41
|
+
_inherits(ContentElement, _UIElement);
|
|
42
|
+
|
|
43
|
+
var _super2 = _createSuper(ContentElement);
|
|
44
|
+
|
|
45
|
+
function ContentElement(id) {
|
|
46
|
+
var _this;
|
|
47
|
+
|
|
48
|
+
_classCallCheck(this, ContentElement);
|
|
49
|
+
|
|
50
|
+
_this = _super2.call(this, id);
|
|
51
|
+
|
|
52
|
+
_this.useGrid(false);
|
|
53
|
+
|
|
54
|
+
_this.addRenderer(new ContentElementRenderer());
|
|
55
|
+
|
|
56
|
+
_this.applyPlugins(ContentElement);
|
|
57
|
+
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return ContentElement;
|
|
62
|
+
}(UIElement);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UIElement } from "../../UIElement";
|
|
3
|
+
import { HeaderSectionLeftElement } from "./HeaderSectionLeftElement";
|
|
4
|
+
import { HeaderSectionCenterElement } from "./HeaderSectionCenterElement";
|
|
5
|
+
import { HeaderSectionRightElement } from "./HeaderSectionRightElement";
|
|
6
|
+
export declare class HeaderElement extends UIElement {
|
|
7
|
+
constructor(id: string);
|
|
8
|
+
getLeftSection(): HeaderSectionLeftElement;
|
|
9
|
+
getCenterSection(): HeaderSectionCenterElement;
|
|
10
|
+
getRightSection(): HeaderSectionRightElement;
|
|
11
|
+
setLogo(logo: React.ReactElement): void;
|
|
12
|
+
setMenuButton(menuButton: React.ReactElement): void;
|
|
13
|
+
}
|