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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
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); }
|
|
8
8
|
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); }
|
|
9
9
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
10
|
-
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; }
|
|
10
|
+
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; }
|
|
11
11
|
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); }
|
|
12
12
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
13
13
|
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); }; }
|
|
@@ -16,15 +16,17 @@
|
|
|
16
16
|
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; } }
|
|
17
17
|
function _getPrototypeOf2(o) { _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf2(o); }
|
|
18
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
-
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); } }
|
|
19
|
+
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); } }
|
|
20
20
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
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); }
|
|
21
23
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
24
|
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."); }
|
|
23
25
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24
26
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
27
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
28
|
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."); }
|
|
27
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
29
|
+
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; } }
|
|
28
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
31
|
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; } } }; }
|
|
30
32
|
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); }
|
|
@@ -179,6 +181,9 @@
|
|
|
179
181
|
* The above list of 46 aria attributes is consistent with the following resources:
|
|
180
182
|
* https://github.com/w3c/aria/pull/708/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR11060
|
|
181
183
|
* https://wicg.github.io/aom/spec/aria-reflection.html
|
|
184
|
+
*
|
|
185
|
+
* NOTE: If you update this list, please update test files that implicitly reference this list!
|
|
186
|
+
* Searching the codebase for `aria-flowto` and `ariaFlowTo` should be good enough to find all usages.
|
|
182
187
|
*/
|
|
183
188
|
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'];
|
|
184
189
|
var _ref = /*@__PURE__*/function () {
|
|
@@ -347,90 +352,9 @@
|
|
|
347
352
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
348
353
|
*/
|
|
349
354
|
// Increment whenever the LWC template compiler changes
|
|
350
|
-
var LWC_VERSION = "2.
|
|
355
|
+
var LWC_VERSION = "2.33.0";
|
|
351
356
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
352
|
-
/** version: 2.
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
/*
|
|
359
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
360
|
-
* All rights reserved.
|
|
361
|
-
* SPDX-License-Identifier: MIT
|
|
362
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
363
|
-
*/
|
|
364
|
-
function detect(propName) {
|
|
365
|
-
return getOwnPropertyDescriptor$1(Element.prototype, propName) === undefined;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/*
|
|
369
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
370
|
-
* All rights reserved.
|
|
371
|
-
* SPDX-License-Identifier: MIT
|
|
372
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
373
|
-
*/
|
|
374
|
-
var nodeToAriaPropertyValuesMap = new WeakMap();
|
|
375
|
-
function getAriaPropertyMap(elm) {
|
|
376
|
-
var map = nodeToAriaPropertyValuesMap.get(elm);
|
|
377
|
-
if (map === undefined) {
|
|
378
|
-
map = {};
|
|
379
|
-
nodeToAriaPropertyValuesMap.set(elm, map);
|
|
380
|
-
}
|
|
381
|
-
return map;
|
|
382
|
-
}
|
|
383
|
-
function getNormalizedAriaPropertyValue(value) {
|
|
384
|
-
return value == null ? null : String(value);
|
|
385
|
-
}
|
|
386
|
-
function createAriaPropertyPropertyDescriptor(propName, attrName) {
|
|
387
|
-
return {
|
|
388
|
-
get: function get() {
|
|
389
|
-
var map = getAriaPropertyMap(this);
|
|
390
|
-
if (hasOwnProperty$1.call(map, propName)) {
|
|
391
|
-
return map[propName];
|
|
392
|
-
}
|
|
393
|
-
// otherwise just reflect what's in the attribute
|
|
394
|
-
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
395
|
-
},
|
|
396
|
-
set: function set(newValue) {
|
|
397
|
-
var normalizedValue = getNormalizedAriaPropertyValue(newValue);
|
|
398
|
-
var map = getAriaPropertyMap(this);
|
|
399
|
-
map[propName] = normalizedValue;
|
|
400
|
-
// reflect into the corresponding attribute
|
|
401
|
-
if (newValue === null) {
|
|
402
|
-
this.removeAttribute(attrName);
|
|
403
|
-
} else {
|
|
404
|
-
this.setAttribute(attrName, newValue);
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
configurable: true,
|
|
408
|
-
enumerable: true
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function patch$1(propName) {
|
|
412
|
-
// Typescript is inferring the wrong function type for this particular
|
|
413
|
-
// overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
|
|
414
|
-
// @ts-ignore type-mismatch
|
|
415
|
-
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
416
|
-
var descriptor = createAriaPropertyPropertyDescriptor(propName, attrName);
|
|
417
|
-
Object.defineProperty(Element.prototype, propName, descriptor);
|
|
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
|
-
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
427
|
-
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
428
|
-
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
429
|
-
if (detect(propName)) {
|
|
430
|
-
patch$1(propName);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
/** version: 2.32.1 */
|
|
357
|
+
/** version: 2.33.0 */
|
|
434
358
|
|
|
435
359
|
/**
|
|
436
360
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -451,7 +375,8 @@
|
|
|
451
375
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
452
376
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
453
377
|
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
|
|
454
|
-
ENABLE_FROZEN_TEMPLATE: null
|
|
378
|
+
ENABLE_FROZEN_TEMPLATE: null,
|
|
379
|
+
DISABLE_ARIA_REFLECTION_POLYFILL: null
|
|
455
380
|
};
|
|
456
381
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
457
382
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
@@ -507,7 +432,83 @@
|
|
|
507
432
|
setFeatureFlag(name, value);
|
|
508
433
|
}
|
|
509
434
|
}
|
|
510
|
-
/** version: 2.
|
|
435
|
+
/** version: 2.33.0 */
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
439
|
+
*/
|
|
440
|
+
|
|
441
|
+
/*
|
|
442
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
443
|
+
* All rights reserved.
|
|
444
|
+
* SPDX-License-Identifier: MIT
|
|
445
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
446
|
+
*/
|
|
447
|
+
function detect(propName, prototype) {
|
|
448
|
+
return isUndefined$1(getOwnPropertyDescriptor$1(prototype, propName));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/*
|
|
452
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
453
|
+
* All rights reserved.
|
|
454
|
+
* SPDX-License-Identifier: MIT
|
|
455
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
456
|
+
*/
|
|
457
|
+
function createAriaPropertyPropertyDescriptor(attrName) {
|
|
458
|
+
// Note that we need to call this.{get,set,has,remove}Attribute rather than dereferencing
|
|
459
|
+
// from Element.prototype, because these methods are overridden in LightningElement.
|
|
460
|
+
return {
|
|
461
|
+
get: function get() {
|
|
462
|
+
// reflect what's in the attribute
|
|
463
|
+
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
464
|
+
},
|
|
465
|
+
set: function set(newValue) {
|
|
466
|
+
// reflect into the corresponding attribute
|
|
467
|
+
if (isNull(newValue)) {
|
|
468
|
+
this.removeAttribute(attrName);
|
|
469
|
+
} else {
|
|
470
|
+
this.setAttribute(attrName, newValue);
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
configurable: true,
|
|
474
|
+
enumerable: true
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
function patch$1(propName, prototype) {
|
|
478
|
+
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
479
|
+
var descriptor = createAriaPropertyPropertyDescriptor(attrName);
|
|
480
|
+
defineProperty(prototype, propName, descriptor);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/*
|
|
484
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
485
|
+
* All rights reserved.
|
|
486
|
+
* SPDX-License-Identifier: MIT
|
|
487
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
488
|
+
*/
|
|
489
|
+
function applyAriaReflection() {
|
|
490
|
+
var prototype = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Element.prototype;
|
|
491
|
+
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
492
|
+
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
493
|
+
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
494
|
+
if (detect(propName, prototype)) {
|
|
495
|
+
patch$1(propName, prototype);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/** version: 2.33.0 */
|
|
500
|
+
|
|
501
|
+
/*
|
|
502
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
503
|
+
* All rights reserved.
|
|
504
|
+
* SPDX-License-Identifier: MIT
|
|
505
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
506
|
+
*/
|
|
507
|
+
if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
508
|
+
// If DISABLE_ARIA_REFLECTION_POLYFILL is false, then we need to apply the ARIA reflection polyfill globally,
|
|
509
|
+
// i.e. to the global Element.prototype
|
|
510
|
+
applyAriaReflection();
|
|
511
|
+
}
|
|
511
512
|
|
|
512
513
|
/*
|
|
513
514
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -575,7 +576,7 @@
|
|
|
575
576
|
}
|
|
576
577
|
var callbacks = nextTickCallbackQueue;
|
|
577
578
|
nextTickCallbackQueue = []; // reset to a new queue
|
|
578
|
-
for (var _i3 = 0,
|
|
579
|
+
for (var _i3 = 0, len = callbacks.length; _i3 < len; _i3 += 1) {
|
|
579
580
|
callbacks[_i3]();
|
|
580
581
|
}
|
|
581
582
|
}
|
|
@@ -693,7 +694,7 @@
|
|
|
693
694
|
if (!isUndefined$1(reactiveRecord)) {
|
|
694
695
|
var reactiveObservers = reactiveRecord[key];
|
|
695
696
|
if (!isUndefined$1(reactiveObservers)) {
|
|
696
|
-
for (var _i5 = 0,
|
|
697
|
+
for (var _i5 = 0, len = reactiveObservers.length; _i5 < len; _i5 += 1) {
|
|
697
698
|
var ro = reactiveObservers[_i5];
|
|
698
699
|
ro.notify();
|
|
699
700
|
}
|
|
@@ -2466,6 +2467,17 @@
|
|
|
2466
2467
|
lightningBasedDescriptors[propName] = createBridgeToElementDescriptor(propName, HTMLElementOriginalDescriptors[propName]);
|
|
2467
2468
|
}
|
|
2468
2469
|
defineProperties(LightningElement.prototype, lightningBasedDescriptors);
|
|
2470
|
+
function applyAriaReflectionToLightningElement() {
|
|
2471
|
+
// If ARIA reflection is not applied globally to Element.prototype, or if we are running server-side,
|
|
2472
|
+
// apply it to LightningElement.prototype.
|
|
2473
|
+
// This allows `this.aria*` property accessors to work from inside a component, and to reflect `aria-*` attrs.
|
|
2474
|
+
applyAriaReflection(LightningElement.prototype);
|
|
2475
|
+
}
|
|
2476
|
+
// The reason for this odd if/else branching is limitations in @lwc/features:
|
|
2477
|
+
// https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#only-works-with-if-statements
|
|
2478
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
2479
|
+
applyAriaReflectionToLightningElement();
|
|
2480
|
+
}
|
|
2469
2481
|
defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
2470
2482
|
get: function get() {
|
|
2471
2483
|
// If required, a runtime-specific implementation must be defined.
|
|
@@ -3055,7 +3067,7 @@
|
|
|
3055
3067
|
};
|
|
3056
3068
|
}
|
|
3057
3069
|
// expose public methods as props on the new Element Bridge
|
|
3058
|
-
for (var _i10 = 0,
|
|
3070
|
+
for (var _i10 = 0, _len = methods.length; _i10 < _len; _i10 += 1) {
|
|
3059
3071
|
var methodName = methods[_i10];
|
|
3060
3072
|
descriptors[methodName] = {
|
|
3061
3073
|
value: createMethodCaller(methodName),
|
|
@@ -3081,6 +3093,20 @@
|
|
|
3081
3093
|
return HTMLBridgeElement;
|
|
3082
3094
|
}
|
|
3083
3095
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
3096
|
+
{
|
|
3097
|
+
// This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
|
|
3098
|
+
// so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
|
|
3099
|
+
// ARIA props outside the LightningElement
|
|
3100
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
3101
|
+
// If ARIA reflection is not applied globally to Element.prototype, apply it to HTMLBridgeElement.prototype.
|
|
3102
|
+
// This allows `elm.aria*` property accessors to work from outside a component, and to reflect `aria-*` attrs.
|
|
3103
|
+
// This is especially important because the template compiler compiles aria-* attrs on components to aria* props
|
|
3104
|
+
//
|
|
3105
|
+
// Also note that we apply this to BaseBridgeElement.prototype to avoid excessively redefining property
|
|
3106
|
+
// accessors inside the HTMLBridgeElementFactory.
|
|
3107
|
+
applyAriaReflection(BaseBridgeElement.prototype);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3084
3110
|
freeze(BaseBridgeElement);
|
|
3085
3111
|
seal(BaseBridgeElement.prototype);
|
|
3086
3112
|
|
|
@@ -5300,7 +5326,7 @@
|
|
|
5300
5326
|
}
|
|
5301
5327
|
function buildParseFragmentFn(createFragmentFn) {
|
|
5302
5328
|
return function (strings) {
|
|
5303
|
-
for (var
|
|
5329
|
+
for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
|
|
5304
5330
|
keys[_key3 - 1] = arguments[_key3];
|
|
5305
5331
|
}
|
|
5306
5332
|
var cache = create(null);
|
|
@@ -7141,7 +7167,7 @@
|
|
|
7141
7167
|
}
|
|
7142
7168
|
return ctor;
|
|
7143
7169
|
}
|
|
7144
|
-
/* version: 2.
|
|
7170
|
+
/* version: 2.33.0 */
|
|
7145
7171
|
|
|
7146
7172
|
/*
|
|
7147
7173
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8178,7 +8204,7 @@
|
|
|
8178
8204
|
function isNull(obj) {
|
|
8179
8205
|
return obj === null;
|
|
8180
8206
|
}
|
|
8181
|
-
/** version: 2.
|
|
8207
|
+
/** version: 2.33.0 */
|
|
8182
8208
|
|
|
8183
8209
|
/*
|
|
8184
8210
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8744,7 +8770,7 @@
|
|
|
8744
8770
|
});
|
|
8745
8771
|
freeze(LightningElement);
|
|
8746
8772
|
seal(LightningElement.prototype);
|
|
8747
|
-
/* version: 2.
|
|
8773
|
+
/* version: 2.33.0 */
|
|
8748
8774
|
|
|
8749
8775
|
exports.LightningElement = LightningElement;
|
|
8750
8776
|
exports.__unstable__ProfilerControl = profilerControl;
|