lwc 2.34.0 → 2.35.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 +742 -493
- package/dist/engine-dom/iife/es2017/engine-dom.js +742 -492
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +777 -641
- package/dist/engine-dom/iife/es5/engine-dom.js +882 -618
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +732 -579
- package/dist/engine-dom/umd/es2017/engine-dom.js +742 -492
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +777 -641
- package/dist/engine-dom/umd/es5/engine-dom.js +882 -618
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +732 -579
- package/dist/engine-server/commonjs/es2017/engine-server.js +635 -603
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +635 -603
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +15 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +15 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +15 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +18 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +18 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +15 -4
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +15 -4
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +18 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +18 -3
- 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 +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- 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 +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +7 -7
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
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
|
-
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
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); }
|
|
23
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
24
19
|
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."); }
|
|
25
20
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -28,6 +23,11 @@
|
|
|
28
23
|
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."); }
|
|
29
24
|
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; } }
|
|
30
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
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); } }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
|
+
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); }
|
|
31
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; } } }; }
|
|
32
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); }
|
|
33
33
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
var _String$prototype = String.prototype,
|
|
110
110
|
StringCharCodeAt = _String$prototype.charCodeAt,
|
|
111
111
|
StringReplace = _String$prototype.replace,
|
|
112
|
+
StringSplit = _String$prototype.split,
|
|
112
113
|
StringSlice = _String$prototype.slice,
|
|
113
114
|
StringToLowerCase = _String$prototype.toLowerCase;
|
|
114
115
|
function isUndefined$1(obj) {
|
|
@@ -204,6 +205,9 @@
|
|
|
204
205
|
}(),
|
|
205
206
|
AriaAttrNameToPropNameMap = _ref.AriaAttrNameToPropNameMap,
|
|
206
207
|
AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
|
|
208
|
+
// These attributes take either an ID or a list of IDs as values.
|
|
209
|
+
// This includes aria-* attributes as well as the special non-ARIA "for" attribute
|
|
210
|
+
var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
|
|
207
211
|
|
|
208
212
|
/*
|
|
209
213
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -257,6 +261,8 @@
|
|
|
257
261
|
var KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
258
262
|
var KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
259
263
|
var KEY__SCOPED_CSS = '$scoped$';
|
|
264
|
+
var KEY__NATIVE_GET_ELEMENT_BY_ID = '$nativeGetElementById$';
|
|
265
|
+
var KEY__NATIVE_QUERY_SELECTOR_ALL = '$nativeQuerySelectorAll$';
|
|
260
266
|
var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
261
267
|
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
262
268
|
var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
@@ -352,9 +358,9 @@
|
|
|
352
358
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
353
359
|
*/
|
|
354
360
|
// Increment whenever the LWC template compiler changes
|
|
355
|
-
var LWC_VERSION = "2.
|
|
361
|
+
var LWC_VERSION = "2.35.0";
|
|
356
362
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
357
|
-
/** version: 2.
|
|
363
|
+
/** version: 2.35.0 */
|
|
358
364
|
|
|
359
365
|
/**
|
|
360
366
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -433,7 +439,7 @@
|
|
|
433
439
|
setFeatureFlag(name, value);
|
|
434
440
|
}
|
|
435
441
|
}
|
|
436
|
-
/** version: 2.
|
|
442
|
+
/** version: 2.35.0 */
|
|
437
443
|
|
|
438
444
|
/**
|
|
439
445
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -497,7 +503,7 @@
|
|
|
497
503
|
}
|
|
498
504
|
}
|
|
499
505
|
}
|
|
500
|
-
/** version: 2.
|
|
506
|
+
/** version: 2.35.0 */
|
|
501
507
|
|
|
502
508
|
/*
|
|
503
509
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -565,113 +571,173 @@
|
|
|
565
571
|
* SPDX-License-Identifier: MIT
|
|
566
572
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
567
573
|
*/
|
|
568
|
-
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
var
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
/** Callbacks to invoke when reporting is enabled **/
|
|
575
|
+
var onReportingEnabledCallbacks = [];
|
|
576
|
+
/** The currently assigned reporting dispatcher. */
|
|
577
|
+
var currentDispatcher$1 = noop;
|
|
578
|
+
/**
|
|
579
|
+
* Whether reporting is enabled.
|
|
580
|
+
*
|
|
581
|
+
* Note that this may seem redundant, given you can just check if the currentDispatcher is undefined,
|
|
582
|
+
* but it turns out that Terser only strips out unused code if we use this explicit boolean.
|
|
583
|
+
*/
|
|
584
|
+
var enabled$1 = false;
|
|
585
|
+
var reportingControl = {
|
|
586
|
+
/**
|
|
587
|
+
* Attach a new reporting control (aka dispatcher).
|
|
588
|
+
*
|
|
589
|
+
* @param dispatcher - reporting control
|
|
590
|
+
*/
|
|
591
|
+
attachDispatcher: function attachDispatcher(dispatcher) {
|
|
592
|
+
enabled$1 = true;
|
|
593
|
+
currentDispatcher$1 = dispatcher;
|
|
594
|
+
var _iterator = _createForOfIteratorHelper(onReportingEnabledCallbacks),
|
|
595
|
+
_step;
|
|
596
|
+
try {
|
|
597
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
598
|
+
var callback = _step.value;
|
|
599
|
+
try {
|
|
600
|
+
callback();
|
|
601
|
+
} catch (err) {
|
|
602
|
+
// This should never happen. But if it does, we don't want one callback to cause another to fail
|
|
603
|
+
// eslint-disable-next-line no-console
|
|
604
|
+
console.error('Could not invoke callback', err);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
} catch (err) {
|
|
608
|
+
_iterator.e(err);
|
|
609
|
+
} finally {
|
|
610
|
+
_iterator.f();
|
|
576
611
|
}
|
|
612
|
+
onReportingEnabledCallbacks.length = 0; // clear the array
|
|
613
|
+
},
|
|
614
|
+
/**
|
|
615
|
+
* Detach the current reporting control (aka dispatcher).
|
|
616
|
+
*/
|
|
617
|
+
detachDispatcher: function detachDispatcher() {
|
|
618
|
+
enabled$1 = false;
|
|
619
|
+
currentDispatcher$1 = noop;
|
|
577
620
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* Call a callback when reporting is enabled, or immediately if reporting is already enabled.
|
|
624
|
+
* Will only ever be called once.
|
|
625
|
+
* @param callback
|
|
626
|
+
*/
|
|
627
|
+
function onReportingEnabled(callback) {
|
|
628
|
+
if (enabled$1) {
|
|
629
|
+
// call immediately
|
|
630
|
+
callback();
|
|
631
|
+
} else {
|
|
632
|
+
// call later
|
|
633
|
+
onReportingEnabledCallbacks.push(callback);
|
|
582
634
|
}
|
|
583
635
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
636
|
+
/**
|
|
637
|
+
* Report to the current dispatcher, if there is one.
|
|
638
|
+
* @param reportingEventId
|
|
639
|
+
* @param vm
|
|
640
|
+
*/
|
|
641
|
+
function report(reportingEventId, vm) {
|
|
642
|
+
if (enabled$1) {
|
|
643
|
+
currentDispatcher$1(reportingEventId, vm.tagName, vm.idx);
|
|
589
644
|
}
|
|
590
|
-
|
|
591
|
-
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/*
|
|
648
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
649
|
+
* All rights reserved.
|
|
650
|
+
* SPDX-License-Identifier: MIT
|
|
651
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
652
|
+
*/
|
|
653
|
+
function getComponentTag(vm) {
|
|
654
|
+
return "<".concat(StringToLowerCase.call(vm.tagName), ">");
|
|
655
|
+
}
|
|
656
|
+
// TODO [#1695]: Unify getComponentStack and getErrorComponentStack
|
|
657
|
+
function getComponentStack(vm) {
|
|
658
|
+
var stack = [];
|
|
659
|
+
var prefix = '';
|
|
660
|
+
while (!isNull(vm.owner)) {
|
|
661
|
+
ArrayPush$1.call(stack, prefix + getComponentTag(vm));
|
|
662
|
+
vm = vm.owner;
|
|
663
|
+
prefix += '\t';
|
|
592
664
|
}
|
|
593
|
-
|
|
665
|
+
return ArrayJoin.call(stack, '\n');
|
|
594
666
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
597
|
-
|
|
667
|
+
function getErrorComponentStack(vm) {
|
|
668
|
+
var wcStack = [];
|
|
669
|
+
var currentVm = vm;
|
|
670
|
+
while (!isNull(currentVm)) {
|
|
671
|
+
ArrayPush$1.call(wcStack, getComponentTag(currentVm));
|
|
672
|
+
currentVm = currentVm.owner;
|
|
598
673
|
}
|
|
599
|
-
return
|
|
674
|
+
return wcStack.reverse().join('\n\t');
|
|
600
675
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
var _declaration$split = declaration.split(PROPERTY_DELIMITER),
|
|
615
|
-
_declaration$split2 = _slicedToArray(_declaration$split, 2),
|
|
616
|
-
prop = _declaration$split2[0],
|
|
617
|
-
value = _declaration$split2[1];
|
|
618
|
-
if (prop !== undefined && value !== undefined) {
|
|
619
|
-
styleMap[prop.trim()] = value.trim();
|
|
620
|
-
}
|
|
676
|
+
|
|
677
|
+
/*
|
|
678
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
679
|
+
* All rights reserved.
|
|
680
|
+
* SPDX-License-Identifier: MIT
|
|
681
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
682
|
+
*/
|
|
683
|
+
function addErrorComponentStack(vm, error) {
|
|
684
|
+
if (!isFrozen(error) && isUndefined$1(error.wcStack)) {
|
|
685
|
+
var wcStack = getErrorComponentStack(vm);
|
|
686
|
+
defineProperty(error, 'wcStack', {
|
|
687
|
+
get: function get() {
|
|
688
|
+
return wcStack;
|
|
621
689
|
}
|
|
622
|
-
}
|
|
623
|
-
} catch (err) {
|
|
624
|
-
_iterator.e(err);
|
|
625
|
-
} finally {
|
|
626
|
-
_iterator.f();
|
|
690
|
+
});
|
|
627
691
|
}
|
|
628
|
-
return styleMap;
|
|
629
692
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
693
|
+
|
|
694
|
+
/*
|
|
695
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
696
|
+
* All rights reserved.
|
|
697
|
+
* SPDX-License-Identifier: MIT
|
|
698
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
699
|
+
*/
|
|
700
|
+
var alreadyLoggedMessages = new Set();
|
|
701
|
+
// @ts-ignore
|
|
702
|
+
if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
|
|
703
|
+
// @ts-ignore
|
|
704
|
+
window.__lwcResetAlreadyLoggedMessages = function () {
|
|
705
|
+
alreadyLoggedMessages.clear();
|
|
706
|
+
};
|
|
640
707
|
}
|
|
641
|
-
function
|
|
642
|
-
var
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
list.push(stylesheet);
|
|
650
|
-
} else {
|
|
651
|
-
list.push.apply(list, _toConsumableArray(flattenStylesheets(stylesheet)));
|
|
652
|
-
}
|
|
708
|
+
function log(method, message, vm, once) {
|
|
709
|
+
var msg = "[LWC ".concat(method, "]: ").concat(message);
|
|
710
|
+
if (!isUndefined$1(vm)) {
|
|
711
|
+
msg = "".concat(msg, "\n").concat(getComponentStack(vm));
|
|
712
|
+
}
|
|
713
|
+
if (once) {
|
|
714
|
+
if (alreadyLoggedMessages.has(msg)) {
|
|
715
|
+
return;
|
|
653
716
|
}
|
|
654
|
-
|
|
655
|
-
_iterator2.e(err);
|
|
656
|
-
} finally {
|
|
657
|
-
_iterator2.f();
|
|
717
|
+
alreadyLoggedMessages.add(msg);
|
|
658
718
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
throw new Error('refVNodes must be defined when setting a ref');
|
|
719
|
+
// In Jest tests, reduce the warning and error verbosity by not printing the callstack
|
|
720
|
+
if (process.env.NODE_ENV === 'test') {
|
|
721
|
+
/* eslint-disable-next-line no-console */
|
|
722
|
+
console[method](msg);
|
|
723
|
+
return;
|
|
665
724
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
if (!(ref in refVNodes) || refVNodes[ref].key < vnode.key) {
|
|
672
|
-
refVNodes[ref] = vnode;
|
|
725
|
+
try {
|
|
726
|
+
throw new Error(msg);
|
|
727
|
+
} catch (e) {
|
|
728
|
+
/* eslint-disable-next-line no-console */
|
|
729
|
+
console[method](e);
|
|
673
730
|
}
|
|
674
731
|
}
|
|
732
|
+
function logError(message, vm) {
|
|
733
|
+
log('error', message, vm, false);
|
|
734
|
+
}
|
|
735
|
+
function logWarn(message, vm) {
|
|
736
|
+
log('warn', message, vm, false);
|
|
737
|
+
}
|
|
738
|
+
function logWarnOnce(message, vm) {
|
|
739
|
+
log('warn', message, vm, true);
|
|
740
|
+
}
|
|
675
741
|
|
|
676
742
|
/*
|
|
677
743
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -695,8 +761,8 @@
|
|
|
695
761
|
if (!isUndefined$1(reactiveRecord)) {
|
|
696
762
|
var reactiveObservers = reactiveRecord[key];
|
|
697
763
|
if (!isUndefined$1(reactiveObservers)) {
|
|
698
|
-
for (var
|
|
699
|
-
var ro = reactiveObservers[
|
|
764
|
+
for (var _i3 = 0, len = reactiveObservers.length; _i3 < len; _i3 += 1) {
|
|
765
|
+
var ro = reactiveObservers[_i3];
|
|
700
766
|
ro.notify();
|
|
701
767
|
}
|
|
702
768
|
}
|
|
@@ -755,9 +821,9 @@
|
|
|
755
821
|
var listeners = this.listeners;
|
|
756
822
|
var len = listeners.length;
|
|
757
823
|
if (len > 0) {
|
|
758
|
-
for (var
|
|
759
|
-
var set = listeners[
|
|
760
|
-
var pos = ArrayIndexOf.call(listeners[
|
|
824
|
+
for (var _i4 = 0; _i4 < len; _i4 += 1) {
|
|
825
|
+
var set = listeners[_i4];
|
|
826
|
+
var pos = ArrayIndexOf.call(listeners[_i4], this);
|
|
761
827
|
ArraySplice.call(set, pos, 1);
|
|
762
828
|
}
|
|
763
829
|
listeners.length = 0;
|
|
@@ -802,76 +868,112 @@
|
|
|
802
868
|
* SPDX-License-Identifier: MIT
|
|
803
869
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
804
870
|
*/
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
function
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
vm = vm.owner;
|
|
815
|
-
prefix += '\t';
|
|
816
|
-
}
|
|
817
|
-
return ArrayJoin.call(stack, '\n');
|
|
818
|
-
}
|
|
819
|
-
function getErrorComponentStack(vm) {
|
|
820
|
-
var wcStack = [];
|
|
821
|
-
var currentVm = vm;
|
|
822
|
-
while (!isNull(currentVm)) {
|
|
823
|
-
ArrayPush$1.call(wcStack, getComponentTag(currentVm));
|
|
824
|
-
currentVm = currentVm.owner;
|
|
871
|
+
var nextTickCallbackQueue = [];
|
|
872
|
+
var SPACE_CHAR = 32;
|
|
873
|
+
var EmptyObject = seal(create(null));
|
|
874
|
+
var EmptyArray = seal([]);
|
|
875
|
+
function flushCallbackQueue() {
|
|
876
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
877
|
+
if (nextTickCallbackQueue.length === 0) {
|
|
878
|
+
throw new Error("Internal Error: If callbackQueue is scheduled, it is because there must be at least one callback on this pending queue.");
|
|
879
|
+
}
|
|
825
880
|
}
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
831
|
-
* All rights reserved.
|
|
832
|
-
* SPDX-License-Identifier: MIT
|
|
833
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
834
|
-
*/
|
|
835
|
-
function addErrorComponentStack(vm, error) {
|
|
836
|
-
if (!isFrozen(error) && isUndefined$1(error.wcStack)) {
|
|
837
|
-
var wcStack = getErrorComponentStack(vm);
|
|
838
|
-
defineProperty(error, 'wcStack', {
|
|
839
|
-
get: function get() {
|
|
840
|
-
return wcStack;
|
|
841
|
-
}
|
|
842
|
-
});
|
|
881
|
+
var callbacks = nextTickCallbackQueue;
|
|
882
|
+
nextTickCallbackQueue = []; // reset to a new queue
|
|
883
|
+
for (var _i5 = 0, len = callbacks.length; _i5 < len; _i5 += 1) {
|
|
884
|
+
callbacks[_i5]();
|
|
843
885
|
}
|
|
844
886
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
851
|
-
*/
|
|
852
|
-
function log(method, message, vm) {
|
|
853
|
-
var msg = "[LWC ".concat(method, "]: ").concat(message);
|
|
854
|
-
if (!isUndefined$1(vm)) {
|
|
855
|
-
msg = "".concat(msg, "\n").concat(getComponentStack(vm));
|
|
856
|
-
}
|
|
857
|
-
// In Jest tests, reduce the warning and error verbosity by not printing the callstack
|
|
858
|
-
if (process.env.NODE_ENV === 'test') {
|
|
859
|
-
/* eslint-disable-next-line no-console */
|
|
860
|
-
console[method](msg);
|
|
861
|
-
return;
|
|
887
|
+
function addCallbackToNextTick(callback) {
|
|
888
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
889
|
+
if (!isFunction$1(callback)) {
|
|
890
|
+
throw new Error("Internal Error: addCallbackToNextTick() can only accept a function callback");
|
|
891
|
+
}
|
|
862
892
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
} catch (e) {
|
|
866
|
-
/* eslint-disable-next-line no-console */
|
|
867
|
-
console[method](e);
|
|
893
|
+
if (nextTickCallbackQueue.length === 0) {
|
|
894
|
+
Promise.resolve().then(flushCallbackQueue);
|
|
868
895
|
}
|
|
896
|
+
ArrayPush$1.call(nextTickCallbackQueue, callback);
|
|
869
897
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
898
|
+
function guid() {
|
|
899
|
+
function s4() {
|
|
900
|
+
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
901
|
+
}
|
|
902
|
+
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
872
903
|
}
|
|
873
|
-
|
|
874
|
-
|
|
904
|
+
// Borrowed from Vue template compiler.
|
|
905
|
+
// https://github.com/vuejs/vue/blob/531371b818b0e31a989a06df43789728f23dc4e8/src/platforms/web/util/style.js#L5-L16
|
|
906
|
+
var DECLARATION_DELIMITER = /;(?![^(]*\))/g;
|
|
907
|
+
var PROPERTY_DELIMITER = /:(.+)/;
|
|
908
|
+
function parseStyleText(cssText) {
|
|
909
|
+
var styleMap = {};
|
|
910
|
+
var declarations = cssText.split(DECLARATION_DELIMITER);
|
|
911
|
+
var _iterator2 = _createForOfIteratorHelper(declarations),
|
|
912
|
+
_step2;
|
|
913
|
+
try {
|
|
914
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
915
|
+
var declaration = _step2.value;
|
|
916
|
+
if (declaration) {
|
|
917
|
+
var _declaration$split = declaration.split(PROPERTY_DELIMITER),
|
|
918
|
+
_declaration$split2 = _slicedToArray(_declaration$split, 2),
|
|
919
|
+
prop = _declaration$split2[0],
|
|
920
|
+
value = _declaration$split2[1];
|
|
921
|
+
if (prop !== undefined && value !== undefined) {
|
|
922
|
+
styleMap[prop.trim()] = value.trim();
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
} catch (err) {
|
|
927
|
+
_iterator2.e(err);
|
|
928
|
+
} finally {
|
|
929
|
+
_iterator2.f();
|
|
930
|
+
}
|
|
931
|
+
return styleMap;
|
|
932
|
+
}
|
|
933
|
+
// Make a shallow copy of an object but omit the given key
|
|
934
|
+
function cloneAndOmitKey(object, keyToOmit) {
|
|
935
|
+
var result = {};
|
|
936
|
+
for (var _i6 = 0, _Object$keys = Object.keys(object); _i6 < _Object$keys.length; _i6++) {
|
|
937
|
+
var key = _Object$keys[_i6];
|
|
938
|
+
if (key !== keyToOmit) {
|
|
939
|
+
result[key] = object[key];
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
return result;
|
|
943
|
+
}
|
|
944
|
+
function flattenStylesheets(stylesheets) {
|
|
945
|
+
var list = [];
|
|
946
|
+
var _iterator3 = _createForOfIteratorHelper(stylesheets),
|
|
947
|
+
_step3;
|
|
948
|
+
try {
|
|
949
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
950
|
+
var stylesheet = _step3.value;
|
|
951
|
+
if (!Array.isArray(stylesheet)) {
|
|
952
|
+
list.push(stylesheet);
|
|
953
|
+
} else {
|
|
954
|
+
list.push.apply(list, _toConsumableArray(flattenStylesheets(stylesheet)));
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
} catch (err) {
|
|
958
|
+
_iterator3.e(err);
|
|
959
|
+
} finally {
|
|
960
|
+
_iterator3.f();
|
|
961
|
+
}
|
|
962
|
+
return list;
|
|
963
|
+
}
|
|
964
|
+
// Set a ref (lwc:ref) on a VM, from a template API
|
|
965
|
+
function setRefVNode(vm, ref, vnode) {
|
|
966
|
+
if (process.env.NODE_ENV !== 'production' && isUndefined$1(vm.refVNodes)) {
|
|
967
|
+
throw new Error('refVNodes must be defined when setting a ref');
|
|
968
|
+
}
|
|
969
|
+
// If this method is called, then vm.refVNodes is set as the template has refs.
|
|
970
|
+
// If not, then something went wrong and we threw an error above.
|
|
971
|
+
var refVNodes = vm.refVNodes;
|
|
972
|
+
// In cases of conflict (two elements with the same ref), prefer, the last one,
|
|
973
|
+
// in depth-first traversal order.
|
|
974
|
+
if (!(ref in refVNodes) || refVNodes[ref].key < vnode.key) {
|
|
975
|
+
refVNodes[ref] = vnode;
|
|
976
|
+
}
|
|
875
977
|
}
|
|
876
978
|
|
|
877
979
|
/*
|
|
@@ -916,7 +1018,7 @@
|
|
|
916
1018
|
//
|
|
917
1019
|
// If you update this list, check for test files that recapitulate the same list. Searching the codebase
|
|
918
1020
|
// for e.g. "dropzone" should suffice.
|
|
919
|
-
var globalHTMLProperties =
|
|
1021
|
+
var globalHTMLProperties = {
|
|
920
1022
|
accessKey: {
|
|
921
1023
|
attribute: 'accesskey'
|
|
922
1024
|
},
|
|
@@ -1001,7 +1103,7 @@
|
|
|
1001
1103
|
role: {
|
|
1002
1104
|
attribute: 'role'
|
|
1003
1105
|
}
|
|
1004
|
-
}
|
|
1106
|
+
};
|
|
1005
1107
|
var controlledElement = null;
|
|
1006
1108
|
var controlledAttributeName;
|
|
1007
1109
|
function isAttributeLocked(elm, attrName) {
|
|
@@ -2355,17 +2457,17 @@
|
|
|
2355
2457
|
var refs = refsCache.get(refVNodes);
|
|
2356
2458
|
if (isUndefined$1(refs)) {
|
|
2357
2459
|
refs = create(null);
|
|
2358
|
-
var
|
|
2359
|
-
|
|
2460
|
+
var _iterator4 = _createForOfIteratorHelper(keys(refVNodes)),
|
|
2461
|
+
_step4;
|
|
2360
2462
|
try {
|
|
2361
|
-
for (
|
|
2362
|
-
var key =
|
|
2463
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
2464
|
+
var key = _step4.value;
|
|
2363
2465
|
refs[key] = refVNodes[key].elm;
|
|
2364
2466
|
}
|
|
2365
2467
|
} catch (err) {
|
|
2366
|
-
|
|
2468
|
+
_iterator4.e(err);
|
|
2367
2469
|
} finally {
|
|
2368
|
-
|
|
2470
|
+
_iterator4.f();
|
|
2369
2471
|
}
|
|
2370
2472
|
freeze(refs);
|
|
2371
2473
|
refsCache.set(refVNodes, refs);
|
|
@@ -2515,98 +2617,378 @@
|
|
|
2515
2617
|
* SPDX-License-Identifier: MIT
|
|
2516
2618
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2517
2619
|
*/
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2620
|
+
var DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
|
|
2621
|
+
var DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
|
|
2622
|
+
var WIRE_DEBUG_ENTRY = '@wire';
|
|
2623
|
+
var WireMetaMap = new Map();
|
|
2624
|
+
var WireContextRegistrationEvent = /*#__PURE__*/function (_CustomEvent) {
|
|
2625
|
+
_inherits(WireContextRegistrationEvent, _CustomEvent);
|
|
2626
|
+
var _super3 = _createSuper(WireContextRegistrationEvent);
|
|
2627
|
+
function WireContextRegistrationEvent(adapterToken, _ref3) {
|
|
2628
|
+
var _this2;
|
|
2629
|
+
var setNewContext = _ref3.setNewContext,
|
|
2630
|
+
setDisconnectedCallback = _ref3.setDisconnectedCallback;
|
|
2631
|
+
_classCallCheck(this, WireContextRegistrationEvent);
|
|
2632
|
+
_this2 = _super3.call(this, adapterToken, {
|
|
2633
|
+
bubbles: true,
|
|
2634
|
+
composed: true
|
|
2635
|
+
});
|
|
2636
|
+
defineProperties(_assertThisInitialized(_this2), {
|
|
2637
|
+
setNewContext: {
|
|
2638
|
+
value: setNewContext
|
|
2639
|
+
},
|
|
2640
|
+
setDisconnectedCallback: {
|
|
2641
|
+
value: setDisconnectedCallback
|
|
2642
|
+
}
|
|
2643
|
+
});
|
|
2644
|
+
return _this2;
|
|
2521
2645
|
}
|
|
2522
|
-
|
|
2646
|
+
return _createClass(WireContextRegistrationEvent);
|
|
2647
|
+
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
2648
|
+
function createFieldDataCallback(vm, name) {
|
|
2649
|
+
return function (value) {
|
|
2650
|
+
updateComponentValue(vm, name, value);
|
|
2651
|
+
};
|
|
2523
2652
|
}
|
|
2524
|
-
function
|
|
2525
|
-
return {
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
}
|
|
2532
|
-
return;
|
|
2533
|
-
}
|
|
2534
|
-
componentValueObserved(vm, key);
|
|
2535
|
-
return vm.cmpProps[key];
|
|
2536
|
-
},
|
|
2537
|
-
set: function set(newValue) {
|
|
2538
|
-
var vm = getAssociatedVM(this);
|
|
2539
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2540
|
-
var _vmBeingRendered3 = getVMBeingRendered();
|
|
2541
|
-
assert.invariant(!isInvokingRender, "".concat(_vmBeingRendered3, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2542
|
-
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(_vmBeingRendered3, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2543
|
-
}
|
|
2544
|
-
vm.cmpProps[key] = newValue;
|
|
2545
|
-
componentValueMutated(vm, key);
|
|
2546
|
-
},
|
|
2547
|
-
enumerable: true,
|
|
2548
|
-
configurable: true
|
|
2653
|
+
function createMethodDataCallback(vm, method) {
|
|
2654
|
+
return function (value) {
|
|
2655
|
+
// dispatching new value into the wired method
|
|
2656
|
+
runWithBoundaryProtection(vm, vm.owner, noop, function () {
|
|
2657
|
+
// job
|
|
2658
|
+
method.call(vm.component, value);
|
|
2659
|
+
}, noop);
|
|
2549
2660
|
};
|
|
2550
2661
|
}
|
|
2551
|
-
function
|
|
2552
|
-
var
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2662
|
+
function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
|
|
2663
|
+
var hasPendingConfig = false;
|
|
2664
|
+
// creating the reactive observer for reactive params when needed
|
|
2665
|
+
var ro = createReactiveObserver(function () {
|
|
2666
|
+
if (hasPendingConfig === false) {
|
|
2667
|
+
hasPendingConfig = true;
|
|
2668
|
+
// collect new config in the micro-task
|
|
2669
|
+
Promise.resolve().then(function () {
|
|
2670
|
+
hasPendingConfig = false;
|
|
2671
|
+
// resetting current reactive params
|
|
2672
|
+
ro.reset();
|
|
2673
|
+
// dispatching a new config due to a change in the configuration
|
|
2674
|
+
computeConfigAndUpdate();
|
|
2675
|
+
});
|
|
2559
2676
|
}
|
|
2560
|
-
|
|
2561
|
-
|
|
2677
|
+
});
|
|
2678
|
+
var computeConfigAndUpdate = function computeConfigAndUpdate() {
|
|
2679
|
+
var config;
|
|
2680
|
+
ro.observe(function () {
|
|
2681
|
+
return config = configCallback(component);
|
|
2682
|
+
});
|
|
2683
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
2684
|
+
// TODO: dev-mode validation of config based on the adapter.configSchema
|
|
2685
|
+
// @ts-ignore it is assigned in the observe() callback
|
|
2686
|
+
callbackWhenConfigIsReady(config);
|
|
2687
|
+
};
|
|
2562
2688
|
return {
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
// Assert that the this value is an actual Component with an associated VM.
|
|
2566
|
-
getAssociatedVM(this);
|
|
2567
|
-
}
|
|
2568
|
-
return _get2.call(this);
|
|
2569
|
-
},
|
|
2570
|
-
set: function set(newValue) {
|
|
2571
|
-
var vm = getAssociatedVM(this);
|
|
2572
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2573
|
-
var _vmBeingRendered4 = getVMBeingRendered();
|
|
2574
|
-
assert.invariant(!isInvokingRender, "".concat(_vmBeingRendered4, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2575
|
-
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(_vmBeingRendered4, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2576
|
-
}
|
|
2577
|
-
if (_set2) {
|
|
2578
|
-
_set2.call(this, newValue);
|
|
2579
|
-
} else if (process.env.NODE_ENV !== 'production') {
|
|
2580
|
-
assert.fail("Invalid attempt to set a new value for property ".concat(toString$1(key), " of ").concat(vm, " that does not has a setter decorated with @api."));
|
|
2581
|
-
}
|
|
2582
|
-
},
|
|
2583
|
-
enumerable: enumerable,
|
|
2584
|
-
configurable: configurable
|
|
2689
|
+
computeConfigAndUpdate: computeConfigAndUpdate,
|
|
2690
|
+
ro: ro
|
|
2585
2691
|
};
|
|
2586
2692
|
}
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2593
|
-
*/
|
|
2594
|
-
function track(target) {
|
|
2595
|
-
if (arguments.length === 1) {
|
|
2596
|
-
return getReactiveProxy(target);
|
|
2693
|
+
function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
2694
|
+
var adapter = wireDef.adapter;
|
|
2695
|
+
var adapterContextToken = getAdapterToken(adapter);
|
|
2696
|
+
if (isUndefined$1(adapterContextToken)) {
|
|
2697
|
+
return; // no provider found, nothing to be done
|
|
2597
2698
|
}
|
|
2699
|
+
|
|
2700
|
+
var elm = vm.elm,
|
|
2701
|
+
_vm$context = vm.context,
|
|
2702
|
+
wiredConnecting = _vm$context.wiredConnecting,
|
|
2703
|
+
wiredDisconnecting = _vm$context.wiredDisconnecting,
|
|
2704
|
+
dispatchEvent = vm.renderer.dispatchEvent;
|
|
2705
|
+
// waiting for the component to be connected to formally request the context via the token
|
|
2706
|
+
ArrayPush$1.call(wiredConnecting, function () {
|
|
2707
|
+
// This event is responsible for connecting the host element with another
|
|
2708
|
+
// element in the composed path that is providing contextual data. The provider
|
|
2709
|
+
// must be listening for a special dom event with the name corresponding to the value of
|
|
2710
|
+
// `adapterContextToken`, which will remain secret and internal to this file only to
|
|
2711
|
+
// guarantee that the linkage can be forged.
|
|
2712
|
+
var contextRegistrationEvent = new WireContextRegistrationEvent(adapterContextToken, {
|
|
2713
|
+
setNewContext: function setNewContext(newContext) {
|
|
2714
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
2715
|
+
// TODO: dev-mode validation of config based on the adapter.contextSchema
|
|
2716
|
+
callbackWhenContextIsReady(newContext);
|
|
2717
|
+
},
|
|
2718
|
+
setDisconnectedCallback: function setDisconnectedCallback(disconnectCallback) {
|
|
2719
|
+
// adds this callback into the disconnect bucket so it gets disconnected from parent
|
|
2720
|
+
// the the element hosting the wire is disconnected
|
|
2721
|
+
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
2722
|
+
}
|
|
2723
|
+
});
|
|
2724
|
+
dispatchEvent(elm, contextRegistrationEvent);
|
|
2725
|
+
});
|
|
2726
|
+
}
|
|
2727
|
+
function createConnector(vm, name, wireDef) {
|
|
2728
|
+
var method = wireDef.method,
|
|
2729
|
+
adapter = wireDef.adapter,
|
|
2730
|
+
configCallback = wireDef.configCallback,
|
|
2731
|
+
dynamic = wireDef.dynamic;
|
|
2732
|
+
var debugInfo;
|
|
2598
2733
|
if (process.env.NODE_ENV !== 'production') {
|
|
2599
|
-
|
|
2734
|
+
var wiredPropOrMethod = isUndefined$1(method) ? name : method.name;
|
|
2735
|
+
debugInfo = create(null);
|
|
2736
|
+
debugInfo.wasDataProvisionedForConfig = false;
|
|
2737
|
+
vm.debugInfo[WIRE_DEBUG_ENTRY][wiredPropOrMethod] = debugInfo;
|
|
2600
2738
|
}
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
}
|
|
2739
|
+
var fieldOrMethodCallback = isUndefined$1(method) ? createFieldDataCallback(vm, name) : createMethodDataCallback(vm, method);
|
|
2740
|
+
var dataCallback = function dataCallback(value) {
|
|
2741
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2742
|
+
debugInfo.data = value;
|
|
2743
|
+
// Note: most of the time, the data provided is for the current config, but there may be
|
|
2744
|
+
// some conditions in which it does not, ex:
|
|
2745
|
+
// race conditions in a poor network while the adapter does not cancel a previous request.
|
|
2746
|
+
debugInfo.wasDataProvisionedForConfig = true;
|
|
2747
|
+
}
|
|
2748
|
+
fieldOrMethodCallback(value);
|
|
2749
|
+
};
|
|
2750
|
+
var context;
|
|
2751
|
+
var connector;
|
|
2752
|
+
// Workaround to pass the component element associated to this wire adapter instance.
|
|
2753
|
+
defineProperty(dataCallback, DeprecatedWiredElementHost, {
|
|
2754
|
+
value: vm.elm
|
|
2755
|
+
});
|
|
2756
|
+
defineProperty(dataCallback, DeprecatedWiredParamsMeta, {
|
|
2757
|
+
value: dynamic
|
|
2758
|
+
});
|
|
2759
|
+
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
2760
|
+
// job
|
|
2761
|
+
connector = new adapter(dataCallback);
|
|
2762
|
+
}, noop);
|
|
2763
|
+
var updateConnectorConfig = function updateConnectorConfig(config) {
|
|
2764
|
+
// every time the config is recomputed due to tracking,
|
|
2765
|
+
// this callback will be invoked with the new computed config
|
|
2766
|
+
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
2767
|
+
// job
|
|
2768
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2769
|
+
debugInfo.config = config;
|
|
2770
|
+
debugInfo.context = context;
|
|
2771
|
+
debugInfo.wasDataProvisionedForConfig = false;
|
|
2772
|
+
}
|
|
2773
|
+
connector.update(config, context);
|
|
2774
|
+
}, noop);
|
|
2775
|
+
};
|
|
2776
|
+
// Computes the current wire config and calls the update method on the wire adapter.
|
|
2777
|
+
// If it has params, we will need to observe changes in the next tick.
|
|
2778
|
+
var _createConfigWatcher = createConfigWatcher(vm.component, configCallback, updateConnectorConfig),
|
|
2779
|
+
computeConfigAndUpdate = _createConfigWatcher.computeConfigAndUpdate,
|
|
2780
|
+
ro = _createConfigWatcher.ro;
|
|
2781
|
+
// if the adapter needs contextualization, we need to watch for new context and push it alongside the config
|
|
2782
|
+
if (!isUndefined$1(adapter.contextSchema)) {
|
|
2783
|
+
createContextWatcher(vm, wireDef, function (newContext) {
|
|
2784
|
+
// every time the context is pushed into this component,
|
|
2785
|
+
// this callback will be invoked with the new computed context
|
|
2786
|
+
if (context !== newContext) {
|
|
2787
|
+
context = newContext;
|
|
2788
|
+
// Note: when new context arrives, the config will be recomputed and pushed along side the new
|
|
2789
|
+
// context, this is to preserve the identity characteristics, config should not have identity
|
|
2790
|
+
// (ever), while context can have identity
|
|
2791
|
+
if (vm.state === 1 /* VMState.connected */) {
|
|
2792
|
+
computeConfigAndUpdate();
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
return {
|
|
2798
|
+
// @ts-ignore the boundary protection executes sync, connector is always defined
|
|
2799
|
+
connector: connector,
|
|
2800
|
+
computeConfigAndUpdate: computeConfigAndUpdate,
|
|
2801
|
+
resetConfigWatcher: function resetConfigWatcher() {
|
|
2802
|
+
return ro.reset();
|
|
2803
|
+
}
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
var AdapterToTokenMap = new Map();
|
|
2807
|
+
function getAdapterToken(adapter) {
|
|
2808
|
+
return AdapterToTokenMap.get(adapter);
|
|
2809
|
+
}
|
|
2810
|
+
function setAdapterToken(adapter, token) {
|
|
2811
|
+
AdapterToTokenMap.set(adapter, token);
|
|
2812
|
+
}
|
|
2813
|
+
function storeWiredMethodMeta(descriptor, adapter, configCallback, dynamic) {
|
|
2814
|
+
// support for callable adapters
|
|
2815
|
+
if (adapter.adapter) {
|
|
2816
|
+
adapter = adapter.adapter;
|
|
2817
|
+
}
|
|
2818
|
+
var method = descriptor.value;
|
|
2819
|
+
var def = {
|
|
2820
|
+
adapter: adapter,
|
|
2821
|
+
method: method,
|
|
2822
|
+
configCallback: configCallback,
|
|
2823
|
+
dynamic: dynamic
|
|
2824
|
+
};
|
|
2825
|
+
WireMetaMap.set(descriptor, def);
|
|
2826
|
+
}
|
|
2827
|
+
function storeWiredFieldMeta(descriptor, adapter, configCallback, dynamic) {
|
|
2828
|
+
// support for callable adapters
|
|
2829
|
+
if (adapter.adapter) {
|
|
2830
|
+
adapter = adapter.adapter;
|
|
2831
|
+
}
|
|
2832
|
+
var def = {
|
|
2833
|
+
adapter: adapter,
|
|
2834
|
+
configCallback: configCallback,
|
|
2835
|
+
dynamic: dynamic
|
|
2836
|
+
};
|
|
2837
|
+
WireMetaMap.set(descriptor, def);
|
|
2838
|
+
}
|
|
2839
|
+
function installWireAdapters(vm) {
|
|
2840
|
+
var context = vm.context,
|
|
2841
|
+
wire = vm.def.wire;
|
|
2842
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2843
|
+
vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
|
|
2844
|
+
}
|
|
2845
|
+
var wiredConnecting = context.wiredConnecting = [];
|
|
2846
|
+
var wiredDisconnecting = context.wiredDisconnecting = [];
|
|
2847
|
+
for (var fieldNameOrMethod in wire) {
|
|
2848
|
+
var descriptor = wire[fieldNameOrMethod];
|
|
2849
|
+
var wireDef = WireMetaMap.get(descriptor);
|
|
2850
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2851
|
+
assert.invariant(wireDef, "Internal Error: invalid wire definition found.");
|
|
2852
|
+
}
|
|
2853
|
+
if (!isUndefined$1(wireDef)) {
|
|
2854
|
+
(function () {
|
|
2855
|
+
var _createConnector = createConnector(vm, fieldNameOrMethod, wireDef),
|
|
2856
|
+
connector = _createConnector.connector,
|
|
2857
|
+
computeConfigAndUpdate = _createConnector.computeConfigAndUpdate,
|
|
2858
|
+
resetConfigWatcher = _createConnector.resetConfigWatcher;
|
|
2859
|
+
var hasDynamicParams = wireDef.dynamic.length > 0;
|
|
2860
|
+
ArrayPush$1.call(wiredConnecting, function () {
|
|
2861
|
+
connector.connect();
|
|
2862
|
+
if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
|
|
2863
|
+
if (hasDynamicParams) {
|
|
2864
|
+
Promise.resolve().then(computeConfigAndUpdate);
|
|
2865
|
+
return;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
computeConfigAndUpdate();
|
|
2869
|
+
});
|
|
2870
|
+
ArrayPush$1.call(wiredDisconnecting, function () {
|
|
2871
|
+
connector.disconnect();
|
|
2872
|
+
resetConfigWatcher();
|
|
2873
|
+
});
|
|
2874
|
+
})();
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
function connectWireAdapters(vm) {
|
|
2879
|
+
var wiredConnecting = vm.context.wiredConnecting;
|
|
2880
|
+
for (var _i8 = 0, len = wiredConnecting.length; _i8 < len; _i8 += 1) {
|
|
2881
|
+
wiredConnecting[_i8]();
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
function disconnectWireAdapters(vm) {
|
|
2885
|
+
var wiredDisconnecting = vm.context.wiredDisconnecting;
|
|
2886
|
+
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
2887
|
+
// job
|
|
2888
|
+
for (var _i9 = 0, len = wiredDisconnecting.length; _i9 < len; _i9 += 1) {
|
|
2889
|
+
wiredDisconnecting[_i9]();
|
|
2890
|
+
}
|
|
2891
|
+
}, noop);
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
/*
|
|
2895
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2896
|
+
* All rights reserved.
|
|
2897
|
+
* SPDX-License-Identifier: MIT
|
|
2898
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2899
|
+
*/
|
|
2900
|
+
function api$1() {
|
|
2901
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2902
|
+
assert.fail("@api decorator can only be used as a decorator function.");
|
|
2903
|
+
}
|
|
2904
|
+
throw new Error();
|
|
2905
|
+
}
|
|
2906
|
+
function createPublicPropertyDescriptor(key) {
|
|
2907
|
+
return {
|
|
2908
|
+
get: function get() {
|
|
2909
|
+
var vm = getAssociatedVM(this);
|
|
2910
|
+
if (isBeingConstructed(vm)) {
|
|
2911
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2912
|
+
logError("Can\u2019t read the value of property `".concat(toString$1(key), "` from the constructor because the owner component hasn\u2019t set the value yet. Instead, use the constructor to set a default value for the property."), vm);
|
|
2913
|
+
}
|
|
2914
|
+
return;
|
|
2915
|
+
}
|
|
2916
|
+
componentValueObserved(vm, key);
|
|
2917
|
+
return vm.cmpProps[key];
|
|
2918
|
+
},
|
|
2919
|
+
set: function set(newValue) {
|
|
2920
|
+
var vm = getAssociatedVM(this);
|
|
2921
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2922
|
+
var _vmBeingRendered3 = getVMBeingRendered();
|
|
2923
|
+
assert.invariant(!isInvokingRender, "".concat(_vmBeingRendered3, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2924
|
+
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(_vmBeingRendered3, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2925
|
+
}
|
|
2926
|
+
vm.cmpProps[key] = newValue;
|
|
2927
|
+
componentValueMutated(vm, key);
|
|
2928
|
+
},
|
|
2929
|
+
enumerable: true,
|
|
2930
|
+
configurable: true
|
|
2931
|
+
};
|
|
2932
|
+
}
|
|
2933
|
+
function createPublicAccessorDescriptor(key, descriptor) {
|
|
2934
|
+
var _get2 = descriptor.get,
|
|
2935
|
+
_set2 = descriptor.set,
|
|
2936
|
+
enumerable = descriptor.enumerable,
|
|
2937
|
+
configurable = descriptor.configurable;
|
|
2938
|
+
if (!isFunction$1(_get2)) {
|
|
2939
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2940
|
+
assert.invariant(isFunction$1(_get2), "Invalid compiler output for public accessor ".concat(toString$1(key), " decorated with @api"));
|
|
2941
|
+
}
|
|
2942
|
+
throw new Error();
|
|
2943
|
+
}
|
|
2944
|
+
return {
|
|
2945
|
+
get: function get() {
|
|
2946
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2947
|
+
// Assert that the this value is an actual Component with an associated VM.
|
|
2948
|
+
getAssociatedVM(this);
|
|
2949
|
+
}
|
|
2950
|
+
return _get2.call(this);
|
|
2951
|
+
},
|
|
2952
|
+
set: function set(newValue) {
|
|
2953
|
+
var vm = getAssociatedVM(this);
|
|
2954
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2955
|
+
var _vmBeingRendered4 = getVMBeingRendered();
|
|
2956
|
+
assert.invariant(!isInvokingRender, "".concat(_vmBeingRendered4, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2957
|
+
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(_vmBeingRendered4, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2958
|
+
}
|
|
2959
|
+
if (_set2) {
|
|
2960
|
+
_set2.call(this, newValue);
|
|
2961
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
2962
|
+
assert.fail("Invalid attempt to set a new value for property ".concat(toString$1(key), " of ").concat(vm, " that does not has a setter decorated with @api."));
|
|
2963
|
+
}
|
|
2964
|
+
},
|
|
2965
|
+
enumerable: enumerable,
|
|
2966
|
+
configurable: configurable
|
|
2967
|
+
};
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
/*
|
|
2971
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2972
|
+
* All rights reserved.
|
|
2973
|
+
* SPDX-License-Identifier: MIT
|
|
2974
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2975
|
+
*/
|
|
2976
|
+
function track(target) {
|
|
2977
|
+
if (arguments.length === 1) {
|
|
2978
|
+
return getReactiveProxy(target);
|
|
2979
|
+
}
|
|
2980
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2981
|
+
assert.fail("@track decorator can only be used with one argument to return a trackable object, or as a decorator function.");
|
|
2982
|
+
}
|
|
2983
|
+
throw new Error();
|
|
2984
|
+
}
|
|
2985
|
+
function internalTrackDecorator(key) {
|
|
2986
|
+
return {
|
|
2987
|
+
get: function get() {
|
|
2988
|
+
var vm = getAssociatedVM(this);
|
|
2989
|
+
componentValueObserved(vm, key);
|
|
2990
|
+
return vm.cmpFields[key];
|
|
2991
|
+
},
|
|
2610
2992
|
set: function set(newValue) {
|
|
2611
2993
|
var vm = getAssociatedVM(this);
|
|
2612
2994
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2838,8 +3220,8 @@
|
|
|
2838
3220
|
}
|
|
2839
3221
|
}
|
|
2840
3222
|
if (!isUndefined$1(fields)) {
|
|
2841
|
-
for (var
|
|
2842
|
-
var _fieldName2 = fields[
|
|
3223
|
+
for (var _i10 = 0, n = fields.length; _i10 < n; _i10++) {
|
|
3224
|
+
var _fieldName2 = fields[_i10];
|
|
2843
3225
|
descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
|
|
2844
3226
|
if (process.env.NODE_ENV !== 'production') {
|
|
2845
3227
|
validateObservedField(Ctor, _fieldName2, descriptor);
|
|
@@ -3031,10 +3413,10 @@
|
|
|
3031
3413
|
if (isFunction$1(SuperClass)) {
|
|
3032
3414
|
HTMLBridgeElement = /*#__PURE__*/function (_SuperClass) {
|
|
3033
3415
|
_inherits(HTMLBridgeElement, _SuperClass);
|
|
3034
|
-
var
|
|
3416
|
+
var _super4 = _createSuper(HTMLBridgeElement);
|
|
3035
3417
|
function HTMLBridgeElement() {
|
|
3036
3418
|
_classCallCheck(this, HTMLBridgeElement);
|
|
3037
|
-
return
|
|
3419
|
+
return _super4.apply(this, arguments);
|
|
3038
3420
|
}
|
|
3039
3421
|
return _createClass(HTMLBridgeElement);
|
|
3040
3422
|
}(SuperClass);
|
|
@@ -3061,8 +3443,8 @@
|
|
|
3061
3443
|
superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
|
|
3062
3444
|
var descriptors = create(null);
|
|
3063
3445
|
// expose getters and setters for each public props on the new Element Bridge
|
|
3064
|
-
for (var
|
|
3065
|
-
var _propName = props[
|
|
3446
|
+
for (var _i11 = 0, len = props.length; _i11 < len; _i11 += 1) {
|
|
3447
|
+
var _propName = props[_i11];
|
|
3066
3448
|
attributeToPropMap[htmlPropertyToAttribute(_propName)] = _propName;
|
|
3067
3449
|
descriptors[_propName] = {
|
|
3068
3450
|
get: createGetter(_propName),
|
|
@@ -3072,8 +3454,8 @@
|
|
|
3072
3454
|
};
|
|
3073
3455
|
}
|
|
3074
3456
|
// expose public methods as props on the new Element Bridge
|
|
3075
|
-
for (var
|
|
3076
|
-
var methodName = methods[
|
|
3457
|
+
for (var _i12 = 0, _len = methods.length; _i12 < _len; _i12 += 1) {
|
|
3458
|
+
var methodName = methods[_i12];
|
|
3077
3459
|
descriptors[methodName] = {
|
|
3078
3460
|
value: createMethodCaller(methodName),
|
|
3079
3461
|
writable: true,
|
|
@@ -3617,8 +3999,8 @@
|
|
|
3617
3999
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
3618
4000
|
var content = [];
|
|
3619
4001
|
var root;
|
|
3620
|
-
for (var
|
|
3621
|
-
var stylesheet = stylesheets[
|
|
4002
|
+
for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
|
|
4003
|
+
var stylesheet = stylesheets[_i13];
|
|
3622
4004
|
if (isArray$1(stylesheet)) {
|
|
3623
4005
|
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
3624
4006
|
} else {
|
|
@@ -3726,8 +4108,8 @@
|
|
|
3726
4108
|
shadowMode = vm.shadowMode,
|
|
3727
4109
|
insertStylesheet = vm.renderer.insertStylesheet;
|
|
3728
4110
|
if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3729
|
-
for (var
|
|
3730
|
-
insertStylesheet(stylesheets[
|
|
4111
|
+
for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
|
|
4112
|
+
insertStylesheet(stylesheets[_i14]);
|
|
3731
4113
|
}
|
|
3732
4114
|
} else if (vm.hydrated) {
|
|
3733
4115
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
@@ -3740,8 +4122,8 @@
|
|
|
3740
4122
|
var root = getNearestNativeShadowComponent(vm);
|
|
3741
4123
|
// null root means a global style
|
|
3742
4124
|
var target = isNull(root) ? undefined : root.shadowRoot;
|
|
3743
|
-
for (var
|
|
3744
|
-
insertStylesheet(stylesheets[
|
|
4125
|
+
for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
|
|
4126
|
+
insertStylesheet(stylesheets[_i15], target);
|
|
3745
4127
|
}
|
|
3746
4128
|
}
|
|
3747
4129
|
return null;
|
|
@@ -4055,8 +4437,8 @@
|
|
|
4055
4437
|
return;
|
|
4056
4438
|
}
|
|
4057
4439
|
var setCSSStyleProperty = renderer.setCSSStyleProperty;
|
|
4058
|
-
for (var
|
|
4059
|
-
var _styleDecls$_i = _slicedToArray(styleDecls[
|
|
4440
|
+
for (var _i16 = 0; _i16 < styleDecls.length; _i16++) {
|
|
4441
|
+
var _styleDecls$_i = _slicedToArray(styleDecls[_i16], 3),
|
|
4060
4442
|
prop = _styleDecls$_i[0],
|
|
4061
4443
|
value = _styleDecls$_i[1],
|
|
4062
4444
|
important = _styleDecls$_i[2];
|
|
@@ -4538,8 +4920,8 @@
|
|
|
4538
4920
|
// If no VFragment is found in children, we don't need to traverse anything or mark the children dynamic and can return early.
|
|
4539
4921
|
var nodeStack = [];
|
|
4540
4922
|
var fragmentFound = false;
|
|
4541
|
-
for (var
|
|
4542
|
-
var child = children[
|
|
4923
|
+
for (var _i17 = children.length - 1; _i17 > -1; _i17 -= 1) {
|
|
4924
|
+
var child = children[_i17];
|
|
4543
4925
|
ArrayPush$1.call(nodeStack, child);
|
|
4544
4926
|
fragmentFound = fragmentFound || !!(child && isVFragment(child));
|
|
4545
4927
|
}
|
|
@@ -4551,8 +4933,8 @@
|
|
|
4551
4933
|
if (!isNull(currentNode) && isVFragment(currentNode)) {
|
|
4552
4934
|
var fChildren = currentNode.children;
|
|
4553
4935
|
// Ignore the start and end text node delimiters
|
|
4554
|
-
for (var
|
|
4555
|
-
ArrayPush$1.call(nodeStack, fChildren[
|
|
4936
|
+
for (var _i18 = fChildren.length - 2; _i18 > 0; _i18 -= 1) {
|
|
4937
|
+
ArrayPush$1.call(nodeStack, fChildren[_i18]);
|
|
4556
4938
|
}
|
|
4557
4939
|
} else {
|
|
4558
4940
|
ArrayPush$1.call(flattenedChildren, currentNode);
|
|
@@ -4591,8 +4973,8 @@
|
|
|
4591
4973
|
var oldSlotsMapping = vm.cmpSlots.slotAssignments;
|
|
4592
4974
|
var cmpSlotsMapping = create(null);
|
|
4593
4975
|
// Collect all slots into cmpSlotsMapping
|
|
4594
|
-
for (var
|
|
4595
|
-
var vnode = children[
|
|
4976
|
+
for (var _i19 = 0, len = children.length; _i19 < len; _i19 += 1) {
|
|
4977
|
+
var vnode = children[_i19];
|
|
4596
4978
|
if (isNull(vnode)) {
|
|
4597
4979
|
continue;
|
|
4598
4980
|
}
|
|
@@ -4617,8 +4999,8 @@
|
|
|
4617
4999
|
markComponentAsDirty(vm);
|
|
4618
5000
|
return;
|
|
4619
5001
|
}
|
|
4620
|
-
for (var
|
|
4621
|
-
var key = oldKeys[
|
|
5002
|
+
for (var _i20 = 0, _len2 = oldKeys.length; _i20 < _len2; _i20 += 1) {
|
|
5003
|
+
var key = oldKeys[_i20];
|
|
4622
5004
|
if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
|
|
4623
5005
|
markComponentAsDirty(vm);
|
|
4624
5006
|
return;
|
|
@@ -4741,11 +5123,11 @@
|
|
|
4741
5123
|
if (oldStartIdx > oldEndIdx) {
|
|
4742
5124
|
// There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
|
|
4743
5125
|
// already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
|
|
4744
|
-
var
|
|
5126
|
+
var _i21 = newEndIdx;
|
|
4745
5127
|
var n;
|
|
4746
5128
|
do {
|
|
4747
|
-
n = newCh[++
|
|
4748
|
-
} while (!isVNode(n) &&
|
|
5129
|
+
n = newCh[++_i21];
|
|
5130
|
+
} while (!isVNode(n) && _i21 < newChEnd);
|
|
4749
5131
|
before = isVNode(n) ? n.elm : null;
|
|
4750
5132
|
mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
|
|
4751
5133
|
} else {
|
|
@@ -4770,9 +5152,9 @@
|
|
|
4770
5152
|
// if the old list is not empty, the new list MUST have the same
|
|
4771
5153
|
// amount of nodes, that's why we call this static children
|
|
4772
5154
|
var anchor = null;
|
|
4773
|
-
for (var
|
|
4774
|
-
var n1 = c1[
|
|
4775
|
-
var n2 = c2[
|
|
5155
|
+
for (var _i22 = c2Length - 1; _i22 >= 0; _i22 -= 1) {
|
|
5156
|
+
var n1 = c1[_i22];
|
|
5157
|
+
var n2 = c2[_i22];
|
|
4776
5158
|
if (n2 !== n1) {
|
|
4777
5159
|
if (isVNode(n1)) {
|
|
4778
5160
|
if (isVNode(n2)) {
|
|
@@ -4897,8 +5279,8 @@
|
|
|
4897
5279
|
if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
|
|
4898
5280
|
var newChildren = [];
|
|
4899
5281
|
var slotAssignments = slotset.slotAssignments[slotName];
|
|
4900
|
-
for (var
|
|
4901
|
-
var vnode = slotAssignments[
|
|
5282
|
+
for (var _i23 = 0; _i23 < slotAssignments.length; _i23++) {
|
|
5283
|
+
var vnode = slotAssignments[_i23];
|
|
4902
5284
|
if (!isNull(vnode)) {
|
|
4903
5285
|
var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
|
|
4904
5286
|
// The only sniff test for a scoped <slot> element is the presence of `slotData`
|
|
@@ -5423,23 +5805,23 @@
|
|
|
5423
5805
|
var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
|
|
5424
5806
|
var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
|
|
5425
5807
|
var htmlFragment = '';
|
|
5426
|
-
for (var
|
|
5427
|
-
switch (keys[
|
|
5808
|
+
for (var _i24 = 0, n = keys.length; _i24 < n; _i24++) {
|
|
5809
|
+
switch (keys[_i24]) {
|
|
5428
5810
|
case 0:
|
|
5429
5811
|
// styleToken in existing class attr
|
|
5430
|
-
htmlFragment += strings[
|
|
5812
|
+
htmlFragment += strings[_i24] + classToken;
|
|
5431
5813
|
break;
|
|
5432
5814
|
case 1:
|
|
5433
5815
|
// styleToken for added class attr
|
|
5434
|
-
htmlFragment += strings[
|
|
5816
|
+
htmlFragment += strings[_i24] + classAttrToken;
|
|
5435
5817
|
break;
|
|
5436
5818
|
case 2:
|
|
5437
5819
|
// styleToken as attr
|
|
5438
|
-
htmlFragment += strings[
|
|
5820
|
+
htmlFragment += strings[_i24] + attrToken;
|
|
5439
5821
|
break;
|
|
5440
5822
|
case 3:
|
|
5441
5823
|
// ${1}${2}
|
|
5442
|
-
htmlFragment += strings[
|
|
5824
|
+
htmlFragment += strings[_i24] + classAttrToken + attrToken;
|
|
5443
5825
|
break;
|
|
5444
5826
|
}
|
|
5445
5827
|
}
|
|
@@ -5546,8 +5928,8 @@
|
|
|
5546
5928
|
}
|
|
5547
5929
|
function computeHasScopedStylesInStylesheets(stylesheets) {
|
|
5548
5930
|
if (hasStyles(stylesheets)) {
|
|
5549
|
-
for (var
|
|
5550
|
-
if (isTrue(stylesheets[
|
|
5931
|
+
for (var _i25 = 0; _i25 < stylesheets.length; _i25++) {
|
|
5932
|
+
if (isTrue(stylesheets[_i25][KEY__SCOPED_CSS])) {
|
|
5551
5933
|
return true;
|
|
5552
5934
|
}
|
|
5553
5935
|
}
|
|
@@ -5667,8 +6049,8 @@
|
|
|
5667
6049
|
*/
|
|
5668
6050
|
function registerComponent(
|
|
5669
6051
|
// We typically expect a LightningElementConstructor, but technically you can call this with anything
|
|
5670
|
-
Ctor,
|
|
5671
|
-
var tmpl =
|
|
6052
|
+
Ctor, _ref4) {
|
|
6053
|
+
var tmpl = _ref4.tmpl;
|
|
5672
6054
|
if (isFunction$1(Ctor)) {
|
|
5673
6055
|
if (process.env.NODE_ENV !== 'production') {
|
|
5674
6056
|
checkVersionMismatch(Ctor, 'component');
|
|
@@ -5743,8 +6125,8 @@
|
|
|
5743
6125
|
if (process.env.NODE_ENV !== 'production') {
|
|
5744
6126
|
assert.isTrue(isObject(service), "Invalid service declaration, ".concat(service, ": service must be an object"));
|
|
5745
6127
|
}
|
|
5746
|
-
for (var
|
|
5747
|
-
var hookName = hooks[
|
|
6128
|
+
for (var _i26 = 0; _i26 < hooks.length; ++_i26) {
|
|
6129
|
+
var hookName = hooks[_i26];
|
|
5748
6130
|
if (hookName in service) {
|
|
5749
6131
|
var l = Services[hookName];
|
|
5750
6132
|
if (isUndefined$1(l)) {
|
|
@@ -5761,8 +6143,8 @@
|
|
|
5761
6143
|
var component = vm.component,
|
|
5762
6144
|
def = vm.def,
|
|
5763
6145
|
context = vm.context;
|
|
5764
|
-
for (var
|
|
5765
|
-
cbs[
|
|
6146
|
+
for (var _i27 = 0, len = cbs.length; _i27 < len; ++_i27) {
|
|
6147
|
+
cbs[_i27].call(undefined, component, {}, def, context);
|
|
5766
6148
|
}
|
|
5767
6149
|
}
|
|
5768
6150
|
|
|
@@ -5917,8 +6299,8 @@
|
|
|
5917
6299
|
var valid = true;
|
|
5918
6300
|
var validate = function validate(arrayOrStylesheet) {
|
|
5919
6301
|
if (isArray$1(arrayOrStylesheet)) {
|
|
5920
|
-
for (var
|
|
5921
|
-
validate(arrayOrStylesheet[
|
|
6302
|
+
for (var _i28 = 0; _i28 < arrayOrStylesheet.length; _i28++) {
|
|
6303
|
+
validate(arrayOrStylesheet[_i28]);
|
|
5922
6304
|
}
|
|
5923
6305
|
} else if (!isFunction$1(arrayOrStylesheet)) {
|
|
5924
6306
|
// function assumed to be a stylesheet factory
|
|
@@ -6071,17 +6453,17 @@
|
|
|
6071
6453
|
return a.idx - b.idx;
|
|
6072
6454
|
});
|
|
6073
6455
|
rehydrateQueue = []; // reset to a new queue
|
|
6074
|
-
for (var
|
|
6075
|
-
var vm = vms[
|
|
6456
|
+
for (var _i29 = 0, len = vms.length; _i29 < len; _i29 += 1) {
|
|
6457
|
+
var vm = vms[_i29];
|
|
6076
6458
|
try {
|
|
6077
6459
|
rehydrate(vm);
|
|
6078
6460
|
} catch (error) {
|
|
6079
|
-
if (
|
|
6461
|
+
if (_i29 + 1 < len) {
|
|
6080
6462
|
// pieces of the queue are still pending to be rehydrated, those should have priority
|
|
6081
6463
|
if (rehydrateQueue.length === 0) {
|
|
6082
6464
|
addCallbackToNextTick(flushRehydrationQueue);
|
|
6083
6465
|
}
|
|
6084
|
-
ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms,
|
|
6466
|
+
ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i29 + 1));
|
|
6085
6467
|
}
|
|
6086
6468
|
// we need to end the measure before throwing.
|
|
6087
6469
|
logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
|
|
@@ -6150,8 +6532,8 @@
|
|
|
6150
6532
|
var vCustomElementCollection = vm.velements;
|
|
6151
6533
|
// Reporting disconnection for every child in inverse order since they are
|
|
6152
6534
|
// inserted in reserved order.
|
|
6153
|
-
for (var
|
|
6154
|
-
var elm = vCustomElementCollection[
|
|
6535
|
+
for (var _i30 = vCustomElementCollection.length - 1; _i30 >= 0; _i30 -= 1) {
|
|
6536
|
+
var elm = vCustomElementCollection[_i30].elm;
|
|
6155
6537
|
// There are two cases where the element could be undefined:
|
|
6156
6538
|
// * when there is an error during the construction phase, and an error
|
|
6157
6539
|
// boundary picks it, there is a possibility that the VCustomElement
|
|
@@ -6182,8 +6564,8 @@
|
|
|
6182
6564
|
* defined on its shadow.
|
|
6183
6565
|
*/
|
|
6184
6566
|
function recursivelyDisconnectChildren(vnodes) {
|
|
6185
|
-
for (var
|
|
6186
|
-
var vnode = vnodes[
|
|
6567
|
+
for (var _i31 = 0, len = vnodes.length; _i31 < len; _i31 += 1) {
|
|
6568
|
+
var vnode = vnodes[_i31];
|
|
6187
6569
|
if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
|
|
6188
6570
|
switch (vnode.type) {
|
|
6189
6571
|
case 2 /* VNodeType.Element */:
|
|
@@ -6207,8 +6589,8 @@
|
|
|
6207
6589
|
var children = vm.children,
|
|
6208
6590
|
renderRoot = vm.renderRoot,
|
|
6209
6591
|
remove = vm.renderer.remove;
|
|
6210
|
-
for (var
|
|
6211
|
-
var child = children[
|
|
6592
|
+
for (var _i32 = 0, len = children.length; _i32 < len; _i32++) {
|
|
6593
|
+
var child = children[_i32];
|
|
6212
6594
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
6213
6595
|
remove(child.elm, renderRoot);
|
|
6214
6596
|
}
|
|
@@ -6286,278 +6668,159 @@
|
|
|
6286
6668
|
* SPDX-License-Identifier: MIT
|
|
6287
6669
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6288
6670
|
*/
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
}
|
|
6312
|
-
});
|
|
6313
|
-
return _this2;
|
|
6671
|
+
//
|
|
6672
|
+
// The goal of this code is to detect invalid cross-root ARIA references in synthetic shadow DOM.
|
|
6673
|
+
// These invalid references should be fixed before the offending components can be migrated to native shadow DOM.
|
|
6674
|
+
// When invalid usage is detected, we warn in dev mode and call the reporting API if enabled.
|
|
6675
|
+
// See: https://lwc.dev/guide/accessibility#link-ids-and-aria-attributes-from-different-templates
|
|
6676
|
+
//
|
|
6677
|
+
// Use the unpatched native getElementById/querySelectorAll rather than the synthetic one
|
|
6678
|
+
var getElementById = _globalThis[KEY__NATIVE_GET_ELEMENT_BY_ID];
|
|
6679
|
+
var querySelectorAll = _globalThis[KEY__NATIVE_QUERY_SELECTOR_ALL];
|
|
6680
|
+
function isSyntheticShadowRootInstance(rootNode) {
|
|
6681
|
+
return rootNode !== document && isTrue(rootNode.synthetic);
|
|
6682
|
+
}
|
|
6683
|
+
function reportViolation(source, target, attrName) {
|
|
6684
|
+
// The vm is either for the source, the target, or both. Either one or both must be using synthetic
|
|
6685
|
+
// shadow for a violation to be detected.
|
|
6686
|
+
var vm = getAssociatedVMIfPresent(source.getRootNode().host);
|
|
6687
|
+
if (isUndefined$1(vm)) {
|
|
6688
|
+
vm = getAssociatedVMIfPresent(target.getRootNode().host);
|
|
6689
|
+
}
|
|
6690
|
+
if (isUndefined$1(vm)) {
|
|
6691
|
+
// vm should never be undefined here, but just to be safe, bail out and don't report
|
|
6692
|
+
return;
|
|
6314
6693
|
}
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
updateComponentValue(vm, name, value);
|
|
6320
|
-
};
|
|
6321
|
-
}
|
|
6322
|
-
function createMethodDataCallback(vm, method) {
|
|
6323
|
-
return function (value) {
|
|
6324
|
-
// dispatching new value into the wired method
|
|
6325
|
-
runWithBoundaryProtection(vm, vm.owner, noop, function () {
|
|
6326
|
-
// job
|
|
6327
|
-
method.call(vm.component, value);
|
|
6328
|
-
}, noop);
|
|
6329
|
-
};
|
|
6330
|
-
}
|
|
6331
|
-
function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
|
|
6332
|
-
var hasPendingConfig = false;
|
|
6333
|
-
// creating the reactive observer for reactive params when needed
|
|
6334
|
-
var ro = createReactiveObserver(function () {
|
|
6335
|
-
if (hasPendingConfig === false) {
|
|
6336
|
-
hasPendingConfig = true;
|
|
6337
|
-
// collect new config in the micro-task
|
|
6338
|
-
Promise.resolve().then(function () {
|
|
6339
|
-
hasPendingConfig = false;
|
|
6340
|
-
// resetting current reactive params
|
|
6341
|
-
ro.reset();
|
|
6342
|
-
// dispatching a new config due to a change in the configuration
|
|
6343
|
-
computeConfigAndUpdate();
|
|
6344
|
-
});
|
|
6345
|
-
}
|
|
6346
|
-
});
|
|
6347
|
-
var computeConfigAndUpdate = function computeConfigAndUpdate() {
|
|
6348
|
-
var config;
|
|
6349
|
-
ro.observe(function () {
|
|
6350
|
-
return config = configCallback(component);
|
|
6351
|
-
});
|
|
6352
|
-
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
6353
|
-
// TODO: dev-mode validation of config based on the adapter.configSchema
|
|
6354
|
-
// @ts-ignore it is assigned in the observe() callback
|
|
6355
|
-
callbackWhenConfigIsReady(config);
|
|
6356
|
-
};
|
|
6357
|
-
return {
|
|
6358
|
-
computeConfigAndUpdate: computeConfigAndUpdate,
|
|
6359
|
-
ro: ro
|
|
6360
|
-
};
|
|
6361
|
-
}
|
|
6362
|
-
function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
6363
|
-
var adapter = wireDef.adapter;
|
|
6364
|
-
var adapterContextToken = getAdapterToken(adapter);
|
|
6365
|
-
if (isUndefined$1(adapterContextToken)) {
|
|
6366
|
-
return; // no provider found, nothing to be done
|
|
6694
|
+
report(0 /* ReportingEventId.CrossRootAriaInSyntheticShadow */, vm);
|
|
6695
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6696
|
+
// Avoid excessively logging to the console in the case of duplicates.
|
|
6697
|
+
logWarnOnce("Element <".concat(source.tagName.toLowerCase(), "> uses attribute \"").concat(attrName, "\" to reference element ") + "<".concat(target.tagName.toLowerCase(), ">, which is not in the same shadow root. This will break in native shadow DOM. ") + "For details, see: https://lwc.dev/guide/accessibility#link-ids-and-aria-attributes-from-different-templates", vm);
|
|
6367
6698
|
}
|
|
6368
|
-
|
|
6369
|
-
var elm = vm.elm,
|
|
6370
|
-
_vm$context = vm.context,
|
|
6371
|
-
wiredConnecting = _vm$context.wiredConnecting,
|
|
6372
|
-
wiredDisconnecting = _vm$context.wiredDisconnecting,
|
|
6373
|
-
dispatchEvent = vm.renderer.dispatchEvent;
|
|
6374
|
-
// waiting for the component to be connected to formally request the context via the token
|
|
6375
|
-
ArrayPush$1.call(wiredConnecting, function () {
|
|
6376
|
-
// This event is responsible for connecting the host element with another
|
|
6377
|
-
// element in the composed path that is providing contextual data. The provider
|
|
6378
|
-
// must be listening for a special dom event with the name corresponding to the value of
|
|
6379
|
-
// `adapterContextToken`, which will remain secret and internal to this file only to
|
|
6380
|
-
// guarantee that the linkage can be forged.
|
|
6381
|
-
var contextRegistrationEvent = new WireContextRegistrationEvent(adapterContextToken, {
|
|
6382
|
-
setNewContext: function setNewContext(newContext) {
|
|
6383
|
-
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
6384
|
-
// TODO: dev-mode validation of config based on the adapter.contextSchema
|
|
6385
|
-
callbackWhenContextIsReady(newContext);
|
|
6386
|
-
},
|
|
6387
|
-
setDisconnectedCallback: function setDisconnectedCallback(disconnectCallback) {
|
|
6388
|
-
// adds this callback into the disconnect bucket so it gets disconnected from parent
|
|
6389
|
-
// the the element hosting the wire is disconnected
|
|
6390
|
-
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
6391
|
-
}
|
|
6392
|
-
});
|
|
6393
|
-
dispatchEvent(elm, contextRegistrationEvent);
|
|
6394
|
-
});
|
|
6395
6699
|
}
|
|
6396
|
-
function
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
var
|
|
6402
|
-
if (
|
|
6403
|
-
|
|
6404
|
-
debugInfo = create(null);
|
|
6405
|
-
debugInfo.wasDataProvisionedForConfig = false;
|
|
6406
|
-
vm.debugInfo[WIRE_DEBUG_ENTRY][wiredPropOrMethod] = debugInfo;
|
|
6700
|
+
function parseIdRefAttributeValue(attrValue) {
|
|
6701
|
+
// split on whitespace and skip empty strings after splitting
|
|
6702
|
+
return isString(attrValue) ? ArrayFilter.call(StringSplit.call(attrValue, /\s+/), Boolean) : [];
|
|
6703
|
+
}
|
|
6704
|
+
function detectSyntheticCrossRootAria(elm, attrName, attrValue) {
|
|
6705
|
+
var root = elm.getRootNode();
|
|
6706
|
+
if (!isSyntheticShadowRootInstance(root)) {
|
|
6707
|
+
return;
|
|
6407
6708
|
}
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
if (
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
// some conditions in which it does not, ex:
|
|
6414
|
-
// race conditions in a poor network while the adapter does not cancel a previous request.
|
|
6415
|
-
debugInfo.wasDataProvisionedForConfig = true;
|
|
6709
|
+
if (attrName === 'id') {
|
|
6710
|
+
// elm is the target, find the source
|
|
6711
|
+
if (!isString(attrValue) || attrValue.length === 0) {
|
|
6712
|
+
// if our id is null or empty, nobody can reference us
|
|
6713
|
+
return;
|
|
6416
6714
|
}
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
// this callback will be invoked with the new computed config
|
|
6435
|
-
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
6436
|
-
// job
|
|
6437
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
6438
|
-
debugInfo.config = config;
|
|
6439
|
-
debugInfo.context = context;
|
|
6440
|
-
debugInfo.wasDataProvisionedForConfig = false;
|
|
6715
|
+
var _iterator5 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
|
|
6716
|
+
_step5;
|
|
6717
|
+
try {
|
|
6718
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
6719
|
+
var idRefAttrName = _step5.value;
|
|
6720
|
+
// Query all global elements with this attribute. The attribute selector syntax `~=` is for values
|
|
6721
|
+
// that reference multiple IDs, separated by whitespace.
|
|
6722
|
+
var query = "[".concat(idRefAttrName, "~=\"").concat(CSS.escape(attrValue), "\"]");
|
|
6723
|
+
var sourceElements = querySelectorAll.call(document, query);
|
|
6724
|
+
for (var _i33 = 0; _i33 < sourceElements.length; _i33++) {
|
|
6725
|
+
var sourceElement = sourceElements[_i33];
|
|
6726
|
+
var sourceRoot = sourceElement.getRootNode();
|
|
6727
|
+
if (sourceRoot !== root) {
|
|
6728
|
+
reportViolation(sourceElement, elm, idRefAttrName);
|
|
6729
|
+
break;
|
|
6730
|
+
}
|
|
6731
|
+
}
|
|
6441
6732
|
}
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6733
|
+
} catch (err) {
|
|
6734
|
+
_iterator5.e(err);
|
|
6735
|
+
} finally {
|
|
6736
|
+
_iterator5.f();
|
|
6737
|
+
}
|
|
6738
|
+
} else {
|
|
6739
|
+
// elm is the source, find the target
|
|
6740
|
+
var ids = parseIdRefAttributeValue(attrValue);
|
|
6741
|
+
var _iterator6 = _createForOfIteratorHelper(ids),
|
|
6742
|
+
_step6;
|
|
6743
|
+
try {
|
|
6744
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
6745
|
+
var id = _step6.value;
|
|
6746
|
+
var target = getElementById.call(document, id);
|
|
6747
|
+
if (!isNull(target)) {
|
|
6748
|
+
var targetRoot = target.getRootNode();
|
|
6749
|
+
if (targetRoot !== root) {
|
|
6750
|
+
// target element's shadow root is not the same as ours
|
|
6751
|
+
reportViolation(elm, target, attrName);
|
|
6752
|
+
}
|
|
6462
6753
|
}
|
|
6463
6754
|
}
|
|
6464
|
-
})
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
connector: connector,
|
|
6469
|
-
computeConfigAndUpdate: computeConfigAndUpdate,
|
|
6470
|
-
resetConfigWatcher: function resetConfigWatcher() {
|
|
6471
|
-
return ro.reset();
|
|
6755
|
+
} catch (err) {
|
|
6756
|
+
_iterator6.e(err);
|
|
6757
|
+
} finally {
|
|
6758
|
+
_iterator6.f();
|
|
6472
6759
|
}
|
|
6473
|
-
};
|
|
6474
|
-
}
|
|
6475
|
-
var AdapterToTokenMap = new Map();
|
|
6476
|
-
function getAdapterToken(adapter) {
|
|
6477
|
-
return AdapterToTokenMap.get(adapter);
|
|
6478
|
-
}
|
|
6479
|
-
function setAdapterToken(adapter, token) {
|
|
6480
|
-
AdapterToTokenMap.set(adapter, token);
|
|
6481
|
-
}
|
|
6482
|
-
function storeWiredMethodMeta(descriptor, adapter, configCallback, dynamic) {
|
|
6483
|
-
// support for callable adapters
|
|
6484
|
-
if (adapter.adapter) {
|
|
6485
|
-
adapter = adapter.adapter;
|
|
6486
|
-
}
|
|
6487
|
-
var method = descriptor.value;
|
|
6488
|
-
var def = {
|
|
6489
|
-
adapter: adapter,
|
|
6490
|
-
method: method,
|
|
6491
|
-
configCallback: configCallback,
|
|
6492
|
-
dynamic: dynamic
|
|
6493
|
-
};
|
|
6494
|
-
WireMetaMap.set(descriptor, def);
|
|
6495
|
-
}
|
|
6496
|
-
function storeWiredFieldMeta(descriptor, adapter, configCallback, dynamic) {
|
|
6497
|
-
// support for callable adapters
|
|
6498
|
-
if (adapter.adapter) {
|
|
6499
|
-
adapter = adapter.adapter;
|
|
6500
6760
|
}
|
|
6501
|
-
var def = {
|
|
6502
|
-
adapter: adapter,
|
|
6503
|
-
configCallback: configCallback,
|
|
6504
|
-
dynamic: dynamic
|
|
6505
|
-
};
|
|
6506
|
-
WireMetaMap.set(descriptor, def);
|
|
6507
6761
|
}
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6762
|
+
var enabled = false;
|
|
6763
|
+
// We want to avoid patching globals whenever possible, so this should be tree-shaken out in prod-mode and if
|
|
6764
|
+
// reporting is not enabled. It should also only run once
|
|
6765
|
+
function enableDetection() {
|
|
6766
|
+
if (enabled) {
|
|
6767
|
+
return; // don't double-apply the patches
|
|
6513
6768
|
}
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6769
|
+
|
|
6770
|
+
enabled = true;
|
|
6771
|
+
var _setAttribute = Element.prototype.setAttribute;
|
|
6772
|
+
// Detect calling `setAttribute` to set an idref or an id
|
|
6773
|
+
assign(Element.prototype, {
|
|
6774
|
+
setAttribute: function setAttribute(attrName, attrValue) {
|
|
6775
|
+
_setAttribute.call(this, attrName, attrValue);
|
|
6776
|
+
if (attrName === 'id' || ID_REFERENCING_ATTRIBUTES_SET.has(attrName)) {
|
|
6777
|
+
detectSyntheticCrossRootAria(this, attrName, attrValue);
|
|
6778
|
+
}
|
|
6521
6779
|
}
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
});
|
|
6543
|
-
})();
|
|
6780
|
+
});
|
|
6781
|
+
// Detect `elm.id = 'foo'`
|
|
6782
|
+
var idDescriptor = getOwnPropertyDescriptor$1(Element.prototype, 'id');
|
|
6783
|
+
if (!isUndefined$1(idDescriptor)) {
|
|
6784
|
+
var _get3 = idDescriptor.get,
|
|
6785
|
+
_set3 = idDescriptor.set;
|
|
6786
|
+
// These should always be a getter and a setter, but if someone is monkeying with the global descriptor, ignore it
|
|
6787
|
+
if (isFunction$1(_get3) && isFunction$1(_set3)) {
|
|
6788
|
+
defineProperty(Element.prototype, 'id', {
|
|
6789
|
+
get: function get() {
|
|
6790
|
+
return _get3.call(this);
|
|
6791
|
+
},
|
|
6792
|
+
set: function set(value) {
|
|
6793
|
+
_set3.call(this, value);
|
|
6794
|
+
detectSyntheticCrossRootAria(this, 'id', value);
|
|
6795
|
+
},
|
|
6796
|
+
// On the default descriptor for 'id', enumerable and configurable are true
|
|
6797
|
+
enumerable: true,
|
|
6798
|
+
configurable: true
|
|
6799
|
+
});
|
|
6544
6800
|
}
|
|
6545
6801
|
}
|
|
6546
6802
|
}
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
}
|
|
6803
|
+
// Our detection logic relies on some modern browser features. We can just skip reporting the data
|
|
6804
|
+
// for unsupported browsers
|
|
6805
|
+
function supportsCssEscape() {
|
|
6806
|
+
return typeof CSS !== 'undefined' && isFunction$1(CSS.escape);
|
|
6552
6807
|
}
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6808
|
+
// If this page is not using synthetic shadow, then we don't need to install detection. Note
|
|
6809
|
+
// that we are assuming synthetic shadow is loaded before LWC.
|
|
6810
|
+
function isSyntheticShadowLoaded() {
|
|
6811
|
+
// We should probably be calling `renderer.isSyntheticShadowDefined`, but 1) we don't have access to the renderer,
|
|
6812
|
+
// and 2) this code needs to run in @lwc/engine-core, so it can access `logWarn()` and `report()`.
|
|
6813
|
+
return hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
6814
|
+
}
|
|
6815
|
+
// Detecting cross-root ARIA in synthetic shadow only makes sense for the browser
|
|
6816
|
+
if (supportsCssEscape() && isSyntheticShadowLoaded()) {
|
|
6817
|
+
// Always run detection in dev mode, so we can at least print to the console
|
|
6818
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6819
|
+
enableDetection();
|
|
6820
|
+
} else {
|
|
6821
|
+
// In prod mode, only enable detection if reporting is enabled
|
|
6822
|
+
onReportingEnabled(enableDetection);
|
|
6823
|
+
}
|
|
6561
6824
|
}
|
|
6562
6825
|
|
|
6563
6826
|
/*
|
|
@@ -6794,8 +7057,8 @@
|
|
|
6794
7057
|
var nextNode = node;
|
|
6795
7058
|
var anchor = null;
|
|
6796
7059
|
var renderer = owner.renderer;
|
|
6797
|
-
for (var
|
|
6798
|
-
var childVnode = children[
|
|
7060
|
+
for (var _i34 = 0; _i34 < children.length; _i34++) {
|
|
7061
|
+
var childVnode = children[_i34];
|
|
6799
7062
|
if (!isNull(childVnode)) {
|
|
6800
7063
|
if (nextNode) {
|
|
6801
7064
|
nextNode = hydrateNode(nextNode, childVnode, renderer);
|
|
@@ -6873,8 +7136,8 @@
|
|
|
6873
7136
|
var nodesAreCompatible = true;
|
|
6874
7137
|
// Validate attributes, though we could always recovery from those by running the update mods.
|
|
6875
7138
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
6876
|
-
for (var
|
|
6877
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[
|
|
7139
|
+
for (var _i35 = 0, _Object$entries = Object.entries(attrs); _i35 < _Object$entries.length; _i35++) {
|
|
7140
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i35], 2),
|
|
6878
7141
|
attrName = _Object$entries$_i[0],
|
|
6879
7142
|
attrValue = _Object$entries$_i[1];
|
|
6880
7143
|
var owner = vnode.owner;
|
|
@@ -6975,8 +7238,8 @@
|
|
|
6975
7238
|
var parsedVnodeStyle = parseStyleText(elmStyle);
|
|
6976
7239
|
var expectedStyle = [];
|
|
6977
7240
|
// styleMap is used when style is set to static value.
|
|
6978
|
-
for (var
|
|
6979
|
-
var _styleDecls$_i2 = _slicedToArray(styleDecls[
|
|
7241
|
+
for (var _i36 = 0, n = styleDecls.length; _i36 < n; _i36++) {
|
|
7242
|
+
var _styleDecls$_i2 = _slicedToArray(styleDecls[_i36], 3),
|
|
6980
7243
|
prop = _styleDecls$_i2[0],
|
|
6981
7244
|
value = _styleDecls$_i2[1],
|
|
6982
7245
|
important = _styleDecls$_i2[2];
|
|
@@ -7093,11 +7356,11 @@
|
|
|
7093
7356
|
function warnOnArrayMutation(stylesheets) {
|
|
7094
7357
|
// We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
|
|
7095
7358
|
// we can at least warn when they use the most common mutation methods.
|
|
7096
|
-
var
|
|
7097
|
-
|
|
7359
|
+
var _iterator7 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
|
|
7360
|
+
_step7;
|
|
7098
7361
|
try {
|
|
7099
7362
|
var _loop2 = function _loop2() {
|
|
7100
|
-
var prop =
|
|
7363
|
+
var prop = _step7.value;
|
|
7101
7364
|
var originalArrayMethod = getOriginalArrayMethod(prop);
|
|
7102
7365
|
stylesheets[prop] = function arrayMutationWarningWrapper() {
|
|
7103
7366
|
logError("Mutating the \"stylesheets\" array on a template function " + "is deprecated and may be removed in a future version of LWC.");
|
|
@@ -7105,24 +7368,24 @@
|
|
|
7105
7368
|
return originalArrayMethod.apply(this, arguments);
|
|
7106
7369
|
};
|
|
7107
7370
|
};
|
|
7108
|
-
for (
|
|
7371
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
7109
7372
|
_loop2();
|
|
7110
7373
|
}
|
|
7111
7374
|
} catch (err) {
|
|
7112
|
-
|
|
7375
|
+
_iterator7.e(err);
|
|
7113
7376
|
} finally {
|
|
7114
|
-
|
|
7377
|
+
_iterator7.f();
|
|
7115
7378
|
}
|
|
7116
7379
|
}
|
|
7117
7380
|
// Warn if the user tries to mutate a stylesheet factory function, e.g.:
|
|
7118
7381
|
// `stylesheet.$scoped$ = true`
|
|
7119
7382
|
function warnOnStylesheetFunctionMutation(stylesheet) {
|
|
7120
7383
|
// We could warn on other properties, but in practice only certain expandos are meaningful to LWC at runtime
|
|
7121
|
-
var
|
|
7122
|
-
|
|
7384
|
+
var _iterator8 = _createForOfIteratorHelper(STYLESHEET_FUNCTION_EXPANDOS),
|
|
7385
|
+
_step8;
|
|
7123
7386
|
try {
|
|
7124
7387
|
var _loop3 = function _loop3() {
|
|
7125
|
-
var prop =
|
|
7388
|
+
var prop = _step8.value;
|
|
7126
7389
|
var value = stylesheet[prop];
|
|
7127
7390
|
defineProperty(stylesheet, prop, {
|
|
7128
7391
|
enumerable: true,
|
|
@@ -7136,13 +7399,13 @@
|
|
|
7136
7399
|
}
|
|
7137
7400
|
});
|
|
7138
7401
|
};
|
|
7139
|
-
for (
|
|
7402
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
7140
7403
|
_loop3();
|
|
7141
7404
|
}
|
|
7142
7405
|
} catch (err) {
|
|
7143
|
-
|
|
7406
|
+
_iterator8.e(err);
|
|
7144
7407
|
} finally {
|
|
7145
|
-
|
|
7408
|
+
_iterator8.f();
|
|
7146
7409
|
}
|
|
7147
7410
|
}
|
|
7148
7411
|
// Warn on either array or stylesheet (function) mutation, in a deeply-nested array
|
|
@@ -7164,8 +7427,8 @@
|
|
|
7164
7427
|
// Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
|
|
7165
7428
|
function traverseStylesheets(stylesheets, callback) {
|
|
7166
7429
|
callback(stylesheets);
|
|
7167
|
-
for (var
|
|
7168
|
-
var stylesheet = stylesheets[
|
|
7430
|
+
for (var _i37 = 0; _i37 < stylesheets.length; _i37++) {
|
|
7431
|
+
var stylesheet = stylesheets[_i37];
|
|
7169
7432
|
if (isArray$1(stylesheet)) {
|
|
7170
7433
|
traverseStylesheets(stylesheet, callback);
|
|
7171
7434
|
} else {
|
|
@@ -7211,11 +7474,11 @@
|
|
|
7211
7474
|
if (!isUndefined$1(tmpl.stylesheets)) {
|
|
7212
7475
|
warnOnStylesheetsMutation(tmpl.stylesheets);
|
|
7213
7476
|
}
|
|
7214
|
-
var
|
|
7215
|
-
|
|
7477
|
+
var _iterator9 = _createForOfIteratorHelper(TEMPLATE_PROPS),
|
|
7478
|
+
_step9;
|
|
7216
7479
|
try {
|
|
7217
7480
|
var _loop4 = function _loop4() {
|
|
7218
|
-
var prop =
|
|
7481
|
+
var prop = _step9.value;
|
|
7219
7482
|
var value = tmpl[prop];
|
|
7220
7483
|
defineProperty(tmpl, prop, {
|
|
7221
7484
|
enumerable: true,
|
|
@@ -7231,13 +7494,13 @@
|
|
|
7231
7494
|
}
|
|
7232
7495
|
});
|
|
7233
7496
|
};
|
|
7234
|
-
for (
|
|
7497
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
7235
7498
|
_loop4();
|
|
7236
7499
|
}
|
|
7237
7500
|
} catch (err) {
|
|
7238
|
-
|
|
7501
|
+
_iterator9.e(err);
|
|
7239
7502
|
} finally {
|
|
7240
|
-
|
|
7503
|
+
_iterator9.f();
|
|
7241
7504
|
}
|
|
7242
7505
|
var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
|
|
7243
7506
|
defineProperty(tmpl, 'stylesheetTokens', {
|
|
@@ -7278,7 +7541,7 @@
|
|
|
7278
7541
|
}
|
|
7279
7542
|
return ctor;
|
|
7280
7543
|
}
|
|
7281
|
-
/* version: 2.
|
|
7544
|
+
/* version: 2.35.0 */
|
|
7282
7545
|
|
|
7283
7546
|
/*
|
|
7284
7547
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7962,17 +8225,17 @@
|
|
|
7962
8225
|
function flushPendingWhenDefinedCallbacks(tagName, ctor) {
|
|
7963
8226
|
var resolvers = pendingWhenDefinedCallbacks.get(tagName);
|
|
7964
8227
|
if (!isUndefined$1(resolvers)) {
|
|
7965
|
-
var
|
|
7966
|
-
|
|
8228
|
+
var _iterator10 = _createForOfIteratorHelper(resolvers),
|
|
8229
|
+
_step10;
|
|
7967
8230
|
try {
|
|
7968
|
-
for (
|
|
7969
|
-
var resolver =
|
|
8231
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
8232
|
+
var resolver = _step10.value;
|
|
7970
8233
|
resolver(ctor);
|
|
7971
8234
|
}
|
|
7972
8235
|
} catch (err) {
|
|
7973
|
-
|
|
8236
|
+
_iterator10.e(err);
|
|
7974
8237
|
} finally {
|
|
7975
|
-
|
|
8238
|
+
_iterator10.f();
|
|
7976
8239
|
}
|
|
7977
8240
|
}
|
|
7978
8241
|
pendingWhenDefinedCallbacks.delete(tagName);
|
|
@@ -8022,11 +8285,11 @@
|
|
|
8022
8285
|
var awaiting = awaitingUpgrade.get(tagName);
|
|
8023
8286
|
if (!isUndefined$1(awaiting)) {
|
|
8024
8287
|
awaitingUpgrade.delete(tagName);
|
|
8025
|
-
var
|
|
8026
|
-
|
|
8288
|
+
var _iterator11 = _createForOfIteratorHelper(awaiting),
|
|
8289
|
+
_step11;
|
|
8027
8290
|
try {
|
|
8028
|
-
for (
|
|
8029
|
-
var element =
|
|
8291
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
8292
|
+
var element = _step11.value;
|
|
8030
8293
|
var registeredDefinition = pendingRegistryForElement.get(element);
|
|
8031
8294
|
// At this point, registeredDefinition should never be undefined because awaitingUpgrade
|
|
8032
8295
|
// is only populated when we haven't run internalUpgrade yet, and we only populate
|
|
@@ -8038,9 +8301,9 @@
|
|
|
8038
8301
|
}
|
|
8039
8302
|
}
|
|
8040
8303
|
} catch (err) {
|
|
8041
|
-
|
|
8304
|
+
_iterator11.e(err);
|
|
8042
8305
|
} finally {
|
|
8043
|
-
|
|
8306
|
+
_iterator11.f();
|
|
8044
8307
|
}
|
|
8045
8308
|
}
|
|
8046
8309
|
// If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
|
|
@@ -8317,7 +8580,7 @@
|
|
|
8317
8580
|
function isNull(obj) {
|
|
8318
8581
|
return obj === null;
|
|
8319
8582
|
}
|
|
8320
|
-
/** version: 2.
|
|
8583
|
+
/** version: 2.35.0 */
|
|
8321
8584
|
|
|
8322
8585
|
/*
|
|
8323
8586
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8376,17 +8639,17 @@
|
|
|
8376
8639
|
exports.createFragment = function (html) {
|
|
8377
8640
|
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
8378
8641
|
if (!isUndefined(wrapperTags)) {
|
|
8379
|
-
var
|
|
8380
|
-
|
|
8642
|
+
var _iterator12 = _createForOfIteratorHelper(wrapperTags),
|
|
8643
|
+
_step12;
|
|
8381
8644
|
try {
|
|
8382
|
-
for (
|
|
8383
|
-
var wrapperTag =
|
|
8645
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
8646
|
+
var wrapperTag = _step12.value;
|
|
8384
8647
|
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
8385
8648
|
}
|
|
8386
8649
|
} catch (err) {
|
|
8387
|
-
|
|
8650
|
+
_iterator12.e(err);
|
|
8388
8651
|
} finally {
|
|
8389
|
-
|
|
8652
|
+
_iterator12.f();
|
|
8390
8653
|
}
|
|
8391
8654
|
}
|
|
8392
8655
|
// For IE11, the document title must not be undefined, but it can be an empty string
|
|
@@ -8395,7 +8658,7 @@
|
|
|
8395
8658
|
doc.body.innerHTML = html;
|
|
8396
8659
|
var content = doc.body;
|
|
8397
8660
|
if (!isUndefined(wrapperTags)) {
|
|
8398
|
-
for (var
|
|
8661
|
+
for (var _i38 = 0; _i38 < wrapperTags.length; _i38++) {
|
|
8399
8662
|
content = content.firstChild;
|
|
8400
8663
|
}
|
|
8401
8664
|
}
|
|
@@ -8588,8 +8851,8 @@
|
|
|
8588
8851
|
tagName: element.tagName.toLowerCase(),
|
|
8589
8852
|
hydrated: true
|
|
8590
8853
|
});
|
|
8591
|
-
for (var
|
|
8592
|
-
var _Object$entries2$_i = _slicedToArray(_Object$entries2[
|
|
8854
|
+
for (var _i39 = 0, _Object$entries2 = Object.entries(props); _i39 < _Object$entries2.length; _i39++) {
|
|
8855
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i39], 2),
|
|
8593
8856
|
key = _Object$entries2$_i[0],
|
|
8594
8857
|
value = _Object$entries2$_i[1];
|
|
8595
8858
|
element[key] = value;
|
|
@@ -8883,10 +9146,11 @@
|
|
|
8883
9146
|
});
|
|
8884
9147
|
freeze(LightningElement);
|
|
8885
9148
|
seal(LightningElement.prototype);
|
|
8886
|
-
/* version: 2.
|
|
9149
|
+
/* version: 2.35.0 */
|
|
8887
9150
|
|
|
8888
9151
|
exports.LightningElement = LightningElement;
|
|
8889
9152
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
9153
|
+
exports.__unstable__ReportingControl = reportingControl;
|
|
8890
9154
|
exports.api = api$1;
|
|
8891
9155
|
exports.buildCustomElementConstructor = deprecatedBuildCustomElementConstructor;
|
|
8892
9156
|
exports.createContextProvider = createContextProvider;
|