@watermarkinsights/ripple-react 5.28.0-alpha.1 → 5.28.0-alpha.3

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 (38) 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 +53 -53
  6. package/dist/components.js +55 -55
  7. package/dist/components.js.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +3 -3
  10. package/dist/react-component-lib/ReactProps.d.ts +3 -3
  11. package/dist/react-component-lib/ReactProps.js +1 -1
  12. package/dist/react-component-lib/attachProps.d.ts +16 -16
  13. package/dist/react-component-lib/attachProps.js +108 -108
  14. package/dist/react-component-lib/case.d.ts +2 -2
  15. package/dist/react-component-lib/case.js +8 -8
  16. package/dist/react-component-lib/createComponent.d.ts +10 -10
  17. package/dist/react-component-lib/createComponent.js +107 -107
  18. package/dist/react-component-lib/createControllerComponent.d.ts +43 -43
  19. package/dist/react-component-lib/createControllerComponent.js +147 -147
  20. package/dist/react-component-lib/createOverlayComponent.d.ts +21 -21
  21. package/dist/react-component-lib/createOverlayComponent.js +190 -190
  22. package/dist/react-component-lib/dev.d.ts +2 -2
  23. package/dist/react-component-lib/dev.js +12 -12
  24. package/dist/react-component-lib/index.d.ts +2 -2
  25. package/dist/react-component-lib/index.js +2 -2
  26. package/dist/react-component-lib/interfaces.d.ts +29 -29
  27. package/dist/react-component-lib/interfaces.js +1 -1
  28. package/dist/react-component-lib/utils/attachEventProps.d.ts +8 -8
  29. package/dist/react-component-lib/utils/attachEventProps.js +78 -78
  30. package/dist/react-component-lib/utils/attachProps.d.ts +16 -16
  31. package/dist/react-component-lib/utils/attachProps.js +108 -108
  32. package/dist/react-component-lib/utils/case.d.ts +2 -2
  33. package/dist/react-component-lib/utils/case.js +8 -8
  34. package/dist/react-component-lib/utils/dev.d.ts +2 -2
  35. package/dist/react-component-lib/utils/dev.js +12 -12
  36. package/dist/react-component-lib/utils/index.d.ts +10 -10
  37. package/dist/react-component-lib/utils/index.js +46 -46
  38. package/package.json +3 -3
@@ -1,148 +1,148 @@
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 (g && (g = 0, op[0] && (_ = 0)), _) 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".concat(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
- }
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 (g && (g = 0, op[0] && (_ = 0)), _) 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".concat(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
148
  //# sourceMappingURL=createControllerComponent.js.map
@@ -1,21 +1,21 @@
1
- import React from 'react';
2
- import { OverlayEventDetail } from './interfaces';
3
- import { StencilReactForwardedRef } from './utils';
4
- interface OverlayElement extends HTMLElement {
5
- present: () => Promise<void>;
6
- dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
7
- }
8
- export interface ReactOverlayProps {
9
- children?: React.ReactNode;
10
- isOpen: boolean;
11
- onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
12
- onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
13
- onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
14
- onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
15
- }
16
- export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
17
- create: (options: any) => Promise<OverlayType>;
18
- }, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
19
- forwardedRef?: StencilReactForwardedRef<OverlayType>;
20
- }> & React.RefAttributes<OverlayType>>;
21
- export {};
1
+ import React from 'react';
2
+ import { OverlayEventDetail } from './interfaces';
3
+ import { StencilReactForwardedRef } from './utils';
4
+ interface OverlayElement extends HTMLElement {
5
+ present: () => Promise<void>;
6
+ dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
7
+ }
8
+ export interface ReactOverlayProps {
9
+ children?: React.ReactNode;
10
+ isOpen: boolean;
11
+ onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
12
+ onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
13
+ onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
14
+ onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
15
+ }
16
+ export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
17
+ create: (options: any) => Promise<OverlayType>;
18
+ }, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
19
+ forwardedRef?: StencilReactForwardedRef<OverlayType>;
20
+ }> & React.RefAttributes<OverlayType>>;
21
+ export {};