@watermarkinsights/ripple-react 3.0.1 → 3.1.0-6
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/package.json +2 -2
- package/dist/components.d.ts +0 -31
- package/dist/components.js +0 -34
- package/dist/components.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/react-component-lib/ReactProps.d.ts +0 -3
- package/dist/react-component-lib/ReactProps.js +0 -2
- package/dist/react-component-lib/ReactProps.js.map +0 -1
- package/dist/react-component-lib/createComponent.d.ts +0 -10
- package/dist/react-component-lib/createComponent.js +0 -92
- package/dist/react-component-lib/createComponent.js.map +0 -1
- package/dist/react-component-lib/createControllerComponent.d.ts +0 -43
- package/dist/react-component-lib/createControllerComponent.js +0 -148
- package/dist/react-component-lib/createControllerComponent.js.map +0 -1
- package/dist/react-component-lib/createOverlayComponent.d.ts +0 -20
- package/dist/react-component-lib/createOverlayComponent.js +0 -177
- package/dist/react-component-lib/createOverlayComponent.js.map +0 -1
- package/dist/react-component-lib/index.d.ts +0 -2
- package/dist/react-component-lib/index.js +0 -3
- package/dist/react-component-lib/index.js.map +0 -1
- package/dist/react-component-lib/interfaces.d.ts +0 -29
- package/dist/react-component-lib/interfaces.js +0 -2
- package/dist/react-component-lib/interfaces.js.map +0 -1
- package/dist/react-component-lib/utils/attachEventProps.d.ts +0 -8
- package/dist/react-component-lib/utils/attachEventProps.js +0 -79
- package/dist/react-component-lib/utils/attachEventProps.js.map +0 -1
- package/dist/react-component-lib/utils/attachProps.d.ts +0 -12
- package/dist/react-component-lib/utils/attachProps.js +0 -97
- package/dist/react-component-lib/utils/attachProps.js.map +0 -1
- package/dist/react-component-lib/utils/case.d.ts +0 -2
- package/dist/react-component-lib/utils/case.js +0 -11
- package/dist/react-component-lib/utils/case.js.map +0 -1
- package/dist/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/react-component-lib/utils/dev.js +0 -13
- package/dist/react-component-lib/utils/dev.js.map +0 -1
- package/dist/react-component-lib/utils/index.d.ts +0 -7
- package/dist/react-component-lib/utils/index.js +0 -40
- package/dist/react-component-lib/utils/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@watermarkinsights/ripple-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.1.0-6",
|
|
5
5
|
"description": "React specific wrappers for Ripple component library",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"compile": "npm run tsc",
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@watermarkinsights/ripple": "3.0
|
|
43
|
+
"@watermarkinsights/ripple": "3.1.0-6"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/dist/components.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { JSX } from '@watermarkinsights/ripple';
|
|
3
|
-
export declare const PrivChartPopover: import("react").ForwardRefExoticComponent<JSX.PrivChartPopover & Omit<import("react").HTMLAttributes<HTMLPrivChartPopoverElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPrivChartPopoverElement>>;
|
|
4
|
-
export declare const PrivDatepicker: import("react").ForwardRefExoticComponent<JSX.PrivDatepicker & Omit<import("react").HTMLAttributes<HTMLPrivDatepickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPrivDatepickerElement>>;
|
|
5
|
-
export declare const PrivNavigatorButton: import("react").ForwardRefExoticComponent<JSX.PrivNavigatorButton & Omit<import("react").HTMLAttributes<HTMLPrivNavigatorButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPrivNavigatorButtonElement>>;
|
|
6
|
-
export declare const PrivNavigatorItem: import("react").ForwardRefExoticComponent<JSX.PrivNavigatorItem & Omit<import("react").HTMLAttributes<HTMLPrivNavigatorItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPrivNavigatorItemElement>>;
|
|
7
|
-
export declare const WmActionMenu: import("react").ForwardRefExoticComponent<JSX.WmActionMenu & Omit<import("react").HTMLAttributes<HTMLWmActionMenuElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmActionMenuElement>>;
|
|
8
|
-
export declare const WmButton: import("react").ForwardRefExoticComponent<JSX.WmButton & Omit<import("react").HTMLAttributes<HTMLWmButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmButtonElement>>;
|
|
9
|
-
export declare const WmChart: import("react").ForwardRefExoticComponent<JSX.WmChart & Omit<import("react").HTMLAttributes<HTMLWmChartElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmChartElement>>;
|
|
10
|
-
export declare const WmChartSlice: import("react").ForwardRefExoticComponent<JSX.WmChartSlice & Omit<import("react").HTMLAttributes<HTMLWmChartSliceElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmChartSliceElement>>;
|
|
11
|
-
export declare const WmDatepicker: import("react").ForwardRefExoticComponent<JSX.WmDatepicker & Omit<import("react").HTMLAttributes<HTMLWmDatepickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmDatepickerElement>>;
|
|
12
|
-
export declare const WmInput: import("react").ForwardRefExoticComponent<JSX.WmInput & Omit<import("react").HTMLAttributes<HTMLWmInputElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmInputElement>>;
|
|
13
|
-
export declare const WmMenuitem: import("react").ForwardRefExoticComponent<JSX.WmMenuitem & Omit<import("react").HTMLAttributes<HTMLWmMenuitemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmMenuitemElement>>;
|
|
14
|
-
export declare const WmModal: import("react").ForwardRefExoticComponent<JSX.WmModal & Omit<import("react").HTMLAttributes<HTMLWmModalElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmModalElement>>;
|
|
15
|
-
export declare const WmModalFooter: import("react").ForwardRefExoticComponent<JSX.WmModalFooter & Omit<import("react").HTMLAttributes<HTMLWmModalFooterElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmModalFooterElement>>;
|
|
16
|
-
export declare const WmModalHeader: import("react").ForwardRefExoticComponent<JSX.WmModalHeader & Omit<import("react").HTMLAttributes<HTMLWmModalHeaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmModalHeaderElement>>;
|
|
17
|
-
export declare const WmNavigator: import("react").ForwardRefExoticComponent<JSX.WmNavigator & Omit<import("react").HTMLAttributes<HTMLWmNavigatorElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmNavigatorElement>>;
|
|
18
|
-
export declare const WmNetworkUploader: import("react").ForwardRefExoticComponent<JSX.WmNetworkUploader & Omit<import("react").HTMLAttributes<HTMLWmNetworkUploaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmNetworkUploaderElement>>;
|
|
19
|
-
export declare const WmOption: import("react").ForwardRefExoticComponent<JSX.WmOption & Omit<import("react").HTMLAttributes<HTMLWmOptionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmOptionElement>>;
|
|
20
|
-
export declare const WmPagination: import("react").ForwardRefExoticComponent<JSX.WmPagination & Omit<import("react").HTMLAttributes<HTMLWmPaginationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmPaginationElement>>;
|
|
21
|
-
export declare const WmSearch: import("react").ForwardRefExoticComponent<JSX.WmSearch & Omit<import("react").HTMLAttributes<HTMLWmSearchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmSearchElement>>;
|
|
22
|
-
export declare const WmSelect: import("react").ForwardRefExoticComponent<JSX.WmSelect & Omit<import("react").HTMLAttributes<HTMLWmSelectElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmSelectElement>>;
|
|
23
|
-
export declare const WmSnackbar: import("react").ForwardRefExoticComponent<JSX.WmSnackbar & Omit<import("react").HTMLAttributes<HTMLWmSnackbarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmSnackbarElement>>;
|
|
24
|
-
export declare const WmTabItem: import("react").ForwardRefExoticComponent<JSX.WmTabItem & Omit<import("react").HTMLAttributes<HTMLWmTabItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmTabItemElement>>;
|
|
25
|
-
export declare const WmTabList: import("react").ForwardRefExoticComponent<JSX.WmTabList & Omit<import("react").HTMLAttributes<HTMLWmTabListElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmTabListElement>>;
|
|
26
|
-
export declare const WmTabPanel: import("react").ForwardRefExoticComponent<JSX.WmTabPanel & Omit<import("react").HTMLAttributes<HTMLWmTabPanelElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmTabPanelElement>>;
|
|
27
|
-
export declare const WmTagInput: import("react").ForwardRefExoticComponent<JSX.WmTagInput & Omit<import("react").HTMLAttributes<HTMLWmTagInputElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmTagInputElement>>;
|
|
28
|
-
export declare const WmTimepicker: import("react").ForwardRefExoticComponent<JSX.WmTimepicker & Omit<import("react").HTMLAttributes<HTMLWmTimepickerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmTimepickerElement>>;
|
|
29
|
-
export declare const WmToggletip: import("react").ForwardRefExoticComponent<JSX.WmToggletip & Omit<import("react").HTMLAttributes<HTMLWmToggletipElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmToggletipElement>>;
|
|
30
|
-
export declare const WmUploader: import("react").ForwardRefExoticComponent<JSX.WmUploader & Omit<import("react").HTMLAttributes<HTMLWmUploaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmUploaderElement>>;
|
|
31
|
-
export declare const WmWrapper: import("react").ForwardRefExoticComponent<JSX.WmWrapper & Omit<import("react").HTMLAttributes<HTMLWmWrapperElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLWmWrapperElement>>;
|
package/dist/components.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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 WmInput = /*@__PURE__*/ createReactComponent('wm-input');
|
|
15
|
-
export var WmMenuitem = /*@__PURE__*/ createReactComponent('wm-menuitem');
|
|
16
|
-
export var WmModal = /*@__PURE__*/ createReactComponent('wm-modal');
|
|
17
|
-
export var WmModalFooter = /*@__PURE__*/ createReactComponent('wm-modal-footer');
|
|
18
|
-
export var WmModalHeader = /*@__PURE__*/ createReactComponent('wm-modal-header');
|
|
19
|
-
export var WmNavigator = /*@__PURE__*/ createReactComponent('wm-navigator');
|
|
20
|
-
export var WmNetworkUploader = /*@__PURE__*/ createReactComponent('wm-network-uploader');
|
|
21
|
-
export var WmOption = /*@__PURE__*/ createReactComponent('wm-option');
|
|
22
|
-
export var WmPagination = /*@__PURE__*/ createReactComponent('wm-pagination');
|
|
23
|
-
export var WmSearch = /*@__PURE__*/ createReactComponent('wm-search');
|
|
24
|
-
export var WmSelect = /*@__PURE__*/ createReactComponent('wm-select');
|
|
25
|
-
export var WmSnackbar = /*@__PURE__*/ createReactComponent('wm-snackbar');
|
|
26
|
-
export var WmTabItem = /*@__PURE__*/ createReactComponent('wm-tab-item');
|
|
27
|
-
export var WmTabList = /*@__PURE__*/ createReactComponent('wm-tab-list');
|
|
28
|
-
export var WmTabPanel = /*@__PURE__*/ createReactComponent('wm-tab-panel');
|
|
29
|
-
export var WmTagInput = /*@__PURE__*/ createReactComponent('wm-tag-input');
|
|
30
|
-
export var WmTimepicker = /*@__PURE__*/ createReactComponent('wm-timepicker');
|
|
31
|
-
export var WmToggletip = /*@__PURE__*/ createReactComponent('wm-toggletip');
|
|
32
|
-
export var WmUploader = /*@__PURE__*/ createReactComponent('wm-uploader');
|
|
33
|
-
export var WmWrapper = /*@__PURE__*/ createReactComponent('wm-wrapper');
|
|
34
|
-
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC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Y,CAAC,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC7F,cAAc,EAAE,CAAC,IAAI,CAAC,cAAc,OAAO,oBAAoB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,cAAc,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReactProps.js","sourceRoot":"","sources":["../../src/react-component-lib/ReactProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
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) => React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & import("./interfaces").StyleReactProps> & React.RefAttributes<ElementType>>;
|
|
10
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
|
-
import React from 'react';
|
|
39
|
-
import { attachProps, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs, } from './utils';
|
|
40
|
-
export var createReactComponent = function (tagName, ReactComponentContext, manipulatePropsFunction) {
|
|
41
|
-
var displayName = dashToPascalCase(tagName);
|
|
42
|
-
var ReactComponent = /** @class */ (function (_super) {
|
|
43
|
-
__extends(class_1, _super);
|
|
44
|
-
function class_1(props) {
|
|
45
|
-
var _this = _super.call(this, props) || this;
|
|
46
|
-
_this.setComponentElRef = function (element) {
|
|
47
|
-
_this.componentEl = element;
|
|
48
|
-
};
|
|
49
|
-
return _this;
|
|
50
|
-
}
|
|
51
|
-
class_1.prototype.componentDidMount = function () {
|
|
52
|
-
this.componentDidUpdate(this.props);
|
|
53
|
-
};
|
|
54
|
-
class_1.prototype.componentDidUpdate = function (prevProps) {
|
|
55
|
-
attachProps(this.componentEl, this.props, prevProps);
|
|
56
|
-
};
|
|
57
|
-
class_1.prototype.render = function () {
|
|
58
|
-
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"]);
|
|
59
|
-
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
60
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
61
|
-
var eventName = name.substring(2).toLowerCase();
|
|
62
|
-
if (typeof document !== 'undefined' && isCoveredByReact(eventName, document)) {
|
|
63
|
-
acc[name] = cProps[name];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
acc[name] = cProps[name];
|
|
68
|
-
}
|
|
69
|
-
return acc;
|
|
70
|
-
}, {});
|
|
71
|
-
if (manipulatePropsFunction) {
|
|
72
|
-
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
|
73
|
-
}
|
|
74
|
-
var newProps = __assign(__assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style: style });
|
|
75
|
-
return React.createElement(tagName, newProps, children);
|
|
76
|
-
};
|
|
77
|
-
Object.defineProperty(class_1, "displayName", {
|
|
78
|
-
get: function () {
|
|
79
|
-
return displayName;
|
|
80
|
-
},
|
|
81
|
-
enumerable: false,
|
|
82
|
-
configurable: true
|
|
83
|
-
});
|
|
84
|
-
return class_1;
|
|
85
|
-
}(React.Component));
|
|
86
|
-
// If context was passed to createReactComponent then conditionally add it to the Component Class
|
|
87
|
-
if (ReactComponentContext) {
|
|
88
|
-
ReactComponent.contextType = ReactComponentContext;
|
|
89
|
-
}
|
|
90
|
-
return createForwardRef(ReactComponent, displayName);
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=createComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.js","sourceRoot":"","sources":["../../src/react-component-lib/createComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,GACV,MAAM,SAAS,CAAC;AAWjB,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB;IAEvB,IAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE9C,IAAM,cAAc;QAAiB,2BAAuD;QAO1F,iBAAY,KAA6C;YAAzD,YACE,kBAAM,KAAK,CAAC,SACb;YAND,uBAAiB,GAAG,UAAC,OAAoB;gBACvC,KAAI,CAAC,WAAW,GAAG,OAAO,CAAC;YAC7B,CAAC,CAAC;;QAIF,CAAC;QAED,mCAAiB,GAAjB;YACE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QAED,oCAAkB,GAAlB,UAAmB,SAAiD;YAClE,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACvD,CAAC;QAED,wBAAM,GAAN;YACE,IAAM,KAA+D,IAAI,CAAC,KA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CAAC,SAAS,EAkDnD,CAAC;IAEF,iGAAiG;IACjG,IAAI,qBAAqB,EAAE;QACzB,cAAc,CAAC,WAAW,GAAG,qBAAqB,CAAC;KACpD;IAED,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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<{
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
}> & Readonly<OptionsType & ReactControllerProps<OverlayEventDetail>>;
|
|
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,148 +0,0 @@
|
|
|
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
38
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
-
function step(op) {
|
|
41
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
-
while (_) try {
|
|
43
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
44
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
-
switch (op[0]) {
|
|
46
|
-
case 0: case 1: t = op; break;
|
|
47
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
-
default:
|
|
51
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
-
if (t[2]) _.ops.pop();
|
|
56
|
-
_.trys.pop(); continue;
|
|
57
|
-
}
|
|
58
|
-
op = body.call(thisArg, _);
|
|
59
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
64
|
-
var t = {};
|
|
65
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
66
|
-
t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
68
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
69
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
70
|
-
t[p[i]] = s[p[i]];
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
};
|
|
74
|
-
import React from 'react';
|
|
75
|
-
import { attachEventProps } from './utils/attachEventProps';
|
|
76
|
-
export function createControllerComponent(displayName, controller) {
|
|
77
|
-
var dismissEventName = "on" + displayName + "DidDismiss";
|
|
78
|
-
return /** @class */ (function (_super) {
|
|
79
|
-
__extends(ReactControllerComponent, _super);
|
|
80
|
-
function ReactControllerComponent(props) {
|
|
81
|
-
return _super.call(this, props) || this;
|
|
82
|
-
}
|
|
83
|
-
Object.defineProperty(ReactControllerComponent, "displayName", {
|
|
84
|
-
get: function () {
|
|
85
|
-
return displayName;
|
|
86
|
-
},
|
|
87
|
-
enumerable: false,
|
|
88
|
-
configurable: true
|
|
89
|
-
});
|
|
90
|
-
ReactControllerComponent.prototype.componentDidMount = function () {
|
|
91
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
-
var isOpen;
|
|
93
|
-
return __generator(this, function (_a) {
|
|
94
|
-
isOpen = this.props.isOpen;
|
|
95
|
-
if (isOpen) {
|
|
96
|
-
this.present();
|
|
97
|
-
}
|
|
98
|
-
return [2 /*return*/];
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
ReactControllerComponent.prototype.componentDidUpdate = function (prevProps) {
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
switch (_a.label) {
|
|
106
|
-
case 0:
|
|
107
|
-
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
|
108
|
-
this.present(prevProps);
|
|
109
|
-
}
|
|
110
|
-
if (!(this.controller &&
|
|
111
|
-
prevProps.isOpen !== this.props.isOpen &&
|
|
112
|
-
this.props.isOpen === false)) return [3 /*break*/, 2];
|
|
113
|
-
return [4 /*yield*/, this.controller.dismiss()];
|
|
114
|
-
case 1:
|
|
115
|
-
_a.sent();
|
|
116
|
-
_a.label = 2;
|
|
117
|
-
case 2: return [2 /*return*/];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
ReactControllerComponent.prototype.present = function (prevProps) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
var _a, isOpen, onDidDismiss, cProps, elementProps, _b;
|
|
125
|
-
var _c;
|
|
126
|
-
return __generator(this, function (_d) {
|
|
127
|
-
switch (_d.label) {
|
|
128
|
-
case 0:
|
|
129
|
-
_a = this.props, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, cProps = __rest(_a, ["isOpen", "onDidDismiss"]);
|
|
130
|
-
elementProps = __assign(__assign({}, cProps), (_c = {}, _c[dismissEventName] = onDidDismiss, _c));
|
|
131
|
-
_b = this;
|
|
132
|
-
return [4 /*yield*/, controller.create(__assign({}, elementProps))];
|
|
133
|
-
case 1:
|
|
134
|
-
_b.controller = _d.sent();
|
|
135
|
-
attachEventProps(this.controller, elementProps, prevProps);
|
|
136
|
-
this.controller.present();
|
|
137
|
-
return [2 /*return*/];
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
ReactControllerComponent.prototype.render = function () {
|
|
143
|
-
return null;
|
|
144
|
-
};
|
|
145
|
-
return ReactControllerComponent;
|
|
146
|
-
}(React.Component));
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=createControllerComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createControllerComponent.js","sourceRoot":"","sources":["../../src/react-component-lib/createControllerComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAY5D,MAAM,UAAU,yBAAyB,CAIvC,WAAmB,EAAE,UAAqE;IAC1F,IAAM,gBAAgB,GAAG,OAAK,WAAW,eAAY,CAAC;IAItD;QAA8C,4CAAsB;Q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,yCAAM,GAAN;YACE,OAAO,IAAI,CAAC;QACd,CAAC;QACH,+BAAC;IAAD,CAAC,AA/CM,CAAuC,KAAK,CAAC,SAAS,GA+C3D;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { OverlayEventDetail } from './interfaces';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface OverlayElement extends HTMLElement {
|
|
4
|
-
present: () => Promise<void>;
|
|
5
|
-
dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
|
|
6
|
-
}
|
|
7
|
-
export interface ReactOverlayProps {
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
isOpen: boolean;
|
|
10
|
-
onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
11
|
-
onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
12
|
-
onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
13
|
-
onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(displayName: string, controller: {
|
|
16
|
-
create: (options: any) => Promise<OverlayType>;
|
|
17
|
-
}) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
|
|
18
|
-
forwardedRef?: React.RefObject<OverlayType>;
|
|
19
|
-
}> & React.RefAttributes<OverlayType>>;
|
|
20
|
-
export {};
|
|
@@ -1,177 +0,0 @@
|
|
|
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
38
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
-
function step(op) {
|
|
41
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
-
while (_) try {
|
|
43
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
44
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
-
switch (op[0]) {
|
|
46
|
-
case 0: case 1: t = op; break;
|
|
47
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
-
default:
|
|
51
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
-
if (t[2]) _.ops.pop();
|
|
56
|
-
_.trys.pop(); continue;
|
|
57
|
-
}
|
|
58
|
-
op = body.call(thisArg, _);
|
|
59
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
64
|
-
var t = {};
|
|
65
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
66
|
-
t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
68
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
69
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
70
|
-
t[p[i]] = s[p[i]];
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
};
|
|
74
|
-
import React from 'react';
|
|
75
|
-
import ReactDOM from 'react-dom';
|
|
76
|
-
import { attachProps } from './utils';
|
|
77
|
-
export var createOverlayComponent = function (displayName, controller) {
|
|
78
|
-
var didDismissEventName = "on" + displayName + "DidDismiss";
|
|
79
|
-
var didPresentEventName = "on" + displayName + "DidPresent";
|
|
80
|
-
var willDismissEventName = "on" + displayName + "WillDismiss";
|
|
81
|
-
var willPresentEventName = "on" + displayName + "WillPresent";
|
|
82
|
-
var Overlay = /** @class */ (function (_super) {
|
|
83
|
-
__extends(Overlay, _super);
|
|
84
|
-
function Overlay(props) {
|
|
85
|
-
var _this = _super.call(this, props) || this;
|
|
86
|
-
_this.el = document.createElement('div');
|
|
87
|
-
_this.handleDismiss = _this.handleDismiss.bind(_this);
|
|
88
|
-
return _this;
|
|
89
|
-
}
|
|
90
|
-
Object.defineProperty(Overlay, "displayName", {
|
|
91
|
-
get: function () {
|
|
92
|
-
return displayName;
|
|
93
|
-
},
|
|
94
|
-
enumerable: false,
|
|
95
|
-
configurable: true
|
|
96
|
-
});
|
|
97
|
-
Overlay.prototype.componentDidMount = function () {
|
|
98
|
-
if (this.props.isOpen) {
|
|
99
|
-
this.present();
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
Overlay.prototype.componentWillUnmount = function () {
|
|
103
|
-
if (this.overlay) {
|
|
104
|
-
this.overlay.dismiss();
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
Overlay.prototype.handleDismiss = function (event) {
|
|
108
|
-
if (this.props.onDidDismiss) {
|
|
109
|
-
this.props.onDidDismiss(event);
|
|
110
|
-
}
|
|
111
|
-
if (this.props.forwardedRef) {
|
|
112
|
-
this.props.forwardedRef.current = undefined;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
Overlay.prototype.componentDidUpdate = function (prevProps) {
|
|
116
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
117
|
-
return __generator(this, function (_a) {
|
|
118
|
-
switch (_a.label) {
|
|
119
|
-
case 0:
|
|
120
|
-
if (this.overlay) {
|
|
121
|
-
attachProps(this.overlay, this.props, prevProps);
|
|
122
|
-
}
|
|
123
|
-
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
|
124
|
-
this.present(prevProps);
|
|
125
|
-
}
|
|
126
|
-
if (!(this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false)) return [3 /*break*/, 2];
|
|
127
|
-
return [4 /*yield*/, this.overlay.dismiss()];
|
|
128
|
-
case 1:
|
|
129
|
-
_a.sent();
|
|
130
|
-
_a.label = 2;
|
|
131
|
-
case 2: return [2 /*return*/];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
Overlay.prototype.present = function (prevProps) {
|
|
137
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
-
var _a, children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, cProps, elementProps, _b;
|
|
139
|
-
var _c;
|
|
140
|
-
var _this = this;
|
|
141
|
-
return __generator(this, function (_d) {
|
|
142
|
-
switch (_d.label) {
|
|
143
|
-
case 0:
|
|
144
|
-
_a = this.props, children = _a.children, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, onDidPresent = _a.onDidPresent, onWillDismiss = _a.onWillDismiss, onWillPresent = _a.onWillPresent, cProps = __rest(_a, ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
|
|
145
|
-
elementProps = __assign(__assign({}, cProps), (_c = { ref: this.props.forwardedRef }, _c[didDismissEventName] = this.handleDismiss, _c[didPresentEventName] = function (e) {
|
|
146
|
-
return _this.props.onDidPresent && _this.props.onDidPresent(e);
|
|
147
|
-
}, _c[willDismissEventName] = function (e) {
|
|
148
|
-
return _this.props.onWillDismiss && _this.props.onWillDismiss(e);
|
|
149
|
-
}, _c[willPresentEventName] = function (e) {
|
|
150
|
-
return _this.props.onWillPresent && _this.props.onWillPresent(e);
|
|
151
|
-
}, _c));
|
|
152
|
-
_b = this;
|
|
153
|
-
return [4 /*yield*/, controller.create(__assign(__assign({}, elementProps), { component: this.el, componentProps: {} }))];
|
|
154
|
-
case 1:
|
|
155
|
-
_b.overlay = _d.sent();
|
|
156
|
-
if (this.props.forwardedRef) {
|
|
157
|
-
this.props.forwardedRef.current = this.overlay;
|
|
158
|
-
}
|
|
159
|
-
attachProps(this.overlay, elementProps, prevProps);
|
|
160
|
-
return [4 /*yield*/, this.overlay.present()];
|
|
161
|
-
case 2:
|
|
162
|
-
_d.sent();
|
|
163
|
-
return [2 /*return*/];
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
Overlay.prototype.render = function () {
|
|
169
|
-
return ReactDOM.createPortal(this.props.isOpen ? this.props.children : null, this.el);
|
|
170
|
-
};
|
|
171
|
-
return Overlay;
|
|
172
|
-
}(React.Component));
|
|
173
|
-
return React.forwardRef(function (props, ref) {
|
|
174
|
-
return React.createElement(Overlay, __assign({}, props, { forwardedRef: ref }));
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
//# sourceMappingURL=createOverlayComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOverlayComponent.js","sourceRoot":"","sources":["../../src/react-component-lib/createOverlayComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgBtC,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAIpC,WAAmB,EACnB,UAA8D;IAE9D,IAA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,CAAC,MAAM,uBACjC,YAAY,KACf,SAAS,EAAE,IAAI,CAAC,EAAE,EAClB,cAAc,EAAE,EAAE,IAClB,EAAA;;4BAJF,GAAK,OAAO,GAAG,SAIb,CAAC;4BAEH,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;gCAC1B,IAAI,CAAC,KAAK,CAAC,YAAoB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;6BACzD;4BAED,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;4BAEnD,qBAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAA;;4BAA5B,SAA4B,CAAC;;;;;SAC9B;QAED,wBAAM,GAAN;YACE,OAAO,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;QACH,cAAC;IAAD,CAAC,AAxFD,CAAsB,KAAK,CAAC,SAAS,GAwFpC;IAED,OAAO,KAAK,CAAC,UAAU,CAAqB,UAAC,KAAK,EAAE,GAAG;QACrD,OAAO,oBAAC,OAAO,eAAK,KAAK,IAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react-component-lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface EventEmitter<T = any> {
|
|
2
|
-
emit: (data?: T) => CustomEvent<T>;
|
|
3
|
-
}
|
|
4
|
-
export interface StyleReactProps {
|
|
5
|
-
class?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface OverlayEventDetail<T = any> {
|
|
12
|
-
data?: T;
|
|
13
|
-
role?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface OverlayInterface {
|
|
16
|
-
el: HTMLElement;
|
|
17
|
-
animated: boolean;
|
|
18
|
-
keyboardClose: boolean;
|
|
19
|
-
overlayIndex: number;
|
|
20
|
-
presented: boolean;
|
|
21
|
-
enterAnimation?: any;
|
|
22
|
-
leaveAnimation?: any;
|
|
23
|
-
didPresent: EventEmitter<void>;
|
|
24
|
-
willPresent: EventEmitter<void>;
|
|
25
|
-
willDismiss: EventEmitter<OverlayEventDetail>;
|
|
26
|
-
didDismiss: EventEmitter<OverlayEventDetail>;
|
|
27
|
-
present(): Promise<void>;
|
|
28
|
-
dismiss(data?: any, role?: string): Promise<boolean>;
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/react-component-lib/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function attachEventProps(node: HTMLElement, newProps: any, oldProps?: any): void;
|
|
2
|
-
export declare function getClassName(classList: DOMTokenList, newProps: any, oldProps: any): string;
|
|
3
|
-
/**
|
|
4
|
-
* Checks if an event is supported in the current execution environment.
|
|
5
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
6
|
-
*/
|
|
7
|
-
export declare function isCoveredByReact(eventNameSuffix: string, doc?: Document): boolean;
|
|
8
|
-
export declare function syncEvent(node: Element, eventName: string, newEventHandler: (e: Event) => any): void;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export function attachEventProps(node, newProps, oldProps) {
|
|
2
|
-
if (oldProps === void 0) { oldProps = {}; }
|
|
3
|
-
var className = getClassName(node.classList, newProps, oldProps);
|
|
4
|
-
if (className) {
|
|
5
|
-
node.className = className;
|
|
6
|
-
}
|
|
7
|
-
Object.keys(newProps).forEach(function (name) {
|
|
8
|
-
if (name === 'children' || name === 'style' || name === 'ref' || name === 'className') {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
12
|
-
var eventName = name.substring(2);
|
|
13
|
-
var eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
14
|
-
if (!isCoveredByReact(eventNameLc)) {
|
|
15
|
-
syncEvent(node, eventNameLc, newProps[name]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
node[name] = newProps[name];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export function getClassName(classList, newProps, oldProps) {
|
|
24
|
-
// map the classes to Maps for performance
|
|
25
|
-
var currentClasses = arrayToMap(classList);
|
|
26
|
-
var incomingPropClasses = arrayToMap(newProps.className ? newProps.className.split(' ') : []);
|
|
27
|
-
var oldPropClasses = arrayToMap(oldProps.className ? oldProps.className.split(' ') : []);
|
|
28
|
-
var finalClassNames = [];
|
|
29
|
-
// loop through each of the current classes on the component
|
|
30
|
-
// to see if it should be a part of the classNames added
|
|
31
|
-
currentClasses.forEach(function (currentClass) {
|
|
32
|
-
if (incomingPropClasses.has(currentClass)) {
|
|
33
|
-
// add it as its already included in classnames coming in from newProps
|
|
34
|
-
finalClassNames.push(currentClass);
|
|
35
|
-
incomingPropClasses.delete(currentClass);
|
|
36
|
-
}
|
|
37
|
-
else if (!oldPropClasses.has(currentClass)) {
|
|
38
|
-
// add it as it has NOT been removed by user
|
|
39
|
-
finalClassNames.push(currentClass);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
incomingPropClasses.forEach(function (s) { return finalClassNames.push(s); });
|
|
43
|
-
return finalClassNames.join(' ');
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Checks if an event is supported in the current execution environment.
|
|
47
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
48
|
-
*/
|
|
49
|
-
export function isCoveredByReact(eventNameSuffix, doc) {
|
|
50
|
-
if (doc === void 0) { doc = document; }
|
|
51
|
-
var eventName = 'on' + eventNameSuffix;
|
|
52
|
-
var isSupported = eventName in doc;
|
|
53
|
-
if (!isSupported) {
|
|
54
|
-
var element = doc.createElement('div');
|
|
55
|
-
element.setAttribute(eventName, 'return;');
|
|
56
|
-
isSupported = typeof element[eventName] === 'function';
|
|
57
|
-
}
|
|
58
|
-
return isSupported;
|
|
59
|
-
}
|
|
60
|
-
export function syncEvent(node, eventName, newEventHandler) {
|
|
61
|
-
var eventStore = node.__events || (node.__events = {});
|
|
62
|
-
var oldEventHandler = eventStore[eventName];
|
|
63
|
-
// Remove old listener so they don't double up.
|
|
64
|
-
if (oldEventHandler) {
|
|
65
|
-
node.removeEventListener(eventName, oldEventHandler);
|
|
66
|
-
}
|
|
67
|
-
if (newEventHandler != null) {
|
|
68
|
-
// Bind new listener.
|
|
69
|
-
node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
|
|
70
|
-
newEventHandler.call(this, e);
|
|
71
|
-
}));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function arrayToMap(arr) {
|
|
75
|
-
var map = new Map();
|
|
76
|
-
arr.forEach(function (s) { return map.set(s, s); });
|
|
77
|
-
return map;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=attachEventProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachEventProps.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/attachEventProps.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,QAAa,EAAE,QAAkB;IAAlB,yBAAA,EAAA,aAAkB;IACnF,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,QA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E,eAAkC;IAC5F,IAAM,UAAU,GAAI,IAAY,CAAC,QAAQ,IAAI,CAAE,IAAY,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;IAC3E,IAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IAE9C,+CAA+C;IAC/C,IAAI,eAAe,EAAE;QACnB,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;KACtD;IAED,IAAI,eAAe,IAAI,IAAI,EAAE;QAC3B,qBAAqB;QACrB,IAAI,CAAC,gBAAgB,CACnB,SAAS,EACT,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,OAAO,CAAC,CAAQ;YAChD,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAChC,CAAC,CAAC,CACH,CAAC;KACH;AACH,CAAC;AAED,SAAS,UAAU,CAAC,GAA4B;IAC9C,IAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,GAAgB,CAAC,OAAO,CAAC,UAAC,CAAS,IAAK,OAAA,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAb,CAAa,CAAC,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
|
|
2
|
-
export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
|
|
3
|
-
/**
|
|
4
|
-
* Checks if an event is supported in the current execution environment.
|
|
5
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
6
|
-
*/
|
|
7
|
-
export declare const isCoveredByReact: (eventNameSuffix: string, doc: Document) => boolean;
|
|
8
|
-
export declare const syncEvent: (node: Element & {
|
|
9
|
-
__events?: {
|
|
10
|
-
[key: string]: (e: Event) => any;
|
|
11
|
-
};
|
|
12
|
-
}, eventName: string, newEventHandler?: (e: Event) => any) => void;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { camelToDashCase } from './case';
|
|
2
|
-
export var attachProps = function (node, newProps, oldProps) {
|
|
3
|
-
if (oldProps === void 0) { oldProps = {}; }
|
|
4
|
-
// some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
|
|
5
|
-
if (node instanceof Element) {
|
|
6
|
-
// add any classes in className to the class list
|
|
7
|
-
var className = getClassName(node.classList, newProps, oldProps);
|
|
8
|
-
if (className !== '') {
|
|
9
|
-
node.className = className;
|
|
10
|
-
}
|
|
11
|
-
Object.keys(newProps).forEach(function (name) {
|
|
12
|
-
if (name === 'children' ||
|
|
13
|
-
name === 'style' ||
|
|
14
|
-
name === 'ref' ||
|
|
15
|
-
name === 'class' ||
|
|
16
|
-
name === 'className' ||
|
|
17
|
-
name === 'forwardedRef') {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
21
|
-
var eventName = name.substring(2);
|
|
22
|
-
var eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
23
|
-
if (typeof document !== 'undefined' && !isCoveredByReact(eventNameLc, document)) {
|
|
24
|
-
syncEvent(node, eventNameLc, newProps[name]);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
node[name] = newProps[name];
|
|
29
|
-
var propType = typeof newProps[name];
|
|
30
|
-
if (propType === 'string') {
|
|
31
|
-
node.setAttribute(camelToDashCase(name), newProps[name]);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
node[name] = newProps[name];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export var getClassName = function (classList, newProps, oldProps) {
|
|
41
|
-
var newClassProp = newProps.className || newProps.class;
|
|
42
|
-
var oldClassProp = oldProps.className || oldProps.class;
|
|
43
|
-
// map the classes to Maps for performance
|
|
44
|
-
var currentClasses = arrayToMap(classList);
|
|
45
|
-
var incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
|
|
46
|
-
var oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
|
|
47
|
-
var finalClassNames = [];
|
|
48
|
-
// loop through each of the current classes on the component
|
|
49
|
-
// to see if it should be a part of the classNames added
|
|
50
|
-
currentClasses.forEach(function (currentClass) {
|
|
51
|
-
if (incomingPropClasses.has(currentClass)) {
|
|
52
|
-
// add it as its already included in classnames coming in from newProps
|
|
53
|
-
finalClassNames.push(currentClass);
|
|
54
|
-
incomingPropClasses.delete(currentClass);
|
|
55
|
-
}
|
|
56
|
-
else if (!oldPropClasses.has(currentClass)) {
|
|
57
|
-
// add it as it has NOT been removed by user
|
|
58
|
-
finalClassNames.push(currentClass);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
incomingPropClasses.forEach(function (s) { return finalClassNames.push(s); });
|
|
62
|
-
return finalClassNames.join(' ');
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Checks if an event is supported in the current execution environment.
|
|
66
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
67
|
-
*/
|
|
68
|
-
export var isCoveredByReact = function (eventNameSuffix, doc) {
|
|
69
|
-
var eventName = 'on' + eventNameSuffix;
|
|
70
|
-
var isSupported = eventName in doc;
|
|
71
|
-
if (!isSupported) {
|
|
72
|
-
var element = doc.createElement('div');
|
|
73
|
-
element.setAttribute(eventName, 'return;');
|
|
74
|
-
isSupported = typeof element[eventName] === 'function';
|
|
75
|
-
}
|
|
76
|
-
return isSupported;
|
|
77
|
-
};
|
|
78
|
-
export var syncEvent = function (node, eventName, newEventHandler) {
|
|
79
|
-
var eventStore = node.__events || (node.__events = {});
|
|
80
|
-
var oldEventHandler = eventStore[eventName];
|
|
81
|
-
// Remove old listener so they don't double up.
|
|
82
|
-
if (oldEventHandler) {
|
|
83
|
-
node.removeEventListener(eventName, oldEventHandler);
|
|
84
|
-
}
|
|
85
|
-
// Bind new listener.
|
|
86
|
-
node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
|
|
87
|
-
if (newEventHandler) {
|
|
88
|
-
newEventHandler.call(this, e);
|
|
89
|
-
}
|
|
90
|
-
}));
|
|
91
|
-
};
|
|
92
|
-
var arrayToMap = function (arr) {
|
|
93
|
-
var map = new Map();
|
|
94
|
-
arr.forEach(function (s) { return map.set(s, s); });
|
|
95
|
-
return map;
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=attachProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachProps.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/attachProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,IAAiB,EAAE,QAAa,EAAE,QAAkB;IAAlB,yBAAA,EAAA,aAAkB;IAC9E,6GAA6G;IAC7G,IAAI,IAAI,YAAY,OAAO,EAAE;QAC3B,iDAAiD;QACjD,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnE,IAAI,SAAS,KAAK,EAAE,EAAE;YACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;SAC5B;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;YACjC,IACE,IAAI,KAAK,UAAU;gBACnB,IAAI,KAAK,OAAO;gBAChB,IAAI,KAAK,KAAK;gBACd,IAAI,KAAK,OAAO;gBAChB,IAAI,KAAK,WAAW;gBACpB,IAAI,KAAK,cAAc,EACvB;gBACA,OAAO;aACR;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAA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,CAAC,IAAM,SAAS,GAAG,UACvB,IAAiF,EACjF,SAAiB,EACjB,eAAmC;IAEnC,IAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;IACzD,IAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IAE9C,+CAA+C;IAC/C,IAAI,eAAe,EAAE;QACnB,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;KACtD;IAED,qBAAqB;IACrB,IAAI,CAAC,gBAAgB,CACnB,SAAS,EACT,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,OAAO,CAAC,CAAQ;QAChD,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SAC/B;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,UAAU,GAAG,UAAC,GAA4B;IAC9C,IAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,GAAgB,CAAC,OAAO,CAAC,UAAC,CAAS,IAAK,OAAA,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAb,CAAa,CAAC,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var dashToPascalCase = function (str) {
|
|
2
|
-
return str
|
|
3
|
-
.toLowerCase()
|
|
4
|
-
.split('-')
|
|
5
|
-
.map(function (segment) { return segment.charAt(0).toUpperCase() + segment.slice(1); })
|
|
6
|
-
.join('');
|
|
7
|
-
};
|
|
8
|
-
export var camelToDashCase = function (str) {
|
|
9
|
-
return str.replace(/([A-Z])/g, function (m) { return "-" + m[0].toLowerCase(); });
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=case.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/case.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAlD,CAAkD,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AACd,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,GAAW;IACzC,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,UAAC,CAAS,IAAK,OAAA,MAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAI,EAAxB,CAAwB,CAAC;AAAhE,CAAgE,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export var isDevMode = function () {
|
|
2
|
-
return process && process.env && process.env.NODE_ENV === 'development';
|
|
3
|
-
};
|
|
4
|
-
var warnings = {};
|
|
5
|
-
export var deprecationWarning = function (key, message) {
|
|
6
|
-
if (isDevMode()) {
|
|
7
|
-
if (!warnings[key]) {
|
|
8
|
-
console.warn(message);
|
|
9
|
-
warnings[key] = true;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=dev.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/dev.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAC1E,CAAC,CAAC;AAEF,IAAM,QAAQ,GAA+B,EAAE,CAAC;AAEhD,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,GAAW,EAAE,OAAe;IAC7D,IAAI,SAAS,EAAE,EAAE;QACf,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAClB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;SACtB;KACF;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleReactProps } from '../interfaces';
|
|
3
|
-
export declare type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
|
|
4
|
-
export declare const mergeRefs: <ElementType>(...refs: React.Ref<ElementType>[]) => (value: ElementType) => void;
|
|
5
|
-
export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & StyleReactProps> & React.RefAttributes<ElementType>>;
|
|
6
|
-
export * from './attachProps';
|
|
7
|
-
export * from './case';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
// The comma in the type is to trick typescript because it things a single generic in a tsx file is jsx
|
|
14
|
-
export var mergeRefs = function () {
|
|
15
|
-
var refs = [];
|
|
16
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17
|
-
refs[_i] = arguments[_i];
|
|
18
|
-
}
|
|
19
|
-
return function (value) {
|
|
20
|
-
return refs.forEach(function (ref) {
|
|
21
|
-
if (typeof ref === 'function') {
|
|
22
|
-
ref(value);
|
|
23
|
-
}
|
|
24
|
-
else if (ref != null) {
|
|
25
|
-
// This is typed as readonly so we need to allow for override
|
|
26
|
-
ref.current = value;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export var createForwardRef = function (ReactComponent, displayName) {
|
|
32
|
-
var forwardRef = function (props, ref) {
|
|
33
|
-
return React.createElement(ReactComponent, __assign({}, props, { forwardedRef: ref }));
|
|
34
|
-
};
|
|
35
|
-
forwardRef.displayName = displayName;
|
|
36
|
-
return React.forwardRef(forwardRef);
|
|
37
|
-
};
|
|
38
|
-
export * from './attachProps';
|
|
39
|
-
export * from './case';
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react-component-lib/utils/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,uGAAuG;AACvG,MAAM,CAAC,IAAM,SAAS,GAAG;IAAe,cAAiC;SAAjC,UAAiC,EAAjC,qBAAiC,EAAjC,IAAiC;QAAjC,yBAAiC;;IAAK,OAAA,UAC5E,KAAkB;QAElB,OAAA,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG;YACf,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;gBAC7B,GAAG,CAAC,KAAK,CAAC,CAAC;aACZ;iBAAM,IAAI,GAAG,IAAI,IAAI,EAAE;gBACtB,6DAA6D;gBAC5D,GAA6C,CAAC,OAAO,GAAG,KAAK,CAAC;aAChE;QACH,CAAC,CAAC;IAPF,CAOE;AAV0E,CAU1E,CAAC;AAEL,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC9B,cAAmB,EACnB,WAAmB;IAEnB,IAAM,UAAU,GAAG,UACjB,KAAuD,EACvD,GAA2B;QAE3B,OAAO,oBAAC,cAAc,eAAK,KAAK,IAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC1D,CAAC,CAAC;IACF,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;IAErC,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|