lwc 2.5.8 → 2.5.11
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 +93 -68
- package/dist/engine-dom/iife/es2017/engine-dom.js +93 -68
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +77 -65
- package/dist/engine-dom/iife/es5/engine-dom.js +102 -73
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +86 -70
- package/dist/engine-dom/umd/es2017/engine-dom.js +93 -68
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +77 -65
- package/dist/engine-dom/umd/es5/engine-dom.js +102 -73
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +86 -70
- package/dist/engine-server/commonjs/es2017/engine-server.js +93 -68
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
- package/dist/engine-server/esm/es2017/engine-server.js +93 -68
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
- 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 +8 -8
|
@@ -73,7 +73,7 @@ const {
|
|
|
73
73
|
find: ArrayFind,
|
|
74
74
|
indexOf: ArrayIndexOf,
|
|
75
75
|
join: ArrayJoin,
|
|
76
|
-
map: ArrayMap
|
|
76
|
+
map: ArrayMap,
|
|
77
77
|
push: ArrayPush$1,
|
|
78
78
|
reduce: ArrayReduce,
|
|
79
79
|
reverse: ArrayReverse,
|
|
@@ -140,7 +140,7 @@ function toString$1(obj) {
|
|
|
140
140
|
// Array.prototype.toString directly will cause an error Iterate through
|
|
141
141
|
// all the items and handle individually.
|
|
142
142
|
if (isArray$1(obj)) {
|
|
143
|
-
return ArrayJoin.call(ArrayMap
|
|
143
|
+
return ArrayJoin.call(ArrayMap.call(obj, toString$1), ',');
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
return obj.toString();
|
|
@@ -339,7 +339,7 @@ function htmlPropertyToAttribute(propName) {
|
|
|
339
339
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
340
340
|
return attributeName;
|
|
341
341
|
}
|
|
342
|
-
/** version: 2.5.
|
|
342
|
+
/** version: 2.5.11 */
|
|
343
343
|
|
|
344
344
|
/*
|
|
345
345
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -460,7 +460,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
460
460
|
setFeatureFlag(name, value);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
/** version: 2.5.
|
|
463
|
+
/** version: 2.5.11 */
|
|
464
464
|
|
|
465
465
|
/* proxy-compat-disable */
|
|
466
466
|
|
|
@@ -1910,7 +1910,6 @@ const {
|
|
|
1910
1910
|
getPrototypeOf,
|
|
1911
1911
|
create: ObjectCreate,
|
|
1912
1912
|
defineProperty: ObjectDefineProperty,
|
|
1913
|
-
defineProperties: ObjectDefineProperties,
|
|
1914
1913
|
isExtensible,
|
|
1915
1914
|
getOwnPropertyDescriptor,
|
|
1916
1915
|
getOwnPropertyNames,
|
|
@@ -1920,8 +1919,7 @@ const {
|
|
|
1920
1919
|
} = Object;
|
|
1921
1920
|
const {
|
|
1922
1921
|
push: ArrayPush,
|
|
1923
|
-
concat: ArrayConcat
|
|
1924
|
-
map: ArrayMap
|
|
1922
|
+
concat: ArrayConcat
|
|
1925
1923
|
} = Array.prototype;
|
|
1926
1924
|
const OtS = {}.toString;
|
|
1927
1925
|
|
|
@@ -1986,7 +1984,9 @@ class BaseProxyHandler {
|
|
|
1986
1984
|
// but it will always be compatible with the previous descriptor
|
|
1987
1985
|
// to preserve the object invariants, which makes these lines safe.
|
|
1988
1986
|
|
|
1989
|
-
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key);
|
|
1987
|
+
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key); // TODO: it should be impossible for the originalDescriptor to ever be undefined, this `if` can be removed
|
|
1988
|
+
|
|
1989
|
+
/* istanbul ignore else */
|
|
1990
1990
|
|
|
1991
1991
|
if (!isUndefined(originalDescriptor)) {
|
|
1992
1992
|
const wrappedDesc = this.wrapDescriptor(originalDescriptor);
|
|
@@ -2014,11 +2014,17 @@ class BaseProxyHandler {
|
|
|
2014
2014
|
|
|
2015
2015
|
preventExtensions(shadowTarget);
|
|
2016
2016
|
} // Shared Traps
|
|
2017
|
+
// TODO: apply() is never called
|
|
2018
|
+
|
|
2019
|
+
/* istanbul ignore next */
|
|
2017
2020
|
|
|
2018
2021
|
|
|
2019
2022
|
apply(shadowTarget, thisArg, argArray) {
|
|
2020
2023
|
/* No op */
|
|
2021
|
-
}
|
|
2024
|
+
} // TODO: construct() is never called
|
|
2025
|
+
|
|
2026
|
+
/* istanbul ignore next */
|
|
2027
|
+
|
|
2022
2028
|
|
|
2023
2029
|
construct(shadowTarget, argArray, newTarget) {
|
|
2024
2030
|
/* No op */
|
|
@@ -2131,8 +2137,8 @@ class BaseProxyHandler {
|
|
|
2131
2137
|
|
|
2132
2138
|
}
|
|
2133
2139
|
|
|
2134
|
-
const getterMap = new WeakMap();
|
|
2135
|
-
const setterMap = new WeakMap();
|
|
2140
|
+
const getterMap$1 = new WeakMap();
|
|
2141
|
+
const setterMap$1 = new WeakMap();
|
|
2136
2142
|
const reverseGetterMap = new WeakMap();
|
|
2137
2143
|
const reverseSetterMap = new WeakMap();
|
|
2138
2144
|
|
|
@@ -2142,7 +2148,7 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2142
2148
|
}
|
|
2143
2149
|
|
|
2144
2150
|
wrapGetter(originalGet) {
|
|
2145
|
-
const wrappedGetter = getterMap.get(originalGet);
|
|
2151
|
+
const wrappedGetter = getterMap$1.get(originalGet);
|
|
2146
2152
|
|
|
2147
2153
|
if (!isUndefined(wrappedGetter)) {
|
|
2148
2154
|
return wrappedGetter;
|
|
@@ -2155,13 +2161,13 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2155
2161
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
2156
2162
|
};
|
|
2157
2163
|
|
|
2158
|
-
getterMap.set(originalGet, get);
|
|
2164
|
+
getterMap$1.set(originalGet, get);
|
|
2159
2165
|
reverseGetterMap.set(get, originalGet);
|
|
2160
2166
|
return get;
|
|
2161
2167
|
}
|
|
2162
2168
|
|
|
2163
2169
|
wrapSetter(originalSet) {
|
|
2164
|
-
const wrappedSetter = setterMap.get(originalSet);
|
|
2170
|
+
const wrappedSetter = setterMap$1.get(originalSet);
|
|
2165
2171
|
|
|
2166
2172
|
if (!isUndefined(wrappedSetter)) {
|
|
2167
2173
|
return wrappedSetter;
|
|
@@ -2172,7 +2178,7 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2172
2178
|
originalSet.call(unwrap$1(this), unwrap$1(v));
|
|
2173
2179
|
};
|
|
2174
2180
|
|
|
2175
|
-
setterMap.set(originalSet, set);
|
|
2181
|
+
setterMap$1.set(originalSet, set);
|
|
2176
2182
|
reverseSetterMap.set(set, originalSet);
|
|
2177
2183
|
return set;
|
|
2178
2184
|
}
|
|
@@ -2213,7 +2219,7 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2213
2219
|
return unwrap$1(redGet.call(handler.wrapValue(this)));
|
|
2214
2220
|
};
|
|
2215
2221
|
|
|
2216
|
-
getterMap.set(get, redGet);
|
|
2222
|
+
getterMap$1.set(get, redGet);
|
|
2217
2223
|
reverseGetterMap.set(redGet, get);
|
|
2218
2224
|
return get;
|
|
2219
2225
|
}
|
|
@@ -2232,7 +2238,7 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2232
2238
|
redSet.call(handler.wrapValue(this), handler.wrapValue(v));
|
|
2233
2239
|
};
|
|
2234
2240
|
|
|
2235
|
-
setterMap.set(set, redSet);
|
|
2241
|
+
setterMap$1.set(set, redSet);
|
|
2236
2242
|
reverseSetterMap.set(redSet, set);
|
|
2237
2243
|
return set;
|
|
2238
2244
|
}
|
|
@@ -2273,6 +2279,7 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2273
2279
|
}
|
|
2274
2280
|
|
|
2275
2281
|
setPrototypeOf(shadowTarget, prototype) {
|
|
2282
|
+
/* istanbul ignore else */
|
|
2276
2283
|
if (process.env.NODE_ENV !== 'production') {
|
|
2277
2284
|
throw new Error(`Invalid setPrototypeOf invocation for reactive proxy ${toString(this.originalTarget)}. Prototype of reactive objects cannot be changed.`);
|
|
2278
2285
|
}
|
|
@@ -2286,6 +2293,11 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2286
2293
|
preventExtensions(originalTarget); // if the originalTarget is a proxy itself, it might reject
|
|
2287
2294
|
// the preventExtension call, in which case we should not attempt to lock down
|
|
2288
2295
|
// the shadow target.
|
|
2296
|
+
// TODO: It should not actually be possible to reach this `if` statement.
|
|
2297
|
+
// If a proxy rejects extensions, then calling preventExtensions will throw an error:
|
|
2298
|
+
// https://codepen.io/nolanlawson-the-selector/pen/QWMOjbY
|
|
2299
|
+
|
|
2300
|
+
/* istanbul ignore if */
|
|
2289
2301
|
|
|
2290
2302
|
if (isExtensible(originalTarget)) {
|
|
2291
2303
|
return false;
|
|
@@ -2327,8 +2339,8 @@ class ReactiveProxyHandler extends BaseProxyHandler {
|
|
|
2327
2339
|
|
|
2328
2340
|
}
|
|
2329
2341
|
|
|
2330
|
-
const getterMap
|
|
2331
|
-
const setterMap
|
|
2342
|
+
const getterMap = new WeakMap();
|
|
2343
|
+
const setterMap = new WeakMap();
|
|
2332
2344
|
|
|
2333
2345
|
class ReadOnlyHandler extends BaseProxyHandler {
|
|
2334
2346
|
wrapValue(value) {
|
|
@@ -2336,7 +2348,7 @@ class ReadOnlyHandler extends BaseProxyHandler {
|
|
|
2336
2348
|
}
|
|
2337
2349
|
|
|
2338
2350
|
wrapGetter(originalGet) {
|
|
2339
|
-
const wrappedGetter = getterMap
|
|
2351
|
+
const wrappedGetter = getterMap.get(originalGet);
|
|
2340
2352
|
|
|
2341
2353
|
if (!isUndefined(wrappedGetter)) {
|
|
2342
2354
|
return wrappedGetter;
|
|
@@ -2349,12 +2361,12 @@ class ReadOnlyHandler extends BaseProxyHandler {
|
|
|
2349
2361
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
2350
2362
|
};
|
|
2351
2363
|
|
|
2352
|
-
getterMap
|
|
2364
|
+
getterMap.set(originalGet, get);
|
|
2353
2365
|
return get;
|
|
2354
2366
|
}
|
|
2355
2367
|
|
|
2356
2368
|
wrapSetter(originalSet) {
|
|
2357
|
-
const wrappedSetter = setterMap
|
|
2369
|
+
const wrappedSetter = setterMap.get(originalSet);
|
|
2358
2370
|
|
|
2359
2371
|
if (!isUndefined(wrappedSetter)) {
|
|
2360
2372
|
return wrappedSetter;
|
|
@@ -2363,6 +2375,7 @@ class ReadOnlyHandler extends BaseProxyHandler {
|
|
|
2363
2375
|
const handler = this;
|
|
2364
2376
|
|
|
2365
2377
|
const set = function (v) {
|
|
2378
|
+
/* istanbul ignore else */
|
|
2366
2379
|
if (process.env.NODE_ENV !== 'production') {
|
|
2367
2380
|
const {
|
|
2368
2381
|
originalTarget
|
|
@@ -2371,33 +2384,41 @@ class ReadOnlyHandler extends BaseProxyHandler {
|
|
|
2371
2384
|
}
|
|
2372
2385
|
};
|
|
2373
2386
|
|
|
2374
|
-
setterMap
|
|
2387
|
+
setterMap.set(originalSet, set);
|
|
2375
2388
|
return set;
|
|
2376
2389
|
}
|
|
2377
2390
|
|
|
2378
2391
|
set(shadowTarget, key, value) {
|
|
2392
|
+
/* istanbul ignore else */
|
|
2379
2393
|
if (process.env.NODE_ENV !== 'production') {
|
|
2380
2394
|
const {
|
|
2381
2395
|
originalTarget
|
|
2382
2396
|
} = this;
|
|
2383
|
-
|
|
2397
|
+
const msg = isArray(originalTarget) ? `Invalid mutation: Cannot mutate array at index ${key.toString()}. Array is read-only.` : `Invalid mutation: Cannot set "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`;
|
|
2398
|
+
throw new Error(msg);
|
|
2384
2399
|
}
|
|
2400
|
+
/* istanbul ignore next */
|
|
2401
|
+
|
|
2385
2402
|
|
|
2386
2403
|
return false;
|
|
2387
2404
|
}
|
|
2388
2405
|
|
|
2389
2406
|
deleteProperty(shadowTarget, key) {
|
|
2407
|
+
/* istanbul ignore else */
|
|
2390
2408
|
if (process.env.NODE_ENV !== 'production') {
|
|
2391
2409
|
const {
|
|
2392
2410
|
originalTarget
|
|
2393
2411
|
} = this;
|
|
2394
2412
|
throw new Error(`Invalid mutation: Cannot delete "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
|
|
2395
2413
|
}
|
|
2414
|
+
/* istanbul ignore next */
|
|
2415
|
+
|
|
2396
2416
|
|
|
2397
2417
|
return false;
|
|
2398
2418
|
}
|
|
2399
2419
|
|
|
2400
2420
|
setPrototypeOf(shadowTarget, prototype) {
|
|
2421
|
+
/* istanbul ignore else */
|
|
2401
2422
|
if (process.env.NODE_ENV !== 'production') {
|
|
2402
2423
|
const {
|
|
2403
2424
|
originalTarget
|
|
@@ -2407,23 +2428,29 @@ class ReadOnlyHandler extends BaseProxyHandler {
|
|
|
2407
2428
|
}
|
|
2408
2429
|
|
|
2409
2430
|
preventExtensions(shadowTarget) {
|
|
2431
|
+
/* istanbul ignore else */
|
|
2410
2432
|
if (process.env.NODE_ENV !== 'production') {
|
|
2411
2433
|
const {
|
|
2412
2434
|
originalTarget
|
|
2413
2435
|
} = this;
|
|
2414
2436
|
throw new Error(`Invalid mutation: Cannot preventExtensions on ${originalTarget}". "${originalTarget} is read-only.`);
|
|
2415
2437
|
}
|
|
2438
|
+
/* istanbul ignore next */
|
|
2439
|
+
|
|
2416
2440
|
|
|
2417
2441
|
return false;
|
|
2418
2442
|
}
|
|
2419
2443
|
|
|
2420
2444
|
defineProperty(shadowTarget, key, descriptor) {
|
|
2445
|
+
/* istanbul ignore else */
|
|
2421
2446
|
if (process.env.NODE_ENV !== 'production') {
|
|
2422
2447
|
const {
|
|
2423
2448
|
originalTarget
|
|
2424
2449
|
} = this;
|
|
2425
2450
|
throw new Error(`Invalid mutation: Cannot defineProperty "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
|
|
2426
2451
|
}
|
|
2452
|
+
/* istanbul ignore next */
|
|
2453
|
+
|
|
2427
2454
|
|
|
2428
2455
|
return false;
|
|
2429
2456
|
}
|
|
@@ -2481,6 +2508,8 @@ const formatter = {
|
|
|
2481
2508
|
}; // Inspired from paulmillr/es6-shim
|
|
2482
2509
|
// https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L176-L185
|
|
2483
2510
|
|
|
2511
|
+
/* istanbul ignore next */
|
|
2512
|
+
|
|
2484
2513
|
function getGlobal() {
|
|
2485
2514
|
// the only reliable means to get the global object is `Function('return this')()`
|
|
2486
2515
|
// However, this causes CSP violations in Chrome apps.
|
|
@@ -2505,6 +2534,7 @@ function getGlobal() {
|
|
|
2505
2534
|
}
|
|
2506
2535
|
|
|
2507
2536
|
function init() {
|
|
2537
|
+
/* istanbul ignore if */
|
|
2508
2538
|
if (process.env.NODE_ENV === 'production') {
|
|
2509
2539
|
// this method should never leak to prod
|
|
2510
2540
|
throw new ReferenceError();
|
|
@@ -2519,6 +2549,8 @@ function init() {
|
|
|
2519
2549
|
ArrayPush.call(devtoolsFormatters, formatter);
|
|
2520
2550
|
global.devtoolsFormatters = devtoolsFormatters;
|
|
2521
2551
|
}
|
|
2552
|
+
/* istanbul ignore else */
|
|
2553
|
+
|
|
2522
2554
|
|
|
2523
2555
|
if (process.env.NODE_ENV !== 'production') {
|
|
2524
2556
|
init();
|
|
@@ -2565,7 +2597,8 @@ class ReactiveMembrane {
|
|
|
2565
2597
|
this.valueMutated = defaultValueMutated;
|
|
2566
2598
|
this.valueObserved = defaultValueObserved;
|
|
2567
2599
|
this.valueIsObservable = defaultValueIsObservable;
|
|
2568
|
-
this.
|
|
2600
|
+
this.readOnlyObjectGraph = new WeakMap();
|
|
2601
|
+
this.reactiveObjectGraph = new WeakMap();
|
|
2569
2602
|
|
|
2570
2603
|
if (!isUndefined(options)) {
|
|
2571
2604
|
const {
|
|
@@ -2588,10 +2621,13 @@ class ReactiveMembrane {
|
|
|
2588
2621
|
const distorted = this.valueDistortion(unwrappedValue);
|
|
2589
2622
|
|
|
2590
2623
|
if (this.valueIsObservable(distorted)) {
|
|
2591
|
-
|
|
2592
|
-
|
|
2624
|
+
if (this.readOnlyObjectGraph.get(distorted) === value) {
|
|
2625
|
+
// when trying to extract the writable version of a readonly
|
|
2626
|
+
// we return the readonly.
|
|
2627
|
+
return value;
|
|
2628
|
+
}
|
|
2593
2629
|
|
|
2594
|
-
return
|
|
2630
|
+
return this.getReactiveHandler(unwrappedValue, distorted);
|
|
2595
2631
|
}
|
|
2596
2632
|
|
|
2597
2633
|
return distorted;
|
|
@@ -2602,7 +2638,7 @@ class ReactiveMembrane {
|
|
|
2602
2638
|
const distorted = this.valueDistortion(value);
|
|
2603
2639
|
|
|
2604
2640
|
if (this.valueIsObservable(distorted)) {
|
|
2605
|
-
return this.
|
|
2641
|
+
return this.getReadOnlyHandler(value, distorted);
|
|
2606
2642
|
}
|
|
2607
2643
|
|
|
2608
2644
|
return distorted;
|
|
@@ -2612,47 +2648,36 @@ class ReactiveMembrane {
|
|
|
2612
2648
|
return unwrap$1(p);
|
|
2613
2649
|
}
|
|
2614
2650
|
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
objectGraph
|
|
2618
|
-
} = this;
|
|
2619
|
-
let reactiveState = objectGraph.get(distortedValue);
|
|
2651
|
+
getReactiveHandler(value, distortedValue) {
|
|
2652
|
+
let proxy = this.reactiveObjectGraph.get(distortedValue);
|
|
2620
2653
|
|
|
2621
|
-
if (
|
|
2622
|
-
|
|
2654
|
+
if (isUndefined(proxy)) {
|
|
2655
|
+
// caching the proxy after the first time it is accessed
|
|
2656
|
+
const handler = new ReactiveProxyHandler(this, distortedValue);
|
|
2657
|
+
proxy = new Proxy(createShadowTarget(distortedValue), handler);
|
|
2658
|
+
registerProxy(proxy, value);
|
|
2659
|
+
this.reactiveObjectGraph.set(distortedValue, proxy);
|
|
2623
2660
|
}
|
|
2624
2661
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
get reactive() {
|
|
2628
|
-
const reactiveHandler = new ReactiveProxyHandler(membrane, distortedValue); // caching the reactive proxy after the first time it is accessed
|
|
2629
|
-
|
|
2630
|
-
const proxy = new Proxy(createShadowTarget(distortedValue), reactiveHandler);
|
|
2631
|
-
registerProxy(proxy, value);
|
|
2632
|
-
ObjectDefineProperty(this, 'reactive', {
|
|
2633
|
-
value: proxy
|
|
2634
|
-
});
|
|
2635
|
-
return proxy;
|
|
2636
|
-
},
|
|
2662
|
+
return proxy;
|
|
2663
|
+
}
|
|
2637
2664
|
|
|
2638
|
-
|
|
2639
|
-
|
|
2665
|
+
getReadOnlyHandler(value, distortedValue) {
|
|
2666
|
+
let proxy = this.readOnlyObjectGraph.get(distortedValue);
|
|
2640
2667
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2668
|
+
if (isUndefined(proxy)) {
|
|
2669
|
+
// caching the proxy after the first time it is accessed
|
|
2670
|
+
const handler = new ReadOnlyHandler(this, distortedValue);
|
|
2671
|
+
proxy = new Proxy(createShadowTarget(distortedValue), handler);
|
|
2672
|
+
registerProxy(proxy, value);
|
|
2673
|
+
this.readOnlyObjectGraph.set(distortedValue, proxy);
|
|
2674
|
+
}
|
|
2648
2675
|
|
|
2649
|
-
|
|
2650
|
-
objectGraph.set(distortedValue, reactiveState);
|
|
2651
|
-
return reactiveState;
|
|
2676
|
+
return proxy;
|
|
2652
2677
|
}
|
|
2653
2678
|
|
|
2654
2679
|
}
|
|
2655
|
-
/** version: 1.
|
|
2680
|
+
/** version: 1.1.5 */
|
|
2656
2681
|
|
|
2657
2682
|
/*
|
|
2658
2683
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4684,7 +4709,7 @@ function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
|
|
|
4684
4709
|
for (const [attrName, attrValue] of Object.entries(attrs)) {
|
|
4685
4710
|
const elmAttrValue = renderer.getAttribute(elm, attrName);
|
|
4686
4711
|
|
|
4687
|
-
if (attrValue !== elmAttrValue) {
|
|
4712
|
+
if (String(attrValue) !== elmAttrValue) {
|
|
4688
4713
|
logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
|
|
4689
4714
|
nodesAreCompatible = false;
|
|
4690
4715
|
}
|
|
@@ -4706,7 +4731,7 @@ function vnodesAndElementHaveCompatibleClass(vnode, elm) {
|
|
|
4706
4731
|
let nodesAreCompatible = true;
|
|
4707
4732
|
let vnodeClassName;
|
|
4708
4733
|
|
|
4709
|
-
if (!isUndefined$1(className) && className !== elm.className) {
|
|
4734
|
+
if (!isUndefined$1(className) && String(className) !== elm.className) {
|
|
4710
4735
|
// className is used when class is bound to an expr.
|
|
4711
4736
|
nodesAreCompatible = false;
|
|
4712
4737
|
vnodeClassName = className;
|
|
@@ -5507,7 +5532,7 @@ function co(text) {
|
|
|
5507
5532
|
|
|
5508
5533
|
|
|
5509
5534
|
function d(value) {
|
|
5510
|
-
return value == null ? '' : value;
|
|
5535
|
+
return value == null ? '' : String(value);
|
|
5511
5536
|
} // [b]ind function
|
|
5512
5537
|
|
|
5513
5538
|
|
|
@@ -5883,7 +5908,7 @@ function createStylesheet(vm, stylesheets) {
|
|
|
5883
5908
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
5884
5909
|
renderer.insertGlobalStylesheet(stylesheets[i]);
|
|
5885
5910
|
}
|
|
5886
|
-
} else if (renderer.ssr || renderer.isHydrating) {
|
|
5911
|
+
} else if (renderer.ssr || renderer.isHydrating()) {
|
|
5887
5912
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
5888
5913
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
5889
5914
|
// the first time the VM renders.
|
|
@@ -7532,7 +7557,7 @@ function setHooks(hooks) {
|
|
|
7532
7557
|
hooksAreSet = true;
|
|
7533
7558
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7534
7559
|
}
|
|
7535
|
-
/* version: 2.5.
|
|
7560
|
+
/* version: 2.5.11 */
|
|
7536
7561
|
|
|
7537
7562
|
/*
|
|
7538
7563
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -7625,7 +7650,7 @@ class HTMLElement$1 {
|
|
|
7625
7650
|
const renderer = {
|
|
7626
7651
|
ssr: true,
|
|
7627
7652
|
|
|
7628
|
-
|
|
7653
|
+
isHydrating() {
|
|
7629
7654
|
return false;
|
|
7630
7655
|
},
|
|
7631
7656
|
|
|
@@ -8028,7 +8053,7 @@ function renderComponent(tagName, Ctor, props = {}) {
|
|
|
8028
8053
|
|
|
8029
8054
|
freeze(LightningElement);
|
|
8030
8055
|
seal(LightningElement.prototype);
|
|
8031
|
-
/* version: 2.5.
|
|
8056
|
+
/* version: 2.5.11 */
|
|
8032
8057
|
|
|
8033
8058
|
exports.LightningElement = LightningElement;
|
|
8034
8059
|
exports.api = api$1;
|