lwc 2.13.0 → 2.13.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 +155 -145
- package/dist/engine-dom/iife/es2017/engine-dom.js +155 -145
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +143 -133
- package/dist/engine-dom/iife/es5/engine-dom.js +162 -142
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +144 -124
- package/dist/engine-dom/umd/es2017/engine-dom.js +155 -145
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +143 -133
- package/dist/engine-dom/umd/es5/engine-dom.js +162 -142
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +144 -124
- package/dist/engine-server/commonjs/es2017/engine-server.js +132 -124
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +132 -124
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +686 -686
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +697 -697
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +686 -686
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +697 -697
- 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.min.js +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +5 -5
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +5 -5
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +5 -5
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +5 -5
- package/package.json +7 -7
|
@@ -34,7 +34,7 @@ var LWC = (function (exports) {
|
|
|
34
34
|
return false;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function _construct(
|
|
37
|
+
function _construct(Parent1, args1, Class1) {
|
|
38
38
|
if (isNativeReflectConstruct()) {
|
|
39
39
|
_construct = Reflect.construct;
|
|
40
40
|
} else {
|
|
@@ -52,8 +52,8 @@ var LWC = (function (exports) {
|
|
|
52
52
|
return _construct.apply(null, arguments);
|
|
53
53
|
}
|
|
54
54
|
function _defineProperties(target, props) {
|
|
55
|
-
for(var
|
|
56
|
-
var descriptor = props[
|
|
55
|
+
for(var i2 = 0; i2 < props.length; i2++){
|
|
56
|
+
var descriptor = props[i2];
|
|
57
57
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
58
58
|
descriptor.configurable = true;
|
|
59
59
|
if ("value" in descriptor) descriptor.writable = true;
|
|
@@ -78,7 +78,7 @@ var LWC = (function (exports) {
|
|
|
78
78
|
}
|
|
79
79
|
return obj;
|
|
80
80
|
}
|
|
81
|
-
function _get(
|
|
81
|
+
function _get(target1, property1, receiver1) {
|
|
82
82
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
83
83
|
_get = Reflect.get;
|
|
84
84
|
} else {
|
|
@@ -92,13 +92,13 @@ var LWC = (function (exports) {
|
|
|
92
92
|
return desc.value;
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
return _get(
|
|
95
|
+
return _get(target1, property1, receiver1 || target1);
|
|
96
96
|
}
|
|
97
|
-
function _getPrototypeOf(
|
|
97
|
+
function _getPrototypeOf(o1) {
|
|
98
98
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
99
99
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
100
100
|
};
|
|
101
|
-
return _getPrototypeOf(
|
|
101
|
+
return _getPrototypeOf(o1);
|
|
102
102
|
}
|
|
103
103
|
function _inherits(subClass, superClass) {
|
|
104
104
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -126,7 +126,7 @@ var LWC = (function (exports) {
|
|
|
126
126
|
function _iterableToArray(iter) {
|
|
127
127
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
128
128
|
}
|
|
129
|
-
function _iterableToArrayLimit(arr,
|
|
129
|
+
function _iterableToArrayLimit(arr, i3) {
|
|
130
130
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
131
131
|
if (_i == null) return;
|
|
132
132
|
var _arr = [];
|
|
@@ -136,7 +136,7 @@ var LWC = (function (exports) {
|
|
|
136
136
|
try {
|
|
137
137
|
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
138
138
|
_arr.push(_s.value);
|
|
139
|
-
if (
|
|
139
|
+
if (i3 && _arr.length === i3) break;
|
|
140
140
|
}
|
|
141
141
|
} catch (err) {
|
|
142
142
|
_d = true;
|
|
@@ -162,15 +162,15 @@ var LWC = (function (exports) {
|
|
|
162
162
|
}
|
|
163
163
|
return _assertThisInitialized(self);
|
|
164
164
|
}
|
|
165
|
-
function _setPrototypeOf(
|
|
165
|
+
function _setPrototypeOf(o2, p1) {
|
|
166
166
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
167
167
|
o.__proto__ = p;
|
|
168
168
|
return o;
|
|
169
169
|
};
|
|
170
|
-
return _setPrototypeOf(
|
|
170
|
+
return _setPrototypeOf(o2, p1);
|
|
171
171
|
}
|
|
172
|
-
function _slicedToArray(arr,
|
|
173
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr,
|
|
172
|
+
function _slicedToArray(arr, i4) {
|
|
173
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i4) || _unsupportedIterableToArray(arr, i4) || _nonIterableRest();
|
|
174
174
|
}
|
|
175
175
|
function _superPropBase(object, property) {
|
|
176
176
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
@@ -194,7 +194,7 @@ var LWC = (function (exports) {
|
|
|
194
194
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
195
195
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
196
196
|
}
|
|
197
|
-
function _wrapNativeSuper(
|
|
197
|
+
function _wrapNativeSuper(Class2) {
|
|
198
198
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
199
199
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
200
200
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
@@ -218,7 +218,7 @@ var LWC = (function (exports) {
|
|
|
218
218
|
});
|
|
219
219
|
return _setPrototypeOf(Wrapper, Class);
|
|
220
220
|
};
|
|
221
|
-
return _wrapNativeSuper(
|
|
221
|
+
return _wrapNativeSuper(Class2);
|
|
222
222
|
}
|
|
223
223
|
function _isNativeReflectConstruct() {
|
|
224
224
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -573,9 +573,9 @@ var LWC = (function (exports) {
|
|
|
573
573
|
* SPDX-License-Identifier: MIT
|
|
574
574
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
575
575
|
*/ // Increment whenever the LWC template compiler changes
|
|
576
|
-
var LWC_VERSION = "2.13.
|
|
576
|
+
var LWC_VERSION = "2.13.3";
|
|
577
577
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
578
|
-
/** version: 2.13.
|
|
578
|
+
/** version: 2.13.3 */ /*
|
|
579
579
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
580
580
|
* All rights reserved.
|
|
581
581
|
* SPDX-License-Identifier: MIT
|
|
@@ -716,7 +716,7 @@ var LWC = (function (exports) {
|
|
|
716
716
|
setFeatureFlag(name, value);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
/** version: 2.13.
|
|
719
|
+
/** version: 2.13.3 */ /* proxy-compat-disable */ /*
|
|
720
720
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
721
721
|
* All rights reserved.
|
|
722
722
|
* SPDX-License-Identifier: MIT
|
|
@@ -750,7 +750,7 @@ var LWC = (function (exports) {
|
|
|
750
750
|
}
|
|
751
751
|
function guid() {
|
|
752
752
|
var s4 = function s4() {
|
|
753
|
-
return Math.floor((1 + Math.random()) *
|
|
753
|
+
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
754
754
|
};
|
|
755
755
|
return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
|
|
756
756
|
}
|
|
@@ -1195,6 +1195,18 @@ var LWC = (function (exports) {
|
|
|
1195
1195
|
function logWarn(message, vm10) {
|
|
1196
1196
|
log("warn", message, vm10);
|
|
1197
1197
|
}
|
|
1198
|
+
/*
|
|
1199
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
1200
|
+
* All rights reserved.
|
|
1201
|
+
* SPDX-License-Identifier: MIT
|
|
1202
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1203
|
+
*/ function resolveCircularModuleDependency(fn) {
|
|
1204
|
+
var module = fn();
|
|
1205
|
+
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
1206
|
+
}
|
|
1207
|
+
function isCircularModuleDependency(obj) {
|
|
1208
|
+
return isFunction$1(obj) && hasOwnProperty$1.call(obj, "__circular__");
|
|
1209
|
+
}
|
|
1198
1210
|
/*
|
|
1199
1211
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1200
1212
|
* All rights reserved.
|
|
@@ -2676,59 +2688,7 @@ var LWC = (function (exports) {
|
|
|
2676
2688
|
if (process.env.NODE_ENV !== "production") {
|
|
2677
2689
|
patchLightningElementPrototypeWithRestrictions(LightningElement.prototype);
|
|
2678
2690
|
}
|
|
2679
|
-
|
|
2680
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2681
|
-
* All rights reserved.
|
|
2682
|
-
* SPDX-License-Identifier: MIT
|
|
2683
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2684
|
-
*/ /**
|
|
2685
|
-
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2686
|
-
* LWC Components. This function implements the internals of this
|
|
2687
|
-
* decorator.
|
|
2688
|
-
*/ function wire(_adapter, _config) {
|
|
2689
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2690
|
-
assert.fail("@wire(adapter, config?) may only be used as a decorator.");
|
|
2691
|
-
}
|
|
2692
|
-
throw new Error();
|
|
2693
|
-
}
|
|
2694
|
-
function internalWireFieldDecorator(key) {
|
|
2695
|
-
return {
|
|
2696
|
-
get: function get1() {
|
|
2697
|
-
var vm = getAssociatedVM(this);
|
|
2698
|
-
componentValueObserved(vm, key);
|
|
2699
|
-
return vm.cmpFields[key];
|
|
2700
|
-
},
|
|
2701
|
-
set: function set1(value) {
|
|
2702
|
-
var vm = getAssociatedVM(this);
|
|
2703
|
-
/**
|
|
2704
|
-
* Reactivity for wired fields is provided in wiring.
|
|
2705
|
-
* We intentionally add reactivity here since this is just
|
|
2706
|
-
* letting the author to do the wrong thing, but it will keep our
|
|
2707
|
-
* system to be backward compatible.
|
|
2708
|
-
*/ if (value !== vm.cmpFields[key]) {
|
|
2709
|
-
vm.cmpFields[key] = value;
|
|
2710
|
-
componentValueMutated(vm, key);
|
|
2711
|
-
}
|
|
2712
|
-
},
|
|
2713
|
-
enumerable: true,
|
|
2714
|
-
configurable: true
|
|
2715
|
-
};
|
|
2716
|
-
}
|
|
2717
|
-
/*
|
|
2718
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2719
|
-
* All rights reserved.
|
|
2720
|
-
* SPDX-License-Identifier: MIT
|
|
2721
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2722
|
-
*/ function track(target) {
|
|
2723
|
-
if (arguments.length === 1) {
|
|
2724
|
-
return reactiveMembrane.getProxy(target);
|
|
2725
|
-
}
|
|
2726
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2727
|
-
assert.fail("@track decorator can only be used with one argument to return a trackable object, or as a decorator function.");
|
|
2728
|
-
}
|
|
2729
|
-
throw new Error();
|
|
2730
|
-
}
|
|
2731
|
-
function internalTrackDecorator(key) {
|
|
2691
|
+
function createObservedFieldPropertyDescriptor(key) {
|
|
2732
2692
|
return {
|
|
2733
2693
|
get: function get1() {
|
|
2734
2694
|
var vm = getAssociatedVM(this);
|
|
@@ -2737,14 +2697,8 @@ var LWC = (function (exports) {
|
|
|
2737
2697
|
},
|
|
2738
2698
|
set: function set1(newValue) {
|
|
2739
2699
|
var vm = getAssociatedVM(this);
|
|
2740
|
-
if (
|
|
2741
|
-
|
|
2742
|
-
assert.invariant(!isInvokingRender, "".concat(vmBeingRendered3, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2743
|
-
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(vmBeingRendered3, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2744
|
-
}
|
|
2745
|
-
var reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2746
|
-
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2747
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2700
|
+
if (newValue !== vm.cmpFields[key]) {
|
|
2701
|
+
vm.cmpFields[key] = newValue;
|
|
2748
2702
|
componentValueMutated(vm, key);
|
|
2749
2703
|
}
|
|
2750
2704
|
},
|
|
@@ -2779,9 +2733,9 @@ var LWC = (function (exports) {
|
|
|
2779
2733
|
set: function set1(newValue) {
|
|
2780
2734
|
var vm = getAssociatedVM(this);
|
|
2781
2735
|
if (process.env.NODE_ENV !== "production") {
|
|
2782
|
-
var
|
|
2783
|
-
assert.invariant(!isInvokingRender, "".concat(
|
|
2784
|
-
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(
|
|
2736
|
+
var vmBeingRendered3 = getVMBeingRendered();
|
|
2737
|
+
assert.invariant(!isInvokingRender, "".concat(vmBeingRendered3, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2738
|
+
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(vmBeingRendered3, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2785
2739
|
}
|
|
2786
2740
|
vm.cmpProps[key] = newValue;
|
|
2787
2741
|
componentValueMutated(vm, key);
|
|
@@ -2853,9 +2807,9 @@ var LWC = (function (exports) {
|
|
|
2853
2807
|
set: function set1(newValue) {
|
|
2854
2808
|
var vm = getAssociatedVM(this);
|
|
2855
2809
|
if (process.env.NODE_ENV !== "production") {
|
|
2856
|
-
var
|
|
2857
|
-
assert.invariant(!isInvokingRender, "".concat(
|
|
2858
|
-
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(
|
|
2810
|
+
var vmBeingRendered4 = getVMBeingRendered();
|
|
2811
|
+
assert.invariant(!isInvokingRender, "".concat(vmBeingRendered4, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2812
|
+
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(vmBeingRendered4, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2859
2813
|
}
|
|
2860
2814
|
if (set) {
|
|
2861
2815
|
if (runtimeFlags.ENABLE_REACTIVE_SETTER) {
|
|
@@ -2882,7 +2836,21 @@ var LWC = (function (exports) {
|
|
|
2882
2836
|
configurable: configurable
|
|
2883
2837
|
};
|
|
2884
2838
|
}
|
|
2885
|
-
|
|
2839
|
+
/*
|
|
2840
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2841
|
+
* All rights reserved.
|
|
2842
|
+
* SPDX-License-Identifier: MIT
|
|
2843
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2844
|
+
*/ function track(target) {
|
|
2845
|
+
if (arguments.length === 1) {
|
|
2846
|
+
return reactiveMembrane.getProxy(target);
|
|
2847
|
+
}
|
|
2848
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2849
|
+
assert.fail("@track decorator can only be used with one argument to return a trackable object, or as a decorator function.");
|
|
2850
|
+
}
|
|
2851
|
+
throw new Error();
|
|
2852
|
+
}
|
|
2853
|
+
function internalTrackDecorator(key) {
|
|
2886
2854
|
return {
|
|
2887
2855
|
get: function get1() {
|
|
2888
2856
|
var vm = getAssociatedVM(this);
|
|
@@ -2891,8 +2859,52 @@ var LWC = (function (exports) {
|
|
|
2891
2859
|
},
|
|
2892
2860
|
set: function set1(newValue) {
|
|
2893
2861
|
var vm = getAssociatedVM(this);
|
|
2894
|
-
if (
|
|
2895
|
-
|
|
2862
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2863
|
+
var vmBeingRendered5 = getVMBeingRendered();
|
|
2864
|
+
assert.invariant(!isInvokingRender, "".concat(vmBeingRendered5, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2865
|
+
assert.invariant(!isUpdatingTemplate, "Updating the template of ".concat(vmBeingRendered5, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2866
|
+
}
|
|
2867
|
+
var reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2868
|
+
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2869
|
+
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2870
|
+
componentValueMutated(vm, key);
|
|
2871
|
+
}
|
|
2872
|
+
},
|
|
2873
|
+
enumerable: true,
|
|
2874
|
+
configurable: true
|
|
2875
|
+
};
|
|
2876
|
+
}
|
|
2877
|
+
/*
|
|
2878
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2879
|
+
* All rights reserved.
|
|
2880
|
+
* SPDX-License-Identifier: MIT
|
|
2881
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2882
|
+
*/ /**
|
|
2883
|
+
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2884
|
+
* LWC Components. This function implements the internals of this
|
|
2885
|
+
* decorator.
|
|
2886
|
+
*/ function wire(_adapter, _config) {
|
|
2887
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2888
|
+
assert.fail("@wire(adapter, config?) may only be used as a decorator.");
|
|
2889
|
+
}
|
|
2890
|
+
throw new Error();
|
|
2891
|
+
}
|
|
2892
|
+
function internalWireFieldDecorator(key) {
|
|
2893
|
+
return {
|
|
2894
|
+
get: function get1() {
|
|
2895
|
+
var vm = getAssociatedVM(this);
|
|
2896
|
+
componentValueObserved(vm, key);
|
|
2897
|
+
return vm.cmpFields[key];
|
|
2898
|
+
},
|
|
2899
|
+
set: function set1(value) {
|
|
2900
|
+
var vm = getAssociatedVM(this);
|
|
2901
|
+
/**
|
|
2902
|
+
* Reactivity for wired fields is provided in wiring.
|
|
2903
|
+
* We intentionally add reactivity here since this is just
|
|
2904
|
+
* letting the author to do the wrong thing, but it will keep our
|
|
2905
|
+
* system to be backward compatible.
|
|
2906
|
+
*/ if (value !== vm.cmpFields[key]) {
|
|
2907
|
+
vm.cmpFields[key] = value;
|
|
2896
2908
|
componentValueMutated(vm, key);
|
|
2897
2909
|
}
|
|
2898
2910
|
},
|
|
@@ -3132,7 +3144,12 @@ var LWC = (function (exports) {
|
|
|
3132
3144
|
}
|
|
3133
3145
|
}
|
|
3134
3146
|
}
|
|
3135
|
-
|
|
3147
|
+
/*
|
|
3148
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
3149
|
+
* All rights reserved.
|
|
3150
|
+
* SPDX-License-Identifier: MIT
|
|
3151
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3152
|
+
*/ var signedTemplateSet = new Set();
|
|
3136
3153
|
function defaultEmptyTemplate() {
|
|
3137
3154
|
return [];
|
|
3138
3155
|
}
|
|
@@ -3148,6 +3165,30 @@ var LWC = (function (exports) {
|
|
|
3148
3165
|
checkVersionMismatch(tpl, "template");
|
|
3149
3166
|
}
|
|
3150
3167
|
signedTemplateSet.add(tpl);
|
|
3168
|
+
// FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
|
|
3169
|
+
// the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
|
|
3170
|
+
// on top of stylesheetToken for anyone who is accessing the old internal API.
|
|
3171
|
+
// Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
3172
|
+
defineProperty(tpl, "stylesheetTokens", {
|
|
3173
|
+
get: function get1() {
|
|
3174
|
+
var stylesheetToken = this.stylesheetToken;
|
|
3175
|
+
if (isUndefined$1(stylesheetToken)) {
|
|
3176
|
+
return stylesheetToken;
|
|
3177
|
+
}
|
|
3178
|
+
// Shim for the old `stylesheetTokens` property
|
|
3179
|
+
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
3180
|
+
return {
|
|
3181
|
+
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
3182
|
+
shadowAttribute: stylesheetToken
|
|
3183
|
+
};
|
|
3184
|
+
},
|
|
3185
|
+
set: function set1(value) {
|
|
3186
|
+
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
3187
|
+
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
3188
|
+
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
3189
|
+
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
3151
3192
|
// chaining this method as a way to wrap existing
|
|
3152
3193
|
// assignment of templates easily, without too much transformation
|
|
3153
3194
|
return tpl;
|
|
@@ -3311,18 +3352,6 @@ var LWC = (function (exports) {
|
|
|
3311
3352
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor$1, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
3312
3353
|
freeze(BaseBridgeElement);
|
|
3313
3354
|
seal(BaseBridgeElement.prototype);
|
|
3314
|
-
/*
|
|
3315
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
3316
|
-
* All rights reserved.
|
|
3317
|
-
* SPDX-License-Identifier: MIT
|
|
3318
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3319
|
-
*/ function resolveCircularModuleDependency(fn) {
|
|
3320
|
-
var module = fn();
|
|
3321
|
-
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
3322
|
-
}
|
|
3323
|
-
function isCircularModuleDependency(obj) {
|
|
3324
|
-
return isFunction$1(obj) && hasOwnProperty$1.call(obj, "__circular__");
|
|
3325
|
-
}
|
|
3326
3355
|
/*
|
|
3327
3356
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
3328
3357
|
* All rights reserved.
|
|
@@ -5543,14 +5572,8 @@ var LWC = (function (exports) {
|
|
|
5543
5572
|
}
|
|
5544
5573
|
resetComponentStateWhenRemoved(vm);
|
|
5545
5574
|
}
|
|
5546
|
-
function getNearestShadowAncestor(vm) {
|
|
5547
|
-
var ancestor = vm.owner;
|
|
5548
|
-
while(!isNull(ancestor) && ancestor.renderMode === 0){
|
|
5549
|
-
ancestor = ancestor.owner;
|
|
5550
|
-
}
|
|
5551
|
-
return ancestor;
|
|
5552
|
-
}
|
|
5553
5575
|
function createVM(elm, ctor, options) {
|
|
5576
|
+
var _a;
|
|
5554
5577
|
var mode = options.mode, owner = options.owner, tagName = options.tagName;
|
|
5555
5578
|
var def = getComponentInternalDef(ctor);
|
|
5556
5579
|
var vm = {
|
|
@@ -5572,6 +5595,8 @@ var LWC = (function (exports) {
|
|
|
5572
5595
|
oar: create(null),
|
|
5573
5596
|
cmpTemplate: null,
|
|
5574
5597
|
renderMode: def.renderMode,
|
|
5598
|
+
shadowMode: computeShadowMode(def, owner),
|
|
5599
|
+
nearestShadowMode: (owner === null || owner === void 0 ? void 0 : owner.shadowRoot) ? owner.shadowMode : (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : null,
|
|
5575
5600
|
context: {
|
|
5576
5601
|
stylesheetToken: undefined,
|
|
5577
5602
|
hasTokenInClass: undefined,
|
|
@@ -5584,7 +5609,6 @@ var LWC = (function (exports) {
|
|
|
5584
5609
|
},
|
|
5585
5610
|
// Properties set right after VM creation.
|
|
5586
5611
|
tro: null,
|
|
5587
|
-
shadowMode: null,
|
|
5588
5612
|
// Properties set by the LightningElement constructor.
|
|
5589
5613
|
component: null,
|
|
5590
5614
|
shadowRoot: null,
|
|
@@ -5593,7 +5617,6 @@ var LWC = (function (exports) {
|
|
|
5593
5617
|
setHook: setHook,
|
|
5594
5618
|
getHook: getHook
|
|
5595
5619
|
};
|
|
5596
|
-
vm.shadowMode = computeShadowMode(vm);
|
|
5597
5620
|
vm.tro = getTemplateReactiveObserver(vm);
|
|
5598
5621
|
if (process.env.NODE_ENV !== "production") {
|
|
5599
5622
|
vm.toString = function() {
|
|
@@ -5609,8 +5632,8 @@ var LWC = (function (exports) {
|
|
|
5609
5632
|
}
|
|
5610
5633
|
return vm;
|
|
5611
5634
|
}
|
|
5612
|
-
function computeShadowMode(
|
|
5613
|
-
var
|
|
5635
|
+
function computeShadowMode(def, owner) {
|
|
5636
|
+
var _a;
|
|
5614
5637
|
var shadowMode;
|
|
5615
5638
|
if (isSyntheticShadowDefined$1) {
|
|
5616
5639
|
if (def.renderMode === 0) {
|
|
@@ -5624,16 +5647,11 @@ var LWC = (function (exports) {
|
|
|
5624
5647
|
if (def.shadowSupportMode === "any") {
|
|
5625
5648
|
shadowMode = 0 /* Native */ ;
|
|
5626
5649
|
} else {
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
} else {
|
|
5633
|
-
// Synthetic if neither this component nor any of its ancestors are configured
|
|
5634
|
-
// to be native.
|
|
5635
|
-
shadowMode = 1 /* Synthetic */ ;
|
|
5636
|
-
}
|
|
5650
|
+
// Transitive support for native Shadow DOM. A component in native mode
|
|
5651
|
+
// transitively opts all of its descendants into native.
|
|
5652
|
+
// Synthetic if neither this component nor any of its ancestors are configured
|
|
5653
|
+
// to be native.
|
|
5654
|
+
shadowMode = (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : 1 /* Synthetic */ ;
|
|
5637
5655
|
}
|
|
5638
5656
|
} else {
|
|
5639
5657
|
shadowMode = 1 /* Synthetic */ ;
|
|
@@ -6524,7 +6542,27 @@ var LWC = (function (exports) {
|
|
|
6524
6542
|
hooksAreSet = true;
|
|
6525
6543
|
setSanitizeHtmlContentHook(hooks1.sanitizeHtmlContent);
|
|
6526
6544
|
}
|
|
6527
|
-
/*
|
|
6545
|
+
/*
|
|
6546
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6547
|
+
* All rights reserved.
|
|
6548
|
+
* SPDX-License-Identifier: MIT
|
|
6549
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6550
|
+
*/ /**
|
|
6551
|
+
* EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
|
|
6552
|
+
* This API is subject to change or being removed.
|
|
6553
|
+
*/ function getComponentConstructor(elm) {
|
|
6554
|
+
var ctor = null;
|
|
6555
|
+
// intentionally checking for undefined due to some funky libraries patching weakmap.get
|
|
6556
|
+
// to throw when undefined.
|
|
6557
|
+
if (!isUndefined$1(elm)) {
|
|
6558
|
+
var vm = getAssociatedVMIfPresent(elm);
|
|
6559
|
+
if (!isUndefined$1(vm)) {
|
|
6560
|
+
ctor = vm.def.ctor;
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
return ctor;
|
|
6564
|
+
}
|
|
6565
|
+
/* version: 2.13.3 */ /*
|
|
6528
6566
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
6529
6567
|
* All rights reserved.
|
|
6530
6568
|
* SPDX-License-Identifier: MIT
|
|
@@ -7097,24 +7135,6 @@ var LWC = (function (exports) {
|
|
|
7097
7135
|
}
|
|
7098
7136
|
return element;
|
|
7099
7137
|
}
|
|
7100
|
-
/*
|
|
7101
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
7102
|
-
* All rights reserved.
|
|
7103
|
-
* SPDX-License-Identifier: MIT
|
|
7104
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
7105
|
-
*/ /**
|
|
7106
|
-
* EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
|
|
7107
|
-
* This API is subject to change or being removed.
|
|
7108
|
-
*/ function getComponentConstructor(elm) {
|
|
7109
|
-
var ctor = null;
|
|
7110
|
-
if (_instanceof(elm, HTMLElement)) {
|
|
7111
|
-
var vm = getAssociatedVMIfPresent(elm);
|
|
7112
|
-
if (!isUndefined$1(vm)) {
|
|
7113
|
-
ctor = vm.def.ctor;
|
|
7114
|
-
}
|
|
7115
|
-
}
|
|
7116
|
-
return ctor;
|
|
7117
|
-
}
|
|
7118
7138
|
/*
|
|
7119
7139
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
7120
7140
|
* All rights reserved.
|