lwc 2.12.0 → 2.13.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 +88 -95
- package/dist/engine-dom/iife/es2017/engine-dom.js +88 -95
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +76 -83
- package/dist/engine-dom/iife/es5/engine-dom.js +5761 -7323
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +4567 -5868
- package/dist/engine-dom/umd/es2017/engine-dom.js +88 -95
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +76 -83
- package/dist/engine-dom/umd/es5/engine-dom.js +5761 -7323
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +4567 -5868
- package/dist/engine-server/commonjs/es2017/engine-server.js +88 -95
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +88 -95
- 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 +13 -10
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3725 -4699
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +1 -10
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3600 -4543
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +13 -10
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3725 -4699
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +1 -10
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3600 -4543
- 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 +258 -243
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +258 -243
- 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 +258 -243
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +258 -243
- package/package.json +7 -7
|
@@ -298,9 +298,9 @@ const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
|
298
298
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
299
299
|
*/
|
|
300
300
|
// Increment whenever the LWC template compiler changes
|
|
301
|
-
const LWC_VERSION = "2.
|
|
301
|
+
const LWC_VERSION = "2.13.1";
|
|
302
302
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
303
|
-
/** version: 2.
|
|
303
|
+
/** version: 2.13.1 */
|
|
304
304
|
|
|
305
305
|
/*
|
|
306
306
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -453,7 +453,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
453
453
|
setFeatureFlag(name, value);
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
/** version: 2.
|
|
456
|
+
/** version: 2.13.1 */
|
|
457
457
|
|
|
458
458
|
/* proxy-compat-disable */
|
|
459
459
|
|
|
@@ -891,6 +891,20 @@ function logWarn(message, vm) {
|
|
|
891
891
|
log('warn', message, vm);
|
|
892
892
|
}
|
|
893
893
|
|
|
894
|
+
/*
|
|
895
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
896
|
+
* All rights reserved.
|
|
897
|
+
* SPDX-License-Identifier: MIT
|
|
898
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
899
|
+
*/
|
|
900
|
+
function resolveCircularModuleDependency(fn) {
|
|
901
|
+
const module = fn();
|
|
902
|
+
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
903
|
+
}
|
|
904
|
+
function isCircularModuleDependency(obj) {
|
|
905
|
+
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
906
|
+
}
|
|
907
|
+
|
|
894
908
|
/*
|
|
895
909
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
896
910
|
* All rights reserved.
|
|
@@ -2256,64 +2270,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2256
2270
|
patchLightningElementPrototypeWithRestrictions(LightningElement.prototype);
|
|
2257
2271
|
}
|
|
2258
2272
|
|
|
2259
|
-
|
|
2260
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2261
|
-
* All rights reserved.
|
|
2262
|
-
* SPDX-License-Identifier: MIT
|
|
2263
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2264
|
-
*/
|
|
2265
|
-
/**
|
|
2266
|
-
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2267
|
-
* LWC Components. This function implements the internals of this
|
|
2268
|
-
* decorator.
|
|
2269
|
-
*/
|
|
2270
|
-
function wire(_adapter, _config) {
|
|
2271
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2272
|
-
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2273
|
-
}
|
|
2274
|
-
throw new Error();
|
|
2275
|
-
}
|
|
2276
|
-
function internalWireFieldDecorator(key) {
|
|
2277
|
-
return {
|
|
2278
|
-
get() {
|
|
2279
|
-
const vm = getAssociatedVM(this);
|
|
2280
|
-
componentValueObserved(vm, key);
|
|
2281
|
-
return vm.cmpFields[key];
|
|
2282
|
-
},
|
|
2283
|
-
set(value) {
|
|
2284
|
-
const vm = getAssociatedVM(this);
|
|
2285
|
-
/**
|
|
2286
|
-
* Reactivity for wired fields is provided in wiring.
|
|
2287
|
-
* We intentionally add reactivity here since this is just
|
|
2288
|
-
* letting the author to do the wrong thing, but it will keep our
|
|
2289
|
-
* system to be backward compatible.
|
|
2290
|
-
*/
|
|
2291
|
-
if (value !== vm.cmpFields[key]) {
|
|
2292
|
-
vm.cmpFields[key] = value;
|
|
2293
|
-
componentValueMutated(vm, key);
|
|
2294
|
-
}
|
|
2295
|
-
},
|
|
2296
|
-
enumerable: true,
|
|
2297
|
-
configurable: true,
|
|
2298
|
-
};
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
/*
|
|
2302
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2303
|
-
* All rights reserved.
|
|
2304
|
-
* SPDX-License-Identifier: MIT
|
|
2305
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2306
|
-
*/
|
|
2307
|
-
function track(target) {
|
|
2308
|
-
if (arguments.length === 1) {
|
|
2309
|
-
return reactiveMembrane.getProxy(target);
|
|
2310
|
-
}
|
|
2311
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2312
|
-
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2313
|
-
}
|
|
2314
|
-
throw new Error();
|
|
2315
|
-
}
|
|
2316
|
-
function internalTrackDecorator(key) {
|
|
2273
|
+
function createObservedFieldPropertyDescriptor(key) {
|
|
2317
2274
|
return {
|
|
2318
2275
|
get() {
|
|
2319
2276
|
const vm = getAssociatedVM(this);
|
|
@@ -2322,14 +2279,8 @@ function internalTrackDecorator(key) {
|
|
|
2322
2279
|
},
|
|
2323
2280
|
set(newValue) {
|
|
2324
2281
|
const vm = getAssociatedVM(this);
|
|
2325
|
-
if (
|
|
2326
|
-
|
|
2327
|
-
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2328
|
-
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2329
|
-
}
|
|
2330
|
-
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2331
|
-
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2332
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2282
|
+
if (newValue !== vm.cmpFields[key]) {
|
|
2283
|
+
vm.cmpFields[key] = newValue;
|
|
2333
2284
|
componentValueMutated(vm, key);
|
|
2334
2285
|
}
|
|
2335
2286
|
},
|
|
@@ -2493,7 +2444,22 @@ function createPublicAccessorDescriptor(key, descriptor) {
|
|
|
2493
2444
|
};
|
|
2494
2445
|
}
|
|
2495
2446
|
|
|
2496
|
-
|
|
2447
|
+
/*
|
|
2448
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2449
|
+
* All rights reserved.
|
|
2450
|
+
* SPDX-License-Identifier: MIT
|
|
2451
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2452
|
+
*/
|
|
2453
|
+
function track(target) {
|
|
2454
|
+
if (arguments.length === 1) {
|
|
2455
|
+
return reactiveMembrane.getProxy(target);
|
|
2456
|
+
}
|
|
2457
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2458
|
+
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2459
|
+
}
|
|
2460
|
+
throw new Error();
|
|
2461
|
+
}
|
|
2462
|
+
function internalTrackDecorator(key) {
|
|
2497
2463
|
return {
|
|
2498
2464
|
get() {
|
|
2499
2465
|
const vm = getAssociatedVM(this);
|
|
@@ -2502,8 +2468,56 @@ function createObservedFieldPropertyDescriptor(key) {
|
|
|
2502
2468
|
},
|
|
2503
2469
|
set(newValue) {
|
|
2504
2470
|
const vm = getAssociatedVM(this);
|
|
2505
|
-
if (
|
|
2506
|
-
|
|
2471
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2472
|
+
const vmBeingRendered = getVMBeingRendered();
|
|
2473
|
+
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2474
|
+
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2475
|
+
}
|
|
2476
|
+
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2477
|
+
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2478
|
+
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2479
|
+
componentValueMutated(vm, key);
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
enumerable: true,
|
|
2483
|
+
configurable: true,
|
|
2484
|
+
};
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/*
|
|
2488
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2489
|
+
* All rights reserved.
|
|
2490
|
+
* SPDX-License-Identifier: MIT
|
|
2491
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2492
|
+
*/
|
|
2493
|
+
/**
|
|
2494
|
+
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2495
|
+
* LWC Components. This function implements the internals of this
|
|
2496
|
+
* decorator.
|
|
2497
|
+
*/
|
|
2498
|
+
function wire(_adapter, _config) {
|
|
2499
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2500
|
+
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2501
|
+
}
|
|
2502
|
+
throw new Error();
|
|
2503
|
+
}
|
|
2504
|
+
function internalWireFieldDecorator(key) {
|
|
2505
|
+
return {
|
|
2506
|
+
get() {
|
|
2507
|
+
const vm = getAssociatedVM(this);
|
|
2508
|
+
componentValueObserved(vm, key);
|
|
2509
|
+
return vm.cmpFields[key];
|
|
2510
|
+
},
|
|
2511
|
+
set(value) {
|
|
2512
|
+
const vm = getAssociatedVM(this);
|
|
2513
|
+
/**
|
|
2514
|
+
* Reactivity for wired fields is provided in wiring.
|
|
2515
|
+
* We intentionally add reactivity here since this is just
|
|
2516
|
+
* letting the author to do the wrong thing, but it will keep our
|
|
2517
|
+
* system to be backward compatible.
|
|
2518
|
+
*/
|
|
2519
|
+
if (value !== vm.cmpFields[key]) {
|
|
2520
|
+
vm.cmpFields[key] = value;
|
|
2507
2521
|
componentValueMutated(vm, key);
|
|
2508
2522
|
}
|
|
2509
2523
|
},
|
|
@@ -2937,20 +2951,6 @@ const BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor$1, get
|
|
|
2937
2951
|
freeze(BaseBridgeElement);
|
|
2938
2952
|
seal(BaseBridgeElement.prototype);
|
|
2939
2953
|
|
|
2940
|
-
/*
|
|
2941
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
2942
|
-
* All rights reserved.
|
|
2943
|
-
* SPDX-License-Identifier: MIT
|
|
2944
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2945
|
-
*/
|
|
2946
|
-
function resolveCircularModuleDependency(fn) {
|
|
2947
|
-
const module = fn();
|
|
2948
|
-
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
2949
|
-
}
|
|
2950
|
-
function isCircularModuleDependency(obj) {
|
|
2951
|
-
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
2954
|
/*
|
|
2955
2955
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
2956
2956
|
* All rights reserved.
|
|
@@ -4040,13 +4040,6 @@ function allocateInSlot(vm, children) {
|
|
|
4040
4040
|
slotName = ((_a = vnode.data.attrs) === null || _a === void 0 ? void 0 : _a.slot) || '';
|
|
4041
4041
|
}
|
|
4042
4042
|
const vnodes = (cmpSlots[slotName] = cmpSlots[slotName] || []);
|
|
4043
|
-
// re-keying the vnodes is necessary to avoid conflicts with default content for the slot
|
|
4044
|
-
// which might have similar keys. Each vnode will always have a key that
|
|
4045
|
-
// starts with a numeric character from compiler. In this case, we add a unique
|
|
4046
|
-
// notation for slotted vnodes keys, e.g.: `@foo:1:1`
|
|
4047
|
-
if (!isUndefined$1(vnode.key)) {
|
|
4048
|
-
vnode.key = `@${slotName}:${vnode.key}`;
|
|
4049
|
-
}
|
|
4050
4043
|
ArrayPush$1.call(vnodes, vnode);
|
|
4051
4044
|
}
|
|
4052
4045
|
if (isFalse(vm.isDirty)) {
|
|
@@ -6568,7 +6561,7 @@ function setHooks(hooks) {
|
|
|
6568
6561
|
hooksAreSet = true;
|
|
6569
6562
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6570
6563
|
}
|
|
6571
|
-
/* version: 2.
|
|
6564
|
+
/* version: 2.13.1 */
|
|
6572
6565
|
|
|
6573
6566
|
/*
|
|
6574
6567
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7208,6 +7201,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
|
7208
7201
|
});
|
|
7209
7202
|
freeze(LightningElement);
|
|
7210
7203
|
seal(LightningElement.prototype);
|
|
7211
|
-
/* version: 2.
|
|
7204
|
+
/* version: 2.13.1 */
|
|
7212
7205
|
|
|
7213
7206
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
@@ -301,9 +301,9 @@ var LWC = (function (exports) {
|
|
|
301
301
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
302
302
|
*/
|
|
303
303
|
// Increment whenever the LWC template compiler changes
|
|
304
|
-
const LWC_VERSION = "2.
|
|
304
|
+
const LWC_VERSION = "2.13.1";
|
|
305
305
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
306
|
-
/** version: 2.
|
|
306
|
+
/** version: 2.13.1 */
|
|
307
307
|
|
|
308
308
|
/*
|
|
309
309
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -456,7 +456,7 @@ var LWC = (function (exports) {
|
|
|
456
456
|
setFeatureFlag(name, value);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
/** version: 2.
|
|
459
|
+
/** version: 2.13.1 */
|
|
460
460
|
|
|
461
461
|
/* proxy-compat-disable */
|
|
462
462
|
|
|
@@ -894,6 +894,20 @@ var LWC = (function (exports) {
|
|
|
894
894
|
log('warn', message, vm);
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
+
/*
|
|
898
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
899
|
+
* All rights reserved.
|
|
900
|
+
* SPDX-License-Identifier: MIT
|
|
901
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
902
|
+
*/
|
|
903
|
+
function resolveCircularModuleDependency(fn) {
|
|
904
|
+
const module = fn();
|
|
905
|
+
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
906
|
+
}
|
|
907
|
+
function isCircularModuleDependency(obj) {
|
|
908
|
+
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
909
|
+
}
|
|
910
|
+
|
|
897
911
|
/*
|
|
898
912
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
899
913
|
* All rights reserved.
|
|
@@ -2259,64 +2273,7 @@ var LWC = (function (exports) {
|
|
|
2259
2273
|
patchLightningElementPrototypeWithRestrictions(LightningElement.prototype);
|
|
2260
2274
|
}
|
|
2261
2275
|
|
|
2262
|
-
|
|
2263
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2264
|
-
* All rights reserved.
|
|
2265
|
-
* SPDX-License-Identifier: MIT
|
|
2266
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2267
|
-
*/
|
|
2268
|
-
/**
|
|
2269
|
-
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2270
|
-
* LWC Components. This function implements the internals of this
|
|
2271
|
-
* decorator.
|
|
2272
|
-
*/
|
|
2273
|
-
function wire(_adapter, _config) {
|
|
2274
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2275
|
-
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2276
|
-
}
|
|
2277
|
-
throw new Error();
|
|
2278
|
-
}
|
|
2279
|
-
function internalWireFieldDecorator(key) {
|
|
2280
|
-
return {
|
|
2281
|
-
get() {
|
|
2282
|
-
const vm = getAssociatedVM(this);
|
|
2283
|
-
componentValueObserved(vm, key);
|
|
2284
|
-
return vm.cmpFields[key];
|
|
2285
|
-
},
|
|
2286
|
-
set(value) {
|
|
2287
|
-
const vm = getAssociatedVM(this);
|
|
2288
|
-
/**
|
|
2289
|
-
* Reactivity for wired fields is provided in wiring.
|
|
2290
|
-
* We intentionally add reactivity here since this is just
|
|
2291
|
-
* letting the author to do the wrong thing, but it will keep our
|
|
2292
|
-
* system to be backward compatible.
|
|
2293
|
-
*/
|
|
2294
|
-
if (value !== vm.cmpFields[key]) {
|
|
2295
|
-
vm.cmpFields[key] = value;
|
|
2296
|
-
componentValueMutated(vm, key);
|
|
2297
|
-
}
|
|
2298
|
-
},
|
|
2299
|
-
enumerable: true,
|
|
2300
|
-
configurable: true,
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
/*
|
|
2305
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2306
|
-
* All rights reserved.
|
|
2307
|
-
* SPDX-License-Identifier: MIT
|
|
2308
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2309
|
-
*/
|
|
2310
|
-
function track(target) {
|
|
2311
|
-
if (arguments.length === 1) {
|
|
2312
|
-
return reactiveMembrane.getProxy(target);
|
|
2313
|
-
}
|
|
2314
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2315
|
-
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2316
|
-
}
|
|
2317
|
-
throw new Error();
|
|
2318
|
-
}
|
|
2319
|
-
function internalTrackDecorator(key) {
|
|
2276
|
+
function createObservedFieldPropertyDescriptor(key) {
|
|
2320
2277
|
return {
|
|
2321
2278
|
get() {
|
|
2322
2279
|
const vm = getAssociatedVM(this);
|
|
@@ -2325,14 +2282,8 @@ var LWC = (function (exports) {
|
|
|
2325
2282
|
},
|
|
2326
2283
|
set(newValue) {
|
|
2327
2284
|
const vm = getAssociatedVM(this);
|
|
2328
|
-
if (
|
|
2329
|
-
|
|
2330
|
-
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2331
|
-
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2332
|
-
}
|
|
2333
|
-
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2334
|
-
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2335
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2285
|
+
if (newValue !== vm.cmpFields[key]) {
|
|
2286
|
+
vm.cmpFields[key] = newValue;
|
|
2336
2287
|
componentValueMutated(vm, key);
|
|
2337
2288
|
}
|
|
2338
2289
|
},
|
|
@@ -2496,7 +2447,22 @@ var LWC = (function (exports) {
|
|
|
2496
2447
|
};
|
|
2497
2448
|
}
|
|
2498
2449
|
|
|
2499
|
-
|
|
2450
|
+
/*
|
|
2451
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2452
|
+
* All rights reserved.
|
|
2453
|
+
* SPDX-License-Identifier: MIT
|
|
2454
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2455
|
+
*/
|
|
2456
|
+
function track(target) {
|
|
2457
|
+
if (arguments.length === 1) {
|
|
2458
|
+
return reactiveMembrane.getProxy(target);
|
|
2459
|
+
}
|
|
2460
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2461
|
+
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2462
|
+
}
|
|
2463
|
+
throw new Error();
|
|
2464
|
+
}
|
|
2465
|
+
function internalTrackDecorator(key) {
|
|
2500
2466
|
return {
|
|
2501
2467
|
get() {
|
|
2502
2468
|
const vm = getAssociatedVM(this);
|
|
@@ -2505,8 +2471,56 @@ var LWC = (function (exports) {
|
|
|
2505
2471
|
},
|
|
2506
2472
|
set(newValue) {
|
|
2507
2473
|
const vm = getAssociatedVM(this);
|
|
2508
|
-
if (
|
|
2509
|
-
|
|
2474
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2475
|
+
const vmBeingRendered = getVMBeingRendered();
|
|
2476
|
+
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2477
|
+
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2478
|
+
}
|
|
2479
|
+
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2480
|
+
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2481
|
+
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2482
|
+
componentValueMutated(vm, key);
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
enumerable: true,
|
|
2486
|
+
configurable: true,
|
|
2487
|
+
};
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/*
|
|
2491
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2492
|
+
* All rights reserved.
|
|
2493
|
+
* SPDX-License-Identifier: MIT
|
|
2494
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2495
|
+
*/
|
|
2496
|
+
/**
|
|
2497
|
+
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2498
|
+
* LWC Components. This function implements the internals of this
|
|
2499
|
+
* decorator.
|
|
2500
|
+
*/
|
|
2501
|
+
function wire(_adapter, _config) {
|
|
2502
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2503
|
+
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2504
|
+
}
|
|
2505
|
+
throw new Error();
|
|
2506
|
+
}
|
|
2507
|
+
function internalWireFieldDecorator(key) {
|
|
2508
|
+
return {
|
|
2509
|
+
get() {
|
|
2510
|
+
const vm = getAssociatedVM(this);
|
|
2511
|
+
componentValueObserved(vm, key);
|
|
2512
|
+
return vm.cmpFields[key];
|
|
2513
|
+
},
|
|
2514
|
+
set(value) {
|
|
2515
|
+
const vm = getAssociatedVM(this);
|
|
2516
|
+
/**
|
|
2517
|
+
* Reactivity for wired fields is provided in wiring.
|
|
2518
|
+
* We intentionally add reactivity here since this is just
|
|
2519
|
+
* letting the author to do the wrong thing, but it will keep our
|
|
2520
|
+
* system to be backward compatible.
|
|
2521
|
+
*/
|
|
2522
|
+
if (value !== vm.cmpFields[key]) {
|
|
2523
|
+
vm.cmpFields[key] = value;
|
|
2510
2524
|
componentValueMutated(vm, key);
|
|
2511
2525
|
}
|
|
2512
2526
|
},
|
|
@@ -2940,20 +2954,6 @@ var LWC = (function (exports) {
|
|
|
2940
2954
|
freeze(BaseBridgeElement);
|
|
2941
2955
|
seal(BaseBridgeElement.prototype);
|
|
2942
2956
|
|
|
2943
|
-
/*
|
|
2944
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
2945
|
-
* All rights reserved.
|
|
2946
|
-
* SPDX-License-Identifier: MIT
|
|
2947
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2948
|
-
*/
|
|
2949
|
-
function resolveCircularModuleDependency(fn) {
|
|
2950
|
-
const module = fn();
|
|
2951
|
-
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
2952
|
-
}
|
|
2953
|
-
function isCircularModuleDependency(obj) {
|
|
2954
|
-
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
2955
|
-
}
|
|
2956
|
-
|
|
2957
2957
|
/*
|
|
2958
2958
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
2959
2959
|
* All rights reserved.
|
|
@@ -4043,13 +4043,6 @@ var LWC = (function (exports) {
|
|
|
4043
4043
|
slotName = ((_a = vnode.data.attrs) === null || _a === void 0 ? void 0 : _a.slot) || '';
|
|
4044
4044
|
}
|
|
4045
4045
|
const vnodes = (cmpSlots[slotName] = cmpSlots[slotName] || []);
|
|
4046
|
-
// re-keying the vnodes is necessary to avoid conflicts with default content for the slot
|
|
4047
|
-
// which might have similar keys. Each vnode will always have a key that
|
|
4048
|
-
// starts with a numeric character from compiler. In this case, we add a unique
|
|
4049
|
-
// notation for slotted vnodes keys, e.g.: `@foo:1:1`
|
|
4050
|
-
if (!isUndefined$1(vnode.key)) {
|
|
4051
|
-
vnode.key = `@${slotName}:${vnode.key}`;
|
|
4052
|
-
}
|
|
4053
4046
|
ArrayPush$1.call(vnodes, vnode);
|
|
4054
4047
|
}
|
|
4055
4048
|
if (isFalse(vm.isDirty)) {
|
|
@@ -6571,7 +6564,7 @@ var LWC = (function (exports) {
|
|
|
6571
6564
|
hooksAreSet = true;
|
|
6572
6565
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6573
6566
|
}
|
|
6574
|
-
/* version: 2.
|
|
6567
|
+
/* version: 2.13.1 */
|
|
6575
6568
|
|
|
6576
6569
|
/*
|
|
6577
6570
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7211,7 +7204,7 @@ var LWC = (function (exports) {
|
|
|
7211
7204
|
});
|
|
7212
7205
|
freeze(LightningElement);
|
|
7213
7206
|
seal(LightningElement.prototype);
|
|
7214
|
-
/* version: 2.
|
|
7207
|
+
/* version: 2.13.1 */
|
|
7215
7208
|
|
|
7216
7209
|
exports.LightningElement = LightningElement;
|
|
7217
7210
|
exports.__unstable__ProfilerControl = profilerControl;
|