lwc 2.32.1 → 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 +683 -560
- package/dist/engine-dom/iife/es2017/engine-dom.js +683 -560
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +593 -467
- package/dist/engine-dom/iife/es5/engine-dom.js +121 -95
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +119 -92
- package/dist/engine-dom/umd/es2017/engine-dom.js +683 -560
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +593 -467
- package/dist/engine-dom/umd/es5/engine-dom.js +121 -95
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +119 -92
- package/dist/engine-server/commonjs/es2017/engine-server.js +655 -474
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +655 -474
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +7 -5
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +7 -5
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +7 -5
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +7 -5
- 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,7 +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 _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; }
|
|
8
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
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); }; }
|
|
@@ -13,15 +13,17 @@ var LWC = (function (exports) {
|
|
|
13
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; } }
|
|
14
14
|
function _getPrototypeOf2(o) { _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf2(o); }
|
|
15
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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, 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); } }
|
|
17
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); }
|
|
18
20
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
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."); }
|
|
20
22
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
23
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
22
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
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."); }
|
|
24
|
-
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; } }
|
|
25
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
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; } } }; }
|
|
27
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); }
|
|
@@ -176,6 +178,9 @@ var LWC = (function (exports) {
|
|
|
176
178
|
* The above list of 46 aria attributes is consistent with the following resources:
|
|
177
179
|
* https://github.com/w3c/aria/pull/708/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR11060
|
|
178
180
|
* https://wicg.github.io/aom/spec/aria-reflection.html
|
|
181
|
+
*
|
|
182
|
+
* NOTE: If you update this list, please update test files that implicitly reference this list!
|
|
183
|
+
* Searching the codebase for `aria-flowto` and `ariaFlowTo` should be good enough to find all usages.
|
|
179
184
|
*/
|
|
180
185
|
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'];
|
|
181
186
|
var _ref = /*@__PURE__*/function () {
|
|
@@ -344,90 +349,9 @@ var LWC = (function (exports) {
|
|
|
344
349
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
345
350
|
*/
|
|
346
351
|
// Increment whenever the LWC template compiler changes
|
|
347
|
-
var LWC_VERSION = "2.
|
|
352
|
+
var LWC_VERSION = "2.33.0";
|
|
348
353
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
349
|
-
/** version: 2.
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
|
-
/*
|
|
356
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
357
|
-
* All rights reserved.
|
|
358
|
-
* SPDX-License-Identifier: MIT
|
|
359
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
360
|
-
*/
|
|
361
|
-
function detect(propName) {
|
|
362
|
-
return getOwnPropertyDescriptor$1(Element.prototype, propName) === undefined;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/*
|
|
366
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
367
|
-
* All rights reserved.
|
|
368
|
-
* SPDX-License-Identifier: MIT
|
|
369
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
370
|
-
*/
|
|
371
|
-
var nodeToAriaPropertyValuesMap = new WeakMap();
|
|
372
|
-
function getAriaPropertyMap(elm) {
|
|
373
|
-
var map = nodeToAriaPropertyValuesMap.get(elm);
|
|
374
|
-
if (map === undefined) {
|
|
375
|
-
map = {};
|
|
376
|
-
nodeToAriaPropertyValuesMap.set(elm, map);
|
|
377
|
-
}
|
|
378
|
-
return map;
|
|
379
|
-
}
|
|
380
|
-
function getNormalizedAriaPropertyValue(value) {
|
|
381
|
-
return value == null ? null : String(value);
|
|
382
|
-
}
|
|
383
|
-
function createAriaPropertyPropertyDescriptor(propName, attrName) {
|
|
384
|
-
return {
|
|
385
|
-
get: function get() {
|
|
386
|
-
var map = getAriaPropertyMap(this);
|
|
387
|
-
if (hasOwnProperty$1.call(map, propName)) {
|
|
388
|
-
return map[propName];
|
|
389
|
-
}
|
|
390
|
-
// otherwise just reflect what's in the attribute
|
|
391
|
-
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
392
|
-
},
|
|
393
|
-
set: function set(newValue) {
|
|
394
|
-
var normalizedValue = getNormalizedAriaPropertyValue(newValue);
|
|
395
|
-
var map = getAriaPropertyMap(this);
|
|
396
|
-
map[propName] = normalizedValue;
|
|
397
|
-
// reflect into the corresponding attribute
|
|
398
|
-
if (newValue === null) {
|
|
399
|
-
this.removeAttribute(attrName);
|
|
400
|
-
} else {
|
|
401
|
-
this.setAttribute(attrName, newValue);
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
configurable: true,
|
|
405
|
-
enumerable: true
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
function patch$1(propName) {
|
|
409
|
-
// Typescript is inferring the wrong function type for this particular
|
|
410
|
-
// overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
|
|
411
|
-
// @ts-ignore type-mismatch
|
|
412
|
-
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
413
|
-
var descriptor = createAriaPropertyPropertyDescriptor(propName, attrName);
|
|
414
|
-
Object.defineProperty(Element.prototype, propName, descriptor);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/*
|
|
418
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
419
|
-
* All rights reserved.
|
|
420
|
-
* SPDX-License-Identifier: MIT
|
|
421
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
422
|
-
*/
|
|
423
|
-
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
424
|
-
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
425
|
-
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
426
|
-
if (detect(propName)) {
|
|
427
|
-
patch$1(propName);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
/** version: 2.32.1 */
|
|
354
|
+
/** version: 2.33.0 */
|
|
431
355
|
|
|
432
356
|
/**
|
|
433
357
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -448,7 +372,8 @@ var LWC = (function (exports) {
|
|
|
448
372
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
449
373
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
450
374
|
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
|
|
451
|
-
ENABLE_FROZEN_TEMPLATE: null
|
|
375
|
+
ENABLE_FROZEN_TEMPLATE: null,
|
|
376
|
+
DISABLE_ARIA_REFLECTION_POLYFILL: null
|
|
452
377
|
};
|
|
453
378
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
454
379
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
@@ -504,7 +429,83 @@ var LWC = (function (exports) {
|
|
|
504
429
|
setFeatureFlag(name, value);
|
|
505
430
|
}
|
|
506
431
|
}
|
|
507
|
-
/** version: 2.
|
|
432
|
+
/** version: 2.33.0 */
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
/*
|
|
439
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
440
|
+
* All rights reserved.
|
|
441
|
+
* SPDX-License-Identifier: MIT
|
|
442
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
443
|
+
*/
|
|
444
|
+
function detect(propName, prototype) {
|
|
445
|
+
return isUndefined$1(getOwnPropertyDescriptor$1(prototype, propName));
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/*
|
|
449
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
450
|
+
* All rights reserved.
|
|
451
|
+
* SPDX-License-Identifier: MIT
|
|
452
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
453
|
+
*/
|
|
454
|
+
function createAriaPropertyPropertyDescriptor(attrName) {
|
|
455
|
+
// Note that we need to call this.{get,set,has,remove}Attribute rather than dereferencing
|
|
456
|
+
// from Element.prototype, because these methods are overridden in LightningElement.
|
|
457
|
+
return {
|
|
458
|
+
get: function get() {
|
|
459
|
+
// reflect what's in the attribute
|
|
460
|
+
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
461
|
+
},
|
|
462
|
+
set: function set(newValue) {
|
|
463
|
+
// reflect into the corresponding attribute
|
|
464
|
+
if (isNull(newValue)) {
|
|
465
|
+
this.removeAttribute(attrName);
|
|
466
|
+
} else {
|
|
467
|
+
this.setAttribute(attrName, newValue);
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
configurable: true,
|
|
471
|
+
enumerable: true
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
function patch$1(propName, prototype) {
|
|
475
|
+
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
476
|
+
var descriptor = createAriaPropertyPropertyDescriptor(attrName);
|
|
477
|
+
defineProperty(prototype, propName, descriptor);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/*
|
|
481
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
482
|
+
* All rights reserved.
|
|
483
|
+
* SPDX-License-Identifier: MIT
|
|
484
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
485
|
+
*/
|
|
486
|
+
function applyAriaReflection() {
|
|
487
|
+
var prototype = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Element.prototype;
|
|
488
|
+
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
489
|
+
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
490
|
+
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
491
|
+
if (detect(propName, prototype)) {
|
|
492
|
+
patch$1(propName, prototype);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
/** version: 2.33.0 */
|
|
497
|
+
|
|
498
|
+
/*
|
|
499
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
500
|
+
* All rights reserved.
|
|
501
|
+
* SPDX-License-Identifier: MIT
|
|
502
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
503
|
+
*/
|
|
504
|
+
if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
505
|
+
// If DISABLE_ARIA_REFLECTION_POLYFILL is false, then we need to apply the ARIA reflection polyfill globally,
|
|
506
|
+
// i.e. to the global Element.prototype
|
|
507
|
+
applyAriaReflection();
|
|
508
|
+
}
|
|
508
509
|
|
|
509
510
|
/*
|
|
510
511
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -572,7 +573,7 @@ var LWC = (function (exports) {
|
|
|
572
573
|
}
|
|
573
574
|
var callbacks = nextTickCallbackQueue;
|
|
574
575
|
nextTickCallbackQueue = []; // reset to a new queue
|
|
575
|
-
for (var _i3 = 0,
|
|
576
|
+
for (var _i3 = 0, len = callbacks.length; _i3 < len; _i3 += 1) {
|
|
576
577
|
callbacks[_i3]();
|
|
577
578
|
}
|
|
578
579
|
}
|
|
@@ -690,7 +691,7 @@ var LWC = (function (exports) {
|
|
|
690
691
|
if (!isUndefined$1(reactiveRecord)) {
|
|
691
692
|
var reactiveObservers = reactiveRecord[key];
|
|
692
693
|
if (!isUndefined$1(reactiveObservers)) {
|
|
693
|
-
for (var _i5 = 0,
|
|
694
|
+
for (var _i5 = 0, len = reactiveObservers.length; _i5 < len; _i5 += 1) {
|
|
694
695
|
var ro = reactiveObservers[_i5];
|
|
695
696
|
ro.notify();
|
|
696
697
|
}
|
|
@@ -2463,6 +2464,17 @@ var LWC = (function (exports) {
|
|
|
2463
2464
|
lightningBasedDescriptors[propName] = createBridgeToElementDescriptor(propName, HTMLElementOriginalDescriptors[propName]);
|
|
2464
2465
|
}
|
|
2465
2466
|
defineProperties(LightningElement.prototype, lightningBasedDescriptors);
|
|
2467
|
+
function applyAriaReflectionToLightningElement() {
|
|
2468
|
+
// If ARIA reflection is not applied globally to Element.prototype, or if we are running server-side,
|
|
2469
|
+
// apply it to LightningElement.prototype.
|
|
2470
|
+
// This allows `this.aria*` property accessors to work from inside a component, and to reflect `aria-*` attrs.
|
|
2471
|
+
applyAriaReflection(LightningElement.prototype);
|
|
2472
|
+
}
|
|
2473
|
+
// The reason for this odd if/else branching is limitations in @lwc/features:
|
|
2474
|
+
// https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#only-works-with-if-statements
|
|
2475
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
2476
|
+
applyAriaReflectionToLightningElement();
|
|
2477
|
+
}
|
|
2466
2478
|
defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
2467
2479
|
get: function get() {
|
|
2468
2480
|
// If required, a runtime-specific implementation must be defined.
|
|
@@ -3052,7 +3064,7 @@ var LWC = (function (exports) {
|
|
|
3052
3064
|
};
|
|
3053
3065
|
}
|
|
3054
3066
|
// expose public methods as props on the new Element Bridge
|
|
3055
|
-
for (var _i10 = 0,
|
|
3067
|
+
for (var _i10 = 0, _len = methods.length; _i10 < _len; _i10 += 1) {
|
|
3056
3068
|
var methodName = methods[_i10];
|
|
3057
3069
|
descriptors[methodName] = {
|
|
3058
3070
|
value: createMethodCaller(methodName),
|
|
@@ -3078,6 +3090,20 @@ var LWC = (function (exports) {
|
|
|
3078
3090
|
return HTMLBridgeElement;
|
|
3079
3091
|
}
|
|
3080
3092
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
3093
|
+
{
|
|
3094
|
+
// This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
|
|
3095
|
+
// so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
|
|
3096
|
+
// ARIA props outside the LightningElement
|
|
3097
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
3098
|
+
// If ARIA reflection is not applied globally to Element.prototype, apply it to HTMLBridgeElement.prototype.
|
|
3099
|
+
// This allows `elm.aria*` property accessors to work from outside a component, and to reflect `aria-*` attrs.
|
|
3100
|
+
// This is especially important because the template compiler compiles aria-* attrs on components to aria* props
|
|
3101
|
+
//
|
|
3102
|
+
// Also note that we apply this to BaseBridgeElement.prototype to avoid excessively redefining property
|
|
3103
|
+
// accessors inside the HTMLBridgeElementFactory.
|
|
3104
|
+
applyAriaReflection(BaseBridgeElement.prototype);
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3081
3107
|
freeze(BaseBridgeElement);
|
|
3082
3108
|
seal(BaseBridgeElement.prototype);
|
|
3083
3109
|
|
|
@@ -5297,7 +5323,7 @@ var LWC = (function (exports) {
|
|
|
5297
5323
|
}
|
|
5298
5324
|
function buildParseFragmentFn(createFragmentFn) {
|
|
5299
5325
|
return function (strings) {
|
|
5300
|
-
for (var
|
|
5326
|
+
for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
|
|
5301
5327
|
keys[_key3 - 1] = arguments[_key3];
|
|
5302
5328
|
}
|
|
5303
5329
|
var cache = create(null);
|
|
@@ -7138,7 +7164,7 @@ var LWC = (function (exports) {
|
|
|
7138
7164
|
}
|
|
7139
7165
|
return ctor;
|
|
7140
7166
|
}
|
|
7141
|
-
/* version: 2.
|
|
7167
|
+
/* version: 2.33.0 */
|
|
7142
7168
|
|
|
7143
7169
|
/*
|
|
7144
7170
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8175,7 +8201,7 @@ var LWC = (function (exports) {
|
|
|
8175
8201
|
function isNull(obj) {
|
|
8176
8202
|
return obj === null;
|
|
8177
8203
|
}
|
|
8178
|
-
/** version: 2.
|
|
8204
|
+
/** version: 2.33.0 */
|
|
8179
8205
|
|
|
8180
8206
|
/*
|
|
8181
8207
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8741,7 +8767,7 @@ var LWC = (function (exports) {
|
|
|
8741
8767
|
});
|
|
8742
8768
|
freeze(LightningElement);
|
|
8743
8769
|
seal(LightningElement.prototype);
|
|
8744
|
-
/* version: 2.
|
|
8770
|
+
/* version: 2.33.0 */
|
|
8745
8771
|
|
|
8746
8772
|
exports.LightningElement = LightningElement;
|
|
8747
8773
|
exports.__unstable__ProfilerControl = profilerControl;
|