@webiny/app-admin 5.23.1-beta.0 → 5.24.0
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/base/Admin.d.ts +1 -8
- package/base/Base.d.ts +1 -1
- package/base/plugins/AddGraphQLQuerySelection.d.ts +2 -2
- package/base/providers/ApolloProvider.d.ts +9 -3
- package/base/providers/TelemetryProvider.d.ts +2 -4
- package/base/providers/TelemetryProvider.js +5 -0
- package/base/providers/UiStateProvider.d.ts +1 -3
- package/base/providers/ViewCompositionProvider.d.ts +2 -4
- package/base/ui/Menu.d.ts +6 -1
- package/base/ui/Menu.js +87 -25
- package/base/ui/Navigation.d.ts +3 -5
- package/base/ui/Navigation.js +9 -26
- package/base/ui/Search.d.ts +2 -5
- package/base/ui/Tags.d.ts +1 -1
- package/base/ui/UserMenu.d.ts +2 -5
- package/components/AdminLayout.d.ts +1 -2
- package/components/AppInstaller/AppInstaller.d.ts +2 -4
- package/components/AppInstaller/Sidebar.d.ts +8 -6
- package/components/AppInstaller/Sidebar.js +9 -9
- package/components/AppInstaller/styled.d.ts +4 -4
- package/components/AppInstaller/useInstaller.d.ts +26 -9
- package/components/AppInstaller/useInstaller.js +42 -34
- package/components/EmptyView.d.ts +4 -4
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +5 -4
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +2 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +5 -4
- package/components/FileManager/BottomInfoBar.d.ts +4 -2
- package/components/FileManager/DropFilesHere.d.ts +4 -3
- package/components/FileManager/DropFilesHere.js +5 -2
- package/components/FileManager/File.d.ts +7 -8
- package/components/FileManager/File.js +11 -5
- package/components/FileManager/FileDetails/Name.d.ts +7 -5
- package/components/FileManager/FileDetails/Name.js +2 -2
- package/components/FileManager/FileDetails/Tags.d.ts +7 -5
- package/components/FileManager/FileDetails/Tags.js +4 -2
- package/components/FileManager/FileDetails.d.ts +6 -8
- package/components/FileManager/FileDetails.js +14 -2
- package/components/FileManager/FileManagerContext.d.ts +12 -9
- package/components/FileManager/FileManagerContext.js +9 -7
- package/components/FileManager/FileManagerView.d.ts +2 -10
- package/components/FileManager/FileManagerView.js +19 -8
- package/components/FileManager/LeftSidebar.d.ts +6 -5
- package/components/FileManager/LeftSidebar.js +4 -4
- package/components/FileManager/NoPermissionView.d.ts +2 -2
- package/components/FileManager/NoResults.d.ts +3 -2
- package/components/FileManager/NoResults.js +5 -2
- package/components/FileManager/getFileTypePlugin.d.ts +4 -1
- package/components/FileManager/getFileTypePlugin.js +5 -0
- package/components/FileManager/getFileUploader.d.ts +2 -1
- package/components/FileManager/outputFileSelectionError.d.ts +4 -1
- package/components/FileManager/outputFileSelectionError.js +5 -0
- package/components/FileManager/types.d.ts +49 -0
- package/components/FileManager/types.js +1 -0
- package/components/FileManager.d.ts +15 -10
- package/components/FileManager.js +15 -12
- package/components/FloatingActionButton.d.ts +2 -2
- package/components/MultiImageUpload.d.ts +13 -4
- package/components/MultiImageUpload.js +15 -4
- package/components/OverlayLayout/OverlayLayout.d.ts +9 -12
- package/components/Permissions/StyledComponents.d.ts +6 -4
- package/components/RichTextEditor/RichTextEditor.d.ts +2 -2
- package/components/RichTextEditor/tools/header/index.d.ts +33 -34
- package/components/RichTextEditor/tools/header/index.js +2 -3
- package/components/RichTextEditor/tools/image/index.d.ts +36 -13
- package/components/RichTextEditor/tools/image/index.js +4 -2
- package/components/RichTextEditor/tools/image/tunes.d.ts +12 -15
- package/components/RichTextEditor/tools/image/tunes.js +2 -1
- package/components/RichTextEditor/tools/image/types.d.ts +29 -0
- package/components/RichTextEditor/tools/image/types.js +1 -0
- package/components/RichTextEditor/tools/image/ui.d.ts +33 -26
- package/components/RichTextEditor/tools/image/ui.js +24 -11
- package/components/RichTextEditor/tools/paragraph/index.d.ts +31 -31
- package/components/RichTextEditor/tools/paragraph/index.js +11 -15
- package/components/RichTextEditor/tools/textColor/index.d.ts +22 -21
- package/components/RichTextEditor/tools/textColor/index.js +3 -1
- package/components/Routes.d.ts +2 -2
- package/components/SearchUI.d.ts +4 -4
- package/components/SimpleForm/SimpleForm.d.ts +7 -9
- package/components/SimpleUI/InputField.d.ts +3 -3
- package/components/SimpleUI/InputField.js +18 -18
- package/components/SingleImageUpload.d.ts +4 -9
- package/components/SingleImageUpload.js +2 -1
- package/components/SplitView/SplitView.d.ts +5 -5
- package/hooks/useConfirmationDialog.d.ts +6 -5
- package/hooks/useConfirmationDialog.js +1 -2
- package/hooks/useDialog.d.ts +8 -3
- package/hooks/useDialog.js +1 -1
- package/hooks/useSnackbar.d.ts +6 -3
- package/package.json +17 -14
- package/plugins/FileManagerFileTypePlugin.d.ts +1 -1
- package/plugins/MenuPlugin.d.ts +3 -3
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +6 -2
- package/plugins/fileManager/fileImage/EditAction.d.ts +7 -6
- package/plugins/fileManager/fileImage/EditAction.js +18 -9
- package/plugins/globalSearch/SearchBar.d.ts +13 -0
- package/plugins/globalSearch/SearchBar.js +5 -0
- package/plugins/globalSearch/SearchBarDropdown.d.ts +16 -1
- package/plugins/globalSearch/index.d.ts +2 -1
- package/plugins/globalSearch/styled.d.ts +3 -3
- package/plugins/index.d.ts +2 -1
- package/types.d.ts +8 -6
- package/ui/UIElement.d.ts +1 -1
- package/ui/UIView.d.ts +1 -1
- package/ui/elements/AccordionElement.d.ts +5 -5
- package/ui/elements/AccordionElement.js +4 -0
- package/ui/elements/ButtonElement.d.ts +3 -3
- package/ui/elements/ButtonGroupElement.d.ts +2 -2
- package/ui/elements/NavigationMenuElement.d.ts +5 -1
- package/ui/elements/NavigationMenuElement.js +3 -2
- package/ui/elements/PlaceholderElement.d.ts +2 -1
- package/ui/elements/SmallButtonElement.d.ts +1 -1
- package/ui/elements/TypographyElement.d.ts +1 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +9 -9
- package/ui/elements/form/FileManagerElement.d.ts +3 -4
- package/ui/elements/form/FormElement.d.ts +5 -5
- package/ui/elements/form/FormFieldElement.d.ts +6 -5
- package/ui/elements/form/FormFieldElement.js +5 -5
- package/ui/elements/form/InputElement.d.ts +1 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -2
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -2
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -2
- package/ui/views/AdminView/components/Hamburger.d.ts +2 -2
- package/ui/views/AdminView/components/Snackbar.d.ts +2 -2
- package/ui/views/FormView/FormContainerElement.d.ts +2 -2
- package/ui/views/FormView/FormFooterElement.d.ts +3 -3
- package/ui/views/FormView/FormHeaderElement.d.ts +2 -2
- package/ui/views/FormView.d.ts +1 -1
- package/ui/views/FormView.js +4 -2
- package/ui/views/OverlayView/ContentElement.d.ts +2 -2
- package/ui/views/OverlayView/HeaderElement.d.ts +5 -5
- package/ui/views/OverlayView/useOverlayView.d.ts +4 -5
- package/ui/views/OverlayView/useOverlayView.js +2 -2
- package/ui/views/OverlayView.d.ts +4 -6
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +3 -3
- package/ui/views/SplitView.d.ts +1 -1
|
@@ -47,10 +47,10 @@ var labelStyle = /*#__PURE__*/css({
|
|
|
47
47
|
}
|
|
48
48
|
}, "label:labelStyle;");
|
|
49
49
|
|
|
50
|
-
var getValue = function getValue(
|
|
51
|
-
var value =
|
|
52
|
-
defaultValue =
|
|
53
|
-
type =
|
|
50
|
+
var getValue = function getValue(params) {
|
|
51
|
+
var value = params.value,
|
|
52
|
+
defaultValue = params.defaultValue,
|
|
53
|
+
type = params.type;
|
|
54
54
|
|
|
55
55
|
if (type === "number") {
|
|
56
56
|
return isNaN(value) ? defaultValue : value;
|
|
@@ -59,19 +59,19 @@ var getValue = function getValue(_ref) {
|
|
|
59
59
|
return value || defaultValue;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
var InputField = function InputField(
|
|
63
|
-
var className =
|
|
64
|
-
value =
|
|
65
|
-
_onChange =
|
|
66
|
-
label =
|
|
67
|
-
description =
|
|
68
|
-
|
|
69
|
-
validation =
|
|
62
|
+
var InputField = function InputField(_ref) {
|
|
63
|
+
var className = _ref.className,
|
|
64
|
+
value = _ref.value,
|
|
65
|
+
_onChange = _ref.onChange,
|
|
66
|
+
label = _ref.label,
|
|
67
|
+
description = _ref.description,
|
|
68
|
+
_ref$validation = _ref.validation,
|
|
69
|
+
validation = _ref$validation === void 0 ? {
|
|
70
70
|
isValid: true
|
|
71
|
-
} :
|
|
72
|
-
|
|
73
|
-
defaultValue =
|
|
74
|
-
props = _objectWithoutProperties(
|
|
71
|
+
} : _ref$validation,
|
|
72
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
73
|
+
defaultValue = _ref$defaultValue === void 0 ? "" : _ref$defaultValue,
|
|
74
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
75
75
|
|
|
76
76
|
return /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement("div", {
|
|
77
77
|
className: labelStyle
|
|
@@ -84,8 +84,8 @@ var InputField = function InputField(_ref2) {
|
|
|
84
84
|
type: props.type,
|
|
85
85
|
defaultValue: defaultValue
|
|
86
86
|
}),
|
|
87
|
-
onChange: function onChange(
|
|
88
|
-
var value =
|
|
87
|
+
onChange: function onChange(_ref2) {
|
|
88
|
+
var value = _ref2.target.value;
|
|
89
89
|
|
|
90
90
|
_onChange(value.toLowerCase());
|
|
91
91
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { FormComponentProps } from "@webiny/ui/types";
|
|
3
|
-
|
|
3
|
+
export interface SingleImageUploadProps extends FormComponentProps {
|
|
4
4
|
accept?: string[];
|
|
5
5
|
label?: string;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -9,17 +9,12 @@ declare type SingleImageUploadProps = FormComponentProps & {
|
|
|
9
9
|
maxSize?: number | string;
|
|
10
10
|
multipleMaxCount?: number;
|
|
11
11
|
multipleMaxSize?: number | string;
|
|
12
|
-
onChange?:
|
|
12
|
+
onChange?: (value: any) => void;
|
|
13
13
|
imagePreviewProps?: any;
|
|
14
14
|
round?: boolean;
|
|
15
15
|
onChangePick?: string[];
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
export default class SingleImageUpload extends React.Component<SingleImageUploadProps> {
|
|
18
|
-
static defaultProps:
|
|
19
|
-
validation: {
|
|
20
|
-
isValid: any;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
18
|
+
static defaultProps: Partial<SingleImageUploadProps>;
|
|
23
19
|
render(): JSX.Element;
|
|
24
20
|
}
|
|
25
|
-
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CellProps } from "@webiny/ui/Grid";
|
|
3
|
-
|
|
3
|
+
interface SplitViewProps {
|
|
4
4
|
children: React.ReactElement<any> | React.ReactElement<any>[];
|
|
5
5
|
className?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const SplitView:
|
|
8
|
-
declare const LeftPanel:
|
|
9
|
-
declare const RightPanel:
|
|
6
|
+
}
|
|
7
|
+
declare const SplitView: React.FC<SplitViewProps>;
|
|
8
|
+
declare const LeftPanel: React.FC<CellProps>;
|
|
9
|
+
declare const RightPanel: React.FC<CellProps>;
|
|
10
10
|
export { SplitView, LeftPanel, RightPanel };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
interface Params {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
message?: React.ReactNode;
|
|
5
5
|
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
showConfirmation: (onAccept:
|
|
9
|
-
}
|
|
6
|
+
}
|
|
7
|
+
interface UseConfirmationDialogResponse {
|
|
8
|
+
showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const useConfirmationDialog: ({ title, message, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
10
11
|
export { useConfirmationDialog };
|
|
@@ -18,8 +18,7 @@ var useConfirmationDialog = function useConfirmationDialog() {
|
|
|
18
18
|
|
|
19
19
|
var ui = useUi();
|
|
20
20
|
return {
|
|
21
|
-
showConfirmation: function showConfirmation(onAccept) {
|
|
22
|
-
var onCancel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
21
|
+
showConfirmation: function showConfirmation(onAccept, onCancel) {
|
|
23
22
|
ui.setState(function (ui) {
|
|
24
23
|
return _objectSpread(_objectSpread({}, ui), {}, {
|
|
25
24
|
dialog: {
|
package/hooks/useDialog.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface UseDialogResponseShowDialogOptions {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
interface UseDialogResponse {
|
|
6
|
+
showDialog: (message: React.ReactNode, options?: UseDialogResponseShowDialogOptions) => void;
|
|
3
7
|
hideDialog: () => void;
|
|
4
|
-
}
|
|
8
|
+
}
|
|
9
|
+
declare const useDialog: () => UseDialogResponse;
|
|
5
10
|
export { useDialog };
|
package/hooks/useDialog.js
CHANGED
package/hooks/useSnackbar.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface UseSnackbarResponse {
|
|
3
|
+
showSnackbar: (message: React.ReactNode, options?: Record<string, React.ReactNode>) => void;
|
|
3
4
|
hideSnackbar: () => void;
|
|
4
|
-
}
|
|
5
|
+
}
|
|
6
|
+
export declare const useSnackbar: () => UseSnackbarResponse;
|
|
7
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
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": {
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"@svgr/webpack": "6.2.1",
|
|
20
20
|
"@types/mime": "2.0.3",
|
|
21
21
|
"@types/react": "16.14.2",
|
|
22
|
-
"@webiny/app": "5.
|
|
23
|
-
"@webiny/app-admin-core": "5.
|
|
24
|
-
"@webiny/app-security": "5.
|
|
25
|
-
"@webiny/form": "5.
|
|
26
|
-
"@webiny/plugins": "5.
|
|
27
|
-
"@webiny/react-router": "5.
|
|
28
|
-
"@webiny/telemetry": "5.
|
|
29
|
-
"@webiny/ui": "5.
|
|
30
|
-
"@webiny/ui-composer": "5.
|
|
31
|
-
"@webiny/validation": "5.
|
|
22
|
+
"@webiny/app": "5.24.0",
|
|
23
|
+
"@webiny/app-admin-core": "5.24.0",
|
|
24
|
+
"@webiny/app-security": "5.24.0",
|
|
25
|
+
"@webiny/form": "5.24.0",
|
|
26
|
+
"@webiny/plugins": "5.24.0",
|
|
27
|
+
"@webiny/react-router": "5.24.0",
|
|
28
|
+
"@webiny/telemetry": "5.24.0",
|
|
29
|
+
"@webiny/ui": "5.24.0",
|
|
30
|
+
"@webiny/ui-composer": "5.24.0",
|
|
31
|
+
"@webiny/validation": "5.24.0",
|
|
32
32
|
"apollo-cache": "1.3.5",
|
|
33
33
|
"apollo-client": "2.6.10",
|
|
34
34
|
"apollo-link": "1.2.14",
|
|
@@ -65,8 +65,11 @@
|
|
|
65
65
|
"@babel/preset-env": "^7.16.4",
|
|
66
66
|
"@babel/preset-react": "^7.16.0",
|
|
67
67
|
"@babel/preset-typescript": "^7.16.0",
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
68
|
+
"@types/bytes": "^3.1.1",
|
|
69
|
+
"@types/graphlib": "^2.1.8",
|
|
70
|
+
"@types/store": "^2.0.2",
|
|
71
|
+
"@webiny/cli": "^5.24.0",
|
|
72
|
+
"@webiny/project-utils": "^5.24.0",
|
|
70
73
|
"babel-plugin-emotion": "^9.2.8",
|
|
71
74
|
"babel-plugin-lodash": "^3.3.4",
|
|
72
75
|
"rimraf": "^3.0.2",
|
|
@@ -93,5 +96,5 @@
|
|
|
93
96
|
]
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "be0cbfcaa9247c658c44179af7943cc5d6d71bc7"
|
|
97
100
|
}
|
|
@@ -27,7 +27,7 @@ export declare class FileManagerFileTypePlugin extends Plugin {
|
|
|
27
27
|
private config;
|
|
28
28
|
constructor(config?: Config);
|
|
29
29
|
get types(): string[];
|
|
30
|
-
get actions(): React.ComponentType
|
|
30
|
+
get actions(): React.ComponentType[];
|
|
31
31
|
render(params: RenderParams): React.ReactNode;
|
|
32
32
|
}
|
|
33
33
|
export {};
|
package/plugins/MenuPlugin.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Plugin } from "@webiny/plugins";
|
|
3
|
-
export
|
|
3
|
+
export interface MenuProps {
|
|
4
4
|
name: string;
|
|
5
5
|
label: React.ReactNode;
|
|
6
6
|
icon: React.ReactElement;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
onClick?: (toggleSection: () => void) => void;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
export interface SectionProps {
|
|
11
11
|
label: React.ReactNode;
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -32,6 +32,6 @@ export declare class MenuPlugin extends Plugin {
|
|
|
32
32
|
private _config;
|
|
33
33
|
constructor(config?: Config);
|
|
34
34
|
get order(): number;
|
|
35
|
-
render(props:
|
|
35
|
+
render(props: Props): React.ReactNode;
|
|
36
36
|
}
|
|
37
37
|
export {};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FileItem } from "../../../components/FileManager/types";
|
|
3
|
+
interface DeleteActionProps {
|
|
4
|
+
file: FileItem;
|
|
5
|
+
}
|
|
6
|
+
declare const DeleteAction: React.FC<DeleteActionProps>;
|
|
3
7
|
export default DeleteAction;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { FileItem } from "../../../components/FileManager/types";
|
|
3
|
+
interface EditActionProps {
|
|
4
|
+
file: FileItem;
|
|
5
|
+
uploadFile: (file: FileItem) => void;
|
|
6
|
+
validateFiles: (blobs: any[]) => Error[];
|
|
7
|
+
canEdit: (file: FileItem) => boolean;
|
|
8
|
+
}
|
|
8
9
|
declare const EditAction: React.FC<EditActionProps>;
|
|
9
10
|
export default EditAction;
|
|
@@ -3,7 +3,17 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import * as React from "react";
|
|
6
|
+
/**
|
|
7
|
+
* Package react-hotkeyz has no types.
|
|
8
|
+
*/
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
|
|
6
11
|
import { Hotkeys } from "react-hotkeyz";
|
|
12
|
+
/**
|
|
13
|
+
* Package dataurl-to-blob has no types.
|
|
14
|
+
*/
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
|
|
7
17
|
import dataURLtoBlob from "dataurl-to-blob";
|
|
8
18
|
import { ImageEditorDialog } from "@webiny/ui/ImageUpload";
|
|
9
19
|
import { Tooltip } from "@webiny/ui/Tooltip";
|
|
@@ -86,23 +96,22 @@ var EditAction = function EditAction(props) {
|
|
|
86
96
|
}
|
|
87
97
|
}),
|
|
88
98
|
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
99
|
+
var dataUrl;
|
|
89
100
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
90
101
|
while (1) {
|
|
91
102
|
switch (_context.prev = _context.next) {
|
|
92
103
|
case 0:
|
|
93
|
-
_context.
|
|
94
|
-
_context.next = 3;
|
|
104
|
+
_context.next = 2;
|
|
95
105
|
return toDataUrl(file.src);
|
|
96
106
|
|
|
97
|
-
case
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
case 2:
|
|
108
|
+
dataUrl = _context.sent;
|
|
109
|
+
dispatch({
|
|
100
110
|
type: "setDataUrl",
|
|
101
|
-
dataUrl:
|
|
102
|
-
};
|
|
103
|
-
(0, _context.t0)(_context.t2);
|
|
111
|
+
dataUrl: dataUrl
|
|
112
|
+
});
|
|
104
113
|
|
|
105
|
-
case
|
|
114
|
+
case 4:
|
|
106
115
|
case "end":
|
|
107
116
|
return _context.stop();
|
|
108
117
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { AdminGlobalSearchPlugin, AdminGlobalSearchPreventHotkeyPlugin } from "../../types";
|
|
3
|
+
export interface SearchBarState {
|
|
4
|
+
active: boolean;
|
|
5
|
+
searchTerm: {
|
|
6
|
+
previous: string;
|
|
7
|
+
current: string;
|
|
8
|
+
};
|
|
9
|
+
plugins: {
|
|
10
|
+
list: ReadonlyArray<AdminGlobalSearchPlugin>;
|
|
11
|
+
hotKeys: ReadonlyArray<AdminGlobalSearchPreventHotkeyPlugin>;
|
|
12
|
+
current?: AdminGlobalSearchPlugin;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
2
15
|
declare const _default: React.FC<unknown> & {
|
|
3
16
|
original: React.ComponentType<unknown>;
|
|
4
17
|
originalName: string;
|
|
@@ -11,6 +11,11 @@ import { useRouter } from "@webiny/react-router";
|
|
|
11
11
|
import Downshift from "downshift";
|
|
12
12
|
import { plugins } from "@webiny/plugins";
|
|
13
13
|
import classnames from "classnames";
|
|
14
|
+
/**
|
|
15
|
+
* Package react-hotkeyz does not have types.
|
|
16
|
+
*/
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
|
|
14
19
|
import { Hotkeys } from "react-hotkeyz"; // UI components
|
|
15
20
|
|
|
16
21
|
import { Icon } from "@webiny/ui/Icon";
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import { AdminGlobalSearchPlugin } from "../../types";
|
|
3
|
+
import { Actions as DownshiftActions, DownshiftState, PropGetters } from "downshift";
|
|
4
|
+
import { SearchBarState } from "./SearchBar";
|
|
5
|
+
interface SearchBarDropdownProps {
|
|
6
|
+
context: {
|
|
7
|
+
downshift: {
|
|
8
|
+
current: DownshiftActions<any> & PropGetters<any> & {
|
|
9
|
+
state: DownshiftState<any>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
submitSearchTerm: (item: AdminGlobalSearchPlugin) => void;
|
|
13
|
+
state: SearchBarState;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export default class SearchBarDropdown extends React.Component<SearchBarDropdownProps> {
|
|
3
17
|
componentDidMount(): void;
|
|
4
18
|
render(): JSX.Element;
|
|
5
19
|
}
|
|
20
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const SearchShortcut: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
3
|
-
export declare const SearchBarWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
4
|
-
export declare const SearchBarInputWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
2
|
+
export declare const SearchShortcut: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
3
|
+
export declare const SearchBarWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
4
|
+
export declare const SearchBarInputWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, object>;
|
|
5
5
|
export declare const searchBarInput: string;
|
|
6
6
|
export declare const searchBarDropdown: string;
|
|
7
7
|
export declare const icon: string;
|
package/plugins/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: () => (import("./FileManagerFileTypePlugin").FileManagerFileTypePlugin[] | import("@webiny/ui-composer/UILayout").UILayoutPlugin<import("@webiny/ui-composer/UILayout").UILayout> | {
|
|
2
3
|
type: string;
|
|
3
4
|
name: string;
|
|
4
|
-
preventOpen(e:
|
|
5
|
+
preventOpen(e: import("react").ChangeEvent<HTMLInputElement>): boolean;
|
|
5
6
|
})[];
|
|
6
7
|
export default _default;
|
package/types.d.ts
CHANGED
|
@@ -55,16 +55,20 @@ export declare type AdminHeaderRightPlugin = Plugin & {
|
|
|
55
55
|
type: "admin-header-right";
|
|
56
56
|
render(params: RenderParams): React.ReactNode;
|
|
57
57
|
};
|
|
58
|
+
export interface AdminFileManagerFileTypePluginRenderParams {
|
|
59
|
+
file: string;
|
|
60
|
+
}
|
|
58
61
|
export declare type AdminFileManagerFileTypePlugin = Plugin & {
|
|
59
62
|
type: "admin-file-manager-file-type";
|
|
60
63
|
types?: string[];
|
|
61
|
-
render(
|
|
62
|
-
file: any;
|
|
63
|
-
}): React.ReactNode;
|
|
64
|
+
render(params: AdminFileManagerFileTypePluginRenderParams): React.ReactNode;
|
|
64
65
|
fileDetails?: {
|
|
65
66
|
actions: Array<React.FunctionComponent | React.Component>;
|
|
66
67
|
};
|
|
67
68
|
};
|
|
69
|
+
export interface AdminInstallationPluginRenderParams {
|
|
70
|
+
onInstalled: () => Promise<void>;
|
|
71
|
+
}
|
|
68
72
|
export declare type AdminInstallationPlugin = Plugin & {
|
|
69
73
|
type: "admin-installation";
|
|
70
74
|
getInstalledVersion(params: {
|
|
@@ -73,9 +77,7 @@ export declare type AdminInstallationPlugin = Plugin & {
|
|
|
73
77
|
title: string;
|
|
74
78
|
dependencies?: string[];
|
|
75
79
|
secure: boolean;
|
|
76
|
-
render(
|
|
77
|
-
onInstalled: any;
|
|
78
|
-
}): React.ReactNode;
|
|
80
|
+
render(params: AdminInstallationPluginRenderParams): React.ReactNode;
|
|
79
81
|
upgrades?: {
|
|
80
82
|
version: string;
|
|
81
83
|
getComponent(): React.ComponentType<{
|
package/ui/UIElement.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { UIElementConfig, ApplyFunction, ShouldRender } from "@webiny/ui-composer/UIElement";
|
|
1
|
+
export type { UIElementConfig, ApplyFunction, ShouldRender, UiElementRenderProps } from "@webiny/ui-composer/UIElement";
|
|
2
2
|
export { UIElement, UIElementPlugin } from "@webiny/ui-composer/UIElement";
|
package/ui/UIView.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ApplyFunction, UIElementWrapperProps, UIElementWrapper } from "@webiny/ui-composer/UIView";
|
|
1
|
+
export type { ApplyFunction, UIElementWrapperProps, UIElementWrapper, UIViewProps } from "@webiny/ui-composer/UIView";
|
|
2
2
|
export { UIView, UIViewComponent, UIViewPlugin } from "@webiny/ui-composer/UIView";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { UIElement, UIElementConfig } from "../UIElement";
|
|
2
|
+
import { UIElement, UIElementConfig, UiElementRenderProps } from "../UIElement";
|
|
3
3
|
interface GetterWithProps<TProps, T> {
|
|
4
4
|
(props: TProps): T;
|
|
5
5
|
}
|
|
@@ -11,17 +11,17 @@ interface Item<TProps = any> extends UIElementConfig {
|
|
|
11
11
|
open?: boolean | GetterWithProps<TProps, boolean>;
|
|
12
12
|
}
|
|
13
13
|
export declare class AccordionItemElement extends UIElement<Item> {
|
|
14
|
-
constructor(id:
|
|
14
|
+
constructor(id: string, config: Item);
|
|
15
15
|
setTitle(title: string): void;
|
|
16
16
|
setDescription(description: string): void;
|
|
17
|
-
render(props:
|
|
17
|
+
render(props: UiElementRenderProps): React.ReactNode;
|
|
18
18
|
}
|
|
19
19
|
interface Config extends UIElementConfig {
|
|
20
20
|
items: Item[];
|
|
21
21
|
}
|
|
22
22
|
export declare class AccordionElement extends UIElement<Config> {
|
|
23
|
-
constructor(id:
|
|
23
|
+
constructor(id: string, config: Config);
|
|
24
24
|
getAccordionItemElement(id: string): AccordionItemElement;
|
|
25
|
-
render(props:
|
|
25
|
+
render(props: UiElementRenderProps): React.ReactNode;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -75,6 +75,10 @@ export var AccordionElement = /*#__PURE__*/function (_UIElement2) {
|
|
|
75
75
|
}, {
|
|
76
76
|
key: "render",
|
|
77
77
|
value: function render(props) {
|
|
78
|
+
/**
|
|
79
|
+
* Figure out correct way to have props.children typed.
|
|
80
|
+
* TODO @ts-refactor
|
|
81
|
+
*/
|
|
78
82
|
// @ts-ignore
|
|
79
83
|
return /*#__PURE__*/React.createElement(Accordion, {
|
|
80
84
|
elevation: 0
|