lwc 2.32.0 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-dom/esm/es2017/engine-dom.js +898 -802
- package/dist/engine-dom/iife/es2017/engine-dom.js +898 -802
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +683 -608
- package/dist/engine-dom/iife/es5/engine-dom.js +324 -313
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +234 -270
- package/dist/engine-dom/umd/es2017/engine-dom.js +898 -802
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +683 -608
- package/dist/engine-dom/umd/es5/engine-dom.js +324 -313
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +234 -270
- package/dist/engine-server/commonjs/es2017/engine-server.js +871 -696
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +871 -696
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +644 -882
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +89 -347
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +89 -347
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +644 -882
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +89 -347
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +89 -347
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +5 -3
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +5 -3
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +5 -3
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +5 -3
- package/package.json +7 -7
|
@@ -4,9 +4,7 @@ var LWC = (function (exports) {
|
|
|
4
4
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf2(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
5
5
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
6
6
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
7
|
-
function
|
|
8
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf2(object); if (object === null) break; } return object; }
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
8
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf2(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf2(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -15,15 +13,17 @@ var LWC = (function (exports) {
|
|
|
15
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
14
|
function _getPrototypeOf2(o) { _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf2(o); }
|
|
17
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
19
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
20
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
21
21
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
22
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
23
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
24
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
25
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
26
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
29
29
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -168,6 +168,9 @@ var LWC = (function (exports) {
|
|
|
168
168
|
* The above list of 46 aria attributes is consistent with the following resources:
|
|
169
169
|
* https://github.com/w3c/aria/pull/708/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR11060
|
|
170
170
|
* https://wicg.github.io/aom/spec/aria-reflection.html
|
|
171
|
+
*
|
|
172
|
+
* NOTE: If you update this list, please update test files that implicitly reference this list!
|
|
173
|
+
* Searching the codebase for `aria-flowto` and `ariaFlowTo` should be good enough to find all usages.
|
|
171
174
|
*/
|
|
172
175
|
var AriaPropertyNames = ['ariaActiveDescendant', 'ariaAtomic', 'ariaAutoComplete', 'ariaBusy', 'ariaChecked', 'ariaColCount', 'ariaColIndex', 'ariaColSpan', 'ariaControls', 'ariaCurrent', 'ariaDescribedBy', 'ariaDetails', 'ariaDisabled', 'ariaErrorMessage', 'ariaExpanded', 'ariaFlowTo', 'ariaHasPopup', 'ariaHidden', 'ariaInvalid', 'ariaKeyShortcuts', 'ariaLabel', 'ariaLabelledBy', 'ariaLevel', 'ariaLive', 'ariaModal', 'ariaMultiLine', 'ariaMultiSelectable', 'ariaOrientation', 'ariaOwns', 'ariaPlaceholder', 'ariaPosInSet', 'ariaPressed', 'ariaReadOnly', 'ariaRelevant', 'ariaRequired', 'ariaRoleDescription', 'ariaRowCount', 'ariaRowIndex', 'ariaRowSpan', 'ariaSelected', 'ariaSetSize', 'ariaSort', 'ariaValueMax', 'ariaValueMin', 'ariaValueNow', 'ariaValueText', 'role'];
|
|
173
176
|
var _ref = /*@__PURE__*/function () {
|
|
@@ -328,88 +331,7 @@ var LWC = (function (exports) {
|
|
|
328
331
|
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
329
332
|
return propertyName;
|
|
330
333
|
}
|
|
331
|
-
/** version: 2.
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
335
|
-
*/
|
|
336
|
-
|
|
337
|
-
/*
|
|
338
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
339
|
-
* All rights reserved.
|
|
340
|
-
* SPDX-License-Identifier: MIT
|
|
341
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
342
|
-
*/
|
|
343
|
-
function detect(propName) {
|
|
344
|
-
return getOwnPropertyDescriptor$1(Element.prototype, propName) === undefined;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/*
|
|
348
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
349
|
-
* All rights reserved.
|
|
350
|
-
* SPDX-License-Identifier: MIT
|
|
351
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
352
|
-
*/
|
|
353
|
-
var nodeToAriaPropertyValuesMap = new WeakMap();
|
|
354
|
-
function getAriaPropertyMap(elm) {
|
|
355
|
-
var map = nodeToAriaPropertyValuesMap.get(elm);
|
|
356
|
-
if (map === undefined) {
|
|
357
|
-
map = {};
|
|
358
|
-
nodeToAriaPropertyValuesMap.set(elm, map);
|
|
359
|
-
}
|
|
360
|
-
return map;
|
|
361
|
-
}
|
|
362
|
-
function getNormalizedAriaPropertyValue(value) {
|
|
363
|
-
return value == null ? null : String(value);
|
|
364
|
-
}
|
|
365
|
-
function createAriaPropertyPropertyDescriptor(propName, attrName) {
|
|
366
|
-
return {
|
|
367
|
-
get: function get() {
|
|
368
|
-
var map = getAriaPropertyMap(this);
|
|
369
|
-
if (hasOwnProperty$1.call(map, propName)) {
|
|
370
|
-
return map[propName];
|
|
371
|
-
}
|
|
372
|
-
// otherwise just reflect what's in the attribute
|
|
373
|
-
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
374
|
-
},
|
|
375
|
-
set: function set(newValue) {
|
|
376
|
-
var normalizedValue = getNormalizedAriaPropertyValue(newValue);
|
|
377
|
-
var map = getAriaPropertyMap(this);
|
|
378
|
-
map[propName] = normalizedValue;
|
|
379
|
-
// reflect into the corresponding attribute
|
|
380
|
-
if (newValue === null) {
|
|
381
|
-
this.removeAttribute(attrName);
|
|
382
|
-
} else {
|
|
383
|
-
this.setAttribute(attrName, newValue);
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
configurable: true,
|
|
387
|
-
enumerable: true
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
function patch$1(propName) {
|
|
391
|
-
// Typescript is inferring the wrong function type for this particular
|
|
392
|
-
// overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
|
|
393
|
-
// @ts-ignore type-mismatch
|
|
394
|
-
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
395
|
-
var descriptor = createAriaPropertyPropertyDescriptor(propName, attrName);
|
|
396
|
-
Object.defineProperty(Element.prototype, propName, descriptor);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/*
|
|
400
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
401
|
-
* All rights reserved.
|
|
402
|
-
* SPDX-License-Identifier: MIT
|
|
403
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
404
|
-
*/
|
|
405
|
-
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
406
|
-
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
407
|
-
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
408
|
-
if (detect(propName)) {
|
|
409
|
-
patch$1(propName);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
/** version: 2.32.0 */
|
|
334
|
+
/** version: 2.33.0 */
|
|
413
335
|
|
|
414
336
|
/**
|
|
415
337
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -423,19 +345,15 @@ var LWC = (function (exports) {
|
|
|
423
345
|
*/
|
|
424
346
|
var features = {
|
|
425
347
|
DUMMY_TEST_FLAG: null,
|
|
426
|
-
ENABLE_ELEMENT_PATCH: null,
|
|
427
348
|
ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
|
|
428
|
-
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
429
|
-
ENABLE_INNER_OUTER_TEXT_PATCH: null,
|
|
430
349
|
ENABLE_MIXED_SHADOW_MODE: null,
|
|
431
350
|
ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: null,
|
|
432
|
-
ENABLE_NODE_LIST_PATCH: null,
|
|
433
|
-
ENABLE_NODE_PATCH: null,
|
|
434
|
-
ENABLE_REACTIVE_SETTER: null,
|
|
435
351
|
ENABLE_WIRE_SYNC_EMIT: null,
|
|
436
352
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
437
353
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
438
|
-
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null
|
|
354
|
+
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
|
|
355
|
+
ENABLE_FROZEN_TEMPLATE: null,
|
|
356
|
+
DISABLE_ARIA_REFLECTION_POLYFILL: null
|
|
439
357
|
};
|
|
440
358
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
441
359
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
@@ -483,6 +401,83 @@ var LWC = (function (exports) {
|
|
|
483
401
|
*/
|
|
484
402
|
function setFeatureFlagForTest(name, value) {
|
|
485
403
|
}
|
|
404
|
+
/** version: 2.33.0 */
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
408
|
+
*/
|
|
409
|
+
|
|
410
|
+
/*
|
|
411
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
412
|
+
* All rights reserved.
|
|
413
|
+
* SPDX-License-Identifier: MIT
|
|
414
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
415
|
+
*/
|
|
416
|
+
function detect(propName, prototype) {
|
|
417
|
+
return isUndefined$1(getOwnPropertyDescriptor$1(prototype, propName));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/*
|
|
421
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
422
|
+
* All rights reserved.
|
|
423
|
+
* SPDX-License-Identifier: MIT
|
|
424
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
425
|
+
*/
|
|
426
|
+
function createAriaPropertyPropertyDescriptor(attrName) {
|
|
427
|
+
// Note that we need to call this.{get,set,has,remove}Attribute rather than dereferencing
|
|
428
|
+
// from Element.prototype, because these methods are overridden in LightningElement.
|
|
429
|
+
return {
|
|
430
|
+
get: function get() {
|
|
431
|
+
// reflect what's in the attribute
|
|
432
|
+
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
433
|
+
},
|
|
434
|
+
set: function set(newValue) {
|
|
435
|
+
// reflect into the corresponding attribute
|
|
436
|
+
if (isNull(newValue)) {
|
|
437
|
+
this.removeAttribute(attrName);
|
|
438
|
+
} else {
|
|
439
|
+
this.setAttribute(attrName, newValue);
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
configurable: true,
|
|
443
|
+
enumerable: true
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
function patch$1(propName, prototype) {
|
|
447
|
+
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
448
|
+
var descriptor = createAriaPropertyPropertyDescriptor(attrName);
|
|
449
|
+
defineProperty(prototype, propName, descriptor);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/*
|
|
453
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
454
|
+
* All rights reserved.
|
|
455
|
+
* SPDX-License-Identifier: MIT
|
|
456
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
457
|
+
*/
|
|
458
|
+
function applyAriaReflection() {
|
|
459
|
+
var prototype = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Element.prototype;
|
|
460
|
+
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
461
|
+
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
462
|
+
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
463
|
+
if (detect(propName, prototype)) {
|
|
464
|
+
patch$1(propName, prototype);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
/** version: 2.33.0 */
|
|
469
|
+
|
|
470
|
+
/*
|
|
471
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
472
|
+
* All rights reserved.
|
|
473
|
+
* SPDX-License-Identifier: MIT
|
|
474
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
475
|
+
*/
|
|
476
|
+
if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
477
|
+
// If DISABLE_ARIA_REFLECTION_POLYFILL is false, then we need to apply the ARIA reflection polyfill globally,
|
|
478
|
+
// i.e. to the global Element.prototype
|
|
479
|
+
applyAriaReflection();
|
|
480
|
+
}
|
|
486
481
|
|
|
487
482
|
/*
|
|
488
483
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -497,7 +492,7 @@ var LWC = (function (exports) {
|
|
|
497
492
|
function flushCallbackQueue() {
|
|
498
493
|
var callbacks = nextTickCallbackQueue;
|
|
499
494
|
nextTickCallbackQueue = []; // reset to a new queue
|
|
500
|
-
for (var _i3 = 0,
|
|
495
|
+
for (var _i3 = 0, len = callbacks.length; _i3 < len; _i3 += 1) {
|
|
501
496
|
callbacks[_i3]();
|
|
502
497
|
}
|
|
503
498
|
}
|
|
@@ -587,7 +582,7 @@ var LWC = (function (exports) {
|
|
|
587
582
|
if (!isUndefined$1(reactiveRecord)) {
|
|
588
583
|
var reactiveObservers = reactiveRecord[key];
|
|
589
584
|
if (!isUndefined$1(reactiveObservers)) {
|
|
590
|
-
for (var _i5 = 0,
|
|
585
|
+
for (var _i5 = 0, len = reactiveObservers.length; _i5 < len; _i5 += 1) {
|
|
591
586
|
var ro = reactiveObservers[_i5];
|
|
592
587
|
ro.notify();
|
|
593
588
|
}
|
|
@@ -1831,6 +1826,17 @@ var LWC = (function (exports) {
|
|
|
1831
1826
|
lightningBasedDescriptors[propName] = createBridgeToElementDescriptor(propName, HTMLElementOriginalDescriptors[propName]);
|
|
1832
1827
|
}
|
|
1833
1828
|
defineProperties(LightningElement.prototype, lightningBasedDescriptors);
|
|
1829
|
+
function applyAriaReflectionToLightningElement() {
|
|
1830
|
+
// If ARIA reflection is not applied globally to Element.prototype, or if we are running server-side,
|
|
1831
|
+
// apply it to LightningElement.prototype.
|
|
1832
|
+
// This allows `this.aria*` property accessors to work from inside a component, and to reflect `aria-*` attrs.
|
|
1833
|
+
applyAriaReflection(LightningElement.prototype);
|
|
1834
|
+
}
|
|
1835
|
+
// The reason for this odd if/else branching is limitations in @lwc/features:
|
|
1836
|
+
// https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#only-works-with-if-statements
|
|
1837
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
1838
|
+
applyAriaReflectionToLightningElement();
|
|
1839
|
+
}
|
|
1834
1840
|
defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
1835
1841
|
get: function get() {
|
|
1836
1842
|
// If required, a runtime-specific implementation must be defined.
|
|
@@ -1853,56 +1859,6 @@ var LWC = (function (exports) {
|
|
|
1853
1859
|
configurable: true
|
|
1854
1860
|
};
|
|
1855
1861
|
}
|
|
1856
|
-
var AccessorReactiveObserver = /*#__PURE__*/function (_ReactiveObserver) {
|
|
1857
|
-
_inherits(AccessorReactiveObserver, _ReactiveObserver);
|
|
1858
|
-
var _super3 = _createSuper(AccessorReactiveObserver);
|
|
1859
|
-
function AccessorReactiveObserver(vm, set) {
|
|
1860
|
-
var _this2;
|
|
1861
|
-
_classCallCheck(this, AccessorReactiveObserver);
|
|
1862
|
-
_this2 = _super3.call(this, function () {
|
|
1863
|
-
if (isFalse(_this2.debouncing)) {
|
|
1864
|
-
_this2.debouncing = true;
|
|
1865
|
-
addCallbackToNextTick(function () {
|
|
1866
|
-
if (isTrue(_this2.debouncing)) {
|
|
1867
|
-
var _assertThisInitialize = _assertThisInitialized(_this2),
|
|
1868
|
-
value = _assertThisInitialize.value;
|
|
1869
|
-
var dirtyStateBeforeSetterCall = vm.isDirty,
|
|
1870
|
-
component = vm.component,
|
|
1871
|
-
_idx = vm.idx;
|
|
1872
|
-
set.call(component, value);
|
|
1873
|
-
// de-bouncing after the call to the original setter to prevent
|
|
1874
|
-
// infinity loop if the setter itself is mutating things that
|
|
1875
|
-
// were accessed during the previous invocation.
|
|
1876
|
-
_this2.debouncing = false;
|
|
1877
|
-
if (isTrue(vm.isDirty) && isFalse(dirtyStateBeforeSetterCall) && _idx > 0) {
|
|
1878
|
-
// immediate rehydration due to a setter driven mutation, otherwise
|
|
1879
|
-
// the component will get rendered on the second tick, which it is not
|
|
1880
|
-
// desirable.
|
|
1881
|
-
rerenderVM(vm);
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
});
|
|
1887
|
-
_this2.debouncing = false;
|
|
1888
|
-
return _this2;
|
|
1889
|
-
}
|
|
1890
|
-
_createClass(AccessorReactiveObserver, [{
|
|
1891
|
-
key: "reset",
|
|
1892
|
-
value: function reset(value) {
|
|
1893
|
-
_get2(_getPrototypeOf2(AccessorReactiveObserver.prototype), "reset", this).call(this);
|
|
1894
|
-
this.debouncing = false;
|
|
1895
|
-
if (arguments.length > 0) {
|
|
1896
|
-
this.value = value;
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
}]);
|
|
1900
|
-
return AccessorReactiveObserver;
|
|
1901
|
-
}(ReactiveObserver);
|
|
1902
|
-
function createAccessorReactiveObserver(vm, set) {
|
|
1903
|
-
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1904
|
-
return new AccessorReactiveObserver(vm, set);
|
|
1905
|
-
}
|
|
1906
1862
|
|
|
1907
1863
|
/*
|
|
1908
1864
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1933,37 +1889,21 @@ var LWC = (function (exports) {
|
|
|
1933
1889
|
};
|
|
1934
1890
|
}
|
|
1935
1891
|
function createPublicAccessorDescriptor(key, descriptor) {
|
|
1936
|
-
var
|
|
1892
|
+
var _get2 = descriptor.get,
|
|
1937
1893
|
_set2 = descriptor.set,
|
|
1938
1894
|
enumerable = descriptor.enumerable,
|
|
1939
1895
|
configurable = descriptor.configurable;
|
|
1940
|
-
if (!isFunction$1(
|
|
1896
|
+
if (!isFunction$1(_get2)) {
|
|
1941
1897
|
throw new Error();
|
|
1942
1898
|
}
|
|
1943
1899
|
return {
|
|
1944
1900
|
get: function get() {
|
|
1945
|
-
return
|
|
1901
|
+
return _get2.call(this);
|
|
1946
1902
|
},
|
|
1947
1903
|
set: function set(newValue) {
|
|
1948
|
-
|
|
1949
|
-
var vm = getAssociatedVM(this);
|
|
1904
|
+
getAssociatedVM(this);
|
|
1950
1905
|
if (_set2) {
|
|
1951
|
-
|
|
1952
|
-
var ro = vm.oar[key];
|
|
1953
|
-
if (isUndefined$1(ro)) {
|
|
1954
|
-
ro = vm.oar[key] = createAccessorReactiveObserver(vm, _set2);
|
|
1955
|
-
}
|
|
1956
|
-
// every time we invoke this setter from outside (through this wrapper setter)
|
|
1957
|
-
// we should reset the value and then debounce just in case there is a pending
|
|
1958
|
-
// invocation the next tick that is not longer relevant since the value is changing
|
|
1959
|
-
// from outside.
|
|
1960
|
-
ro.reset(newValue);
|
|
1961
|
-
ro.observe(function () {
|
|
1962
|
-
_set2.call(_this3, newValue);
|
|
1963
|
-
});
|
|
1964
|
-
} else {
|
|
1965
|
-
_set2.call(this, newValue);
|
|
1966
|
-
}
|
|
1906
|
+
_set2.call(this, newValue);
|
|
1967
1907
|
}
|
|
1968
1908
|
},
|
|
1969
1909
|
enumerable: enumerable,
|
|
@@ -2155,13 +2095,6 @@ var LWC = (function (exports) {
|
|
|
2155
2095
|
var meta = signedDecoratorToMetaMap.get(Ctor);
|
|
2156
2096
|
return isUndefined$1(meta) ? defaultMeta : meta;
|
|
2157
2097
|
}
|
|
2158
|
-
|
|
2159
|
-
/*
|
|
2160
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2161
|
-
* All rights reserved.
|
|
2162
|
-
* SPDX-License-Identifier: MIT
|
|
2163
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2164
|
-
*/
|
|
2165
2098
|
var signedTemplateSet = new Set();
|
|
2166
2099
|
function defaultEmptyTemplate() {
|
|
2167
2100
|
return [];
|
|
@@ -2176,32 +2109,6 @@ var LWC = (function (exports) {
|
|
|
2176
2109
|
*/
|
|
2177
2110
|
function registerTemplate(tpl) {
|
|
2178
2111
|
signedTemplateSet.add(tpl);
|
|
2179
|
-
// FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
|
|
2180
|
-
// the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
|
|
2181
|
-
// on top of stylesheetToken for anyone who is accessing the old internal API.
|
|
2182
|
-
// Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
2183
|
-
defineProperty(tpl, 'stylesheetTokens', {
|
|
2184
|
-
enumerable: true,
|
|
2185
|
-
configurable: true,
|
|
2186
|
-
get: function get() {
|
|
2187
|
-
var stylesheetToken = this.stylesheetToken;
|
|
2188
|
-
if (isUndefined$1(stylesheetToken)) {
|
|
2189
|
-
return stylesheetToken;
|
|
2190
|
-
}
|
|
2191
|
-
// Shim for the old `stylesheetTokens` property
|
|
2192
|
-
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
2193
|
-
return {
|
|
2194
|
-
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
2195
|
-
shadowAttribute: stylesheetToken
|
|
2196
|
-
};
|
|
2197
|
-
},
|
|
2198
|
-
set: function set(value) {
|
|
2199
|
-
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
2200
|
-
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
2201
|
-
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
2202
|
-
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
2203
|
-
}
|
|
2204
|
-
});
|
|
2205
2112
|
// chaining this method as a way to wrap existing
|
|
2206
2113
|
// assignment of templates easily, without too much transformation
|
|
2207
2114
|
return tpl;
|
|
@@ -2302,10 +2209,10 @@ var LWC = (function (exports) {
|
|
|
2302
2209
|
if (isFunction$1(SuperClass)) {
|
|
2303
2210
|
HTMLBridgeElement = /*#__PURE__*/function (_SuperClass) {
|
|
2304
2211
|
_inherits(HTMLBridgeElement, _SuperClass);
|
|
2305
|
-
var
|
|
2212
|
+
var _super3 = _createSuper(HTMLBridgeElement);
|
|
2306
2213
|
function HTMLBridgeElement() {
|
|
2307
2214
|
_classCallCheck(this, HTMLBridgeElement);
|
|
2308
|
-
return
|
|
2215
|
+
return _super3.apply(this, arguments);
|
|
2309
2216
|
}
|
|
2310
2217
|
return _createClass(HTMLBridgeElement);
|
|
2311
2218
|
}(SuperClass);
|
|
@@ -2343,7 +2250,7 @@ var LWC = (function (exports) {
|
|
|
2343
2250
|
};
|
|
2344
2251
|
}
|
|
2345
2252
|
// expose public methods as props on the new Element Bridge
|
|
2346
|
-
for (var _i10 = 0,
|
|
2253
|
+
for (var _i10 = 0, _len = methods.length; _i10 < _len; _i10 += 1) {
|
|
2347
2254
|
var methodName = methods[_i10];
|
|
2348
2255
|
descriptors[methodName] = {
|
|
2349
2256
|
value: createMethodCaller(methodName),
|
|
@@ -2369,6 +2276,20 @@ var LWC = (function (exports) {
|
|
|
2369
2276
|
return HTMLBridgeElement;
|
|
2370
2277
|
}
|
|
2371
2278
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
2279
|
+
{
|
|
2280
|
+
// This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
|
|
2281
|
+
// so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
|
|
2282
|
+
// ARIA props outside the LightningElement
|
|
2283
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
2284
|
+
// If ARIA reflection is not applied globally to Element.prototype, apply it to HTMLBridgeElement.prototype.
|
|
2285
|
+
// This allows `elm.aria*` property accessors to work from outside a component, and to reflect `aria-*` attrs.
|
|
2286
|
+
// This is especially important because the template compiler compiles aria-* attrs on components to aria* props
|
|
2287
|
+
//
|
|
2288
|
+
// Also note that we apply this to BaseBridgeElement.prototype to avoid excessively redefining property
|
|
2289
|
+
// accessors inside the HTMLBridgeElementFactory.
|
|
2290
|
+
applyAriaReflection(BaseBridgeElement.prototype);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2372
2293
|
freeze(BaseBridgeElement);
|
|
2373
2294
|
seal(BaseBridgeElement.prototype);
|
|
2374
2295
|
function setActiveVM(vm) {
|
|
@@ -3774,7 +3695,7 @@ var LWC = (function (exports) {
|
|
|
3774
3695
|
// undefined is for root components, but root components cannot accept slotted content
|
|
3775
3696
|
setVMBeingRendered(slotset.owner);
|
|
3776
3697
|
try {
|
|
3777
|
-
ArrayPush$1.
|
|
3698
|
+
ArrayPush$1.call(newChildren, vnode.factory(data.slotData, data.key));
|
|
3778
3699
|
} finally {
|
|
3779
3700
|
setVMBeingRendered(vmBeingRenderedInception);
|
|
3780
3701
|
}
|
|
@@ -4106,7 +4027,7 @@ var LWC = (function (exports) {
|
|
|
4106
4027
|
}
|
|
4107
4028
|
function buildParseFragmentFn(createFragmentFn) {
|
|
4108
4029
|
return function (strings) {
|
|
4109
|
-
for (var
|
|
4030
|
+
for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
|
|
4110
4031
|
keys[_key3 - 1] = arguments[_key3];
|
|
4111
4032
|
}
|
|
4112
4033
|
var cache = create(null);
|
|
@@ -4467,14 +4388,9 @@ var LWC = (function (exports) {
|
|
|
4467
4388
|
function resetComponentStateWhenRemoved(vm) {
|
|
4468
4389
|
var state = vm.state;
|
|
4469
4390
|
if (state !== 2 /* VMState.disconnected */) {
|
|
4470
|
-
var
|
|
4471
|
-
tro = vm.tro;
|
|
4391
|
+
var tro = vm.tro;
|
|
4472
4392
|
// Making sure that any observing record will not trigger the rehydrated on this vm
|
|
4473
4393
|
tro.reset();
|
|
4474
|
-
// Making sure that any observing accessor record will not trigger the setter to be reinvoked
|
|
4475
|
-
for (var key in oar) {
|
|
4476
|
-
oar[key].reset();
|
|
4477
|
-
}
|
|
4478
4394
|
runDisconnectedCallback(vm);
|
|
4479
4395
|
// Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
|
|
4480
4396
|
runChildNodesDisconnectedCallback(vm);
|
|
@@ -4519,7 +4435,6 @@ var LWC = (function (exports) {
|
|
|
4519
4435
|
cmpSlots: {
|
|
4520
4436
|
slotAssignments: create(null)
|
|
4521
4437
|
},
|
|
4522
|
-
oar: create(null),
|
|
4523
4438
|
cmpTemplate: null,
|
|
4524
4439
|
hydrated: Boolean(hydrated),
|
|
4525
4440
|
renderMode: def.renderMode,
|
|
@@ -4862,17 +4777,17 @@ var LWC = (function (exports) {
|
|
|
4862
4777
|
var WireMetaMap = new Map();
|
|
4863
4778
|
var WireContextRegistrationEvent = /*#__PURE__*/function (_CustomEvent) {
|
|
4864
4779
|
_inherits(WireContextRegistrationEvent, _CustomEvent);
|
|
4865
|
-
var
|
|
4780
|
+
var _super4 = _createSuper(WireContextRegistrationEvent);
|
|
4866
4781
|
function WireContextRegistrationEvent(adapterToken, _ref4) {
|
|
4867
|
-
var
|
|
4782
|
+
var _this2;
|
|
4868
4783
|
var setNewContext = _ref4.setNewContext,
|
|
4869
4784
|
setDisconnectedCallback = _ref4.setDisconnectedCallback;
|
|
4870
4785
|
_classCallCheck(this, WireContextRegistrationEvent);
|
|
4871
|
-
|
|
4786
|
+
_this2 = _super4.call(this, adapterToken, {
|
|
4872
4787
|
bubbles: true,
|
|
4873
4788
|
composed: true
|
|
4874
4789
|
});
|
|
4875
|
-
defineProperties(_assertThisInitialized(
|
|
4790
|
+
defineProperties(_assertThisInitialized(_this2), {
|
|
4876
4791
|
setNewContext: {
|
|
4877
4792
|
value: setNewContext
|
|
4878
4793
|
},
|
|
@@ -4880,7 +4795,7 @@ var LWC = (function (exports) {
|
|
|
4880
4795
|
value: setDisconnectedCallback
|
|
4881
4796
|
}
|
|
4882
4797
|
});
|
|
4883
|
-
return
|
|
4798
|
+
return _this2;
|
|
4884
4799
|
}
|
|
4885
4800
|
return _createClass(WireContextRegistrationEvent);
|
|
4886
4801
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
@@ -5528,9 +5443,58 @@ var LWC = (function (exports) {
|
|
|
5528
5443
|
hooksAreSet = true;
|
|
5529
5444
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
5530
5445
|
}
|
|
5531
|
-
//
|
|
5532
|
-
|
|
5446
|
+
// Deeply freeze the entire array (of arrays) of stylesheet factory functions
|
|
5447
|
+
function deepFreeze(stylesheets) {
|
|
5448
|
+
traverseStylesheets(stylesheets, function (subStylesheets) {
|
|
5449
|
+
freeze(subStylesheets);
|
|
5450
|
+
});
|
|
5451
|
+
}
|
|
5452
|
+
// Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
|
|
5453
|
+
function traverseStylesheets(stylesheets, callback) {
|
|
5454
|
+
callback(stylesheets);
|
|
5455
|
+
for (var _i33 = 0; _i33 < stylesheets.length; _i33++) {
|
|
5456
|
+
var stylesheet = stylesheets[_i33];
|
|
5457
|
+
if (isArray$1(stylesheet)) {
|
|
5458
|
+
traverseStylesheets(stylesheet, callback);
|
|
5459
|
+
} else {
|
|
5460
|
+
callback(stylesheet);
|
|
5461
|
+
}
|
|
5462
|
+
}
|
|
5463
|
+
}
|
|
5533
5464
|
function freezeTemplate(tmpl) {
|
|
5465
|
+
if (lwcRuntimeFlags.ENABLE_FROZEN_TEMPLATE) {
|
|
5466
|
+
// Deep freeze the template
|
|
5467
|
+
freeze(tmpl);
|
|
5468
|
+
if (!isUndefined$1(tmpl.stylesheets)) {
|
|
5469
|
+
deepFreeze(tmpl.stylesheets);
|
|
5470
|
+
}
|
|
5471
|
+
} else {
|
|
5472
|
+
// TODO [#2782]: remove this flag and delete the legacy behavior
|
|
5473
|
+
// When ENABLE_FROZEN_TEMPLATE is false, then we shim stylesheetTokens on top of stylesheetToken for anyone who
|
|
5474
|
+
// is accessing the old internal API (backwards compat). Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
5475
|
+
defineProperty(tmpl, 'stylesheetTokens', {
|
|
5476
|
+
enumerable: true,
|
|
5477
|
+
configurable: true,
|
|
5478
|
+
get: function get() {
|
|
5479
|
+
var stylesheetToken = this.stylesheetToken;
|
|
5480
|
+
if (isUndefined$1(stylesheetToken)) {
|
|
5481
|
+
return stylesheetToken;
|
|
5482
|
+
}
|
|
5483
|
+
// Shim for the old `stylesheetTokens` property
|
|
5484
|
+
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
5485
|
+
return {
|
|
5486
|
+
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
5487
|
+
shadowAttribute: stylesheetToken
|
|
5488
|
+
};
|
|
5489
|
+
},
|
|
5490
|
+
set: function set(value) {
|
|
5491
|
+
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
5492
|
+
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
5493
|
+
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
5494
|
+
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
5495
|
+
}
|
|
5496
|
+
});
|
|
5497
|
+
}
|
|
5534
5498
|
}
|
|
5535
5499
|
|
|
5536
5500
|
/*
|
|
@@ -5705,10 +5669,10 @@ var LWC = (function (exports) {
|
|
|
5705
5669
|
// which are not equipped to be initialized that way.
|
|
5706
5670
|
var clazz = /*#__PURE__*/function (_HTMLElementAlias) {
|
|
5707
5671
|
_inherits(clazz, _HTMLElementAlias);
|
|
5708
|
-
var
|
|
5672
|
+
var _super5 = _createSuper(clazz);
|
|
5709
5673
|
function clazz() {
|
|
5710
5674
|
_classCallCheck(this, clazz);
|
|
5711
|
-
return
|
|
5675
|
+
return _super5.apply(this, arguments);
|
|
5712
5676
|
}
|
|
5713
5677
|
return _createClass(clazz);
|
|
5714
5678
|
}(HTMLElementAlias);
|
|
@@ -5754,24 +5718,24 @@ var LWC = (function (exports) {
|
|
|
5754
5718
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
5755
5719
|
var UpgradableConstructor = /*#__PURE__*/function (_HTMLElement) {
|
|
5756
5720
|
_inherits(UpgradableConstructor, _HTMLElement);
|
|
5757
|
-
var
|
|
5721
|
+
var _super6 = _createSuper(UpgradableConstructor);
|
|
5758
5722
|
function UpgradableConstructor(upgradeCallback) {
|
|
5759
|
-
var
|
|
5723
|
+
var _this3;
|
|
5760
5724
|
_classCallCheck(this, UpgradableConstructor);
|
|
5761
|
-
|
|
5725
|
+
_this3 = _super6.call(this);
|
|
5762
5726
|
// If the element is not created using lwc.createElement(), e.g. `document.createElement('x-foo')`,
|
|
5763
5727
|
// then elementBeingUpgraded will be false
|
|
5764
5728
|
if (elementBeingUpgradedByLWC) {
|
|
5765
|
-
upgradeCallback(_assertThisInitialized(
|
|
5729
|
+
upgradeCallback(_assertThisInitialized(_this3));
|
|
5766
5730
|
} else if (hasConnectedCallback || hasDisconnectedCallback) {
|
|
5767
5731
|
// If this element has connected or disconnected callbacks, then we need to keep track of
|
|
5768
5732
|
// instances that were created outside LWC (i.e. not created by `lwc.createElement()`).
|
|
5769
5733
|
// If the element has no connected or disconnected callbacks, then we don't need to track this.
|
|
5770
|
-
elementsUpgradedOutsideLWC.add(_assertThisInitialized(
|
|
5734
|
+
elementsUpgradedOutsideLWC.add(_assertThisInitialized(_this3));
|
|
5771
5735
|
// TODO [#2970]: LWC elements cannot be upgraded via new Ctor()
|
|
5772
5736
|
// Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
|
|
5773
5737
|
}
|
|
5774
|
-
return
|
|
5738
|
+
return _this3;
|
|
5775
5739
|
}
|
|
5776
5740
|
return _createClass(UpgradableConstructor);
|
|
5777
5741
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
@@ -5880,9 +5844,9 @@ var LWC = (function (exports) {
|
|
|
5880
5844
|
function createPivotingClass(tagName, registeredDefinition) {
|
|
5881
5845
|
var PivotCtor = /*#__PURE__*/function (_NativeHTMLElement) {
|
|
5882
5846
|
_inherits(PivotCtor, _NativeHTMLElement);
|
|
5883
|
-
var
|
|
5847
|
+
var _super7 = _createSuper(PivotCtor);
|
|
5884
5848
|
function PivotCtor(UserCtor) {
|
|
5885
|
-
var
|
|
5849
|
+
var _this4;
|
|
5886
5850
|
_classCallCheck(this, PivotCtor);
|
|
5887
5851
|
// This constructor can only be invoked by:
|
|
5888
5852
|
// a) the browser instantiating an element from parsing or via document.createElement.
|
|
@@ -5892,7 +5856,7 @@ var LWC = (function (exports) {
|
|
|
5892
5856
|
// If the caller signals via UserCtor that this is in fact a controlled
|
|
5893
5857
|
// definition, we use that one, otherwise fallback to the global
|
|
5894
5858
|
// internal registry.
|
|
5895
|
-
|
|
5859
|
+
_this4 = _super7.call(this);
|
|
5896
5860
|
var userCtorIsDefined = !isUndefined$1(UserCtor);
|
|
5897
5861
|
if (userCtorIsDefined) {
|
|
5898
5862
|
if (!isConstructor(UserCtor)) {
|
|
@@ -5904,15 +5868,15 @@ var LWC = (function (exports) {
|
|
|
5904
5868
|
}
|
|
5905
5869
|
var definition = userCtorIsDefined ? getOrCreateDefinitionForConstructor(UserCtor) : globalDefinitionsByTag.get(tagName);
|
|
5906
5870
|
if (!isUndefined$1(definition)) {
|
|
5907
|
-
internalUpgrade(_assertThisInitialized(
|
|
5871
|
+
internalUpgrade(_assertThisInitialized(_this4), registeredDefinition, definition);
|
|
5908
5872
|
} else {
|
|
5909
5873
|
// This is the case in which there is no global definition, and
|
|
5910
5874
|
// it is not handled by LWC (otherwise it will have a valid UserCtor)
|
|
5911
5875
|
// so we need to add it to the pending queue just in case it eventually
|
|
5912
5876
|
// gets defined in the global registry.
|
|
5913
|
-
pendingRegistryForElement.set(_assertThisInitialized(
|
|
5877
|
+
pendingRegistryForElement.set(_assertThisInitialized(_this4), registeredDefinition);
|
|
5914
5878
|
}
|
|
5915
|
-
return
|
|
5879
|
+
return _this4;
|
|
5916
5880
|
}
|
|
5917
5881
|
_createClass(PivotCtor, [{
|
|
5918
5882
|
key: "connectedCallback",
|
|
@@ -6150,17 +6114,17 @@ var LWC = (function (exports) {
|
|
|
6150
6114
|
function flushPendingWhenDefinedCallbacks(tagName, ctor) {
|
|
6151
6115
|
var resolvers = pendingWhenDefinedCallbacks.get(tagName);
|
|
6152
6116
|
if (!isUndefined$1(resolvers)) {
|
|
6153
|
-
var
|
|
6154
|
-
|
|
6117
|
+
var _iterator7 = _createForOfIteratorHelper(resolvers),
|
|
6118
|
+
_step7;
|
|
6155
6119
|
try {
|
|
6156
|
-
for (
|
|
6157
|
-
var resolver =
|
|
6120
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
6121
|
+
var resolver = _step7.value;
|
|
6158
6122
|
resolver(ctor);
|
|
6159
6123
|
}
|
|
6160
6124
|
} catch (err) {
|
|
6161
|
-
|
|
6125
|
+
_iterator7.e(err);
|
|
6162
6126
|
} finally {
|
|
6163
|
-
|
|
6127
|
+
_iterator7.f();
|
|
6164
6128
|
}
|
|
6165
6129
|
}
|
|
6166
6130
|
pendingWhenDefinedCallbacks.delete(tagName);
|
|
@@ -6210,11 +6174,11 @@ var LWC = (function (exports) {
|
|
|
6210
6174
|
var awaiting = awaitingUpgrade.get(tagName);
|
|
6211
6175
|
if (!isUndefined$1(awaiting)) {
|
|
6212
6176
|
awaitingUpgrade.delete(tagName);
|
|
6213
|
-
var
|
|
6214
|
-
|
|
6177
|
+
var _iterator8 = _createForOfIteratorHelper(awaiting),
|
|
6178
|
+
_step8;
|
|
6215
6179
|
try {
|
|
6216
|
-
for (
|
|
6217
|
-
var element =
|
|
6180
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
6181
|
+
var element = _step8.value;
|
|
6218
6182
|
var registeredDefinition = pendingRegistryForElement.get(element);
|
|
6219
6183
|
// At this point, registeredDefinition should never be undefined because awaitingUpgrade
|
|
6220
6184
|
// is only populated when we haven't run internalUpgrade yet, and we only populate
|
|
@@ -6226,9 +6190,9 @@ var LWC = (function (exports) {
|
|
|
6226
6190
|
}
|
|
6227
6191
|
}
|
|
6228
6192
|
} catch (err) {
|
|
6229
|
-
|
|
6193
|
+
_iterator8.e(err);
|
|
6230
6194
|
} finally {
|
|
6231
|
-
|
|
6195
|
+
_iterator8.f();
|
|
6232
6196
|
}
|
|
6233
6197
|
}
|
|
6234
6198
|
// If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
|
|
@@ -6376,13 +6340,13 @@ var LWC = (function (exports) {
|
|
|
6376
6340
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
6377
6341
|
return /*#__PURE__*/function (_HTMLElementToExtend) {
|
|
6378
6342
|
_inherits(UserConstructor, _HTMLElementToExtend);
|
|
6379
|
-
var
|
|
6343
|
+
var _super8 = _createSuper(UserConstructor);
|
|
6380
6344
|
function UserConstructor() {
|
|
6381
|
-
var
|
|
6345
|
+
var _this5;
|
|
6382
6346
|
_classCallCheck(this, UserConstructor);
|
|
6383
|
-
|
|
6384
|
-
upgradeCallback(_assertThisInitialized(
|
|
6385
|
-
return
|
|
6347
|
+
_this5 = _super8.call(this);
|
|
6348
|
+
upgradeCallback(_assertThisInitialized(_this5));
|
|
6349
|
+
return _this5;
|
|
6386
6350
|
}
|
|
6387
6351
|
// Note that there is no need to do the "avoid defining connectedCallback/disconnectedCallback" optimization
|
|
6388
6352
|
// here, because in create-scoped-registry.ts, the registered class will always have these callbacks anyway.
|
|
@@ -6505,7 +6469,7 @@ var LWC = (function (exports) {
|
|
|
6505
6469
|
function isNull(obj) {
|
|
6506
6470
|
return obj === null;
|
|
6507
6471
|
}
|
|
6508
|
-
/** version: 2.
|
|
6472
|
+
/** version: 2.33.0 */
|
|
6509
6473
|
|
|
6510
6474
|
/*
|
|
6511
6475
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6564,17 +6528,17 @@ var LWC = (function (exports) {
|
|
|
6564
6528
|
exports.createFragment = function (html) {
|
|
6565
6529
|
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
6566
6530
|
if (!isUndefined(wrapperTags)) {
|
|
6567
|
-
var
|
|
6568
|
-
|
|
6531
|
+
var _iterator9 = _createForOfIteratorHelper(wrapperTags),
|
|
6532
|
+
_step9;
|
|
6569
6533
|
try {
|
|
6570
|
-
for (
|
|
6571
|
-
var wrapperTag =
|
|
6534
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
6535
|
+
var wrapperTag = _step9.value;
|
|
6572
6536
|
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
6573
6537
|
}
|
|
6574
6538
|
} catch (err) {
|
|
6575
|
-
|
|
6539
|
+
_iterator9.e(err);
|
|
6576
6540
|
} finally {
|
|
6577
|
-
|
|
6541
|
+
_iterator9.f();
|
|
6578
6542
|
}
|
|
6579
6543
|
}
|
|
6580
6544
|
// For IE11, the document title must not be undefined, but it can be an empty string
|
|
@@ -6583,7 +6547,7 @@ var LWC = (function (exports) {
|
|
|
6583
6547
|
doc.body.innerHTML = html;
|
|
6584
6548
|
var content = doc.body;
|
|
6585
6549
|
if (!isUndefined(wrapperTags)) {
|
|
6586
|
-
for (var
|
|
6550
|
+
for (var _i34 = 0; _i34 < wrapperTags.length; _i34++) {
|
|
6587
6551
|
content = content.firstChild;
|
|
6588
6552
|
}
|
|
6589
6553
|
}
|
|
@@ -6776,8 +6740,8 @@ var LWC = (function (exports) {
|
|
|
6776
6740
|
tagName: element.tagName.toLowerCase(),
|
|
6777
6741
|
hydrated: true
|
|
6778
6742
|
});
|
|
6779
|
-
for (var
|
|
6780
|
-
var _Object$entries2$_i = _slicedToArray(_Object$entries2[
|
|
6743
|
+
for (var _i35 = 0, _Object$entries2 = Object.entries(props); _i35 < _Object$entries2.length; _i35++) {
|
|
6744
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i35], 2),
|
|
6781
6745
|
key = _Object$entries2$_i[0],
|
|
6782
6746
|
value = _Object$entries2$_i[1];
|
|
6783
6747
|
element[key] = value;
|
|
@@ -6850,23 +6814,23 @@ var LWC = (function (exports) {
|
|
|
6850
6814
|
var _attributeChangedCallback = HtmlPrototype.prototype.attributeChangedCallback;
|
|
6851
6815
|
return _a = /*#__PURE__*/function (_HTMLElement2) {
|
|
6852
6816
|
_inherits(_a, _HTMLElement2);
|
|
6853
|
-
var
|
|
6817
|
+
var _super9 = _createSuper(_a);
|
|
6854
6818
|
function _a() {
|
|
6855
|
-
var
|
|
6819
|
+
var _this6;
|
|
6856
6820
|
_classCallCheck(this, _a);
|
|
6857
|
-
|
|
6858
|
-
if (
|
|
6821
|
+
_this6 = _super9.call(this);
|
|
6822
|
+
if (_this6.isConnected) {
|
|
6859
6823
|
// this if block is hit when there's already an un-upgraded element in the DOM with the same tag name.
|
|
6860
|
-
hydrateComponent(_assertThisInitialized(
|
|
6861
|
-
hydratedCustomElements.add(_assertThisInitialized(
|
|
6824
|
+
hydrateComponent(_assertThisInitialized(_this6), Ctor, {});
|
|
6825
|
+
hydratedCustomElements.add(_assertThisInitialized(_this6));
|
|
6862
6826
|
} else {
|
|
6863
|
-
createVM(_assertThisInitialized(
|
|
6827
|
+
createVM(_assertThisInitialized(_this6), Ctor, renderer, {
|
|
6864
6828
|
mode: 'open',
|
|
6865
6829
|
owner: null,
|
|
6866
|
-
tagName:
|
|
6830
|
+
tagName: _this6.tagName
|
|
6867
6831
|
});
|
|
6868
6832
|
}
|
|
6869
|
-
return
|
|
6833
|
+
return _this6;
|
|
6870
6834
|
}
|
|
6871
6835
|
_createClass(_a, [{
|
|
6872
6836
|
key: "connectedCallback",
|
|
@@ -7064,7 +7028,7 @@ var LWC = (function (exports) {
|
|
|
7064
7028
|
});
|
|
7065
7029
|
freeze(LightningElement);
|
|
7066
7030
|
seal(LightningElement.prototype);
|
|
7067
|
-
/* version: 2.
|
|
7031
|
+
/* version: 2.33.0 */
|
|
7068
7032
|
|
|
7069
7033
|
exports.LightningElement = LightningElement;
|
|
7070
7034
|
exports.__unstable__ProfilerControl = profilerControl;
|