@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
|
@@ -26957,7 +26957,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26957
26957
|
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_0__);
|
|
26958
26958
|
|
|
26959
26959
|
var AuthStrings;
|
|
26960
|
-
|
|
26961
26960
|
(function (AuthStrings) {
|
|
26962
26961
|
AuthStrings["BACK_TO_SIGN_IN"] = "Back to Sign In";
|
|
26963
26962
|
AuthStrings["CHANGE_PASSWORD_ACTION"] = "Change";
|
|
@@ -27069,9 +27068,7 @@ var AuthStrings;
|
|
|
27069
27068
|
AuthStrings["CONFIRM_SIGN_UP_FAILED"] = "Confirm Sign Up Failed";
|
|
27070
27069
|
AuthStrings["SIGN_UP_FAILED"] = "Sign Up Failed";
|
|
27071
27070
|
})(AuthStrings || (AuthStrings = {}));
|
|
27072
|
-
|
|
27073
27071
|
var InteractionsStrings;
|
|
27074
|
-
|
|
27075
27072
|
(function (InteractionsStrings) {
|
|
27076
27073
|
InteractionsStrings["CHATBOT_TITLE"] = "ChatBot Lex";
|
|
27077
27074
|
InteractionsStrings["TEXT_INPUT_PLACEHOLDER"] = "Write a message";
|
|
@@ -27079,7 +27076,6 @@ var InteractionsStrings;
|
|
|
27079
27076
|
InteractionsStrings["CHAT_DISABLED_ERROR"] = "Error: Either voice or text must be enabled for the chatbot";
|
|
27080
27077
|
InteractionsStrings["NO_BOT_NAME_ERROR"] = "Error: Bot name must be provided to ChatBot";
|
|
27081
27078
|
})(InteractionsStrings || (InteractionsStrings = {}));
|
|
27082
|
-
|
|
27083
27079
|
var Translations = Object.assign(Object.assign(Object.assign({}, AuthStrings), _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_0__["AuthErrorStrings"]), InteractionsStrings);
|
|
27084
27080
|
|
|
27085
27081
|
|
|
@@ -27101,7 +27097,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27101
27097
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthFormField; });
|
|
27102
27098
|
// TODO: Move these values to or extract them from the Cognito Provider in the Auth category for Auth V2
|
|
27103
27099
|
var AuthState;
|
|
27104
|
-
|
|
27105
27100
|
(function (AuthState) {
|
|
27106
27101
|
AuthState["SignUp"] = "signup";
|
|
27107
27102
|
AuthState["SignOut"] = "signout";
|
|
@@ -27122,17 +27117,13 @@ var AuthState;
|
|
|
27122
27117
|
AuthState["CustomConfirmSignIn"] = "customConfirmSignIn";
|
|
27123
27118
|
AuthState["VerifyContact"] = "verifyContact";
|
|
27124
27119
|
})(AuthState || (AuthState = {}));
|
|
27125
|
-
|
|
27126
27120
|
var MfaOption;
|
|
27127
|
-
|
|
27128
27121
|
(function (MfaOption) {
|
|
27129
27122
|
MfaOption["TOTP"] = "TOTP";
|
|
27130
27123
|
MfaOption["SMS"] = "SMS";
|
|
27131
27124
|
MfaOption["NOMFA"] = "NOMFA";
|
|
27132
27125
|
})(MfaOption || (MfaOption = {}));
|
|
27133
|
-
|
|
27134
27126
|
var ChallengeName;
|
|
27135
|
-
|
|
27136
27127
|
(function (ChallengeName) {
|
|
27137
27128
|
ChallengeName["SoftwareTokenMFA"] = "SOFTWARE_TOKEN_MFA";
|
|
27138
27129
|
ChallengeName["SMSMFA"] = "SMS_MFA";
|
|
@@ -27140,15 +27131,11 @@ var ChallengeName;
|
|
|
27140
27131
|
ChallengeName["MFASetup"] = "MFA_SETUP";
|
|
27141
27132
|
ChallengeName["CustomChallenge"] = "CUSTOM_CHALLENGE";
|
|
27142
27133
|
})(ChallengeName || (ChallengeName = {}));
|
|
27143
|
-
|
|
27144
27134
|
var AuthFormField;
|
|
27145
|
-
|
|
27146
27135
|
(function (AuthFormField) {
|
|
27147
27136
|
AuthFormField["Password"] = "password";
|
|
27148
27137
|
})(AuthFormField || (AuthFormField = {}));
|
|
27149
|
-
|
|
27150
27138
|
var UsernameAlias;
|
|
27151
|
-
|
|
27152
27139
|
(function (UsernameAlias) {
|
|
27153
27140
|
UsernameAlias["username"] = "username";
|
|
27154
27141
|
UsernameAlias["email"] = "email";
|
|
@@ -27156,7 +27143,6 @@ var UsernameAlias;
|
|
|
27156
27143
|
})(UsernameAlias || (UsernameAlias = {}));
|
|
27157
27144
|
|
|
27158
27145
|
|
|
27159
|
-
|
|
27160
27146
|
/***/ }),
|
|
27161
27147
|
|
|
27162
27148
|
/***/ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js":
|
|
@@ -27192,21 +27178,21 @@ var USERNAME_SUFFIX = 'username';
|
|
|
27192
27178
|
var EMAIL_SUFFIX = 'email';
|
|
27193
27179
|
var CODE_SUFFIX = 'code';
|
|
27194
27180
|
var PHONE_SUFFIX = 'phone';
|
|
27195
|
-
var PASSWORD_SUFFIX = 'password';
|
|
27196
|
-
|
|
27181
|
+
var PASSWORD_SUFFIX = 'password';
|
|
27182
|
+
// Country Dial Code common constants
|
|
27197
27183
|
var COUNTRY_DIAL_CODE_SUFFIX = 'country-dial-code-select';
|
|
27198
|
-
var COUNTRY_DIAL_CODE_DEFAULT = '+1';
|
|
27199
|
-
|
|
27200
|
-
var AUTH_SOURCE_KEY = 'amplify-auth-source';
|
|
27201
|
-
|
|
27184
|
+
var COUNTRY_DIAL_CODE_DEFAULT = '+1';
|
|
27185
|
+
// Auth Keys
|
|
27186
|
+
var AUTH_SOURCE_KEY = 'amplify-auth-source';
|
|
27187
|
+
// Error message Common Constants
|
|
27202
27188
|
var PHONE_EMPTY_ERROR_MESSAGE = 'Phone number can not be empty';
|
|
27203
27189
|
var NO_AUTH_MODULE_FOUND = 'No Auth module found, please ensure @aws-amplify/auth is imported';
|
|
27204
27190
|
var NO_STORAGE_MODULE_FOUND = 'No Storage module found, please ensure @aws-amplify/storage is imported';
|
|
27205
|
-
var NO_INTERACTIONS_MODULE_FOUND = 'No Interactions module found, please ensure @aws-amplify/interactions is imported';
|
|
27206
|
-
|
|
27191
|
+
var NO_INTERACTIONS_MODULE_FOUND = 'No Interactions module found, please ensure @aws-amplify/interactions is imported';
|
|
27192
|
+
// Select MFA Types Messages
|
|
27207
27193
|
var USER_NOT_SETUP_SOFTWARE_TOKEN_MFA = 'User has not set up software token mfa';
|
|
27208
|
-
var USER_NOT_VERIFIED_SOFTWARE_TOKEN_MFA = 'User has not verified software token mfa';
|
|
27209
|
-
|
|
27194
|
+
var USER_NOT_VERIFIED_SOFTWARE_TOKEN_MFA = 'User has not verified software token mfa';
|
|
27195
|
+
// Hub Events and Channels
|
|
27210
27196
|
var AUTH_CHANNEL = 'auth';
|
|
27211
27197
|
var UI_AUTH_CHANNEL = 'UI Auth';
|
|
27212
27198
|
var TOAST_AUTH_ERROR_EVENT = 'ToastAuthError';
|
|
@@ -27246,7 +27232,6 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
27246
27232
|
resolve(value);
|
|
27247
27233
|
});
|
|
27248
27234
|
}
|
|
27249
|
-
|
|
27250
27235
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27251
27236
|
function fulfilled(value) {
|
|
27252
27237
|
try {
|
|
@@ -27255,7 +27240,6 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
27255
27240
|
reject(e);
|
|
27256
27241
|
}
|
|
27257
27242
|
}
|
|
27258
|
-
|
|
27259
27243
|
function rejected(value) {
|
|
27260
27244
|
try {
|
|
27261
27245
|
step(generator["throw"](value));
|
|
@@ -27263,29 +27247,26 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
27263
27247
|
reject(e);
|
|
27264
27248
|
}
|
|
27265
27249
|
}
|
|
27266
|
-
|
|
27267
27250
|
function step(result) {
|
|
27268
27251
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27269
27252
|
}
|
|
27270
|
-
|
|
27271
27253
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27272
27254
|
});
|
|
27273
27255
|
};
|
|
27274
|
-
|
|
27275
27256
|
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
27276
27257
|
var _ = {
|
|
27277
|
-
|
|
27278
|
-
|
|
27279
|
-
|
|
27280
|
-
|
|
27258
|
+
label: 0,
|
|
27259
|
+
sent: function sent() {
|
|
27260
|
+
if (t[0] & 1) throw t[1];
|
|
27261
|
+
return t[1];
|
|
27262
|
+
},
|
|
27263
|
+
trys: [],
|
|
27264
|
+
ops: []
|
|
27281
27265
|
},
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
y,
|
|
27287
|
-
t,
|
|
27288
|
-
g;
|
|
27266
|
+
f,
|
|
27267
|
+
y,
|
|
27268
|
+
t,
|
|
27269
|
+
g;
|
|
27289
27270
|
return g = {
|
|
27290
27271
|
next: verb(0),
|
|
27291
27272
|
"throw": verb(1),
|
|
@@ -27293,79 +27274,60 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27293
27274
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
27294
27275
|
return this;
|
|
27295
27276
|
}), g;
|
|
27296
|
-
|
|
27297
27277
|
function verb(n) {
|
|
27298
27278
|
return function (v) {
|
|
27299
27279
|
return step([n, v]);
|
|
27300
27280
|
};
|
|
27301
27281
|
}
|
|
27302
|
-
|
|
27303
27282
|
function step(op) {
|
|
27304
27283
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27305
|
-
|
|
27306
27284
|
while (_) {
|
|
27307
27285
|
try {
|
|
27308
27286
|
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;
|
|
27309
27287
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
27310
|
-
|
|
27311
27288
|
switch (op[0]) {
|
|
27312
27289
|
case 0:
|
|
27313
27290
|
case 1:
|
|
27314
27291
|
t = op;
|
|
27315
27292
|
break;
|
|
27316
|
-
|
|
27317
27293
|
case 4:
|
|
27318
27294
|
_.label++;
|
|
27319
27295
|
return {
|
|
27320
27296
|
value: op[1],
|
|
27321
27297
|
done: false
|
|
27322
27298
|
};
|
|
27323
|
-
|
|
27324
27299
|
case 5:
|
|
27325
27300
|
_.label++;
|
|
27326
27301
|
y = op[1];
|
|
27327
27302
|
op = [0];
|
|
27328
27303
|
continue;
|
|
27329
|
-
|
|
27330
27304
|
case 7:
|
|
27331
27305
|
op = _.ops.pop();
|
|
27332
|
-
|
|
27333
27306
|
_.trys.pop();
|
|
27334
|
-
|
|
27335
27307
|
continue;
|
|
27336
|
-
|
|
27337
27308
|
default:
|
|
27338
27309
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
27339
27310
|
_ = 0;
|
|
27340
27311
|
continue;
|
|
27341
27312
|
}
|
|
27342
|
-
|
|
27343
27313
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
27344
27314
|
_.label = op[1];
|
|
27345
27315
|
break;
|
|
27346
27316
|
}
|
|
27347
|
-
|
|
27348
27317
|
if (op[0] === 6 && _.label < t[1]) {
|
|
27349
27318
|
_.label = t[1];
|
|
27350
27319
|
t = op;
|
|
27351
27320
|
break;
|
|
27352
27321
|
}
|
|
27353
|
-
|
|
27354
27322
|
if (t && _.label < t[2]) {
|
|
27355
27323
|
_.label = t[2];
|
|
27356
|
-
|
|
27357
27324
|
_.ops.push(op);
|
|
27358
|
-
|
|
27359
27325
|
break;
|
|
27360
27326
|
}
|
|
27361
|
-
|
|
27362
27327
|
if (t[2]) _.ops.pop();
|
|
27363
|
-
|
|
27364
27328
|
_.trys.pop();
|
|
27365
|
-
|
|
27366
27329
|
continue;
|
|
27367
27330
|
}
|
|
27368
|
-
|
|
27369
27331
|
op = body.call(thisArg, _);
|
|
27370
27332
|
} catch (e) {
|
|
27371
27333
|
op = [6, e];
|
|
@@ -27374,7 +27336,6 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27374
27336
|
f = t = 0;
|
|
27375
27337
|
}
|
|
27376
27338
|
}
|
|
27377
|
-
|
|
27378
27339
|
if (op[0] & 5) throw op[1];
|
|
27379
27340
|
return {
|
|
27380
27341
|
value: op[0] ? op[1] : void 0,
|
|
@@ -27387,7 +27348,6 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27387
27348
|
|
|
27388
27349
|
|
|
27389
27350
|
|
|
27390
|
-
|
|
27391
27351
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Logger"]('helpers');
|
|
27392
27352
|
/**
|
|
27393
27353
|
* Finds closest element that matches the selector from the ancestor tree.
|
|
@@ -27395,28 +27355,23 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Logger"]('helpe
|
|
|
27395
27355
|
*
|
|
27396
27356
|
* Adpated from: https://stackoverflow.com/a/56105394
|
|
27397
27357
|
*/
|
|
27398
|
-
|
|
27399
27358
|
var closestElement = function closestElement(selector, base) {
|
|
27400
27359
|
function _closestFrom(el) {
|
|
27401
27360
|
if (!el || el === document || el === window) return null;
|
|
27402
27361
|
if (el.matches(selector)) return base; // return if current element matches the selector
|
|
27403
|
-
|
|
27404
27362
|
if (el.assignedSlot) el = el.assignedSlot; // traverse up slots if slotted
|
|
27405
|
-
|
|
27406
27363
|
var found = el.closest(selector);
|
|
27407
27364
|
return found ? found : _closestFrom(el.getRootNode().host); // try to traverse up shadows
|
|
27408
27365
|
}
|
|
27409
27366
|
|
|
27410
27367
|
return _closestFrom(base);
|
|
27411
27368
|
};
|
|
27412
|
-
|
|
27413
27369
|
var dispatchToastHubEvent = function dispatchToastHubEvent(error) {
|
|
27414
27370
|
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["U"], {
|
|
27415
27371
|
event: _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["T"],
|
|
27416
27372
|
message: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["I18n"].get(error.message)
|
|
27417
27373
|
});
|
|
27418
27374
|
};
|
|
27419
|
-
|
|
27420
27375
|
var dispatchAuthStateChangeEvent = function dispatchAuthStateChangeEvent(nextAuthState, data) {
|
|
27421
27376
|
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["U"], {
|
|
27422
27377
|
event: _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["a"],
|
|
@@ -27424,114 +27379,73 @@ var dispatchAuthStateChangeEvent = function dispatchAuthStateChangeEvent(nextAut
|
|
|
27424
27379
|
data: data
|
|
27425
27380
|
});
|
|
27426
27381
|
};
|
|
27427
|
-
|
|
27428
27382
|
var composePhoneNumberInput = function composePhoneNumberInput(phoneNumber) {
|
|
27429
27383
|
if (!phoneNumber.phoneNumberValue) {
|
|
27430
27384
|
throw new Error(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["P"]);
|
|
27431
27385
|
}
|
|
27432
|
-
|
|
27433
27386
|
var sanitizedPhoneNumberValue = phoneNumber.phoneNumberValue.replace(/[-()\s]/g, '');
|
|
27434
27387
|
return "" + phoneNumber.countryDialCodeValue + sanitizedPhoneNumberValue;
|
|
27435
27388
|
};
|
|
27436
|
-
|
|
27437
27389
|
var checkUsernameAlias = function checkUsernameAlias(usernameAlias) {
|
|
27438
27390
|
if (!(usernameAlias in _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_1__["U"])) {
|
|
27439
27391
|
throw new Error("Invalid username Alias - " + usernameAlias + ". Instead use " + Object.values(_auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_1__["U"]));
|
|
27440
27392
|
}
|
|
27441
27393
|
};
|
|
27442
|
-
|
|
27443
27394
|
var onAuthUIStateChange = function onAuthUIStateChange(authStateHandler) {
|
|
27444
27395
|
var authUIStateHandler = function authUIStateHandler(data) {
|
|
27445
27396
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
27446
27397
|
var payload, _a, user, e_1;
|
|
27447
|
-
|
|
27448
27398
|
return __generator(this, function (_b) {
|
|
27449
27399
|
switch (_b.label) {
|
|
27450
27400
|
case 0:
|
|
27451
27401
|
payload = data.payload;
|
|
27452
27402
|
_a = payload.event;
|
|
27453
|
-
|
|
27454
27403
|
switch (_a) {
|
|
27455
27404
|
case _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["a"]:
|
|
27456
|
-
return [3
|
|
27457
|
-
/*break*/
|
|
27458
|
-
, 1];
|
|
27405
|
+
return [3 /*break*/, 1];
|
|
27459
27406
|
}
|
|
27460
|
-
|
|
27461
|
-
return [3
|
|
27462
|
-
/*break*/
|
|
27463
|
-
, 8];
|
|
27464
|
-
|
|
27407
|
+
return [3 /*break*/, 8];
|
|
27465
27408
|
case 1:
|
|
27466
|
-
if (!payload.message) return [3
|
|
27467
|
-
/*break
|
|
27468
|
-
, 7];
|
|
27469
|
-
if (!(payload.message === _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_1__["A"].SignedIn)) return [3
|
|
27470
|
-
/*break*/
|
|
27471
|
-
, 6];
|
|
27409
|
+
if (!payload.message) return [3 /*break*/, 7];
|
|
27410
|
+
if (!(payload.message === _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_1__["A"].SignedIn)) return [3 /*break*/, 6];
|
|
27472
27411
|
_b.label = 2;
|
|
27473
|
-
|
|
27474
27412
|
case 2:
|
|
27475
27413
|
_b.trys.push([2, 4,, 5]);
|
|
27476
|
-
|
|
27477
|
-
return [4
|
|
27478
|
-
/*yield*/
|
|
27479
|
-
, _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2___default.a.currentAuthenticatedUser()];
|
|
27480
|
-
|
|
27414
|
+
return [4 /*yield*/, _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2___default.a.currentAuthenticatedUser()];
|
|
27481
27415
|
case 3:
|
|
27482
27416
|
user = _b.sent();
|
|
27483
27417
|
authStateHandler(payload.message, user);
|
|
27484
|
-
return [3
|
|
27485
|
-
/*break*/
|
|
27486
|
-
, 5];
|
|
27487
|
-
|
|
27418
|
+
return [3 /*break*/, 5];
|
|
27488
27419
|
case 4:
|
|
27489
27420
|
e_1 = _b.sent();
|
|
27490
27421
|
logger.error('User is not authenticated');
|
|
27491
|
-
return [3
|
|
27492
|
-
/*break*/
|
|
27493
|
-
, 5];
|
|
27494
|
-
|
|
27422
|
+
return [3 /*break*/, 5];
|
|
27495
27423
|
case 5:
|
|
27496
|
-
return [3
|
|
27497
|
-
/*break*/
|
|
27498
|
-
, 7];
|
|
27499
|
-
|
|
27424
|
+
return [3 /*break*/, 7];
|
|
27500
27425
|
case 6:
|
|
27501
27426
|
authStateHandler(payload.message, payload.data);
|
|
27502
27427
|
_b.label = 7;
|
|
27503
|
-
|
|
27504
27428
|
case 7:
|
|
27505
|
-
return [3
|
|
27506
|
-
/*break*/
|
|
27507
|
-
, 8];
|
|
27508
|
-
|
|
27429
|
+
return [3 /*break*/, 8];
|
|
27509
27430
|
case 8:
|
|
27510
|
-
return [2
|
|
27511
|
-
/*return*/
|
|
27512
|
-
];
|
|
27431
|
+
return [2 /*return*/];
|
|
27513
27432
|
}
|
|
27514
27433
|
});
|
|
27515
27434
|
});
|
|
27516
27435
|
};
|
|
27517
27436
|
|
|
27518
27437
|
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["U"], authUIStateHandler);
|
|
27519
|
-
|
|
27520
27438
|
var unsubscribe = function unsubscribe() {
|
|
27521
27439
|
// Replace user's `authStateHandler` with a noop so that we don't trigger side-effects during the async `authUIStateHandler` when unsubscribed
|
|
27522
27440
|
authStateHandler = function authStateHandler() {};
|
|
27523
|
-
|
|
27524
27441
|
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].remove(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["U"], authUIStateHandler);
|
|
27525
27442
|
};
|
|
27526
|
-
|
|
27527
27443
|
return unsubscribe;
|
|
27528
27444
|
};
|
|
27529
|
-
|
|
27530
27445
|
var isHintValid = function isHintValid(field) {
|
|
27531
27446
|
return !(field['hint'] === null || typeof field['hint'] === 'string');
|
|
27532
|
-
};
|
|
27533
|
-
|
|
27534
|
-
|
|
27447
|
+
};
|
|
27448
|
+
// Required attributes come from https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
|
|
27535
27449
|
var getRequiredAttributesMap = function getRequiredAttributesMap() {
|
|
27536
27450
|
return {
|
|
27537
27451
|
address: {
|
|
@@ -27604,7 +27518,6 @@ var getRequiredAttributesMap = function getRequiredAttributesMap() {
|
|
|
27604
27518
|
}
|
|
27605
27519
|
};
|
|
27606
27520
|
};
|
|
27607
|
-
|
|
27608
27521
|
function handlePhoneNumberChange(event, phoneNumber) {
|
|
27609
27522
|
var name = event.target.name;
|
|
27610
27523
|
var value = event.target.value;
|
|
@@ -27612,18 +27525,15 @@ function handlePhoneNumberChange(event, phoneNumber) {
|
|
|
27612
27525
|
* input from the phone number input, we need to first capture both components values and combined
|
|
27613
27526
|
* them together.
|
|
27614
27527
|
*/
|
|
27615
|
-
|
|
27616
27528
|
if (name === _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["C"]) {
|
|
27617
27529
|
phoneNumber.countryDialCodeValue = value;
|
|
27618
27530
|
}
|
|
27619
|
-
|
|
27620
27531
|
if (name === _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["b"]) {
|
|
27621
27532
|
phoneNumber.phoneNumberValue = value;
|
|
27622
27533
|
}
|
|
27623
27534
|
}
|
|
27624
27535
|
|
|
27625
27536
|
|
|
27626
|
-
|
|
27627
27537
|
/***/ }),
|
|
27628
27538
|
|
|
27629
27539
|
/***/ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js":
|
|
@@ -27656,7 +27566,6 @@ function _typeof(obj) {
|
|
|
27656
27566
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
27657
27567
|
}, _typeof(obj);
|
|
27658
27568
|
}
|
|
27659
|
-
|
|
27660
27569
|
var __extends = undefined && undefined.__extends || function () {
|
|
27661
27570
|
var _extendStatics = function extendStatics(d, b) {
|
|
27662
27571
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -27668,28 +27577,22 @@ var __extends = undefined && undefined.__extends || function () {
|
|
|
27668
27577
|
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27669
27578
|
}
|
|
27670
27579
|
};
|
|
27671
|
-
|
|
27672
27580
|
return _extendStatics(d, b);
|
|
27673
27581
|
};
|
|
27674
|
-
|
|
27675
27582
|
return function (d, b) {
|
|
27676
27583
|
_extendStatics(d, b);
|
|
27677
|
-
|
|
27678
27584
|
function __() {
|
|
27679
27585
|
this.constructor = d;
|
|
27680
27586
|
}
|
|
27681
|
-
|
|
27682
27587
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
27683
27588
|
};
|
|
27684
27589
|
}();
|
|
27685
|
-
|
|
27686
27590
|
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
27687
27591
|
function adopt(value) {
|
|
27688
27592
|
return value instanceof P ? value : new P(function (resolve) {
|
|
27689
27593
|
resolve(value);
|
|
27690
27594
|
});
|
|
27691
27595
|
}
|
|
27692
|
-
|
|
27693
27596
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27694
27597
|
function fulfilled(value) {
|
|
27695
27598
|
try {
|
|
@@ -27698,7 +27601,6 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
27698
27601
|
reject(e);
|
|
27699
27602
|
}
|
|
27700
27603
|
}
|
|
27701
|
-
|
|
27702
27604
|
function rejected(value) {
|
|
27703
27605
|
try {
|
|
27704
27606
|
step(generator["throw"](value));
|
|
@@ -27706,29 +27608,26 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
27706
27608
|
reject(e);
|
|
27707
27609
|
}
|
|
27708
27610
|
}
|
|
27709
|
-
|
|
27710
27611
|
function step(result) {
|
|
27711
27612
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27712
27613
|
}
|
|
27713
|
-
|
|
27714
27614
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27715
27615
|
});
|
|
27716
27616
|
};
|
|
27717
|
-
|
|
27718
27617
|
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
27719
27618
|
var _ = {
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
27619
|
+
label: 0,
|
|
27620
|
+
sent: function sent() {
|
|
27621
|
+
if (t[0] & 1) throw t[1];
|
|
27622
|
+
return t[1];
|
|
27623
|
+
},
|
|
27624
|
+
trys: [],
|
|
27625
|
+
ops: []
|
|
27724
27626
|
},
|
|
27725
|
-
|
|
27726
|
-
|
|
27727
|
-
|
|
27728
|
-
|
|
27729
|
-
y,
|
|
27730
|
-
t,
|
|
27731
|
-
g;
|
|
27627
|
+
f,
|
|
27628
|
+
y,
|
|
27629
|
+
t,
|
|
27630
|
+
g;
|
|
27732
27631
|
return g = {
|
|
27733
27632
|
next: verb(0),
|
|
27734
27633
|
"throw": verb(1),
|
|
@@ -27736,79 +27635,60 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27736
27635
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
27737
27636
|
return this;
|
|
27738
27637
|
}), g;
|
|
27739
|
-
|
|
27740
27638
|
function verb(n) {
|
|
27741
27639
|
return function (v) {
|
|
27742
27640
|
return step([n, v]);
|
|
27743
27641
|
};
|
|
27744
27642
|
}
|
|
27745
|
-
|
|
27746
27643
|
function step(op) {
|
|
27747
27644
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27748
|
-
|
|
27749
27645
|
while (_) {
|
|
27750
27646
|
try {
|
|
27751
27647
|
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;
|
|
27752
27648
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
27753
|
-
|
|
27754
27649
|
switch (op[0]) {
|
|
27755
27650
|
case 0:
|
|
27756
27651
|
case 1:
|
|
27757
27652
|
t = op;
|
|
27758
27653
|
break;
|
|
27759
|
-
|
|
27760
27654
|
case 4:
|
|
27761
27655
|
_.label++;
|
|
27762
27656
|
return {
|
|
27763
27657
|
value: op[1],
|
|
27764
27658
|
done: false
|
|
27765
27659
|
};
|
|
27766
|
-
|
|
27767
27660
|
case 5:
|
|
27768
27661
|
_.label++;
|
|
27769
27662
|
y = op[1];
|
|
27770
27663
|
op = [0];
|
|
27771
27664
|
continue;
|
|
27772
|
-
|
|
27773
27665
|
case 7:
|
|
27774
27666
|
op = _.ops.pop();
|
|
27775
|
-
|
|
27776
27667
|
_.trys.pop();
|
|
27777
|
-
|
|
27778
27668
|
continue;
|
|
27779
|
-
|
|
27780
27669
|
default:
|
|
27781
27670
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
27782
27671
|
_ = 0;
|
|
27783
27672
|
continue;
|
|
27784
27673
|
}
|
|
27785
|
-
|
|
27786
27674
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
27787
27675
|
_.label = op[1];
|
|
27788
27676
|
break;
|
|
27789
27677
|
}
|
|
27790
|
-
|
|
27791
27678
|
if (op[0] === 6 && _.label < t[1]) {
|
|
27792
27679
|
_.label = t[1];
|
|
27793
27680
|
t = op;
|
|
27794
27681
|
break;
|
|
27795
27682
|
}
|
|
27796
|
-
|
|
27797
27683
|
if (t && _.label < t[2]) {
|
|
27798
27684
|
_.label = t[2];
|
|
27799
|
-
|
|
27800
27685
|
_.ops.push(op);
|
|
27801
|
-
|
|
27802
27686
|
break;
|
|
27803
27687
|
}
|
|
27804
|
-
|
|
27805
27688
|
if (t[2]) _.ops.pop();
|
|
27806
|
-
|
|
27807
27689
|
_.trys.pop();
|
|
27808
|
-
|
|
27809
27690
|
continue;
|
|
27810
27691
|
}
|
|
27811
|
-
|
|
27812
27692
|
op = body.call(thisArg, _);
|
|
27813
27693
|
} catch (e) {
|
|
27814
27694
|
op = [6, e];
|
|
@@ -27817,7 +27697,6 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27817
27697
|
f = t = 0;
|
|
27818
27698
|
}
|
|
27819
27699
|
}
|
|
27820
|
-
|
|
27821
27700
|
if (op[0] & 5) throw op[1];
|
|
27822
27701
|
return {
|
|
27823
27702
|
value: op[0] ? op[1] : void 0,
|
|
@@ -27825,21 +27704,17 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
27825
27704
|
};
|
|
27826
27705
|
}
|
|
27827
27706
|
};
|
|
27828
|
-
|
|
27829
27707
|
var __spreadArrays = undefined && undefined.__spreadArrays || function () {
|
|
27830
27708
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
27831
27709
|
s += arguments[i].length;
|
|
27832
27710
|
}
|
|
27833
|
-
|
|
27834
27711
|
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
27835
27712
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
27836
27713
|
r[k] = a[j];
|
|
27837
27714
|
}
|
|
27838
27715
|
}
|
|
27839
|
-
|
|
27840
27716
|
return r;
|
|
27841
27717
|
};
|
|
27842
|
-
|
|
27843
27718
|
var NAMESPACE = 'amplify-ui-components';
|
|
27844
27719
|
var scopeId;
|
|
27845
27720
|
var contentRef;
|
|
@@ -27871,30 +27746,25 @@ var plt = {
|
|
|
27871
27746
|
return el.removeEventListener(eventName, listener, opts);
|
|
27872
27747
|
}
|
|
27873
27748
|
};
|
|
27874
|
-
|
|
27875
27749
|
var supportsShadow = /*@__PURE__*/function () {
|
|
27876
27750
|
return (doc.head.attachShadow + '').indexOf('[native') > -1;
|
|
27877
27751
|
}();
|
|
27878
|
-
|
|
27879
27752
|
var promiseResolve = function promiseResolve(v) {
|
|
27880
27753
|
return Promise.resolve(v);
|
|
27881
27754
|
};
|
|
27882
|
-
|
|
27883
27755
|
var supportsConstructibleStylesheets = /*@__PURE__*/function () {
|
|
27884
27756
|
try {
|
|
27885
27757
|
new CSSStyleSheet();
|
|
27886
27758
|
return true;
|
|
27887
27759
|
} catch (e) {}
|
|
27888
|
-
|
|
27889
27760
|
return false;
|
|
27890
27761
|
}();
|
|
27891
|
-
|
|
27892
27762
|
var addHostEventListeners = function addHostEventListeners(elm, hostRef, listeners, attachParentListeners) {
|
|
27893
27763
|
if (listeners) {
|
|
27894
27764
|
listeners.map(function (_a) {
|
|
27895
27765
|
var flags = _a[0],
|
|
27896
|
-
|
|
27897
|
-
|
|
27766
|
+
name = _a[1],
|
|
27767
|
+
method = _a[2];
|
|
27898
27768
|
var target = elm;
|
|
27899
27769
|
var handler = hostListenerProxy(hostRef, method);
|
|
27900
27770
|
var opts = hostListenerOpts(flags);
|
|
@@ -27905,13 +27775,10 @@ var addHostEventListeners = function addHostEventListeners(elm, hostRef, listene
|
|
|
27905
27775
|
});
|
|
27906
27776
|
}
|
|
27907
27777
|
};
|
|
27908
|
-
|
|
27909
27778
|
var hostListenerProxy = function hostListenerProxy(hostRef, methodName) {
|
|
27910
27779
|
return function (ev) {
|
|
27911
27780
|
{
|
|
27912
|
-
if (hostRef.$flags$ & 256
|
|
27913
|
-
/* isListenReady */
|
|
27914
|
-
) {
|
|
27781
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
27915
27782
|
// instance is ready, let's call it's member method for this event
|
|
27916
27783
|
hostRef.$lazyInstance$[methodName](ev);
|
|
27917
27784
|
} else {
|
|
@@ -27919,30 +27786,23 @@ var hostListenerProxy = function hostListenerProxy(hostRef, methodName) {
|
|
|
27919
27786
|
}
|
|
27920
27787
|
}
|
|
27921
27788
|
};
|
|
27922
|
-
};
|
|
27923
|
-
|
|
27924
|
-
|
|
27789
|
+
};
|
|
27790
|
+
// prettier-ignore
|
|
27925
27791
|
var hostListenerOpts = function hostListenerOpts(flags) {
|
|
27926
|
-
return (flags & 2
|
|
27927
|
-
/* Capture */
|
|
27928
|
-
) !== 0;
|
|
27792
|
+
return (flags & 2 /* Capture */) !== 0;
|
|
27929
27793
|
};
|
|
27930
|
-
|
|
27931
27794
|
var HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
27932
27795
|
var XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
27933
|
-
|
|
27934
27796
|
var createTime = function createTime(fnName, tagName) {
|
|
27935
27797
|
if (tagName === void 0) {
|
|
27936
27798
|
tagName = '';
|
|
27937
27799
|
}
|
|
27938
|
-
|
|
27939
27800
|
{
|
|
27940
27801
|
return function () {
|
|
27941
27802
|
return;
|
|
27942
27803
|
};
|
|
27943
27804
|
}
|
|
27944
27805
|
};
|
|
27945
|
-
|
|
27946
27806
|
var uniqueTime = function uniqueTime(key, measureText) {
|
|
27947
27807
|
{
|
|
27948
27808
|
return function () {
|
|
@@ -27950,64 +27810,49 @@ var uniqueTime = function uniqueTime(key, measureText) {
|
|
|
27950
27810
|
};
|
|
27951
27811
|
}
|
|
27952
27812
|
};
|
|
27953
|
-
|
|
27954
27813
|
var rootAppliedStyles = new WeakMap();
|
|
27955
|
-
|
|
27956
27814
|
var registerStyle = function registerStyle(scopeId, cssText, allowCS) {
|
|
27957
27815
|
var style = styles.get(scopeId);
|
|
27958
|
-
|
|
27959
27816
|
if (supportsConstructibleStylesheets && allowCS) {
|
|
27960
27817
|
style = style || new CSSStyleSheet();
|
|
27961
27818
|
style.replace(cssText);
|
|
27962
27819
|
} else {
|
|
27963
27820
|
style = cssText;
|
|
27964
27821
|
}
|
|
27965
|
-
|
|
27966
27822
|
styles.set(scopeId, style);
|
|
27967
27823
|
};
|
|
27968
|
-
|
|
27969
27824
|
var addStyle = function addStyle(styleContainerNode, cmpMeta, mode, hostElm) {
|
|
27970
27825
|
var scopeId = getScopeId(cmpMeta);
|
|
27971
|
-
var style = styles.get(scopeId);
|
|
27826
|
+
var style = styles.get(scopeId);
|
|
27827
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
27972
27828
|
// so the fallback is to always use the document for the root node in those cases
|
|
27973
|
-
|
|
27974
|
-
styleContainerNode = styleContainerNode.nodeType === 11
|
|
27975
|
-
/* DocumentFragment */
|
|
27976
|
-
? styleContainerNode : doc;
|
|
27977
|
-
|
|
27829
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
27978
27830
|
if (style) {
|
|
27979
27831
|
if (typeof style === 'string') {
|
|
27980
27832
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
27981
27833
|
var appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
27982
27834
|
var styleElm = void 0;
|
|
27983
|
-
|
|
27984
27835
|
if (!appliedStyles) {
|
|
27985
27836
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = new Set());
|
|
27986
27837
|
}
|
|
27987
|
-
|
|
27988
27838
|
if (!appliedStyles.has(scopeId)) {
|
|
27989
27839
|
{
|
|
27990
27840
|
if (plt.$cssShim$) {
|
|
27991
|
-
styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10
|
|
27992
|
-
/* needsScopedEncapsulation */
|
|
27993
|
-
));
|
|
27841
|
+
styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */));
|
|
27994
27842
|
var newScopeId = styleElm['s-sc'];
|
|
27995
|
-
|
|
27996
27843
|
if (newScopeId) {
|
|
27997
|
-
scopeId = newScopeId;
|
|
27844
|
+
scopeId = newScopeId;
|
|
27845
|
+
// we don't want to add this styleID to the appliedStyles Set
|
|
27998
27846
|
// since the cssVarShim might need to apply several different
|
|
27999
27847
|
// stylesheets for the same component
|
|
28000
|
-
|
|
28001
27848
|
appliedStyles = null;
|
|
28002
27849
|
}
|
|
28003
27850
|
} else {
|
|
28004
27851
|
styleElm = doc.createElement('style');
|
|
28005
27852
|
styleElm.innerHTML = style;
|
|
28006
27853
|
}
|
|
28007
|
-
|
|
28008
27854
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
28009
27855
|
}
|
|
28010
|
-
|
|
28011
27856
|
if (appliedStyles) {
|
|
28012
27857
|
appliedStyles.add(scopeId);
|
|
28013
27858
|
}
|
|
@@ -28016,20 +27861,15 @@ var addStyle = function addStyle(styleContainerNode, cmpMeta, mode, hostElm) {
|
|
|
28016
27861
|
styleContainerNode.adoptedStyleSheets = __spreadArrays(styleContainerNode.adoptedStyleSheets, [style]);
|
|
28017
27862
|
}
|
|
28018
27863
|
}
|
|
28019
|
-
|
|
28020
27864
|
return scopeId;
|
|
28021
27865
|
};
|
|
28022
|
-
|
|
28023
27866
|
var attachStyles = function attachStyles(hostRef) {
|
|
28024
27867
|
var cmpMeta = hostRef.$cmpMeta$;
|
|
28025
27868
|
var elm = hostRef.$hostElement$;
|
|
28026
27869
|
var flags = cmpMeta.$flags$;
|
|
28027
27870
|
var endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
28028
27871
|
var scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);
|
|
28029
|
-
|
|
28030
|
-
if (flags & 10
|
|
28031
|
-
/* needsScopedEncapsulation */
|
|
28032
|
-
) {
|
|
27872
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
28033
27873
|
// only required when we're NOT using native shadow dom (slot)
|
|
28034
27874
|
// or this browser doesn't support native shadow dom
|
|
28035
27875
|
// and this host element was NOT created with SSR
|
|
@@ -28039,42 +27879,31 @@ var attachStyles = function attachStyles(hostRef) {
|
|
|
28039
27879
|
// DOM WRITE!!
|
|
28040
27880
|
elm['s-sc'] = scopeId;
|
|
28041
27881
|
elm.classList.add(scopeId + '-h');
|
|
28042
|
-
|
|
28043
|
-
if (flags & 2
|
|
28044
|
-
/* scopedCssEncapsulation */
|
|
28045
|
-
) {
|
|
27882
|
+
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
28046
27883
|
elm.classList.add(scopeId + '-s');
|
|
28047
27884
|
}
|
|
28048
27885
|
}
|
|
28049
|
-
|
|
28050
27886
|
endAttachStyles();
|
|
28051
27887
|
};
|
|
28052
|
-
|
|
28053
27888
|
var getScopeId = function getScopeId(cmp, mode) {
|
|
28054
27889
|
return 'sc-' + cmp.$tagName$;
|
|
28055
27890
|
};
|
|
28056
27891
|
/**
|
|
28057
27892
|
* Default style mode id
|
|
28058
27893
|
*/
|
|
28059
|
-
|
|
28060
27894
|
/**
|
|
28061
27895
|
* Reusable empty obj/array
|
|
28062
27896
|
* Don't add values to these!!
|
|
28063
27897
|
*/
|
|
28064
|
-
|
|
28065
|
-
|
|
28066
27898
|
var EMPTY_OBJ = {};
|
|
28067
27899
|
/**
|
|
28068
27900
|
* Namespaces
|
|
28069
27901
|
*/
|
|
28070
|
-
|
|
28071
27902
|
var SVG_NS = 'http://www.w3.org/2000/svg';
|
|
28072
27903
|
var HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
28073
|
-
|
|
28074
27904
|
var isDef = function isDef(v) {
|
|
28075
27905
|
return v != null;
|
|
28076
27906
|
};
|
|
28077
|
-
|
|
28078
27907
|
var isComplexType = function isComplexType(o) {
|
|
28079
27908
|
// https://jsperf.com/typeof-fn-object/5
|
|
28080
27909
|
o = _typeof(o);
|
|
@@ -28091,33 +27920,26 @@ var isComplexType = function isComplexType(o) {
|
|
|
28091
27920
|
// const stack: any[] = [];
|
|
28092
27921
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
28093
27922
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
28094
|
-
|
|
28095
|
-
|
|
28096
27923
|
var h = function h(nodeName, vnodeData) {
|
|
28097
27924
|
var children = [];
|
|
28098
|
-
|
|
28099
27925
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
28100
27926
|
children[_i - 2] = arguments[_i];
|
|
28101
27927
|
}
|
|
28102
|
-
|
|
28103
27928
|
var child = null;
|
|
28104
27929
|
var key = null;
|
|
28105
27930
|
var slotName = null;
|
|
28106
27931
|
var simple = false;
|
|
28107
27932
|
var lastSimple = false;
|
|
28108
27933
|
var vNodeChildren = [];
|
|
28109
|
-
|
|
28110
27934
|
var walk = function walk(c) {
|
|
28111
27935
|
for (var i = 0; i < c.length; i++) {
|
|
28112
27936
|
child = c[i];
|
|
28113
|
-
|
|
28114
27937
|
if (Array.isArray(child)) {
|
|
28115
27938
|
walk(child);
|
|
28116
27939
|
} else if (child != null && typeof child !== 'boolean') {
|
|
28117
27940
|
if (simple = typeof nodeName !== 'function' && !isComplexType(child)) {
|
|
28118
27941
|
child = String(child);
|
|
28119
27942
|
}
|
|
28120
|
-
|
|
28121
27943
|
if (simple && lastSimple) {
|
|
28122
27944
|
// If the previous child was simple (string), we merge both
|
|
28123
27945
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -28125,27 +27947,21 @@ var h = function h(nodeName, vnodeData) {
|
|
|
28125
27947
|
// Append a new vNode, if it's text, we create a text vNode
|
|
28126
27948
|
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
28127
27949
|
}
|
|
28128
|
-
|
|
28129
27950
|
lastSimple = simple;
|
|
28130
27951
|
}
|
|
28131
27952
|
}
|
|
28132
27953
|
};
|
|
28133
|
-
|
|
28134
27954
|
walk(children);
|
|
28135
|
-
|
|
28136
27955
|
if (vnodeData) {
|
|
28137
27956
|
// normalize class / classname attributes
|
|
28138
27957
|
if (vnodeData.key) {
|
|
28139
27958
|
key = vnodeData.key;
|
|
28140
27959
|
}
|
|
28141
|
-
|
|
28142
27960
|
if (vnodeData.name) {
|
|
28143
27961
|
slotName = vnodeData.name;
|
|
28144
27962
|
}
|
|
28145
|
-
|
|
28146
27963
|
{
|
|
28147
27964
|
var classData_1 = vnodeData.className || vnodeData["class"];
|
|
28148
|
-
|
|
28149
27965
|
if (classData_1) {
|
|
28150
27966
|
vnodeData["class"] = _typeof(classData_1) !== 'object' ? classData_1 : Object.keys(classData_1).filter(function (k) {
|
|
28151
27967
|
return classData_1[k];
|
|
@@ -28153,14 +27969,11 @@ var h = function h(nodeName, vnodeData) {
|
|
|
28153
27969
|
}
|
|
28154
27970
|
}
|
|
28155
27971
|
}
|
|
28156
|
-
|
|
28157
27972
|
var vnode = newVNode(nodeName, null);
|
|
28158
27973
|
vnode.$attrs$ = vnodeData;
|
|
28159
|
-
|
|
28160
27974
|
if (vNodeChildren.length > 0) {
|
|
28161
27975
|
vnode.$children$ = vNodeChildren;
|
|
28162
27976
|
}
|
|
28163
|
-
|
|
28164
27977
|
{
|
|
28165
27978
|
vnode.$key$ = key;
|
|
28166
27979
|
}
|
|
@@ -28169,7 +27982,6 @@ var h = function h(nodeName, vnodeData) {
|
|
|
28169
27982
|
}
|
|
28170
27983
|
return vnode;
|
|
28171
27984
|
};
|
|
28172
|
-
|
|
28173
27985
|
var newVNode = function newVNode(tag, text) {
|
|
28174
27986
|
var vnode = {
|
|
28175
27987
|
$flags$: 0,
|
|
@@ -28189,9 +28001,7 @@ var newVNode = function newVNode(tag, text) {
|
|
|
28189
28001
|
}
|
|
28190
28002
|
return vnode;
|
|
28191
28003
|
};
|
|
28192
|
-
|
|
28193
28004
|
var Host = {};
|
|
28194
|
-
|
|
28195
28005
|
var isHost = function isHost(node) {
|
|
28196
28006
|
return node && node.$tag$ === Host;
|
|
28197
28007
|
};
|
|
@@ -28203,13 +28013,10 @@ var isHost = function isHost(node) {
|
|
|
28203
28013
|
*
|
|
28204
28014
|
* Modified for Stencil's compiler and vdom
|
|
28205
28015
|
*/
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
28016
|
var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSvg, flags) {
|
|
28209
28017
|
if (oldValue !== newValue) {
|
|
28210
28018
|
var isProp = isMemberInElement(elm, memberName);
|
|
28211
28019
|
var ln = memberName.toLowerCase();
|
|
28212
|
-
|
|
28213
28020
|
if (memberName === 'class') {
|
|
28214
28021
|
var classList = elm.classList;
|
|
28215
28022
|
var oldClasses_1 = parseClassList(oldValue);
|
|
@@ -28233,7 +28040,6 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28233
28040
|
}
|
|
28234
28041
|
}
|
|
28235
28042
|
}
|
|
28236
|
-
|
|
28237
28043
|
for (var prop in newValue) {
|
|
28238
28044
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
28239
28045
|
if (prop.includes('-')) {
|
|
@@ -28276,25 +28082,23 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28276
28082
|
// except for the first character, we keep the event name case
|
|
28277
28083
|
memberName = ln[2] + memberName.slice(3);
|
|
28278
28084
|
}
|
|
28279
|
-
|
|
28280
28085
|
if (oldValue) {
|
|
28281
28086
|
plt.rel(elm, memberName, oldValue, false);
|
|
28282
28087
|
}
|
|
28283
|
-
|
|
28284
28088
|
if (newValue) {
|
|
28285
28089
|
plt.ael(elm, memberName, newValue, false);
|
|
28286
28090
|
}
|
|
28287
28091
|
} else {
|
|
28288
28092
|
// Set property if it exists and it's not a SVG
|
|
28289
28093
|
var isComplex = isComplexType(newValue);
|
|
28290
|
-
|
|
28291
28094
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
28292
28095
|
try {
|
|
28293
28096
|
if (!elm.tagName.includes('-')) {
|
|
28294
|
-
var n = newValue == null ? '' : newValue;
|
|
28295
|
-
|
|
28097
|
+
var n = newValue == null ? '' : newValue;
|
|
28098
|
+
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
28296
28099
|
if (memberName === 'list') {
|
|
28297
|
-
isProp = false;
|
|
28100
|
+
isProp = false;
|
|
28101
|
+
// tslint:disable-next-line: triple-equals
|
|
28298
28102
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
28299
28103
|
elm[memberName] = n;
|
|
28300
28104
|
}
|
|
@@ -28310,8 +28114,6 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28310
28114
|
* - if it's a SVG, since properties might not work in <svg>
|
|
28311
28115
|
* - if the newValue is null/undefined or 'false'.
|
|
28312
28116
|
*/
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
28117
|
var xlink = false;
|
|
28316
28118
|
{
|
|
28317
28119
|
if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
|
|
@@ -28319,7 +28121,6 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28319
28121
|
xlink = true;
|
|
28320
28122
|
}
|
|
28321
28123
|
}
|
|
28322
|
-
|
|
28323
28124
|
if (newValue == null || newValue === false) {
|
|
28324
28125
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
28325
28126
|
if (xlink) {
|
|
@@ -28328,11 +28129,8 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28328
28129
|
elm.removeAttribute(memberName);
|
|
28329
28130
|
}
|
|
28330
28131
|
}
|
|
28331
|
-
} else if ((!isProp || flags & 4
|
|
28332
|
-
/* isHost */
|
|
28333
|
-
|| isSvg) && !isComplex) {
|
|
28132
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
28334
28133
|
newValue = newValue === true ? '' : newValue;
|
|
28335
|
-
|
|
28336
28134
|
if (xlink) {
|
|
28337
28135
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
28338
28136
|
} else {
|
|
@@ -28342,20 +28140,15 @@ var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSv
|
|
|
28342
28140
|
}
|
|
28343
28141
|
}
|
|
28344
28142
|
};
|
|
28345
|
-
|
|
28346
28143
|
var parseClassListRegex = /\s/;
|
|
28347
|
-
|
|
28348
28144
|
var parseClassList = function parseClassList(value) {
|
|
28349
28145
|
return !value ? [] : value.split(parseClassListRegex);
|
|
28350
28146
|
};
|
|
28351
|
-
|
|
28352
28147
|
var updateElement = function updateElement(oldVnode, newVnode, isSvgMode, memberName) {
|
|
28353
28148
|
// if the element passed in is a shadow root, which is a document fragment
|
|
28354
28149
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
28355
28150
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
28356
|
-
var elm = newVnode.$elm$.nodeType === 11
|
|
28357
|
-
/* DocumentFragment */
|
|
28358
|
-
&& newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
28151
|
+
var elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
28359
28152
|
var oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
28360
28153
|
var newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
28361
28154
|
{
|
|
@@ -28365,13 +28158,12 @@ var updateElement = function updateElement(oldVnode, newVnode, isSvgMode, member
|
|
|
28365
28158
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
|
|
28366
28159
|
}
|
|
28367
28160
|
}
|
|
28368
|
-
}
|
|
28369
|
-
|
|
28161
|
+
}
|
|
28162
|
+
// add new & update changed attributes
|
|
28370
28163
|
for (memberName in newVnodeAttrs) {
|
|
28371
28164
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
28372
28165
|
}
|
|
28373
28166
|
};
|
|
28374
|
-
|
|
28375
28167
|
var createElm = function createElm(oldParentVNode, newParentVNode, childIndex, parentElm) {
|
|
28376
28168
|
// tslint:disable-next-line: prefer-const
|
|
28377
28169
|
var newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -28379,72 +28171,57 @@ var createElm = function createElm(oldParentVNode, newParentVNode, childIndex, p
|
|
|
28379
28171
|
var elm;
|
|
28380
28172
|
var childNode;
|
|
28381
28173
|
var oldVNode;
|
|
28382
|
-
|
|
28383
28174
|
if (!useNativeShadowDom) {
|
|
28384
28175
|
// remember for later we need to check to relocate nodes
|
|
28385
28176
|
checkSlotRelocate = true;
|
|
28386
|
-
|
|
28387
28177
|
if (newVNode.$tag$ === 'slot') {
|
|
28388
28178
|
if (scopeId) {
|
|
28389
28179
|
// scoped css needs to add its scoped id to the parent element
|
|
28390
28180
|
parentElm.classList.add(scopeId + '-s');
|
|
28391
28181
|
}
|
|
28392
|
-
|
|
28393
|
-
|
|
28394
|
-
2
|
|
28395
|
-
|
|
28396
|
-
|
|
28397
|
-
1
|
|
28398
|
-
/* isSlotReference */
|
|
28399
|
-
;
|
|
28182
|
+
newVNode.$flags$ |= newVNode.$children$ ?
|
|
28183
|
+
// slot element has fallback content
|
|
28184
|
+
2 /* isSlotFallback */ :
|
|
28185
|
+
// slot element does not have fallback content
|
|
28186
|
+
1 /* isSlotReference */;
|
|
28400
28187
|
}
|
|
28401
28188
|
}
|
|
28402
28189
|
|
|
28403
28190
|
if (newVNode.$text$ !== null) {
|
|
28404
28191
|
// create text node
|
|
28405
28192
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
28406
|
-
} else if (newVNode.$flags$ & 1
|
|
28407
|
-
/* isSlotReference */
|
|
28408
|
-
) {
|
|
28193
|
+
} else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
28409
28194
|
// create a slot reference node
|
|
28410
28195
|
elm = newVNode.$elm$ = doc.createTextNode('');
|
|
28411
28196
|
} else {
|
|
28412
28197
|
if (!isSvgMode) {
|
|
28413
28198
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
28414
|
-
}
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2
|
|
28418
|
-
/* isSlotFallback */
|
|
28419
|
-
? 'slot-fb' : newVNode.$tag$);
|
|
28420
|
-
|
|
28199
|
+
}
|
|
28200
|
+
// create element
|
|
28201
|
+
elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$);
|
|
28421
28202
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
28422
28203
|
isSvgMode = false;
|
|
28423
|
-
}
|
|
28424
|
-
|
|
28425
|
-
|
|
28204
|
+
}
|
|
28205
|
+
// add css classes, attrs, props, listeners, etc.
|
|
28426
28206
|
{
|
|
28427
28207
|
updateElement(null, newVNode, isSvgMode);
|
|
28428
28208
|
}
|
|
28429
|
-
|
|
28430
28209
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
28431
28210
|
// if there is a scopeId and this is the initial render
|
|
28432
28211
|
// then let's add the scopeId as a css class
|
|
28433
28212
|
elm.classList.add(elm['s-si'] = scopeId);
|
|
28434
28213
|
}
|
|
28435
|
-
|
|
28436
28214
|
if (newVNode.$children$) {
|
|
28437
28215
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
28438
28216
|
// create the node
|
|
28439
|
-
childNode = createElm(oldParentVNode, newVNode, i, elm);
|
|
28440
|
-
|
|
28217
|
+
childNode = createElm(oldParentVNode, newVNode, i, elm);
|
|
28218
|
+
// return node could have been null
|
|
28441
28219
|
if (childNode) {
|
|
28442
28220
|
// append our new node
|
|
28443
28221
|
elm.appendChild(childNode);
|
|
28444
28222
|
}
|
|
28445
28223
|
}
|
|
28446
28224
|
}
|
|
28447
|
-
|
|
28448
28225
|
{
|
|
28449
28226
|
if (newVNode.$tag$ === 'svg') {
|
|
28450
28227
|
// Only reset the SVG context when we're exiting <svg> element
|
|
@@ -28455,24 +28232,17 @@ var createElm = function createElm(oldParentVNode, newParentVNode, childIndex, p
|
|
|
28455
28232
|
}
|
|
28456
28233
|
}
|
|
28457
28234
|
}
|
|
28458
|
-
|
|
28459
28235
|
{
|
|
28460
28236
|
elm['s-hn'] = hostTagName;
|
|
28461
|
-
|
|
28462
|
-
if (newVNode.$flags$ & (2
|
|
28463
|
-
/* isSlotFallback */
|
|
28464
|
-
| 1
|
|
28465
|
-
/* isSlotReference */
|
|
28466
|
-
)) {
|
|
28237
|
+
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
28467
28238
|
// remember the content reference comment
|
|
28468
|
-
elm['s-sr'] = true;
|
|
28469
|
-
|
|
28470
|
-
elm['s-cr'] = contentRef;
|
|
28471
|
-
|
|
28472
|
-
elm['s-sn'] = newVNode.$name$ || '';
|
|
28473
|
-
|
|
28239
|
+
elm['s-sr'] = true;
|
|
28240
|
+
// remember the content reference comment
|
|
28241
|
+
elm['s-cr'] = contentRef;
|
|
28242
|
+
// remember the slot name, or empty string for default slot
|
|
28243
|
+
elm['s-sn'] = newVNode.$name$ || '';
|
|
28244
|
+
// check if we've got an old vnode for this slot
|
|
28474
28245
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
28475
|
-
|
|
28476
28246
|
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
28477
28247
|
// we've got an old slot vnode and the wrapper is being replaced
|
|
28478
28248
|
// so let's move the old slot content back to it's original location
|
|
@@ -28482,52 +28252,40 @@ var createElm = function createElm(oldParentVNode, newParentVNode, childIndex, p
|
|
|
28482
28252
|
}
|
|
28483
28253
|
return elm;
|
|
28484
28254
|
};
|
|
28485
|
-
|
|
28486
28255
|
var putBackInOriginalLocation = function putBackInOriginalLocation(parentElm, recursive) {
|
|
28487
|
-
plt.$flags$ |= 1
|
|
28488
|
-
/* isTmpDisconnected */
|
|
28489
|
-
;
|
|
28256
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
28490
28257
|
var oldSlotChildNodes = parentElm.childNodes;
|
|
28491
|
-
|
|
28492
28258
|
for (var i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
28493
28259
|
var childNode = oldSlotChildNodes[i];
|
|
28494
|
-
|
|
28495
28260
|
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
28496
28261
|
// // this child node in the old element is from another component
|
|
28497
28262
|
// // remove this node from the old slot's parent
|
|
28498
28263
|
// childNode.remove();
|
|
28499
28264
|
// and relocate it back to it's original location
|
|
28500
|
-
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
28265
|
+
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
28266
|
+
// remove the old original location comment entirely
|
|
28501
28267
|
// later on the patch function will know what to do
|
|
28502
28268
|
// and move this to the correct spot in need be
|
|
28503
|
-
|
|
28504
28269
|
childNode['s-ol'].remove();
|
|
28505
28270
|
childNode['s-ol'] = undefined;
|
|
28506
28271
|
checkSlotRelocate = true;
|
|
28507
28272
|
}
|
|
28508
|
-
|
|
28509
28273
|
if (recursive) {
|
|
28510
28274
|
putBackInOriginalLocation(childNode, recursive);
|
|
28511
28275
|
}
|
|
28512
28276
|
}
|
|
28513
|
-
|
|
28514
|
-
plt.$flags$ &= ~1
|
|
28515
|
-
/* isTmpDisconnected */
|
|
28516
|
-
;
|
|
28277
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
28517
28278
|
};
|
|
28518
28279
|
|
|
28519
28280
|
var addVnodes = function addVnodes(parentElm, before, parentVNode, vnodes, startIdx, endIdx) {
|
|
28520
28281
|
var containerElm = parentElm['s-cr'] && parentElm['s-cr'].parentNode || parentElm;
|
|
28521
28282
|
var childNode;
|
|
28522
|
-
|
|
28523
28283
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
28524
28284
|
containerElm = containerElm.shadowRoot;
|
|
28525
28285
|
}
|
|
28526
|
-
|
|
28527
28286
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
28528
28287
|
if (vnodes[startIdx]) {
|
|
28529
28288
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
28530
|
-
|
|
28531
28289
|
if (childNode) {
|
|
28532
28290
|
vnodes[startIdx].$elm$ = childNode;
|
|
28533
28291
|
containerElm.insertBefore(childNode, referenceNode(before));
|
|
@@ -28535,7 +28293,6 @@ var addVnodes = function addVnodes(parentElm, before, parentVNode, vnodes, start
|
|
|
28535
28293
|
}
|
|
28536
28294
|
}
|
|
28537
28295
|
};
|
|
28538
|
-
|
|
28539
28296
|
var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx, vnode, elm) {
|
|
28540
28297
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
28541
28298
|
if (vnode = vnodes[startIdx]) {
|
|
@@ -28545,7 +28302,6 @@ var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx, vnode, elm) {
|
|
|
28545
28302
|
// we're removing this element
|
|
28546
28303
|
// so it's possible we need to show slot fallback content now
|
|
28547
28304
|
checkSlotFallbackVisibility = true;
|
|
28548
|
-
|
|
28549
28305
|
if (elm['s-ol']) {
|
|
28550
28306
|
// remove the original location comment
|
|
28551
28307
|
elm['s-ol'].remove();
|
|
@@ -28554,13 +28310,12 @@ var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx, vnode, elm) {
|
|
|
28554
28310
|
// that's being removed are slot nodes
|
|
28555
28311
|
putBackInOriginalLocation(elm, true);
|
|
28556
28312
|
}
|
|
28557
|
-
}
|
|
28558
|
-
|
|
28313
|
+
}
|
|
28314
|
+
// remove the vnode's element from the dom
|
|
28559
28315
|
elm.remove();
|
|
28560
28316
|
}
|
|
28561
28317
|
}
|
|
28562
28318
|
};
|
|
28563
|
-
|
|
28564
28319
|
var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh) {
|
|
28565
28320
|
var oldStartIdx = 0;
|
|
28566
28321
|
var newStartIdx = 0;
|
|
@@ -28574,7 +28329,6 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28574
28329
|
var newEndVnode = newCh[newEndIdx];
|
|
28575
28330
|
var node;
|
|
28576
28331
|
var elmToMove;
|
|
28577
|
-
|
|
28578
28332
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
28579
28333
|
if (oldStartVnode == null) {
|
|
28580
28334
|
// Vnode might have been moved left
|
|
@@ -28598,7 +28352,6 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28598
28352
|
if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {
|
|
28599
28353
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
28600
28354
|
}
|
|
28601
|
-
|
|
28602
28355
|
patch(oldStartVnode, newEndVnode);
|
|
28603
28356
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
28604
28357
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
@@ -28608,7 +28361,6 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28608
28361
|
if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {
|
|
28609
28362
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
28610
28363
|
}
|
|
28611
|
-
|
|
28612
28364
|
patch(oldEndVnode, newStartVnode);
|
|
28613
28365
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
28614
28366
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
@@ -28624,10 +28376,8 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28624
28376
|
}
|
|
28625
28377
|
}
|
|
28626
28378
|
}
|
|
28627
|
-
|
|
28628
28379
|
if (idxInOld >= 0) {
|
|
28629
28380
|
elmToMove = oldCh[idxInOld];
|
|
28630
|
-
|
|
28631
28381
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
28632
28382
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
28633
28383
|
} else {
|
|
@@ -28635,14 +28385,12 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28635
28385
|
oldCh[idxInOld] = undefined;
|
|
28636
28386
|
node = elmToMove.$elm$;
|
|
28637
28387
|
}
|
|
28638
|
-
|
|
28639
28388
|
newStartVnode = newCh[++newStartIdx];
|
|
28640
28389
|
} else {
|
|
28641
28390
|
// new element
|
|
28642
28391
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
28643
28392
|
newStartVnode = newCh[++newStartIdx];
|
|
28644
28393
|
}
|
|
28645
|
-
|
|
28646
28394
|
if (node) {
|
|
28647
28395
|
{
|
|
28648
28396
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
@@ -28650,14 +28398,12 @@ var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh)
|
|
|
28650
28398
|
}
|
|
28651
28399
|
}
|
|
28652
28400
|
}
|
|
28653
|
-
|
|
28654
28401
|
if (oldStartIdx > oldEndIdx) {
|
|
28655
28402
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
28656
28403
|
} else if (newStartIdx > newEndIdx) {
|
|
28657
28404
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
28658
28405
|
}
|
|
28659
28406
|
};
|
|
28660
|
-
|
|
28661
28407
|
var isSameVnode = function isSameVnode(vnode1, vnode2) {
|
|
28662
28408
|
// compare if two vnode to see if they're "technically" the same
|
|
28663
28409
|
// need to have the same element tag, and same key to be the same
|
|
@@ -28665,15 +28411,12 @@ var isSameVnode = function isSameVnode(vnode1, vnode2) {
|
|
|
28665
28411
|
if (vnode1.$tag$ === 'slot') {
|
|
28666
28412
|
return vnode1.$name$ === vnode2.$name$;
|
|
28667
28413
|
}
|
|
28668
|
-
|
|
28669
28414
|
{
|
|
28670
28415
|
return vnode1.$key$ === vnode2.$key$;
|
|
28671
28416
|
}
|
|
28672
28417
|
}
|
|
28673
|
-
|
|
28674
28418
|
return false;
|
|
28675
28419
|
};
|
|
28676
|
-
|
|
28677
28420
|
var referenceNode = function referenceNode(node) {
|
|
28678
28421
|
// this node was relocated to a new location in the dom
|
|
28679
28422
|
// because of some other component's slot
|
|
@@ -28681,11 +28424,9 @@ var referenceNode = function referenceNode(node) {
|
|
|
28681
28424
|
// it's original location was according to it's original vdom
|
|
28682
28425
|
return node && node['s-ol'] || node;
|
|
28683
28426
|
};
|
|
28684
|
-
|
|
28685
28427
|
var parentReferenceNode = function parentReferenceNode(node) {
|
|
28686
28428
|
return (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
28687
28429
|
};
|
|
28688
|
-
|
|
28689
28430
|
var patch = function patch(oldVNode, newVNode) {
|
|
28690
28431
|
var elm = newVNode.$elm$ = oldVNode.$elm$;
|
|
28691
28432
|
var oldChildren = oldVNode.$children$;
|
|
@@ -28693,14 +28434,13 @@ var patch = function patch(oldVNode, newVNode) {
|
|
|
28693
28434
|
var tag = newVNode.$tag$;
|
|
28694
28435
|
var text = newVNode.$text$;
|
|
28695
28436
|
var defaultHolder;
|
|
28696
|
-
|
|
28697
28437
|
if (text === null) {
|
|
28698
28438
|
{
|
|
28699
28439
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
28700
28440
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
28701
28441
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
28702
|
-
}
|
|
28703
|
-
|
|
28442
|
+
}
|
|
28443
|
+
// element node
|
|
28704
28444
|
{
|
|
28705
28445
|
if (tag === 'slot') ;else {
|
|
28706
28446
|
// either this is the first render of an element OR it's an update
|
|
@@ -28709,7 +28449,6 @@ var patch = function patch(oldVNode, newVNode) {
|
|
|
28709
28449
|
updateElement(oldVNode, newVNode, isSvgMode);
|
|
28710
28450
|
}
|
|
28711
28451
|
}
|
|
28712
|
-
|
|
28713
28452
|
if (oldChildren !== null && newChildren !== null) {
|
|
28714
28453
|
// looks like there's child vnodes for both the old and new vnodes
|
|
28715
28454
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
@@ -28718,15 +28457,13 @@ var patch = function patch(oldVNode, newVNode) {
|
|
|
28718
28457
|
if (oldVNode.$text$ !== null) {
|
|
28719
28458
|
// the old vnode was text, so be sure to clear it out
|
|
28720
28459
|
elm.textContent = '';
|
|
28721
|
-
}
|
|
28722
|
-
|
|
28723
|
-
|
|
28460
|
+
}
|
|
28461
|
+
// add the new vnode children
|
|
28724
28462
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
28725
28463
|
} else if (oldChildren !== null) {
|
|
28726
28464
|
// no new child vnodes, but there are old child vnodes to remove
|
|
28727
28465
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
28728
28466
|
}
|
|
28729
|
-
|
|
28730
28467
|
if (isSvgMode && tag === 'svg') {
|
|
28731
28468
|
isSvgMode = false;
|
|
28732
28469
|
}
|
|
@@ -28739,7 +28476,6 @@ var patch = function patch(oldVNode, newVNode) {
|
|
|
28739
28476
|
elm.data = text;
|
|
28740
28477
|
}
|
|
28741
28478
|
};
|
|
28742
|
-
|
|
28743
28479
|
var updateFallbackSlotVisibility = function updateFallbackSlotVisibility(elm) {
|
|
28744
28480
|
// tslint:disable-next-line: prefer-const
|
|
28745
28481
|
var childNodes = elm.childNodes;
|
|
@@ -28749,31 +28485,23 @@ var updateFallbackSlotVisibility = function updateFallbackSlotVisibility(elm) {
|
|
|
28749
28485
|
var j;
|
|
28750
28486
|
var slotNameAttr;
|
|
28751
28487
|
var nodeType;
|
|
28752
|
-
|
|
28753
28488
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
28754
28489
|
childNode = childNodes[i];
|
|
28755
|
-
|
|
28756
|
-
if (childNode.nodeType === 1
|
|
28757
|
-
/* ElementNode */
|
|
28758
|
-
) {
|
|
28490
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
28759
28491
|
if (childNode['s-sr']) {
|
|
28760
28492
|
// this is a slot fallback node
|
|
28761
28493
|
// get the slot name for this slot reference node
|
|
28762
|
-
slotNameAttr = childNode['s-sn'];
|
|
28494
|
+
slotNameAttr = childNode['s-sn'];
|
|
28495
|
+
// by default always show a fallback slot node
|
|
28763
28496
|
// then hide it if there are other slots in the light dom
|
|
28764
|
-
|
|
28765
28497
|
childNode.hidden = false;
|
|
28766
|
-
|
|
28767
28498
|
for (j = 0; j < ilen; j++) {
|
|
28768
28499
|
if (childNodes[j]['s-hn'] !== childNode['s-hn']) {
|
|
28769
28500
|
// this sibling node is from a different component
|
|
28770
28501
|
nodeType = childNodes[j].nodeType;
|
|
28771
|
-
|
|
28772
28502
|
if (slotNameAttr !== '') {
|
|
28773
28503
|
// this is a named fallback slot node
|
|
28774
|
-
if (nodeType === 1
|
|
28775
|
-
/* ElementNode */
|
|
28776
|
-
&& slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
28504
|
+
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
28777
28505
|
childNode.hidden = true;
|
|
28778
28506
|
break;
|
|
28779
28507
|
}
|
|
@@ -28781,27 +28509,20 @@ var updateFallbackSlotVisibility = function updateFallbackSlotVisibility(elm) {
|
|
|
28781
28509
|
// this is a default fallback slot node
|
|
28782
28510
|
// any element or text node (with content)
|
|
28783
28511
|
// should hide the default fallback slot node
|
|
28784
|
-
if (nodeType === 1
|
|
28785
|
-
/* ElementNode */
|
|
28786
|
-
|| nodeType === 3
|
|
28787
|
-
/* TextNode */
|
|
28788
|
-
&& childNodes[j].textContent.trim() !== '') {
|
|
28512
|
+
if (nodeType === 1 /* ElementNode */ || nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '') {
|
|
28789
28513
|
childNode.hidden = true;
|
|
28790
28514
|
break;
|
|
28791
28515
|
}
|
|
28792
28516
|
}
|
|
28793
28517
|
}
|
|
28794
28518
|
}
|
|
28795
|
-
}
|
|
28796
|
-
|
|
28797
|
-
|
|
28519
|
+
}
|
|
28520
|
+
// keep drilling down
|
|
28798
28521
|
updateFallbackSlotVisibility(childNode);
|
|
28799
28522
|
}
|
|
28800
28523
|
}
|
|
28801
28524
|
};
|
|
28802
|
-
|
|
28803
28525
|
var relocateNodes = [];
|
|
28804
|
-
|
|
28805
28526
|
var relocateSlotContent = function relocateSlotContent(elm) {
|
|
28806
28527
|
// tslint:disable-next-line: prefer-const
|
|
28807
28528
|
var childNode;
|
|
@@ -28813,19 +28534,15 @@ var relocateSlotContent = function relocateSlotContent(elm) {
|
|
|
28813
28534
|
var i = 0;
|
|
28814
28535
|
var childNodes = elm.childNodes;
|
|
28815
28536
|
var ilen = childNodes.length;
|
|
28816
|
-
|
|
28817
28537
|
for (; i < ilen; i++) {
|
|
28818
28538
|
childNode = childNodes[i];
|
|
28819
|
-
|
|
28820
28539
|
if (childNode['s-sr'] && (node = childNode['s-cr'])) {
|
|
28821
28540
|
// first got the content reference comment node
|
|
28822
28541
|
// then we got it's parent, which is where all the host content is in now
|
|
28823
28542
|
hostContentNodes = node.parentNode.childNodes;
|
|
28824
28543
|
slotNameAttr = childNode['s-sn'];
|
|
28825
|
-
|
|
28826
28544
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
28827
28545
|
node = hostContentNodes[j];
|
|
28828
|
-
|
|
28829
28546
|
if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
|
|
28830
28547
|
// let's do some relocating to its new home
|
|
28831
28548
|
// but never relocate a content reference node
|
|
@@ -28834,13 +28551,12 @@ var relocateSlotContent = function relocateSlotContent(elm) {
|
|
|
28834
28551
|
// it's possible we've already decided to relocate this node
|
|
28835
28552
|
relocateNodeData = relocateNodes.find(function (r) {
|
|
28836
28553
|
return r.$nodeToRelocate$ === node;
|
|
28837
|
-
});
|
|
28554
|
+
});
|
|
28555
|
+
// made some changes to slots
|
|
28838
28556
|
// let's make sure we also double check
|
|
28839
28557
|
// fallbacks are correctly hidden or shown
|
|
28840
|
-
|
|
28841
28558
|
checkSlotFallbackVisibility = true;
|
|
28842
28559
|
node['s-sn'] = node['s-sn'] || slotNameAttr;
|
|
28843
|
-
|
|
28844
28560
|
if (relocateNodeData) {
|
|
28845
28561
|
// previously we never found a slot home for this node
|
|
28846
28562
|
// but turns out we did, so let's remember it now
|
|
@@ -28852,14 +28568,12 @@ var relocateSlotContent = function relocateSlotContent(elm) {
|
|
|
28852
28568
|
$nodeToRelocate$: node
|
|
28853
28569
|
});
|
|
28854
28570
|
}
|
|
28855
|
-
|
|
28856
28571
|
if (node['s-sr']) {
|
|
28857
28572
|
relocateNodes.map(function (relocateNode) {
|
|
28858
28573
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
28859
28574
|
relocateNodeData = relocateNodes.find(function (r) {
|
|
28860
28575
|
return r.$nodeToRelocate$ === node;
|
|
28861
28576
|
});
|
|
28862
|
-
|
|
28863
28577
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
28864
28578
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
28865
28579
|
}
|
|
@@ -28878,44 +28592,32 @@ var relocateSlotContent = function relocateSlotContent(elm) {
|
|
|
28878
28592
|
}
|
|
28879
28593
|
}
|
|
28880
28594
|
}
|
|
28881
|
-
|
|
28882
|
-
if (childNode.nodeType === 1
|
|
28883
|
-
/* ElementNode */
|
|
28884
|
-
) {
|
|
28595
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
28885
28596
|
relocateSlotContent(childNode);
|
|
28886
28597
|
}
|
|
28887
28598
|
}
|
|
28888
28599
|
};
|
|
28889
|
-
|
|
28890
28600
|
var isNodeLocatedInSlot = function isNodeLocatedInSlot(nodeToRelocate, slotNameAttr) {
|
|
28891
|
-
if (nodeToRelocate.nodeType === 1
|
|
28892
|
-
/* ElementNode */
|
|
28893
|
-
) {
|
|
28601
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
28894
28602
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
28895
28603
|
return true;
|
|
28896
28604
|
}
|
|
28897
|
-
|
|
28898
28605
|
if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
|
|
28899
28606
|
return true;
|
|
28900
28607
|
}
|
|
28901
|
-
|
|
28902
28608
|
return false;
|
|
28903
28609
|
}
|
|
28904
|
-
|
|
28905
28610
|
if (nodeToRelocate['s-sn'] === slotNameAttr) {
|
|
28906
28611
|
return true;
|
|
28907
28612
|
}
|
|
28908
|
-
|
|
28909
28613
|
return slotNameAttr === '';
|
|
28910
28614
|
};
|
|
28911
|
-
|
|
28912
28615
|
var callNodeRefs = function callNodeRefs(vNode) {
|
|
28913
28616
|
{
|
|
28914
28617
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
28915
28618
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
28916
28619
|
}
|
|
28917
28620
|
};
|
|
28918
|
-
|
|
28919
28621
|
var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
28920
28622
|
var hostElm = hostRef.$hostElement$;
|
|
28921
28623
|
var cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -28923,9 +28625,7 @@ var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
|
28923
28625
|
var rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
28924
28626
|
hostTagName = hostElm.tagName;
|
|
28925
28627
|
rootVnode.$tag$ = null;
|
|
28926
|
-
rootVnode.$flags$ |= 4
|
|
28927
|
-
/* isHost */
|
|
28928
|
-
;
|
|
28628
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
28929
28629
|
hostRef.$vnode$ = rootVnode;
|
|
28930
28630
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;
|
|
28931
28631
|
{
|
|
@@ -28933,21 +28633,16 @@ var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
|
28933
28633
|
}
|
|
28934
28634
|
{
|
|
28935
28635
|
contentRef = hostElm['s-cr'];
|
|
28936
|
-
useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1
|
|
28937
|
-
|
|
28938
|
-
) !== 0; // always reset
|
|
28939
|
-
|
|
28636
|
+
useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
28637
|
+
// always reset
|
|
28940
28638
|
checkSlotFallbackVisibility = false;
|
|
28941
|
-
}
|
|
28942
|
-
|
|
28639
|
+
}
|
|
28640
|
+
// synchronous patch
|
|
28943
28641
|
patch(oldVNode, rootVnode);
|
|
28944
28642
|
{
|
|
28945
28643
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
28946
28644
|
// the disconnectCallback from working
|
|
28947
|
-
plt.$flags$ |= 1
|
|
28948
|
-
/* isTmpDisconnected */
|
|
28949
|
-
;
|
|
28950
|
-
|
|
28645
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
28951
28646
|
if (checkSlotRelocate) {
|
|
28952
28647
|
relocateSlotContent(rootVnode.$elm$);
|
|
28953
28648
|
var relocateData = void 0;
|
|
@@ -28957,11 +28652,9 @@ var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
|
28957
28652
|
var insertBeforeNode = void 0;
|
|
28958
28653
|
var refNode = void 0;
|
|
28959
28654
|
var i = 0;
|
|
28960
|
-
|
|
28961
28655
|
for (; i < relocateNodes.length; i++) {
|
|
28962
28656
|
relocateData = relocateNodes[i];
|
|
28963
28657
|
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
28964
|
-
|
|
28965
28658
|
if (!nodeToRelocate['s-ol']) {
|
|
28966
28659
|
// add a reference node marking this node's original location
|
|
28967
28660
|
// keep a reference to this node for later lookups
|
|
@@ -28970,31 +28663,25 @@ var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
|
28970
28663
|
nodeToRelocate.parentNode.insertBefore(nodeToRelocate['s-ol'] = orgLocationNode, nodeToRelocate);
|
|
28971
28664
|
}
|
|
28972
28665
|
}
|
|
28973
|
-
|
|
28974
28666
|
for (i = 0; i < relocateNodes.length; i++) {
|
|
28975
28667
|
relocateData = relocateNodes[i];
|
|
28976
28668
|
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
28977
|
-
|
|
28978
28669
|
if (relocateData.$slotRefNode$) {
|
|
28979
28670
|
// by default we're just going to insert it directly
|
|
28980
28671
|
// after the slot reference node
|
|
28981
28672
|
parentNodeRef = relocateData.$slotRefNode$.parentNode;
|
|
28982
28673
|
insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
|
|
28983
28674
|
orgLocationNode = nodeToRelocate['s-ol'];
|
|
28984
|
-
|
|
28985
28675
|
while (orgLocationNode = orgLocationNode.previousSibling) {
|
|
28986
28676
|
refNode = orgLocationNode['s-nr'];
|
|
28987
|
-
|
|
28988
28677
|
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
28989
28678
|
refNode = refNode.nextSibling;
|
|
28990
|
-
|
|
28991
28679
|
if (!refNode || !refNode['s-nr']) {
|
|
28992
28680
|
insertBeforeNode = refNode;
|
|
28993
28681
|
break;
|
|
28994
28682
|
}
|
|
28995
28683
|
}
|
|
28996
28684
|
}
|
|
28997
|
-
|
|
28998
28685
|
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
28999
28686
|
// we've checked that it's worth while to relocate
|
|
29000
28687
|
// since that the node to relocate
|
|
@@ -29003,67 +28690,50 @@ var renderVdom = function renderVdom(hostRef, renderFnResults) {
|
|
|
29003
28690
|
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
29004
28691
|
// probably a component in the index.html that doesn't have it's hostname set
|
|
29005
28692
|
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
29006
|
-
}
|
|
29007
|
-
|
|
29008
|
-
|
|
28693
|
+
}
|
|
28694
|
+
// add it back to the dom but in its new home
|
|
29009
28695
|
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
29010
28696
|
}
|
|
29011
28697
|
}
|
|
29012
28698
|
} else {
|
|
29013
28699
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
29014
|
-
if (nodeToRelocate.nodeType === 1
|
|
29015
|
-
/* ElementNode */
|
|
29016
|
-
) {
|
|
28700
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
29017
28701
|
nodeToRelocate.hidden = true;
|
|
29018
28702
|
}
|
|
29019
28703
|
}
|
|
29020
28704
|
}
|
|
29021
28705
|
}
|
|
29022
|
-
|
|
29023
28706
|
if (checkSlotFallbackVisibility) {
|
|
29024
28707
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
29025
|
-
}
|
|
28708
|
+
}
|
|
28709
|
+
// done moving nodes around
|
|
29026
28710
|
// allow the disconnect callback to work again
|
|
29027
|
-
|
|
29028
|
-
|
|
29029
|
-
plt.$flags$ &= ~1
|
|
29030
|
-
/* isTmpDisconnected */
|
|
29031
|
-
; // always reset
|
|
29032
|
-
|
|
28711
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
28712
|
+
// always reset
|
|
29033
28713
|
relocateNodes.length = 0;
|
|
29034
28714
|
}
|
|
29035
28715
|
};
|
|
29036
|
-
|
|
29037
28716
|
var getElement = function getElement(ref) {
|
|
29038
28717
|
return getHostRef(ref).$hostElement$;
|
|
29039
28718
|
};
|
|
29040
|
-
|
|
29041
28719
|
var createEvent = function createEvent(ref, name, flags) {
|
|
29042
28720
|
var elm = getElement(ref);
|
|
29043
28721
|
return {
|
|
29044
28722
|
emit: function emit(detail) {
|
|
29045
28723
|
return emitEvent(elm, name, {
|
|
29046
|
-
bubbles: !!(flags & 4
|
|
29047
|
-
/*
|
|
29048
|
-
),
|
|
29049
|
-
composed: !!(flags & 2
|
|
29050
|
-
/* Composed */
|
|
29051
|
-
),
|
|
29052
|
-
cancelable: !!(flags & 1
|
|
29053
|
-
/* Cancellable */
|
|
29054
|
-
),
|
|
28724
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
28725
|
+
composed: !!(flags & 2 /* Composed */),
|
|
28726
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
29055
28727
|
detail: detail
|
|
29056
28728
|
});
|
|
29057
28729
|
}
|
|
29058
28730
|
};
|
|
29059
28731
|
};
|
|
29060
|
-
|
|
29061
28732
|
var emitEvent = function emitEvent(elm, name, opts) {
|
|
29062
28733
|
var ev = new CustomEvent(name, opts);
|
|
29063
28734
|
elm.dispatchEvent(ev);
|
|
29064
28735
|
return ev;
|
|
29065
28736
|
};
|
|
29066
|
-
|
|
29067
28737
|
var attachToAncestor = function attachToAncestor(hostRef, ancestorComponent) {
|
|
29068
28738
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
29069
28739
|
ancestorComponent['s-p'].push(new Promise(function (r) {
|
|
@@ -29071,49 +28741,35 @@ var attachToAncestor = function attachToAncestor(hostRef, ancestorComponent) {
|
|
|
29071
28741
|
}));
|
|
29072
28742
|
}
|
|
29073
28743
|
};
|
|
29074
|
-
|
|
29075
28744
|
var scheduleUpdate = function scheduleUpdate(hostRef, isInitialLoad) {
|
|
29076
28745
|
{
|
|
29077
|
-
hostRef.$flags$ |= 16
|
|
29078
|
-
/* isQueuedForUpdate */
|
|
29079
|
-
;
|
|
28746
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
29080
28747
|
}
|
|
29081
28748
|
|
|
29082
|
-
if (hostRef.$flags$ & 4
|
|
29083
|
-
|
|
29084
|
-
) {
|
|
29085
|
-
hostRef.$flags$ |= 512
|
|
29086
|
-
/* needsRerender */
|
|
29087
|
-
;
|
|
28749
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
28750
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
29088
28751
|
return;
|
|
29089
28752
|
}
|
|
29090
|
-
|
|
29091
|
-
|
|
28753
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
28754
|
+
// there is no ancestorc omponent or the ancestor component
|
|
29092
28755
|
// has already fired off its lifecycle update then
|
|
29093
28756
|
// fire off the initial update
|
|
29094
|
-
|
|
29095
28757
|
var dispatch = function dispatch() {
|
|
29096
28758
|
return dispatchHooks(hostRef, isInitialLoad);
|
|
29097
28759
|
};
|
|
29098
|
-
|
|
29099
28760
|
return writeTask(dispatch);
|
|
29100
28761
|
};
|
|
29101
|
-
|
|
29102
28762
|
var dispatchHooks = function dispatchHooks(hostRef, isInitialLoad) {
|
|
29103
28763
|
var endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
29104
28764
|
var instance = hostRef.$lazyInstance$;
|
|
29105
28765
|
var promise;
|
|
29106
|
-
|
|
29107
28766
|
if (isInitialLoad) {
|
|
29108
28767
|
{
|
|
29109
|
-
hostRef.$flags$ |= 256
|
|
29110
|
-
/* isListenReady */
|
|
29111
|
-
;
|
|
29112
|
-
|
|
28768
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
29113
28769
|
if (hostRef.$queuedListeners$) {
|
|
29114
28770
|
hostRef.$queuedListeners$.map(function (_a) {
|
|
29115
28771
|
var methodName = _a[0],
|
|
29116
|
-
|
|
28772
|
+
event = _a[1];
|
|
29117
28773
|
return safeCall(instance, methodName, event);
|
|
29118
28774
|
});
|
|
29119
28775
|
hostRef.$queuedListeners$ = null;
|
|
@@ -29123,24 +28779,20 @@ var dispatchHooks = function dispatchHooks(hostRef, isInitialLoad) {
|
|
|
29123
28779
|
promise = safeCall(instance, 'componentWillLoad');
|
|
29124
28780
|
}
|
|
29125
28781
|
}
|
|
29126
|
-
|
|
29127
28782
|
endSchedule();
|
|
29128
28783
|
return then(promise, function () {
|
|
29129
28784
|
return updateComponent(hostRef, instance, isInitialLoad);
|
|
29130
28785
|
});
|
|
29131
28786
|
};
|
|
29132
|
-
|
|
29133
28787
|
var updateComponent = function updateComponent(hostRef, instance, isInitialLoad) {
|
|
29134
28788
|
// updateComponent
|
|
29135
28789
|
var elm = hostRef.$hostElement$;
|
|
29136
28790
|
var endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
29137
28791
|
var rc = elm['s-rc'];
|
|
29138
|
-
|
|
29139
28792
|
if (isInitialLoad) {
|
|
29140
28793
|
// DOM WRITE!
|
|
29141
28794
|
attachStyles(hostRef);
|
|
29142
28795
|
}
|
|
29143
|
-
|
|
29144
28796
|
var endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
29145
28797
|
{
|
|
29146
28798
|
{
|
|
@@ -29150,11 +28802,9 @@ var updateComponent = function updateComponent(hostRef, instance, isInitialLoad)
|
|
|
29150
28802
|
renderVdom(hostRef, callRender(hostRef, instance));
|
|
29151
28803
|
}
|
|
29152
28804
|
}
|
|
29153
|
-
|
|
29154
28805
|
if (plt.$cssShim$) {
|
|
29155
28806
|
plt.$cssShim$.updateHost(elm);
|
|
29156
28807
|
}
|
|
29157
|
-
|
|
29158
28808
|
if (rc) {
|
|
29159
28809
|
// ok, so turns out there are some child host elements
|
|
29160
28810
|
// waiting on this parent element to load
|
|
@@ -29164,48 +28814,37 @@ var updateComponent = function updateComponent(hostRef, instance, isInitialLoad)
|
|
|
29164
28814
|
});
|
|
29165
28815
|
elm['s-rc'] = undefined;
|
|
29166
28816
|
}
|
|
29167
|
-
|
|
29168
28817
|
endRender();
|
|
29169
28818
|
endUpdate();
|
|
29170
28819
|
{
|
|
29171
28820
|
var childrenPromises = elm['s-p'];
|
|
29172
|
-
|
|
29173
28821
|
var postUpdate = function postUpdate() {
|
|
29174
28822
|
return postUpdateComponent(hostRef);
|
|
29175
28823
|
};
|
|
29176
|
-
|
|
29177
28824
|
if (childrenPromises.length === 0) {
|
|
29178
28825
|
postUpdate();
|
|
29179
28826
|
} else {
|
|
29180
28827
|
Promise.all(childrenPromises).then(postUpdate);
|
|
29181
|
-
hostRef.$flags$ |= 4
|
|
29182
|
-
/* isWaitingForChildren */
|
|
29183
|
-
;
|
|
28828
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
29184
28829
|
childrenPromises.length = 0;
|
|
29185
28830
|
}
|
|
29186
28831
|
}
|
|
29187
28832
|
};
|
|
29188
|
-
|
|
29189
28833
|
var callRender = function callRender(hostRef, instance) {
|
|
29190
28834
|
try {
|
|
29191
28835
|
instance = instance.render();
|
|
29192
28836
|
{
|
|
29193
|
-
hostRef.$flags$ &= ~16
|
|
29194
|
-
/* isQueuedForUpdate */
|
|
29195
|
-
;
|
|
28837
|
+
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
29196
28838
|
}
|
|
28839
|
+
|
|
29197
28840
|
{
|
|
29198
|
-
hostRef.$flags$ |= 2
|
|
29199
|
-
/* hasRendered */
|
|
29200
|
-
;
|
|
28841
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
29201
28842
|
}
|
|
29202
28843
|
} catch (e) {
|
|
29203
28844
|
consoleError(e);
|
|
29204
28845
|
}
|
|
29205
|
-
|
|
29206
28846
|
return instance;
|
|
29207
28847
|
};
|
|
29208
|
-
|
|
29209
28848
|
var postUpdateComponent = function postUpdateComponent(hostRef) {
|
|
29210
28849
|
var tagName = hostRef.$cmpMeta$.$tagName$;
|
|
29211
28850
|
var elm = hostRef.$hostElement$;
|
|
@@ -29215,13 +28854,8 @@ var postUpdateComponent = function postUpdateComponent(hostRef) {
|
|
|
29215
28854
|
{
|
|
29216
28855
|
safeCall(instance, 'componentDidRender');
|
|
29217
28856
|
}
|
|
29218
|
-
|
|
29219
|
-
|
|
29220
|
-
/* hasLoadedComponent */
|
|
29221
|
-
)) {
|
|
29222
|
-
hostRef.$flags$ |= 64
|
|
29223
|
-
/* hasLoadedComponent */
|
|
29224
|
-
;
|
|
28857
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
28858
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
29225
28859
|
{
|
|
29226
28860
|
// DOM WRITE!
|
|
29227
28861
|
addHydratedFlag(elm);
|
|
@@ -29232,37 +28866,28 @@ var postUpdateComponent = function postUpdateComponent(hostRef) {
|
|
|
29232
28866
|
endPostUpdate();
|
|
29233
28867
|
{
|
|
29234
28868
|
hostRef.$onReadyResolve$(elm);
|
|
29235
|
-
|
|
29236
28869
|
if (!ancestorComponent) {
|
|
29237
28870
|
appDidLoad();
|
|
29238
28871
|
}
|
|
29239
28872
|
}
|
|
29240
28873
|
} else {
|
|
29241
28874
|
endPostUpdate();
|
|
29242
|
-
}
|
|
28875
|
+
}
|
|
28876
|
+
// load events fire from bottom to top
|
|
29243
28877
|
// the deepest elements load first then bubbles up
|
|
29244
|
-
|
|
29245
|
-
|
|
29246
28878
|
{
|
|
29247
28879
|
if (hostRef.$onRenderResolve$) {
|
|
29248
28880
|
hostRef.$onRenderResolve$();
|
|
29249
28881
|
hostRef.$onRenderResolve$ = undefined;
|
|
29250
28882
|
}
|
|
29251
|
-
|
|
29252
|
-
if (hostRef.$flags$ & 512
|
|
29253
|
-
/* needsRerender */
|
|
29254
|
-
) {
|
|
28883
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
29255
28884
|
nextTick(function () {
|
|
29256
28885
|
return scheduleUpdate(hostRef, false);
|
|
29257
28886
|
});
|
|
29258
28887
|
}
|
|
29259
|
-
|
|
29260
|
-
|
|
29261
|
-
|
|
29262
|
-
| 512
|
|
29263
|
-
/* needsRerender */
|
|
29264
|
-
);
|
|
29265
|
-
} // ( •_•)
|
|
28888
|
+
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
28889
|
+
}
|
|
28890
|
+
// ( •_•)
|
|
29266
28891
|
// ( •_•)>⌐■-■
|
|
29267
28892
|
// (⌐■_■)
|
|
29268
28893
|
};
|
|
@@ -29271,22 +28896,13 @@ var forceUpdate = function forceUpdate(ref) {
|
|
|
29271
28896
|
{
|
|
29272
28897
|
var hostRef = getHostRef(ref);
|
|
29273
28898
|
var isConnected = hostRef.$hostElement$.isConnected;
|
|
29274
|
-
|
|
29275
|
-
if (isConnected && (hostRef.$flags$ & (2
|
|
29276
|
-
/* hasRendered */
|
|
29277
|
-
| 16
|
|
29278
|
-
/* isQueuedForUpdate */
|
|
29279
|
-
)) === 2
|
|
29280
|
-
/* hasRendered */
|
|
29281
|
-
) {
|
|
28899
|
+
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
29282
28900
|
scheduleUpdate(hostRef, false);
|
|
29283
|
-
}
|
|
29284
|
-
|
|
29285
|
-
|
|
28901
|
+
}
|
|
28902
|
+
// Returns "true" when the forced update was successfully scheduled
|
|
29286
28903
|
return isConnected;
|
|
29287
28904
|
}
|
|
29288
28905
|
};
|
|
29289
|
-
|
|
29290
28906
|
var appDidLoad = function appDidLoad(who) {
|
|
29291
28907
|
// on appload
|
|
29292
28908
|
// we have finish the first big initial render
|
|
@@ -29294,10 +28910,9 @@ var appDidLoad = function appDidLoad(who) {
|
|
|
29294
28910
|
addHydratedFlag(doc.documentElement);
|
|
29295
28911
|
}
|
|
29296
28912
|
{
|
|
29297
|
-
plt.$flags$ |= 2
|
|
29298
|
-
/* appLoaded */
|
|
29299
|
-
;
|
|
28913
|
+
plt.$flags$ |= 2 /* appLoaded */;
|
|
29300
28914
|
}
|
|
28915
|
+
|
|
29301
28916
|
nextTick(function () {
|
|
29302
28917
|
return emitEvent(win, 'appload', {
|
|
29303
28918
|
detail: {
|
|
@@ -29306,7 +28921,6 @@ var appDidLoad = function appDidLoad(who) {
|
|
|
29306
28921
|
});
|
|
29307
28922
|
});
|
|
29308
28923
|
};
|
|
29309
|
-
|
|
29310
28924
|
var safeCall = function safeCall(instance, method, arg) {
|
|
29311
28925
|
if (instance && instance[method]) {
|
|
29312
28926
|
try {
|
|
@@ -29315,57 +28929,41 @@ var safeCall = function safeCall(instance, method, arg) {
|
|
|
29315
28929
|
consoleError(e);
|
|
29316
28930
|
}
|
|
29317
28931
|
}
|
|
29318
|
-
|
|
29319
28932
|
return undefined;
|
|
29320
28933
|
};
|
|
29321
|
-
|
|
29322
28934
|
var then = function then(promise, thenFn) {
|
|
29323
28935
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
29324
28936
|
};
|
|
29325
|
-
|
|
29326
28937
|
var addHydratedFlag = function addHydratedFlag(elm) {
|
|
29327
28938
|
return elm.classList.add('hydrated');
|
|
29328
28939
|
};
|
|
29329
|
-
|
|
29330
28940
|
var parsePropertyValue = function parsePropertyValue(propValue, propType) {
|
|
29331
28941
|
// ensure this value is of the correct prop type
|
|
29332
28942
|
if (propValue != null && !isComplexType(propValue)) {
|
|
29333
|
-
if (propType & 4
|
|
29334
|
-
/* Boolean */
|
|
29335
|
-
) {
|
|
28943
|
+
if (propType & 4 /* Boolean */) {
|
|
29336
28944
|
// per the HTML spec, any string value means it is a boolean true value
|
|
29337
28945
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
29338
28946
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
29339
28947
|
}
|
|
29340
|
-
|
|
29341
|
-
if (propType & 2
|
|
29342
|
-
/* Number */
|
|
29343
|
-
) {
|
|
28948
|
+
if (propType & 2 /* Number */) {
|
|
29344
28949
|
// force it to be a number
|
|
29345
28950
|
return parseFloat(propValue);
|
|
29346
28951
|
}
|
|
29347
|
-
|
|
29348
|
-
if (propType & 1
|
|
29349
|
-
/* String */
|
|
29350
|
-
) {
|
|
28952
|
+
if (propType & 1 /* String */) {
|
|
29351
28953
|
// could have been passed as a number or boolean
|
|
29352
28954
|
// but we still want it as a string
|
|
29353
28955
|
return String(propValue);
|
|
29354
|
-
}
|
|
29355
|
-
|
|
29356
|
-
|
|
28956
|
+
}
|
|
28957
|
+
// redundant return here for better minification
|
|
29357
28958
|
return propValue;
|
|
29358
|
-
}
|
|
28959
|
+
}
|
|
28960
|
+
// not sure exactly what type we want
|
|
29359
28961
|
// so no need to change to a different type
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
28962
|
return propValue;
|
|
29363
28963
|
};
|
|
29364
|
-
|
|
29365
28964
|
var getValue = function getValue(ref, propName) {
|
|
29366
28965
|
return getHostRef(ref).$instanceValues$.get(propName);
|
|
29367
28966
|
};
|
|
29368
|
-
|
|
29369
28967
|
var setValue = function setValue(ref, propName, newVal, cmpMeta) {
|
|
29370
28968
|
// check our new property value against our internal value
|
|
29371
28969
|
var hostRef = getHostRef(ref);
|
|
@@ -29373,22 +28971,15 @@ var setValue = function setValue(ref, propName, newVal, cmpMeta) {
|
|
|
29373
28971
|
var flags = hostRef.$flags$;
|
|
29374
28972
|
var instance = hostRef.$lazyInstance$;
|
|
29375
28973
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
29376
|
-
|
|
29377
|
-
if ((!(flags & 8
|
|
29378
|
-
/* isConstructingInstance */
|
|
29379
|
-
) || oldVal === undefined) && newVal !== oldVal) {
|
|
28974
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
|
|
29380
28975
|
// gadzooks! the property's value has changed!!
|
|
29381
28976
|
// set our new value!
|
|
29382
28977
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
29383
|
-
|
|
29384
28978
|
if (instance) {
|
|
29385
28979
|
// get an array of method names of watch functions to call
|
|
29386
28980
|
if (cmpMeta.$watchers$) {
|
|
29387
|
-
if (flags & 128
|
|
29388
|
-
/* isWatchReady */
|
|
29389
|
-
) {
|
|
28981
|
+
if (flags & 128 /* isWatchReady */) {
|
|
29390
28982
|
var watchMethods = cmpMeta.$watchers$[propName];
|
|
29391
|
-
|
|
29392
28983
|
if (watchMethods) {
|
|
29393
28984
|
// this instance is watching for when this property changed
|
|
29394
28985
|
watchMethods.map(function (watchMethodName) {
|
|
@@ -29402,14 +28993,7 @@ var setValue = function setValue(ref, propName, newVal, cmpMeta) {
|
|
|
29402
28993
|
}
|
|
29403
28994
|
}
|
|
29404
28995
|
}
|
|
29405
|
-
|
|
29406
|
-
if ((flags & (2
|
|
29407
|
-
/* hasRendered */
|
|
29408
|
-
| 16
|
|
29409
|
-
/* isQueuedForUpdate */
|
|
29410
|
-
)) === 2
|
|
29411
|
-
/* hasRendered */
|
|
29412
|
-
) {
|
|
28996
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
29413
28997
|
// looks like this value actually changed, so we've got work to do!
|
|
29414
28998
|
// but only if we've already rendered, otherwise just chill out
|
|
29415
28999
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -29419,27 +29003,18 @@ var setValue = function setValue(ref, propName, newVal, cmpMeta) {
|
|
|
29419
29003
|
}
|
|
29420
29004
|
}
|
|
29421
29005
|
};
|
|
29422
|
-
|
|
29423
29006
|
var proxyComponent = function proxyComponent(Cstr, cmpMeta, flags) {
|
|
29424
29007
|
if (cmpMeta.$members$) {
|
|
29425
29008
|
if (Cstr.watchers) {
|
|
29426
29009
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
29427
|
-
}
|
|
29428
|
-
|
|
29429
|
-
|
|
29010
|
+
}
|
|
29011
|
+
// It's better to have a const than two Object.entries()
|
|
29430
29012
|
var members = Object.entries(cmpMeta.$members$);
|
|
29431
29013
|
var prototype_1 = Cstr.prototype;
|
|
29432
29014
|
members.map(function (_a) {
|
|
29433
29015
|
var memberName = _a[0],
|
|
29434
|
-
|
|
29435
|
-
|
|
29436
|
-
if (memberFlags & 31
|
|
29437
|
-
/* Prop */
|
|
29438
|
-
|| flags & 2
|
|
29439
|
-
/* proxyState */
|
|
29440
|
-
&& memberFlags & 32
|
|
29441
|
-
/* State */
|
|
29442
|
-
) {
|
|
29016
|
+
memberFlags = _a[1][0];
|
|
29017
|
+
if (memberFlags & 31 /* Prop */ || flags & 2 /* proxyState */ && memberFlags & 32 /* State */) {
|
|
29443
29018
|
// proxyComponent - prop
|
|
29444
29019
|
Object.defineProperty(prototype_1, memberName, {
|
|
29445
29020
|
get: function get() {
|
|
@@ -29455,75 +29030,53 @@ var proxyComponent = function proxyComponent(Cstr, cmpMeta, flags) {
|
|
|
29455
29030
|
});
|
|
29456
29031
|
}
|
|
29457
29032
|
});
|
|
29458
|
-
|
|
29459
|
-
if (flags & 1
|
|
29460
|
-
/* isElementConstructor */
|
|
29461
|
-
) {
|
|
29033
|
+
if (flags & 1 /* isElementConstructor */) {
|
|
29462
29034
|
var attrNameToPropName_1 = new Map();
|
|
29463
|
-
|
|
29464
29035
|
prototype_1.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
29465
29036
|
var _this = this;
|
|
29466
|
-
|
|
29467
29037
|
plt.jmp(function () {
|
|
29468
29038
|
var propName = attrNameToPropName_1.get(attrName);
|
|
29469
29039
|
_this[propName] = newValue === null && typeof _this[propName] === 'boolean' ? false : newValue;
|
|
29470
29040
|
});
|
|
29471
|
-
};
|
|
29041
|
+
};
|
|
29042
|
+
// create an array of attributes to observe
|
|
29472
29043
|
// and also create a map of html attribute name to js property name
|
|
29473
|
-
|
|
29474
|
-
|
|
29475
29044
|
Cstr.observedAttributes = members.filter(function (_a) {
|
|
29476
29045
|
var _ = _a[0],
|
|
29477
|
-
|
|
29046
|
+
m = _a[1];
|
|
29478
29047
|
return m[0] & 15;
|
|
29479
|
-
}
|
|
29480
|
-
/* HasAttribute */
|
|
29481
|
-
) // filter to only keep props that should match attributes
|
|
29048
|
+
} /* HasAttribute */) // filter to only keep props that should match attributes
|
|
29482
29049
|
.map(function (_a) {
|
|
29483
29050
|
var propName = _a[0],
|
|
29484
|
-
|
|
29051
|
+
m = _a[1];
|
|
29485
29052
|
var attrName = m[1] || propName;
|
|
29486
29053
|
attrNameToPropName_1.set(attrName, propName);
|
|
29487
29054
|
return attrName;
|
|
29488
29055
|
});
|
|
29489
29056
|
}
|
|
29490
29057
|
}
|
|
29491
|
-
|
|
29492
29058
|
return Cstr;
|
|
29493
29059
|
};
|
|
29494
|
-
|
|
29495
29060
|
var initializeComponent = function initializeComponent(elm, hostRef, cmpMeta, hmrVersionId, Cstr) {
|
|
29496
29061
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
29497
29062
|
var endLoad, endNewInstance, style_1, scopeId_1, endRegisterStyles, ancestorComponent, schedule;
|
|
29498
29063
|
return __generator(this, function (_a) {
|
|
29499
29064
|
switch (_a.label) {
|
|
29500
29065
|
case 0:
|
|
29501
|
-
if (!((hostRef.$flags$ & 32
|
|
29502
|
-
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
, 5]; // we haven't initialized this element yet
|
|
29506
|
-
|
|
29507
|
-
hostRef.$flags$ |= 32
|
|
29508
|
-
/* hasInitializedComponent */
|
|
29509
|
-
; // lazy loaded components
|
|
29066
|
+
if (!((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0)) return [3 /*break*/, 5];
|
|
29067
|
+
// we haven't initialized this element yet
|
|
29068
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
29069
|
+
// lazy loaded components
|
|
29510
29070
|
// request the component's implementation to be
|
|
29511
29071
|
// wired up with the host element
|
|
29512
|
-
|
|
29513
29072
|
Cstr = loadModule(cmpMeta);
|
|
29514
|
-
if (!Cstr.then) return [3
|
|
29515
|
-
/*break*/
|
|
29516
|
-
, 2];
|
|
29073
|
+
if (!Cstr.then) return [3 /*break*/, 2];
|
|
29517
29074
|
endLoad = uniqueTime();
|
|
29518
|
-
return [4
|
|
29519
|
-
/*yield*/
|
|
29520
|
-
, Cstr];
|
|
29521
|
-
|
|
29075
|
+
return [4 /*yield*/, Cstr];
|
|
29522
29076
|
case 1:
|
|
29523
29077
|
Cstr = _a.sent();
|
|
29524
29078
|
endLoad();
|
|
29525
29079
|
_a.label = 2;
|
|
29526
|
-
|
|
29527
29080
|
case 2:
|
|
29528
29081
|
if (!Cstr.isProxied) {
|
|
29529
29082
|
// we'eve never proxied this Constructor before
|
|
@@ -29532,82 +29085,55 @@ var initializeComponent = function initializeComponent(elm, hostRef, cmpMeta, hm
|
|
|
29532
29085
|
{
|
|
29533
29086
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
29534
29087
|
}
|
|
29535
|
-
proxyComponent(Cstr, cmpMeta, 2
|
|
29536
|
-
/* proxyState */
|
|
29537
|
-
);
|
|
29088
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
29538
29089
|
Cstr.isProxied = true;
|
|
29539
29090
|
}
|
|
29540
|
-
|
|
29541
|
-
|
|
29091
|
+
endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
29092
|
+
// ok, time to construct the instance
|
|
29542
29093
|
// but let's keep track of when we start and stop
|
|
29543
29094
|
// so that the getters/setters don't incorrectly step on data
|
|
29544
|
-
|
|
29545
29095
|
{
|
|
29546
|
-
hostRef.$flags$ |= 8
|
|
29547
|
-
|
|
29548
|
-
|
|
29549
|
-
} // construct the lazy-loaded component implementation
|
|
29096
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
29097
|
+
}
|
|
29098
|
+
// construct the lazy-loaded component implementation
|
|
29550
29099
|
// passing the hostRef is very important during
|
|
29551
29100
|
// construction in order to directly wire together the
|
|
29552
29101
|
// host element and the lazy-loaded instance
|
|
29553
|
-
|
|
29554
29102
|
try {
|
|
29555
29103
|
new Cstr(hostRef);
|
|
29556
29104
|
} catch (e) {
|
|
29557
29105
|
consoleError(e);
|
|
29558
29106
|
}
|
|
29559
|
-
|
|
29560
29107
|
{
|
|
29561
|
-
hostRef.$flags$ &= ~8
|
|
29562
|
-
/* isConstructingInstance */
|
|
29563
|
-
;
|
|
29108
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
29564
29109
|
}
|
|
29110
|
+
|
|
29565
29111
|
{
|
|
29566
|
-
hostRef.$flags$ |= 128
|
|
29567
|
-
/* isWatchReady */
|
|
29568
|
-
;
|
|
29112
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
29569
29113
|
}
|
|
29114
|
+
|
|
29570
29115
|
endNewInstance();
|
|
29571
|
-
if (!Cstr.style) return [3
|
|
29572
|
-
/*break*/
|
|
29573
|
-
, 5];
|
|
29116
|
+
if (!Cstr.style) return [3 /*break*/, 5];
|
|
29574
29117
|
style_1 = Cstr.style;
|
|
29575
29118
|
scopeId_1 = getScopeId(cmpMeta);
|
|
29576
|
-
if (!!styles.has(scopeId_1)) return [3
|
|
29577
|
-
/*break*/
|
|
29578
|
-
, 5];
|
|
29119
|
+
if (!!styles.has(scopeId_1)) return [3 /*break*/, 5];
|
|
29579
29120
|
endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
29580
|
-
if (!(cmpMeta.$flags$ & 8)
|
|
29581
|
-
/*
|
|
29582
|
-
) return [3
|
|
29583
|
-
/*break*/
|
|
29584
|
-
, 4];
|
|
29585
|
-
/* needsShadowDomShim */
|
|
29586
|
-
|
|
29587
|
-
return [4
|
|
29588
|
-
/*yield*/
|
|
29589
|
-
, __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./shadow-css-360bb6da.js */ "../amplify-ui-components/dist/esm-es5/shadow-css-360bb6da.js")).then(function (m) {
|
|
29121
|
+
if (!(cmpMeta.$flags$ & 8) /* needsShadowDomShim */) return [3 /*break*/, 4]; /* needsShadowDomShim */
|
|
29122
|
+
return [4 /*yield*/, __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./shadow-css-360bb6da.js */ "../amplify-ui-components/dist/esm-es5/shadow-css-360bb6da.js")).then(function (m) {
|
|
29590
29123
|
return m.scopeCss(style_1, scopeId_1, false);
|
|
29591
29124
|
})];
|
|
29592
|
-
|
|
29593
29125
|
case 3:
|
|
29594
29126
|
style_1 = _a.sent();
|
|
29595
29127
|
_a.label = 4;
|
|
29596
|
-
|
|
29597
29128
|
case 4:
|
|
29598
|
-
registerStyle(scopeId_1, style_1, !!(cmpMeta.$flags$ & 1
|
|
29599
|
-
/* shadowDomEncapsulation */
|
|
29600
|
-
));
|
|
29129
|
+
registerStyle(scopeId_1, style_1, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
29601
29130
|
endRegisterStyles();
|
|
29602
29131
|
_a.label = 5;
|
|
29603
|
-
|
|
29604
29132
|
case 5:
|
|
29605
29133
|
ancestorComponent = hostRef.$ancestorComponent$;
|
|
29606
|
-
|
|
29607
29134
|
schedule = function schedule() {
|
|
29608
29135
|
return scheduleUpdate(hostRef, true);
|
|
29609
29136
|
};
|
|
29610
|
-
|
|
29611
29137
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
29612
29138
|
// this is the intial load and this component it has an ancestor component
|
|
29613
29139
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
@@ -29619,40 +29145,26 @@ var initializeComponent = function initializeComponent(elm, hostRef, cmpMeta, hm
|
|
|
29619
29145
|
} else {
|
|
29620
29146
|
schedule();
|
|
29621
29147
|
}
|
|
29622
|
-
|
|
29623
|
-
return [2
|
|
29624
|
-
/*return*/
|
|
29625
|
-
];
|
|
29148
|
+
return [2 /*return*/];
|
|
29626
29149
|
}
|
|
29627
29150
|
});
|
|
29628
29151
|
});
|
|
29629
29152
|
};
|
|
29630
29153
|
|
|
29631
29154
|
var connectedCallback = function connectedCallback(elm) {
|
|
29632
|
-
if ((plt.$flags$ & 1
|
|
29633
|
-
/* isTmpDisconnected */
|
|
29634
|
-
) === 0) {
|
|
29155
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
29635
29156
|
var hostRef = getHostRef(elm);
|
|
29636
29157
|
var cmpMeta = hostRef.$cmpMeta$;
|
|
29637
29158
|
var endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
29638
|
-
|
|
29639
|
-
if (!(hostRef.$flags$ & 1
|
|
29640
|
-
/* hasConnected */
|
|
29641
|
-
)) {
|
|
29159
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
29642
29160
|
// first time this component has connected
|
|
29643
|
-
hostRef.$flags$ |= 1
|
|
29644
|
-
/* hasConnected */
|
|
29645
|
-
;
|
|
29161
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
29646
29162
|
{
|
|
29647
29163
|
// initUpdate
|
|
29648
29164
|
// if the slot polyfill is required we'll need to put some nodes
|
|
29649
29165
|
// in here to act as original content anchors as we move nodes around
|
|
29650
29166
|
// host element has been connected to the DOM
|
|
29651
|
-
if (cmpMeta.$flags$ & (4
|
|
29652
|
-
/* hasSlotRelocation */
|
|
29653
|
-
| 8
|
|
29654
|
-
/* needsShadowDomShim */
|
|
29655
|
-
)) {
|
|
29167
|
+
if (cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
29656
29168
|
setContentReference(elm);
|
|
29657
29169
|
}
|
|
29658
29170
|
}
|
|
@@ -29660,7 +29172,6 @@ var connectedCallback = function connectedCallback(elm) {
|
|
|
29660
29172
|
// find the first ancestor component (if there is one) and register
|
|
29661
29173
|
// this component as one of the actively loading child components for its ancestor
|
|
29662
29174
|
var ancestorComponent = elm;
|
|
29663
|
-
|
|
29664
29175
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
29665
29176
|
// climb up the ancestors looking for the first
|
|
29666
29177
|
// component that hasn't finished its lifecycle update yet
|
|
@@ -29671,24 +29182,20 @@ var connectedCallback = function connectedCallback(elm) {
|
|
|
29671
29182
|
break;
|
|
29672
29183
|
}
|
|
29673
29184
|
}
|
|
29674
|
-
}
|
|
29185
|
+
}
|
|
29186
|
+
// Lazy properties
|
|
29675
29187
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
29676
|
-
|
|
29677
29188
|
if (cmpMeta.$members$) {
|
|
29678
29189
|
Object.entries(cmpMeta.$members$).map(function (_a) {
|
|
29679
29190
|
var memberName = _a[0],
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
if (memberFlags & 31
|
|
29683
|
-
/* Prop */
|
|
29684
|
-
&& elm.hasOwnProperty(memberName)) {
|
|
29191
|
+
memberFlags = _a[1][0];
|
|
29192
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
29685
29193
|
var value = elm[memberName];
|
|
29686
29194
|
delete elm[memberName];
|
|
29687
29195
|
elm[memberName] = value;
|
|
29688
29196
|
}
|
|
29689
29197
|
});
|
|
29690
29198
|
}
|
|
29691
|
-
|
|
29692
29199
|
{
|
|
29693
29200
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
29694
29201
|
}
|
|
@@ -29698,11 +29205,9 @@ var connectedCallback = function connectedCallback(elm) {
|
|
|
29698
29205
|
// since they would have been removed when disconnected
|
|
29699
29206
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
29700
29207
|
}
|
|
29701
|
-
|
|
29702
29208
|
endConnected();
|
|
29703
29209
|
}
|
|
29704
29210
|
};
|
|
29705
|
-
|
|
29706
29211
|
var setContentReference = function setContentReference(elm) {
|
|
29707
29212
|
// only required when we're NOT using native shadow dom (slot)
|
|
29708
29213
|
// or this browser doesn't support native shadow dom
|
|
@@ -29714,11 +29219,8 @@ var setContentReference = function setContentReference(elm) {
|
|
|
29714
29219
|
contentRefElm['s-cn'] = true;
|
|
29715
29220
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
29716
29221
|
};
|
|
29717
|
-
|
|
29718
29222
|
var disconnectedCallback = function disconnectedCallback(elm) {
|
|
29719
|
-
if ((plt.$flags$ & 1
|
|
29720
|
-
/* isTmpDisconnected */
|
|
29721
|
-
) === 0) {
|
|
29223
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
29722
29224
|
var hostRef = getHostRef(elm);
|
|
29723
29225
|
var instance = hostRef.$lazyInstance$;
|
|
29724
29226
|
{
|
|
@@ -29728,23 +29230,20 @@ var disconnectedCallback = function disconnectedCallback(elm) {
|
|
|
29728
29230
|
});
|
|
29729
29231
|
hostRef.$rmListeners$ = undefined;
|
|
29730
29232
|
}
|
|
29731
|
-
}
|
|
29732
|
-
|
|
29233
|
+
}
|
|
29234
|
+
// clear CSS var-shim tracking
|
|
29733
29235
|
if (plt.$cssShim$) {
|
|
29734
29236
|
plt.$cssShim$.removeHost(elm);
|
|
29735
29237
|
}
|
|
29736
|
-
|
|
29737
29238
|
{
|
|
29738
29239
|
safeCall(instance, 'disconnectedCallback');
|
|
29739
29240
|
}
|
|
29740
29241
|
}
|
|
29741
29242
|
};
|
|
29742
|
-
|
|
29743
29243
|
var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
29744
29244
|
if (options === void 0) {
|
|
29745
29245
|
options = {};
|
|
29746
29246
|
}
|
|
29747
|
-
|
|
29748
29247
|
var endBootstrap = createTime();
|
|
29749
29248
|
var cmpTags = [];
|
|
29750
29249
|
var exclude = options.exclude || [];
|
|
@@ -29759,11 +29258,10 @@ var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
|
29759
29258
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
29760
29259
|
{
|
|
29761
29260
|
if (options.syncQueue) {
|
|
29762
|
-
plt.$flags$ |= 4
|
|
29763
|
-
/* queueSync */
|
|
29764
|
-
;
|
|
29261
|
+
plt.$flags$ |= 4 /* queueSync */;
|
|
29765
29262
|
}
|
|
29766
29263
|
}
|
|
29264
|
+
|
|
29767
29265
|
lazyBundles.map(function (lazyBundle) {
|
|
29768
29266
|
return lazyBundle[1].map(function (compactMeta) {
|
|
29769
29267
|
var cmpMeta = {
|
|
@@ -29781,33 +29279,21 @@ var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
|
29781
29279
|
{
|
|
29782
29280
|
cmpMeta.$watchers$ = {};
|
|
29783
29281
|
}
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
/* shadowDomEncapsulation */
|
|
29787
|
-
) {
|
|
29788
|
-
cmpMeta.$flags$ |= 8
|
|
29789
|
-
/* needsShadowDomShim */
|
|
29790
|
-
;
|
|
29282
|
+
if (!supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
29283
|
+
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
29791
29284
|
}
|
|
29792
29285
|
|
|
29793
29286
|
var tagName = cmpMeta.$tagName$;
|
|
29794
|
-
|
|
29795
|
-
|
|
29796
|
-
|
|
29797
|
-
function (_super) {
|
|
29798
|
-
__extends(HostElement, _super); // StencilLazyHost
|
|
29799
|
-
|
|
29800
|
-
|
|
29287
|
+
var HostElement = /** @class */function (_super) {
|
|
29288
|
+
__extends(HostElement, _super);
|
|
29289
|
+
// StencilLazyHost
|
|
29801
29290
|
function HostElement(self) {
|
|
29802
|
-
var _this =
|
|
29291
|
+
var _this =
|
|
29292
|
+
// @ts-ignore
|
|
29803
29293
|
_super.call(this, self) || this;
|
|
29804
|
-
|
|
29805
29294
|
self = _this;
|
|
29806
29295
|
registerHost(self, cmpMeta);
|
|
29807
|
-
|
|
29808
|
-
if (cmpMeta.$flags$ & 1
|
|
29809
|
-
/* shadowDomEncapsulation */
|
|
29810
|
-
) {
|
|
29296
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
29811
29297
|
// this component is using shadow dom
|
|
29812
29298
|
// and this browser supports shadow dom
|
|
29813
29299
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -29822,18 +29308,14 @@ var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
|
29822
29308
|
self.shadowRoot = self;
|
|
29823
29309
|
}
|
|
29824
29310
|
}
|
|
29825
|
-
|
|
29826
29311
|
return _this;
|
|
29827
29312
|
}
|
|
29828
|
-
|
|
29829
29313
|
HostElement.prototype.connectedCallback = function () {
|
|
29830
29314
|
var _this = this;
|
|
29831
|
-
|
|
29832
29315
|
if (appLoadFallback) {
|
|
29833
29316
|
clearTimeout(appLoadFallback);
|
|
29834
29317
|
appLoadFallback = null;
|
|
29835
29318
|
}
|
|
29836
|
-
|
|
29837
29319
|
if (isBootstrapping) {
|
|
29838
29320
|
// connectedCallback will be processed once all components have been registered
|
|
29839
29321
|
deferredConnectedCallbacks.push(this);
|
|
@@ -29843,44 +29325,35 @@ var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
|
29843
29325
|
});
|
|
29844
29326
|
}
|
|
29845
29327
|
};
|
|
29846
|
-
|
|
29847
29328
|
HostElement.prototype.disconnectedCallback = function () {
|
|
29848
29329
|
var _this = this;
|
|
29849
|
-
|
|
29850
29330
|
plt.jmp(function () {
|
|
29851
29331
|
return disconnectedCallback(_this);
|
|
29852
29332
|
});
|
|
29853
29333
|
};
|
|
29854
|
-
|
|
29855
29334
|
HostElement.prototype.forceUpdate = function () {
|
|
29856
29335
|
forceUpdate(this);
|
|
29857
29336
|
};
|
|
29858
|
-
|
|
29859
29337
|
HostElement.prototype.componentOnReady = function () {
|
|
29860
29338
|
return getHostRef(this).$onReadyPromise$;
|
|
29861
29339
|
};
|
|
29862
|
-
|
|
29863
29340
|
return HostElement;
|
|
29864
29341
|
}(HTMLElement);
|
|
29865
|
-
|
|
29866
29342
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
29867
|
-
|
|
29868
29343
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
29869
29344
|
cmpTags.push(tagName);
|
|
29870
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1
|
|
29871
|
-
/* isElementConstructor */
|
|
29872
|
-
));
|
|
29345
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
29873
29346
|
}
|
|
29874
29347
|
});
|
|
29875
29348
|
});
|
|
29349
|
+
|
|
29876
29350
|
{
|
|
29877
29351
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
29878
29352
|
visibilityStyle.setAttribute('data-styles', '');
|
|
29879
29353
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
29880
|
-
}
|
|
29881
|
-
|
|
29354
|
+
}
|
|
29355
|
+
// Process deferred connectedCallbacks now all components have been registered
|
|
29882
29356
|
isBootstrapping = false;
|
|
29883
|
-
|
|
29884
29357
|
if (deferredConnectedCallbacks.length) {
|
|
29885
29358
|
deferredConnectedCallbacks.map(function (host) {
|
|
29886
29359
|
return host.connectedCallback();
|
|
@@ -29891,22 +29364,17 @@ var bootstrapLazy = function bootstrapLazy(lazyBundles, options) {
|
|
|
29891
29364
|
return appLoadFallback = setTimeout(appDidLoad, 30);
|
|
29892
29365
|
});
|
|
29893
29366
|
}
|
|
29894
|
-
}
|
|
29895
|
-
|
|
29896
|
-
|
|
29367
|
+
}
|
|
29368
|
+
// Fallback appLoad event
|
|
29897
29369
|
endBootstrap();
|
|
29898
29370
|
};
|
|
29899
|
-
|
|
29900
29371
|
var hostRefs = new WeakMap();
|
|
29901
|
-
|
|
29902
29372
|
var getHostRef = function getHostRef(ref) {
|
|
29903
29373
|
return hostRefs.get(ref);
|
|
29904
29374
|
};
|
|
29905
|
-
|
|
29906
29375
|
var registerInstance = function registerInstance(lazyInstance, hostRef) {
|
|
29907
29376
|
return hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
29908
29377
|
};
|
|
29909
|
-
|
|
29910
29378
|
var registerHost = function registerHost(elm, cmpMeta) {
|
|
29911
29379
|
var hostRef = {
|
|
29912
29380
|
$flags$: 0,
|
|
@@ -29924,27 +29392,21 @@ var registerHost = function registerHost(elm, cmpMeta) {
|
|
|
29924
29392
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
29925
29393
|
return hostRefs.set(elm, hostRef);
|
|
29926
29394
|
};
|
|
29927
|
-
|
|
29928
29395
|
var isMemberInElement = function isMemberInElement(elm, memberName) {
|
|
29929
29396
|
return memberName in elm;
|
|
29930
29397
|
};
|
|
29931
|
-
|
|
29932
29398
|
var consoleError = function consoleError(e) {
|
|
29933
29399
|
return console.error(e);
|
|
29934
29400
|
};
|
|
29935
|
-
|
|
29936
29401
|
var cmpModules = /*@__PURE__*/new Map();
|
|
29937
|
-
|
|
29938
29402
|
var loadModule = function loadModule(cmpMeta, hostRef, hmrVersionId) {
|
|
29939
29403
|
// loadModuleImport
|
|
29940
29404
|
var exportName = cmpMeta.$tagName$.replace(/-/g, '_');
|
|
29941
29405
|
var bundleId = cmpMeta.$lazyBundleId$;
|
|
29942
29406
|
var module = cmpModules.get(bundleId);
|
|
29943
|
-
|
|
29944
29407
|
if (module) {
|
|
29945
29408
|
return module[exportName];
|
|
29946
29409
|
}
|
|
29947
|
-
|
|
29948
29410
|
return __webpack_require__("../amplify-ui-components/dist/esm-es5 lazy recursive ^\\.\\/.*\\.entry\\.js$ include: \\.entry\\.js$ exclude: \\.system\\.entry\\.js$")("./" + bundleId + ".entry.js").then(function (importedModule) {
|
|
29949
29411
|
{
|
|
29950
29412
|
cmpModules.set(bundleId, importedModule);
|
|
@@ -29952,22 +29414,16 @@ var loadModule = function loadModule(cmpMeta, hostRef, hmrVersionId) {
|
|
|
29952
29414
|
return importedModule[exportName];
|
|
29953
29415
|
}, consoleError);
|
|
29954
29416
|
};
|
|
29955
|
-
|
|
29956
29417
|
var styles = new Map();
|
|
29957
29418
|
var queueDomReads = [];
|
|
29958
29419
|
var queueDomWrites = [];
|
|
29959
29420
|
var queueDomWritesLow = [];
|
|
29960
|
-
|
|
29961
29421
|
var queueTask = function queueTask(queue, write) {
|
|
29962
29422
|
return function (cb) {
|
|
29963
29423
|
queue.push(cb);
|
|
29964
|
-
|
|
29965
29424
|
if (!queuePending) {
|
|
29966
29425
|
queuePending = true;
|
|
29967
|
-
|
|
29968
|
-
if (write && plt.$flags$ & 4
|
|
29969
|
-
/* queueSync */
|
|
29970
|
-
) {
|
|
29426
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
29971
29427
|
nextTick(flush);
|
|
29972
29428
|
} else {
|
|
29973
29429
|
plt.raf(flush);
|
|
@@ -29975,7 +29431,6 @@ var queueTask = function queueTask(queue, write) {
|
|
|
29975
29431
|
}
|
|
29976
29432
|
};
|
|
29977
29433
|
};
|
|
29978
|
-
|
|
29979
29434
|
var consume = function consume(queue) {
|
|
29980
29435
|
for (var i = 0; i < queue.length; i++) {
|
|
29981
29436
|
try {
|
|
@@ -29984,14 +29439,11 @@ var consume = function consume(queue) {
|
|
|
29984
29439
|
consoleError(e);
|
|
29985
29440
|
}
|
|
29986
29441
|
}
|
|
29987
|
-
|
|
29988
29442
|
queue.length = 0;
|
|
29989
29443
|
};
|
|
29990
|
-
|
|
29991
29444
|
var consumeTimeout = function consumeTimeout(queue, timeout) {
|
|
29992
29445
|
var i = 0;
|
|
29993
29446
|
var ts = 0;
|
|
29994
|
-
|
|
29995
29447
|
while (i < queue.length && (ts = performance.now()) < timeout) {
|
|
29996
29448
|
try {
|
|
29997
29449
|
queue[i++](ts);
|
|
@@ -29999,37 +29451,29 @@ var consumeTimeout = function consumeTimeout(queue, timeout) {
|
|
|
29999
29451
|
consoleError(e);
|
|
30000
29452
|
}
|
|
30001
29453
|
}
|
|
30002
|
-
|
|
30003
29454
|
if (i === queue.length) {
|
|
30004
29455
|
queue.length = 0;
|
|
30005
29456
|
} else if (i !== 0) {
|
|
30006
29457
|
queue.splice(0, i);
|
|
30007
29458
|
}
|
|
30008
29459
|
};
|
|
30009
|
-
|
|
30010
29460
|
var flush = function flush() {
|
|
30011
29461
|
{
|
|
30012
29462
|
queueCongestion++;
|
|
30013
|
-
}
|
|
29463
|
+
}
|
|
29464
|
+
// always force a bunch of medium callbacks to run, but still have
|
|
30014
29465
|
// a throttle on how many can run in a certain time
|
|
30015
29466
|
// DOM READS!!!
|
|
30016
|
-
|
|
30017
|
-
|
|
30018
|
-
|
|
29467
|
+
consume(queueDomReads);
|
|
29468
|
+
// DOM WRITES!!!
|
|
30019
29469
|
{
|
|
30020
|
-
var timeout = (plt.$flags$ & 6
|
|
30021
|
-
/* queueMask */
|
|
30022
|
-
) === 2
|
|
30023
|
-
/* appLoaded */
|
|
30024
|
-
? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity;
|
|
29470
|
+
var timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity;
|
|
30025
29471
|
consumeTimeout(queueDomWrites, timeout);
|
|
30026
29472
|
consumeTimeout(queueDomWritesLow, timeout);
|
|
30027
|
-
|
|
30028
29473
|
if (queueDomWrites.length > 0) {
|
|
30029
29474
|
queueDomWritesLow.push.apply(queueDomWritesLow, queueDomWrites);
|
|
30030
29475
|
queueDomWrites.length = 0;
|
|
30031
29476
|
}
|
|
30032
|
-
|
|
30033
29477
|
if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
|
|
30034
29478
|
// still more to do yet, but we've run out of time
|
|
30035
29479
|
// let's let this thing cool off and try again in the next tick
|
|
@@ -30039,11 +29483,9 @@ var flush = function flush() {
|
|
|
30039
29483
|
}
|
|
30040
29484
|
}
|
|
30041
29485
|
};
|
|
30042
|
-
|
|
30043
29486
|
var nextTick = /*@__PURE__*/function nextTick(cb) {
|
|
30044
29487
|
return promiseResolve().then(cb);
|
|
30045
29488
|
};
|
|
30046
|
-
|
|
30047
29489
|
var writeTask = /*@__PURE__*/queueTask(queueDomWrites, true);
|
|
30048
29490
|
|
|
30049
29491
|
|
|
@@ -30139,7 +29581,6 @@ var defineCustomElements = function (win, options) {
|
|
|
30139
29581
|
__webpack_require__.r(__webpack_exports__);
|
|
30140
29582
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return AccessLevel; });
|
|
30141
29583
|
var AccessLevel;
|
|
30142
|
-
|
|
30143
29584
|
(function (AccessLevel) {
|
|
30144
29585
|
AccessLevel["Public"] = "public";
|
|
30145
29586
|
AccessLevel["Private"] = "private";
|
|
@@ -30147,7 +29588,6 @@ var AccessLevel;
|
|
|
30147
29588
|
})(AccessLevel || (AccessLevel = {}));
|
|
30148
29589
|
|
|
30149
29590
|
|
|
30150
|
-
|
|
30151
29591
|
/***/ }),
|
|
30152
29592
|
|
|
30153
29593
|
/***/ "../amplify-ui-components/dist/esm-es5/theme-19a9209a.js":
|
|
@@ -30169,11 +29609,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30169
29609
|
/*
|
|
30170
29610
|
Stencil Client Patch v1.15.0 | MIT Licensed | https://stenciljs.com
|
|
30171
29611
|
*/
|
|
30172
|
-
|
|
30173
29612
|
var getDynamicImportFunction = function getDynamicImportFunction(namespace) {
|
|
30174
29613
|
return "__sc_import_" + namespace.replace(/\s|-/g, '_');
|
|
30175
29614
|
};
|
|
30176
|
-
|
|
30177
29615
|
var patchEsm = function patchEsm() {
|
|
30178
29616
|
// NOTE!! This fn cannot use async/await!
|
|
30179
29617
|
// @ts-ignore
|
|
@@ -30188,24 +29626,19 @@ var patchEsm = function patchEsm() {
|
|
|
30188
29626
|
}
|
|
30189
29627
|
});
|
|
30190
29628
|
}
|
|
30191
|
-
|
|
30192
29629
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["a"])();
|
|
30193
29630
|
};
|
|
30194
|
-
|
|
30195
29631
|
var patchBrowser = function patchBrowser() {
|
|
30196
29632
|
{
|
|
30197
29633
|
// shim css vars
|
|
30198
29634
|
_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["p"].$cssShim$ = _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["w"].__cssshim;
|
|
30199
|
-
}
|
|
30200
|
-
|
|
29635
|
+
}
|
|
29636
|
+
// @ts-ignore
|
|
30201
29637
|
var scriptElm = Array.from(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["d"].querySelectorAll('script')).find(function (s) {
|
|
30202
29638
|
return new RegExp("/" + _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["N"] + "(\\.esm)?\\.js($|\\?|#)").test(s.src) || s.getAttribute('data-stencil-namespace') === _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["N"];
|
|
30203
29639
|
});
|
|
30204
29640
|
var opts = scriptElm['data-opts'] || {};
|
|
30205
|
-
|
|
30206
|
-
if ('onbeforeload' in scriptElm && !history.scrollRestoration
|
|
30207
|
-
/* IS_ESM_BUILD */
|
|
30208
|
-
) {
|
|
29641
|
+
if ('onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
|
|
30209
29642
|
// Safari < v11 support: This IF is true if it's Safari below v11.
|
|
30210
29643
|
// This fn cannot use async/await since Safari didn't support it until v11,
|
|
30211
29644
|
// however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
|
|
@@ -30219,13 +29652,11 @@ var patchBrowser = function patchBrowser() {
|
|
|
30219
29652
|
}
|
|
30220
29653
|
};
|
|
30221
29654
|
}
|
|
30222
|
-
|
|
30223
29655
|
{
|
|
30224
29656
|
opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["w"].location.href)).href;
|
|
30225
29657
|
{
|
|
30226
29658
|
patchDynamicImport(opts.resourcesUrl, scriptElm);
|
|
30227
29659
|
}
|
|
30228
|
-
|
|
30229
29660
|
if (!_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["w"].customElements) {
|
|
30230
29661
|
// module support, but no custom elements support (Old Edge)
|
|
30231
29662
|
// @ts-ignore
|
|
@@ -30236,10 +29667,8 @@ var patchBrowser = function patchBrowser() {
|
|
|
30236
29667
|
}
|
|
30237
29668
|
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["a"])(opts);
|
|
30238
29669
|
};
|
|
30239
|
-
|
|
30240
29670
|
var patchDynamicImport = function patchDynamicImport(base, orgScriptElm) {
|
|
30241
29671
|
var importFunctionName = getDynamicImportFunction(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["N"]);
|
|
30242
|
-
|
|
30243
29672
|
try {
|
|
30244
29673
|
// test if this browser supports dynamic imports
|
|
30245
29674
|
// There is a caching issue in V8, that breaks using import() in Function
|
|
@@ -30251,11 +29680,9 @@ var patchDynamicImport = function patchDynamicImport(base, orgScriptElm) {
|
|
|
30251
29680
|
// however, they do NOT support "dynamic" imports
|
|
30252
29681
|
// basically this code is for old Edge, v18 and below
|
|
30253
29682
|
var moduleMap_1 = new Map();
|
|
30254
|
-
|
|
30255
29683
|
_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["w"][importFunctionName] = function (src) {
|
|
30256
29684
|
var url = new URL(src, base).href;
|
|
30257
29685
|
var mod = moduleMap_1.get(url);
|
|
30258
|
-
|
|
30259
29686
|
if (!mod) {
|
|
30260
29687
|
var script_1 = _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["d"].createElement('script');
|
|
30261
29688
|
script_1.type = 'module';
|
|
@@ -30272,14 +29699,11 @@ var patchDynamicImport = function patchDynamicImport(base, orgScriptElm) {
|
|
|
30272
29699
|
moduleMap_1.set(url, mod);
|
|
30273
29700
|
_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["d"].head.appendChild(script_1);
|
|
30274
29701
|
}
|
|
30275
|
-
|
|
30276
29702
|
return mod;
|
|
30277
29703
|
};
|
|
30278
29704
|
}
|
|
30279
29705
|
};
|
|
30280
29706
|
/* eslint-disable */
|
|
30281
|
-
|
|
30282
|
-
|
|
30283
29707
|
if (Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["browserOrNode"])().isBrowser) {
|
|
30284
29708
|
var customStyles = document.createElement('style');
|
|
30285
29709
|
customStyles.appendChild(document.createTextNode("\n :root {\n /* Typography */\n --amplify-font-family: 'Amazon Ember', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\n\n --amplify-text-xxs: 0.75rem;\n --amplify-text-xs: 0.81rem;\n --amplify-text-sm: 0.875rem;\n --amplify-text-md: 1rem;\n --amplify-text-md-sub: 1.15rem;\n --amplify-text-lg: 1.5rem;\n --amplify-text-xl: 2rem;\n --amplify-text-xxl: 2.5rem;\n\n /* Colors */\n --amplify-primary-color: #ff9900;\n --amplify-primary-contrast: var(--amplify-white);\n --amplify-primary-tint: #ffac31;\n --amplify-primary-shade: #e88b01;\n\n --amplify-secondary-color: #152939;\n --amplify-secondary-contrast: var(--amplify-white);\n --amplify-secondary-tint: #31465f;\n --amplify-secondary-shade: #1F2A37;\n\n --amplify-tertiary-color: #5d8aff;\n --amplify-tertiary-contrast: var(--amplify-white);\n --amplify-tertiary-tint: #7da1ff;\n --amplify-tertiary-shade: #537BE5;\n\n --amplify-background-color: var(--amplify-white);\n\n /* Neutral */\n --amplify-grey: #828282;\n --amplify-light-grey: #c4c4c4;\n --amplify-white: #ffffff;\n --amplify-smoke-white: #f5f5f5;\n --amplify-red: #dd3f5b;\n --amplify-blue: #099ac8;\n }\n "));
|
|
@@ -30289,7 +29713,6 @@ if (Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["browserOrNode"])().is
|
|
|
30289
29713
|
}
|
|
30290
29714
|
|
|
30291
29715
|
|
|
30292
|
-
|
|
30293
29716
|
/***/ }),
|
|
30294
29717
|
|
|
30295
29718
|
/***/ "../amplify-ui-components/dist/esm/polyfills/index.js":
|
|
@@ -30304,7 +29727,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30304
29727
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyPolyfills", function() { return applyPolyfills; });
|
|
30305
29728
|
function applyPolyfills() {
|
|
30306
29729
|
var promises = [];
|
|
30307
|
-
|
|
30308
29730
|
if (typeof window !== 'undefined') {
|
|
30309
29731
|
var checkIfURLIsSupported = function checkIfURLIsSupported() {
|
|
30310
29732
|
try {
|
|
@@ -30315,18 +29737,14 @@ function applyPolyfills() {
|
|
|
30315
29737
|
return false;
|
|
30316
29738
|
}
|
|
30317
29739
|
};
|
|
30318
|
-
|
|
30319
29740
|
var win = window;
|
|
30320
|
-
|
|
30321
29741
|
if (!win.customElements || win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove || !win.Element.prototype.getRootNode)) {
|
|
30322
29742
|
promises.push(__webpack_require__.e(/*! import() | polyfills-dom */ "polyfills-dom").then(__webpack_require__.t.bind(null, /*! ./dom.js */ "../amplify-ui-components/dist/esm/polyfills/dom.js", 7)));
|
|
30323
29743
|
}
|
|
30324
|
-
|
|
30325
29744
|
if ('function' !== typeof Object.assign || !Object.entries || !Array.prototype.find || !Array.prototype.includes || !String.prototype.startsWith || !String.prototype.endsWith || win.NodeList && !win.NodeList.prototype.forEach || !win.fetch || !checkIfURLIsSupported() || typeof WeakMap == 'undefined') {
|
|
30326
29745
|
promises.push(__webpack_require__.e(/*! import() | polyfills-core-js */ "polyfills-core-js").then(__webpack_require__.t.bind(null, /*! ./core-js.js */ "../amplify-ui-components/dist/esm/polyfills/core-js.js", 7)));
|
|
30327
29746
|
}
|
|
30328
29747
|
}
|
|
30329
|
-
|
|
30330
29748
|
return Promise.all(promises);
|
|
30331
29749
|
}
|
|
30332
29750
|
|
|
@@ -30407,15 +29825,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
30407
29825
|
value: true
|
|
30408
29826
|
});
|
|
30409
29827
|
/* eslint-disable */
|
|
30410
|
-
|
|
30411
29828
|
/* tslint:disable */
|
|
30412
|
-
|
|
30413
29829
|
/* auto-generated react proxies */
|
|
30414
|
-
|
|
30415
29830
|
var react_component_lib_1 = __webpack_require__(/*! ./react-component-lib */ "./lib/react-component-lib/index.js");
|
|
30416
|
-
|
|
30417
29831
|
var loader_1 = __webpack_require__(/*! @aws-amplify/ui-components/loader */ "../amplify-ui-components/dist/loader/index.mjs");
|
|
30418
|
-
|
|
30419
29832
|
loader_1.applyPolyfills().then(function () {
|
|
30420
29833
|
return loader_1.defineCustomElements();
|
|
30421
29834
|
});
|
|
@@ -30492,15 +29905,11 @@ function __export(m) {
|
|
|
30492
29905
|
if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
30493
29906
|
}
|
|
30494
29907
|
}
|
|
30495
|
-
|
|
30496
29908
|
Object.defineProperty(exports, "__esModule", {
|
|
30497
29909
|
value: true
|
|
30498
29910
|
});
|
|
30499
|
-
|
|
30500
29911
|
__export(__webpack_require__(/*! ./components */ "./lib/components.js"));
|
|
30501
|
-
|
|
30502
29912
|
var withAuthenticator_1 = __webpack_require__(/*! ./withAuthenticator */ "./lib/withAuthenticator.js");
|
|
30503
|
-
|
|
30504
29913
|
exports.withAuthenticator = withAuthenticator_1.withAuthenticator;
|
|
30505
29914
|
|
|
30506
29915
|
/***/ }),
|
|
@@ -30526,124 +29935,93 @@ var __extends = this && this.__extends || function () {
|
|
|
30526
29935
|
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
30527
29936
|
}
|
|
30528
29937
|
};
|
|
30529
|
-
|
|
30530
29938
|
return _extendStatics(d, b);
|
|
30531
29939
|
};
|
|
30532
|
-
|
|
30533
29940
|
return function (d, b) {
|
|
30534
29941
|
_extendStatics(d, b);
|
|
30535
|
-
|
|
30536
29942
|
function __() {
|
|
30537
29943
|
this.constructor = d;
|
|
30538
29944
|
}
|
|
30539
|
-
|
|
30540
29945
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30541
29946
|
};
|
|
30542
29947
|
}();
|
|
30543
|
-
|
|
30544
29948
|
var __assign = this && this.__assign || function () {
|
|
30545
29949
|
__assign = Object.assign || function (t) {
|
|
30546
29950
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
30547
29951
|
s = arguments[i];
|
|
30548
|
-
|
|
30549
29952
|
for (var p in s) {
|
|
30550
29953
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
30551
29954
|
}
|
|
30552
29955
|
}
|
|
30553
|
-
|
|
30554
29956
|
return t;
|
|
30555
29957
|
};
|
|
30556
|
-
|
|
30557
29958
|
return __assign.apply(this, arguments);
|
|
30558
29959
|
};
|
|
30559
|
-
|
|
30560
29960
|
var __rest = this && this.__rest || function (s, e) {
|
|
30561
29961
|
var t = {};
|
|
30562
|
-
|
|
30563
29962
|
for (var p in s) {
|
|
30564
29963
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
30565
29964
|
}
|
|
30566
|
-
|
|
30567
29965
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30568
29966
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
30569
29967
|
}
|
|
30570
29968
|
return t;
|
|
30571
29969
|
};
|
|
30572
|
-
|
|
30573
29970
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
30574
29971
|
return mod && mod.__esModule ? mod : {
|
|
30575
29972
|
"default": mod
|
|
30576
29973
|
};
|
|
30577
29974
|
};
|
|
30578
|
-
|
|
30579
29975
|
Object.defineProperty(exports, "__esModule", {
|
|
30580
29976
|
value: true
|
|
30581
29977
|
});
|
|
30582
|
-
|
|
30583
29978
|
var react_1 = __importDefault(__webpack_require__(/*! react */ "react"));
|
|
30584
|
-
|
|
30585
29979
|
var index_1 = __webpack_require__(/*! ./utils/index */ "./lib/react-component-lib/utils/index.js");
|
|
30586
|
-
|
|
30587
29980
|
exports.createReactComponent = function (tagName) {
|
|
30588
29981
|
var displayName = index_1.dashToPascalCase(tagName);
|
|
30589
|
-
|
|
30590
|
-
var ReactComponent =
|
|
30591
|
-
/** @class */
|
|
30592
|
-
function (_super) {
|
|
29982
|
+
var ReactComponent = /** @class */function (_super) {
|
|
30593
29983
|
__extends(class_1, _super);
|
|
30594
|
-
|
|
30595
29984
|
function class_1(props) {
|
|
30596
29985
|
var _this = _super.call(this, props) || this;
|
|
30597
|
-
|
|
30598
29986
|
_this.ref = react_1["default"].createRef();
|
|
30599
29987
|
return _this;
|
|
30600
29988
|
}
|
|
30601
|
-
|
|
30602
29989
|
class_1.prototype.componentDidMount = function () {
|
|
30603
29990
|
this.componentDidUpdate(this.props);
|
|
30604
29991
|
};
|
|
30605
|
-
|
|
30606
29992
|
class_1.prototype.componentDidUpdate = function (prevProps) {
|
|
30607
29993
|
var node = this.ref.current;
|
|
30608
29994
|
index_1.attachEventProps(node, this.props, prevProps);
|
|
30609
29995
|
};
|
|
30610
|
-
|
|
30611
29996
|
class_1.prototype.render = function () {
|
|
30612
29997
|
var _a = this.props,
|
|
30613
|
-
|
|
30614
|
-
|
|
30615
|
-
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
29998
|
+
children = _a.children,
|
|
29999
|
+
forwardedRef = _a.forwardedRef,
|
|
30000
|
+
style = _a.style,
|
|
30001
|
+
className = _a.className,
|
|
30002
|
+
ref = _a.ref,
|
|
30003
|
+
cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
|
|
30620
30004
|
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
30621
30005
|
var isEventProp = name.indexOf('on') === 0 && name[2] === name[2].toUpperCase();
|
|
30622
30006
|
var isDataProp = name.indexOf('data-') === 0;
|
|
30623
30007
|
var isAriaProp = name.indexOf('aria-') === 0;
|
|
30624
|
-
|
|
30625
30008
|
if (isEventProp) {
|
|
30626
30009
|
var eventName = name.substring(2).toLowerCase();
|
|
30627
|
-
|
|
30628
30010
|
if (typeof document !== "undefined" && index_1.isCoveredByReact(eventName)) {
|
|
30629
30011
|
acc[name] = cProps[name];
|
|
30630
30012
|
}
|
|
30631
30013
|
} else if (isDataProp || isAriaProp) {
|
|
30632
30014
|
acc[name] = cProps[name];
|
|
30633
30015
|
}
|
|
30634
|
-
|
|
30635
30016
|
return acc;
|
|
30636
30017
|
}, {});
|
|
30637
|
-
|
|
30638
30018
|
var newProps = __assign(__assign({}, propsToPass), {
|
|
30639
30019
|
ref: this.ref,
|
|
30640
30020
|
style: style,
|
|
30641
30021
|
className: className
|
|
30642
30022
|
});
|
|
30643
|
-
|
|
30644
30023
|
return react_1["default"].createElement(tagName, newProps, children);
|
|
30645
30024
|
};
|
|
30646
|
-
|
|
30647
30025
|
Object.defineProperty(class_1, "displayName", {
|
|
30648
30026
|
get: function get() {
|
|
30649
30027
|
return displayName;
|
|
@@ -30653,7 +30031,6 @@ exports.createReactComponent = function (tagName) {
|
|
|
30653
30031
|
});
|
|
30654
30032
|
return class_1;
|
|
30655
30033
|
}(react_1["default"].Component);
|
|
30656
|
-
|
|
30657
30034
|
return index_1.createForwardRef(ReactComponent, displayName);
|
|
30658
30035
|
};
|
|
30659
30036
|
|
|
@@ -30680,44 +30057,34 @@ var __extends = this && this.__extends || function () {
|
|
|
30680
30057
|
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
30681
30058
|
}
|
|
30682
30059
|
};
|
|
30683
|
-
|
|
30684
30060
|
return _extendStatics(d, b);
|
|
30685
30061
|
};
|
|
30686
|
-
|
|
30687
30062
|
return function (d, b) {
|
|
30688
30063
|
_extendStatics(d, b);
|
|
30689
|
-
|
|
30690
30064
|
function __() {
|
|
30691
30065
|
this.constructor = d;
|
|
30692
30066
|
}
|
|
30693
|
-
|
|
30694
30067
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30695
30068
|
};
|
|
30696
30069
|
}();
|
|
30697
|
-
|
|
30698
30070
|
var __assign = this && this.__assign || function () {
|
|
30699
30071
|
__assign = Object.assign || function (t) {
|
|
30700
30072
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
30701
30073
|
s = arguments[i];
|
|
30702
|
-
|
|
30703
30074
|
for (var p in s) {
|
|
30704
30075
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
30705
30076
|
}
|
|
30706
30077
|
}
|
|
30707
|
-
|
|
30708
30078
|
return t;
|
|
30709
30079
|
};
|
|
30710
|
-
|
|
30711
30080
|
return __assign.apply(this, arguments);
|
|
30712
30081
|
};
|
|
30713
|
-
|
|
30714
30082
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
30715
30083
|
function adopt(value) {
|
|
30716
30084
|
return value instanceof P ? value : new P(function (resolve) {
|
|
30717
30085
|
resolve(value);
|
|
30718
30086
|
});
|
|
30719
30087
|
}
|
|
30720
|
-
|
|
30721
30088
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30722
30089
|
function fulfilled(value) {
|
|
30723
30090
|
try {
|
|
@@ -30726,7 +30093,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
30726
30093
|
reject(e);
|
|
30727
30094
|
}
|
|
30728
30095
|
}
|
|
30729
|
-
|
|
30730
30096
|
function rejected(value) {
|
|
30731
30097
|
try {
|
|
30732
30098
|
step(generator["throw"](value));
|
|
@@ -30734,29 +30100,26 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
30734
30100
|
reject(e);
|
|
30735
30101
|
}
|
|
30736
30102
|
}
|
|
30737
|
-
|
|
30738
30103
|
function step(result) {
|
|
30739
30104
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
30740
30105
|
}
|
|
30741
|
-
|
|
30742
30106
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30743
30107
|
});
|
|
30744
30108
|
};
|
|
30745
|
-
|
|
30746
30109
|
var __generator = this && this.__generator || function (thisArg, body) {
|
|
30747
30110
|
var _ = {
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30111
|
+
label: 0,
|
|
30112
|
+
sent: function sent() {
|
|
30113
|
+
if (t[0] & 1) throw t[1];
|
|
30114
|
+
return t[1];
|
|
30115
|
+
},
|
|
30116
|
+
trys: [],
|
|
30117
|
+
ops: []
|
|
30752
30118
|
},
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
y,
|
|
30758
|
-
t,
|
|
30759
|
-
g;
|
|
30119
|
+
f,
|
|
30120
|
+
y,
|
|
30121
|
+
t,
|
|
30122
|
+
g;
|
|
30760
30123
|
return g = {
|
|
30761
30124
|
next: verb(0),
|
|
30762
30125
|
"throw": verb(1),
|
|
@@ -30764,79 +30127,60 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
30764
30127
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
30765
30128
|
return this;
|
|
30766
30129
|
}), g;
|
|
30767
|
-
|
|
30768
30130
|
function verb(n) {
|
|
30769
30131
|
return function (v) {
|
|
30770
30132
|
return step([n, v]);
|
|
30771
30133
|
};
|
|
30772
30134
|
}
|
|
30773
|
-
|
|
30774
30135
|
function step(op) {
|
|
30775
30136
|
if (f) throw new TypeError("Generator is already executing.");
|
|
30776
|
-
|
|
30777
30137
|
while (_) {
|
|
30778
30138
|
try {
|
|
30779
30139
|
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;
|
|
30780
30140
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30781
|
-
|
|
30782
30141
|
switch (op[0]) {
|
|
30783
30142
|
case 0:
|
|
30784
30143
|
case 1:
|
|
30785
30144
|
t = op;
|
|
30786
30145
|
break;
|
|
30787
|
-
|
|
30788
30146
|
case 4:
|
|
30789
30147
|
_.label++;
|
|
30790
30148
|
return {
|
|
30791
30149
|
value: op[1],
|
|
30792
30150
|
done: false
|
|
30793
30151
|
};
|
|
30794
|
-
|
|
30795
30152
|
case 5:
|
|
30796
30153
|
_.label++;
|
|
30797
30154
|
y = op[1];
|
|
30798
30155
|
op = [0];
|
|
30799
30156
|
continue;
|
|
30800
|
-
|
|
30801
30157
|
case 7:
|
|
30802
30158
|
op = _.ops.pop();
|
|
30803
|
-
|
|
30804
30159
|
_.trys.pop();
|
|
30805
|
-
|
|
30806
30160
|
continue;
|
|
30807
|
-
|
|
30808
30161
|
default:
|
|
30809
30162
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
30810
30163
|
_ = 0;
|
|
30811
30164
|
continue;
|
|
30812
30165
|
}
|
|
30813
|
-
|
|
30814
30166
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
30815
30167
|
_.label = op[1];
|
|
30816
30168
|
break;
|
|
30817
30169
|
}
|
|
30818
|
-
|
|
30819
30170
|
if (op[0] === 6 && _.label < t[1]) {
|
|
30820
30171
|
_.label = t[1];
|
|
30821
30172
|
t = op;
|
|
30822
30173
|
break;
|
|
30823
30174
|
}
|
|
30824
|
-
|
|
30825
30175
|
if (t && _.label < t[2]) {
|
|
30826
30176
|
_.label = t[2];
|
|
30827
|
-
|
|
30828
30177
|
_.ops.push(op);
|
|
30829
|
-
|
|
30830
30178
|
break;
|
|
30831
30179
|
}
|
|
30832
|
-
|
|
30833
30180
|
if (t[2]) _.ops.pop();
|
|
30834
|
-
|
|
30835
30181
|
_.trys.pop();
|
|
30836
|
-
|
|
30837
30182
|
continue;
|
|
30838
30183
|
}
|
|
30839
|
-
|
|
30840
30184
|
op = body.call(thisArg, _);
|
|
30841
30185
|
} catch (e) {
|
|
30842
30186
|
op = [6, e];
|
|
@@ -30845,7 +30189,6 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
30845
30189
|
f = t = 0;
|
|
30846
30190
|
}
|
|
30847
30191
|
}
|
|
30848
|
-
|
|
30849
30192
|
if (op[0] & 5) throw op[1];
|
|
30850
30193
|
return {
|
|
30851
30194
|
value: op[0] ? op[1] : void 0,
|
|
@@ -30853,45 +30196,33 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
30853
30196
|
};
|
|
30854
30197
|
}
|
|
30855
30198
|
};
|
|
30856
|
-
|
|
30857
30199
|
var __rest = this && this.__rest || function (s, e) {
|
|
30858
30200
|
var t = {};
|
|
30859
|
-
|
|
30860
30201
|
for (var p in s) {
|
|
30861
30202
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
30862
30203
|
}
|
|
30863
|
-
|
|
30864
30204
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30865
30205
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
30866
30206
|
}
|
|
30867
30207
|
return t;
|
|
30868
30208
|
};
|
|
30869
|
-
|
|
30870
30209
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
30871
30210
|
return mod && mod.__esModule ? mod : {
|
|
30872
30211
|
"default": mod
|
|
30873
30212
|
};
|
|
30874
30213
|
};
|
|
30875
|
-
|
|
30876
30214
|
Object.defineProperty(exports, "__esModule", {
|
|
30877
30215
|
value: true
|
|
30878
30216
|
});
|
|
30879
|
-
|
|
30880
30217
|
var react_1 = __importDefault(__webpack_require__(/*! react */ "react"));
|
|
30881
|
-
|
|
30882
30218
|
var attachEventProps_1 = __webpack_require__(/*! ./utils/attachEventProps */ "./lib/react-component-lib/utils/attachEventProps.js");
|
|
30883
|
-
|
|
30884
30219
|
function createControllerComponent(displayName, controller) {
|
|
30885
30220
|
var dismissEventName = "on" + displayName + "DidDismiss";
|
|
30886
|
-
return (
|
|
30887
|
-
/** @class */
|
|
30888
|
-
function (_super) {
|
|
30221
|
+
return (/** @class */function (_super) {
|
|
30889
30222
|
__extends(ReactControllerComponent, _super);
|
|
30890
|
-
|
|
30891
30223
|
function ReactControllerComponent(props) {
|
|
30892
30224
|
return _super.call(this, props) || this;
|
|
30893
30225
|
}
|
|
30894
|
-
|
|
30895
30226
|
Object.defineProperty(ReactControllerComponent, "displayName", {
|
|
30896
30227
|
get: function get() {
|
|
30897
30228
|
return displayName;
|
|
@@ -30899,20 +30230,15 @@ function createControllerComponent(displayName, controller) {
|
|
|
30899
30230
|
enumerable: true,
|
|
30900
30231
|
configurable: true
|
|
30901
30232
|
});
|
|
30902
|
-
|
|
30903
30233
|
ReactControllerComponent.prototype.componentDidMount = function () {
|
|
30904
30234
|
return __awaiter(this, void 0, void 0, function () {
|
|
30905
30235
|
var isOpen;
|
|
30906
30236
|
return __generator(this, function (_a) {
|
|
30907
30237
|
isOpen = this.props.isOpen;
|
|
30908
|
-
|
|
30909
30238
|
if (isOpen) {
|
|
30910
30239
|
this.present();
|
|
30911
30240
|
}
|
|
30912
|
-
|
|
30913
|
-
return [2
|
|
30914
|
-
/*return*/
|
|
30915
|
-
];
|
|
30241
|
+
return [2 /*return*/];
|
|
30916
30242
|
});
|
|
30917
30243
|
});
|
|
30918
30244
|
};
|
|
@@ -30925,23 +30251,13 @@ function createControllerComponent(displayName, controller) {
|
|
|
30925
30251
|
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
|
30926
30252
|
this.present(prevProps);
|
|
30927
30253
|
}
|
|
30928
|
-
|
|
30929
|
-
|
|
30930
|
-
/*break*/
|
|
30931
|
-
, 2];
|
|
30932
|
-
return [4
|
|
30933
|
-
/*yield*/
|
|
30934
|
-
, this.controller.dismiss()];
|
|
30935
|
-
|
|
30254
|
+
if (!(this.controller && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false)) return [3 /*break*/, 2];
|
|
30255
|
+
return [4 /*yield*/, this.controller.dismiss()];
|
|
30936
30256
|
case 1:
|
|
30937
30257
|
_a.sent();
|
|
30938
|
-
|
|
30939
30258
|
_a.label = 2;
|
|
30940
|
-
|
|
30941
30259
|
case 2:
|
|
30942
|
-
return [2
|
|
30943
|
-
/*return*/
|
|
30944
|
-
];
|
|
30260
|
+
return [2 /*return*/];
|
|
30945
30261
|
}
|
|
30946
30262
|
});
|
|
30947
30263
|
});
|
|
@@ -30950,26 +30266,19 @@ function createControllerComponent(displayName, controller) {
|
|
|
30950
30266
|
ReactControllerComponent.prototype.present = function (prevProps) {
|
|
30951
30267
|
return __awaiter(this, void 0, void 0, function () {
|
|
30952
30268
|
var _a, isOpen, onDidDismiss, cProps, elementProps, _b;
|
|
30953
|
-
|
|
30954
30269
|
var _c;
|
|
30955
|
-
|
|
30956
30270
|
return __generator(this, function (_d) {
|
|
30957
30271
|
switch (_d.label) {
|
|
30958
30272
|
case 0:
|
|
30959
30273
|
_a = this.props, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, cProps = __rest(_a, ["isOpen", "onDidDismiss"]);
|
|
30960
30274
|
elementProps = __assign(__assign({}, cProps), (_c = {}, _c[dismissEventName] = onDidDismiss, _c));
|
|
30961
30275
|
_b = this;
|
|
30962
|
-
return [4
|
|
30963
|
-
/*yield*/
|
|
30964
|
-
, controller.create(__assign({}, elementProps))];
|
|
30965
|
-
|
|
30276
|
+
return [4 /*yield*/, controller.create(__assign({}, elementProps))];
|
|
30966
30277
|
case 1:
|
|
30967
30278
|
_b.controller = _d.sent();
|
|
30968
30279
|
attachEventProps_1.attachEventProps(this.controller, elementProps, prevProps);
|
|
30969
30280
|
this.controller.present();
|
|
30970
|
-
return [2
|
|
30971
|
-
/*return*/
|
|
30972
|
-
];
|
|
30281
|
+
return [2 /*return*/];
|
|
30973
30282
|
}
|
|
30974
30283
|
});
|
|
30975
30284
|
});
|
|
@@ -30978,12 +30287,10 @@ function createControllerComponent(displayName, controller) {
|
|
|
30978
30287
|
ReactControllerComponent.prototype.render = function () {
|
|
30979
30288
|
return null;
|
|
30980
30289
|
};
|
|
30981
|
-
|
|
30982
30290
|
return ReactControllerComponent;
|
|
30983
30291
|
}(react_1["default"].Component)
|
|
30984
30292
|
);
|
|
30985
30293
|
}
|
|
30986
|
-
|
|
30987
30294
|
exports.createControllerComponent = createControllerComponent;
|
|
30988
30295
|
|
|
30989
30296
|
/***/ }),
|
|
@@ -31009,44 +30316,34 @@ var __extends = this && this.__extends || function () {
|
|
|
31009
30316
|
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31010
30317
|
}
|
|
31011
30318
|
};
|
|
31012
|
-
|
|
31013
30319
|
return _extendStatics(d, b);
|
|
31014
30320
|
};
|
|
31015
|
-
|
|
31016
30321
|
return function (d, b) {
|
|
31017
30322
|
_extendStatics(d, b);
|
|
31018
|
-
|
|
31019
30323
|
function __() {
|
|
31020
30324
|
this.constructor = d;
|
|
31021
30325
|
}
|
|
31022
|
-
|
|
31023
30326
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31024
30327
|
};
|
|
31025
30328
|
}();
|
|
31026
|
-
|
|
31027
30329
|
var __assign = this && this.__assign || function () {
|
|
31028
30330
|
__assign = Object.assign || function (t) {
|
|
31029
30331
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31030
30332
|
s = arguments[i];
|
|
31031
|
-
|
|
31032
30333
|
for (var p in s) {
|
|
31033
30334
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
31034
30335
|
}
|
|
31035
30336
|
}
|
|
31036
|
-
|
|
31037
30337
|
return t;
|
|
31038
30338
|
};
|
|
31039
|
-
|
|
31040
30339
|
return __assign.apply(this, arguments);
|
|
31041
30340
|
};
|
|
31042
|
-
|
|
31043
30341
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
31044
30342
|
function adopt(value) {
|
|
31045
30343
|
return value instanceof P ? value : new P(function (resolve) {
|
|
31046
30344
|
resolve(value);
|
|
31047
30345
|
});
|
|
31048
30346
|
}
|
|
31049
|
-
|
|
31050
30347
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31051
30348
|
function fulfilled(value) {
|
|
31052
30349
|
try {
|
|
@@ -31055,7 +30352,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
31055
30352
|
reject(e);
|
|
31056
30353
|
}
|
|
31057
30354
|
}
|
|
31058
|
-
|
|
31059
30355
|
function rejected(value) {
|
|
31060
30356
|
try {
|
|
31061
30357
|
step(generator["throw"](value));
|
|
@@ -31063,29 +30359,26 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
31063
30359
|
reject(e);
|
|
31064
30360
|
}
|
|
31065
30361
|
}
|
|
31066
|
-
|
|
31067
30362
|
function step(result) {
|
|
31068
30363
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
31069
30364
|
}
|
|
31070
|
-
|
|
31071
30365
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31072
30366
|
});
|
|
31073
30367
|
};
|
|
31074
|
-
|
|
31075
30368
|
var __generator = this && this.__generator || function (thisArg, body) {
|
|
31076
30369
|
var _ = {
|
|
31077
|
-
|
|
31078
|
-
|
|
31079
|
-
|
|
31080
|
-
|
|
30370
|
+
label: 0,
|
|
30371
|
+
sent: function sent() {
|
|
30372
|
+
if (t[0] & 1) throw t[1];
|
|
30373
|
+
return t[1];
|
|
30374
|
+
},
|
|
30375
|
+
trys: [],
|
|
30376
|
+
ops: []
|
|
31081
30377
|
},
|
|
31082
|
-
|
|
31083
|
-
|
|
31084
|
-
|
|
31085
|
-
|
|
31086
|
-
y,
|
|
31087
|
-
t,
|
|
31088
|
-
g;
|
|
30378
|
+
f,
|
|
30379
|
+
y,
|
|
30380
|
+
t,
|
|
30381
|
+
g;
|
|
31089
30382
|
return g = {
|
|
31090
30383
|
next: verb(0),
|
|
31091
30384
|
"throw": verb(1),
|
|
@@ -31093,79 +30386,60 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31093
30386
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
31094
30387
|
return this;
|
|
31095
30388
|
}), g;
|
|
31096
|
-
|
|
31097
30389
|
function verb(n) {
|
|
31098
30390
|
return function (v) {
|
|
31099
30391
|
return step([n, v]);
|
|
31100
30392
|
};
|
|
31101
30393
|
}
|
|
31102
|
-
|
|
31103
30394
|
function step(op) {
|
|
31104
30395
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31105
|
-
|
|
31106
30396
|
while (_) {
|
|
31107
30397
|
try {
|
|
31108
30398
|
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;
|
|
31109
30399
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31110
|
-
|
|
31111
30400
|
switch (op[0]) {
|
|
31112
30401
|
case 0:
|
|
31113
30402
|
case 1:
|
|
31114
30403
|
t = op;
|
|
31115
30404
|
break;
|
|
31116
|
-
|
|
31117
30405
|
case 4:
|
|
31118
30406
|
_.label++;
|
|
31119
30407
|
return {
|
|
31120
30408
|
value: op[1],
|
|
31121
30409
|
done: false
|
|
31122
30410
|
};
|
|
31123
|
-
|
|
31124
30411
|
case 5:
|
|
31125
30412
|
_.label++;
|
|
31126
30413
|
y = op[1];
|
|
31127
30414
|
op = [0];
|
|
31128
30415
|
continue;
|
|
31129
|
-
|
|
31130
30416
|
case 7:
|
|
31131
30417
|
op = _.ops.pop();
|
|
31132
|
-
|
|
31133
30418
|
_.trys.pop();
|
|
31134
|
-
|
|
31135
30419
|
continue;
|
|
31136
|
-
|
|
31137
30420
|
default:
|
|
31138
30421
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
31139
30422
|
_ = 0;
|
|
31140
30423
|
continue;
|
|
31141
30424
|
}
|
|
31142
|
-
|
|
31143
30425
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
31144
30426
|
_.label = op[1];
|
|
31145
30427
|
break;
|
|
31146
30428
|
}
|
|
31147
|
-
|
|
31148
30429
|
if (op[0] === 6 && _.label < t[1]) {
|
|
31149
30430
|
_.label = t[1];
|
|
31150
30431
|
t = op;
|
|
31151
30432
|
break;
|
|
31152
30433
|
}
|
|
31153
|
-
|
|
31154
30434
|
if (t && _.label < t[2]) {
|
|
31155
30435
|
_.label = t[2];
|
|
31156
|
-
|
|
31157
30436
|
_.ops.push(op);
|
|
31158
|
-
|
|
31159
30437
|
break;
|
|
31160
30438
|
}
|
|
31161
|
-
|
|
31162
30439
|
if (t[2]) _.ops.pop();
|
|
31163
|
-
|
|
31164
30440
|
_.trys.pop();
|
|
31165
|
-
|
|
31166
30441
|
continue;
|
|
31167
30442
|
}
|
|
31168
|
-
|
|
31169
30443
|
op = body.call(thisArg, _);
|
|
31170
30444
|
} catch (e) {
|
|
31171
30445
|
op = [6, e];
|
|
@@ -31174,7 +30448,6 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31174
30448
|
f = t = 0;
|
|
31175
30449
|
}
|
|
31176
30450
|
}
|
|
31177
|
-
|
|
31178
30451
|
if (op[0] & 5) throw op[1];
|
|
31179
30452
|
return {
|
|
31180
30453
|
value: op[0] ? op[1] : void 0,
|
|
@@ -31182,50 +30455,36 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31182
30455
|
};
|
|
31183
30456
|
}
|
|
31184
30457
|
};
|
|
31185
|
-
|
|
31186
30458
|
var __rest = this && this.__rest || function (s, e) {
|
|
31187
30459
|
var t = {};
|
|
31188
|
-
|
|
31189
30460
|
for (var p in s) {
|
|
31190
30461
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
31191
30462
|
}
|
|
31192
|
-
|
|
31193
30463
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31194
30464
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
31195
30465
|
}
|
|
31196
30466
|
return t;
|
|
31197
30467
|
};
|
|
31198
|
-
|
|
31199
30468
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31200
30469
|
return mod && mod.__esModule ? mod : {
|
|
31201
30470
|
"default": mod
|
|
31202
30471
|
};
|
|
31203
30472
|
};
|
|
31204
|
-
|
|
31205
30473
|
Object.defineProperty(exports, "__esModule", {
|
|
31206
30474
|
value: true
|
|
31207
30475
|
});
|
|
31208
|
-
|
|
31209
30476
|
var react_1 = __importDefault(__webpack_require__(/*! react */ "react"));
|
|
31210
|
-
|
|
31211
30477
|
var react_dom_1 = __importDefault(__webpack_require__(/*! react-dom */ "../../node_modules/react-dom/index.js"));
|
|
31212
|
-
|
|
31213
30478
|
var attachEventProps_1 = __webpack_require__(/*! ./utils/attachEventProps */ "./lib/react-component-lib/utils/attachEventProps.js");
|
|
31214
|
-
|
|
31215
30479
|
function createOverlayComponent(displayName, controller) {
|
|
31216
30480
|
var dismissEventName = "on" + displayName + "DidDismiss";
|
|
31217
|
-
return (
|
|
31218
|
-
/** @class */
|
|
31219
|
-
function (_super) {
|
|
30481
|
+
return (/** @class */function (_super) {
|
|
31220
30482
|
__extends(ReactOverlayComponent, _super);
|
|
31221
|
-
|
|
31222
30483
|
function ReactOverlayComponent(props) {
|
|
31223
30484
|
var _this = _super.call(this, props) || this;
|
|
31224
|
-
|
|
31225
30485
|
_this.el = document.createElement('div');
|
|
31226
30486
|
return _this;
|
|
31227
30487
|
}
|
|
31228
|
-
|
|
31229
30488
|
Object.defineProperty(ReactOverlayComponent, "displayName", {
|
|
31230
30489
|
get: function get() {
|
|
31231
30490
|
return displayName;
|
|
@@ -31233,13 +30492,11 @@ function createOverlayComponent(displayName, controller) {
|
|
|
31233
30492
|
enumerable: true,
|
|
31234
30493
|
configurable: true
|
|
31235
30494
|
});
|
|
31236
|
-
|
|
31237
30495
|
ReactOverlayComponent.prototype.componentDidMount = function () {
|
|
31238
30496
|
if (this.props.isOpen) {
|
|
31239
30497
|
this.present();
|
|
31240
30498
|
}
|
|
31241
30499
|
};
|
|
31242
|
-
|
|
31243
30500
|
ReactOverlayComponent.prototype.componentDidUpdate = function (prevProps) {
|
|
31244
30501
|
return __awaiter(this, void 0, void 0, function () {
|
|
31245
30502
|
return __generator(this, function (_a) {
|
|
@@ -31248,23 +30505,13 @@ function createOverlayComponent(displayName, controller) {
|
|
|
31248
30505
|
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
|
31249
30506
|
this.present(prevProps);
|
|
31250
30507
|
}
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
/*break*/
|
|
31254
|
-
, 2];
|
|
31255
|
-
return [4
|
|
31256
|
-
/*yield*/
|
|
31257
|
-
, this.controller.dismiss()];
|
|
31258
|
-
|
|
30508
|
+
if (!(this.controller && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false)) return [3 /*break*/, 2];
|
|
30509
|
+
return [4 /*yield*/, this.controller.dismiss()];
|
|
31259
30510
|
case 1:
|
|
31260
30511
|
_a.sent();
|
|
31261
|
-
|
|
31262
30512
|
_a.label = 2;
|
|
31263
|
-
|
|
31264
30513
|
case 2:
|
|
31265
|
-
return [2
|
|
31266
|
-
/*return*/
|
|
31267
|
-
];
|
|
30514
|
+
return [2 /*return*/];
|
|
31268
30515
|
}
|
|
31269
30516
|
});
|
|
31270
30517
|
});
|
|
@@ -31273,29 +30520,22 @@ function createOverlayComponent(displayName, controller) {
|
|
|
31273
30520
|
ReactOverlayComponent.prototype.present = function (prevProps) {
|
|
31274
30521
|
return __awaiter(this, void 0, void 0, function () {
|
|
31275
30522
|
var _a, children, isOpen, _b, onDidDismiss, cProps, elementProps, _c;
|
|
31276
|
-
|
|
31277
30523
|
var _d;
|
|
31278
|
-
|
|
31279
30524
|
return __generator(this, function (_e) {
|
|
31280
30525
|
switch (_e.label) {
|
|
31281
30526
|
case 0:
|
|
31282
30527
|
_a = this.props, children = _a.children, isOpen = _a.isOpen, _b = _a.onDidDismiss, onDidDismiss = _b === void 0 ? function () {} : _b, cProps = __rest(_a, ["children", "isOpen", "onDidDismiss"]);
|
|
31283
30528
|
elementProps = __assign(__assign({}, cProps), (_d = {}, _d[dismissEventName] = onDidDismiss, _d));
|
|
31284
30529
|
_c = this;
|
|
31285
|
-
return [4
|
|
31286
|
-
/*yield*/
|
|
31287
|
-
, controller.create(__assign(__assign({}, elementProps), {
|
|
30530
|
+
return [4 /*yield*/, controller.create(__assign(__assign({}, elementProps), {
|
|
31288
30531
|
component: this.el,
|
|
31289
30532
|
componentProps: {}
|
|
31290
30533
|
}))];
|
|
31291
|
-
|
|
31292
30534
|
case 1:
|
|
31293
30535
|
_c.controller = _e.sent();
|
|
31294
30536
|
attachEventProps_1.attachEventProps(this.controller, elementProps, prevProps);
|
|
31295
30537
|
this.controller.present();
|
|
31296
|
-
return [2
|
|
31297
|
-
/*return*/
|
|
31298
|
-
];
|
|
30538
|
+
return [2 /*return*/];
|
|
31299
30539
|
}
|
|
31300
30540
|
});
|
|
31301
30541
|
});
|
|
@@ -31304,12 +30544,10 @@ function createOverlayComponent(displayName, controller) {
|
|
|
31304
30544
|
ReactOverlayComponent.prototype.render = function () {
|
|
31305
30545
|
return react_dom_1["default"].createPortal(this.props.children, this.el);
|
|
31306
30546
|
};
|
|
31307
|
-
|
|
31308
30547
|
return ReactOverlayComponent;
|
|
31309
30548
|
}(react_1["default"].Component)
|
|
31310
30549
|
);
|
|
31311
30550
|
}
|
|
31312
|
-
|
|
31313
30551
|
exports.createOverlayComponent = createOverlayComponent;
|
|
31314
30552
|
|
|
31315
30553
|
/***/ }),
|
|
@@ -31327,17 +30565,11 @@ exports.createOverlayComponent = createOverlayComponent;
|
|
|
31327
30565
|
Object.defineProperty(exports, "__esModule", {
|
|
31328
30566
|
value: true
|
|
31329
30567
|
});
|
|
31330
|
-
|
|
31331
30568
|
var createComponent_1 = __webpack_require__(/*! ./createComponent */ "./lib/react-component-lib/createComponent.js");
|
|
31332
|
-
|
|
31333
30569
|
exports.createReactComponent = createComponent_1.createReactComponent;
|
|
31334
|
-
|
|
31335
30570
|
var createControllerComponent_1 = __webpack_require__(/*! ./createControllerComponent */ "./lib/react-component-lib/createControllerComponent.js");
|
|
31336
|
-
|
|
31337
30571
|
exports.createControllerComponent = createControllerComponent_1.createControllerComponent;
|
|
31338
|
-
|
|
31339
30572
|
var createOverlayComponent_1 = __webpack_require__(/*! ./createOverlayComponent */ "./lib/react-component-lib/createOverlayComponent.js");
|
|
31340
|
-
|
|
31341
30573
|
exports.createOverlayComponent = createOverlayComponent_1.createOverlayComponent;
|
|
31342
30574
|
|
|
31343
30575
|
/***/ }),
|
|
@@ -31355,27 +30587,21 @@ exports.createOverlayComponent = createOverlayComponent_1.createOverlayComponent
|
|
|
31355
30587
|
Object.defineProperty(exports, "__esModule", {
|
|
31356
30588
|
value: true
|
|
31357
30589
|
});
|
|
31358
|
-
|
|
31359
30590
|
function attachEventProps(node, newProps, oldProps) {
|
|
31360
30591
|
if (oldProps === void 0) {
|
|
31361
30592
|
oldProps = {};
|
|
31362
30593
|
}
|
|
31363
|
-
|
|
31364
30594
|
var className = getClassName(node.classList, newProps, oldProps);
|
|
31365
|
-
|
|
31366
30595
|
if (className) {
|
|
31367
30596
|
node.className = className;
|
|
31368
30597
|
}
|
|
31369
|
-
|
|
31370
30598
|
Object.keys(newProps).forEach(function (name) {
|
|
31371
30599
|
if (name === 'children' || name === 'style' || name === 'ref' || name === 'className') {
|
|
31372
30600
|
return;
|
|
31373
30601
|
}
|
|
31374
|
-
|
|
31375
30602
|
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
31376
30603
|
var eventName = name.substring(2);
|
|
31377
30604
|
var eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
31378
|
-
|
|
31379
30605
|
if (!isCoveredByReact(eventNameLc)) {
|
|
31380
30606
|
syncEvent(node, eventNameLc, newProps[name]);
|
|
31381
30607
|
}
|
|
@@ -31384,17 +30610,15 @@ function attachEventProps(node, newProps, oldProps) {
|
|
|
31384
30610
|
}
|
|
31385
30611
|
});
|
|
31386
30612
|
}
|
|
31387
|
-
|
|
31388
30613
|
exports.attachEventProps = attachEventProps;
|
|
31389
|
-
|
|
31390
30614
|
function getClassName(classList, newProps, oldProps) {
|
|
31391
30615
|
// map the classes to Maps for performance
|
|
31392
30616
|
var currentClasses = arrayToMap(classList);
|
|
31393
30617
|
var incomingPropClasses = arrayToMap(newProps.className ? newProps.className.split(' ') : []);
|
|
31394
30618
|
var oldPropClasses = arrayToMap(oldProps.className ? oldProps.className.split(' ') : []);
|
|
31395
|
-
var finalClassNames = [];
|
|
30619
|
+
var finalClassNames = [];
|
|
30620
|
+
// loop through each of the current classes on the component
|
|
31396
30621
|
// to see if it should be a part of the classNames added
|
|
31397
|
-
|
|
31398
30622
|
currentClasses.forEach(function (currentClass) {
|
|
31399
30623
|
if (incomingPropClasses.has(currentClass)) {
|
|
31400
30624
|
// add it as its already included in classnames coming in from newProps
|
|
@@ -31410,40 +30634,32 @@ function getClassName(classList, newProps, oldProps) {
|
|
|
31410
30634
|
});
|
|
31411
30635
|
return finalClassNames.join(' ');
|
|
31412
30636
|
}
|
|
31413
|
-
|
|
31414
30637
|
exports.getClassName = getClassName;
|
|
31415
30638
|
/**
|
|
31416
30639
|
* Checks if an event is supported in the current execution environment.
|
|
31417
30640
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
31418
30641
|
*/
|
|
31419
|
-
|
|
31420
30642
|
function isCoveredByReact(eventNameSuffix, doc) {
|
|
31421
30643
|
if (doc === void 0) {
|
|
31422
30644
|
doc = document;
|
|
31423
30645
|
}
|
|
31424
|
-
|
|
31425
30646
|
var eventName = 'on' + eventNameSuffix;
|
|
31426
30647
|
var isSupported = (eventName in doc);
|
|
31427
|
-
|
|
31428
30648
|
if (!isSupported) {
|
|
31429
30649
|
var element = doc.createElement('div');
|
|
31430
30650
|
element.setAttribute(eventName, 'return;');
|
|
31431
30651
|
isSupported = typeof element[eventName] === 'function';
|
|
31432
30652
|
}
|
|
31433
|
-
|
|
31434
30653
|
return isSupported;
|
|
31435
30654
|
}
|
|
31436
|
-
|
|
31437
30655
|
exports.isCoveredByReact = isCoveredByReact;
|
|
31438
|
-
|
|
31439
30656
|
function syncEvent(node, eventName, newEventHandler) {
|
|
31440
30657
|
var eventStore = node.__events || (node.__events = {});
|
|
31441
|
-
var oldEventHandler = eventStore[eventName];
|
|
31442
|
-
|
|
30658
|
+
var oldEventHandler = eventStore[eventName];
|
|
30659
|
+
// Remove old listener so they don't double up.
|
|
31443
30660
|
if (oldEventHandler) {
|
|
31444
30661
|
node.removeEventListener(eventName, oldEventHandler);
|
|
31445
30662
|
}
|
|
31446
|
-
|
|
31447
30663
|
if (newEventHandler != null) {
|
|
31448
30664
|
// Bind new listener.
|
|
31449
30665
|
node.addEventListener(eventName, eventStore[eventName] = function handler(e) {
|
|
@@ -31451,9 +30667,7 @@ function syncEvent(node, eventName, newEventHandler) {
|
|
|
31451
30667
|
});
|
|
31452
30668
|
}
|
|
31453
30669
|
}
|
|
31454
|
-
|
|
31455
30670
|
exports.syncEvent = syncEvent;
|
|
31456
|
-
|
|
31457
30671
|
function arrayToMap(arr) {
|
|
31458
30672
|
var map = new Map();
|
|
31459
30673
|
arr.forEach(function (s) {
|
|
@@ -31478,53 +30692,42 @@ var __assign = this && this.__assign || function () {
|
|
|
31478
30692
|
__assign = Object.assign || function (t) {
|
|
31479
30693
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31480
30694
|
s = arguments[i];
|
|
31481
|
-
|
|
31482
30695
|
for (var p in s) {
|
|
31483
30696
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
31484
30697
|
}
|
|
31485
30698
|
}
|
|
31486
|
-
|
|
31487
30699
|
return t;
|
|
31488
30700
|
};
|
|
31489
|
-
|
|
31490
30701
|
return __assign.apply(this, arguments);
|
|
31491
30702
|
};
|
|
31492
|
-
|
|
31493
30703
|
function __export(m) {
|
|
31494
30704
|
for (var p in m) {
|
|
31495
30705
|
if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
31496
30706
|
}
|
|
31497
30707
|
}
|
|
31498
|
-
|
|
31499
30708
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31500
30709
|
return mod && mod.__esModule ? mod : {
|
|
31501
30710
|
"default": mod
|
|
31502
30711
|
};
|
|
31503
30712
|
};
|
|
31504
|
-
|
|
31505
30713
|
Object.defineProperty(exports, "__esModule", {
|
|
31506
30714
|
value: true
|
|
31507
30715
|
});
|
|
31508
|
-
|
|
31509
30716
|
var react_1 = __importDefault(__webpack_require__(/*! react */ "react"));
|
|
31510
|
-
|
|
31511
30717
|
exports.dashToPascalCase = function (str) {
|
|
31512
30718
|
return str.toLowerCase().split('-').map(function (segment) {
|
|
31513
30719
|
return segment.charAt(0).toUpperCase() + segment.slice(1);
|
|
31514
30720
|
}).join('');
|
|
31515
30721
|
};
|
|
31516
|
-
|
|
31517
30722
|
exports.createForwardRef = function (ReactComponent, displayName) {
|
|
31518
30723
|
var forwardRef = function forwardRef(props, ref) {
|
|
31519
30724
|
return react_1["default"].createElement(ReactComponent, __assign({}, props, {
|
|
31520
30725
|
forwardedRef: ref
|
|
31521
30726
|
}));
|
|
31522
30727
|
};
|
|
31523
|
-
|
|
31524
30728
|
forwardRef.displayName = displayName;
|
|
31525
30729
|
return react_1["default"].forwardRef(forwardRef);
|
|
31526
30730
|
};
|
|
31527
|
-
|
|
31528
30731
|
__export(__webpack_require__(/*! ./attachEventProps */ "./lib/react-component-lib/utils/attachEventProps.js"));
|
|
31529
30732
|
|
|
31530
30733
|
/***/ }),
|
|
@@ -31543,25 +30746,20 @@ var __assign = this && this.__assign || function () {
|
|
|
31543
30746
|
__assign = Object.assign || function (t) {
|
|
31544
30747
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31545
30748
|
s = arguments[i];
|
|
31546
|
-
|
|
31547
30749
|
for (var p in s) {
|
|
31548
30750
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
31549
30751
|
}
|
|
31550
30752
|
}
|
|
31551
|
-
|
|
31552
30753
|
return t;
|
|
31553
30754
|
};
|
|
31554
|
-
|
|
31555
30755
|
return __assign.apply(this, arguments);
|
|
31556
30756
|
};
|
|
31557
|
-
|
|
31558
30757
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
31559
30758
|
function adopt(value) {
|
|
31560
30759
|
return value instanceof P ? value : new P(function (resolve) {
|
|
31561
30760
|
resolve(value);
|
|
31562
30761
|
});
|
|
31563
30762
|
}
|
|
31564
|
-
|
|
31565
30763
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31566
30764
|
function fulfilled(value) {
|
|
31567
30765
|
try {
|
|
@@ -31570,7 +30768,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
31570
30768
|
reject(e);
|
|
31571
30769
|
}
|
|
31572
30770
|
}
|
|
31573
|
-
|
|
31574
30771
|
function rejected(value) {
|
|
31575
30772
|
try {
|
|
31576
30773
|
step(generator["throw"](value));
|
|
@@ -31578,29 +30775,26 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
31578
30775
|
reject(e);
|
|
31579
30776
|
}
|
|
31580
30777
|
}
|
|
31581
|
-
|
|
31582
30778
|
function step(result) {
|
|
31583
30779
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
31584
30780
|
}
|
|
31585
|
-
|
|
31586
30781
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31587
30782
|
});
|
|
31588
30783
|
};
|
|
31589
|
-
|
|
31590
30784
|
var __generator = this && this.__generator || function (thisArg, body) {
|
|
31591
30785
|
var _ = {
|
|
31592
|
-
|
|
31593
|
-
|
|
31594
|
-
|
|
31595
|
-
|
|
30786
|
+
label: 0,
|
|
30787
|
+
sent: function sent() {
|
|
30788
|
+
if (t[0] & 1) throw t[1];
|
|
30789
|
+
return t[1];
|
|
30790
|
+
},
|
|
30791
|
+
trys: [],
|
|
30792
|
+
ops: []
|
|
31596
30793
|
},
|
|
31597
|
-
|
|
31598
|
-
|
|
31599
|
-
|
|
31600
|
-
|
|
31601
|
-
y,
|
|
31602
|
-
t,
|
|
31603
|
-
g;
|
|
30794
|
+
f,
|
|
30795
|
+
y,
|
|
30796
|
+
t,
|
|
30797
|
+
g;
|
|
31604
30798
|
return g = {
|
|
31605
30799
|
next: verb(0),
|
|
31606
30800
|
"throw": verb(1),
|
|
@@ -31608,79 +30802,60 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31608
30802
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
31609
30803
|
return this;
|
|
31610
30804
|
}), g;
|
|
31611
|
-
|
|
31612
30805
|
function verb(n) {
|
|
31613
30806
|
return function (v) {
|
|
31614
30807
|
return step([n, v]);
|
|
31615
30808
|
};
|
|
31616
30809
|
}
|
|
31617
|
-
|
|
31618
30810
|
function step(op) {
|
|
31619
30811
|
if (f) throw new TypeError("Generator is already executing.");
|
|
31620
|
-
|
|
31621
30812
|
while (_) {
|
|
31622
30813
|
try {
|
|
31623
30814
|
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;
|
|
31624
30815
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31625
|
-
|
|
31626
30816
|
switch (op[0]) {
|
|
31627
30817
|
case 0:
|
|
31628
30818
|
case 1:
|
|
31629
30819
|
t = op;
|
|
31630
30820
|
break;
|
|
31631
|
-
|
|
31632
30821
|
case 4:
|
|
31633
30822
|
_.label++;
|
|
31634
30823
|
return {
|
|
31635
30824
|
value: op[1],
|
|
31636
30825
|
done: false
|
|
31637
30826
|
};
|
|
31638
|
-
|
|
31639
30827
|
case 5:
|
|
31640
30828
|
_.label++;
|
|
31641
30829
|
y = op[1];
|
|
31642
30830
|
op = [0];
|
|
31643
30831
|
continue;
|
|
31644
|
-
|
|
31645
30832
|
case 7:
|
|
31646
30833
|
op = _.ops.pop();
|
|
31647
|
-
|
|
31648
30834
|
_.trys.pop();
|
|
31649
|
-
|
|
31650
30835
|
continue;
|
|
31651
|
-
|
|
31652
30836
|
default:
|
|
31653
30837
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
31654
30838
|
_ = 0;
|
|
31655
30839
|
continue;
|
|
31656
30840
|
}
|
|
31657
|
-
|
|
31658
30841
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
31659
30842
|
_.label = op[1];
|
|
31660
30843
|
break;
|
|
31661
30844
|
}
|
|
31662
|
-
|
|
31663
30845
|
if (op[0] === 6 && _.label < t[1]) {
|
|
31664
30846
|
_.label = t[1];
|
|
31665
30847
|
t = op;
|
|
31666
30848
|
break;
|
|
31667
30849
|
}
|
|
31668
|
-
|
|
31669
30850
|
if (t && _.label < t[2]) {
|
|
31670
30851
|
_.label = t[2];
|
|
31671
|
-
|
|
31672
30852
|
_.ops.push(op);
|
|
31673
|
-
|
|
31674
30853
|
break;
|
|
31675
30854
|
}
|
|
31676
|
-
|
|
31677
30855
|
if (t[2]) _.ops.pop();
|
|
31678
|
-
|
|
31679
30856
|
_.trys.pop();
|
|
31680
|
-
|
|
31681
30857
|
continue;
|
|
31682
30858
|
}
|
|
31683
|
-
|
|
31684
30859
|
op = body.call(thisArg, _);
|
|
31685
30860
|
} catch (e) {
|
|
31686
30861
|
op = [6, e];
|
|
@@ -31689,7 +30864,6 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31689
30864
|
f = t = 0;
|
|
31690
30865
|
}
|
|
31691
30866
|
}
|
|
31692
|
-
|
|
31693
30867
|
if (op[0] & 5) throw op[1];
|
|
31694
30868
|
return {
|
|
31695
30869
|
value: op[0] ? op[1] : void 0,
|
|
@@ -31697,15 +30871,13 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
31697
30871
|
};
|
|
31698
30872
|
}
|
|
31699
30873
|
};
|
|
31700
|
-
|
|
31701
30874
|
var __read = this && this.__read || function (o, n) {
|
|
31702
30875
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
31703
30876
|
if (!m) return o;
|
|
31704
30877
|
var i = m.call(o),
|
|
31705
|
-
|
|
31706
|
-
|
|
31707
|
-
|
|
31708
|
-
|
|
30878
|
+
r,
|
|
30879
|
+
ar = [],
|
|
30880
|
+
e;
|
|
31709
30881
|
try {
|
|
31710
30882
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
31711
30883
|
ar.push(r.value);
|
|
@@ -31721,44 +30893,32 @@ var __read = this && this.__read || function (o, n) {
|
|
|
31721
30893
|
if (e) throw e.error;
|
|
31722
30894
|
}
|
|
31723
30895
|
}
|
|
31724
|
-
|
|
31725
30896
|
return ar;
|
|
31726
30897
|
};
|
|
31727
|
-
|
|
31728
30898
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31729
30899
|
return mod && mod.__esModule ? mod : {
|
|
31730
30900
|
"default": mod
|
|
31731
30901
|
};
|
|
31732
30902
|
};
|
|
31733
|
-
|
|
31734
30903
|
Object.defineProperty(exports, "__esModule", {
|
|
31735
30904
|
value: true
|
|
31736
30905
|
});
|
|
31737
|
-
|
|
31738
30906
|
var react_1 = __importDefault(__webpack_require__(/*! react */ "react"));
|
|
31739
|
-
|
|
31740
30907
|
var auth_1 = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
31741
|
-
|
|
31742
30908
|
var _1 = __webpack_require__(/*! ./ */ "./lib/index.js");
|
|
31743
|
-
|
|
31744
30909
|
var ui_components_1 = __webpack_require__(/*! @aws-amplify/ui-components */ "../amplify-ui-components/dist/index.mjs");
|
|
31745
|
-
|
|
31746
30910
|
var core_1 = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
31747
|
-
|
|
31748
30911
|
var logger = new core_1.Logger('withAuthenticator');
|
|
31749
|
-
|
|
31750
30912
|
function withAuthenticator(Component, authenticatorProps) {
|
|
31751
30913
|
var AppWithAuthenticator = function AppWithAuthenticator(props) {
|
|
31752
30914
|
var _a = __read(react_1["default"].useState(false), 2),
|
|
31753
|
-
|
|
31754
|
-
|
|
31755
|
-
|
|
30915
|
+
signedIn = _a[0],
|
|
30916
|
+
setSignedIn = _a[1];
|
|
31756
30917
|
react_1["default"].useEffect(function () {
|
|
31757
|
-
auth_1.appendToCognitoUserAgent('withAuthenticator');
|
|
31758
|
-
|
|
30918
|
+
auth_1.appendToCognitoUserAgent('withAuthenticator');
|
|
30919
|
+
// checkUser returns an "unsubscribe" function to stop side-effects
|
|
31759
30920
|
return checkUser();
|
|
31760
30921
|
}, []);
|
|
31761
|
-
|
|
31762
30922
|
function checkUser() {
|
|
31763
30923
|
setUser();
|
|
31764
30924
|
return ui_components_1.onAuthUIStateChange(function (authState) {
|
|
@@ -31769,7 +30929,6 @@ function withAuthenticator(Component, authenticatorProps) {
|
|
|
31769
30929
|
}
|
|
31770
30930
|
});
|
|
31771
30931
|
}
|
|
31772
|
-
|
|
31773
30932
|
function setUser() {
|
|
31774
30933
|
return __awaiter(this, void 0, void 0, function () {
|
|
31775
30934
|
var user, err_1;
|
|
@@ -31777,46 +30936,30 @@ function withAuthenticator(Component, authenticatorProps) {
|
|
|
31777
30936
|
switch (_a.label) {
|
|
31778
30937
|
case 0:
|
|
31779
30938
|
_a.trys.push([0, 2,, 3]);
|
|
31780
|
-
|
|
31781
|
-
return [4
|
|
31782
|
-
/*yield*/
|
|
31783
|
-
, auth_1.Auth.currentAuthenticatedUser()];
|
|
31784
|
-
|
|
30939
|
+
return [4 /*yield*/, auth_1.Auth.currentAuthenticatedUser()];
|
|
31785
30940
|
case 1:
|
|
31786
30941
|
user = _a.sent();
|
|
31787
30942
|
if (user) setSignedIn(true);
|
|
31788
|
-
return [3
|
|
31789
|
-
/*break*/
|
|
31790
|
-
, 3];
|
|
31791
|
-
|
|
30943
|
+
return [3 /*break*/, 3];
|
|
31792
30944
|
case 2:
|
|
31793
30945
|
err_1 = _a.sent();
|
|
31794
30946
|
logger.debug(err_1);
|
|
31795
|
-
return [3
|
|
31796
|
-
/*break*/
|
|
31797
|
-
, 3];
|
|
31798
|
-
|
|
30947
|
+
return [3 /*break*/, 3];
|
|
31799
30948
|
case 3:
|
|
31800
|
-
return [2
|
|
31801
|
-
/*return*/
|
|
31802
|
-
];
|
|
30949
|
+
return [2 /*return*/];
|
|
31803
30950
|
}
|
|
31804
30951
|
});
|
|
31805
30952
|
});
|
|
31806
30953
|
}
|
|
31807
30954
|
|
|
31808
30955
|
;
|
|
31809
|
-
|
|
31810
30956
|
if (!signedIn) {
|
|
31811
30957
|
return react_1["default"].createElement(_1.AmplifyContainer, null, react_1["default"].createElement(_1.AmplifyAuthContainer, null, react_1["default"].createElement(_1.AmplifyAuthenticator, __assign({}, authenticatorProps, props))));
|
|
31812
30958
|
}
|
|
31813
|
-
|
|
31814
30959
|
return react_1["default"].createElement(Component, __assign({}, props));
|
|
31815
30960
|
};
|
|
31816
|
-
|
|
31817
30961
|
return AppWithAuthenticator;
|
|
31818
30962
|
}
|
|
31819
|
-
|
|
31820
30963
|
exports.withAuthenticator = withAuthenticator;
|
|
31821
30964
|
|
|
31822
30965
|
/***/ }),
|