lwc 2.32.0 → 2.32.1
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 +222 -249
- package/dist/engine-dom/iife/es2017/engine-dom.js +222 -249
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +94 -145
- package/dist/engine-dom/iife/es5/engine-dom.js +211 -226
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +120 -183
- package/dist/engine-dom/umd/es2017/engine-dom.js +222 -249
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +94 -145
- package/dist/engine-dom/umd/es5/engine-dom.js +211 -226
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +120 -183
- package/dist/engine-server/commonjs/es2017/engine-server.js +218 -224
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +218 -224
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +644 -882
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +85 -345
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +85 -345
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +676 -909
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +644 -882
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +85 -345
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +85 -345
- 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
|
@@ -4,8 +4,6 @@ var LWC = (function (exports) {
|
|
|
4
4
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf2(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
5
5
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
6
6
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
7
|
-
function _get2() { if (typeof Reflect !== "undefined" && Reflect.get) { _get2 = Reflect.get.bind(); } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get2.apply(this, arguments); }
|
|
8
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf2(object); if (object === null) break; } return object; }
|
|
9
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
8
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -328,7 +326,7 @@ var LWC = (function (exports) {
|
|
|
328
326
|
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
329
327
|
return propertyName;
|
|
330
328
|
}
|
|
331
|
-
/** version: 2.32.
|
|
329
|
+
/** version: 2.32.1 */
|
|
332
330
|
|
|
333
331
|
/**
|
|
334
332
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -409,7 +407,7 @@ var LWC = (function (exports) {
|
|
|
409
407
|
patch$1(propName);
|
|
410
408
|
}
|
|
411
409
|
}
|
|
412
|
-
/** version: 2.32.
|
|
410
|
+
/** version: 2.32.1 */
|
|
413
411
|
|
|
414
412
|
/**
|
|
415
413
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -423,19 +421,14 @@ var LWC = (function (exports) {
|
|
|
423
421
|
*/
|
|
424
422
|
var features = {
|
|
425
423
|
DUMMY_TEST_FLAG: null,
|
|
426
|
-
ENABLE_ELEMENT_PATCH: null,
|
|
427
424
|
ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
|
|
428
|
-
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
429
|
-
ENABLE_INNER_OUTER_TEXT_PATCH: null,
|
|
430
425
|
ENABLE_MIXED_SHADOW_MODE: null,
|
|
431
426
|
ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: null,
|
|
432
|
-
ENABLE_NODE_LIST_PATCH: null,
|
|
433
|
-
ENABLE_NODE_PATCH: null,
|
|
434
|
-
ENABLE_REACTIVE_SETTER: null,
|
|
435
427
|
ENABLE_WIRE_SYNC_EMIT: null,
|
|
436
428
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
437
429
|
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
438
|
-
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null
|
|
430
|
+
ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY: null,
|
|
431
|
+
ENABLE_FROZEN_TEMPLATE: null
|
|
439
432
|
};
|
|
440
433
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
441
434
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
@@ -1853,56 +1846,6 @@ var LWC = (function (exports) {
|
|
|
1853
1846
|
configurable: true
|
|
1854
1847
|
};
|
|
1855
1848
|
}
|
|
1856
|
-
var AccessorReactiveObserver = /*#__PURE__*/function (_ReactiveObserver) {
|
|
1857
|
-
_inherits(AccessorReactiveObserver, _ReactiveObserver);
|
|
1858
|
-
var _super3 = _createSuper(AccessorReactiveObserver);
|
|
1859
|
-
function AccessorReactiveObserver(vm, set) {
|
|
1860
|
-
var _this2;
|
|
1861
|
-
_classCallCheck(this, AccessorReactiveObserver);
|
|
1862
|
-
_this2 = _super3.call(this, function () {
|
|
1863
|
-
if (isFalse(_this2.debouncing)) {
|
|
1864
|
-
_this2.debouncing = true;
|
|
1865
|
-
addCallbackToNextTick(function () {
|
|
1866
|
-
if (isTrue(_this2.debouncing)) {
|
|
1867
|
-
var _assertThisInitialize = _assertThisInitialized(_this2),
|
|
1868
|
-
value = _assertThisInitialize.value;
|
|
1869
|
-
var dirtyStateBeforeSetterCall = vm.isDirty,
|
|
1870
|
-
component = vm.component,
|
|
1871
|
-
_idx = vm.idx;
|
|
1872
|
-
set.call(component, value);
|
|
1873
|
-
// de-bouncing after the call to the original setter to prevent
|
|
1874
|
-
// infinity loop if the setter itself is mutating things that
|
|
1875
|
-
// were accessed during the previous invocation.
|
|
1876
|
-
_this2.debouncing = false;
|
|
1877
|
-
if (isTrue(vm.isDirty) && isFalse(dirtyStateBeforeSetterCall) && _idx > 0) {
|
|
1878
|
-
// immediate rehydration due to a setter driven mutation, otherwise
|
|
1879
|
-
// the component will get rendered on the second tick, which it is not
|
|
1880
|
-
// desirable.
|
|
1881
|
-
rerenderVM(vm);
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
});
|
|
1887
|
-
_this2.debouncing = false;
|
|
1888
|
-
return _this2;
|
|
1889
|
-
}
|
|
1890
|
-
_createClass(AccessorReactiveObserver, [{
|
|
1891
|
-
key: "reset",
|
|
1892
|
-
value: function reset(value) {
|
|
1893
|
-
_get2(_getPrototypeOf2(AccessorReactiveObserver.prototype), "reset", this).call(this);
|
|
1894
|
-
this.debouncing = false;
|
|
1895
|
-
if (arguments.length > 0) {
|
|
1896
|
-
this.value = value;
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
}]);
|
|
1900
|
-
return AccessorReactiveObserver;
|
|
1901
|
-
}(ReactiveObserver);
|
|
1902
|
-
function createAccessorReactiveObserver(vm, set) {
|
|
1903
|
-
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1904
|
-
return new AccessorReactiveObserver(vm, set);
|
|
1905
|
-
}
|
|
1906
1849
|
|
|
1907
1850
|
/*
|
|
1908
1851
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1933,37 +1876,21 @@ var LWC = (function (exports) {
|
|
|
1933
1876
|
};
|
|
1934
1877
|
}
|
|
1935
1878
|
function createPublicAccessorDescriptor(key, descriptor) {
|
|
1936
|
-
var
|
|
1879
|
+
var _get2 = descriptor.get,
|
|
1937
1880
|
_set2 = descriptor.set,
|
|
1938
1881
|
enumerable = descriptor.enumerable,
|
|
1939
1882
|
configurable = descriptor.configurable;
|
|
1940
|
-
if (!isFunction$1(
|
|
1883
|
+
if (!isFunction$1(_get2)) {
|
|
1941
1884
|
throw new Error();
|
|
1942
1885
|
}
|
|
1943
1886
|
return {
|
|
1944
1887
|
get: function get() {
|
|
1945
|
-
return
|
|
1888
|
+
return _get2.call(this);
|
|
1946
1889
|
},
|
|
1947
1890
|
set: function set(newValue) {
|
|
1948
|
-
|
|
1949
|
-
var vm = getAssociatedVM(this);
|
|
1891
|
+
getAssociatedVM(this);
|
|
1950
1892
|
if (_set2) {
|
|
1951
|
-
|
|
1952
|
-
var ro = vm.oar[key];
|
|
1953
|
-
if (isUndefined$1(ro)) {
|
|
1954
|
-
ro = vm.oar[key] = createAccessorReactiveObserver(vm, _set2);
|
|
1955
|
-
}
|
|
1956
|
-
// every time we invoke this setter from outside (through this wrapper setter)
|
|
1957
|
-
// we should reset the value and then debounce just in case there is a pending
|
|
1958
|
-
// invocation the next tick that is not longer relevant since the value is changing
|
|
1959
|
-
// from outside.
|
|
1960
|
-
ro.reset(newValue);
|
|
1961
|
-
ro.observe(function () {
|
|
1962
|
-
_set2.call(_this3, newValue);
|
|
1963
|
-
});
|
|
1964
|
-
} else {
|
|
1965
|
-
_set2.call(this, newValue);
|
|
1966
|
-
}
|
|
1893
|
+
_set2.call(this, newValue);
|
|
1967
1894
|
}
|
|
1968
1895
|
},
|
|
1969
1896
|
enumerable: enumerable,
|
|
@@ -2155,13 +2082,6 @@ var LWC = (function (exports) {
|
|
|
2155
2082
|
var meta = signedDecoratorToMetaMap.get(Ctor);
|
|
2156
2083
|
return isUndefined$1(meta) ? defaultMeta : meta;
|
|
2157
2084
|
}
|
|
2158
|
-
|
|
2159
|
-
/*
|
|
2160
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2161
|
-
* All rights reserved.
|
|
2162
|
-
* SPDX-License-Identifier: MIT
|
|
2163
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2164
|
-
*/
|
|
2165
2085
|
var signedTemplateSet = new Set();
|
|
2166
2086
|
function defaultEmptyTemplate() {
|
|
2167
2087
|
return [];
|
|
@@ -2176,32 +2096,6 @@ var LWC = (function (exports) {
|
|
|
2176
2096
|
*/
|
|
2177
2097
|
function registerTemplate(tpl) {
|
|
2178
2098
|
signedTemplateSet.add(tpl);
|
|
2179
|
-
// FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
|
|
2180
|
-
// the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
|
|
2181
|
-
// on top of stylesheetToken for anyone who is accessing the old internal API.
|
|
2182
|
-
// Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
2183
|
-
defineProperty(tpl, 'stylesheetTokens', {
|
|
2184
|
-
enumerable: true,
|
|
2185
|
-
configurable: true,
|
|
2186
|
-
get: function get() {
|
|
2187
|
-
var stylesheetToken = this.stylesheetToken;
|
|
2188
|
-
if (isUndefined$1(stylesheetToken)) {
|
|
2189
|
-
return stylesheetToken;
|
|
2190
|
-
}
|
|
2191
|
-
// Shim for the old `stylesheetTokens` property
|
|
2192
|
-
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
2193
|
-
return {
|
|
2194
|
-
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
2195
|
-
shadowAttribute: stylesheetToken
|
|
2196
|
-
};
|
|
2197
|
-
},
|
|
2198
|
-
set: function set(value) {
|
|
2199
|
-
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
2200
|
-
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
2201
|
-
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
2202
|
-
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
2203
|
-
}
|
|
2204
|
-
});
|
|
2205
2099
|
// chaining this method as a way to wrap existing
|
|
2206
2100
|
// assignment of templates easily, without too much transformation
|
|
2207
2101
|
return tpl;
|
|
@@ -2302,10 +2196,10 @@ var LWC = (function (exports) {
|
|
|
2302
2196
|
if (isFunction$1(SuperClass)) {
|
|
2303
2197
|
HTMLBridgeElement = /*#__PURE__*/function (_SuperClass) {
|
|
2304
2198
|
_inherits(HTMLBridgeElement, _SuperClass);
|
|
2305
|
-
var
|
|
2199
|
+
var _super3 = _createSuper(HTMLBridgeElement);
|
|
2306
2200
|
function HTMLBridgeElement() {
|
|
2307
2201
|
_classCallCheck(this, HTMLBridgeElement);
|
|
2308
|
-
return
|
|
2202
|
+
return _super3.apply(this, arguments);
|
|
2309
2203
|
}
|
|
2310
2204
|
return _createClass(HTMLBridgeElement);
|
|
2311
2205
|
}(SuperClass);
|
|
@@ -3774,7 +3668,7 @@ var LWC = (function (exports) {
|
|
|
3774
3668
|
// undefined is for root components, but root components cannot accept slotted content
|
|
3775
3669
|
setVMBeingRendered(slotset.owner);
|
|
3776
3670
|
try {
|
|
3777
|
-
ArrayPush$1.
|
|
3671
|
+
ArrayPush$1.call(newChildren, vnode.factory(data.slotData, data.key));
|
|
3778
3672
|
} finally {
|
|
3779
3673
|
setVMBeingRendered(vmBeingRenderedInception);
|
|
3780
3674
|
}
|
|
@@ -4467,14 +4361,9 @@ var LWC = (function (exports) {
|
|
|
4467
4361
|
function resetComponentStateWhenRemoved(vm) {
|
|
4468
4362
|
var state = vm.state;
|
|
4469
4363
|
if (state !== 2 /* VMState.disconnected */) {
|
|
4470
|
-
var
|
|
4471
|
-
tro = vm.tro;
|
|
4364
|
+
var tro = vm.tro;
|
|
4472
4365
|
// Making sure that any observing record will not trigger the rehydrated on this vm
|
|
4473
4366
|
tro.reset();
|
|
4474
|
-
// Making sure that any observing accessor record will not trigger the setter to be reinvoked
|
|
4475
|
-
for (var key in oar) {
|
|
4476
|
-
oar[key].reset();
|
|
4477
|
-
}
|
|
4478
4367
|
runDisconnectedCallback(vm);
|
|
4479
4368
|
// Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
|
|
4480
4369
|
runChildNodesDisconnectedCallback(vm);
|
|
@@ -4519,7 +4408,6 @@ var LWC = (function (exports) {
|
|
|
4519
4408
|
cmpSlots: {
|
|
4520
4409
|
slotAssignments: create(null)
|
|
4521
4410
|
},
|
|
4522
|
-
oar: create(null),
|
|
4523
4411
|
cmpTemplate: null,
|
|
4524
4412
|
hydrated: Boolean(hydrated),
|
|
4525
4413
|
renderMode: def.renderMode,
|
|
@@ -4862,17 +4750,17 @@ var LWC = (function (exports) {
|
|
|
4862
4750
|
var WireMetaMap = new Map();
|
|
4863
4751
|
var WireContextRegistrationEvent = /*#__PURE__*/function (_CustomEvent) {
|
|
4864
4752
|
_inherits(WireContextRegistrationEvent, _CustomEvent);
|
|
4865
|
-
var
|
|
4753
|
+
var _super4 = _createSuper(WireContextRegistrationEvent);
|
|
4866
4754
|
function WireContextRegistrationEvent(adapterToken, _ref4) {
|
|
4867
|
-
var
|
|
4755
|
+
var _this2;
|
|
4868
4756
|
var setNewContext = _ref4.setNewContext,
|
|
4869
4757
|
setDisconnectedCallback = _ref4.setDisconnectedCallback;
|
|
4870
4758
|
_classCallCheck(this, WireContextRegistrationEvent);
|
|
4871
|
-
|
|
4759
|
+
_this2 = _super4.call(this, adapterToken, {
|
|
4872
4760
|
bubbles: true,
|
|
4873
4761
|
composed: true
|
|
4874
4762
|
});
|
|
4875
|
-
defineProperties(_assertThisInitialized(
|
|
4763
|
+
defineProperties(_assertThisInitialized(_this2), {
|
|
4876
4764
|
setNewContext: {
|
|
4877
4765
|
value: setNewContext
|
|
4878
4766
|
},
|
|
@@ -4880,7 +4768,7 @@ var LWC = (function (exports) {
|
|
|
4880
4768
|
value: setDisconnectedCallback
|
|
4881
4769
|
}
|
|
4882
4770
|
});
|
|
4883
|
-
return
|
|
4771
|
+
return _this2;
|
|
4884
4772
|
}
|
|
4885
4773
|
return _createClass(WireContextRegistrationEvent);
|
|
4886
4774
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
@@ -5528,9 +5416,58 @@ var LWC = (function (exports) {
|
|
|
5528
5416
|
hooksAreSet = true;
|
|
5529
5417
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
5530
5418
|
}
|
|
5531
|
-
//
|
|
5532
|
-
|
|
5419
|
+
// Deeply freeze the entire array (of arrays) of stylesheet factory functions
|
|
5420
|
+
function deepFreeze(stylesheets) {
|
|
5421
|
+
traverseStylesheets(stylesheets, function (subStylesheets) {
|
|
5422
|
+
freeze(subStylesheets);
|
|
5423
|
+
});
|
|
5424
|
+
}
|
|
5425
|
+
// Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
|
|
5426
|
+
function traverseStylesheets(stylesheets, callback) {
|
|
5427
|
+
callback(stylesheets);
|
|
5428
|
+
for (var _i33 = 0; _i33 < stylesheets.length; _i33++) {
|
|
5429
|
+
var stylesheet = stylesheets[_i33];
|
|
5430
|
+
if (isArray$1(stylesheet)) {
|
|
5431
|
+
traverseStylesheets(stylesheet, callback);
|
|
5432
|
+
} else {
|
|
5433
|
+
callback(stylesheet);
|
|
5434
|
+
}
|
|
5435
|
+
}
|
|
5436
|
+
}
|
|
5533
5437
|
function freezeTemplate(tmpl) {
|
|
5438
|
+
if (lwcRuntimeFlags.ENABLE_FROZEN_TEMPLATE) {
|
|
5439
|
+
// Deep freeze the template
|
|
5440
|
+
freeze(tmpl);
|
|
5441
|
+
if (!isUndefined$1(tmpl.stylesheets)) {
|
|
5442
|
+
deepFreeze(tmpl.stylesheets);
|
|
5443
|
+
}
|
|
5444
|
+
} else {
|
|
5445
|
+
// TODO [#2782]: remove this flag and delete the legacy behavior
|
|
5446
|
+
// When ENABLE_FROZEN_TEMPLATE is false, then we shim stylesheetTokens on top of stylesheetToken for anyone who
|
|
5447
|
+
// is accessing the old internal API (backwards compat). Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
5448
|
+
defineProperty(tmpl, 'stylesheetTokens', {
|
|
5449
|
+
enumerable: true,
|
|
5450
|
+
configurable: true,
|
|
5451
|
+
get: function get() {
|
|
5452
|
+
var stylesheetToken = this.stylesheetToken;
|
|
5453
|
+
if (isUndefined$1(stylesheetToken)) {
|
|
5454
|
+
return stylesheetToken;
|
|
5455
|
+
}
|
|
5456
|
+
// Shim for the old `stylesheetTokens` property
|
|
5457
|
+
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
5458
|
+
return {
|
|
5459
|
+
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
5460
|
+
shadowAttribute: stylesheetToken
|
|
5461
|
+
};
|
|
5462
|
+
},
|
|
5463
|
+
set: function set(value) {
|
|
5464
|
+
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
5465
|
+
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
5466
|
+
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
5467
|
+
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
5468
|
+
}
|
|
5469
|
+
});
|
|
5470
|
+
}
|
|
5534
5471
|
}
|
|
5535
5472
|
|
|
5536
5473
|
/*
|
|
@@ -5705,10 +5642,10 @@ var LWC = (function (exports) {
|
|
|
5705
5642
|
// which are not equipped to be initialized that way.
|
|
5706
5643
|
var clazz = /*#__PURE__*/function (_HTMLElementAlias) {
|
|
5707
5644
|
_inherits(clazz, _HTMLElementAlias);
|
|
5708
|
-
var
|
|
5645
|
+
var _super5 = _createSuper(clazz);
|
|
5709
5646
|
function clazz() {
|
|
5710
5647
|
_classCallCheck(this, clazz);
|
|
5711
|
-
return
|
|
5648
|
+
return _super5.apply(this, arguments);
|
|
5712
5649
|
}
|
|
5713
5650
|
return _createClass(clazz);
|
|
5714
5651
|
}(HTMLElementAlias);
|
|
@@ -5754,24 +5691,24 @@ var LWC = (function (exports) {
|
|
|
5754
5691
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
5755
5692
|
var UpgradableConstructor = /*#__PURE__*/function (_HTMLElement) {
|
|
5756
5693
|
_inherits(UpgradableConstructor, _HTMLElement);
|
|
5757
|
-
var
|
|
5694
|
+
var _super6 = _createSuper(UpgradableConstructor);
|
|
5758
5695
|
function UpgradableConstructor(upgradeCallback) {
|
|
5759
|
-
var
|
|
5696
|
+
var _this3;
|
|
5760
5697
|
_classCallCheck(this, UpgradableConstructor);
|
|
5761
|
-
|
|
5698
|
+
_this3 = _super6.call(this);
|
|
5762
5699
|
// If the element is not created using lwc.createElement(), e.g. `document.createElement('x-foo')`,
|
|
5763
5700
|
// then elementBeingUpgraded will be false
|
|
5764
5701
|
if (elementBeingUpgradedByLWC) {
|
|
5765
|
-
upgradeCallback(_assertThisInitialized(
|
|
5702
|
+
upgradeCallback(_assertThisInitialized(_this3));
|
|
5766
5703
|
} else if (hasConnectedCallback || hasDisconnectedCallback) {
|
|
5767
5704
|
// If this element has connected or disconnected callbacks, then we need to keep track of
|
|
5768
5705
|
// instances that were created outside LWC (i.e. not created by `lwc.createElement()`).
|
|
5769
5706
|
// If the element has no connected or disconnected callbacks, then we don't need to track this.
|
|
5770
|
-
elementsUpgradedOutsideLWC.add(_assertThisInitialized(
|
|
5707
|
+
elementsUpgradedOutsideLWC.add(_assertThisInitialized(_this3));
|
|
5771
5708
|
// TODO [#2970]: LWC elements cannot be upgraded via new Ctor()
|
|
5772
5709
|
// Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
|
|
5773
5710
|
}
|
|
5774
|
-
return
|
|
5711
|
+
return _this3;
|
|
5775
5712
|
}
|
|
5776
5713
|
return _createClass(UpgradableConstructor);
|
|
5777
5714
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
@@ -5880,9 +5817,9 @@ var LWC = (function (exports) {
|
|
|
5880
5817
|
function createPivotingClass(tagName, registeredDefinition) {
|
|
5881
5818
|
var PivotCtor = /*#__PURE__*/function (_NativeHTMLElement) {
|
|
5882
5819
|
_inherits(PivotCtor, _NativeHTMLElement);
|
|
5883
|
-
var
|
|
5820
|
+
var _super7 = _createSuper(PivotCtor);
|
|
5884
5821
|
function PivotCtor(UserCtor) {
|
|
5885
|
-
var
|
|
5822
|
+
var _this4;
|
|
5886
5823
|
_classCallCheck(this, PivotCtor);
|
|
5887
5824
|
// This constructor can only be invoked by:
|
|
5888
5825
|
// a) the browser instantiating an element from parsing or via document.createElement.
|
|
@@ -5892,7 +5829,7 @@ var LWC = (function (exports) {
|
|
|
5892
5829
|
// If the caller signals via UserCtor that this is in fact a controlled
|
|
5893
5830
|
// definition, we use that one, otherwise fallback to the global
|
|
5894
5831
|
// internal registry.
|
|
5895
|
-
|
|
5832
|
+
_this4 = _super7.call(this);
|
|
5896
5833
|
var userCtorIsDefined = !isUndefined$1(UserCtor);
|
|
5897
5834
|
if (userCtorIsDefined) {
|
|
5898
5835
|
if (!isConstructor(UserCtor)) {
|
|
@@ -5904,15 +5841,15 @@ var LWC = (function (exports) {
|
|
|
5904
5841
|
}
|
|
5905
5842
|
var definition = userCtorIsDefined ? getOrCreateDefinitionForConstructor(UserCtor) : globalDefinitionsByTag.get(tagName);
|
|
5906
5843
|
if (!isUndefined$1(definition)) {
|
|
5907
|
-
internalUpgrade(_assertThisInitialized(
|
|
5844
|
+
internalUpgrade(_assertThisInitialized(_this4), registeredDefinition, definition);
|
|
5908
5845
|
} else {
|
|
5909
5846
|
// This is the case in which there is no global definition, and
|
|
5910
5847
|
// it is not handled by LWC (otherwise it will have a valid UserCtor)
|
|
5911
5848
|
// so we need to add it to the pending queue just in case it eventually
|
|
5912
5849
|
// gets defined in the global registry.
|
|
5913
|
-
pendingRegistryForElement.set(_assertThisInitialized(
|
|
5850
|
+
pendingRegistryForElement.set(_assertThisInitialized(_this4), registeredDefinition);
|
|
5914
5851
|
}
|
|
5915
|
-
return
|
|
5852
|
+
return _this4;
|
|
5916
5853
|
}
|
|
5917
5854
|
_createClass(PivotCtor, [{
|
|
5918
5855
|
key: "connectedCallback",
|
|
@@ -6150,17 +6087,17 @@ var LWC = (function (exports) {
|
|
|
6150
6087
|
function flushPendingWhenDefinedCallbacks(tagName, ctor) {
|
|
6151
6088
|
var resolvers = pendingWhenDefinedCallbacks.get(tagName);
|
|
6152
6089
|
if (!isUndefined$1(resolvers)) {
|
|
6153
|
-
var
|
|
6154
|
-
|
|
6090
|
+
var _iterator7 = _createForOfIteratorHelper(resolvers),
|
|
6091
|
+
_step7;
|
|
6155
6092
|
try {
|
|
6156
|
-
for (
|
|
6157
|
-
var resolver =
|
|
6093
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
6094
|
+
var resolver = _step7.value;
|
|
6158
6095
|
resolver(ctor);
|
|
6159
6096
|
}
|
|
6160
6097
|
} catch (err) {
|
|
6161
|
-
|
|
6098
|
+
_iterator7.e(err);
|
|
6162
6099
|
} finally {
|
|
6163
|
-
|
|
6100
|
+
_iterator7.f();
|
|
6164
6101
|
}
|
|
6165
6102
|
}
|
|
6166
6103
|
pendingWhenDefinedCallbacks.delete(tagName);
|
|
@@ -6210,11 +6147,11 @@ var LWC = (function (exports) {
|
|
|
6210
6147
|
var awaiting = awaitingUpgrade.get(tagName);
|
|
6211
6148
|
if (!isUndefined$1(awaiting)) {
|
|
6212
6149
|
awaitingUpgrade.delete(tagName);
|
|
6213
|
-
var
|
|
6214
|
-
|
|
6150
|
+
var _iterator8 = _createForOfIteratorHelper(awaiting),
|
|
6151
|
+
_step8;
|
|
6215
6152
|
try {
|
|
6216
|
-
for (
|
|
6217
|
-
var element =
|
|
6153
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
6154
|
+
var element = _step8.value;
|
|
6218
6155
|
var registeredDefinition = pendingRegistryForElement.get(element);
|
|
6219
6156
|
// At this point, registeredDefinition should never be undefined because awaitingUpgrade
|
|
6220
6157
|
// is only populated when we haven't run internalUpgrade yet, and we only populate
|
|
@@ -6226,9 +6163,9 @@ var LWC = (function (exports) {
|
|
|
6226
6163
|
}
|
|
6227
6164
|
}
|
|
6228
6165
|
} catch (err) {
|
|
6229
|
-
|
|
6166
|
+
_iterator8.e(err);
|
|
6230
6167
|
} finally {
|
|
6231
|
-
|
|
6168
|
+
_iterator8.f();
|
|
6232
6169
|
}
|
|
6233
6170
|
}
|
|
6234
6171
|
// If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
|
|
@@ -6376,13 +6313,13 @@ var LWC = (function (exports) {
|
|
|
6376
6313
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
6377
6314
|
return /*#__PURE__*/function (_HTMLElementToExtend) {
|
|
6378
6315
|
_inherits(UserConstructor, _HTMLElementToExtend);
|
|
6379
|
-
var
|
|
6316
|
+
var _super8 = _createSuper(UserConstructor);
|
|
6380
6317
|
function UserConstructor() {
|
|
6381
|
-
var
|
|
6318
|
+
var _this5;
|
|
6382
6319
|
_classCallCheck(this, UserConstructor);
|
|
6383
|
-
|
|
6384
|
-
upgradeCallback(_assertThisInitialized(
|
|
6385
|
-
return
|
|
6320
|
+
_this5 = _super8.call(this);
|
|
6321
|
+
upgradeCallback(_assertThisInitialized(_this5));
|
|
6322
|
+
return _this5;
|
|
6386
6323
|
}
|
|
6387
6324
|
// Note that there is no need to do the "avoid defining connectedCallback/disconnectedCallback" optimization
|
|
6388
6325
|
// here, because in create-scoped-registry.ts, the registered class will always have these callbacks anyway.
|
|
@@ -6505,7 +6442,7 @@ var LWC = (function (exports) {
|
|
|
6505
6442
|
function isNull(obj) {
|
|
6506
6443
|
return obj === null;
|
|
6507
6444
|
}
|
|
6508
|
-
/** version: 2.32.
|
|
6445
|
+
/** version: 2.32.1 */
|
|
6509
6446
|
|
|
6510
6447
|
/*
|
|
6511
6448
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6564,17 +6501,17 @@ var LWC = (function (exports) {
|
|
|
6564
6501
|
exports.createFragment = function (html) {
|
|
6565
6502
|
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
6566
6503
|
if (!isUndefined(wrapperTags)) {
|
|
6567
|
-
var
|
|
6568
|
-
|
|
6504
|
+
var _iterator9 = _createForOfIteratorHelper(wrapperTags),
|
|
6505
|
+
_step9;
|
|
6569
6506
|
try {
|
|
6570
|
-
for (
|
|
6571
|
-
var wrapperTag =
|
|
6507
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
6508
|
+
var wrapperTag = _step9.value;
|
|
6572
6509
|
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
6573
6510
|
}
|
|
6574
6511
|
} catch (err) {
|
|
6575
|
-
|
|
6512
|
+
_iterator9.e(err);
|
|
6576
6513
|
} finally {
|
|
6577
|
-
|
|
6514
|
+
_iterator9.f();
|
|
6578
6515
|
}
|
|
6579
6516
|
}
|
|
6580
6517
|
// For IE11, the document title must not be undefined, but it can be an empty string
|
|
@@ -6583,7 +6520,7 @@ var LWC = (function (exports) {
|
|
|
6583
6520
|
doc.body.innerHTML = html;
|
|
6584
6521
|
var content = doc.body;
|
|
6585
6522
|
if (!isUndefined(wrapperTags)) {
|
|
6586
|
-
for (var
|
|
6523
|
+
for (var _i34 = 0; _i34 < wrapperTags.length; _i34++) {
|
|
6587
6524
|
content = content.firstChild;
|
|
6588
6525
|
}
|
|
6589
6526
|
}
|
|
@@ -6776,8 +6713,8 @@ var LWC = (function (exports) {
|
|
|
6776
6713
|
tagName: element.tagName.toLowerCase(),
|
|
6777
6714
|
hydrated: true
|
|
6778
6715
|
});
|
|
6779
|
-
for (var
|
|
6780
|
-
var _Object$entries2$_i = _slicedToArray(_Object$entries2[
|
|
6716
|
+
for (var _i35 = 0, _Object$entries2 = Object.entries(props); _i35 < _Object$entries2.length; _i35++) {
|
|
6717
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i35], 2),
|
|
6781
6718
|
key = _Object$entries2$_i[0],
|
|
6782
6719
|
value = _Object$entries2$_i[1];
|
|
6783
6720
|
element[key] = value;
|
|
@@ -6850,23 +6787,23 @@ var LWC = (function (exports) {
|
|
|
6850
6787
|
var _attributeChangedCallback = HtmlPrototype.prototype.attributeChangedCallback;
|
|
6851
6788
|
return _a = /*#__PURE__*/function (_HTMLElement2) {
|
|
6852
6789
|
_inherits(_a, _HTMLElement2);
|
|
6853
|
-
var
|
|
6790
|
+
var _super9 = _createSuper(_a);
|
|
6854
6791
|
function _a() {
|
|
6855
|
-
var
|
|
6792
|
+
var _this6;
|
|
6856
6793
|
_classCallCheck(this, _a);
|
|
6857
|
-
|
|
6858
|
-
if (
|
|
6794
|
+
_this6 = _super9.call(this);
|
|
6795
|
+
if (_this6.isConnected) {
|
|
6859
6796
|
// this if block is hit when there's already an un-upgraded element in the DOM with the same tag name.
|
|
6860
|
-
hydrateComponent(_assertThisInitialized(
|
|
6861
|
-
hydratedCustomElements.add(_assertThisInitialized(
|
|
6797
|
+
hydrateComponent(_assertThisInitialized(_this6), Ctor, {});
|
|
6798
|
+
hydratedCustomElements.add(_assertThisInitialized(_this6));
|
|
6862
6799
|
} else {
|
|
6863
|
-
createVM(_assertThisInitialized(
|
|
6800
|
+
createVM(_assertThisInitialized(_this6), Ctor, renderer, {
|
|
6864
6801
|
mode: 'open',
|
|
6865
6802
|
owner: null,
|
|
6866
|
-
tagName:
|
|
6803
|
+
tagName: _this6.tagName
|
|
6867
6804
|
});
|
|
6868
6805
|
}
|
|
6869
|
-
return
|
|
6806
|
+
return _this6;
|
|
6870
6807
|
}
|
|
6871
6808
|
_createClass(_a, [{
|
|
6872
6809
|
key: "connectedCallback",
|
|
@@ -7064,7 +7001,7 @@ var LWC = (function (exports) {
|
|
|
7064
7001
|
});
|
|
7065
7002
|
freeze(LightningElement);
|
|
7066
7003
|
seal(LightningElement.prototype);
|
|
7067
|
-
/* version: 2.32.
|
|
7004
|
+
/* version: 2.32.1 */
|
|
7068
7005
|
|
|
7069
7006
|
exports.LightningElement = LightningElement;
|
|
7070
7007
|
exports.__unstable__ProfilerControl = profilerControl;
|