@aws-amplify/ui-react 1.2.56-legacy-ui-tests.6 → 1.2.60-unstable.5
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/CHANGELOG.md +32 -0
- package/dist/0.js.map +1 -1
- package/dist/1.js +52 -220
- package/dist/1.js.map +1 -1
- package/dist/10.js +1 -8
- package/dist/10.js.map +1 -1
- package/dist/11.js +11 -110
- package/dist/11.js.map +1 -1
- package/dist/12.js +3 -29
- package/dist/12.js.map +1 -1
- package/dist/13.js +60 -339
- package/dist/13.js.map +1 -1
- package/dist/14.js +1 -12
- package/dist/14.js.map +1 -1
- package/dist/15.js +1 -8
- package/dist/15.js.map +1 -1
- package/dist/16.js +9 -31
- package/dist/16.js.map +1 -1
- package/dist/17.js +3 -17
- package/dist/17.js.map +1 -1
- package/dist/18.js +10 -61
- package/dist/18.js.map +1 -1
- package/dist/19.js +1 -11
- package/dist/19.js.map +1 -1
- package/dist/2.js +129 -736
- package/dist/2.js.map +1 -1
- package/dist/20.js +1 -10
- package/dist/20.js.map +1 -1
- package/dist/21.js +3 -13
- package/dist/21.js.map +1 -1
- package/dist/22.js +1 -9
- package/dist/22.js.map +1 -1
- package/dist/23.js +19 -77
- package/dist/23.js.map +1 -1
- package/dist/24.js +1 -18
- package/dist/24.js.map +1 -1
- package/dist/25.js +1 -11
- package/dist/25.js.map +1 -1
- package/dist/26.js +25 -94
- package/dist/26.js.map +1 -1
- package/dist/27.js +1 -8
- package/dist/27.js.map +1 -1
- package/dist/28.js +1 -9
- package/dist/28.js.map +1 -1
- package/dist/29.js +13 -96
- package/dist/29.js.map +1 -1
- package/dist/3.js +235 -859
- package/dist/3.js.map +1 -1
- package/dist/30.js.map +1 -1
- package/dist/4.js +45 -214
- package/dist/4.js.map +1 -1
- package/dist/5.js +39 -169
- package/dist/5.js.map +1 -1
- package/dist/6.js +45 -187
- package/dist/6.js.map +1 -1
- package/dist/7.js +38 -164
- package/dist/7.js.map +1 -1
- package/dist/8.js +45 -187
- package/dist/8.js.map +1 -1
- package/dist/9.js +34 -189
- package/dist/9.js.map +1 -1
- package/dist/@aws-amplify/ui-react.js +293 -1150
- package/dist/@aws-amplify/ui-react.js.map +1 -1
- package/dist/aws-amplify-react.min.js.map +1 -1
- package/dist/polyfills-core-js.js +1774 -2129
- package/dist/polyfills-core-js.js.map +1 -1
- package/dist/polyfills-css-shim.js +47 -113
- package/dist/polyfills-css-shim.js.map +1 -1
- package/dist/polyfills-dom.js +122 -391
- package/dist/polyfills-dom.js.map +1 -1
- package/package.json +3 -3
- package/lib/components.d.ts +0 -56
- package/lib/index.d.ts +0 -2
- package/lib/react-component-lib/createComponent.d.ts +0 -2
- package/lib/react-component-lib/createControllerComponent.d.ts +0 -43
- package/lib/react-component-lib/createOverlayComponent.d.ts +0 -45
- package/lib/react-component-lib/index.d.ts +0 -3
- package/lib/react-component-lib/utils/attachEventProps.d.ts +0 -8
- package/lib/react-component-lib/utils/index.d.ts +0 -8
- package/lib/withAuthenticator.d.ts +0 -3
package/dist/16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":["AmplifyFederatedButtons","hostRef","registerInstance","authState","AuthState","SignIn","federated","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauthConfig","Object","assign","auth0Config","render","values","includes","isEmpty","amazonClientId","facebookAppId","googleClientId","h","clientId","appId","config","amplifyStrikeCss","AmplifyStrike","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":["AmplifyFederatedButtons","hostRef","registerInstance","authState","AuthState","SignIn","federated","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauthConfig","Object","assign","auth0Config","render","values","includes","isEmpty","amazonClientId","facebookAppId","googleClientId","h","clientId","appId","config","amplifyStrikeCss","AmplifyStrike","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+D;AACnB;AACc;AACjB;AACL;AACgC;AACM;AAC1E,IAAIA,uBAAuB,GAAG,aAAe,YAAY;EACrD,SAASA,uBAAuB,CAACC,OAAO,EAAE;IACtCC,4DAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;IAC/B;IACA,IAAI,CAACE,SAAS,GAAGC,yDAAS,CAACC,MAAM;IACjC;IACA,IAAI,CAACC,SAAS,GAAG,CAAC,CAAC;IACnB;AACR;AACA;IACQ,IAAI,CAACC,qBAAqB,GAAGC,sDAA4B;EAC7D;EACAR,uBAAuB,CAACS,SAAS,CAACC,iBAAiB,GAAG,YAAY;IAC9DC,OAAO,CAACC,IAAI,CAAC,kMAAkM,CAAC;IAChN,IAAI,CAACC,sDAAI,IAAI,OAAOA,sDAAI,CAACC,SAAS,KAAK,UAAU,EAAE;MAC/C,MAAM,IAAIC,KAAK,CAACC,wDAAoB,CAAC;IACzC;IACA,IAAIC,EAAE,GAAGJ,sDAAI,CAACC,SAAS,EAAE,CAACI,KAAK;MAAEA,KAAK,GAAGD,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAGA,EAAE;IAChE;IACA,IAAIC,KAAK,CAAC,QAAQ,CAAC,EAAE;MACjB,IAAI,CAACZ,SAAS,CAACa,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACf,SAAS,CAACa,WAAW,CAAC,EAAED,KAAK,CAAC;I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.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { isEmpty } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar AmplifyFederatedButtons = /** @class */ (function () {\n function AmplifyFederatedButtons(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n /** Auth state change handler for this component\n * e.g. SignIn -> 'Create Account' link -> SignUp\n */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyFederatedButtons.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);\n }\n };\n AmplifyFederatedButtons.prototype.render = function () {\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n if (isEmpty(this.federated)) {\n return null;\n }\n var _a = this.federated, amazonClientId = _a.amazonClientId, auth0Config = _a.auth0Config, facebookAppId = _a.facebookAppId, googleClientId = _a.googleClientId, oauthConfig = _a.oauthConfig;\n return (h(\"div\", null, googleClientId && (h(\"div\", null, h(\"amplify-google-button\", { clientId: googleClientId, handleAuthStateChange: this.handleAuthStateChange }))), facebookAppId && (h(\"div\", null, h(\"amplify-facebook-button\", { appId: facebookAppId, handleAuthStateChange: this.handleAuthStateChange }))), amazonClientId && (h(\"div\", null, h(\"amplify-amazon-button\", { clientId: amazonClientId, handleAuthStateChange: this.handleAuthStateChange }))), oauthConfig && (h(\"div\", null, h(\"amplify-oauth-button\", { config: oauthConfig }))), auth0Config && (h(\"div\", null, h(\"amplify-auth0-button\", { config: auth0Config, handleAuthStateChange: this.handleAuthStateChange })))));\n };\n return AmplifyFederatedButtons;\n}());\nvar amplifyStrikeCss = \".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}\";\nvar AmplifyStrike = /** @class */ (function () {\n function AmplifyStrike(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyStrike.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyStrike.prototype.render = function () {\n return (h(\"span\", { class: \"strike-content\" }, h(\"slot\", null)));\n };\n return AmplifyStrike;\n}());\nAmplifyStrike.style = amplifyStrikeCss;\nexport { AmplifyFederatedButtons as amplify_federated_buttons, AmplifyStrike as amplify_strike };\n"],"sourceRoot":""}
|
package/dist/17.js
CHANGED
|
@@ -23,52 +23,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('amplify-federated-sign-in');
|
|
26
|
-
|
|
27
|
-
var AmplifyFederatedSignIn =
|
|
28
|
-
/** @class */
|
|
29
|
-
function () {
|
|
26
|
+
var AmplifyFederatedSignIn = /** @class */function () {
|
|
30
27
|
function AmplifyFederatedSignIn(hostRef) {
|
|
31
28
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
32
29
|
/** The current authentication state. */
|
|
33
|
-
|
|
34
30
|
this.authState = _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"].SignIn;
|
|
35
31
|
/** Federated credentials & configuration. */
|
|
36
|
-
|
|
37
32
|
this.federated = {};
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
AmplifyFederatedSignIn.prototype.componentWillLoad = function () {
|
|
41
35
|
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
42
|
-
|
|
43
36
|
if (!_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"] || typeof _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure !== 'function') {
|
|
44
37
|
throw new Error(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["N"]);
|
|
45
38
|
}
|
|
46
|
-
|
|
47
39
|
var _a = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure().oauth,
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
oauth = _a === void 0 ? {} : _a;
|
|
41
|
+
// backward compatibility
|
|
50
42
|
if (oauth['domain']) {
|
|
51
43
|
this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);
|
|
52
44
|
} else if (oauth['awsCognito']) {
|
|
53
45
|
this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);
|
|
54
46
|
}
|
|
55
|
-
|
|
56
47
|
if (oauth['auth0']) {
|
|
57
48
|
this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);
|
|
58
49
|
}
|
|
59
50
|
};
|
|
60
|
-
|
|
61
51
|
AmplifyFederatedSignIn.prototype.render = function () {
|
|
62
52
|
if (!this.federated) {
|
|
63
53
|
logger.debug('federated prop is empty. show nothing');
|
|
64
54
|
logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');
|
|
65
55
|
return null;
|
|
66
56
|
}
|
|
67
|
-
|
|
68
57
|
if (!Object.values(_auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"]).includes(this.authState)) {
|
|
69
58
|
return null;
|
|
70
59
|
}
|
|
71
|
-
|
|
72
60
|
logger.debug('federated Config is', this.federated);
|
|
73
61
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-section", {
|
|
74
62
|
"data-test": "federated-sign-in-section"
|
|
@@ -80,12 +68,10 @@ function () {
|
|
|
80
68
|
federated: this.federated
|
|
81
69
|
})));
|
|
82
70
|
};
|
|
83
|
-
|
|
84
71
|
return AmplifyFederatedSignIn;
|
|
85
72
|
}();
|
|
86
73
|
|
|
87
74
|
|
|
88
|
-
|
|
89
75
|
/***/ })
|
|
90
76
|
|
|
91
77
|
}]);
|
package/dist/17.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js"],"names":["logger","ConsoleLogger","AmplifyFederatedSignIn","hostRef","registerInstance","authState","AuthState","SignIn","federated","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauth_config","Object","assign","auth0","render","debug","values","includes","h"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js"],"names":["logger","ConsoleLogger","AmplifyFederatedSignIn","hostRef","registerInstance","authState","AuthState","SignIn","federated","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauth_config","Object","assign","auth0","render","debug","values","includes","h"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+D;AACb;AACQ;AACjB;AAC2B;AACpE,IAAIA,MAAM,GAAG,IAAIC,+DAAa,CAAC,2BAA2B,CAAC;AAC3D,IAAIC,sBAAsB,GAAG,aAAe,YAAY;EACpD,SAASA,sBAAsB,CAACC,OAAO,EAAE;IACrCC,4DAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;IAC/B;IACA,IAAI,CAACE,SAAS,GAAGC,yDAAS,CAACC,MAAM;IACjC;IACA,IAAI,CAACC,SAAS,GAAG,CAAC,CAAC;EACvB;EACAN,sBAAsB,CAACO,SAAS,CAACC,iBAAiB,GAAG,YAAY;IAC7DC,OAAO,CAACC,IAAI,CAAC,kMAAkM,CAAC;IAChN,IAAI,CAACC,sDAAI,IAAI,OAAOA,sDAAI,CAACC,SAAS,KAAK,UAAU,EAAE;MAC/C,MAAM,IAAIC,KAAK,CAACC,wDAAoB,CAAC;IACzC;IACA,IAAIC,EAAE,GAAGJ,sDAAI,CAACC,SAAS,EAAE,CAACI,KAAK;MAAEA,KAAK,GAAGD,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAGA,EAAE;IAChE;IACA,IAAIC,KAAK,CAAC,QAAQ,CAAC,EAAE;MACjB,IAAI,CAACV,SAAS,CAACW,YAAY,GAAGC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACb,SAAS,CAACW,YAAY,CAAC,EAAED,KAAK,CAAC;IACtG,CAAC,MACI,IAAIA,KAAK,CAAC,YAAY,CAAC,EAAE;MAC1B,IAAI,CAACV,SAAS,CAACW,YAAY,GAAGC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACb,SAAS,CAACW,YAAY,CAAC,EAAED,KAAK,CAAC,YAAY,CAAC,CAAC;IACpH;IACA,IAAIA,KAAK,CAAC,OAAO,CAAC,EAAE;MAChB,IAAI,CAACV,SAAS,CAACc,KAAK,GAAGF,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACb,SAAS,CAACc,KAAK,CAAC,EAAEJ,KAAK,CAAC,OAAO,CAAC,CAAC;IACjG;EACJ,CAAC;EACDhB,sBAAsB,CAACO,SAAS,CAACc,MAAM,GAAG,YAAY;IAClD,IAAI,CAAC,IAAI,CAACf,SAAS,EAAE;MACjBR,MAAM,CAACwB,KAAK,CAAC,uCAAuC,CAAC;MACrDxB,MAAM,CAACwB,KAAK,CAAC,qEAAqE,CAAC;MACnF,OAAO,IAAI;IACf;IACA,IAAI,CAACJ,MAAM,CAACK,MAAM,CAACnB,yDAAS,CAAC,CAACoB,QAAQ,CAAC,IAAI,CAACrB,SAAS,CAAC,EAAE;MACpD,OAAO,IAAI;IACf;IACAL,MAAM,CAACwB,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAChB,SAAS,CAAC;IACnD,OAAQmB,4DAAC,CAAC,sBAAsB,EAAE;MAAE,WAAW,EAAE;IAA4B,CAAC,EAAEA,4DAAC,CAAC,iBAAiB,EAAE;MAAE,WAAW,EAAE;IAAiC,CAAC,EAAEA,4DAAC,CAAC,2BAA2B,EAAE;MAAEtB,SAAS,EAAE,IAAI,CAACA,SAAS;MAAE,WAAW,EAAE,2BAA2B;MAAEG,SAAS,EAAE,IAAI,CAACA;IAAU,CAAC,CAAC,CAAC,CAAC;EAChS,CAAC;EACD,OAAON,sBAAsB;AACjC,CAAC,EAAG","file":"17.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nvar logger = new ConsoleLogger('amplify-federated-sign-in');\nvar AmplifyFederatedSignIn = /** @class */ (function () {\n function AmplifyFederatedSignIn(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n }\n AmplifyFederatedSignIn.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);\n }\n };\n AmplifyFederatedSignIn.prototype.render = function () {\n if (!this.federated) {\n logger.debug('federated prop is empty. show nothing');\n logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');\n return null;\n }\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n logger.debug('federated Config is', this.federated);\n return (h(\"amplify-form-section\", { \"data-test\": \"federated-sign-in-section\" }, h(\"amplify-section\", { \"data-test\": \"federated-sign-in-body-section\" }, h(\"amplify-federated-buttons\", { authState: this.authState, \"data-test\": \"federated-sign-in-buttons\", federated: this.federated }))));\n };\n return AmplifyFederatedSignIn;\n}());\nexport { AmplifyFederatedSignIn as amplify_federated_sign_in };\n"],"sourceRoot":""}
|
package/dist/18.js
CHANGED
|
@@ -30,27 +30,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var amplifyFormFieldCss = "amplify-form-field{--label-font-size:var(--amplify-text-md);--description-font-size:var(--amplify-text-sm)}.form-field{margin-bottom:15px}.form-field-label{display:block;font-size:var(--label-font-size);padding-bottom:0.5em}.form-field-description{font-size:var(--description-font-size);padding-top:0.5em}";
|
|
33
|
-
|
|
34
|
-
var AmplifyFormField =
|
|
35
|
-
/** @class */
|
|
36
|
-
function () {
|
|
33
|
+
var AmplifyFormField = /** @class */function () {
|
|
37
34
|
function AmplifyFormField(hostRef) {
|
|
38
35
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
39
36
|
/** The input type. Can be any HTML input type. */
|
|
40
|
-
|
|
41
37
|
this.type = 'text';
|
|
42
38
|
/** The required flag in order to make an input required prior to submitting a form */
|
|
43
|
-
|
|
44
39
|
this.required = false;
|
|
45
40
|
/** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */
|
|
46
|
-
|
|
47
41
|
this.placeholder = '';
|
|
48
42
|
}
|
|
49
|
-
|
|
50
43
|
AmplifyFormField.prototype.componentWillLoad = function () {
|
|
51
44
|
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
52
45
|
};
|
|
53
|
-
|
|
54
46
|
AmplifyFormField.prototype.render = function () {
|
|
55
47
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
56
48
|
"class": "form-field"
|
|
@@ -79,70 +71,50 @@ function () {
|
|
|
79
71
|
id: this.fieldId + "-hint"
|
|
80
72
|
}, this.hint));
|
|
81
73
|
};
|
|
82
|
-
|
|
83
74
|
return AmplifyFormField;
|
|
84
75
|
}();
|
|
85
|
-
|
|
86
76
|
AmplifyFormField.style = amplifyFormFieldCss;
|
|
87
77
|
var amplifyHintCss = ":host{--color:var(--amplify-grey);--font-family:var(--amplify-font-family);--font-size:var(--amplify-text-xs);--font-weight:var(--amplify-font-weight)}.hint{color:var(--color);font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size);margin-bottom:2.625rem}";
|
|
88
|
-
|
|
89
|
-
var AmplifyHint =
|
|
90
|
-
/** @class */
|
|
91
|
-
function () {
|
|
78
|
+
var AmplifyHint = /** @class */function () {
|
|
92
79
|
function AmplifyHint(hostRef) {
|
|
93
80
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
94
81
|
}
|
|
95
|
-
|
|
96
82
|
AmplifyHint.prototype.componentWillLoad = function () {
|
|
97
83
|
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
98
84
|
};
|
|
99
|
-
|
|
100
85
|
AmplifyHint.prototype.render = function () {
|
|
101
86
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
102
87
|
"class": "hint"
|
|
103
88
|
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
|
104
89
|
};
|
|
105
|
-
|
|
106
90
|
return AmplifyHint;
|
|
107
91
|
}();
|
|
108
|
-
|
|
109
92
|
AmplifyHint.style = amplifyHintCss;
|
|
110
93
|
var amplifyInputCss = "amplify-input{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-color-focus:var(--amplify-primary-color);--border:1px solid var(--border-color);--margin:0 0 0.625rem 0}[data-autocompleted]{background-color:#e8f0fe !important}.input-host{width:100%}.input{display:block;width:100%;padding:1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);background-image:none;border:var(--border);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:var(--margin);height:3.125rem;line-height:1.1;-webkit-box-shadow:none;box-shadow:none}.input:focus{outline:none;border-color:var(--border-color-focus)}.input:disabled{opacity:0.5}";
|
|
111
|
-
|
|
112
|
-
var AmplifyInput =
|
|
113
|
-
/** @class */
|
|
114
|
-
function () {
|
|
94
|
+
var AmplifyInput = /** @class */function () {
|
|
115
95
|
function AmplifyInput(hostRef) {
|
|
116
96
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
117
97
|
/** The input type. Can be any HTML input type. */
|
|
118
|
-
|
|
119
98
|
this.type = 'text';
|
|
120
99
|
/** The callback, called when the input is modified by the user. */
|
|
121
|
-
|
|
122
100
|
this.handleInputChange = function () {
|
|
123
101
|
return void 0;
|
|
124
102
|
};
|
|
125
103
|
/** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */
|
|
126
|
-
|
|
127
|
-
|
|
128
104
|
this.placeholder = '';
|
|
129
105
|
/** Whether the input is a required field */
|
|
130
|
-
|
|
131
106
|
this.required = false;
|
|
132
107
|
/** Whether the input has been autocompleted */
|
|
133
|
-
|
|
134
108
|
this.autoCompleted = false;
|
|
135
109
|
}
|
|
136
110
|
/**
|
|
137
111
|
* Sets the value of this input to the value in autofill input event.
|
|
138
112
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
113
|
AmplifyInput.prototype.setAutoCompleteValue = function (value) {
|
|
142
114
|
var input = this.el.querySelector('input');
|
|
143
115
|
if (!input) return;
|
|
144
|
-
input.value = value;
|
|
145
|
-
|
|
116
|
+
input.value = value;
|
|
117
|
+
// dispatch an input event from this element to the parent form
|
|
146
118
|
input.dispatchEvent(new Event('input'));
|
|
147
119
|
this.autoCompleted = true;
|
|
148
120
|
};
|
|
@@ -150,13 +122,9 @@ function () {
|
|
|
150
122
|
* Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.
|
|
151
123
|
* If so, we update this.value with the autofilled value.
|
|
152
124
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
125
|
AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {
|
|
156
126
|
var _this = this;
|
|
157
|
-
|
|
158
127
|
if (!targetInput) return;
|
|
159
|
-
|
|
160
128
|
if (targetInput.value) {
|
|
161
129
|
// if value is already set, we set the value directly
|
|
162
130
|
this.setAutoCompleteValue(targetInput.value);
|
|
@@ -164,21 +132,18 @@ function () {
|
|
|
164
132
|
// if value is not set, we start listening for it
|
|
165
133
|
targetInput.addEventListener('input', function (e) {
|
|
166
134
|
var value = e.target.value;
|
|
167
|
-
|
|
168
135
|
_this.setAutoCompleteValue(value);
|
|
169
136
|
});
|
|
170
137
|
}
|
|
171
138
|
};
|
|
172
|
-
|
|
173
139
|
AmplifyInput.prototype.disconnectedCallback = function () {
|
|
174
140
|
this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`
|
|
175
141
|
};
|
|
176
142
|
|
|
177
143
|
AmplifyInput.prototype.componentWillLoad = function () {
|
|
178
144
|
var _this = this;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
145
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
146
|
+
// the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.
|
|
182
147
|
if (!Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-authenticator', this.el)) return;
|
|
183
148
|
this.removeHubListener = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["o"])(function () {
|
|
184
149
|
/**
|
|
@@ -188,34 +153,28 @@ function () {
|
|
|
188
153
|
* which is the existing behavior.
|
|
189
154
|
*/
|
|
190
155
|
var input = _this.el.querySelector('input');
|
|
191
|
-
|
|
192
156
|
if (input) input.value = '';
|
|
193
157
|
_this.autoCompleted = false;
|
|
194
158
|
});
|
|
195
159
|
};
|
|
196
|
-
|
|
197
160
|
AmplifyInput.prototype.componentDidLoad = function () {
|
|
198
161
|
// no-op if this field already has been autofilled or already has an value
|
|
199
162
|
if (this.autoCompleted || this.value) return;
|
|
200
163
|
if (/Firefox/.test(navigator.userAgent)) return; // firefox autofill works
|
|
201
|
-
|
|
202
164
|
var container = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-auth-container', this.el);
|
|
203
|
-
var signIn = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-sign-in', this.el);
|
|
204
|
-
|
|
165
|
+
var signIn = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-sign-in', this.el);
|
|
166
|
+
// only autocomplete if `amplify-auth-container` is present and input is under `sign-in`.
|
|
205
167
|
if (!container || !signIn) return;
|
|
206
168
|
var username = container.querySelector("input[name='username']");
|
|
207
169
|
var password = container.querySelector("input[name='password']");
|
|
208
|
-
|
|
209
170
|
if (this.name === 'username' || this.name === 'email' || this.name === 'phone') {
|
|
210
171
|
this.checkAutoCompletion(username);
|
|
211
172
|
} else if (this.name === 'password') {
|
|
212
173
|
this.checkAutoCompletion(password);
|
|
213
174
|
}
|
|
214
175
|
};
|
|
215
|
-
|
|
216
176
|
AmplifyInput.prototype.render = function () {
|
|
217
177
|
var _this = this;
|
|
218
|
-
|
|
219
178
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
|
220
179
|
"class": "input-host"
|
|
221
180
|
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", Object.assign({
|
|
@@ -225,7 +184,6 @@ function () {
|
|
|
225
184
|
type: this.type,
|
|
226
185
|
onInput: function onInput(event) {
|
|
227
186
|
_this.autoCompleted = false;
|
|
228
|
-
|
|
229
187
|
_this.handleInputChange(event);
|
|
230
188
|
},
|
|
231
189
|
placeholder: this.placeholder,
|
|
@@ -236,7 +194,6 @@ function () {
|
|
|
236
194
|
required: this.required
|
|
237
195
|
}, this.inputProps)));
|
|
238
196
|
};
|
|
239
|
-
|
|
240
197
|
Object.defineProperty(AmplifyInput.prototype, "el", {
|
|
241
198
|
get: function get() {
|
|
242
199
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["g"])(this);
|
|
@@ -246,31 +203,23 @@ function () {
|
|
|
246
203
|
});
|
|
247
204
|
return AmplifyInput;
|
|
248
205
|
}();
|
|
249
|
-
|
|
250
206
|
AmplifyInput.style = amplifyInputCss;
|
|
251
207
|
var amplifyLabelCss = ":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}";
|
|
252
|
-
|
|
253
|
-
var AmplifyLabel =
|
|
254
|
-
/** @class */
|
|
255
|
-
function () {
|
|
208
|
+
var AmplifyLabel = /** @class */function () {
|
|
256
209
|
function AmplifyLabel(hostRef) {
|
|
257
210
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
258
211
|
}
|
|
259
|
-
|
|
260
212
|
AmplifyLabel.prototype.componentWillLoad = function () {
|
|
261
213
|
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
262
214
|
};
|
|
263
|
-
|
|
264
215
|
AmplifyLabel.prototype.render = function () {
|
|
265
216
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("label", {
|
|
266
217
|
"class": "label",
|
|
267
218
|
htmlFor: this.htmlFor
|
|
268
219
|
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
|
269
220
|
};
|
|
270
|
-
|
|
271
221
|
return AmplifyLabel;
|
|
272
222
|
}();
|
|
273
|
-
|
|
274
223
|
AmplifyLabel.style = amplifyLabelCss;
|
|
275
224
|
|
|
276
225
|
|
package/dist/18.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-form-field_4.entry.js"],"names":["amplifyFormFieldCss","AmplifyFormField","hostRef","registerInstance","type","required","placeholder","prototype","componentWillLoad","console","warn","render","h","label","htmlFor","fieldId","description","id","name","handleInputChange","value","inputProps","disabled","hint","style","amplifyHintCss","AmplifyHint","amplifyInputCss","AmplifyInput","autoCompleted","setAutoCompleteValue","input","el","querySelector","dispatchEvent","Event","checkAutoCompletion","targetInput","_this","addEventListener","e","target","disconnectedCallback","removeHubListener","closestElement","onAuthUIStateChange","componentDidLoad","test","navigator","userAgent","container","signIn","username","password","Host","Object","assign","onInput","event","defineProperty","get","getElement","enumerable","configurable","amplifyLabelCss","AmplifyLabel"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,mBAAmB,GAAG,mTAA1B;;AACA,IAAIC,gBAAgB;AAAG;AAAe,YAAY;EAC9C,SAASA,gBAAT,CAA0BC,OAA1B,EAAmC;IAC/BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;IACA;;IACA,KAAKC,IAAL,GAAY,MAAZ;IACA;;IACA,KAAKC,QAAL,GAAgB,KAAhB;IACA;;IACA,KAAKC,WAAL,GAAmB,EAAnB;EACH;;EACDL,gBAAgB,CAACM,SAAjBN,CAA2BO,iBAA3BP,GAA+C,YAAY;IACvDQ,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAR,gBAAgB,CAACM,SAAjBN,CAA2BU,MAA3BV,GAAoC,YAAY;IAC5C,OAAQW,4DAAC,CAAC,KAAD,EAAQ;MAAE,SAAO;IAAT,CAAR,EAAiC,KAAKC,KAAL,IAAeD,4DAAC,CAAC,KAAD,EAAQ;MAAE,SAAO;IAAT,CAAR,EAAuCA,4DAAC,CAAC,eAAD,EAAkB;MAAEE,OAAO,EAAE,KAAKC;IAA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AKA;IALhE,CAAdkD,EAK0F,KAAKlC,UAL/FkC,CAAV,CAAjC,CAAT;EAFJ;;EASAA,MAAM,CAACI,cAAPJ,CAAsB3B,YAAY,CAACrB,SAAnCgD,EAA8C,IAA9CA,EAAoD;IAChDK,GAAG,EAAE,eAAY;MAAE,OAAOC,4DAAU,CAAC,IAAD,CAAjB;IAD6B;IAEhDC,UAAU,EAAE,KAFoC;IAGhDC,YAAY,EAAE;EAHkC,CAApDR;EAKA,OAAO3B,YAAP;AAxG8B,GAAlC;;AA0GAA,YAAY,CAACJ,KAAbI,GAAqBD,eAArBC;AACA,IAAIoC,eAAe,GAAG,yIAAtB;;AACA,IAAIC,YAAY;AAAG;AAAe,YAAY;EAC1C,SAASA,YAAT,CAAsB/D,OAAtB,EAA+B;IAC3BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;EACH;;EACD8D,YAAY,CAAC1D,SAAb0D,CAAuBzD,iBAAvByD,GAA2C,YAAY;IACnDxD,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAwD,YAAY,CAAC1D,SAAb0D,CAAuBtD,MAAvBsD,GAAgC,YAAY;IACxC,OAAQrD,4DAAC,CAAC,OAAD,EAAU;MAAE,SAAO,OAAT;MAAkBE,OAAO,EAAE,KAAKA;IAAhC,CAAV,EAAqDF,4DAAC,CAAC,MAAD,EAAS,IAAT,CAAtD,CAAT;EADJ;;EAGA,OAAOqD,YAAP;AAV8B,GAAlC;;AAYAA,YAAY,CAACzC,KAAbyC,GAAqBD,eAArBC","file":"18.js","sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-83f2275b.js';\nimport '@aws-amplify/core';\nimport './auth-types-78df304e.js';\nimport '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport './constants-c8ecaa24.js';\nimport { e as closestElement, o as onAuthUIStateChange } from './helpers-14fcb50c.js';\nvar amplifyFormFieldCss = \"amplify-form-field{--label-font-size:var(--amplify-text-md);--description-font-size:var(--amplify-text-sm)}.form-field{margin-bottom:15px}.form-field-label{display:block;font-size:var(--label-font-size);padding-bottom:0.5em}.form-field-description{font-size:var(--description-font-size);padding-top:0.5em}\";\nvar AmplifyFormField = /** @class */ (function () {\n function AmplifyFormField(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The required flag in order to make an input required prior to submitting a form */\n this.required = false;\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n }\n AmplifyFormField.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyFormField.prototype.render = function () {\n return (h(\"div\", { class: \"form-field\" }, this.label && (h(\"div\", { class: \"form-field-label\" }, h(\"amplify-label\", { htmlFor: this.fieldId }, this.label))), this.description && (h(\"div\", { id: this.fieldId + \"-description\", class: \"form-field-description\", \"data-test\": \"form-field-description\" }, this.description)), h(\"div\", null, h(\"slot\", { name: \"input\" }, h(\"amplify-input\", { fieldId: this.fieldId, description: this.description, type: this.type, handleInputChange: this.handleInputChange, placeholder: this.placeholder, name: this.name, value: this.value, inputProps: this.inputProps, disabled: this.disabled, required: this.required }))), this.hint && (h(\"amplify-hint\", { id: this.fieldId + \"-hint\" }, this.hint))));\n };\n return AmplifyFormField;\n}());\nAmplifyFormField.style = amplifyFormFieldCss;\nvar amplifyHintCss = \":host{--color:var(--amplify-grey);--font-family:var(--amplify-font-family);--font-size:var(--amplify-text-xs);--font-weight:var(--amplify-font-weight)}.hint{color:var(--color);font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size);margin-bottom:2.625rem}\";\nvar AmplifyHint = /** @class */ (function () {\n function AmplifyHint(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyHint.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyHint.prototype.render = function () {\n return (h(\"div\", { class: \"hint\" }, h(\"slot\", null)));\n };\n return AmplifyHint;\n}());\nAmplifyHint.style = amplifyHintCss;\nvar amplifyInputCss = \"amplify-input{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-color-focus:var(--amplify-primary-color);--border:1px solid var(--border-color);--margin:0 0 0.625rem 0}[data-autocompleted]{background-color:#e8f0fe !important}.input-host{width:100%}.input{display:block;width:100%;padding:1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);background-image:none;border:var(--border);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:var(--margin);height:3.125rem;line-height:1.1;-webkit-box-shadow:none;box-shadow:none}.input:focus{outline:none;border-color:var(--border-color-focus)}.input:disabled{opacity:0.5}\";\nvar AmplifyInput = /** @class */ (function () {\n function AmplifyInput(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The callback, called when the input is modified by the user. */\n this.handleInputChange = function () { return void 0; };\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n /** Whether the input is a required field */\n this.required = false;\n /** Whether the input has been autocompleted */\n this.autoCompleted = false;\n }\n /**\n * Sets the value of this input to the value in autofill input event.\n */\n AmplifyInput.prototype.setAutoCompleteValue = function (value) {\n var input = this.el.querySelector('input');\n if (!input)\n return;\n input.value = value;\n // dispatch an input event from this element to the parent form\n input.dispatchEvent(new Event('input'));\n this.autoCompleted = true;\n };\n /**\n * Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.\n * If so, we update this.value with the autofilled value.\n */\n AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {\n var _this = this;\n if (!targetInput)\n return;\n if (targetInput.value) {\n // if value is already set, we set the value directly\n this.setAutoCompleteValue(targetInput.value);\n }\n else {\n // if value is not set, we start listening for it\n targetInput.addEventListener('input', function (e) {\n var value = e.target.value;\n _this.setAutoCompleteValue(value);\n });\n }\n };\n AmplifyInput.prototype.disconnectedCallback = function () {\n this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`\n };\n AmplifyInput.prototype.componentWillLoad = function () {\n var _this = this;\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n // the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.\n if (!closestElement('amplify-authenticator', this.el))\n return;\n this.removeHubListener = onAuthUIStateChange(function () {\n /**\n * When we're using slots, autofilled data will persist between different authState,\n * even though input events are not triggered. This ends up in parent components\n * not picking up input values. For now, we're emptying the input on authState change\n * which is the existing behavior.\n */\n var input = _this.el.querySelector('input');\n if (input)\n input.value = '';\n _this.autoCompleted = false;\n });\n };\n AmplifyInput.prototype.componentDidLoad = function () {\n // no-op if this field already has been autofilled or already has an value\n if (this.autoCompleted || this.value)\n return;\n if (/Firefox/.test(navigator.userAgent))\n return; // firefox autofill works\n var container = closestElement('amplify-auth-container', this.el);\n var signIn = closestElement('amplify-sign-in', this.el);\n // only autocomplete if `amplify-auth-container` is present and input is under `sign-in`.\n if (!container || !signIn)\n return;\n var username = container.querySelector(\"input[name='username']\");\n var password = container.querySelector(\"input[name='password']\");\n if (this.name === 'username' ||\n this.name === 'email' ||\n this.name === 'phone') {\n this.checkAutoCompletion(username);\n }\n else if (this.name === 'password') {\n this.checkAutoCompletion(password);\n }\n };\n AmplifyInput.prototype.render = function () {\n var _this = this;\n return (h(Host, { class: \"input-host\" }, h(\"input\", Object.assign({ id: this.fieldId, \"aria-describedby\": this.fieldId && this.description\n ? this.fieldId + \"-description\"\n : null, \"data-autocompleted\": this.autoCompleted, type: this.type, onInput: function (event) {\n _this.autoCompleted = false;\n _this.handleInputChange(event);\n }, placeholder: this.placeholder, name: this.name, class: \"input\", value: this.value, disabled: this.disabled, required: this.required }, this.inputProps))));\n };\n Object.defineProperty(AmplifyInput.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: false,\n configurable: true\n });\n return AmplifyInput;\n}());\nAmplifyInput.style = amplifyInputCss;\nvar amplifyLabelCss = \":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}\";\nvar AmplifyLabel = /** @class */ (function () {\n function AmplifyLabel(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyLabel.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyLabel.prototype.render = function () {\n return (h(\"label\", { class: \"label\", htmlFor: this.htmlFor }, h(\"slot\", null)));\n };\n return AmplifyLabel;\n}());\nAmplifyLabel.style = amplifyLabelCss;\nexport { AmplifyFormField as amplify_form_field, AmplifyHint as amplify_hint, AmplifyInput as amplify_input, AmplifyLabel as amplify_label };\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-form-field_4.entry.js"],"names":["amplifyFormFieldCss","AmplifyFormField","hostRef","registerInstance","type","required","placeholder","prototype","componentWillLoad","console","warn","render","h","label","htmlFor","fieldId","description","id","name","handleInputChange","value","inputProps","disabled","hint","style","amplifyHintCss","AmplifyHint","amplifyInputCss","AmplifyInput","autoCompleted","setAutoCompleteValue","input","el","querySelector","dispatchEvent","Event","checkAutoCompletion","targetInput","_this","addEventListener","e","target","disconnectedCallback","removeHubListener","closestElement","onAuthUIStateChange","componentDidLoad","test","navigator","userAgent","container","signIn","username","password","Host","Object","assign","onInput","event","defineProperty","get","getElement","enumerable","configurable","amplifyLabelCss","AmplifyLabel"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,eAAe,GAAG,yIAAyI;AAC/J,IAAIC,YAAY,GAAG,aAAe,YAAY;EAC1C,SAASA,YAAY,CAAC/D,OAAO,EAAE;IAC3BC,4DAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;EACnC;EACA+D,YAAY,CAAC1D,SAAS,CAACC,iBAAiB,GAAG,YAAY;IACnDC,OAAO,CAACC,IAAI,CAAC,kMAAkM,CAAC;EACpN,CAAC;EACDuD,YAAY,CAAC1D,SAAS,CAACI,MAAM,GAAG,YAAY;IACxC,OAAQC,4DAAC,CAAC,OAAO,EAAE;MAAE,SAAO,OAAO;MAAEE,OAAO,EAAE,IAAI,CAACA;IAAQ,CAAC,EAAEF,4DAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;EAClF,CAAC;EACD,OAAOqD,YAAY;AACvB,CAAC,EAAG;AACJA,YAAY,CAACzC,KAAK,GAAGwC,eAAe","file":"18.js","sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-83f2275b.js';\nimport '@aws-amplify/core';\nimport './auth-types-78df304e.js';\nimport '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport './constants-c8ecaa24.js';\nimport { e as closestElement, o as onAuthUIStateChange } from './helpers-14fcb50c.js';\nvar amplifyFormFieldCss = \"amplify-form-field{--label-font-size:var(--amplify-text-md);--description-font-size:var(--amplify-text-sm)}.form-field{margin-bottom:15px}.form-field-label{display:block;font-size:var(--label-font-size);padding-bottom:0.5em}.form-field-description{font-size:var(--description-font-size);padding-top:0.5em}\";\nvar AmplifyFormField = /** @class */ (function () {\n function AmplifyFormField(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The required flag in order to make an input required prior to submitting a form */\n this.required = false;\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n }\n AmplifyFormField.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyFormField.prototype.render = function () {\n return (h(\"div\", { class: \"form-field\" }, this.label && (h(\"div\", { class: \"form-field-label\" }, h(\"amplify-label\", { htmlFor: this.fieldId }, this.label))), this.description && (h(\"div\", { id: this.fieldId + \"-description\", class: \"form-field-description\", \"data-test\": \"form-field-description\" }, this.description)), h(\"div\", null, h(\"slot\", { name: \"input\" }, h(\"amplify-input\", { fieldId: this.fieldId, description: this.description, type: this.type, handleInputChange: this.handleInputChange, placeholder: this.placeholder, name: this.name, value: this.value, inputProps: this.inputProps, disabled: this.disabled, required: this.required }))), this.hint && (h(\"amplify-hint\", { id: this.fieldId + \"-hint\" }, this.hint))));\n };\n return AmplifyFormField;\n}());\nAmplifyFormField.style = amplifyFormFieldCss;\nvar amplifyHintCss = \":host{--color:var(--amplify-grey);--font-family:var(--amplify-font-family);--font-size:var(--amplify-text-xs);--font-weight:var(--amplify-font-weight)}.hint{color:var(--color);font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size);margin-bottom:2.625rem}\";\nvar AmplifyHint = /** @class */ (function () {\n function AmplifyHint(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyHint.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyHint.prototype.render = function () {\n return (h(\"div\", { class: \"hint\" }, h(\"slot\", null)));\n };\n return AmplifyHint;\n}());\nAmplifyHint.style = amplifyHintCss;\nvar amplifyInputCss = \"amplify-input{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-color-focus:var(--amplify-primary-color);--border:1px solid var(--border-color);--margin:0 0 0.625rem 0}[data-autocompleted]{background-color:#e8f0fe !important}.input-host{width:100%}.input{display:block;width:100%;padding:1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);background-image:none;border:var(--border);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:var(--margin);height:3.125rem;line-height:1.1;-webkit-box-shadow:none;box-shadow:none}.input:focus{outline:none;border-color:var(--border-color-focus)}.input:disabled{opacity:0.5}\";\nvar AmplifyInput = /** @class */ (function () {\n function AmplifyInput(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The callback, called when the input is modified by the user. */\n this.handleInputChange = function () { return void 0; };\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n /** Whether the input is a required field */\n this.required = false;\n /** Whether the input has been autocompleted */\n this.autoCompleted = false;\n }\n /**\n * Sets the value of this input to the value in autofill input event.\n */\n AmplifyInput.prototype.setAutoCompleteValue = function (value) {\n var input = this.el.querySelector('input');\n if (!input)\n return;\n input.value = value;\n // dispatch an input event from this element to the parent form\n input.dispatchEvent(new Event('input'));\n this.autoCompleted = true;\n };\n /**\n * Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.\n * If so, we update this.value with the autofilled value.\n */\n AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {\n var _this = this;\n if (!targetInput)\n return;\n if (targetInput.value) {\n // if value is already set, we set the value directly\n this.setAutoCompleteValue(targetInput.value);\n }\n else {\n // if value is not set, we start listening for it\n targetInput.addEventListener('input', function (e) {\n var value = e.target.value;\n _this.setAutoCompleteValue(value);\n });\n }\n };\n AmplifyInput.prototype.disconnectedCallback = function () {\n this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`\n };\n AmplifyInput.prototype.componentWillLoad = function () {\n var _this = this;\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n // the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.\n if (!closestElement('amplify-authenticator', this.el))\n return;\n this.removeHubListener = onAuthUIStateChange(function () {\n /**\n * When we're using slots, autofilled data will persist between different authState,\n * even though input events are not triggered. This ends up in parent components\n * not picking up input values. For now, we're emptying the input on authState change\n * which is the existing behavior.\n */\n var input = _this.el.querySelector('input');\n if (input)\n input.value = '';\n _this.autoCompleted = false;\n });\n };\n AmplifyInput.prototype.componentDidLoad = function () {\n // no-op if this field already has been autofilled or already has an value\n if (this.autoCompleted || this.value)\n return;\n if (/Firefox/.test(navigator.userAgent))\n return; // firefox autofill works\n var container = closestElement('amplify-auth-container', this.el);\n var signIn = closestElement('amplify-sign-in', this.el);\n // only autocomplete if `amplify-auth-container` is present and input is under `sign-in`.\n if (!container || !signIn)\n return;\n var username = container.querySelector(\"input[name='username']\");\n var password = container.querySelector(\"input[name='password']\");\n if (this.name === 'username' ||\n this.name === 'email' ||\n this.name === 'phone') {\n this.checkAutoCompletion(username);\n }\n else if (this.name === 'password') {\n this.checkAutoCompletion(password);\n }\n };\n AmplifyInput.prototype.render = function () {\n var _this = this;\n return (h(Host, { class: \"input-host\" }, h(\"input\", Object.assign({ id: this.fieldId, \"aria-describedby\": this.fieldId && this.description\n ? this.fieldId + \"-description\"\n : null, \"data-autocompleted\": this.autoCompleted, type: this.type, onInput: function (event) {\n _this.autoCompleted = false;\n _this.handleInputChange(event);\n }, placeholder: this.placeholder, name: this.name, class: \"input\", value: this.value, disabled: this.disabled, required: this.required }, this.inputProps))));\n };\n Object.defineProperty(AmplifyInput.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: false,\n configurable: true\n });\n return AmplifyInput;\n}());\nAmplifyInput.style = amplifyInputCss;\nvar amplifyLabelCss = \":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}\";\nvar AmplifyLabel = /** @class */ (function () {\n function AmplifyLabel(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyLabel.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyLabel.prototype.render = function () {\n return (h(\"label\", { class: \"label\", htmlFor: this.htmlFor }, h(\"slot\", null)));\n };\n return AmplifyLabel;\n}());\nAmplifyLabel.style = amplifyLabelCss;\nexport { AmplifyFormField as amplify_form_field, AmplifyHint as amplify_hint, AmplifyInput as amplify_input, AmplifyLabel as amplify_label };\n"],"sourceRoot":""}
|
package/dist/19.js
CHANGED
|
@@ -27,27 +27,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var amplifyGreetingsCss = ":host{--background-color:var(--amplify-white);--border-color:var(--amplify-light-grey);--font-family:var(--amplify-font-family)}.greetings{display:-ms-flexbox;display:flex;border:1px solid transparent;background-color:var(--background-color);border-color:var(--border-color);padding:0.625rem;font-family:var(--font-family);-ms-flex-pack:justify;justify-content:space-between}.nav{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center}.logo{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;justify-self:flex-start}amplify-sign-out{margin-left:1rem}";
|
|
30
|
-
|
|
31
|
-
var AmplifyGreetings =
|
|
32
|
-
/** @class */
|
|
33
|
-
function () {
|
|
30
|
+
var AmplifyGreetings = /** @class */function () {
|
|
34
31
|
function AmplifyGreetings(hostRef) {
|
|
35
32
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
36
33
|
/** Username displayed in the greetings */
|
|
37
|
-
|
|
38
34
|
this.username = null;
|
|
39
35
|
/** Logo displayed inside of the header */
|
|
40
|
-
|
|
41
36
|
this.logo = null;
|
|
42
37
|
/** Auth state change handler for this component */
|
|
43
|
-
|
|
44
38
|
this.handleAuthStateChange = _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["d"];
|
|
45
39
|
}
|
|
46
|
-
|
|
47
40
|
AmplifyGreetings.prototype.componentWillLoad = function () {
|
|
48
41
|
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
49
42
|
};
|
|
50
|
-
|
|
51
43
|
AmplifyGreetings.prototype.render = function () {
|
|
52
44
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("header", {
|
|
53
45
|
"class": "greetings"
|
|
@@ -65,10 +57,8 @@ function () {
|
|
|
65
57
|
handleAuthStateChange: this.handleAuthStateChange
|
|
66
58
|
})))));
|
|
67
59
|
};
|
|
68
|
-
|
|
69
60
|
return AmplifyGreetings;
|
|
70
61
|
}();
|
|
71
|
-
|
|
72
62
|
AmplifyGreetings.style = amplifyGreetingsCss;
|
|
73
63
|
|
|
74
64
|
|
package/dist/19.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-greetings.entry.js"],"names":["amplifyGreetingsCss","AmplifyGreetings","hostRef","registerInstance","username","logo","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","render","h","name","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-greetings.entry.js"],"names":["amplifyGreetingsCss","AmplifyGreetings","hostRef","registerInstance","username","logo","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","render","h","name","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+D;AACpC;AACO;AACP;AACS;AACH;AACyC;AAC1E,IAAIA,mBAAmB,GAAG,0lBAA0lB;AACpnB,IAAIC,gBAAgB,GAAG,aAAe,YAAY;EAC9C,SAASA,gBA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, h } from './index-83f2275b.js';\nimport '@aws-amplify/core';\nimport './auth-types-78df304e.js';\nimport '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar amplifyGreetingsCss = \":host{--background-color:var(--amplify-white);--border-color:var(--amplify-light-grey);--font-family:var(--amplify-font-family)}.greetings{display:-ms-flexbox;display:flex;border:1px solid transparent;background-color:var(--background-color);border-color:var(--border-color);padding:0.625rem;font-family:var(--font-family);-ms-flex-pack:justify;justify-content:space-between}.nav{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center}.logo{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;justify-self:flex-start}amplify-sign-out{margin-left:1rem}\";\nvar AmplifyGreetings = /** @class */ (function () {\n function AmplifyGreetings(hostRef) {\n registerInstance(this, hostRef);\n /** Username displayed in the greetings */\n this.username = null;\n /** Logo displayed inside of the header */\n this.logo = null;\n /** Auth state change handler for this component */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyGreetings.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyGreetings.prototype.render = function () {\n return (h(\"header\", { class: \"greetings\" }, h(\"span\", { class: \"logo\" }, h(\"slot\", { name: \"logo\" }, this.logo && h(\"span\", null, this.logo))), h(\"span\", { class: \"nav\" }, h(\"slot\", { name: \"nav\" }, h(\"amplify-nav\", null, this.username && (h(\"slot\", { name: \"greetings-message\" }, h(\"span\", null, \"Hello, \", this.username))), h(\"amplify-sign-out\", { handleAuthStateChange: this.handleAuthStateChange }))))));\n };\n return AmplifyGreetings;\n}());\nAmplifyGreetings.style = amplifyGreetingsCss;\nexport { AmplifyGreetings as amplify_greetings };\n"],"sourceRoot":""}
|