@aws-amplify/ui-react 1.2.26-unstable.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.css.map +7 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/legacy.js +1 -0
- package/dist/esm/legacy.js.map +7 -0
- package/dist/index.css +1 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +7533 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +7 -0
- package/dist/legacy.d.ts +1 -0
- package/dist/legacy.js +1 -0
- package/dist/legacy.js.map +7 -0
- package/dist/primitives.json +22168 -0
- package/legacy/package.json +7 -0
- package/package.json +82 -40
- package/CHANGELOG.md +0 -339
- package/README.md +0 -1
- package/build.js +0 -5
- package/dist/0.js +0 -269
- package/dist/0.js.map +0 -1
- package/dist/1.js +0 -2111
- package/dist/1.js.map +0 -1
- package/dist/10.js +0 -707
- package/dist/10.js.map +0 -1
- package/dist/11.js +0 -45
- package/dist/11.js.map +0 -1
- package/dist/12.js +0 -1152
- package/dist/12.js.map +0 -1
- package/dist/13.js +0 -114
- package/dist/13.js.map +0 -1
- package/dist/14.js +0 -1194
- package/dist/14.js.map +0 -1
- package/dist/15.js +0 -61
- package/dist/15.js.map +0 -1
- package/dist/16.js +0 -37
- package/dist/16.js.map +0 -1
- package/dist/17.js +0 -127
- package/dist/17.js.map +0 -1
- package/dist/18.js +0 -90
- package/dist/18.js.map +0 -1
- package/dist/19.js +0 -267
- package/dist/19.js.map +0 -1
- package/dist/2.js +0 -766
- package/dist/2.js.map +0 -1
- package/dist/20.js +0 -74
- package/dist/20.js.map +0 -1
- package/dist/21.js +0 -50
- package/dist/21.js.map +0 -1
- package/dist/22.js +0 -57
- package/dist/22.js.map +0 -1
- package/dist/23.js +0 -50
- package/dist/23.js.map +0 -1
- package/dist/24.js +0 -271
- package/dist/24.js.map +0 -1
- package/dist/25.js +0 -102
- package/dist/25.js.map +0 -1
- package/dist/26.js +0 -64
- package/dist/26.js.map +0 -1
- package/dist/27.js +0 -379
- package/dist/27.js.map +0 -1
- package/dist/28.js +0 -47
- package/dist/28.js.map +0 -1
- package/dist/29.js +0 -46
- package/dist/29.js.map +0 -1
- package/dist/3.js +0 -2787
- package/dist/3.js.map +0 -1
- package/dist/30.js +0 -503
- package/dist/30.js.map +0 -1
- package/dist/31.js +0 -2
- package/dist/31.js.map +0 -1
- package/dist/32.js +0 -2
- package/dist/32.js.map +0 -1
- package/dist/33.js +0 -13
- package/dist/33.js.map +0 -1
- package/dist/4.js +0 -4126
- package/dist/4.js.map +0 -1
- package/dist/5.js +0 -817
- package/dist/5.js.map +0 -1
- package/dist/6.js +0 -619
- package/dist/6.js.map +0 -1
- package/dist/7.js +0 -662
- package/dist/7.js.map +0 -1
- package/dist/8.js +0 -614
- package/dist/8.js.map +0 -1
- package/dist/9.js +0 -665
- package/dist/9.js.map +0 -1
- package/dist/@aws-amplify/ui-react.js +0 -31875
- package/dist/@aws-amplify/ui-react.js.map +0 -1
- package/dist/aws-amplify-react.min.js +0 -28
- package/dist/aws-amplify-react.min.js.map +0 -1
- package/dist/polyfills-core-js.js +0 -5211
- package/dist/polyfills-core-js.js.map +0 -1
- package/dist/polyfills-css-shim.js +0 -467
- package/dist/polyfills-css-shim.js.map +0 -1
- package/dist/polyfills-dom.js +0 -2098
- package/dist/polyfills-dom.js.map +0 -1
- package/jest.config.js +0 -12
- package/lib/components.d.ts +0 -56
- package/lib/components.js +0 -64
- package/lib/components.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -9
- package/lib/index.js.map +0 -1
- package/lib/react-component-lib/createComponent.d.ts +0 -2
- package/lib/react-component-lib/createComponent.js +0 -91
- package/lib/react-component-lib/createComponent.js.map +0 -1
- package/lib/react-component-lib/createControllerComponent.d.ts +0 -43
- package/lib/react-component-lib/createControllerComponent.js +0 -152
- package/lib/react-component-lib/createControllerComponent.js.map +0 -1
- package/lib/react-component-lib/createOverlayComponent.d.ts +0 -45
- package/lib/react-component-lib/createOverlayComponent.js +0 -148
- package/lib/react-component-lib/createOverlayComponent.js.map +0 -1
- package/lib/react-component-lib/index.d.ts +0 -3
- package/lib/react-component-lib/index.js +0 -9
- package/lib/react-component-lib/index.js.map +0 -1
- package/lib/react-component-lib/utils/attachEventProps.d.ts +0 -8
- package/lib/react-component-lib/utils/attachEventProps.js +0 -85
- package/lib/react-component-lib/utils/attachEventProps.js.map +0 -1
- package/lib/react-component-lib/utils/index.d.ts +0 -8
- package/lib/react-component-lib/utils/index.js +0 -36
- package/lib/react-component-lib/utils/index.js.map +0 -1
- package/lib/withAuthenticator.d.ts +0 -3
- package/lib/withAuthenticator.js +0 -127
- package/lib/withAuthenticator.js.map +0 -1
- package/lib-esm/components.d.ts +0 -56
- package/lib-esm/components.js +0 -62
- package/lib-esm/components.js.map +0 -1
- package/lib-esm/index.d.ts +0 -2
- package/lib-esm/index.js +0 -3
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/react-component-lib/createComponent.d.ts +0 -2
- package/lib-esm/react-component-lib/createComponent.js +0 -86
- package/lib-esm/react-component-lib/createComponent.js.map +0 -1
- package/lib-esm/react-component-lib/createControllerComponent.d.ts +0 -43
- package/lib-esm/react-component-lib/createControllerComponent.js +0 -146
- package/lib-esm/react-component-lib/createControllerComponent.js.map +0 -1
- package/lib-esm/react-component-lib/createOverlayComponent.d.ts +0 -45
- package/lib-esm/react-component-lib/createOverlayComponent.js +0 -142
- package/lib-esm/react-component-lib/createOverlayComponent.js.map +0 -1
- package/lib-esm/react-component-lib/index.d.ts +0 -3
- package/lib-esm/react-component-lib/index.js +0 -4
- package/lib-esm/react-component-lib/index.js.map +0 -1
- package/lib-esm/react-component-lib/utils/attachEventProps.d.ts +0 -8
- package/lib-esm/react-component-lib/utils/attachEventProps.js +0 -79
- package/lib-esm/react-component-lib/utils/attachEventProps.js.map +0 -1
- package/lib-esm/react-component-lib/utils/index.d.ts +0 -8
- package/lib-esm/react-component-lib/utils/index.js +0 -28
- package/lib-esm/react-component-lib/utils/index.js.map +0 -1
- package/lib-esm/withAuthenticator.d.ts +0 -3
- package/lib-esm/withAuthenticator.js +0 -121
- package/lib-esm/withAuthenticator.js.map +0 -1
- package/src/components.ts +0 -65
- package/src/index.ts +0 -3
- package/src/react-component-lib/createComponent.tsx +0 -69
- package/src/react-component-lib/createControllerComponent.tsx +0 -71
- package/src/react-component-lib/createOverlayComponent.tsx +0 -79
- package/src/react-component-lib/index.ts +0 -3
- package/src/react-component-lib/utils/attachEventProps.ts +0 -87
- package/src/react-component-lib/utils/index.tsx +0 -31
- package/src/withAuthenticator.tsx +0 -62
- package/webpack.config.dev.js +0 -6
- package/webpack.config.js +0 -56
package/lib/withAuthenticator.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
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;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
-
if (!m) return o;
|
|
52
|
-
var i = m.call(o), r, ar = [], e;
|
|
53
|
-
try {
|
|
54
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
-
}
|
|
56
|
-
catch (error) { e = { error: error }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e) throw e.error; }
|
|
62
|
-
}
|
|
63
|
-
return ar;
|
|
64
|
-
};
|
|
65
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
66
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
67
|
-
};
|
|
68
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
-
var react_1 = __importDefault(require("react"));
|
|
70
|
-
var auth_1 = require("@aws-amplify/auth");
|
|
71
|
-
var _1 = require("./");
|
|
72
|
-
var ui_components_1 = require("@aws-amplify/ui-components");
|
|
73
|
-
var core_1 = require("@aws-amplify/core");
|
|
74
|
-
var logger = new core_1.Logger('withAuthenticator');
|
|
75
|
-
function withAuthenticator(Component, authenticatorProps) {
|
|
76
|
-
var AppWithAuthenticator = function (props) {
|
|
77
|
-
var _a = __read(react_1.default.useState(false), 2), signedIn = _a[0], setSignedIn = _a[1];
|
|
78
|
-
react_1.default.useEffect(function () {
|
|
79
|
-
auth_1.appendToCognitoUserAgent('withAuthenticator');
|
|
80
|
-
// checkUser returns an "unsubscribe" function to stop side-effects
|
|
81
|
-
return checkUser();
|
|
82
|
-
}, []);
|
|
83
|
-
function checkUser() {
|
|
84
|
-
setUser();
|
|
85
|
-
return ui_components_1.onAuthUIStateChange(function (authState) {
|
|
86
|
-
if (authState === ui_components_1.AuthState.SignedIn) {
|
|
87
|
-
setSignedIn(true);
|
|
88
|
-
}
|
|
89
|
-
else if (authState === ui_components_1.AuthState.SignedOut) {
|
|
90
|
-
setSignedIn(false);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function setUser() {
|
|
95
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
-
var user, err_1;
|
|
97
|
-
return __generator(this, function (_a) {
|
|
98
|
-
switch (_a.label) {
|
|
99
|
-
case 0:
|
|
100
|
-
_a.trys.push([0, 2, , 3]);
|
|
101
|
-
return [4 /*yield*/, auth_1.Auth.currentAuthenticatedUser()];
|
|
102
|
-
case 1:
|
|
103
|
-
user = _a.sent();
|
|
104
|
-
if (user)
|
|
105
|
-
setSignedIn(true);
|
|
106
|
-
return [3 /*break*/, 3];
|
|
107
|
-
case 2:
|
|
108
|
-
err_1 = _a.sent();
|
|
109
|
-
logger.debug(err_1);
|
|
110
|
-
return [3 /*break*/, 3];
|
|
111
|
-
case 3: return [2 /*return*/];
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
;
|
|
117
|
-
if (!signedIn) {
|
|
118
|
-
return (react_1.default.createElement(_1.AmplifyContainer, null,
|
|
119
|
-
react_1.default.createElement(_1.AmplifyAuthContainer, null,
|
|
120
|
-
react_1.default.createElement(_1.AmplifyAuthenticator, __assign({}, authenticatorProps, props)))));
|
|
121
|
-
}
|
|
122
|
-
return react_1.default.createElement(Component, __assign({}, props));
|
|
123
|
-
};
|
|
124
|
-
return AppWithAuthenticator;
|
|
125
|
-
}
|
|
126
|
-
exports.withAuthenticator = withAuthenticator;
|
|
127
|
-
//# sourceMappingURL=withAuthenticator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withAuthenticator.js","sourceRoot":"","sources":["../src/withAuthenticator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,oBAAoB,CAAC;AAC7B,CAAC;AAjDD,8CAiDC"}
|
package/lib-esm/components.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@aws-amplify/ui-components';
|
|
2
|
-
export declare const AmplifyAmazonButton: import("react").ForwardRefExoticComponent<JSX.AmplifyAmazonButton & import("react").HTMLAttributes<HTMLAmplifyAmazonButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyAmazonButtonElement>>;
|
|
3
|
-
export declare const AmplifyAuthContainer: import("react").ForwardRefExoticComponent<JSX.AmplifyAuthContainer & import("react").HTMLAttributes<HTMLAmplifyAuthContainerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyAuthContainerElement>>;
|
|
4
|
-
export declare const AmplifyAuthFields: import("react").ForwardRefExoticComponent<JSX.AmplifyAuthFields & import("react").HTMLAttributes<HTMLAmplifyAuthFieldsElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyAuthFieldsElement>>;
|
|
5
|
-
export declare const AmplifyAuth0Button: import("react").ForwardRefExoticComponent<JSX.AmplifyAuth0Button & import("react").HTMLAttributes<HTMLAmplifyAuth0ButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyAuth0ButtonElement>>;
|
|
6
|
-
export declare const AmplifyAuthenticator: import("react").ForwardRefExoticComponent<JSX.AmplifyAuthenticator & import("react").HTMLAttributes<HTMLAmplifyAuthenticatorElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyAuthenticatorElement>>;
|
|
7
|
-
export declare const AmplifyButton: import("react").ForwardRefExoticComponent<JSX.AmplifyButton & import("react").HTMLAttributes<HTMLAmplifyButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyButtonElement>>;
|
|
8
|
-
export declare const AmplifyChatbot: import("react").ForwardRefExoticComponent<JSX.AmplifyChatbot & import("react").HTMLAttributes<HTMLAmplifyChatbotElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyChatbotElement>>;
|
|
9
|
-
export declare const AmplifyCheckbox: import("react").ForwardRefExoticComponent<JSX.AmplifyCheckbox & import("react").HTMLAttributes<HTMLAmplifyCheckboxElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyCheckboxElement>>;
|
|
10
|
-
export declare const AmplifyCodeField: import("react").ForwardRefExoticComponent<JSX.AmplifyCodeField & import("react").HTMLAttributes<HTMLAmplifyCodeFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyCodeFieldElement>>;
|
|
11
|
-
export declare const AmplifyConfirmSignIn: import("react").ForwardRefExoticComponent<JSX.AmplifyConfirmSignIn & import("react").HTMLAttributes<HTMLAmplifyConfirmSignInElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyConfirmSignInElement>>;
|
|
12
|
-
export declare const AmplifyConfirmSignUp: import("react").ForwardRefExoticComponent<JSX.AmplifyConfirmSignUp & import("react").HTMLAttributes<HTMLAmplifyConfirmSignUpElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyConfirmSignUpElement>>;
|
|
13
|
-
export declare const AmplifyContainer: import("react").ForwardRefExoticComponent<JSX.AmplifyContainer & import("react").HTMLAttributes<HTMLAmplifyContainerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyContainerElement>>;
|
|
14
|
-
export declare const AmplifyCountryDialCode: import("react").ForwardRefExoticComponent<JSX.AmplifyCountryDialCode & import("react").HTMLAttributes<HTMLAmplifyCountryDialCodeElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyCountryDialCodeElement>>;
|
|
15
|
-
export declare const AmplifyEmailField: import("react").ForwardRefExoticComponent<JSX.AmplifyEmailField & import("react").HTMLAttributes<HTMLAmplifyEmailFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyEmailFieldElement>>;
|
|
16
|
-
export declare const AmplifyFacebookButton: import("react").ForwardRefExoticComponent<JSX.AmplifyFacebookButton & import("react").HTMLAttributes<HTMLAmplifyFacebookButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyFacebookButtonElement>>;
|
|
17
|
-
export declare const AmplifyFederatedButtons: import("react").ForwardRefExoticComponent<JSX.AmplifyFederatedButtons & import("react").HTMLAttributes<HTMLAmplifyFederatedButtonsElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyFederatedButtonsElement>>;
|
|
18
|
-
export declare const AmplifyFederatedSignIn: import("react").ForwardRefExoticComponent<JSX.AmplifyFederatedSignIn & import("react").HTMLAttributes<HTMLAmplifyFederatedSignInElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyFederatedSignInElement>>;
|
|
19
|
-
export declare const AmplifyForgotPassword: import("react").ForwardRefExoticComponent<JSX.AmplifyForgotPassword & import("react").HTMLAttributes<HTMLAmplifyForgotPasswordElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyForgotPasswordElement>>;
|
|
20
|
-
export declare const AmplifyFormField: import("react").ForwardRefExoticComponent<JSX.AmplifyFormField & import("react").HTMLAttributes<HTMLAmplifyFormFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyFormFieldElement>>;
|
|
21
|
-
export declare const AmplifyFormSection: import("react").ForwardRefExoticComponent<JSX.AmplifyFormSection & import("react").HTMLAttributes<HTMLAmplifyFormSectionElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyFormSectionElement>>;
|
|
22
|
-
export declare const AmplifyGoogleButton: import("react").ForwardRefExoticComponent<JSX.AmplifyGoogleButton & import("react").HTMLAttributes<HTMLAmplifyGoogleButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyGoogleButtonElement>>;
|
|
23
|
-
export declare const AmplifyGreetings: import("react").ForwardRefExoticComponent<JSX.AmplifyGreetings & import("react").HTMLAttributes<HTMLAmplifyGreetingsElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyGreetingsElement>>;
|
|
24
|
-
export declare const AmplifyHint: import("react").ForwardRefExoticComponent<JSX.AmplifyHint & import("react").HTMLAttributes<HTMLAmplifyHintElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyHintElement>>;
|
|
25
|
-
export declare const AmplifyIcon: import("react").ForwardRefExoticComponent<JSX.AmplifyIcon & import("react").HTMLAttributes<HTMLAmplifyIconElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyIconElement>>;
|
|
26
|
-
export declare const AmplifyIconButton: import("react").ForwardRefExoticComponent<JSX.AmplifyIconButton & import("react").HTMLAttributes<HTMLAmplifyIconButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyIconButtonElement>>;
|
|
27
|
-
export declare const AmplifyInput: import("react").ForwardRefExoticComponent<JSX.AmplifyInput & import("react").HTMLAttributes<HTMLAmplifyInputElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyInputElement>>;
|
|
28
|
-
export declare const AmplifyLabel: import("react").ForwardRefExoticComponent<JSX.AmplifyLabel & import("react").HTMLAttributes<HTMLAmplifyLabelElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyLabelElement>>;
|
|
29
|
-
export declare const AmplifyLink: import("react").ForwardRefExoticComponent<JSX.AmplifyLink & import("react").HTMLAttributes<HTMLAmplifyLinkElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyLinkElement>>;
|
|
30
|
-
export declare const AmplifyLoadingSpinner: import("react").ForwardRefExoticComponent<JSX.AmplifyLoadingSpinner & import("react").HTMLAttributes<HTMLAmplifyLoadingSpinnerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyLoadingSpinnerElement>>;
|
|
31
|
-
export declare const AmplifyNav: import("react").ForwardRefExoticComponent<JSX.AmplifyNav & import("react").HTMLAttributes<HTMLAmplifyNavElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyNavElement>>;
|
|
32
|
-
export declare const AmplifyOauthButton: import("react").ForwardRefExoticComponent<JSX.AmplifyOauthButton & import("react").HTMLAttributes<HTMLAmplifyOauthButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyOauthButtonElement>>;
|
|
33
|
-
export declare const AmplifyPasswordField: import("react").ForwardRefExoticComponent<JSX.AmplifyPasswordField & import("react").HTMLAttributes<HTMLAmplifyPasswordFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyPasswordFieldElement>>;
|
|
34
|
-
export declare const AmplifyPhoneField: import("react").ForwardRefExoticComponent<JSX.AmplifyPhoneField & import("react").HTMLAttributes<HTMLAmplifyPhoneFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyPhoneFieldElement>>;
|
|
35
|
-
export declare const AmplifyPhotoPicker: import("react").ForwardRefExoticComponent<JSX.AmplifyPhotoPicker & import("react").HTMLAttributes<HTMLAmplifyPhotoPickerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyPhotoPickerElement>>;
|
|
36
|
-
export declare const AmplifyPicker: import("react").ForwardRefExoticComponent<JSX.AmplifyPicker & import("react").HTMLAttributes<HTMLAmplifyPickerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyPickerElement>>;
|
|
37
|
-
export declare const AmplifyRadioButton: import("react").ForwardRefExoticComponent<JSX.AmplifyRadioButton & import("react").HTMLAttributes<HTMLAmplifyRadioButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyRadioButtonElement>>;
|
|
38
|
-
export declare const AmplifyRequireNewPassword: import("react").ForwardRefExoticComponent<JSX.AmplifyRequireNewPassword & import("react").HTMLAttributes<HTMLAmplifyRequireNewPasswordElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyRequireNewPasswordElement>>;
|
|
39
|
-
export declare const AmplifyS3Album: import("react").ForwardRefExoticComponent<JSX.AmplifyS3Album & import("react").HTMLAttributes<HTMLAmplifyS3AlbumElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyS3AlbumElement>>;
|
|
40
|
-
export declare const AmplifyS3Image: import("react").ForwardRefExoticComponent<JSX.AmplifyS3Image & import("react").HTMLAttributes<HTMLAmplifyS3ImageElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyS3ImageElement>>;
|
|
41
|
-
export declare const AmplifyS3ImagePicker: import("react").ForwardRefExoticComponent<JSX.AmplifyS3ImagePicker & import("react").HTMLAttributes<HTMLAmplifyS3ImagePickerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyS3ImagePickerElement>>;
|
|
42
|
-
export declare const AmplifyS3Text: import("react").ForwardRefExoticComponent<JSX.AmplifyS3Text & import("react").HTMLAttributes<HTMLAmplifyS3TextElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyS3TextElement>>;
|
|
43
|
-
export declare const AmplifyS3TextPicker: import("react").ForwardRefExoticComponent<JSX.AmplifyS3TextPicker & import("react").HTMLAttributes<HTMLAmplifyS3TextPickerElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyS3TextPickerElement>>;
|
|
44
|
-
export declare const AmplifySection: import("react").ForwardRefExoticComponent<JSX.AmplifySection & import("react").HTMLAttributes<HTMLAmplifySectionElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySectionElement>>;
|
|
45
|
-
export declare const AmplifySelect: import("react").ForwardRefExoticComponent<JSX.AmplifySelect & import("react").HTMLAttributes<HTMLAmplifySelectElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySelectElement>>;
|
|
46
|
-
export declare const AmplifySelectMfaType: import("react").ForwardRefExoticComponent<JSX.AmplifySelectMfaType & import("react").HTMLAttributes<HTMLAmplifySelectMfaTypeElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySelectMfaTypeElement>>;
|
|
47
|
-
export declare const AmplifySignIn: import("react").ForwardRefExoticComponent<JSX.AmplifySignIn & import("react").HTMLAttributes<HTMLAmplifySignInElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySignInElement>>;
|
|
48
|
-
export declare const AmplifySignInButton: import("react").ForwardRefExoticComponent<JSX.AmplifySignInButton & import("react").HTMLAttributes<HTMLAmplifySignInButtonElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySignInButtonElement>>;
|
|
49
|
-
export declare const AmplifySignOut: import("react").ForwardRefExoticComponent<JSX.AmplifySignOut & import("react").HTMLAttributes<HTMLAmplifySignOutElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySignOutElement>>;
|
|
50
|
-
export declare const AmplifySignUp: import("react").ForwardRefExoticComponent<JSX.AmplifySignUp & import("react").HTMLAttributes<HTMLAmplifySignUpElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifySignUpElement>>;
|
|
51
|
-
export declare const AmplifyStrike: import("react").ForwardRefExoticComponent<JSX.AmplifyStrike & import("react").HTMLAttributes<HTMLAmplifyStrikeElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyStrikeElement>>;
|
|
52
|
-
export declare const AmplifyToast: import("react").ForwardRefExoticComponent<JSX.AmplifyToast & import("react").HTMLAttributes<HTMLAmplifyToastElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyToastElement>>;
|
|
53
|
-
export declare const AmplifyTooltip: import("react").ForwardRefExoticComponent<JSX.AmplifyTooltip & import("react").HTMLAttributes<HTMLAmplifyTooltipElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyTooltipElement>>;
|
|
54
|
-
export declare const AmplifyTotpSetup: import("react").ForwardRefExoticComponent<JSX.AmplifyTotpSetup & import("react").HTMLAttributes<HTMLAmplifyTotpSetupElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyTotpSetupElement>>;
|
|
55
|
-
export declare const AmplifyUsernameField: import("react").ForwardRefExoticComponent<JSX.AmplifyUsernameField & import("react").HTMLAttributes<HTMLAmplifyUsernameFieldElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyUsernameFieldElement>>;
|
|
56
|
-
export declare const AmplifyVerifyContact: import("react").ForwardRefExoticComponent<JSX.AmplifyVerifyContact & import("react").HTMLAttributes<HTMLAmplifyVerifyContactElement> & import("./react-component-lib/utils").ReactProps & import("react").RefAttributes<HTMLAmplifyVerifyContactElement>>;
|
package/lib-esm/components.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* auto-generated react proxies */
|
|
4
|
-
import { createReactComponent } from './react-component-lib';
|
|
5
|
-
import { defineCustomElements, applyPolyfills } from '@aws-amplify/ui-components/loader';
|
|
6
|
-
applyPolyfills().then(function () { return defineCustomElements(); });
|
|
7
|
-
export var AmplifyAmazonButton = /*@__PURE__*/ createReactComponent('amplify-amazon-button');
|
|
8
|
-
export var AmplifyAuthContainer = /*@__PURE__*/ createReactComponent('amplify-auth-container');
|
|
9
|
-
export var AmplifyAuthFields = /*@__PURE__*/ createReactComponent('amplify-auth-fields');
|
|
10
|
-
export var AmplifyAuth0Button = /*@__PURE__*/ createReactComponent('amplify-auth0-button');
|
|
11
|
-
export var AmplifyAuthenticator = /*@__PURE__*/ createReactComponent('amplify-authenticator');
|
|
12
|
-
export var AmplifyButton = /*@__PURE__*/ createReactComponent('amplify-button');
|
|
13
|
-
export var AmplifyChatbot = /*@__PURE__*/ createReactComponent('amplify-chatbot');
|
|
14
|
-
export var AmplifyCheckbox = /*@__PURE__*/ createReactComponent('amplify-checkbox');
|
|
15
|
-
export var AmplifyCodeField = /*@__PURE__*/ createReactComponent('amplify-code-field');
|
|
16
|
-
export var AmplifyConfirmSignIn = /*@__PURE__*/ createReactComponent('amplify-confirm-sign-in');
|
|
17
|
-
export var AmplifyConfirmSignUp = /*@__PURE__*/ createReactComponent('amplify-confirm-sign-up');
|
|
18
|
-
export var AmplifyContainer = /*@__PURE__*/ createReactComponent('amplify-container');
|
|
19
|
-
export var AmplifyCountryDialCode = /*@__PURE__*/ createReactComponent('amplify-country-dial-code');
|
|
20
|
-
export var AmplifyEmailField = /*@__PURE__*/ createReactComponent('amplify-email-field');
|
|
21
|
-
export var AmplifyFacebookButton = /*@__PURE__*/ createReactComponent('amplify-facebook-button');
|
|
22
|
-
export var AmplifyFederatedButtons = /*@__PURE__*/ createReactComponent('amplify-federated-buttons');
|
|
23
|
-
export var AmplifyFederatedSignIn = /*@__PURE__*/ createReactComponent('amplify-federated-sign-in');
|
|
24
|
-
export var AmplifyForgotPassword = /*@__PURE__*/ createReactComponent('amplify-forgot-password');
|
|
25
|
-
export var AmplifyFormField = /*@__PURE__*/ createReactComponent('amplify-form-field');
|
|
26
|
-
export var AmplifyFormSection = /*@__PURE__*/ createReactComponent('amplify-form-section');
|
|
27
|
-
export var AmplifyGoogleButton = /*@__PURE__*/ createReactComponent('amplify-google-button');
|
|
28
|
-
export var AmplifyGreetings = /*@__PURE__*/ createReactComponent('amplify-greetings');
|
|
29
|
-
export var AmplifyHint = /*@__PURE__*/ createReactComponent('amplify-hint');
|
|
30
|
-
export var AmplifyIcon = /*@__PURE__*/ createReactComponent('amplify-icon');
|
|
31
|
-
export var AmplifyIconButton = /*@__PURE__*/ createReactComponent('amplify-icon-button');
|
|
32
|
-
export var AmplifyInput = /*@__PURE__*/ createReactComponent('amplify-input');
|
|
33
|
-
export var AmplifyLabel = /*@__PURE__*/ createReactComponent('amplify-label');
|
|
34
|
-
export var AmplifyLink = /*@__PURE__*/ createReactComponent('amplify-link');
|
|
35
|
-
export var AmplifyLoadingSpinner = /*@__PURE__*/ createReactComponent('amplify-loading-spinner');
|
|
36
|
-
export var AmplifyNav = /*@__PURE__*/ createReactComponent('amplify-nav');
|
|
37
|
-
export var AmplifyOauthButton = /*@__PURE__*/ createReactComponent('amplify-oauth-button');
|
|
38
|
-
export var AmplifyPasswordField = /*@__PURE__*/ createReactComponent('amplify-password-field');
|
|
39
|
-
export var AmplifyPhoneField = /*@__PURE__*/ createReactComponent('amplify-phone-field');
|
|
40
|
-
export var AmplifyPhotoPicker = /*@__PURE__*/ createReactComponent('amplify-photo-picker');
|
|
41
|
-
export var AmplifyPicker = /*@__PURE__*/ createReactComponent('amplify-picker');
|
|
42
|
-
export var AmplifyRadioButton = /*@__PURE__*/ createReactComponent('amplify-radio-button');
|
|
43
|
-
export var AmplifyRequireNewPassword = /*@__PURE__*/ createReactComponent('amplify-require-new-password');
|
|
44
|
-
export var AmplifyS3Album = /*@__PURE__*/ createReactComponent('amplify-s3-album');
|
|
45
|
-
export var AmplifyS3Image = /*@__PURE__*/ createReactComponent('amplify-s3-image');
|
|
46
|
-
export var AmplifyS3ImagePicker = /*@__PURE__*/ createReactComponent('amplify-s3-image-picker');
|
|
47
|
-
export var AmplifyS3Text = /*@__PURE__*/ createReactComponent('amplify-s3-text');
|
|
48
|
-
export var AmplifyS3TextPicker = /*@__PURE__*/ createReactComponent('amplify-s3-text-picker');
|
|
49
|
-
export var AmplifySection = /*@__PURE__*/ createReactComponent('amplify-section');
|
|
50
|
-
export var AmplifySelect = /*@__PURE__*/ createReactComponent('amplify-select');
|
|
51
|
-
export var AmplifySelectMfaType = /*@__PURE__*/ createReactComponent('amplify-select-mfa-type');
|
|
52
|
-
export var AmplifySignIn = /*@__PURE__*/ createReactComponent('amplify-sign-in');
|
|
53
|
-
export var AmplifySignInButton = /*@__PURE__*/ createReactComponent('amplify-sign-in-button');
|
|
54
|
-
export var AmplifySignOut = /*@__PURE__*/ createReactComponent('amplify-sign-out');
|
|
55
|
-
export var AmplifySignUp = /*@__PURE__*/ createReactComponent('amplify-sign-up');
|
|
56
|
-
export var AmplifyStrike = /*@__PURE__*/ createReactComponent('amplify-strike');
|
|
57
|
-
export var AmplifyToast = /*@__PURE__*/ createReactComponent('amplify-toast');
|
|
58
|
-
export var AmplifyTooltip = /*@__PURE__*/ createReactComponent('amplify-tooltip');
|
|
59
|
-
export var AmplifyTotpSetup = /*@__PURE__*/ createReactComponent('amplify-totp-setup');
|
|
60
|
-
export var AmplifyUsernameField = /*@__PURE__*/ createReactComponent('amplify-username-field');
|
|
61
|
-
export var AmplifyVerifyContact = /*@__PURE__*/ createReactComponent('amplify-verify-contact');
|
|
62
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEzF,cAAc,EAAE,CAAC,IAAI,CAAC,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,CAAC,CAAC;AACpD,MAAM,CAAC,IAAM,mBAAmB,GAAG,aAAa,CAAA,oBAAoB,CAA0D,uBAAuB,CAAC,CAAC;AACvJ,MAAM,CAAC,IAAM,oBAAoB,GAAG,aAAa,CAAA,oBAAoB,CAA4D,wBAAwB,CAAC,CAAC;AAC3J,MAAM,CAAC,IAAM,iBAAiB,GAAG,aAAa,CAAA,oBAAoB,CAAsD,qBAAqB,CAAC,CAAC;AAC/I,MAAM,CAAC,IAAM,kBAAkB,GAAG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BAAmB,GAAG,aAAa,CAAA,oBAAoB,CAA0D,wBAAwB,CAAC,CAAC;AACxJ,MAAM,CAAC,IAAM,cAAc,GAAG,aAAa,CAAA,oBAAoB,CAAgD,kBAAkB,CAAC,CAAC;AACnI,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,iBAAiB,CAAC,CAAC;AAC/H,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAA,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,MAAM,CAAC,IAAM,cAAc,GAAG,aAAa,CAAA,oBAAoB,CAAgD,iBAAiB,CAAC,CAAC;AAClI,MAAM,CAAC,IAAM,gBAAgB,GAAG,aAAa,CAAA,oBAAoB,CAAoD,oBAAoB,CAAC,CAAC;AAC3I,MAAM,CAAC,IAAM,oBAAoB,GAAG,aAAa,CAAA,oBAAoB,CAA4D,wBAAwB,CAAC,CAAC;AAC3J,MAAM,CAAC,IAAM,oBAAoB,GAAG,aAAa,CAAA,oBAAoB,CAA4D,wBAAwB,CAAC,CAAC"}
|
package/lib-esm/index.d.ts
DELETED
package/lib-esm/index.js
DELETED
package/lib-esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,86 +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 (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 from 'react';
|
|
37
|
-
import { attachEventProps, createForwardRef, dashToPascalCase, isCoveredByReact, } from './utils/index';
|
|
38
|
-
export var createReactComponent = function (tagName) {
|
|
39
|
-
var displayName = dashToPascalCase(tagName);
|
|
40
|
-
var ReactComponent = /** @class */ (function (_super) {
|
|
41
|
-
__extends(class_1, _super);
|
|
42
|
-
function class_1(props) {
|
|
43
|
-
var _this = _super.call(this, props) || this;
|
|
44
|
-
_this.ref = React.createRef();
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
class_1.prototype.componentDidMount = function () {
|
|
48
|
-
this.componentDidUpdate(this.props);
|
|
49
|
-
};
|
|
50
|
-
class_1.prototype.componentDidUpdate = function (prevProps) {
|
|
51
|
-
var node = this.ref.current;
|
|
52
|
-
attachEventProps(node, this.props, prevProps);
|
|
53
|
-
};
|
|
54
|
-
class_1.prototype.render = function () {
|
|
55
|
-
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"]);
|
|
56
|
-
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
57
|
-
var isEventProp = name.indexOf('on') === 0 && name[2] === name[2].toUpperCase();
|
|
58
|
-
var isDataProp = name.indexOf('data-') === 0;
|
|
59
|
-
var isAriaProp = name.indexOf('aria-') === 0;
|
|
60
|
-
if (isEventProp) {
|
|
61
|
-
var eventName = name.substring(2).toLowerCase();
|
|
62
|
-
if (typeof document !== "undefined" && isCoveredByReact(eventName)) {
|
|
63
|
-
acc[name] = cProps[name];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else if (isDataProp || isAriaProp) {
|
|
67
|
-
acc[name] = cProps[name];
|
|
68
|
-
}
|
|
69
|
-
return acc;
|
|
70
|
-
}, {});
|
|
71
|
-
var newProps = __assign(__assign({}, propsToPass), { ref: this.ref, style: style,
|
|
72
|
-
className: className });
|
|
73
|
-
return React.createElement(tagName, newProps, children);
|
|
74
|
-
};
|
|
75
|
-
Object.defineProperty(class_1, "displayName", {
|
|
76
|
-
get: function () {
|
|
77
|
-
return displayName;
|
|
78
|
-
},
|
|
79
|
-
enumerable: true,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
return class_1;
|
|
83
|
-
}(React.Component));
|
|
84
|
-
return createForwardRef(ReactComponent, displayName);
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=createComponent.js.map
|
|
@@ -1 +0,0 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,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC/C,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAE/C,IAAI,WAAW,EAAE;oBACf,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;oBAClD,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE;wBACjE,GAAW,CAAC,IAAI,CAAC,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;qBAC5C;iBACF;qBAAM,IAAI,UAAU,IAAI,UAAU,EAAE;oBAClC,GAAW,CAAC,IAAI,CAAC,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;iBAC5C;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAAE,CAAC,CAAC;YAEP,IAAM,QAAQ,yBACT,WAAW,KACd,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,OAAA;gBACL,SAAS,WAAA,GACV,CAAC;YAEF,OAAO,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1D,CAAC;QAED,sBAAW,sBAAW;iBAAtB;gBACE,OAAO,WAAW,CAAC;YACrB,CAAC;;;WAAA;QACH,cAAC;IAAD,CAAC,AAlDsB,CAAc,KAAK,CAAC,SAAS,EAkDnD,CAAC;IACF,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<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,146 +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 (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
62
|
-
var t = {};
|
|
63
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
64
|
-
t[p] = s[p];
|
|
65
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
66
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
67
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
68
|
-
t[p[i]] = s[p[i]];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
import React from 'react';
|
|
73
|
-
import { attachEventProps } from './utils/attachEventProps';
|
|
74
|
-
export function createControllerComponent(displayName, controller) {
|
|
75
|
-
var dismissEventName = "on" + displayName + "DidDismiss";
|
|
76
|
-
return /** @class */ (function (_super) {
|
|
77
|
-
__extends(ReactControllerComponent, _super);
|
|
78
|
-
function ReactControllerComponent(props) {
|
|
79
|
-
return _super.call(this, props) || this;
|
|
80
|
-
}
|
|
81
|
-
Object.defineProperty(ReactControllerComponent, "displayName", {
|
|
82
|
-
get: function () {
|
|
83
|
-
return displayName;
|
|
84
|
-
},
|
|
85
|
-
enumerable: true,
|
|
86
|
-
configurable: true
|
|
87
|
-
});
|
|
88
|
-
ReactControllerComponent.prototype.componentDidMount = function () {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
-
var isOpen;
|
|
91
|
-
return __generator(this, function (_a) {
|
|
92
|
-
isOpen = this.props.isOpen;
|
|
93
|
-
if (isOpen) {
|
|
94
|
-
this.present();
|
|
95
|
-
}
|
|
96
|
-
return [2 /*return*/];
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
ReactControllerComponent.prototype.componentDidUpdate = function (prevProps) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
return __generator(this, function (_a) {
|
|
103
|
-
switch (_a.label) {
|
|
104
|
-
case 0:
|
|
105
|
-
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
|
106
|
-
this.present(prevProps);
|
|
107
|
-
}
|
|
108
|
-
if (!(this.controller &&
|
|
109
|
-
prevProps.isOpen !== this.props.isOpen &&
|
|
110
|
-
this.props.isOpen === false)) return [3 /*break*/, 2];
|
|
111
|
-
return [4 /*yield*/, this.controller.dismiss()];
|
|
112
|
-
case 1:
|
|
113
|
-
_a.sent();
|
|
114
|
-
_a.label = 2;
|
|
115
|
-
case 2: return [2 /*return*/];
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
ReactControllerComponent.prototype.present = function (prevProps) {
|
|
121
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var _a, isOpen, onDidDismiss, cProps, elementProps, _b;
|
|
123
|
-
var _c;
|
|
124
|
-
return __generator(this, function (_d) {
|
|
125
|
-
switch (_d.label) {
|
|
126
|
-
case 0:
|
|
127
|
-
_a = this.props, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, cProps = __rest(_a, ["isOpen", "onDidDismiss"]);
|
|
128
|
-
elementProps = __assign(__assign({}, cProps), (_c = {}, _c[dismissEventName] = onDidDismiss, _c));
|
|
129
|
-
_b = this;
|
|
130
|
-
return [4 /*yield*/, controller.create(__assign({}, elementProps))];
|
|
131
|
-
case 1:
|
|
132
|
-
_b.controller = _d.sent();
|
|
133
|
-
attachEventProps(this.controller, elementProps, prevProps);
|
|
134
|
-
this.controller.present();
|
|
135
|
-
return [2 /*return*/];
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
ReactControllerComponent.prototype.render = function () {
|
|
141
|
-
return null;
|
|
142
|
-
};
|
|
143
|
-
return ReactControllerComponent;
|
|
144
|
-
}(React.Component));
|
|
145
|
-
}
|
|
146
|
-
//# 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;QAGlE,kCAAY,KAAY;mBACtB,kBAAM,KAAK,CAAC;QACd,CAAC;QAED,sBAAW,uCAAW;iBAAtB;gBACE,OAAO,WAAW,CAAC;YACrB,CAAC;;;WAAA;QAEK,oDAAiB,GAAvB;;;;oBACU,MAAM,GAAK,IAAI,CAAC,KAAK,OAAf,CAAgB;oBAC9B,IAAI,MAAM,EAAE;wBACV,IAAI,CAAC,OAAO,EAAE,CAAC;qBAChB;;;;SACF;QAEK,qDAAkB,GAAxB,UAAyB,SAAgB;;;;;4BACvC,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE;gCACxE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;6BACzB;iCAEC,CAAA,IAAI,CAAC,UA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