@watermarkinsights/ripple-react 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/components/index.d.ts +1 -1
  2. package/dist/components/index.js +1 -1
  3. package/dist/components/stencil-generated/index.d.ts +1 -1
  4. package/dist/components/stencil-generated/index.js +28 -28
  5. package/dist/components.d.ts +41 -41
  6. package/dist/components.js +43 -43
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +3 -3
  9. package/dist/react-component-lib/ReactProps.d.ts +3 -3
  10. package/dist/react-component-lib/createComponent.d.ts +10 -10
  11. package/dist/react-component-lib/createComponent.js +105 -105
  12. package/dist/react-component-lib/createControllerComponent.d.ts +43 -43
  13. package/dist/react-component-lib/createControllerComponent.js +145 -145
  14. package/dist/react-component-lib/createOverlayComponent.d.ts +21 -21
  15. package/dist/react-component-lib/createOverlayComponent.js +188 -188
  16. package/dist/react-component-lib/index.d.ts +2 -2
  17. package/dist/react-component-lib/index.js +2 -2
  18. package/dist/react-component-lib/interfaces.d.ts +29 -29
  19. package/dist/react-component-lib/utils/attachEventProps.d.ts +8 -8
  20. package/dist/react-component-lib/utils/attachEventProps.js +78 -78
  21. package/dist/react-component-lib/utils/attachProps.d.ts +16 -16
  22. package/dist/react-component-lib/utils/attachProps.js +108 -108
  23. package/dist/react-component-lib/utils/case.d.ts +2 -2
  24. package/dist/react-component-lib/utils/case.js +8 -8
  25. package/dist/react-component-lib/utils/dev.d.ts +2 -2
  26. package/dist/react-component-lib/utils/dev.js +12 -12
  27. package/dist/react-component-lib/utils/index.d.ts +10 -10
  28. package/dist/react-component-lib/utils/index.js +46 -46
  29. package/package.json +2 -2
@@ -1,44 +1,44 @@
1
- /* eslint-disable */
2
- /* tslint:disable */
3
- /* auto-generated react proxies */
4
- import { createReactComponent } from './react-component-lib';
5
- export var PrivChartPopover = /*@__PURE__*/ createReactComponent('priv-chart-popover');
6
- export var PrivDatepicker = /*@__PURE__*/ createReactComponent('priv-datepicker');
7
- export var PrivNavigatorButton = /*@__PURE__*/ createReactComponent('priv-navigator-button');
8
- export var PrivNavigatorItem = /*@__PURE__*/ createReactComponent('priv-navigator-item');
9
- export var WmActionMenu = /*@__PURE__*/ createReactComponent('wm-action-menu');
10
- export var WmButton = /*@__PURE__*/ createReactComponent('wm-button');
11
- export var WmChart = /*@__PURE__*/ createReactComponent('wm-chart');
12
- export var WmChartSlice = /*@__PURE__*/ createReactComponent('wm-chart-slice');
13
- export var WmDatepicker = /*@__PURE__*/ createReactComponent('wm-datepicker');
14
- export var WmFile = /*@__PURE__*/ createReactComponent('wm-file');
15
- export var WmFileList = /*@__PURE__*/ createReactComponent('wm-file-list');
16
- export var WmInput = /*@__PURE__*/ createReactComponent('wm-input');
17
- export var WmLineChart = /*@__PURE__*/ createReactComponent('wm-line-chart');
18
- export var WmMenuitem = /*@__PURE__*/ createReactComponent('wm-menuitem');
19
- export var WmModal = /*@__PURE__*/ createReactComponent('wm-modal');
20
- export var WmModalFooter = /*@__PURE__*/ createReactComponent('wm-modal-footer');
21
- export var WmModalHeader = /*@__PURE__*/ createReactComponent('wm-modal-header');
22
- export var WmNavigation = /*@__PURE__*/ createReactComponent('wm-navigation');
23
- export var WmNavigationHamburger = /*@__PURE__*/ createReactComponent('wm-navigation-hamburger');
24
- export var WmNavigationItem = /*@__PURE__*/ createReactComponent('wm-navigation-item');
25
- export var WmNavigator = /*@__PURE__*/ createReactComponent('wm-navigator');
26
- export var WmOption = /*@__PURE__*/ createReactComponent('wm-option');
27
- export var WmPagination = /*@__PURE__*/ createReactComponent('wm-pagination');
28
- export var WmProgressIndicator = /*@__PURE__*/ createReactComponent('wm-progress-indicator');
29
- export var WmProgressMonitor = /*@__PURE__*/ createReactComponent('wm-progress-monitor');
30
- export var WmProgressSlice = /*@__PURE__*/ createReactComponent('wm-progress-slice');
31
- export var WmSearch = /*@__PURE__*/ createReactComponent('wm-search');
32
- export var WmSelect = /*@__PURE__*/ createReactComponent('wm-select');
33
- export var WmSnackbar = /*@__PURE__*/ createReactComponent('wm-snackbar');
34
- export var WmTabItem = /*@__PURE__*/ createReactComponent('wm-tab-item');
35
- export var WmTabList = /*@__PURE__*/ createReactComponent('wm-tab-list');
36
- export var WmTabPanel = /*@__PURE__*/ createReactComponent('wm-tab-panel');
37
- export var WmTagInput = /*@__PURE__*/ createReactComponent('wm-tag-input');
38
- export var WmTagOption = /*@__PURE__*/ createReactComponent('wm-tag-option');
39
- export var WmTextarea = /*@__PURE__*/ createReactComponent('wm-textarea');
40
- export var WmTimepicker = /*@__PURE__*/ createReactComponent('wm-timepicker');
41
- export var WmToggletip = /*@__PURE__*/ createReactComponent('wm-toggletip');
42
- export var WmUploader = /*@__PURE__*/ createReactComponent('wm-uploader');
43
- export var WmWrapper = /*@__PURE__*/ createReactComponent('wm-wrapper');
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /* auto-generated react proxies */
4
+ import { createReactComponent } from './react-component-lib';
5
+ export var PrivChartPopover = /*@__PURE__*/ createReactComponent('priv-chart-popover');
6
+ export var PrivDatepicker = /*@__PURE__*/ createReactComponent('priv-datepicker');
7
+ export var PrivNavigatorButton = /*@__PURE__*/ createReactComponent('priv-navigator-button');
8
+ export var PrivNavigatorItem = /*@__PURE__*/ createReactComponent('priv-navigator-item');
9
+ export var WmActionMenu = /*@__PURE__*/ createReactComponent('wm-action-menu');
10
+ export var WmButton = /*@__PURE__*/ createReactComponent('wm-button');
11
+ export var WmChart = /*@__PURE__*/ createReactComponent('wm-chart');
12
+ export var WmChartSlice = /*@__PURE__*/ createReactComponent('wm-chart-slice');
13
+ export var WmDatepicker = /*@__PURE__*/ createReactComponent('wm-datepicker');
14
+ export var WmFile = /*@__PURE__*/ createReactComponent('wm-file');
15
+ export var WmFileList = /*@__PURE__*/ createReactComponent('wm-file-list');
16
+ export var WmInput = /*@__PURE__*/ createReactComponent('wm-input');
17
+ export var WmLineChart = /*@__PURE__*/ createReactComponent('wm-line-chart');
18
+ export var WmMenuitem = /*@__PURE__*/ createReactComponent('wm-menuitem');
19
+ export var WmModal = /*@__PURE__*/ createReactComponent('wm-modal');
20
+ export var WmModalFooter = /*@__PURE__*/ createReactComponent('wm-modal-footer');
21
+ export var WmModalHeader = /*@__PURE__*/ createReactComponent('wm-modal-header');
22
+ export var WmNavigation = /*@__PURE__*/ createReactComponent('wm-navigation');
23
+ export var WmNavigationHamburger = /*@__PURE__*/ createReactComponent('wm-navigation-hamburger');
24
+ export var WmNavigationItem = /*@__PURE__*/ createReactComponent('wm-navigation-item');
25
+ export var WmNavigator = /*@__PURE__*/ createReactComponent('wm-navigator');
26
+ export var WmOption = /*@__PURE__*/ createReactComponent('wm-option');
27
+ export var WmPagination = /*@__PURE__*/ createReactComponent('wm-pagination');
28
+ export var WmProgressIndicator = /*@__PURE__*/ createReactComponent('wm-progress-indicator');
29
+ export var WmProgressMonitor = /*@__PURE__*/ createReactComponent('wm-progress-monitor');
30
+ export var WmProgressSlice = /*@__PURE__*/ createReactComponent('wm-progress-slice');
31
+ export var WmSearch = /*@__PURE__*/ createReactComponent('wm-search');
32
+ export var WmSelect = /*@__PURE__*/ createReactComponent('wm-select');
33
+ export var WmSnackbar = /*@__PURE__*/ createReactComponent('wm-snackbar');
34
+ export var WmTabItem = /*@__PURE__*/ createReactComponent('wm-tab-item');
35
+ export var WmTabList = /*@__PURE__*/ createReactComponent('wm-tab-list');
36
+ export var WmTabPanel = /*@__PURE__*/ createReactComponent('wm-tab-panel');
37
+ export var WmTagInput = /*@__PURE__*/ createReactComponent('wm-tag-input');
38
+ export var WmTagOption = /*@__PURE__*/ createReactComponent('wm-tag-option');
39
+ export var WmTextarea = /*@__PURE__*/ createReactComponent('wm-textarea');
40
+ export var WmTimepicker = /*@__PURE__*/ createReactComponent('wm-timepicker');
41
+ export var WmToggletip = /*@__PURE__*/ createReactComponent('wm-toggletip');
42
+ export var WmUploader = /*@__PURE__*/ createReactComponent('wm-uploader');
43
+ export var WmWrapper = /*@__PURE__*/ createReactComponent('wm-wrapper');
44
44
  //# sourceMappingURL=components.js.map
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './components';
1
+ export * from './components';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineCustomElements, applyPolyfills } from '@watermarkinsights/ripple/dist/loader';
2
- applyPolyfills().then(function () { return defineCustomElements(); });
3
- export * from './components';
1
+ import { defineCustomElements, applyPolyfills } from '@watermarkinsights/ripple/dist/loader';
2
+ applyPolyfills().then(function () { return defineCustomElements(); });
3
+ export * from './components';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export interface ReactProps {
2
- className?: string;
3
- }
1
+ export interface ReactProps {
2
+ className?: string;
3
+ }
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- export interface HTMLStencilElement extends HTMLElement {
3
- componentOnReady(): Promise<this>;
4
- }
5
- interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
6
- forwardedRef: React.RefObject<ElementType>;
7
- ref?: React.Ref<any>;
8
- }
9
- export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
10
- export {};
1
+ import React from 'react';
2
+ export interface HTMLStencilElement extends HTMLElement {
3
+ componentOnReady(): Promise<this>;
4
+ }
5
+ interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
6
+ forwardedRef: React.RefObject<ElementType>;
7
+ ref?: React.Ref<any>;
8
+ }
9
+ export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
10
+ export {};
@@ -1,106 +1,106 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
- import React, { createElement } from 'react';
37
- import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
38
- export var createReactComponent = function (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) {
39
- if (defineCustomElement !== undefined) {
40
- defineCustomElement();
41
- }
42
- var displayName = dashToPascalCase(tagName);
43
- var ReactComponent = /** @class */ (function (_super) {
44
- __extends(class_1, _super);
45
- function class_1(props) {
46
- var _this = _super.call(this, props) || this;
47
- _this.setComponentElRef = function (element) {
48
- _this.componentEl = element;
49
- };
50
- return _this;
51
- }
52
- class_1.prototype.componentDidMount = function () {
53
- this.componentDidUpdate(this.props);
54
- };
55
- class_1.prototype.componentDidUpdate = function (prevProps) {
56
- attachProps(this.componentEl, this.props, prevProps);
57
- };
58
- class_1.prototype.render = function () {
59
- var _a = this.props, children = _a.children, forwardedRef = _a.forwardedRef, style = _a.style, className = _a.className, ref = _a.ref, cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
60
- var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
61
- var value = cProps[name];
62
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
63
- var eventName = name.substring(2).toLowerCase();
64
- if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
65
- acc[name] = value;
66
- }
67
- }
68
- else {
69
- // we should only render strings, booleans, and numbers as attrs in html.
70
- // objects, functions, arrays etc get synced via properties on mount.
71
- var type = typeof value;
72
- if (type === 'string' || type === 'boolean' || type === 'number') {
73
- acc[camelToDashCase(name)] = value;
74
- }
75
- }
76
- return acc;
77
- }, {});
78
- if (manipulatePropsFunction) {
79
- propsToPass = manipulatePropsFunction(this.props, propsToPass);
80
- }
81
- var newProps = __assign(__assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style: style });
82
- /**
83
- * We use createElement here instead of
84
- * React.createElement to work around a
85
- * bug in Vite (https://github.com/vitejs/vite/issues/6104).
86
- * React.createElement causes all elements to be rendered
87
- * as <tagname> instead of the actual Web Component.
88
- */
89
- return createElement(tagName, newProps, children);
90
- };
91
- Object.defineProperty(class_1, "displayName", {
92
- get: function () {
93
- return displayName;
94
- },
95
- enumerable: false,
96
- configurable: true
97
- });
98
- return class_1;
99
- }(React.Component));
100
- // If context was passed to createReactComponent then conditionally add it to the Component Class
101
- if (ReactComponentContext) {
102
- ReactComponent.contextType = ReactComponentContext;
103
- }
104
- return createForwardRef(ReactComponent, displayName);
105
- };
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __assign = (this && this.__assign) || function () {
15
+ __assign = Object.assign || function(t) {
16
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17
+ s = arguments[i];
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
+ t[p] = s[p];
20
+ }
21
+ return t;
22
+ };
23
+ return __assign.apply(this, arguments);
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ import React, { createElement } from 'react';
37
+ import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
38
+ export var createReactComponent = function (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) {
39
+ if (defineCustomElement !== undefined) {
40
+ defineCustomElement();
41
+ }
42
+ var displayName = dashToPascalCase(tagName);
43
+ var ReactComponent = /** @class */ (function (_super) {
44
+ __extends(class_1, _super);
45
+ function class_1(props) {
46
+ var _this = _super.call(this, props) || this;
47
+ _this.setComponentElRef = function (element) {
48
+ _this.componentEl = element;
49
+ };
50
+ return _this;
51
+ }
52
+ class_1.prototype.componentDidMount = function () {
53
+ this.componentDidUpdate(this.props);
54
+ };
55
+ class_1.prototype.componentDidUpdate = function (prevProps) {
56
+ attachProps(this.componentEl, this.props, prevProps);
57
+ };
58
+ class_1.prototype.render = function () {
59
+ var _a = this.props, children = _a.children, forwardedRef = _a.forwardedRef, style = _a.style, className = _a.className, ref = _a.ref, cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
60
+ var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
61
+ var value = cProps[name];
62
+ if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
63
+ var eventName = name.substring(2).toLowerCase();
64
+ if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
65
+ acc[name] = value;
66
+ }
67
+ }
68
+ else {
69
+ // we should only render strings, booleans, and numbers as attrs in html.
70
+ // objects, functions, arrays etc get synced via properties on mount.
71
+ var type = typeof value;
72
+ if (type === 'string' || type === 'boolean' || type === 'number') {
73
+ acc[camelToDashCase(name)] = value;
74
+ }
75
+ }
76
+ return acc;
77
+ }, {});
78
+ if (manipulatePropsFunction) {
79
+ propsToPass = manipulatePropsFunction(this.props, propsToPass);
80
+ }
81
+ var newProps = __assign(__assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style: style });
82
+ /**
83
+ * We use createElement here instead of
84
+ * React.createElement to work around a
85
+ * bug in Vite (https://github.com/vitejs/vite/issues/6104).
86
+ * React.createElement causes all elements to be rendered
87
+ * as <tagname> instead of the actual Web Component.
88
+ */
89
+ return createElement(tagName, newProps, children);
90
+ };
91
+ Object.defineProperty(class_1, "displayName", {
92
+ get: function () {
93
+ return displayName;
94
+ },
95
+ enumerable: false,
96
+ configurable: true
97
+ });
98
+ return class_1;
99
+ }(React.Component));
100
+ // If context was passed to createReactComponent then conditionally add it to the Component Class
101
+ if (ReactComponentContext) {
102
+ ReactComponent.contextType = ReactComponentContext;
103
+ }
104
+ return createForwardRef(ReactComponent, displayName);
105
+ };
106
106
  //# sourceMappingURL=createComponent.js.map
@@ -1,43 +1,43 @@
1
- import React from 'react';
2
- interface LoadingElement {
3
- present: () => any;
4
- dismiss: () => any;
5
- }
6
- interface ReactControllerProps<E> {
7
- isOpen: boolean;
8
- onDidDismiss: (event: CustomEvent<E>) => void;
9
- }
10
- export declare function createControllerComponent<OptionsType extends object, LoadingElementType extends LoadingElement, OverlayEventDetail>(displayName: string, controller: {
11
- create: (options: any) => Promise<LoadingElementType>;
12
- }): {
13
- new (props: OptionsType & ReactControllerProps<OverlayEventDetail>): {
14
- controller?: LoadingElementType;
15
- componentDidMount(): Promise<void>;
16
- componentDidUpdate(prevProps: OptionsType & ReactControllerProps<OverlayEventDetail>): Promise<void>;
17
- present(prevProps?: OptionsType & ReactControllerProps<OverlayEventDetail>): Promise<void>;
18
- render(): null;
19
- context: any;
20
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
21
- forceUpdate(callback?: () => void): void;
22
- readonly props: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>> & Readonly<{
23
- children?: React.ReactNode;
24
- }>;
25
- state: Readonly<{}>;
26
- refs: {
27
- [key: string]: React.ReactInstance;
28
- };
29
- shouldComponentUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): boolean;
30
- componentWillUnmount?(): void;
31
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
32
- getSnapshotBeforeUpdate?(prevProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, prevState: Readonly<{}>): any;
33
- componentWillMount?(): void;
34
- UNSAFE_componentWillMount?(): void;
35
- componentWillReceiveProps?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextContext: any): void;
36
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextContext: any): void;
37
- componentWillUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): void;
38
- UNSAFE_componentWillUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): void;
39
- };
40
- readonly displayName: string;
41
- contextType?: React.Context<any>;
42
- };
43
- export {};
1
+ import React from 'react';
2
+ interface LoadingElement {
3
+ present: () => any;
4
+ dismiss: () => any;
5
+ }
6
+ interface ReactControllerProps<E> {
7
+ isOpen: boolean;
8
+ onDidDismiss: (event: CustomEvent<E>) => void;
9
+ }
10
+ export declare function createControllerComponent<OptionsType extends object, LoadingElementType extends LoadingElement, OverlayEventDetail>(displayName: string, controller: {
11
+ create: (options: any) => Promise<LoadingElementType>;
12
+ }): {
13
+ new (props: OptionsType & ReactControllerProps<OverlayEventDetail>): {
14
+ controller?: LoadingElementType;
15
+ componentDidMount(): Promise<void>;
16
+ componentDidUpdate(prevProps: OptionsType & ReactControllerProps<OverlayEventDetail>): Promise<void>;
17
+ present(prevProps?: OptionsType & ReactControllerProps<OverlayEventDetail>): Promise<void>;
18
+ render(): null;
19
+ context: any;
20
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
21
+ forceUpdate(callback?: () => void): void;
22
+ readonly props: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>> & Readonly<{
23
+ children?: React.ReactNode;
24
+ }>;
25
+ state: Readonly<{}>;
26
+ refs: {
27
+ [key: string]: React.ReactInstance;
28
+ };
29
+ shouldComponentUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): boolean;
30
+ componentWillUnmount?(): void;
31
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
32
+ getSnapshotBeforeUpdate?(prevProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, prevState: Readonly<{}>): any;
33
+ componentWillMount?(): void;
34
+ UNSAFE_componentWillMount?(): void;
35
+ componentWillReceiveProps?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextContext: any): void;
36
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextContext: any): void;
37
+ componentWillUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): void;
38
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>, nextState: Readonly<{}>, nextContext: any): void;
39
+ };
40
+ readonly displayName: string;
41
+ contextType?: React.Context<any>;
42
+ };
43
+ export {};