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