@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.
Files changed (135) hide show
  1. package/base/Admin.d.ts +1 -8
  2. package/base/Base.d.ts +1 -1
  3. package/base/plugins/AddGraphQLQuerySelection.d.ts +2 -2
  4. package/base/providers/ApolloProvider.d.ts +9 -3
  5. package/base/providers/TelemetryProvider.d.ts +2 -4
  6. package/base/providers/TelemetryProvider.js +5 -0
  7. package/base/providers/UiStateProvider.d.ts +1 -3
  8. package/base/providers/ViewCompositionProvider.d.ts +2 -4
  9. package/base/ui/Menu.d.ts +6 -1
  10. package/base/ui/Menu.js +87 -25
  11. package/base/ui/Navigation.d.ts +3 -5
  12. package/base/ui/Navigation.js +9 -26
  13. package/base/ui/Search.d.ts +2 -5
  14. package/base/ui/Tags.d.ts +1 -1
  15. package/base/ui/UserMenu.d.ts +2 -5
  16. package/components/AdminLayout.d.ts +1 -2
  17. package/components/AppInstaller/AppInstaller.d.ts +2 -4
  18. package/components/AppInstaller/Sidebar.d.ts +8 -6
  19. package/components/AppInstaller/Sidebar.js +9 -9
  20. package/components/AppInstaller/styled.d.ts +4 -4
  21. package/components/AppInstaller/useInstaller.d.ts +26 -9
  22. package/components/AppInstaller/useInstaller.js +42 -34
  23. package/components/EmptyView.d.ts +4 -4
  24. package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +5 -4
  25. package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +2 -1
  26. package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +5 -4
  27. package/components/FileManager/BottomInfoBar.d.ts +4 -2
  28. package/components/FileManager/DropFilesHere.d.ts +4 -3
  29. package/components/FileManager/DropFilesHere.js +5 -2
  30. package/components/FileManager/File.d.ts +7 -8
  31. package/components/FileManager/File.js +11 -5
  32. package/components/FileManager/FileDetails/Name.d.ts +7 -5
  33. package/components/FileManager/FileDetails/Name.js +2 -2
  34. package/components/FileManager/FileDetails/Tags.d.ts +7 -5
  35. package/components/FileManager/FileDetails/Tags.js +4 -2
  36. package/components/FileManager/FileDetails.d.ts +6 -8
  37. package/components/FileManager/FileDetails.js +14 -2
  38. package/components/FileManager/FileManagerContext.d.ts +12 -9
  39. package/components/FileManager/FileManagerContext.js +9 -7
  40. package/components/FileManager/FileManagerView.d.ts +2 -10
  41. package/components/FileManager/FileManagerView.js +19 -8
  42. package/components/FileManager/LeftSidebar.d.ts +6 -5
  43. package/components/FileManager/LeftSidebar.js +4 -4
  44. package/components/FileManager/NoPermissionView.d.ts +2 -2
  45. package/components/FileManager/NoResults.d.ts +3 -2
  46. package/components/FileManager/NoResults.js +5 -2
  47. package/components/FileManager/getFileTypePlugin.d.ts +4 -1
  48. package/components/FileManager/getFileTypePlugin.js +5 -0
  49. package/components/FileManager/getFileUploader.d.ts +2 -1
  50. package/components/FileManager/outputFileSelectionError.d.ts +4 -1
  51. package/components/FileManager/outputFileSelectionError.js +5 -0
  52. package/components/FileManager/types.d.ts +49 -0
  53. package/components/FileManager/types.js +1 -0
  54. package/components/FileManager.d.ts +15 -10
  55. package/components/FileManager.js +15 -12
  56. package/components/FloatingActionButton.d.ts +2 -2
  57. package/components/MultiImageUpload.d.ts +13 -4
  58. package/components/MultiImageUpload.js +15 -4
  59. package/components/OverlayLayout/OverlayLayout.d.ts +9 -12
  60. package/components/Permissions/StyledComponents.d.ts +6 -4
  61. package/components/RichTextEditor/RichTextEditor.d.ts +2 -2
  62. package/components/RichTextEditor/tools/header/index.d.ts +33 -34
  63. package/components/RichTextEditor/tools/header/index.js +2 -3
  64. package/components/RichTextEditor/tools/image/index.d.ts +36 -13
  65. package/components/RichTextEditor/tools/image/index.js +4 -2
  66. package/components/RichTextEditor/tools/image/tunes.d.ts +12 -15
  67. package/components/RichTextEditor/tools/image/tunes.js +2 -1
  68. package/components/RichTextEditor/tools/image/types.d.ts +29 -0
  69. package/components/RichTextEditor/tools/image/types.js +1 -0
  70. package/components/RichTextEditor/tools/image/ui.d.ts +33 -26
  71. package/components/RichTextEditor/tools/image/ui.js +24 -11
  72. package/components/RichTextEditor/tools/paragraph/index.d.ts +31 -31
  73. package/components/RichTextEditor/tools/paragraph/index.js +11 -15
  74. package/components/RichTextEditor/tools/textColor/index.d.ts +22 -21
  75. package/components/RichTextEditor/tools/textColor/index.js +3 -1
  76. package/components/Routes.d.ts +2 -2
  77. package/components/SearchUI.d.ts +4 -4
  78. package/components/SimpleForm/SimpleForm.d.ts +7 -9
  79. package/components/SimpleUI/InputField.d.ts +3 -3
  80. package/components/SimpleUI/InputField.js +18 -18
  81. package/components/SingleImageUpload.d.ts +4 -9
  82. package/components/SingleImageUpload.js +2 -1
  83. package/components/SplitView/SplitView.d.ts +5 -5
  84. package/hooks/useConfirmationDialog.d.ts +6 -5
  85. package/hooks/useConfirmationDialog.js +1 -2
  86. package/hooks/useDialog.d.ts +8 -3
  87. package/hooks/useDialog.js +1 -1
  88. package/hooks/useSnackbar.d.ts +6 -3
  89. package/package.json +17 -14
  90. package/plugins/FileManagerFileTypePlugin.d.ts +1 -1
  91. package/plugins/MenuPlugin.d.ts +3 -3
  92. package/plugins/fileManager/fileImage/DeleteAction.d.ts +6 -2
  93. package/plugins/fileManager/fileImage/EditAction.d.ts +7 -6
  94. package/plugins/fileManager/fileImage/EditAction.js +18 -9
  95. package/plugins/globalSearch/SearchBar.d.ts +13 -0
  96. package/plugins/globalSearch/SearchBar.js +5 -0
  97. package/plugins/globalSearch/SearchBarDropdown.d.ts +16 -1
  98. package/plugins/globalSearch/index.d.ts +2 -1
  99. package/plugins/globalSearch/styled.d.ts +3 -3
  100. package/plugins/index.d.ts +2 -1
  101. package/types.d.ts +8 -6
  102. package/ui/UIElement.d.ts +1 -1
  103. package/ui/UIView.d.ts +1 -1
  104. package/ui/elements/AccordionElement.d.ts +5 -5
  105. package/ui/elements/AccordionElement.js +4 -0
  106. package/ui/elements/ButtonElement.d.ts +3 -3
  107. package/ui/elements/ButtonGroupElement.d.ts +2 -2
  108. package/ui/elements/NavigationMenuElement.d.ts +5 -1
  109. package/ui/elements/NavigationMenuElement.js +3 -2
  110. package/ui/elements/PlaceholderElement.d.ts +2 -1
  111. package/ui/elements/SmallButtonElement.d.ts +1 -1
  112. package/ui/elements/TypographyElement.d.ts +1 -1
  113. package/ui/elements/form/FileManagerElement/styled.d.ts +9 -9
  114. package/ui/elements/form/FileManagerElement.d.ts +3 -4
  115. package/ui/elements/form/FormElement.d.ts +5 -5
  116. package/ui/elements/form/FormFieldElement.d.ts +6 -5
  117. package/ui/elements/form/FormFieldElement.js +5 -5
  118. package/ui/elements/form/InputElement.d.ts +1 -0
  119. package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -2
  120. package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -2
  121. package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -2
  122. package/ui/views/AdminView/components/Hamburger.d.ts +2 -2
  123. package/ui/views/AdminView/components/Snackbar.d.ts +2 -2
  124. package/ui/views/FormView/FormContainerElement.d.ts +2 -2
  125. package/ui/views/FormView/FormFooterElement.d.ts +3 -3
  126. package/ui/views/FormView/FormHeaderElement.d.ts +2 -2
  127. package/ui/views/FormView.d.ts +1 -1
  128. package/ui/views/FormView.js +4 -2
  129. package/ui/views/OverlayView/ContentElement.d.ts +2 -2
  130. package/ui/views/OverlayView/HeaderElement.d.ts +5 -5
  131. package/ui/views/OverlayView/useOverlayView.d.ts +4 -5
  132. package/ui/views/OverlayView/useOverlayView.js +2 -2
  133. package/ui/views/OverlayView.d.ts +4 -6
  134. package/ui/views/SplitView/SplitViewPanelElement.d.ts +3 -3
  135. 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(_ref) {
51
- var value = _ref.value,
52
- defaultValue = _ref.defaultValue,
53
- type = _ref.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(_ref2) {
63
- var className = _ref2.className,
64
- value = _ref2.value,
65
- _onChange = _ref2.onChange,
66
- label = _ref2.label,
67
- description = _ref2.description,
68
- _ref2$validation = _ref2.validation,
69
- validation = _ref2$validation === void 0 ? {
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
- } : _ref2$validation,
72
- _ref2$defaultValue = _ref2.defaultValue,
73
- defaultValue = _ref2$defaultValue === void 0 ? "" : _ref2$defaultValue,
74
- props = _objectWithoutProperties(_ref2, _excluded);
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(_ref3) {
88
- var value = _ref3.target.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
- declare type SingleImageUploadProps = FormComponentProps & {
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?: Function;
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 {};
@@ -95,7 +95,8 @@ var SingleImageUpload = /*#__PURE__*/function (_React$Component) {
95
95
 
96
96
  _defineProperty(SingleImageUpload, "defaultProps", {
97
97
  validation: {
98
- isValid: null
98
+ isValid: null,
99
+ message: null
99
100
  }
100
101
  });
101
102
 
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { CellProps } from "@webiny/ui/Grid";
3
- declare type SplitViewProps = {
3
+ interface SplitViewProps {
4
4
  children: React.ReactElement<any> | React.ReactElement<any>[];
5
5
  className?: string;
6
- };
7
- declare const SplitView: (props: SplitViewProps) => JSX.Element;
8
- declare const LeftPanel: (props: CellProps) => JSX.Element;
9
- declare const RightPanel: (props: CellProps) => JSX.Element;
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
- declare type Args = {
2
+ interface Params {
3
3
  title?: React.ReactNode;
4
4
  message?: React.ReactNode;
5
5
  [key: string]: any;
6
- };
7
- declare const useConfirmationDialog: ({ title, message, ...options }?: Args) => {
8
- showConfirmation: (onAccept: any, onCancel?: any) => void;
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: {
@@ -1,5 +1,10 @@
1
- declare const useDialog: () => {
2
- showDialog: (message: any, options: any) => void;
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 };
@@ -1,5 +1,5 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { useUi } from "@webiny/app/hooks/useUi";
2
+ import { useUi } from "@webiny/app/hooks/useUi"; // TODO @ts-refactor
3
3
 
4
4
  var useDialog = function useDialog() {
5
5
  var ui = useUi();
@@ -1,4 +1,7 @@
1
- export declare const useSnackbar: () => {
2
- showSnackbar: (message: any, options?: {}) => void;
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.23.1-beta.0",
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.1-beta.0",
23
- "@webiny/app-admin-core": "5.23.1-beta.0",
24
- "@webiny/app-security": "5.23.1-beta.0",
25
- "@webiny/form": "5.23.1-beta.0",
26
- "@webiny/plugins": "5.23.1-beta.0",
27
- "@webiny/react-router": "5.23.1-beta.0",
28
- "@webiny/telemetry": "5.23.1-beta.0",
29
- "@webiny/ui": "5.23.1-beta.0",
30
- "@webiny/ui-composer": "5.23.1-beta.0",
31
- "@webiny/validation": "5.23.1-beta.0",
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
- "@webiny/cli": "^5.23.1-beta.0",
69
- "@webiny/project-utils": "^5.23.1-beta.0",
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": "05db67aebc2de3c33ba0622f730157ae14143b95"
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<any>[];
30
+ get actions(): React.ComponentType[];
31
31
  render(params: RenderParams): React.ReactNode;
32
32
  }
33
33
  export {};
@@ -1,12 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { Plugin } from "@webiny/plugins";
3
- export declare type MenuProps = {
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: any): React.ReactNode;
35
+ render(props: Props): React.ReactNode;
36
36
  }
37
37
  export {};
@@ -1,3 +1,7 @@
1
- /// <reference types="react" />
2
- declare const DeleteAction: (props: any) => JSX.Element;
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
- declare type EditActionProps = {
3
- file: any;
4
- uploadFile: any;
5
- validateFiles: any;
6
- canEdit: (file: any) => boolean;
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.t0 = dispatch;
94
- _context.next = 3;
104
+ _context.next = 2;
95
105
  return toDataUrl(file.src);
96
106
 
97
- case 3:
98
- _context.t1 = _context.sent;
99
- _context.t2 = {
107
+ case 2:
108
+ dataUrl = _context.sent;
109
+ dispatch({
100
110
  type: "setDataUrl",
101
- dataUrl: _context.t1
102
- };
103
- (0, _context.t0)(_context.t2);
111
+ dataUrl: dataUrl
112
+ });
104
113
 
105
- case 6:
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
- export default class SearchBarDropdown extends React.Component<any> {
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,5 +1,6 @@
1
+ import React from "react";
1
2
  export declare const globalSearchHotkey: {
2
3
  type: string;
3
4
  name: string;
4
- preventOpen(e: any): boolean;
5
+ preventOpen(e: React.ChangeEvent<HTMLInputElement>): boolean;
5
6
  };
@@ -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>, "children" | "slot" | "style" | "title" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "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>, "children" | "slot" | "style" | "title" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "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>, "children" | "slot" | "style" | "title" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "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>;
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;
@@ -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: any): boolean;
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({ file }: {
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({ onInstalled }: {
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: any, config: Item);
14
+ constructor(id: string, config: Item);
15
15
  setTitle(title: string): void;
16
16
  setDescription(description: string): void;
17
- render(props: any): JSX.Element;
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: any, config: Config);
23
+ constructor(id: string, config: Config);
24
24
  getAccordionItemElement(id: string): AccordionItemElement;
25
- render(props: any): JSX.Element;
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