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); }
|
|
@@ -169,6 +171,9 @@
|
|
|
169
171
|
* The above list of 46 aria attributes is consistent with the following resources:
|
|
170
172
|
* https://github.com/w3c/aria/pull/708/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR11060
|
|
171
173
|
* https://wicg.github.io/aom/spec/aria-reflection.html
|
|
174
|
+
*
|
|
175
|
+
* NOTE: If you update this list, please update test files that implicitly reference this list!
|
|
176
|
+
* Searching the codebase for `aria-flowto` and `ariaFlowTo` should be good enough to find all usages.
|
|
172
177
|
*/
|
|
173
178
|
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'];
|
|
174
179
|
var _ref = /*@__PURE__*/function () {
|
|
@@ -329,88 +334,7 @@
|
|
|
329
334
|
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
330
335
|
return propertyName;
|
|
331
336
|
}
|
|
332
|
-
/** version: 2.
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
336
|
-
*/
|
|
337
|
-
|
|
338
|
-
/*
|
|
339
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
340
|
-
* All rights reserved.
|
|
341
|
-
* SPDX-License-Identifier: MIT
|
|
342
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
343
|
-
*/
|
|
344
|
-
function detect(propName) {
|
|
345
|
-
return getOwnPropertyDescriptor$1(Element.prototype, propName) === undefined;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/*
|
|
349
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
350
|
-
* All rights reserved.
|
|
351
|
-
* SPDX-License-Identifier: MIT
|
|
352
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
353
|
-
*/
|
|
354
|
-
var nodeToAriaPropertyValuesMap = new WeakMap();
|
|
355
|
-
function getAriaPropertyMap(elm) {
|
|
356
|
-
var map = nodeToAriaPropertyValuesMap.get(elm);
|
|
357
|
-
if (map === undefined) {
|
|
358
|
-
map = {};
|
|
359
|
-
nodeToAriaPropertyValuesMap.set(elm, map);
|
|
360
|
-
}
|
|
361
|
-
return map;
|
|
362
|
-
}
|
|
363
|
-
function getNormalizedAriaPropertyValue(value) {
|
|
364
|
-
return value == null ? null : String(value);
|
|
365
|
-
}
|
|
366
|
-
function createAriaPropertyPropertyDescriptor(propName, attrName) {
|
|
367
|
-
return {
|
|
368
|
-
get: function get() {
|
|
369
|
-
var map = getAriaPropertyMap(this);
|
|
370
|
-
if (hasOwnProperty$1.call(map, propName)) {
|
|
371
|
-
return map[propName];
|
|
372
|
-
}
|
|
373
|
-
// otherwise just reflect what's in the attribute
|
|
374
|
-
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
375
|
-
},
|
|
376
|
-
set: function set(newValue) {
|
|
377
|
-
var normalizedValue = getNormalizedAriaPropertyValue(newValue);
|
|
378
|
-
var map = getAriaPropertyMap(this);
|
|
379
|
-
map[propName] = normalizedValue;
|
|
380
|
-
// reflect into the corresponding attribute
|
|
381
|
-
if (newValue === null) {
|
|
382
|
-
this.removeAttribute(attrName);
|
|
383
|
-
} else {
|
|
384
|
-
this.setAttribute(attrName, newValue);
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
configurable: true,
|
|
388
|
-
enumerable: true
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
function patch$1(propName) {
|
|
392
|
-
// Typescript is inferring the wrong function type for this particular
|
|
393
|
-
// overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
|
|
394
|
-
// @ts-ignore type-mismatch
|
|
395
|
-
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
396
|
-
var descriptor = createAriaPropertyPropertyDescriptor(propName, attrName);
|
|
397
|
-
Object.defineProperty(Element.prototype, propName, descriptor);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/*
|
|
401
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
402
|
-
* All rights reserved.
|
|
403
|
-
* SPDX-License-Identifier: MIT
|
|
404
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
405
|
-
*/
|
|
406
|
-
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
407
|
-
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
408
|
-
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
409
|
-
if (detect(propName)) {
|
|
410
|
-
patch$1(propName);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
/** version: 2.32.1 */
|
|
337
|
+
/** version: 2.33.0 */
|
|
414
338
|
|
|
415
339
|
/**
|
|
416
340
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -431,7 +355,8 @@
|
|
|
431
355
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
432
356
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
433
357
|
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
|
|
434
|
-
ENABLE_FROZEN_TEMPLATE: null
|
|
358
|
+
ENABLE_FROZEN_TEMPLATE: null,
|
|
359
|
+
DISABLE_ARIA_REFLECTION_POLYFILL: null
|
|
435
360
|
};
|
|
436
361
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
437
362
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
@@ -479,6 +404,83 @@
|
|
|
479
404
|
*/
|
|
480
405
|
function setFeatureFlagForTest(name, value) {
|
|
481
406
|
}
|
|
407
|
+
/** version: 2.33.0 */
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
411
|
+
*/
|
|
412
|
+
|
|
413
|
+
/*
|
|
414
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
415
|
+
* All rights reserved.
|
|
416
|
+
* SPDX-License-Identifier: MIT
|
|
417
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
418
|
+
*/
|
|
419
|
+
function detect(propName, prototype) {
|
|
420
|
+
return isUndefined$1(getOwnPropertyDescriptor$1(prototype, propName));
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/*
|
|
424
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
425
|
+
* All rights reserved.
|
|
426
|
+
* SPDX-License-Identifier: MIT
|
|
427
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
428
|
+
*/
|
|
429
|
+
function createAriaPropertyPropertyDescriptor(attrName) {
|
|
430
|
+
// Note that we need to call this.{get,set,has,remove}Attribute rather than dereferencing
|
|
431
|
+
// from Element.prototype, because these methods are overridden in LightningElement.
|
|
432
|
+
return {
|
|
433
|
+
get: function get() {
|
|
434
|
+
// reflect what's in the attribute
|
|
435
|
+
return this.hasAttribute(attrName) ? this.getAttribute(attrName) : null;
|
|
436
|
+
},
|
|
437
|
+
set: function set(newValue) {
|
|
438
|
+
// reflect into the corresponding attribute
|
|
439
|
+
if (isNull(newValue)) {
|
|
440
|
+
this.removeAttribute(attrName);
|
|
441
|
+
} else {
|
|
442
|
+
this.setAttribute(attrName, newValue);
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
configurable: true,
|
|
446
|
+
enumerable: true
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function patch$1(propName, prototype) {
|
|
450
|
+
var attrName = AriaPropNameToAttrNameMap[propName];
|
|
451
|
+
var descriptor = createAriaPropertyPropertyDescriptor(attrName);
|
|
452
|
+
defineProperty(prototype, propName, descriptor);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/*
|
|
456
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
457
|
+
* All rights reserved.
|
|
458
|
+
* SPDX-License-Identifier: MIT
|
|
459
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
460
|
+
*/
|
|
461
|
+
function applyAriaReflection() {
|
|
462
|
+
var prototype = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Element.prototype;
|
|
463
|
+
var ElementPrototypeAriaPropertyNames = keys(AriaPropNameToAttrNameMap);
|
|
464
|
+
for (var _i2 = 0, len = ElementPrototypeAriaPropertyNames.length; _i2 < len; _i2 += 1) {
|
|
465
|
+
var propName = ElementPrototypeAriaPropertyNames[_i2];
|
|
466
|
+
if (detect(propName, prototype)) {
|
|
467
|
+
patch$1(propName, prototype);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/** version: 2.33.0 */
|
|
472
|
+
|
|
473
|
+
/*
|
|
474
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
475
|
+
* All rights reserved.
|
|
476
|
+
* SPDX-License-Identifier: MIT
|
|
477
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
478
|
+
*/
|
|
479
|
+
if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
480
|
+
// If DISABLE_ARIA_REFLECTION_POLYFILL is false, then we need to apply the ARIA reflection polyfill globally,
|
|
481
|
+
// i.e. to the global Element.prototype
|
|
482
|
+
applyAriaReflection();
|
|
483
|
+
}
|
|
482
484
|
|
|
483
485
|
/*
|
|
484
486
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -493,7 +495,7 @@
|
|
|
493
495
|
function flushCallbackQueue() {
|
|
494
496
|
var callbacks = nextTickCallbackQueue;
|
|
495
497
|
nextTickCallbackQueue = []; // reset to a new queue
|
|
496
|
-
for (var _i3 = 0,
|
|
498
|
+
for (var _i3 = 0, len = callbacks.length; _i3 < len; _i3 += 1) {
|
|
497
499
|
callbacks[_i3]();
|
|
498
500
|
}
|
|
499
501
|
}
|
|
@@ -583,7 +585,7 @@
|
|
|
583
585
|
if (!isUndefined$1(reactiveRecord)) {
|
|
584
586
|
var reactiveObservers = reactiveRecord[key];
|
|
585
587
|
if (!isUndefined$1(reactiveObservers)) {
|
|
586
|
-
for (var _i5 = 0,
|
|
588
|
+
for (var _i5 = 0, len = reactiveObservers.length; _i5 < len; _i5 += 1) {
|
|
587
589
|
var ro = reactiveObservers[_i5];
|
|
588
590
|
ro.notify();
|
|
589
591
|
}
|
|
@@ -1827,6 +1829,17 @@
|
|
|
1827
1829
|
lightningBasedDescriptors[propName] = createBridgeToElementDescriptor(propName, HTMLElementOriginalDescriptors[propName]);
|
|
1828
1830
|
}
|
|
1829
1831
|
defineProperties(LightningElement.prototype, lightningBasedDescriptors);
|
|
1832
|
+
function applyAriaReflectionToLightningElement() {
|
|
1833
|
+
// If ARIA reflection is not applied globally to Element.prototype, or if we are running server-side,
|
|
1834
|
+
// apply it to LightningElement.prototype.
|
|
1835
|
+
// This allows `this.aria*` property accessors to work from inside a component, and to reflect `aria-*` attrs.
|
|
1836
|
+
applyAriaReflection(LightningElement.prototype);
|
|
1837
|
+
}
|
|
1838
|
+
// The reason for this odd if/else branching is limitations in @lwc/features:
|
|
1839
|
+
// https://github.com/salesforce/lwc/blob/master/packages/%40lwc/features/README.md#only-works-with-if-statements
|
|
1840
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
1841
|
+
applyAriaReflectionToLightningElement();
|
|
1842
|
+
}
|
|
1830
1843
|
defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
1831
1844
|
get: function get() {
|
|
1832
1845
|
// If required, a runtime-specific implementation must be defined.
|
|
@@ -2240,7 +2253,7 @@
|
|
|
2240
2253
|
};
|
|
2241
2254
|
}
|
|
2242
2255
|
// expose public methods as props on the new Element Bridge
|
|
2243
|
-
for (var _i10 = 0,
|
|
2256
|
+
for (var _i10 = 0, _len = methods.length; _i10 < _len; _i10 += 1) {
|
|
2244
2257
|
var methodName = methods[_i10];
|
|
2245
2258
|
descriptors[methodName] = {
|
|
2246
2259
|
value: createMethodCaller(methodName),
|
|
@@ -2266,6 +2279,20 @@
|
|
|
2266
2279
|
return HTMLBridgeElement;
|
|
2267
2280
|
}
|
|
2268
2281
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
2282
|
+
{
|
|
2283
|
+
// This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
|
|
2284
|
+
// so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
|
|
2285
|
+
// ARIA props outside the LightningElement
|
|
2286
|
+
if (lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
|
|
2287
|
+
// If ARIA reflection is not applied globally to Element.prototype, apply it to HTMLBridgeElement.prototype.
|
|
2288
|
+
// This allows `elm.aria*` property accessors to work from outside a component, and to reflect `aria-*` attrs.
|
|
2289
|
+
// This is especially important because the template compiler compiles aria-* attrs on components to aria* props
|
|
2290
|
+
//
|
|
2291
|
+
// Also note that we apply this to BaseBridgeElement.prototype to avoid excessively redefining property
|
|
2292
|
+
// accessors inside the HTMLBridgeElementFactory.
|
|
2293
|
+
applyAriaReflection(BaseBridgeElement.prototype);
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2269
2296
|
freeze(BaseBridgeElement);
|
|
2270
2297
|
seal(BaseBridgeElement.prototype);
|
|
2271
2298
|
function setActiveVM(vm) {
|
|
@@ -4003,7 +4030,7 @@
|
|
|
4003
4030
|
}
|
|
4004
4031
|
function buildParseFragmentFn(createFragmentFn) {
|
|
4005
4032
|
return function (strings) {
|
|
4006
|
-
for (var
|
|
4033
|
+
for (var _len2 = arguments.length, keys = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
|
|
4007
4034
|
keys[_key3 - 1] = arguments[_key3];
|
|
4008
4035
|
}
|
|
4009
4036
|
var cache = create(null);
|
|
@@ -6445,7 +6472,7 @@
|
|
|
6445
6472
|
function isNull(obj) {
|
|
6446
6473
|
return obj === null;
|
|
6447
6474
|
}
|
|
6448
|
-
/** version: 2.
|
|
6475
|
+
/** version: 2.33.0 */
|
|
6449
6476
|
|
|
6450
6477
|
/*
|
|
6451
6478
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7004,7 +7031,7 @@
|
|
|
7004
7031
|
});
|
|
7005
7032
|
freeze(LightningElement);
|
|
7006
7033
|
seal(LightningElement.prototype);
|
|
7007
|
-
/* version: 2.
|
|
7034
|
+
/* version: 2.33.0 */
|
|
7008
7035
|
|
|
7009
7036
|
exports.LightningElement = LightningElement;
|
|
7010
7037
|
exports.__unstable__ProfilerControl = profilerControl;
|