@webiny/app-admin 0.0.0-unstable.990c3ab1b6 → 0.0.0-unstable.aa00eecd97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/add-18px.svg +1 -1
- package/assets/icons/arrow_drop_down-24px.svg +1 -1
- package/assets/icons/filter-24px.svg +1 -1
- package/assets/icons/highlight-24px.svg +1 -1
- package/assets/icons/info.svg +1 -1
- package/assets/icons/insert_drive_file-24px.svg +1 -1
- package/assets/icons/insert_photo-24px.svg +1 -1
- package/assets/icons/label-24px.svg +1 -1
- package/assets/icons/round-account_circle-24px.svg +1 -1
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
- package/assets/icons/round-help-24px.svg +1 -1
- package/assets/icons/round-settings-24px.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.js +6 -6
- package/base/Admin.js.map +1 -1
- package/base/Base.js +8 -27
- package/base/Base.js.map +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +5 -1
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/ui/Brand.d.ts +2 -2
- package/base/ui/Brand.js +3 -3
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/Dashboard.d.ts +2 -2
- package/base/ui/Dashboard.js +3 -3
- package/base/ui/Dashboard.js.map +1 -1
- package/{components → base/ui}/FileManager.d.ts +6 -6
- package/base/ui/FileManager.js +61 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +2 -2
- package/base/ui/Layout.js +3 -3
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LocaleSelector.d.ts +2 -2
- package/base/ui/LocaleSelector.js +3 -3
- package/base/ui/LocaleSelector.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +1 -1
- package/base/ui/LoginScreen.js +2 -2
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +2 -2
- package/base/ui/Logo.js +4 -4
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +3 -3
- package/base/ui/Navigation.js +5 -5
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +2 -2
- package/base/ui/NotFound.js +3 -3
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Search.d.ts +2 -2
- package/base/ui/Search.js +3 -3
- package/base/ui/Search.js.map +1 -1
- package/base/ui/UserMenu.d.ts +7 -7
- package/base/ui/UserMenu.js +8 -8
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AppInstaller/AppInstaller.js +2 -34
- package/components/AppInstaller/AppInstaller.js.map +1 -1
- package/components/AppInstaller/Sidebar.js +2 -12
- package/components/AppInstaller/Sidebar.js.map +1 -1
- package/components/AppInstaller/styled.d.ts +17 -5
- package/components/AppInstaller/useInstaller.d.ts +1 -7
- package/components/AppInstaller/useInstaller.js +60 -119
- package/components/AppInstaller/useInstaller.js.map +1 -1
- package/components/EmptyView.js +1 -1
- package/components/EmptyView.js.map +1 -1
- package/components/FloatingActionButton.js +2 -2
- package/components/FloatingActionButton.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.js +2 -2
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +2 -0
- package/components/Permissions/Permissions.js +11 -2
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/SearchUI.d.ts +1 -0
- package/components/SearchUI.js +11 -3
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.js +3 -12
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +2 -0
- package/components/SimpleUI/InputField.js +3 -1
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +1 -1
- package/components/SingleImageUpload.js +2 -2
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.js +1 -0
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/components/index.js.map +1 -1
- package/hooks/useConfirmationDialog.d.ts +3 -1
- package/hooks/useConfirmationDialog.js +10 -6
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/index.d.ts +4 -5
- package/index.js +5 -17
- package/index.js.map +1 -1
- package/package.json +34 -45
- package/plugins/globalSearch/SearchBar.js +2 -2
- package/plugins/globalSearch/SearchBar.js.map +1 -1
- package/plugins/globalSearch/SearchBarDropdown.js +2 -2
- package/plugins/globalSearch/SearchBarDropdown.js.map +1 -1
- package/plugins/globalSearch/styled.d.ts +13 -4
- package/styles/material-theme-assignments.scss +4 -0
- package/styles/theme.scss +31 -1
- package/types.d.ts +25 -27
- package/types.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +5 -5
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +15 -5
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +23 -16
- package/ui/views/AdminView/components/Hamburger.js +2 -2
- package/ui/views/AdminView/components/Hamburger.js.map +1 -1
- package/ui/views/OverlayView/HeaderElement.js +1 -1
- package/ui/views/OverlayView/HeaderElement.js.map +1 -1
- package/ui/views/OverlayView.js +1 -1
- package/ui/views/OverlayView.js.map +1 -1
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -41
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -51
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
- package/components/FileManager/BottomInfoBar.d.ts +0 -5
- package/components/FileManager/BottomInfoBar.js +0 -48
- package/components/FileManager/BottomInfoBar.js.map +0 -1
- package/components/FileManager/DropFilesHere.d.ts +0 -10
- package/components/FileManager/DropFilesHere.js +0 -67
- package/components/FileManager/DropFilesHere.js.map +0 -1
- package/components/FileManager/File.d.ts +0 -17
- package/components/FileManager/File.js +0 -142
- package/components/FileManager/File.js.map +0 -1
- package/components/FileManager/FileDetails/Name.d.ts +0 -8
- package/components/FileManager/FileDetails/Name.js +0 -110
- package/components/FileManager/FileDetails/Name.js.map +0 -1
- package/components/FileManager/FileDetails/Tags.d.ts +0 -10
- package/components/FileManager/FileDetails/Tags.js +0 -288
- package/components/FileManager/FileDetails/Tags.js.map +0 -1
- package/components/FileManager/FileDetails.d.ts +0 -24
- package/components/FileManager/FileDetails.js +0 -409
- package/components/FileManager/FileDetails.js.map +0 -1
- package/components/FileManager/FileManagerContext.d.ts +0 -42
- package/components/FileManager/FileManagerContext.js +0 -191
- package/components/FileManager/FileManagerContext.js.map +0 -1
- package/components/FileManager/FileManagerView.d.ts +0 -18
- package/components/FileManager/FileManagerView.js +0 -621
- package/components/FileManager/FileManagerView.js.map +0 -1
- package/components/FileManager/LeftSidebar.d.ts +0 -10
- package/components/FileManager/LeftSidebar.js +0 -108
- package/components/FileManager/LeftSidebar.js.map +0 -1
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -74
- package/components/FileManager/NoPermissionView.js.map +0 -1
- package/components/FileManager/NoResults.d.ts +0 -3
- package/components/FileManager/NoResults.js +0 -22
- package/components/FileManager/NoResults.js.map +0 -1
- package/components/FileManager/getFileTypePlugin.d.ts +0 -4
- package/components/FileManager/getFileTypePlugin.js +0 -51
- package/components/FileManager/getFileTypePlugin.js.map +0 -1
- package/components/FileManager/getFileUploader.d.ts +0 -3
- package/components/FileManager/getFileUploader.js +0 -15
- package/components/FileManager/getFileUploader.js.map +0 -1
- package/components/FileManager/graphql.d.ts +0 -96
- package/components/FileManager/graphql.js +0 -47
- package/components/FileManager/graphql.js.map +0 -1
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -7
- package/components/FileManager/outputFileSelectionError.js +0 -40
- package/components/FileManager/outputFileSelectionError.js.map +0 -1
- package/components/FileManager/types.d.ts +0 -21
- package/components/FileManager/types.js +0 -5
- package/components/FileManager/types.js.map +0 -1
- package/components/FileManager.js +0 -118
- package/components/FileManager.js.map +0 -1
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -48
- package/plugins/FileManagerFileTypePlugin.js.map +0 -1
- package/plugins/fileManager/fileDefault.d.ts +0 -2
- package/plugins/fileManager/fileDefault.js +0 -28
- package/plugins/fileManager/fileDefault.js.map +0 -1
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -61
- package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
- package/plugins/fileManager/fileImage/EditAction.js +0 -145
- package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
- package/plugins/fileManager/fileImage/index.d.ts +0 -2
- package/plugins/fileManager/fileImage/index.js +0 -38
- package/plugins/fileManager/fileImage/index.js.map +0 -1
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -19
- package/plugins/fileManager/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SimpleFormContainer","styled","position","margin","header","css","borderBottom","color","title","display","alignItems","actions","justifyContent","icon","marginRight","footer","
|
|
1
|
+
{"version":3,"names":["SimpleFormContainer","styled","position","margin","header","css","borderBottom","color","title","display","alignItems","actions","justifyContent","icon","marginRight","footer","SimpleForm","props","classNames","className","noElevation","children","SimpleFormHeader","SimpleFormFooter","SimpleFormContent"],"sources":["SimpleForm.tsx"],"sourcesContent":["import * as React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { Elevation } from \"@webiny/ui/Elevation\";\nimport { Icon } from \"@webiny/ui/Icon\";\n\nconst SimpleFormContainer = styled(\"div\")({\n position: \"relative\",\n margin: \"17px 50px\"\n});\n\nconst header = css({\n borderBottom: \"1px solid var(--mdc-theme-on-background)\",\n color: \"var(--mdc-theme-text-primary-on-background)\"\n});\n\nconst title = css({\n display: \"flex\",\n alignItems: \"center\"\n});\n\nconst actions = css({\n display: \"flex\",\n justifyContent: \"flex-end\",\n alignItems: \"center\"\n});\n\nconst icon = css({\n marginRight: 15,\n color: \"var(--mdc-theme-text-primary-on-background)\"\n});\n\nconst footer = css`\n display: flex;\n justify-content: flex-end;\n flex-wrap: wrap;\n border-top: 1px solid var(--mdc-theme-on-background);\n padding: 24px;\n box-sizing: border-box;\n min-height: 52px;\n button:last-of-type {\n margin-left: 8px;\n }\n`;\n\ninterface SimpleFormProps {\n children: React.ReactNode;\n \"data-testid\"?: string;\n noElevation?: boolean;\n className?: string;\n}\nexport const SimpleForm: React.FC<SimpleFormProps> = props => {\n return (\n <SimpleFormContainer\n className={classNames(\"webiny-data-list\", props.className)}\n data-testid={props[\"data-testid\"]}\n >\n {props.noElevation ? props.children : <Elevation z={1}>{props.children}</Elevation>}\n </SimpleFormContainer>\n );\n};\n\ninterface SimpleFormHeaderProps {\n title: React.ReactNode;\n icon?: React.ReactElement<any>;\n children?: React.ReactNode;\n}\nexport const SimpleFormHeader: React.FC<SimpleFormHeaderProps> = props => {\n return (\n <Grid className={header}>\n <Cell span={props.children ? 6 : 12} className={title}>\n <React.Fragment>\n {props.icon && <Icon className={icon} icon={props.icon} />}\n <Typography use=\"headline5\">{props.title}</Typography>\n </React.Fragment>\n </Cell>\n {props.children && (\n <Cell span={6} className={actions}>\n {props.children}\n </Cell>\n )}\n </Grid>\n );\n};\n\ninterface SimpleFormFooterProps {\n children: React.ReactNode;\n className?: string;\n}\nexport const SimpleFormFooter: React.FC<SimpleFormFooterProps> = props => {\n return <div className={classNames(footer, props.className)}>{props.children}</div>;\n};\n\nexport const SimpleFormContent: React.FC = props => {\n return props.children as unknown as React.ReactElement;\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMA,mBAAmB,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACtCC,QAAQ,EAAE,UAAU;EACpBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEF,IAAMC,MAAM,gBAAG,IAAAC,YAAG,EAAC;EACfC,YAAY,EAAE,0CAA0C;EACxDC,KAAK,EAAE;AACX,CAAC,kBAAC;AAEF,IAAMC,KAAK,gBAAG,IAAAH,YAAG,EAAC;EACdI,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE;AAChB,CAAC,iBAAC;AAEF,IAAMC,OAAO,gBAAG,IAAAN,YAAG,EAAC;EAChBI,OAAO,EAAE,MAAM;EACfG,cAAc,EAAE,UAAU;EAC1BF,UAAU,EAAE;AAChB,C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AC,mBAAU,EAACH,MAAM,EAAEE,KAAK,CAACE,SAAS;EAAE,GAAEF,KAAK,CAACI,QAAQ,CAAO;AACtF,CAAC;AAAC;AAEK,IAAMG,iBAA2B,GAAG,SAA9BA,iBAA2B,CAAGP,KAAK,EAAI;EAChD,OAAOA,KAAK,CAACI,QAAQ;AACzB,CAAC;AAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="web" />
|
|
1
2
|
import React from "react";
|
|
2
3
|
interface InputBoxProps {
|
|
3
4
|
value?: string | number;
|
|
4
5
|
onChange?: (value: any) => void;
|
|
6
|
+
onKeyDown?: (e: React.SyntheticEvent<HTMLInputElement>) => any;
|
|
5
7
|
defaultValue?: string | number;
|
|
6
8
|
type?: "string" | "number";
|
|
7
9
|
[key: string]: any;
|
|
@@ -12,7 +12,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
12
12
|
var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
13
13
|
var _Typography = require("@webiny/ui/Typography");
|
|
14
14
|
var _FormElementMessage = require("@webiny/ui/FormElementMessage");
|
|
15
|
-
var _excluded = ["className", "value", "onChange", "label", "description", "validation", "defaultValue"];
|
|
15
|
+
var _excluded = ["className", "value", "onChange", "onKeyDown", "label", "description", "validation", "defaultValue"];
|
|
16
16
|
var inputStyle = /*#__PURE__*/(0, _emotion.css)({
|
|
17
17
|
boxSizing: "border-box",
|
|
18
18
|
border: "1px solid var(--mdc-theme-on-background)",
|
|
@@ -66,6 +66,7 @@ var InputField = function InputField(_ref) {
|
|
|
66
66
|
var className = _ref.className,
|
|
67
67
|
value = _ref.value,
|
|
68
68
|
_onChange = _ref.onChange,
|
|
69
|
+
onKeyDown = _ref.onKeyDown,
|
|
69
70
|
label = _ref.label,
|
|
70
71
|
description = _ref.description,
|
|
71
72
|
_ref$validation = _ref.validation,
|
|
@@ -86,6 +87,7 @@ var InputField = function InputField(_ref) {
|
|
|
86
87
|
type: props.type || "string",
|
|
87
88
|
defaultValue: defaultValue
|
|
88
89
|
}),
|
|
90
|
+
onKeyDown: onKeyDown,
|
|
89
91
|
onChange: function onChange(ev) {
|
|
90
92
|
if (!_onChange) {
|
|
91
93
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["inputStyle","css","boxSizing","border","width","height","padding","textAlign","minHeight","backgroundColor","transition","opacity","cursor","WebkitAppearance","margin","labelStyle","marginBottom","color","getValue","params","value","defaultValue","type","isNaN","InputField","className","onChange","label","description","validation","isValid","props","classNames","ev","target","toLowerCase","omit","message","React","memo"],"sources":["InputField.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\n\nconst inputStyle = css({\n boxSizing: \"border-box\",\n border: \"1px solid var(--mdc-theme-on-background)\",\n width: \"100%\",\n height: \"100%\",\n padding: \"4px 8px\",\n textAlign: \"left\",\n minHeight: 32,\n backgroundColor: \"var(--mdc-theme-surface)\",\n transition: \"150ms all ease-in-out\",\n \"&:focus:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:hover:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:disabled\": {\n opacity: 0.5,\n cursor: \"not-allowed\"\n },\n\n \"&.text-center\": {\n textAlign: \"center\",\n padding: 4\n },\n\n \"&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n },\n \"&::-webkit-outer-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n }\n});\n\nconst labelStyle = css({\n marginBottom: 8,\n padding: \"0px 8px\",\n \"& span\": {\n color: \"var(--mdc-theme-text-primary-on-background)\"\n }\n});\n\ninterface GetValueParams {\n value: string | number | undefined;\n defaultValue: string | number;\n type: \"number\" | \"string\";\n}\nconst getValue = (params: GetValueParams): string => {\n const { value, defaultValue, type } = params;\n if (type === \"number\") {\n return (isNaN(value as number) ? defaultValue : value) as string;\n }\n return (value || defaultValue) as string;\n};\n\ninterface InputBoxProps {\n value?: string | number;\n onChange?: (value: any) => void;\n defaultValue?: string | number;\n type?: \"string\" | \"number\";\n [key: string]: any;\n}\nconst InputField: React.FC<InputBoxProps> = ({\n className,\n value,\n onChange,\n label,\n description,\n validation = { isValid: true },\n defaultValue = \"\",\n ...props\n}) => {\n return (\n <React.Fragment>\n {label && (\n <div className={labelStyle}>\n <Typography use={\"body2\"}>{label}</Typography>\n </div>\n )}\n <input\n className={classNames(inputStyle, className)}\n value={getValue({\n value,\n type: props.type || \"string\",\n defaultValue\n })}\n onChange={ev => {\n if (!onChange) {\n return;\n }\n onChange((ev.target.value || \"\").toLowerCase());\n }}\n {...omit(props, \"validate\")}\n />\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </React.Fragment>\n );\n};\n\nexport default React.memo(InputField);\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAmE;AAEnE,IAAMA,UAAU,gBAAG,IAAAC,YAAG,EAAC;EACnBC,SAAS,EAAE,YAAY;EACvBC,MAAM,EAAE,0CAA0C;EAClDC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,MAAM;EACjBC,SAAS,EAAE,EAAE;EACbC,eAAe,EAAE,0BAA0B;EAC3CC,UAAU,EAAE,uBAAuB;EACnC,wBAAwB,EAAE;IACtBD,eAAe,EAAE;EACrB,CAAC;EACD,wBAAwB,EAAE;IACtBA,eAAe,EAAE;EACrB,CAAC;EACD,YAAY,EAAE;IACVE,OAAO,EAAE,GAAG;IACZC,MAAM,EAAE;EACZ,CAAC;EAED,eAAe,EAAE;IACbL,SAAS,EAAE,QAAQ;IACnBD,OAAO,EAAE;EACb,CAAC;EAED,8BAA8B,EAAE;IAC5BO,gBAAgB,EAAE,MAAM;IACxBC,MAAM,EAAE;EACZ,CAAC;EACD,8BAA8B,EAAE;IAC5BD,gBAAgB,EAAE,MAAM;IACxBC,MAAM,EAAE;EACZ;AACJ,CAAC,sBAAC;AAEF,IAAMC,UAAU,gBAAG,IAAAd,YAAG,EAAC;EACnBe,YAAY,EAAE,CAAC;EACfV,OAAO,EAAE,SAAS;EAClB,QAAQ,EAAE;IACNW,KAAK,EAAE;EACX;AACJ,CAAC,sBAAC;AAOF,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,MAAsB,EAAa;EACjD,IAAQC,KAAK,GAAyBD,MAAM,CAApCC,KAAK;IAAEC,YAAY,GAAWF,MAAM,CAA7BE,YAAY;IAAEC,IAAI,GAAKH,MAAM,CAAfG,IAAI;EACjC,IAAIA,IAAI,KAAK,QAAQ,EAAE;IACnB,OAAQC,KAAK,CAACH,KAAK,CAAW,GAAGC,YAAY,GAAGD,KAAK;EACzD;EACA,OAAQA,KAAK,IAAIC,YAAY;AACjC,CAAC;
|
|
1
|
+
{"version":3,"names":["inputStyle","css","boxSizing","border","width","height","padding","textAlign","minHeight","backgroundColor","transition","opacity","cursor","WebkitAppearance","margin","labelStyle","marginBottom","color","getValue","params","value","defaultValue","type","isNaN","InputField","className","onChange","onKeyDown","label","description","validation","isValid","props","classNames","ev","target","toLowerCase","omit","message","React","memo"],"sources":["InputField.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\n\nconst inputStyle = css({\n boxSizing: \"border-box\",\n border: \"1px solid var(--mdc-theme-on-background)\",\n width: \"100%\",\n height: \"100%\",\n padding: \"4px 8px\",\n textAlign: \"left\",\n minHeight: 32,\n backgroundColor: \"var(--mdc-theme-surface)\",\n transition: \"150ms all ease-in-out\",\n \"&:focus:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:hover:not(:disabled)\": {\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&:disabled\": {\n opacity: 0.5,\n cursor: \"not-allowed\"\n },\n\n \"&.text-center\": {\n textAlign: \"center\",\n padding: 4\n },\n\n \"&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n },\n \"&::-webkit-outer-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0\n }\n});\n\nconst labelStyle = css({\n marginBottom: 8,\n padding: \"0px 8px\",\n \"& span\": {\n color: \"var(--mdc-theme-text-primary-on-background)\"\n }\n});\n\ninterface GetValueParams {\n value: string | number | undefined;\n defaultValue: string | number;\n type: \"number\" | \"string\";\n}\nconst getValue = (params: GetValueParams): string => {\n const { value, defaultValue, type } = params;\n if (type === \"number\") {\n return (isNaN(value as number) ? defaultValue : value) as string;\n }\n return (value || defaultValue) as string;\n};\n\ninterface InputBoxProps {\n value?: string | number;\n onChange?: (value: any) => void;\n onKeyDown?: (e: React.SyntheticEvent<HTMLInputElement>) => any;\n defaultValue?: string | number;\n type?: \"string\" | \"number\";\n [key: string]: any;\n}\nconst InputField: React.FC<InputBoxProps> = ({\n className,\n value,\n onChange,\n onKeyDown,\n label,\n description,\n validation = { isValid: true },\n defaultValue = \"\",\n ...props\n}) => {\n return (\n <React.Fragment>\n {label && (\n <div className={labelStyle}>\n <Typography use={\"body2\"}>{label}</Typography>\n </div>\n )}\n <input\n className={classNames(inputStyle, className)}\n value={getValue({\n value,\n type: props.type || \"string\",\n defaultValue\n })}\n onKeyDown={onKeyDown}\n onChange={ev => {\n if (!onChange) {\n return;\n }\n onChange((ev.target.value || \"\").toLowerCase());\n }}\n {...omit(props, \"validate\")}\n />\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\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ACY;AAEzB,CAAC;AAAC,4BAEaU,cAAK,CAACC,IAAI,CAAChB,UAAU,CAAC;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { FileManagerFileItem } from "
|
|
2
|
+
import { FileManagerFileItem } from "../index";
|
|
3
3
|
import { FormComponentProps } from "@webiny/ui/types";
|
|
4
4
|
export interface SingleImageUploadProps extends FormComponentProps {
|
|
5
5
|
/**
|
|
@@ -9,7 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _Image = require("@webiny/app/components/Image");
|
|
11
11
|
var Ui = _interopRequireWildcard(require("@webiny/ui/ImageUpload"));
|
|
12
|
-
var
|
|
12
|
+
var _ = require("./..");
|
|
13
13
|
var _FormElementMessage = require("@webiny/ui/FormElementMessage");
|
|
14
14
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
15
|
var ImageUploadWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
@@ -67,7 +67,7 @@ var SingleImageUpload = function SingleImageUpload(props) {
|
|
|
67
67
|
className: className
|
|
68
68
|
}, label && /*#__PURE__*/React.createElement("div", {
|
|
69
69
|
className: "mdc-floating-label mdc-floating-label--float-above"
|
|
70
|
-
}, label), /*#__PURE__*/React.createElement(
|
|
70
|
+
}, label), /*#__PURE__*/React.createElement(_.FileManager, {
|
|
71
71
|
onChange: onChange,
|
|
72
72
|
accept: accept,
|
|
73
73
|
images: !accept,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ImageUploadWrapper","styled","position","opacity","pointerEvents","transform","top","left","color","SingleImageUpload","props","className","value","validation","label","description","accept","includeFileMeta","maxSize","imagePreviewProps","round","validationIsValid","isValid","validationMessage","message","onChange","useCallback","id","src","showFileManager","renderImageProps","width","height"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Image } from \"@webiny/app/components/Image\";\nimport * as Ui from \"@webiny/ui/ImageUpload\";\nimport { FileManager, FileManagerFileItem } from \"
|
|
1
|
+
{"version":3,"names":["ImageUploadWrapper","styled","position","opacity","pointerEvents","transform","top","left","color","SingleImageUpload","props","className","value","validation","label","description","accept","includeFileMeta","maxSize","imagePreviewProps","round","validationIsValid","isValid","validationMessage","message","onChange","useCallback","id","src","showFileManager","renderImageProps","width","height"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Image } from \"@webiny/app/components/Image\";\nimport * as Ui from \"@webiny/ui/ImageUpload\";\nimport { FileManager, FileManagerFileItem } from \"~/index\";\nimport { FormComponentProps } from \"@webiny/ui/types\";\nimport { FormElementMessage } from \"@webiny/ui/FormElementMessage\";\nimport styled from \"@emotion/styled\";\nimport { useCallback } from \"react\";\n\nconst ImageUploadWrapper = styled(\"div\")({\n position: \"relative\",\n \".disabled\": {\n opacity: 0.75,\n pointerEvents: \"none\"\n },\n \".mdc-floating-label--float-above\": {\n transform: \"scale(0.75)\",\n top: 10,\n left: 10,\n color: \"var(--mdc-theme-text-secondary-on-background)\"\n },\n \".mdc-text-field-helper-text\": {\n color: \"var(--mdc-theme-text-secondary-on-background)\"\n }\n});\n\nexport interface SingleImageUploadProps extends FormComponentProps {\n /**\n * Accept types\n */\n accept?: string[];\n\n /**\n * Component label.\n */\n label?: string;\n\n /**\n * Is component disabled?\n */\n disabled?: boolean;\n\n /**\n * Description beneath the image.\n */\n description?: React.ReactNode;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * Define file's max allowed size (default is \"10mb\").\n * Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n */\n maxSize?: number | string;\n\n /**\n * onChange callback when a file is set or unset.\n * It is marked as `optional` because this component is often used in conjunction with <Bind>, which injects the\n * `onChange` into its child element. In that case, that prop is not passed by the developer.\n */\n onChange?: (value: FileManagerFileItem | null) => void;\n\n /**\n * Optional custom props, passed to the preview image.\n */\n imagePreviewProps?: any;\n\n /**\n * By default, file meta is not included in the data passed to `onChange`. If you need it, set this flag to true.\n */\n includeFileMeta?: boolean;\n\n /**\n * Is the wrapper round?\n */\n round?: boolean;\n\n /**\n * Define the properties that are returned on file(s) selection.\n * @deprecated Pick the desired file attributes in the `onChange` callback, or `beforeChange` on the `<Bind>` element.\n */\n onChangePick?: string[];\n}\n\nconst SingleImageUpload: React.FC<SingleImageUploadProps> = props => {\n const {\n className,\n value,\n validation,\n label,\n description,\n accept,\n includeFileMeta = false,\n maxSize,\n imagePreviewProps,\n round\n } = props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n const onChange = useCallback(\n (value: FileManagerFileItem | null) => {\n if (!props.onChange) {\n return;\n }\n\n if (value && !includeFileMeta) {\n props.onChange({ id: value.id, src: value.src });\n return;\n }\n\n if (value && includeFileMeta) {\n props.onChange(value);\n return;\n }\n\n props.onChange(null);\n },\n [props.onChange]\n );\n\n return (\n <ImageUploadWrapper className={className}>\n {label && (\n <div className=\"mdc-floating-label mdc-floating-label--float-above\">{label}</div>\n )}\n\n <FileManager\n onChange={onChange}\n accept={accept}\n images={!accept}\n maxSize={maxSize}\n render={({ showFileManager }) => (\n <Ui.Image\n renderImagePreview={renderImageProps => (\n <Image {...renderImageProps} {...imagePreviewProps} />\n )}\n style={{ width: \"100%\", height: \"auto\" }}\n value={value}\n uploadImage={showFileManager}\n removeImage={() => onChange(null)}\n round={round}\n />\n )}\n />\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </ImageUploadWrapper>\n );\n};\n\nexport default SingleImageUpload;\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AAGA,IAAMA,kBAAkB,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACrCC,QAAQ,EAAE,UAAU;EACpB,WAAW,EAAE;IACTC,OAAO,EAAE,IAAI;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AAI,CAAC;EACxB,CAAC,EACD,CAACf,KAAK,CAACe,QAAQ,CAAC,CACnB;EAED,oBACI,oBAAC,kBAAkB;IAAC,SAAS,EAAEd;EAAU,GACpCG,KAAK,iBACF;IAAK,SAAS,EAAC;EAAoD,GAAEA,KAAK,CAC7E,eAED,oBAAC,aAAW;IACR,QAAQ,EAAEW,QAAS;IACnB,MAAM,EAAET,MAAO;IACf,MAAM,EAAE,CAACA,MAAO;IAChB,OAAO,EAAEE,OAAQ;IACjB,MAAM,EAAE;MAAA,IAAGW,eAAe,SAAfA,eAAe;MAAA,oBACtB,oBAAC,EAAE,CAAC,KAAK;QACL,kBAAkB,EAAE,4BAAAC,gBAAgB;UAAA,oBAChC,oBAAC,YAAK,oBAAKA,gBAAgB,EAAMX,iBAAiB,EAAI;QAAA,CACxD;QACF,KAAK,EAAE;UAAEY,KAAK,EAAE,MAAM;UAAEC,MAAM,EAAE;QAAO,CAAE;QACzC,KAAK,EAAEpB,KAAM;QACb,WAAW,EAAEiB,eAAgB;QAC7B,WAAW,EAAE;UAAA,OAAMJ,QAAQ,CAAC,IAAI,CAAC;QAAA,CAAC;QAClC,KAAK,EAAEL;MAAM,EACf;IAAA;EACJ,EACJ,EAEDC,iBAAiB,KAAK,KAAK,iBACxB,oBAAC,sCAAkB;IAAC,KAAK;EAAA,GAAEE,iBAAiB,CAC/C,EACAF,iBAAiB,KAAK,KAAK,IAAIN,WAAW,iBACvC,oBAAC,sCAAkB,QAAEA,WAAW,CACnC,CACgB;AAE7B,CAAC;AAAC,eAEaN,iBAAiB;AAAA"}
|
|
@@ -16,6 +16,7 @@ var _Helpers = require("@webiny/ui/Helpers");
|
|
|
16
16
|
var grid = /*#__PURE__*/(0, _emotion.css)({
|
|
17
17
|
"&.mdc-layout-grid": {
|
|
18
18
|
padding: 0,
|
|
19
|
+
margin: "-3px auto 0 auto",
|
|
19
20
|
backgroundColor: "var(--mdc-theme-background)",
|
|
20
21
|
">.mdc-layout-grid__inner": {
|
|
21
22
|
gridGap: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["grid","css","padding","backgroundColor","gridGap","RightPanelWrapper","styled","overflow","height","leftPanel","display","flexDirection","maxHeight","SplitView","props","classSet","className","children","LeftPanel","propList","hasOwnProperty","span","getClasses","RightPanel"],"sources":["SplitView.tsx"],"sourcesContent":["import * as React from \"react\";\nimport classSet from \"classnames\";\nimport { Cell, Grid, CellProps } from \"@webiny/ui/Grid\";\nimport { css } from \"emotion\";\nimport styled from \"@emotion/styled\";\nimport { clone } from \"lodash\";\nimport { getClasses } from \"@webiny/ui/Helpers\";\n\nconst grid = css({\n \"&.mdc-layout-grid\": {\n padding: 0,\n backgroundColor: \"var(--mdc-theme-background)\",\n \">.mdc-layout-grid__inner\": {\n gridGap: 0\n }\n }\n});\n\nconst RightPanelWrapper = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n overflow: \"auto\",\n height: \"calc(100vh - 70px)\"\n});\n\nexport const leftPanel = css({\n backgroundColor: \"var(--mdc-theme-surface)\",\n \">.webiny-data-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100vh - 70px)\",\n \".mdc-list\": {\n overflow: \"auto\"\n }\n },\n \">.mdc-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n maxHeight: \"calc(100vh - 70px)\",\n overflow: \"auto\"\n }\n});\n\ninterface SplitViewProps {\n children: React.ReactElement<any> | React.ReactElement<any>[];\n className?: string;\n}\n\nconst SplitView: React.FC<SplitViewProps> = props => {\n return (\n <Grid className={classSet(grid, props.className, \"webiny-split-view\")}>\n {props.children}\n </Grid>\n );\n};\n\nconst LeftPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 5;\n }\n\n return (\n <Cell\n {...getClasses(\n propList,\n classSet(leftPanel, props.className, \"webiny-split-view__left-panel\")\n )}\n >\n {propList.children}\n </Cell>\n );\n};\n\nconst RightPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 7;\n }\n\n return (\n <Cell {...getClasses(propList, \"webiny-split-view__right-panel\")}>\n <RightPanelWrapper\n className={\"webiny-split-view__right-panel-wrapper\"}\n id={\"webiny-split-view-right-panel\"}\n >\n {propList.children}\n </RightPanelWrapper>\n </Cell>\n );\n};\n\nexport { SplitView, LeftPanel, RightPanel };\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA,IAAMA,IAAI,gBAAG,IAAAC,YAAG,EAAC;EACb,mBAAmB,EAAE;IACjBC,OAAO,EAAE,CAAC;IACVC,eAAe,EAAE,6BAA6B;IAC9C,0BAA0B,EAAE;MACxBC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC,gBAAC;AAEF,IAAMC,iBAAiB,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACpCH,eAAe,EAAE,6BAA6B;EAC9CI,QAAQ,EAAE,MAAM;EAChBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEK,IAAMC,SAAS,gBAAG,
|
|
1
|
+
{"version":3,"names":["grid","css","padding","margin","backgroundColor","gridGap","RightPanelWrapper","styled","overflow","height","leftPanel","display","flexDirection","maxHeight","SplitView","props","classSet","className","children","LeftPanel","propList","hasOwnProperty","span","getClasses","RightPanel"],"sources":["SplitView.tsx"],"sourcesContent":["import * as React from \"react\";\nimport classSet from \"classnames\";\nimport { Cell, Grid, CellProps } from \"@webiny/ui/Grid\";\nimport { css } from \"emotion\";\nimport styled from \"@emotion/styled\";\nimport { clone } from \"lodash\";\nimport { getClasses } from \"@webiny/ui/Helpers\";\n\nconst grid = css({\n \"&.mdc-layout-grid\": {\n padding: 0,\n margin: \"-3px auto 0 auto\",\n backgroundColor: \"var(--mdc-theme-background)\",\n \">.mdc-layout-grid__inner\": {\n gridGap: 0\n }\n }\n});\n\nconst RightPanelWrapper = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n overflow: \"auto\",\n height: \"calc(100vh - 70px)\"\n});\n\nexport const leftPanel = css({\n backgroundColor: \"var(--mdc-theme-surface)\",\n \">.webiny-data-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100vh - 70px)\",\n \".mdc-list\": {\n overflow: \"auto\"\n }\n },\n \">.mdc-list\": {\n display: \"flex\",\n flexDirection: \"column\",\n maxHeight: \"calc(100vh - 70px)\",\n overflow: \"auto\"\n }\n});\n\ninterface SplitViewProps {\n children: React.ReactElement<any> | React.ReactElement<any>[];\n className?: string;\n}\n\nconst SplitView: React.FC<SplitViewProps> = props => {\n return (\n <Grid className={classSet(grid, props.className, \"webiny-split-view\")}>\n {props.children}\n </Grid>\n );\n};\n\nconst LeftPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 5;\n }\n\n return (\n <Cell\n {...getClasses(\n propList,\n classSet(leftPanel, props.className, \"webiny-split-view__left-panel\")\n )}\n >\n {propList.children}\n </Cell>\n );\n};\n\nconst RightPanel: React.FC<CellProps> = props => {\n const propList = clone(props);\n if (!propList.hasOwnProperty(\"span\")) {\n propList.span = 7;\n }\n\n return (\n <Cell {...getClasses(propList, \"webiny-split-view__right-panel\")}>\n <RightPanelWrapper\n className={\"webiny-split-view__right-panel-wrapper\"}\n id={\"webiny-split-view-right-panel\"}\n >\n {propList.children}\n </RightPanelWrapper>\n </Cell>\n );\n};\n\nexport { SplitView, LeftPanel, RightPanel };\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA,IAAMA,IAAI,gBAAG,IAAAC,YAAG,EAAC;EACb,mBAAmB,EAAE;IACjBC,OAAO,EAAE,CAAC;IACVC,MAAM,EAAE,kBAAkB;IAC1BC,eAAe,EAAE,6BAA6B;IAC9C,0BAA0B,EAAE;MACxBC,OAAO,EAAE;IACb;EACJ;AACJ,CAAC,gBAAC;AAEF,IAAMC,iBAAiB,oBAA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Q,GAAG,qBAAML,KAAK,CAAC;EAC7B,IAAI,CAACK,QAAQ,CAACC,cAAc,CAAC,MAAM,CAAC,EAAE;IAClCD,QAAQ,CAACE,IAAI,GAAG,CAAC;EACrB;EAEA,oBACI,oBAAC,UAAI,EAAK,IAAAC,mBAAU,EAACH,QAAQ,EAAE,gCAAgC,CAAC,eAC5D,oBAAC,iBAAiB;IACd,SAAS,EAAE,wCAAyC;IACpD,EAAE,EAAE;EAAgC,GAEnCA,QAAQ,CAACF,QAAQ,CACF,CACjB;AAEf,CAAC;AAAC"}
|
package/components/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FileManager } from "
|
|
1
|
+
export { FileManager } from "../base/ui/FileManager";
|
package/components/index.js
CHANGED
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager\";\n"],"mappings":";;;;;;;;;;;AAAA"}
|
|
@@ -2,10 +2,12 @@ import React from "react";
|
|
|
2
2
|
interface Params {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
message?: React.ReactNode;
|
|
5
|
+
acceptLabel?: React.ReactNode;
|
|
6
|
+
cancelLabel?: React.ReactNode;
|
|
5
7
|
[key: string]: any;
|
|
6
8
|
}
|
|
7
9
|
interface UseConfirmationDialogResponse {
|
|
8
10
|
showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;
|
|
9
11
|
}
|
|
10
|
-
declare const useConfirmationDialog: ({ title, message, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
12
|
+
declare const useConfirmationDialog: ({ title, message, acceptLabel, cancelLabel, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
11
13
|
export { useConfirmationDialog };
|
|
@@ -5,18 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.useConfirmationDialog = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _useUi = require("@webiny/app/hooks/useUi");
|
|
12
12
|
var _i18n = require("@webiny/app/i18n");
|
|
13
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
14
|
-
var _excluded = ["title", "message"];
|
|
14
|
+
var _excluded = ["title", "message", "acceptLabel", "cancelLabel"];
|
|
15
15
|
var t = _i18n.i18n.ns("app-admin/hooks/use-confirmation-dialog");
|
|
16
16
|
var useConfirmationDialog = function useConfirmationDialog() {
|
|
17
17
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
18
|
var title = _ref.title,
|
|
19
19
|
message = _ref.message,
|
|
20
|
+
_ref$acceptLabel = _ref.acceptLabel,
|
|
21
|
+
acceptLabel = _ref$acceptLabel === void 0 ? t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Confirm"]))) : _ref$acceptLabel,
|
|
22
|
+
_ref$cancelLabel = _ref.cancelLabel,
|
|
23
|
+
cancelLabel = _ref$cancelLabel === void 0 ? t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Cancel"]))) : _ref$cancelLabel,
|
|
20
24
|
options = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
25
|
var ui = (0, _useUi.useUi)();
|
|
22
26
|
return {
|
|
@@ -24,16 +28,16 @@ var useConfirmationDialog = function useConfirmationDialog() {
|
|
|
24
28
|
ui.setState(function (ui) {
|
|
25
29
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ui), {}, {
|
|
26
30
|
dialog: {
|
|
27
|
-
message: message || t(
|
|
31
|
+
message: message || t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Are you sure you want to continue?"]))),
|
|
28
32
|
options: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, options), {}, {
|
|
29
|
-
title: title || t(
|
|
33
|
+
title: title || t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Confirmation"]))),
|
|
30
34
|
actions: {
|
|
31
35
|
accept: {
|
|
32
|
-
label:
|
|
36
|
+
label: acceptLabel,
|
|
33
37
|
onClick: onAccept
|
|
34
38
|
},
|
|
35
39
|
cancel: {
|
|
36
|
-
label:
|
|
40
|
+
label: cancelLabel,
|
|
37
41
|
onClick: onCancel
|
|
38
42
|
}
|
|
39
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["t","i18n","ns","useConfirmationDialog","title","message","options","ui","useUi","showConfirmation","onAccept","onCancel","setState","dialog","actions","accept","label","onClick","cancel"],"sources":["useConfirmationDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { i18n } from \"@webiny/app/i18n\";\nconst t = i18n.ns(\"app-admin/hooks/use-confirmation-dialog\");\n\ninterface Params {\n title?: React.ReactNode;\n message?: React.ReactNode;\n [key: string]: any;\n}\n\ninterface UseConfirmationDialogResponse {\n showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;\n}\n\nconst useConfirmationDialog = ({\n title,\n message,\n ...options\n}: Params = {}): UseConfirmationDialogResponse => {\n const ui = useUi();\n\n return {\n showConfirmation: (onAccept, onCancel) => {\n ui.setState(ui => {\n return {\n ...ui,\n dialog: {\n message: message || t`Are you sure you want to continue?`,\n options: {\n ...options,\n title: title || t`Confirmation`,\n actions: {\n accept: {\n label:
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","useConfirmationDialog","title","message","acceptLabel","cancelLabel","options","ui","useUi","showConfirmation","onAccept","onCancel","setState","dialog","actions","accept","label","onClick","cancel"],"sources":["useConfirmationDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { i18n } from \"@webiny/app/i18n\";\nconst t = i18n.ns(\"app-admin/hooks/use-confirmation-dialog\");\n\ninterface Params {\n title?: React.ReactNode;\n message?: React.ReactNode;\n acceptLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n [key: string]: any;\n}\n\ninterface UseConfirmationDialogResponse {\n showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;\n}\n\nconst useConfirmationDialog = ({\n title,\n message,\n acceptLabel = t`Confirm`,\n cancelLabel = t`Cancel`,\n ...options\n}: Params = {}): UseConfirmationDialogResponse => {\n const ui = useUi();\n\n return {\n showConfirmation: (onAccept, onCancel) => {\n ui.setState(ui => {\n return {\n ...ui,\n dialog: {\n message: message || t`Are you sure you want to continue?`,\n options: {\n ...options,\n title: title || t`Confirmation`,\n actions: {\n accept: {\n label: acceptLabel,\n onClick: onAccept\n },\n cancel: {\n label: cancelLabel,\n onClick: onCancel\n }\n }\n }\n }\n };\n });\n }\n };\n};\n\nexport { useConfirmationDialog };\n"],"mappings":";;;;;;;;;;AACA;AACA;AAAwC;AAAA;AACxC,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,yCAAyC,CAAC;AAc5D,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqB,GAMuB;EAAA,+EAAtC,CAAC,CAAC;EAAA,IALVC,KAAK,QAALA,KAAK;IACLC,OAAO,QAAPA,OAAO;IAAA,wBACPC,WAAW;IAAXA,WAAW,iCAAGN,CAAC;IAAA,wBACfO,WAAW;IAAXA,WAAW,iCAAGP,CAAC;IACZQ,OAAO;EAEV,IAAMC,EAAE,GAAG,IAAAC,YAAK,GAAE;EAElB,OAAO;IACHC,gBAAgB,EAAE,0BAACC,QAAQ,EAAEC,QAAQ,EAAK;MACtCJ,EAAE,CAACK,QAAQ,CAAC,UAAAL,EAAE,EAAI;QACd,mEACOA,EAAE;UACLM,MAAM,EAAE;YACJV,OAAO,EAAEA,OAAO,IAAIL,CAAC,uHAAoC;YACzDQ,OAAO,8DACAA,OAAO;cACVJ,KAAK,EAAEA,KAAK,IAAIJ,CAAC,iGAAc;cAC/BgB,OAAO,EAAE;gBACLC,MAAM,EAAE;kBACJC,KAAK,EAAEZ,WAAW;kBAClBa,OAAO,EAAEP;gBACb,CAAC;gBACDQ,MAAM,EAAE;kBACJF,KAAK,EAAEX,WAAW;kBAClBY,OAAO,EAAEN;gBACb;cACJ;YAAC;UAET;QAAC;MAET,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAAC"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "@webiny/app
|
|
2
|
-
export type { HigherOrderComponent, ProviderProps, ComposeProps } from "@webiny/app
|
|
1
|
+
export * from "@webiny/app";
|
|
2
|
+
export type { HigherOrderComponent, ProviderProps, ComposeProps } from "@webiny/app";
|
|
3
3
|
export * from "./base/ui/Tags";
|
|
4
4
|
export * from "./base/ui/Menu";
|
|
5
5
|
export * from "./base/ui/Layout";
|
|
@@ -22,13 +22,12 @@ export type { AdminProps } from "./base/Admin";
|
|
|
22
22
|
export { useViewComposition } from "./base/providers/ViewCompositionProvider";
|
|
23
23
|
export type { ViewCompositionContext, ViewElement } from "./base/providers/ViewCompositionProvider";
|
|
24
24
|
export * from "./base/plugins/AddGraphQLQuerySelection";
|
|
25
|
-
export * from "./plugins/FileManagerFileTypePlugin";
|
|
26
25
|
export * from "./plugins/PermissionRendererPlugin";
|
|
27
26
|
export { AppInstaller } from "./components/AppInstaller";
|
|
28
27
|
export { OverlayLayout, OverlayLayoutProps } from "./components/OverlayLayout";
|
|
29
28
|
export { default as SingleImageUpload, SingleImageUploadProps } from "./components/SingleImageUpload";
|
|
30
|
-
export { FileManager, FileManagerRenderer } from "./
|
|
31
|
-
export type { FileManagerProps, FileManagerRendererProps, FileManagerFileItem } from "./
|
|
29
|
+
export { FileManager, FileManagerRenderer } from "./base/ui/FileManager";
|
|
30
|
+
export type { FileManagerProps, FileManagerRendererProps, FileManagerFileItem, FileManagerOnChange } from "./base/ui/FileManager";
|
|
32
31
|
export * from "./hooks/useSnackbar";
|
|
33
32
|
export * from "./hooks/useConfirmationDialog";
|
|
34
33
|
export * from "./hooks/useDialog";
|
package/index.js
CHANGED
|
@@ -76,15 +76,15 @@ Object.defineProperty(exports, "useWcp", {
|
|
|
76
76
|
return _appWcp.useWcp;
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
-
var
|
|
80
|
-
Object.keys(
|
|
79
|
+
var _app = require("@webiny/app");
|
|
80
|
+
Object.keys(_app).forEach(function (key) {
|
|
81
81
|
if (key === "default" || key === "__esModule") return;
|
|
82
82
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
83
|
-
if (key in exports && exports[key] ===
|
|
83
|
+
if (key in exports && exports[key] === _app[key]) return;
|
|
84
84
|
Object.defineProperty(exports, key, {
|
|
85
85
|
enumerable: true,
|
|
86
86
|
get: function get() {
|
|
87
|
-
return
|
|
87
|
+
return _app[key];
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
});
|
|
@@ -258,18 +258,6 @@ Object.keys(_AddGraphQLQuerySelection).forEach(function (key) {
|
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
});
|
|
261
|
-
var _FileManagerFileTypePlugin = require("./plugins/FileManagerFileTypePlugin");
|
|
262
|
-
Object.keys(_FileManagerFileTypePlugin).forEach(function (key) {
|
|
263
|
-
if (key === "default" || key === "__esModule") return;
|
|
264
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
265
|
-
if (key in exports && exports[key] === _FileManagerFileTypePlugin[key]) return;
|
|
266
|
-
Object.defineProperty(exports, key, {
|
|
267
|
-
enumerable: true,
|
|
268
|
-
get: function get() {
|
|
269
|
-
return _FileManagerFileTypePlugin[key];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
261
|
var _PermissionRendererPlugin = require("./plugins/PermissionRendererPlugin");
|
|
274
262
|
Object.keys(_PermissionRendererPlugin).forEach(function (key) {
|
|
275
263
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -285,7 +273,7 @@ Object.keys(_PermissionRendererPlugin).forEach(function (key) {
|
|
|
285
273
|
var _AppInstaller = require("./components/AppInstaller");
|
|
286
274
|
var _OverlayLayout = require("./components/OverlayLayout");
|
|
287
275
|
var _SingleImageUpload = _interopRequireWildcard(require("./components/SingleImageUpload"));
|
|
288
|
-
var _FileManager = require("./
|
|
276
|
+
var _FileManager = require("./base/ui/FileManager");
|
|
289
277
|
var _useSnackbar = require("./hooks/useSnackbar");
|
|
290
278
|
Object.keys(_useSnackbar).forEach(function (key) {
|
|
291
279
|
if (key === "default" || key === "__esModule") return;
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app\";\nexport type { HigherOrderComponent, ProviderProps, ComposeProps } from \"@webiny/app\";\n// UI components\nexport * from \"./base/ui/Tags\";\nexport * from \"./base/ui/Menu\";\nexport * from \"./base/ui/Layout\";\nexport * from \"./base/ui/LocaleSelector\";\nexport type { LayoutProps } from \"./base/ui/Layout\";\nexport * from \"./base/ui/Navigation\";\nexport type { MenuItemsProps } from \"./base/ui/Navigation\";\nexport * from \"./base/ui/Brand\";\nexport * from \"./base/ui/Logo\";\nexport * from \"./base/ui/Search\";\nexport type { SearchOptionData, SearchOptionProps } from \"./base/ui/Search\";\nexport * from \"./base/ui/UserMenu\";\nexport type { UserMenuItemProps } from \"./base/ui/UserMenu\";\nexport * from \"./base/ui/LoginScreen\";\nexport * from \"./base/ui/CenteredView\";\nexport * from \"./base/ui/Dashboard\";\nexport * from \"./base/ui/NotFound\";\n\n// Base admin app\nexport { Admin } from \"./base/Admin\";\nexport type { AdminProps } from \"./base/Admin\";\nexport { useViewComposition } from \"./base/providers/ViewCompositionProvider\";\nexport type { ViewCompositionContext, ViewElement } from \"./base/providers/ViewCompositionProvider\";\n\n// Plugins\nexport * from \"./base/plugins/AddGraphQLQuerySelection\";\nexport * from \"./plugins/PermissionRendererPlugin\";\n\n// Components\nexport { AppInstaller } from \"./components/AppInstaller\";\nexport { OverlayLayout, OverlayLayoutProps } from \"./components/OverlayLayout\";\nexport {\n default as SingleImageUpload,\n SingleImageUploadProps\n} from \"./components/SingleImageUpload\";\n\nexport { FileManager, FileManagerRenderer } from \"./base/ui/FileManager\";\nexport type {\n FileManagerProps,\n FileManagerRendererProps,\n FileManagerFileItem,\n FileManagerOnChange\n} from \"./base/ui/FileManager\";\n\n// Hooks\nexport * from \"./hooks/useSnackbar\";\nexport * from \"./hooks/useConfirmationDialog\";\nexport * from \"./hooks/useDialog\";\nexport { useWcp } from \"@webiny/app-wcp\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAGA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAGA;AAEA;AAIA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAGA;AACA;AACA;AAKA;AASA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.aa00eecd97",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -10,73 +10,62 @@
|
|
|
10
10
|
"author": "Pavel Denisjuk",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@apollo/react-common": "3.1.4",
|
|
14
13
|
"@apollo/react-components": "3.1.5",
|
|
15
14
|
"@apollo/react-hooks": "3.1.5",
|
|
16
|
-
"@babel/runtime": "7.20.
|
|
17
|
-
"@editorjs/editorjs": "2.
|
|
18
|
-
"@emotion/
|
|
19
|
-
"@emotion/styled": "10.
|
|
15
|
+
"@babel/runtime": "7.20.13",
|
|
16
|
+
"@editorjs/editorjs": "2.26.5",
|
|
17
|
+
"@emotion/react": "11.10.8",
|
|
18
|
+
"@emotion/styled": "11.10.6",
|
|
19
|
+
"@material-design-icons/svg": "0.14.3",
|
|
20
20
|
"@svgr/webpack": "6.5.1",
|
|
21
21
|
"@types/mime": "2.0.3",
|
|
22
22
|
"@types/react": "17.0.39",
|
|
23
|
-
"@webiny/app": "0.0.0-unstable.
|
|
24
|
-
"@webiny/app-
|
|
25
|
-
"@webiny/app-
|
|
26
|
-
"@webiny/
|
|
27
|
-
"@webiny/
|
|
28
|
-
"@webiny/
|
|
29
|
-
"@webiny/react-
|
|
30
|
-
"@webiny/
|
|
31
|
-
"@webiny/
|
|
32
|
-
"@webiny/ui": "0.0.0-unstable.
|
|
33
|
-
"@webiny/
|
|
34
|
-
"@webiny/validation": "0.0.0-unstable.990c3ab1b6",
|
|
23
|
+
"@webiny/app": "0.0.0-unstable.aa00eecd97",
|
|
24
|
+
"@webiny/app-security": "0.0.0-unstable.aa00eecd97",
|
|
25
|
+
"@webiny/app-wcp": "0.0.0-unstable.aa00eecd97",
|
|
26
|
+
"@webiny/form": "0.0.0-unstable.aa00eecd97",
|
|
27
|
+
"@webiny/plugins": "0.0.0-unstable.aa00eecd97",
|
|
28
|
+
"@webiny/react-composition": "0.0.0-unstable.aa00eecd97",
|
|
29
|
+
"@webiny/react-router": "0.0.0-unstable.aa00eecd97",
|
|
30
|
+
"@webiny/telemetry": "0.0.0-unstable.aa00eecd97",
|
|
31
|
+
"@webiny/ui": "0.0.0-unstable.aa00eecd97",
|
|
32
|
+
"@webiny/ui-composer": "0.0.0-unstable.aa00eecd97",
|
|
33
|
+
"@webiny/validation": "0.0.0-unstable.aa00eecd97",
|
|
35
34
|
"apollo-cache": "1.3.5",
|
|
36
35
|
"apollo-client": "2.6.10",
|
|
37
36
|
"apollo-link": "1.2.14",
|
|
38
37
|
"apollo-utilities": "1.3.4",
|
|
39
|
-
"bytes": "3.1.2",
|
|
40
38
|
"classnames": "2.3.2",
|
|
41
|
-
"dataurl-to-blob": "0.0.1",
|
|
42
|
-
"dayjs": "1.11.6",
|
|
43
39
|
"dot-prop-immutable": "2.1.1",
|
|
44
40
|
"downshift": "3.4.8",
|
|
45
41
|
"emotion": "10.0.27",
|
|
46
42
|
"graphlib": "2.1.8",
|
|
47
43
|
"graphql": "15.8.0",
|
|
48
|
-
"graphql-tag": "2.12.6",
|
|
49
|
-
"invariant": "2.2.4",
|
|
50
44
|
"lodash": "4.17.21",
|
|
51
|
-
"mime": "2.6.0",
|
|
52
|
-
"minimatch": "3.1.2",
|
|
53
45
|
"nanoid": "3.3.4",
|
|
54
46
|
"prop-types": "15.8.1",
|
|
55
47
|
"react": "17.0.2",
|
|
56
|
-
"react-butterfiles": "1.3.3",
|
|
57
48
|
"react-dom": "17.0.2",
|
|
58
49
|
"react-hotkeyz": "1.0.4",
|
|
59
|
-
"react-lazy-load": "3.1.14",
|
|
60
50
|
"react-transition-group": "4.4.5",
|
|
61
|
-
"semver": "7.3.8",
|
|
62
51
|
"store": "2.0.12"
|
|
63
52
|
},
|
|
64
53
|
"devDependencies": {
|
|
65
|
-
"@babel/cli": "
|
|
66
|
-
"@babel/core": "
|
|
67
|
-
"@babel/plugin-proposal-class-properties": "
|
|
68
|
-
"@babel/preset-env": "
|
|
69
|
-
"@babel/preset-react": "
|
|
70
|
-
"@babel/preset-typescript": "
|
|
71
|
-
"@types/bytes": "
|
|
72
|
-
"@types/graphlib": "
|
|
73
|
-
"@types/store": "
|
|
74
|
-
"@webiny/cli": "
|
|
75
|
-
"@webiny/project-utils": "
|
|
76
|
-
"babel-plugin-emotion": "
|
|
77
|
-
"babel-plugin-lodash": "
|
|
78
|
-
"rimraf": "
|
|
79
|
-
"ttypescript": "
|
|
54
|
+
"@babel/cli": "7.20.7",
|
|
55
|
+
"@babel/core": "7.20.12",
|
|
56
|
+
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
57
|
+
"@babel/preset-env": "7.20.2",
|
|
58
|
+
"@babel/preset-react": "7.18.6",
|
|
59
|
+
"@babel/preset-typescript": "7.18.6",
|
|
60
|
+
"@types/bytes": "3.1.1",
|
|
61
|
+
"@types/graphlib": "2.1.8",
|
|
62
|
+
"@types/store": "2.0.2",
|
|
63
|
+
"@webiny/cli": "0.0.0-unstable.aa00eecd97",
|
|
64
|
+
"@webiny/project-utils": "0.0.0-unstable.aa00eecd97",
|
|
65
|
+
"babel-plugin-emotion": "9.2.11",
|
|
66
|
+
"babel-plugin-lodash": "3.3.4",
|
|
67
|
+
"rimraf": "3.0.2",
|
|
68
|
+
"ttypescript": "1.5.15",
|
|
80
69
|
"typescript": "4.7.4"
|
|
81
70
|
},
|
|
82
71
|
"publishConfig": {
|
|
@@ -91,7 +80,7 @@
|
|
|
91
80
|
"ignore": {
|
|
92
81
|
"dependencies": [
|
|
93
82
|
"@svgr/webpack",
|
|
94
|
-
"@emotion/
|
|
83
|
+
"@emotion/react",
|
|
95
84
|
"@types/mime"
|
|
96
85
|
],
|
|
97
86
|
"peerDependencies": [
|
|
@@ -99,5 +88,5 @@
|
|
|
99
88
|
]
|
|
100
89
|
}
|
|
101
90
|
},
|
|
102
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "aa00eecd97d16da9bdb0581f33d491487ce43ce9"
|
|
103
92
|
}
|
|
@@ -23,7 +23,7 @@ var _reactHotkeyz = require("react-hotkeyz");
|
|
|
23
23
|
var _Icon = require("@webiny/ui/Icon");
|
|
24
24
|
var _Elevation = require("@webiny/ui/Elevation");
|
|
25
25
|
var _SearchBarDropdown = _interopRequireDefault(require("./SearchBarDropdown"));
|
|
26
|
-
var
|
|
26
|
+
var _search = require("@material-design-icons/svg/outlined/search.svg");
|
|
27
27
|
var _styled = require("./styled");
|
|
28
28
|
var _ = require("../..");
|
|
29
29
|
/**
|
|
@@ -182,7 +182,7 @@ var SearchBar = /*#__PURE__*/function (_React$Component) {
|
|
|
182
182
|
z: 0
|
|
183
183
|
}, /*#__PURE__*/React.createElement(_styled.SearchBarWrapper, null, /*#__PURE__*/React.createElement(_styled.SearchBarInputWrapper, null, /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
184
184
|
className: _styled.icon,
|
|
185
|
-
icon: /*#__PURE__*/React.createElement(
|
|
185
|
+
icon: /*#__PURE__*/React.createElement(_search.ReactComponent, null)
|
|
186
186
|
}), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", getInputProps({
|
|
187
187
|
placeholder: "Search...",
|
|
188
188
|
className: (0, _classnames.default)("mdc-text-field__input", _styled.searchBarInput),
|