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
|
@@ -417,9 +417,9 @@ const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
|
417
417
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
418
418
|
*/
|
|
419
419
|
// Increment whenever the LWC template compiler changes
|
|
420
|
-
const LWC_VERSION = "2.
|
|
420
|
+
const LWC_VERSION = "2.13.1";
|
|
421
421
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
422
|
-
/** version: 2.
|
|
422
|
+
/** version: 2.13.1 */
|
|
423
423
|
|
|
424
424
|
/*
|
|
425
425
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -527,7 +527,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
527
527
|
setFeatureFlag(name, value);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
/** version: 2.
|
|
530
|
+
/** version: 2.13.1 */
|
|
531
531
|
|
|
532
532
|
/* proxy-compat-disable */
|
|
533
533
|
|
|
@@ -935,6 +935,20 @@ function logError(message, vm) {
|
|
|
935
935
|
log('error', message, vm);
|
|
936
936
|
}
|
|
937
937
|
|
|
938
|
+
/*
|
|
939
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
940
|
+
* All rights reserved.
|
|
941
|
+
* SPDX-License-Identifier: MIT
|
|
942
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
943
|
+
*/
|
|
944
|
+
function resolveCircularModuleDependency(fn) {
|
|
945
|
+
const module = fn();
|
|
946
|
+
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
947
|
+
}
|
|
948
|
+
function isCircularModuleDependency(obj) {
|
|
949
|
+
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
950
|
+
}
|
|
951
|
+
|
|
938
952
|
/*
|
|
939
953
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
940
954
|
* All rights reserved.
|
|
@@ -2300,64 +2314,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2300
2314
|
patchLightningElementPrototypeWithRestrictions(LightningElement.prototype);
|
|
2301
2315
|
}
|
|
2302
2316
|
|
|
2303
|
-
|
|
2304
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2305
|
-
* All rights reserved.
|
|
2306
|
-
* SPDX-License-Identifier: MIT
|
|
2307
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2308
|
-
*/
|
|
2309
|
-
/**
|
|
2310
|
-
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2311
|
-
* LWC Components. This function implements the internals of this
|
|
2312
|
-
* decorator.
|
|
2313
|
-
*/
|
|
2314
|
-
function wire(_adapter, _config) {
|
|
2315
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2316
|
-
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2317
|
-
}
|
|
2318
|
-
throw new Error();
|
|
2319
|
-
}
|
|
2320
|
-
function internalWireFieldDecorator(key) {
|
|
2321
|
-
return {
|
|
2322
|
-
get() {
|
|
2323
|
-
const vm = getAssociatedVM(this);
|
|
2324
|
-
componentValueObserved(vm, key);
|
|
2325
|
-
return vm.cmpFields[key];
|
|
2326
|
-
},
|
|
2327
|
-
set(value) {
|
|
2328
|
-
const vm = getAssociatedVM(this);
|
|
2329
|
-
/**
|
|
2330
|
-
* Reactivity for wired fields is provided in wiring.
|
|
2331
|
-
* We intentionally add reactivity here since this is just
|
|
2332
|
-
* letting the author to do the wrong thing, but it will keep our
|
|
2333
|
-
* system to be backward compatible.
|
|
2334
|
-
*/
|
|
2335
|
-
if (value !== vm.cmpFields[key]) {
|
|
2336
|
-
vm.cmpFields[key] = value;
|
|
2337
|
-
componentValueMutated(vm, key);
|
|
2338
|
-
}
|
|
2339
|
-
},
|
|
2340
|
-
enumerable: true,
|
|
2341
|
-
configurable: true,
|
|
2342
|
-
};
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
/*
|
|
2346
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2347
|
-
* All rights reserved.
|
|
2348
|
-
* SPDX-License-Identifier: MIT
|
|
2349
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2350
|
-
*/
|
|
2351
|
-
function track(target) {
|
|
2352
|
-
if (arguments.length === 1) {
|
|
2353
|
-
return reactiveMembrane.getProxy(target);
|
|
2354
|
-
}
|
|
2355
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2356
|
-
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2357
|
-
}
|
|
2358
|
-
throw new Error();
|
|
2359
|
-
}
|
|
2360
|
-
function internalTrackDecorator(key) {
|
|
2317
|
+
function createObservedFieldPropertyDescriptor(key) {
|
|
2361
2318
|
return {
|
|
2362
2319
|
get() {
|
|
2363
2320
|
const vm = getAssociatedVM(this);
|
|
@@ -2366,14 +2323,8 @@ function internalTrackDecorator(key) {
|
|
|
2366
2323
|
},
|
|
2367
2324
|
set(newValue) {
|
|
2368
2325
|
const vm = getAssociatedVM(this);
|
|
2369
|
-
if (
|
|
2370
|
-
|
|
2371
|
-
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2372
|
-
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2373
|
-
}
|
|
2374
|
-
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2375
|
-
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2376
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2326
|
+
if (newValue !== vm.cmpFields[key]) {
|
|
2327
|
+
vm.cmpFields[key] = newValue;
|
|
2377
2328
|
componentValueMutated(vm, key);
|
|
2378
2329
|
}
|
|
2379
2330
|
},
|
|
@@ -2537,7 +2488,22 @@ function createPublicAccessorDescriptor(key, descriptor) {
|
|
|
2537
2488
|
};
|
|
2538
2489
|
}
|
|
2539
2490
|
|
|
2540
|
-
|
|
2491
|
+
/*
|
|
2492
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2493
|
+
* All rights reserved.
|
|
2494
|
+
* SPDX-License-Identifier: MIT
|
|
2495
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2496
|
+
*/
|
|
2497
|
+
function track(target) {
|
|
2498
|
+
if (arguments.length === 1) {
|
|
2499
|
+
return reactiveMembrane.getProxy(target);
|
|
2500
|
+
}
|
|
2501
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2502
|
+
assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
|
|
2503
|
+
}
|
|
2504
|
+
throw new Error();
|
|
2505
|
+
}
|
|
2506
|
+
function internalTrackDecorator(key) {
|
|
2541
2507
|
return {
|
|
2542
2508
|
get() {
|
|
2543
2509
|
const vm = getAssociatedVM(this);
|
|
@@ -2546,8 +2512,56 @@ function createObservedFieldPropertyDescriptor(key) {
|
|
|
2546
2512
|
},
|
|
2547
2513
|
set(newValue) {
|
|
2548
2514
|
const vm = getAssociatedVM(this);
|
|
2549
|
-
if (
|
|
2550
|
-
|
|
2515
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2516
|
+
const vmBeingRendered = getVMBeingRendered();
|
|
2517
|
+
assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2518
|
+
assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2519
|
+
}
|
|
2520
|
+
const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2521
|
+
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2522
|
+
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2523
|
+
componentValueMutated(vm, key);
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
enumerable: true,
|
|
2527
|
+
configurable: true,
|
|
2528
|
+
};
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
/*
|
|
2532
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2533
|
+
* All rights reserved.
|
|
2534
|
+
* SPDX-License-Identifier: MIT
|
|
2535
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2536
|
+
*/
|
|
2537
|
+
/**
|
|
2538
|
+
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2539
|
+
* LWC Components. This function implements the internals of this
|
|
2540
|
+
* decorator.
|
|
2541
|
+
*/
|
|
2542
|
+
function wire(_adapter, _config) {
|
|
2543
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2544
|
+
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
|
2545
|
+
}
|
|
2546
|
+
throw new Error();
|
|
2547
|
+
}
|
|
2548
|
+
function internalWireFieldDecorator(key) {
|
|
2549
|
+
return {
|
|
2550
|
+
get() {
|
|
2551
|
+
const vm = getAssociatedVM(this);
|
|
2552
|
+
componentValueObserved(vm, key);
|
|
2553
|
+
return vm.cmpFields[key];
|
|
2554
|
+
},
|
|
2555
|
+
set(value) {
|
|
2556
|
+
const vm = getAssociatedVM(this);
|
|
2557
|
+
/**
|
|
2558
|
+
* Reactivity for wired fields is provided in wiring.
|
|
2559
|
+
* We intentionally add reactivity here since this is just
|
|
2560
|
+
* letting the author to do the wrong thing, but it will keep our
|
|
2561
|
+
* system to be backward compatible.
|
|
2562
|
+
*/
|
|
2563
|
+
if (value !== vm.cmpFields[key]) {
|
|
2564
|
+
vm.cmpFields[key] = value;
|
|
2551
2565
|
componentValueMutated(vm, key);
|
|
2552
2566
|
}
|
|
2553
2567
|
},
|
|
@@ -2981,20 +2995,6 @@ const BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOw
|
|
|
2981
2995
|
freeze(BaseBridgeElement);
|
|
2982
2996
|
seal(BaseBridgeElement.prototype);
|
|
2983
2997
|
|
|
2984
|
-
/*
|
|
2985
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
2986
|
-
* All rights reserved.
|
|
2987
|
-
* SPDX-License-Identifier: MIT
|
|
2988
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2989
|
-
*/
|
|
2990
|
-
function resolveCircularModuleDependency(fn) {
|
|
2991
|
-
const module = fn();
|
|
2992
|
-
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
2993
|
-
}
|
|
2994
|
-
function isCircularModuleDependency(obj) {
|
|
2995
|
-
return isFunction$1(obj) && hasOwnProperty$1.call(obj, '__circular__');
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
2998
|
/*
|
|
2999
2999
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
3000
3000
|
* All rights reserved.
|
|
@@ -3963,13 +3963,6 @@ function allocateInSlot(vm, children) {
|
|
|
3963
3963
|
slotName = ((_a = vnode.data.attrs) === null || _a === void 0 ? void 0 : _a.slot) || '';
|
|
3964
3964
|
}
|
|
3965
3965
|
const vnodes = (cmpSlots[slotName] = cmpSlots[slotName] || []);
|
|
3966
|
-
// re-keying the vnodes is necessary to avoid conflicts with default content for the slot
|
|
3967
|
-
// which might have similar keys. Each vnode will always have a key that
|
|
3968
|
-
// starts with a numeric character from compiler. In this case, we add a unique
|
|
3969
|
-
// notation for slotted vnodes keys, e.g.: `@foo:1:1`
|
|
3970
|
-
if (!isUndefined$1(vnode.key)) {
|
|
3971
|
-
vnode.key = `@${slotName}:${vnode.key}`;
|
|
3972
|
-
}
|
|
3973
3966
|
ArrayPush$1.call(vnodes, vnode);
|
|
3974
3967
|
}
|
|
3975
3968
|
if (isFalse(vm.isDirty)) {
|
|
@@ -6148,7 +6141,7 @@ function setHooks(hooks) {
|
|
|
6148
6141
|
hooksAreSet = true;
|
|
6149
6142
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6150
6143
|
}
|
|
6151
|
-
/* version: 2.
|
|
6144
|
+
/* version: 2.13.1 */
|
|
6152
6145
|
|
|
6153
6146
|
/*
|
|
6154
6147
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -6615,6 +6608,6 @@ function renderComponent(tagName, Ctor, props = {}) {
|
|
|
6615
6608
|
*/
|
|
6616
6609
|
freeze(LightningElement);
|
|
6617
6610
|
seal(LightningElement.prototype);
|
|
6618
|
-
/* version: 2.
|
|
6611
|
+
/* version: 2.13.1 */
|
|
6619
6612
|
|
|
6620
6613
|
export { LightningElement, api$1 as api, createContextProvider, getComponentDef, isComponentConstructor, readonly, register, registerComponent, registerDecorators, registerTemplate, renderComponent, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
|