lwc 2.10.0 → 2.11.3
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 +4387 -5935
- package/dist/engine-dom/iife/es2017/engine-dom.js +4387 -5935
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +3463 -4675
- package/dist/engine-dom/iife/es5/engine-dom.js +1121 -1077
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +432 -217
- package/dist/engine-dom/umd/es2017/engine-dom.js +4387 -5935
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +3463 -4675
- package/dist/engine-dom/umd/es5/engine-dom.js +1121 -1077
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +432 -217
- package/dist/engine-server/commonjs/es2017/engine-server.js +4055 -5391
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +4055 -5391
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +2952 -3673
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +2952 -3673
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +2825 -3532
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +11 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +11 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +2952 -3673
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +2825 -3532
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +11 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +11 -3
- package/dist/wire-service/esm/es2017/wire-service.js +128 -174
- package/dist/wire-service/iife/es2017/wire-service.js +128 -174
- package/dist/wire-service/iife/es2017/wire-service_debug.js +128 -174
- 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 +128 -174
- package/dist/wire-service/umd/es2017/wire-service_debug.js +128 -174
- 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 +8 -9
|
@@ -49,6 +49,8 @@ var LWC = (function (exports) {
|
|
|
49
49
|
|
|
50
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
51
|
|
|
52
|
+
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; } } }; }
|
|
53
|
+
|
|
52
54
|
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); }
|
|
53
55
|
|
|
54
56
|
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; }
|
|
@@ -345,7 +347,7 @@ var LWC = (function (exports) {
|
|
|
345
347
|
var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
346
348
|
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
347
349
|
var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
348
|
-
/** version: 2.
|
|
350
|
+
/** version: 2.11.3 */
|
|
349
351
|
|
|
350
352
|
/*
|
|
351
353
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -448,12 +450,12 @@ var LWC = (function (exports) {
|
|
|
448
450
|
|
|
449
451
|
|
|
450
452
|
var features = {
|
|
451
|
-
DISABLE_MIXED_SHADOW_MODE: null,
|
|
452
453
|
ENABLE_ELEMENT_PATCH: null,
|
|
453
454
|
ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
|
|
454
455
|
ENABLE_HMR: null,
|
|
455
456
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
456
457
|
ENABLE_INNER_OUTER_TEXT_PATCH: null,
|
|
458
|
+
ENABLE_MIXED_SHADOW_MODE: null,
|
|
457
459
|
ENABLE_NODE_LIST_PATCH: null,
|
|
458
460
|
ENABLE_NODE_PATCH: null,
|
|
459
461
|
ENABLE_REACTIVE_SETTER: null,
|
|
@@ -515,7 +517,7 @@ var LWC = (function (exports) {
|
|
|
515
517
|
|
|
516
518
|
function setFeatureFlagForTest(name, value) {
|
|
517
519
|
}
|
|
518
|
-
/** version: 2.
|
|
520
|
+
/** version: 2.11.3 */
|
|
519
521
|
|
|
520
522
|
/* proxy-compat-disable */
|
|
521
523
|
|
|
@@ -558,6 +560,42 @@ var LWC = (function (exports) {
|
|
|
558
560
|
|
|
559
561
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
560
562
|
} // Borrowed from Vue template compiler.
|
|
563
|
+
// https://github.com/vuejs/vue/blob/531371b818b0e31a989a06df43789728f23dc4e8/src/platforms/web/util/style.js#L5-L16
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
var DECLARATION_DELIMITER = /;(?![^(]*\))/g;
|
|
567
|
+
var PROPERTY_DELIMITER = /:(.+)/;
|
|
568
|
+
|
|
569
|
+
function parseStyleText(cssText) {
|
|
570
|
+
var styleMap = {};
|
|
571
|
+
var declarations = cssText.split(DECLARATION_DELIMITER);
|
|
572
|
+
|
|
573
|
+
var _iterator = _createForOfIteratorHelper(declarations),
|
|
574
|
+
_step;
|
|
575
|
+
|
|
576
|
+
try {
|
|
577
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
578
|
+
var declaration = _step.value;
|
|
579
|
+
|
|
580
|
+
if (declaration) {
|
|
581
|
+
var _declaration$split = declaration.split(PROPERTY_DELIMITER),
|
|
582
|
+
_declaration$split2 = _slicedToArray(_declaration$split, 2),
|
|
583
|
+
prop = _declaration$split2[0],
|
|
584
|
+
value = _declaration$split2[1];
|
|
585
|
+
|
|
586
|
+
if (prop !== undefined && value !== undefined) {
|
|
587
|
+
styleMap[prop.trim()] = value.trim();
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
} catch (err) {
|
|
592
|
+
_iterator.e(err);
|
|
593
|
+
} finally {
|
|
594
|
+
_iterator.f();
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
return styleMap;
|
|
598
|
+
} // Make a shallow copy of an object but omit the given key
|
|
561
599
|
|
|
562
600
|
|
|
563
601
|
function cloneAndOmitKey(object, keyToOmit) {
|
|
@@ -1030,8 +1068,8 @@ var LWC = (function (exports) {
|
|
|
1030
1068
|
}
|
|
1031
1069
|
}
|
|
1032
1070
|
|
|
1033
|
-
function
|
|
1034
|
-
log('
|
|
1071
|
+
function logError(message, vm) {
|
|
1072
|
+
log('error', message, vm);
|
|
1035
1073
|
}
|
|
1036
1074
|
/*
|
|
1037
1075
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1051,6 +1089,7 @@ var LWC = (function (exports) {
|
|
|
1051
1089
|
* SPDX-License-Identifier: MIT
|
|
1052
1090
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1053
1091
|
*/
|
|
1092
|
+
// These properties get added to LWCElement.prototype publicProps automatically
|
|
1054
1093
|
|
|
1055
1094
|
var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
|
|
1056
1095
|
|
|
@@ -2590,13 +2629,6 @@ var LWC = (function (exports) {
|
|
|
2590
2629
|
var meta = signedDecoratorToMetaMap.get(Ctor);
|
|
2591
2630
|
return isUndefined$1(meta) ? defaultMeta : meta;
|
|
2592
2631
|
}
|
|
2593
|
-
/*
|
|
2594
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2595
|
-
* All rights reserved.
|
|
2596
|
-
* SPDX-License-Identifier: MIT
|
|
2597
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2598
|
-
*/
|
|
2599
|
-
|
|
2600
2632
|
|
|
2601
2633
|
var signedTemplateSet = new Set();
|
|
2602
2634
|
|
|
@@ -2639,6 +2671,7 @@ var LWC = (function (exports) {
|
|
|
2639
2671
|
* SPDX-License-Identifier: MIT
|
|
2640
2672
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2641
2673
|
*/
|
|
2674
|
+
// A bridge descriptor is a descriptor whose job is just to get the component instance
|
|
2642
2675
|
// from the element instance, and get the value or set a new value on the component.
|
|
2643
2676
|
// This means that across different elements, similar names can get the exact same
|
|
2644
2677
|
// descriptor, so we can cache them:
|
|
@@ -3332,6 +3365,7 @@ var LWC = (function (exports) {
|
|
|
3332
3365
|
* SPDX-License-Identifier: MIT
|
|
3333
3366
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3334
3367
|
*/
|
|
3368
|
+
// The style property is a string when defined via an expression in the template.
|
|
3335
3369
|
|
|
3336
3370
|
|
|
3337
3371
|
function patchStyleAttribute(oldVnode, vnode) {
|
|
@@ -3376,6 +3410,7 @@ var LWC = (function (exports) {
|
|
|
3376
3410
|
* SPDX-License-Identifier: MIT
|
|
3377
3411
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3378
3412
|
*/
|
|
3413
|
+
// The HTML class property becomes the vnode.data.classMap object when defined as a string in the template.
|
|
3379
3414
|
// The compiler takes care of transforming the inline classnames into an object. It's faster to set the
|
|
3380
3415
|
// different classnames properties individually instead of via a string.
|
|
3381
3416
|
|
|
@@ -3400,6 +3435,7 @@ var LWC = (function (exports) {
|
|
|
3400
3435
|
* SPDX-License-Identifier: MIT
|
|
3401
3436
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3402
3437
|
*/
|
|
3438
|
+
// The HTML style property becomes the vnode.data.styleDecls object when defined as a string in the template.
|
|
3403
3439
|
// The compiler takes care of transforming the inline style into an object. It's faster to set the
|
|
3404
3440
|
// different style properties individually instead of via a string.
|
|
3405
3441
|
|
|
@@ -4951,12 +4987,17 @@ var LWC = (function (exports) {
|
|
|
4951
4987
|
* will prevent this function from being imported by userland code.
|
|
4952
4988
|
*/
|
|
4953
4989
|
|
|
4954
|
-
function registerComponent(
|
|
4990
|
+
function registerComponent( // We typically expect a LightningElementConstructor, but technically you can call this with anything
|
|
4991
|
+
Ctor, _ref2) {
|
|
4955
4992
|
var tmpl = _ref2.tmpl;
|
|
4956
4993
|
|
|
4957
|
-
|
|
4994
|
+
if (isFunction$1(Ctor)) {
|
|
4995
|
+
|
|
4996
|
+
signedTemplateMap.set(Ctor, tmpl);
|
|
4997
|
+
} // chaining this method as a way to wrap existing assignment of component constructor easily,
|
|
4958
4998
|
// without too much transformation
|
|
4959
4999
|
|
|
5000
|
+
|
|
4960
5001
|
return Ctor;
|
|
4961
5002
|
}
|
|
4962
5003
|
|
|
@@ -5051,140 +5092,6 @@ var LWC = (function (exports) {
|
|
|
5051
5092
|
cbs[_i22].call(undefined, component, {}, def, context);
|
|
5052
5093
|
}
|
|
5053
5094
|
}
|
|
5054
|
-
/*
|
|
5055
|
-
* Copyright (c) 2022, salesforce.com, inc.
|
|
5056
|
-
* All rights reserved.
|
|
5057
|
-
* SPDX-License-Identifier: MIT
|
|
5058
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
5059
|
-
*/
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
function hydrate(vnode, node) {
|
|
5063
|
-
switch (vnode.type) {
|
|
5064
|
-
case 0
|
|
5065
|
-
/* Text */
|
|
5066
|
-
:
|
|
5067
|
-
hydrateText(vnode, node);
|
|
5068
|
-
break;
|
|
5069
|
-
|
|
5070
|
-
case 1
|
|
5071
|
-
/* Comment */
|
|
5072
|
-
:
|
|
5073
|
-
hydrateComment(vnode, node);
|
|
5074
|
-
break;
|
|
5075
|
-
|
|
5076
|
-
case 2
|
|
5077
|
-
/* Element */
|
|
5078
|
-
:
|
|
5079
|
-
hydrateElement(vnode, node);
|
|
5080
|
-
break;
|
|
5081
|
-
|
|
5082
|
-
case 3
|
|
5083
|
-
/* CustomElement */
|
|
5084
|
-
:
|
|
5085
|
-
hydrateCustomElement(vnode, node);
|
|
5086
|
-
break;
|
|
5087
|
-
}
|
|
5088
|
-
}
|
|
5089
|
-
|
|
5090
|
-
function hydrateText(vnode, node) {
|
|
5091
|
-
var _a;
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
|
|
5095
|
-
vnode.elm = node;
|
|
5096
|
-
}
|
|
5097
|
-
|
|
5098
|
-
function hydrateComment(vnode, node) {
|
|
5099
|
-
var _a;
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
|
|
5103
|
-
vnode.elm = node;
|
|
5104
|
-
}
|
|
5105
|
-
|
|
5106
|
-
function hydrateElement(vnode, node) {
|
|
5107
|
-
|
|
5108
|
-
var elm = node;
|
|
5109
|
-
vnode.elm = elm;
|
|
5110
|
-
var context = vnode.data.context;
|
|
5111
|
-
var isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual"
|
|
5112
|
-
/* Manual */
|
|
5113
|
-
);
|
|
5114
|
-
|
|
5115
|
-
if (isDomManual) {
|
|
5116
|
-
// it may be that this element has lwc:inner-html, we need to diff and in case are the same,
|
|
5117
|
-
// remove the innerHTML from props so it reuses the existing dom elements.
|
|
5118
|
-
var props = vnode.data.props;
|
|
5119
|
-
|
|
5120
|
-
if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
|
|
5121
|
-
if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
|
|
5122
|
-
// Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
|
|
5123
|
-
vnode.data = Object.assign(Object.assign({}, vnode.data), {
|
|
5124
|
-
props: cloneAndOmitKey(props, 'innerHTML')
|
|
5125
|
-
});
|
|
5126
|
-
} else {
|
|
5127
|
-
logWarn("Mismatch hydrating element <".concat(getProperty$1(elm, 'tagName').toLowerCase(), ">: innerHTML values do not match for element, will recover from the difference"), vnode.owner);
|
|
5128
|
-
}
|
|
5129
|
-
}
|
|
5130
|
-
}
|
|
5131
|
-
|
|
5132
|
-
patchElementPropsAndAttrs(vnode);
|
|
5133
|
-
|
|
5134
|
-
if (!isDomManual) {
|
|
5135
|
-
hydrateChildren(getChildNodes$1(vnode.elm), vnode.children, vnode.owner);
|
|
5136
|
-
}
|
|
5137
|
-
}
|
|
5138
|
-
|
|
5139
|
-
function hydrateCustomElement(vnode, node) {
|
|
5140
|
-
|
|
5141
|
-
var elm = node;
|
|
5142
|
-
var sel = vnode.sel,
|
|
5143
|
-
mode = vnode.mode,
|
|
5144
|
-
ctor = vnode.ctor,
|
|
5145
|
-
owner = vnode.owner;
|
|
5146
|
-
var vm = createVM(elm, ctor, {
|
|
5147
|
-
mode: mode,
|
|
5148
|
-
owner: owner,
|
|
5149
|
-
tagName: sel
|
|
5150
|
-
});
|
|
5151
|
-
vnode.elm = elm;
|
|
5152
|
-
vnode.vm = vm;
|
|
5153
|
-
allocateChildren(vnode, vm);
|
|
5154
|
-
patchElementPropsAndAttrs(vnode); // Insert hook section:
|
|
5155
|
-
|
|
5156
|
-
runConnectedCallback(vm);
|
|
5157
|
-
|
|
5158
|
-
if (vm.renderMode !== 0
|
|
5159
|
-
/* Light */
|
|
5160
|
-
) {
|
|
5161
|
-
// VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
|
|
5162
|
-
// Note: for Light DOM, this is handled while hydrating the VM
|
|
5163
|
-
hydrateChildren(getChildNodes$1(vnode.elm), vnode.children);
|
|
5164
|
-
}
|
|
5165
|
-
|
|
5166
|
-
hydrateVM(vm);
|
|
5167
|
-
}
|
|
5168
|
-
|
|
5169
|
-
function hydrateChildren(elmChildren, children, vm) {
|
|
5170
|
-
|
|
5171
|
-
var childNodeIndex = 0;
|
|
5172
|
-
|
|
5173
|
-
for (var _i23 = 0; _i23 < children.length; _i23++) {
|
|
5174
|
-
var childVnode = children[_i23];
|
|
5175
|
-
|
|
5176
|
-
if (!isNull(childVnode)) {
|
|
5177
|
-
var childNode = elmChildren[childNodeIndex];
|
|
5178
|
-
hydrate(childVnode, childNode);
|
|
5179
|
-
childNodeIndex++;
|
|
5180
|
-
}
|
|
5181
|
-
}
|
|
5182
|
-
}
|
|
5183
|
-
|
|
5184
|
-
function patchElementPropsAndAttrs(vnode) {
|
|
5185
|
-
applyEventListeners(vnode);
|
|
5186
|
-
patchProps(null, vnode);
|
|
5187
|
-
}
|
|
5188
5095
|
/*
|
|
5189
5096
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
5190
5097
|
* All rights reserved.
|
|
@@ -5235,12 +5142,6 @@ var LWC = (function (exports) {
|
|
|
5235
5142
|
, vm);
|
|
5236
5143
|
}
|
|
5237
5144
|
|
|
5238
|
-
function hydrateRootElement(elm) {
|
|
5239
|
-
var vm = getAssociatedVM(elm);
|
|
5240
|
-
runConnectedCallback(vm);
|
|
5241
|
-
hydrateVM(vm);
|
|
5242
|
-
}
|
|
5243
|
-
|
|
5244
5145
|
function disconnectRootElement(elm) {
|
|
5245
5146
|
var vm = getAssociatedVM(elm);
|
|
5246
5147
|
resetComponentStateWhenRemoved(vm);
|
|
@@ -5248,22 +5149,6 @@ var LWC = (function (exports) {
|
|
|
5248
5149
|
|
|
5249
5150
|
function appendVM(vm) {
|
|
5250
5151
|
rehydrate(vm);
|
|
5251
|
-
}
|
|
5252
|
-
|
|
5253
|
-
function hydrateVM(vm) {
|
|
5254
|
-
if (isTrue(vm.isDirty)) {
|
|
5255
|
-
// manually diffing/patching here.
|
|
5256
|
-
// This routine is:
|
|
5257
|
-
// patchShadowRoot(vm, children);
|
|
5258
|
-
// -> addVnodes.
|
|
5259
|
-
var children = renderComponent(vm);
|
|
5260
|
-
vm.children = children;
|
|
5261
|
-
var vmChildren = vm.renderMode === 0
|
|
5262
|
-
/* Light */
|
|
5263
|
-
? getChildNodes$1(vm.elm) : getChildNodes$1(vm.elm.shadowRoot);
|
|
5264
|
-
hydrateChildren(vmChildren, children);
|
|
5265
|
-
runRenderedCallback(vm);
|
|
5266
|
-
}
|
|
5267
5152
|
} // just in case the component comes back, with this we guarantee re-rendering it
|
|
5268
5153
|
// while preventing any attempt to rehydration until after reinsertion.
|
|
5269
5154
|
|
|
@@ -5383,34 +5268,38 @@ var LWC = (function (exports) {
|
|
|
5383
5268
|
/* Native */
|
|
5384
5269
|
;
|
|
5385
5270
|
} else if (isNativeShadowDefined$1) {
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
/* Any */
|
|
5392
|
-
) {
|
|
5393
|
-
shadowMode = 0
|
|
5394
|
-
/* Native */
|
|
5395
|
-
;
|
|
5396
|
-
} else {
|
|
5397
|
-
var shadowAncestor = getNearestShadowAncestor(vm);
|
|
5398
|
-
|
|
5399
|
-
if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
|
|
5400
|
-
/* Native */
|
|
5271
|
+
// Not combined with above condition because @lwc/features only supports identifiers in
|
|
5272
|
+
// the if-condition.
|
|
5273
|
+
if (runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
|
|
5274
|
+
if (def.shadowSupportMode === "any"
|
|
5275
|
+
/* Any */
|
|
5401
5276
|
) {
|
|
5402
|
-
// Transitive support for native Shadow DOM. A component in native mode
|
|
5403
|
-
// transitively opts all of its descendants into native.
|
|
5404
5277
|
shadowMode = 0
|
|
5405
5278
|
/* Native */
|
|
5406
5279
|
;
|
|
5407
5280
|
} else {
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
shadowMode
|
|
5411
|
-
/*
|
|
5412
|
-
|
|
5281
|
+
var shadowAncestor = getNearestShadowAncestor(vm);
|
|
5282
|
+
|
|
5283
|
+
if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
|
|
5284
|
+
/* Native */
|
|
5285
|
+
) {
|
|
5286
|
+
// Transitive support for native Shadow DOM. A component in native mode
|
|
5287
|
+
// transitively opts all of its descendants into native.
|
|
5288
|
+
shadowMode = 0
|
|
5289
|
+
/* Native */
|
|
5290
|
+
;
|
|
5291
|
+
} else {
|
|
5292
|
+
// Synthetic if neither this component nor any of its ancestors are configured
|
|
5293
|
+
// to be native.
|
|
5294
|
+
shadowMode = 1
|
|
5295
|
+
/* Synthetic */
|
|
5296
|
+
;
|
|
5297
|
+
}
|
|
5413
5298
|
}
|
|
5299
|
+
} else {
|
|
5300
|
+
shadowMode = 1
|
|
5301
|
+
/* Synthetic */
|
|
5302
|
+
;
|
|
5414
5303
|
}
|
|
5415
5304
|
} else {
|
|
5416
5305
|
// Synthetic if there is no native Shadow DOM support.
|
|
@@ -5525,19 +5414,19 @@ var LWC = (function (exports) {
|
|
|
5525
5414
|
});
|
|
5526
5415
|
rehydrateQueue = []; // reset to a new queue
|
|
5527
5416
|
|
|
5528
|
-
for (var
|
|
5529
|
-
var vm = vms[
|
|
5417
|
+
for (var _i23 = 0, _len8 = vms.length; _i23 < _len8; _i23 += 1) {
|
|
5418
|
+
var vm = vms[_i23];
|
|
5530
5419
|
|
|
5531
5420
|
try {
|
|
5532
5421
|
rehydrate(vm);
|
|
5533
5422
|
} catch (error) {
|
|
5534
|
-
if (
|
|
5423
|
+
if (_i23 + 1 < _len8) {
|
|
5535
5424
|
// pieces of the queue are still pending to be rehydrated, those should have priority
|
|
5536
5425
|
if (rehydrateQueue.length === 0) {
|
|
5537
5426
|
addCallbackToNextTick(flushRehydrationQueue);
|
|
5538
5427
|
}
|
|
5539
5428
|
|
|
5540
|
-
ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms,
|
|
5429
|
+
ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i23 + 1));
|
|
5541
5430
|
} // we need to end the measure before throwing.
|
|
5542
5431
|
|
|
5543
5432
|
|
|
@@ -5636,8 +5525,8 @@ var LWC = (function (exports) {
|
|
|
5636
5525
|
var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
|
|
5637
5526
|
// inserted in reserved order.
|
|
5638
5527
|
|
|
5639
|
-
for (var
|
|
5640
|
-
var elm = vCustomElementCollection[
|
|
5528
|
+
for (var _i24 = vCustomElementCollection.length - 1; _i24 >= 0; _i24 -= 1) {
|
|
5529
|
+
var elm = vCustomElementCollection[_i24].elm; // There are two cases where the element could be undefined:
|
|
5641
5530
|
// * when there is an error during the construction phase, and an error
|
|
5642
5531
|
// boundary picks it, there is a possibility that the VCustomElement
|
|
5643
5532
|
// is not properly initialized, and therefore is should be ignored.
|
|
@@ -5671,8 +5560,8 @@ var LWC = (function (exports) {
|
|
|
5671
5560
|
|
|
5672
5561
|
|
|
5673
5562
|
function recursivelyDisconnectChildren(vnodes) {
|
|
5674
|
-
for (var
|
|
5675
|
-
var vnode = vnodes[
|
|
5563
|
+
for (var _i25 = 0, _len9 = vnodes.length; _i25 < _len9; _i25 += 1) {
|
|
5564
|
+
var vnode = vnodes[_i25];
|
|
5676
5565
|
|
|
5677
5566
|
if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
|
|
5678
5567
|
switch (vnode.type) {
|
|
@@ -5703,8 +5592,8 @@ var LWC = (function (exports) {
|
|
|
5703
5592
|
var children = vm.children,
|
|
5704
5593
|
renderRoot = vm.renderRoot;
|
|
5705
5594
|
|
|
5706
|
-
for (var
|
|
5707
|
-
var child = children[
|
|
5595
|
+
for (var _i26 = 0, _len10 = children.length; _i26 < _len10; _i26++) {
|
|
5596
|
+
var child = children[_i26];
|
|
5708
5597
|
|
|
5709
5598
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
5710
5599
|
remove$1(child.elm, renderRoot);
|
|
@@ -6054,8 +5943,8 @@ var LWC = (function (exports) {
|
|
|
6054
5943
|
function connectWireAdapters(vm) {
|
|
6055
5944
|
var wiredConnecting = vm.context.wiredConnecting;
|
|
6056
5945
|
|
|
6057
|
-
for (var
|
|
6058
|
-
wiredConnecting[
|
|
5946
|
+
for (var _i27 = 0, _len11 = wiredConnecting.length; _i27 < _len11; _i27 += 1) {
|
|
5947
|
+
wiredConnecting[_i27]();
|
|
6059
5948
|
}
|
|
6060
5949
|
}
|
|
6061
5950
|
|
|
@@ -6063,8 +5952,8 @@ var LWC = (function (exports) {
|
|
|
6063
5952
|
var wiredDisconnecting = vm.context.wiredDisconnecting;
|
|
6064
5953
|
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
6065
5954
|
// job
|
|
6066
|
-
for (var
|
|
6067
|
-
wiredDisconnecting[
|
|
5955
|
+
for (var _i28 = 0, _len12 = wiredDisconnecting.length; _i28 < _len12; _i28 += 1) {
|
|
5956
|
+
wiredDisconnecting[_i28]();
|
|
6068
5957
|
}
|
|
6069
5958
|
}, noop);
|
|
6070
5959
|
}
|
|
@@ -6074,6 +5963,7 @@ var LWC = (function (exports) {
|
|
|
6074
5963
|
* SPDX-License-Identifier: MIT
|
|
6075
5964
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6076
5965
|
*/
|
|
5966
|
+
// this is lwc internal implementation
|
|
6077
5967
|
|
|
6078
5968
|
|
|
6079
5969
|
function createContextProvider(adapter) {
|
|
@@ -6133,6 +6023,327 @@ var LWC = (function (exports) {
|
|
|
6133
6023
|
|
|
6134
6024
|
return reactiveMembrane.getReadOnlyProxy(obj);
|
|
6135
6025
|
}
|
|
6026
|
+
/*
|
|
6027
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
6028
|
+
* All rights reserved.
|
|
6029
|
+
* SPDX-License-Identifier: MIT
|
|
6030
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6031
|
+
*/
|
|
6032
|
+
// flag indicating if the hydration recovered from the DOM mismatch
|
|
6033
|
+
|
|
6034
|
+
|
|
6035
|
+
var hasMismatch = false;
|
|
6036
|
+
|
|
6037
|
+
function hydrateRoot(vm) {
|
|
6038
|
+
hasMismatch = false;
|
|
6039
|
+
runConnectedCallback(vm);
|
|
6040
|
+
hydrateVM(vm);
|
|
6041
|
+
|
|
6042
|
+
if (hasMismatch) {
|
|
6043
|
+
logError('Hydration completed with errors.', vm);
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
|
|
6047
|
+
function hydrateVM(vm) {
|
|
6048
|
+
var children = renderComponent(vm);
|
|
6049
|
+
vm.children = children;
|
|
6050
|
+
var parentNode = vm.renderRoot;
|
|
6051
|
+
hydrateChildren(getFirstChild$1(parentNode), children, parentNode);
|
|
6052
|
+
runRenderedCallback(vm);
|
|
6053
|
+
}
|
|
6054
|
+
|
|
6055
|
+
function hydrateNode(node, vnode) {
|
|
6056
|
+
var hydratedNode;
|
|
6057
|
+
|
|
6058
|
+
switch (vnode.type) {
|
|
6059
|
+
case 0
|
|
6060
|
+
/* Text */
|
|
6061
|
+
:
|
|
6062
|
+
hydratedNode = hydrateText(node, vnode);
|
|
6063
|
+
break;
|
|
6064
|
+
|
|
6065
|
+
case 1
|
|
6066
|
+
/* Comment */
|
|
6067
|
+
:
|
|
6068
|
+
hydratedNode = hydrateComment(node, vnode);
|
|
6069
|
+
break;
|
|
6070
|
+
|
|
6071
|
+
case 2
|
|
6072
|
+
/* Element */
|
|
6073
|
+
:
|
|
6074
|
+
hydratedNode = hydrateElement(node, vnode);
|
|
6075
|
+
break;
|
|
6076
|
+
|
|
6077
|
+
case 3
|
|
6078
|
+
/* CustomElement */
|
|
6079
|
+
:
|
|
6080
|
+
hydratedNode = hydrateCustomElement(node, vnode);
|
|
6081
|
+
break;
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
return nextSibling$1(hydratedNode);
|
|
6085
|
+
}
|
|
6086
|
+
|
|
6087
|
+
function hydrateText(node, vnode) {
|
|
6088
|
+
var _a;
|
|
6089
|
+
|
|
6090
|
+
if (!hasCorrectNodeType(vnode, node, 3
|
|
6091
|
+
/* TEXT */
|
|
6092
|
+
)) {
|
|
6093
|
+
return handleMismatch(node, vnode);
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
|
|
6097
|
+
vnode.elm = node;
|
|
6098
|
+
return node;
|
|
6099
|
+
}
|
|
6100
|
+
|
|
6101
|
+
function hydrateComment(node, vnode) {
|
|
6102
|
+
var _a;
|
|
6103
|
+
|
|
6104
|
+
if (!hasCorrectNodeType(vnode, node, 8
|
|
6105
|
+
/* COMMENT */
|
|
6106
|
+
)) {
|
|
6107
|
+
return handleMismatch(node, vnode);
|
|
6108
|
+
}
|
|
6109
|
+
|
|
6110
|
+
setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
|
|
6111
|
+
vnode.elm = node;
|
|
6112
|
+
return node;
|
|
6113
|
+
}
|
|
6114
|
+
|
|
6115
|
+
function hydrateElement(elm, vnode) {
|
|
6116
|
+
if (!hasCorrectNodeType(vnode, elm, 1
|
|
6117
|
+
/* ELEMENT */
|
|
6118
|
+
) || !isMatchingElement(vnode, elm)) {
|
|
6119
|
+
return handleMismatch(elm, vnode);
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6122
|
+
vnode.elm = elm;
|
|
6123
|
+
var context = vnode.data.context;
|
|
6124
|
+
var isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual"
|
|
6125
|
+
/* Manual */
|
|
6126
|
+
);
|
|
6127
|
+
|
|
6128
|
+
if (isDomManual) {
|
|
6129
|
+
// it may be that this element has lwc:inner-html, we need to diff and in case are the same,
|
|
6130
|
+
// remove the innerHTML from props so it reuses the existing dom elements.
|
|
6131
|
+
var props = vnode.data.props;
|
|
6132
|
+
|
|
6133
|
+
if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
|
|
6134
|
+
if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
|
|
6135
|
+
// Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
|
|
6136
|
+
vnode.data = Object.assign(Object.assign({}, vnode.data), {
|
|
6137
|
+
props: cloneAndOmitKey(props, 'innerHTML')
|
|
6138
|
+
});
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
}
|
|
6142
|
+
|
|
6143
|
+
patchElementPropsAndAttrs(vnode);
|
|
6144
|
+
|
|
6145
|
+
if (!isDomManual) {
|
|
6146
|
+
hydrateChildren(getFirstChild$1(elm), vnode.children, elm, vnode.owner);
|
|
6147
|
+
}
|
|
6148
|
+
|
|
6149
|
+
return elm;
|
|
6150
|
+
}
|
|
6151
|
+
|
|
6152
|
+
function hydrateCustomElement(elm, vnode) {
|
|
6153
|
+
if (!hasCorrectNodeType(vnode, elm, 1
|
|
6154
|
+
/* ELEMENT */
|
|
6155
|
+
) || !isMatchingElement(vnode, elm)) {
|
|
6156
|
+
return handleMismatch(elm, vnode);
|
|
6157
|
+
}
|
|
6158
|
+
|
|
6159
|
+
var sel = vnode.sel,
|
|
6160
|
+
mode = vnode.mode,
|
|
6161
|
+
ctor = vnode.ctor,
|
|
6162
|
+
owner = vnode.owner;
|
|
6163
|
+
var vm = createVM(elm, ctor, {
|
|
6164
|
+
mode: mode,
|
|
6165
|
+
owner: owner,
|
|
6166
|
+
tagName: sel
|
|
6167
|
+
});
|
|
6168
|
+
vnode.elm = elm;
|
|
6169
|
+
vnode.vm = vm;
|
|
6170
|
+
allocateChildren(vnode, vm);
|
|
6171
|
+
patchElementPropsAndAttrs(vnode); // Insert hook section:
|
|
6172
|
+
|
|
6173
|
+
runConnectedCallback(vm);
|
|
6174
|
+
|
|
6175
|
+
if (vm.renderMode !== 0
|
|
6176
|
+
/* Light */
|
|
6177
|
+
) {
|
|
6178
|
+
// VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
|
|
6179
|
+
// Note: for Light DOM, this is handled while hydrating the VM
|
|
6180
|
+
hydrateChildren(getFirstChild$1(elm), vnode.children, elm);
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
hydrateVM(vm);
|
|
6184
|
+
return elm;
|
|
6185
|
+
}
|
|
6186
|
+
|
|
6187
|
+
function hydrateChildren(node, children, parentNode, owner) {
|
|
6188
|
+
var nextNode = node;
|
|
6189
|
+
var anchor = null;
|
|
6190
|
+
|
|
6191
|
+
for (var _i29 = 0; _i29 < children.length; _i29++) {
|
|
6192
|
+
var childVnode = children[_i29];
|
|
6193
|
+
|
|
6194
|
+
if (!isNull(childVnode)) {
|
|
6195
|
+
if (nextNode) {
|
|
6196
|
+
nextNode = hydrateNode(nextNode, childVnode);
|
|
6197
|
+
anchor = childVnode.elm;
|
|
6198
|
+
} else {
|
|
6199
|
+
hasMismatch = true;
|
|
6200
|
+
|
|
6201
|
+
mount(childVnode, parentNode, anchor);
|
|
6202
|
+
anchor = childVnode.elm;
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
|
|
6207
|
+
if (nextNode) {
|
|
6208
|
+
hasMismatch = true;
|
|
6209
|
+
|
|
6210
|
+
do {
|
|
6211
|
+
var current = nextNode;
|
|
6212
|
+
nextNode = nextSibling$1(nextNode);
|
|
6213
|
+
removeNode(current, parentNode);
|
|
6214
|
+
} while (nextNode);
|
|
6215
|
+
}
|
|
6216
|
+
}
|
|
6217
|
+
|
|
6218
|
+
function handleMismatch(node, vnode, msg) {
|
|
6219
|
+
hasMismatch = true;
|
|
6220
|
+
|
|
6221
|
+
var parentNode = getProperty$1(node, 'parentNode');
|
|
6222
|
+
mount(vnode, parentNode, node);
|
|
6223
|
+
removeNode(node, parentNode);
|
|
6224
|
+
return vnode.elm;
|
|
6225
|
+
}
|
|
6226
|
+
|
|
6227
|
+
function patchElementPropsAndAttrs(vnode) {
|
|
6228
|
+
applyEventListeners(vnode);
|
|
6229
|
+
patchProps(null, vnode);
|
|
6230
|
+
}
|
|
6231
|
+
|
|
6232
|
+
function hasCorrectNodeType(vnode, node, nodeType) {
|
|
6233
|
+
if (getProperty$1(node, 'nodeType') !== nodeType) {
|
|
6234
|
+
|
|
6235
|
+
return false;
|
|
6236
|
+
}
|
|
6237
|
+
|
|
6238
|
+
return true;
|
|
6239
|
+
}
|
|
6240
|
+
|
|
6241
|
+
function isMatchingElement(vnode, elm) {
|
|
6242
|
+
if (vnode.sel.toLowerCase() !== getProperty$1(elm, 'tagName').toLowerCase()) {
|
|
6243
|
+
|
|
6244
|
+
return false;
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
var hasIncompatibleAttrs = validateAttrs(vnode, elm);
|
|
6248
|
+
var hasIncompatibleClass = validateClassAttr(vnode, elm);
|
|
6249
|
+
var hasIncompatibleStyle = validateStyleAttr(vnode, elm);
|
|
6250
|
+
return hasIncompatibleAttrs && hasIncompatibleClass && hasIncompatibleStyle;
|
|
6251
|
+
}
|
|
6252
|
+
|
|
6253
|
+
function validateAttrs(vnode, elm) {
|
|
6254
|
+
var _vnode$data$attrs = vnode.data.attrs,
|
|
6255
|
+
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
6256
|
+
var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
|
|
6257
|
+
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
6258
|
+
|
|
6259
|
+
for (var _i30 = 0, _Object$entries = Object.entries(attrs); _i30 < _Object$entries.length; _i30++) {
|
|
6260
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i30], 2),
|
|
6261
|
+
attrName = _Object$entries$_i[0],
|
|
6262
|
+
attrValue = _Object$entries$_i[1];
|
|
6263
|
+
|
|
6264
|
+
var elmAttrValue = getAttribute$1(elm, attrName);
|
|
6265
|
+
|
|
6266
|
+
if (String(attrValue) !== elmAttrValue) {
|
|
6267
|
+
|
|
6268
|
+
nodesAreCompatible = false;
|
|
6269
|
+
}
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6272
|
+
return nodesAreCompatible;
|
|
6273
|
+
}
|
|
6274
|
+
|
|
6275
|
+
function validateClassAttr(vnode, elm) {
|
|
6276
|
+
var _vnode$data = vnode.data,
|
|
6277
|
+
className = _vnode$data.className,
|
|
6278
|
+
classMap = _vnode$data.classMap;
|
|
6279
|
+
var nodesAreCompatible = true;
|
|
6280
|
+
|
|
6281
|
+
if (!isUndefined$1(className) && String(className) !== getProperty$1(elm, 'className')) {
|
|
6282
|
+
// className is used when class is bound to an expr.
|
|
6283
|
+
nodesAreCompatible = false;
|
|
6284
|
+
} else if (!isUndefined$1(classMap)) {
|
|
6285
|
+
// classMap is used when class is set to static value.
|
|
6286
|
+
var classList = getClassList$1(elm);
|
|
6287
|
+
var computedClassName = ''; // all classes from the vnode should be in the element.classList
|
|
6288
|
+
|
|
6289
|
+
for (var name in classMap) {
|
|
6290
|
+
computedClassName += ' ' + name;
|
|
6291
|
+
|
|
6292
|
+
if (!classList.contains(name)) {
|
|
6293
|
+
nodesAreCompatible = false;
|
|
6294
|
+
}
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6297
|
+
computedClassName.trim();
|
|
6298
|
+
|
|
6299
|
+
if (classList.length > keys(classMap).length) {
|
|
6300
|
+
nodesAreCompatible = false;
|
|
6301
|
+
}
|
|
6302
|
+
}
|
|
6303
|
+
|
|
6304
|
+
return nodesAreCompatible;
|
|
6305
|
+
}
|
|
6306
|
+
|
|
6307
|
+
function validateStyleAttr(vnode, elm) {
|
|
6308
|
+
var _vnode$data2 = vnode.data,
|
|
6309
|
+
style = _vnode$data2.style,
|
|
6310
|
+
styleDecls = _vnode$data2.styleDecls;
|
|
6311
|
+
var elmStyle = getAttribute$1(elm, 'style') || '';
|
|
6312
|
+
var nodesAreCompatible = true;
|
|
6313
|
+
|
|
6314
|
+
if (!isUndefined$1(style) && style !== elmStyle) {
|
|
6315
|
+
nodesAreCompatible = false;
|
|
6316
|
+
} else if (!isUndefined$1(styleDecls)) {
|
|
6317
|
+
var parsedVnodeStyle = parseStyleText(elmStyle);
|
|
6318
|
+
var expectedStyle = []; // styleMap is used when style is set to static value.
|
|
6319
|
+
|
|
6320
|
+
for (var _i31 = 0, n = styleDecls.length; _i31 < n; _i31++) {
|
|
6321
|
+
var _styleDecls$_i2 = _slicedToArray(styleDecls[_i31], 3),
|
|
6322
|
+
prop = _styleDecls$_i2[0],
|
|
6323
|
+
value = _styleDecls$_i2[1],
|
|
6324
|
+
important = _styleDecls$_i2[2];
|
|
6325
|
+
|
|
6326
|
+
expectedStyle.push("".concat(prop, ": ").concat(value + (important ? ' important!' : '')));
|
|
6327
|
+
var parsedPropValue = parsedVnodeStyle[prop];
|
|
6328
|
+
|
|
6329
|
+
if (isUndefined$1(parsedPropValue)) {
|
|
6330
|
+
nodesAreCompatible = false;
|
|
6331
|
+
} else if (!parsedPropValue.startsWith(value)) {
|
|
6332
|
+
nodesAreCompatible = false;
|
|
6333
|
+
} else if (important && !parsedPropValue.endsWith('!important')) {
|
|
6334
|
+
nodesAreCompatible = false;
|
|
6335
|
+
}
|
|
6336
|
+
}
|
|
6337
|
+
|
|
6338
|
+
if (keys(parsedVnodeStyle).length > styleDecls.length) {
|
|
6339
|
+
nodesAreCompatible = false;
|
|
6340
|
+
}
|
|
6341
|
+
|
|
6342
|
+
ArrayJoin.call(expectedStyle, ';');
|
|
6343
|
+
}
|
|
6344
|
+
|
|
6345
|
+
return nodesAreCompatible;
|
|
6346
|
+
}
|
|
6136
6347
|
/*
|
|
6137
6348
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
6138
6349
|
* All rights reserved.
|
|
@@ -6148,7 +6359,7 @@ var LWC = (function (exports) {
|
|
|
6148
6359
|
hooksAreSet = true;
|
|
6149
6360
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6150
6361
|
}
|
|
6151
|
-
/* version: 2.
|
|
6362
|
+
/* version: 2.11.3 */
|
|
6152
6363
|
|
|
6153
6364
|
/*
|
|
6154
6365
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6168,7 +6379,7 @@ var LWC = (function (exports) {
|
|
|
6168
6379
|
var supportsMutableAdoptedStyleSheets = supportsConstructableStyleSheets && getOwnPropertyDescriptor$1(document.adoptedStyleSheets, 'length').writable;
|
|
6169
6380
|
var styleElements = create(null);
|
|
6170
6381
|
var styleSheets = create(null);
|
|
6171
|
-
var
|
|
6382
|
+
var shadowRootsToStyleSheets = new WeakMap();
|
|
6172
6383
|
var getCustomElement;
|
|
6173
6384
|
var defineCustomElement;
|
|
6174
6385
|
var HTMLElementConstructor;
|
|
@@ -6220,24 +6431,26 @@ var LWC = (function (exports) {
|
|
|
6220
6431
|
styleSheets[content] = styleSheet;
|
|
6221
6432
|
}
|
|
6222
6433
|
|
|
6223
|
-
|
|
6434
|
+
var adoptedStyleSheets = target.adoptedStyleSheets;
|
|
6435
|
+
|
|
6436
|
+
if (!adoptedStyleSheets.includes(styleSheet)) {
|
|
6224
6437
|
if (supportsMutableAdoptedStyleSheets) {
|
|
6225
6438
|
// This is only supported in later versions of Chromium:
|
|
6226
6439
|
// https://chromestatus.com/feature/5638996492288000
|
|
6227
|
-
|
|
6440
|
+
adoptedStyleSheets.push(styleSheet);
|
|
6228
6441
|
} else {
|
|
6229
|
-
target.adoptedStyleSheets = [].concat(_toConsumableArray(
|
|
6442
|
+
target.adoptedStyleSheets = [].concat(_toConsumableArray(adoptedStyleSheets), [styleSheet]);
|
|
6230
6443
|
}
|
|
6231
6444
|
}
|
|
6232
6445
|
}
|
|
6233
6446
|
|
|
6234
6447
|
function insertStyleElement(content, target) {
|
|
6235
6448
|
// Avoid inserting duplicate `<style>`s
|
|
6236
|
-
var sheets =
|
|
6449
|
+
var sheets = shadowRootsToStyleSheets.get(target);
|
|
6237
6450
|
|
|
6238
6451
|
if (isUndefined$1(sheets)) {
|
|
6239
6452
|
sheets = create(null);
|
|
6240
|
-
|
|
6453
|
+
shadowRootsToStyleSheets.set(target, sheets);
|
|
6241
6454
|
}
|
|
6242
6455
|
|
|
6243
6456
|
if (sheets[content]) {
|
|
@@ -6533,7 +6746,7 @@ var LWC = (function (exports) {
|
|
|
6533
6746
|
}
|
|
6534
6747
|
|
|
6535
6748
|
function createVMWithProps(element, Ctor, props) {
|
|
6536
|
-
createVM(element, Ctor, {
|
|
6749
|
+
var vm = createVM(element, Ctor, {
|
|
6537
6750
|
mode: 'open',
|
|
6538
6751
|
owner: null,
|
|
6539
6752
|
tagName: element.tagName.toLowerCase()
|
|
@@ -6546,6 +6759,8 @@ var LWC = (function (exports) {
|
|
|
6546
6759
|
|
|
6547
6760
|
element[key] = value;
|
|
6548
6761
|
}
|
|
6762
|
+
|
|
6763
|
+
return vm;
|
|
6549
6764
|
}
|
|
6550
6765
|
|
|
6551
6766
|
function hydrateComponent(element, Ctor) {
|
|
@@ -6573,8 +6788,8 @@ var LWC = (function (exports) {
|
|
|
6573
6788
|
// Let the renderer know we are hydrating, so it does not replace the existing shadowRoot
|
|
6574
6789
|
// and uses the same algo to create the stylesheets as in SSR.
|
|
6575
6790
|
setIsHydrating(true);
|
|
6576
|
-
createVMWithProps(element, Ctor, props);
|
|
6577
|
-
|
|
6791
|
+
var vm = createVMWithProps(element, Ctor, props);
|
|
6792
|
+
hydrateRoot(vm); // set it back since now we finished hydration.
|
|
6578
6793
|
|
|
6579
6794
|
setIsHydrating(false);
|
|
6580
6795
|
} catch (e) {
|
|
@@ -6889,7 +7104,7 @@ var LWC = (function (exports) {
|
|
|
6889
7104
|
});
|
|
6890
7105
|
freeze(LightningElement);
|
|
6891
7106
|
seal(LightningElement.prototype);
|
|
6892
|
-
/* version: 2.
|
|
7107
|
+
/* version: 2.11.3 */
|
|
6893
7108
|
|
|
6894
7109
|
exports.LightningElement = LightningElement;
|
|
6895
7110
|
exports.__unstable__ProfilerControl = profilerControl;
|