lwc 2.5.9 → 2.5.10-alpha1
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/esm/es2017/engine.js +7981 -0
- package/dist/engine/iife/es2017/engine.js +8013 -0
- package/dist/engine/iife/es2017/engine.min.js +9 -0
- package/dist/engine/iife/es2017/engine_debug.js +6541 -0
- package/dist/engine/iife/es5/engine.js +6060 -0
- package/dist/engine/iife/es5/engine.min.js +23 -0
- package/dist/engine/iife/es5/engine_debug.js +4856 -0
- package/dist/engine/umd/es2017/engine.js +8014 -0
- package/dist/engine/umd/es2017/engine.min.js +9 -0
- package/dist/engine/umd/es2017/engine_debug.js +6542 -0
- package/dist/engine/umd/es5/engine.js +6061 -0
- package/dist/engine/umd/es5/engine.min.js +23 -0
- package/dist/engine/umd/es5/engine_debug.js +4857 -0
- package/dist/engine-dom/esm/es2017/engine-dom.js +75 -136
- package/dist/engine-dom/iife/es2017/engine-dom.js +76 -137
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +74 -122
- package/dist/engine-dom/iife/es5/engine-dom.js +75 -142
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +73 -127
- package/dist/engine-dom/umd/es2017/engine-dom.js +77 -138
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +75 -123
- package/dist/engine-dom/umd/es5/engine-dom.js +76 -143
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +74 -128
- package/dist/engine-server/commonjs/es2017/engine-server.js +75 -136
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
- package/dist/engine-server/esm/es2017/engine-server.js +75 -136
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +4 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +4 -4
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +5 -5
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +5 -5
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +5 -5
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +5 -5
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +3 -3
- package/dist/wire-service/iife/es2017/wire-service_debug.js +3 -3
- package/dist/wire-service/iife/es5/wire-service.js +3 -3
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
- package/dist/wire-service/umd/es2017/wire-service.js +4 -4
- package/dist/wire-service/umd/es2017/wire-service_debug.js +4 -4
- package/dist/wire-service/umd/es5/wire-service.js +4 -4
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +4 -4
- package/package.json +8 -8
|
@@ -72,7 +72,7 @@ var LWC = (function (exports) {
|
|
|
72
72
|
find: ArrayFind,
|
|
73
73
|
indexOf: ArrayIndexOf,
|
|
74
74
|
join: ArrayJoin,
|
|
75
|
-
map: ArrayMap,
|
|
75
|
+
map: ArrayMap$1,
|
|
76
76
|
push: ArrayPush$1,
|
|
77
77
|
reduce: ArrayReduce,
|
|
78
78
|
reverse: ArrayReverse,
|
|
@@ -139,7 +139,7 @@ var LWC = (function (exports) {
|
|
|
139
139
|
// Array.prototype.toString directly will cause an error Iterate through
|
|
140
140
|
// all the items and handle individually.
|
|
141
141
|
if (isArray$1(obj)) {
|
|
142
|
-
return ArrayJoin.call(ArrayMap.call(obj, toString$1), ',');
|
|
142
|
+
return ArrayJoin.call(ArrayMap$1.call(obj, toString$1), ',');
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
return obj.toString();
|
|
@@ -302,7 +302,7 @@ var LWC = (function (exports) {
|
|
|
302
302
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
303
303
|
return attributeName;
|
|
304
304
|
}
|
|
305
|
-
/** version: 2.5.
|
|
305
|
+
/** version: 2.5.10-alpha1 */
|
|
306
306
|
|
|
307
307
|
/*
|
|
308
308
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -482,7 +482,7 @@ var LWC = (function (exports) {
|
|
|
482
482
|
setFeatureFlag(name, value);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
/** version: 2.5.
|
|
485
|
+
/** version: 2.5.10-alpha1 */
|
|
486
486
|
|
|
487
487
|
/* proxy-compat-disable */
|
|
488
488
|
|
|
@@ -1932,6 +1932,7 @@ var LWC = (function (exports) {
|
|
|
1932
1932
|
getPrototypeOf,
|
|
1933
1933
|
create: ObjectCreate,
|
|
1934
1934
|
defineProperty: ObjectDefineProperty,
|
|
1935
|
+
defineProperties: ObjectDefineProperties,
|
|
1935
1936
|
isExtensible,
|
|
1936
1937
|
getOwnPropertyDescriptor,
|
|
1937
1938
|
getOwnPropertyNames,
|
|
@@ -1941,7 +1942,8 @@ var LWC = (function (exports) {
|
|
|
1941
1942
|
} = Object;
|
|
1942
1943
|
const {
|
|
1943
1944
|
push: ArrayPush,
|
|
1944
|
-
concat: ArrayConcat
|
|
1945
|
+
concat: ArrayConcat,
|
|
1946
|
+
map: ArrayMap
|
|
1945
1947
|
} = Array.prototype;
|
|
1946
1948
|
const OtS = {}.toString;
|
|
1947
1949
|
|
|
@@ -2006,9 +2008,7 @@ var LWC = (function (exports) {
|
|
|
2006
2008
|
// but it will always be compatible with the previous descriptor
|
|
2007
2009
|
// to preserve the object invariants, which makes these lines safe.
|
|
2008
2010
|
|
|
2009
|
-
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key);
|
|
2010
|
-
|
|
2011
|
-
/* istanbul ignore else */
|
|
2011
|
+
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key);
|
|
2012
2012
|
|
|
2013
2013
|
if (!isUndefined(originalDescriptor)) {
|
|
2014
2014
|
const wrappedDesc = this.wrapDescriptor(originalDescriptor);
|
|
@@ -2036,17 +2036,11 @@ var LWC = (function (exports) {
|
|
|
2036
2036
|
|
|
2037
2037
|
preventExtensions(shadowTarget);
|
|
2038
2038
|
} // Shared Traps
|
|
2039
|
-
// TODO: apply() is never called
|
|
2040
|
-
|
|
2041
|
-
/* istanbul ignore next */
|
|
2042
2039
|
|
|
2043
2040
|
|
|
2044
2041
|
apply(shadowTarget, thisArg, argArray) {
|
|
2045
2042
|
/* No op */
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
/* istanbul ignore next */
|
|
2049
|
-
|
|
2043
|
+
}
|
|
2050
2044
|
|
|
2051
2045
|
construct(shadowTarget, argArray, newTarget) {
|
|
2052
2046
|
/* No op */
|
|
@@ -2159,8 +2153,8 @@ var LWC = (function (exports) {
|
|
|
2159
2153
|
|
|
2160
2154
|
}
|
|
2161
2155
|
|
|
2162
|
-
const getterMap
|
|
2163
|
-
const setterMap
|
|
2156
|
+
const getterMap = new WeakMap();
|
|
2157
|
+
const setterMap = new WeakMap();
|
|
2164
2158
|
const reverseGetterMap = new WeakMap();
|
|
2165
2159
|
const reverseSetterMap = new WeakMap();
|
|
2166
2160
|
|
|
@@ -2170,7 +2164,7 @@ var LWC = (function (exports) {
|
|
|
2170
2164
|
}
|
|
2171
2165
|
|
|
2172
2166
|
wrapGetter(originalGet) {
|
|
2173
|
-
const wrappedGetter = getterMap
|
|
2167
|
+
const wrappedGetter = getterMap.get(originalGet);
|
|
2174
2168
|
|
|
2175
2169
|
if (!isUndefined(wrappedGetter)) {
|
|
2176
2170
|
return wrappedGetter;
|
|
@@ -2183,13 +2177,13 @@ var LWC = (function (exports) {
|
|
|
2183
2177
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
2184
2178
|
};
|
|
2185
2179
|
|
|
2186
|
-
getterMap
|
|
2180
|
+
getterMap.set(originalGet, get);
|
|
2187
2181
|
reverseGetterMap.set(get, originalGet);
|
|
2188
2182
|
return get;
|
|
2189
2183
|
}
|
|
2190
2184
|
|
|
2191
2185
|
wrapSetter(originalSet) {
|
|
2192
|
-
const wrappedSetter = setterMap
|
|
2186
|
+
const wrappedSetter = setterMap.get(originalSet);
|
|
2193
2187
|
|
|
2194
2188
|
if (!isUndefined(wrappedSetter)) {
|
|
2195
2189
|
return wrappedSetter;
|
|
@@ -2200,7 +2194,7 @@ var LWC = (function (exports) {
|
|
|
2200
2194
|
originalSet.call(unwrap$1(this), unwrap$1(v));
|
|
2201
2195
|
};
|
|
2202
2196
|
|
|
2203
|
-
setterMap
|
|
2197
|
+
setterMap.set(originalSet, set);
|
|
2204
2198
|
reverseSetterMap.set(set, originalSet);
|
|
2205
2199
|
return set;
|
|
2206
2200
|
}
|
|
@@ -2241,7 +2235,7 @@ var LWC = (function (exports) {
|
|
|
2241
2235
|
return unwrap$1(redGet.call(handler.wrapValue(this)));
|
|
2242
2236
|
};
|
|
2243
2237
|
|
|
2244
|
-
getterMap
|
|
2238
|
+
getterMap.set(get, redGet);
|
|
2245
2239
|
reverseGetterMap.set(redGet, get);
|
|
2246
2240
|
return get;
|
|
2247
2241
|
}
|
|
@@ -2260,7 +2254,7 @@ var LWC = (function (exports) {
|
|
|
2260
2254
|
redSet.call(handler.wrapValue(this), handler.wrapValue(v));
|
|
2261
2255
|
};
|
|
2262
2256
|
|
|
2263
|
-
setterMap
|
|
2257
|
+
setterMap.set(set, redSet);
|
|
2264
2258
|
reverseSetterMap.set(redSet, set);
|
|
2265
2259
|
return set;
|
|
2266
2260
|
}
|
|
@@ -2301,7 +2295,6 @@ var LWC = (function (exports) {
|
|
|
2301
2295
|
}
|
|
2302
2296
|
|
|
2303
2297
|
setPrototypeOf(shadowTarget, prototype) {
|
|
2304
|
-
/* istanbul ignore else */
|
|
2305
2298
|
if (process.env.NODE_ENV !== 'production') {
|
|
2306
2299
|
throw new Error(`Invalid setPrototypeOf invocation for reactive proxy ${toString(this.originalTarget)}. Prototype of reactive objects cannot be changed.`);
|
|
2307
2300
|
}
|
|
@@ -2315,11 +2308,6 @@ var LWC = (function (exports) {
|
|
|
2315
2308
|
preventExtensions(originalTarget); // if the originalTarget is a proxy itself, it might reject
|
|
2316
2309
|
// the preventExtension call, in which case we should not attempt to lock down
|
|
2317
2310
|
// the shadow target.
|
|
2318
|
-
// TODO: It should not actually be possible to reach this `if` statement.
|
|
2319
|
-
// If a proxy rejects extensions, then calling preventExtensions will throw an error:
|
|
2320
|
-
// https://codepen.io/nolanlawson-the-selector/pen/QWMOjbY
|
|
2321
|
-
|
|
2322
|
-
/* istanbul ignore if */
|
|
2323
2311
|
|
|
2324
2312
|
if (isExtensible(originalTarget)) {
|
|
2325
2313
|
return false;
|
|
@@ -2361,8 +2349,8 @@ var LWC = (function (exports) {
|
|
|
2361
2349
|
|
|
2362
2350
|
}
|
|
2363
2351
|
|
|
2364
|
-
const getterMap = new WeakMap();
|
|
2365
|
-
const setterMap = new WeakMap();
|
|
2352
|
+
const getterMap$1 = new WeakMap();
|
|
2353
|
+
const setterMap$1 = new WeakMap();
|
|
2366
2354
|
|
|
2367
2355
|
class ReadOnlyHandler extends BaseProxyHandler {
|
|
2368
2356
|
wrapValue(value) {
|
|
@@ -2370,7 +2358,7 @@ var LWC = (function (exports) {
|
|
|
2370
2358
|
}
|
|
2371
2359
|
|
|
2372
2360
|
wrapGetter(originalGet) {
|
|
2373
|
-
const wrappedGetter = getterMap.get(originalGet);
|
|
2361
|
+
const wrappedGetter = getterMap$1.get(originalGet);
|
|
2374
2362
|
|
|
2375
2363
|
if (!isUndefined(wrappedGetter)) {
|
|
2376
2364
|
return wrappedGetter;
|
|
@@ -2383,12 +2371,12 @@ var LWC = (function (exports) {
|
|
|
2383
2371
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
2384
2372
|
};
|
|
2385
2373
|
|
|
2386
|
-
getterMap.set(originalGet, get);
|
|
2374
|
+
getterMap$1.set(originalGet, get);
|
|
2387
2375
|
return get;
|
|
2388
2376
|
}
|
|
2389
2377
|
|
|
2390
2378
|
wrapSetter(originalSet) {
|
|
2391
|
-
const wrappedSetter = setterMap.get(originalSet);
|
|
2379
|
+
const wrappedSetter = setterMap$1.get(originalSet);
|
|
2392
2380
|
|
|
2393
2381
|
if (!isUndefined(wrappedSetter)) {
|
|
2394
2382
|
return wrappedSetter;
|
|
@@ -2397,7 +2385,6 @@ var LWC = (function (exports) {
|
|
|
2397
2385
|
const handler = this;
|
|
2398
2386
|
|
|
2399
2387
|
const set = function (v) {
|
|
2400
|
-
/* istanbul ignore else */
|
|
2401
2388
|
if (process.env.NODE_ENV !== 'production') {
|
|
2402
2389
|
const {
|
|
2403
2390
|
originalTarget
|
|
@@ -2406,41 +2393,33 @@ var LWC = (function (exports) {
|
|
|
2406
2393
|
}
|
|
2407
2394
|
};
|
|
2408
2395
|
|
|
2409
|
-
setterMap.set(originalSet, set);
|
|
2396
|
+
setterMap$1.set(originalSet, set);
|
|
2410
2397
|
return set;
|
|
2411
2398
|
}
|
|
2412
2399
|
|
|
2413
2400
|
set(shadowTarget, key, value) {
|
|
2414
|
-
/* istanbul ignore else */
|
|
2415
2401
|
if (process.env.NODE_ENV !== 'production') {
|
|
2416
2402
|
const {
|
|
2417
2403
|
originalTarget
|
|
2418
2404
|
} = this;
|
|
2419
|
-
|
|
2420
|
-
throw new Error(msg);
|
|
2405
|
+
throw new Error(`Invalid mutation: Cannot set "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
|
|
2421
2406
|
}
|
|
2422
|
-
/* istanbul ignore next */
|
|
2423
|
-
|
|
2424
2407
|
|
|
2425
2408
|
return false;
|
|
2426
2409
|
}
|
|
2427
2410
|
|
|
2428
2411
|
deleteProperty(shadowTarget, key) {
|
|
2429
|
-
/* istanbul ignore else */
|
|
2430
2412
|
if (process.env.NODE_ENV !== 'production') {
|
|
2431
2413
|
const {
|
|
2432
2414
|
originalTarget
|
|
2433
2415
|
} = this;
|
|
2434
2416
|
throw new Error(`Invalid mutation: Cannot delete "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
|
|
2435
2417
|
}
|
|
2436
|
-
/* istanbul ignore next */
|
|
2437
|
-
|
|
2438
2418
|
|
|
2439
2419
|
return false;
|
|
2440
2420
|
}
|
|
2441
2421
|
|
|
2442
2422
|
setPrototypeOf(shadowTarget, prototype) {
|
|
2443
|
-
/* istanbul ignore else */
|
|
2444
2423
|
if (process.env.NODE_ENV !== 'production') {
|
|
2445
2424
|
const {
|
|
2446
2425
|
originalTarget
|
|
@@ -2450,29 +2429,23 @@ var LWC = (function (exports) {
|
|
|
2450
2429
|
}
|
|
2451
2430
|
|
|
2452
2431
|
preventExtensions(shadowTarget) {
|
|
2453
|
-
/* istanbul ignore else */
|
|
2454
2432
|
if (process.env.NODE_ENV !== 'production') {
|
|
2455
2433
|
const {
|
|
2456
2434
|
originalTarget
|
|
2457
2435
|
} = this;
|
|
2458
2436
|
throw new Error(`Invalid mutation: Cannot preventExtensions on ${originalTarget}". "${originalTarget} is read-only.`);
|
|
2459
2437
|
}
|
|
2460
|
-
/* istanbul ignore next */
|
|
2461
|
-
|
|
2462
2438
|
|
|
2463
2439
|
return false;
|
|
2464
2440
|
}
|
|
2465
2441
|
|
|
2466
2442
|
defineProperty(shadowTarget, key, descriptor) {
|
|
2467
|
-
/* istanbul ignore else */
|
|
2468
2443
|
if (process.env.NODE_ENV !== 'production') {
|
|
2469
2444
|
const {
|
|
2470
2445
|
originalTarget
|
|
2471
2446
|
} = this;
|
|
2472
2447
|
throw new Error(`Invalid mutation: Cannot defineProperty "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
|
|
2473
2448
|
}
|
|
2474
|
-
/* istanbul ignore next */
|
|
2475
|
-
|
|
2476
2449
|
|
|
2477
2450
|
return false;
|
|
2478
2451
|
}
|
|
@@ -2530,8 +2503,6 @@ var LWC = (function (exports) {
|
|
|
2530
2503
|
}; // Inspired from paulmillr/es6-shim
|
|
2531
2504
|
// https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L176-L185
|
|
2532
2505
|
|
|
2533
|
-
/* istanbul ignore next */
|
|
2534
|
-
|
|
2535
2506
|
function getGlobal() {
|
|
2536
2507
|
// the only reliable means to get the global object is `Function('return this')()`
|
|
2537
2508
|
// However, this causes CSP violations in Chrome apps.
|
|
@@ -2556,7 +2527,6 @@ var LWC = (function (exports) {
|
|
|
2556
2527
|
}
|
|
2557
2528
|
|
|
2558
2529
|
function init() {
|
|
2559
|
-
/* istanbul ignore if */
|
|
2560
2530
|
if (process.env.NODE_ENV === 'production') {
|
|
2561
2531
|
// this method should never leak to prod
|
|
2562
2532
|
throw new ReferenceError();
|
|
@@ -2571,8 +2541,6 @@ var LWC = (function (exports) {
|
|
|
2571
2541
|
ArrayPush.call(devtoolsFormatters, formatter);
|
|
2572
2542
|
global.devtoolsFormatters = devtoolsFormatters;
|
|
2573
2543
|
}
|
|
2574
|
-
/* istanbul ignore else */
|
|
2575
|
-
|
|
2576
2544
|
|
|
2577
2545
|
if (process.env.NODE_ENV !== 'production') {
|
|
2578
2546
|
init();
|
|
@@ -2619,8 +2587,7 @@ var LWC = (function (exports) {
|
|
|
2619
2587
|
this.valueMutated = defaultValueMutated;
|
|
2620
2588
|
this.valueObserved = defaultValueObserved;
|
|
2621
2589
|
this.valueIsObservable = defaultValueIsObservable;
|
|
2622
|
-
this.
|
|
2623
|
-
this.reactiveObjectGraph = new WeakMap();
|
|
2590
|
+
this.objectGraph = new WeakMap();
|
|
2624
2591
|
|
|
2625
2592
|
if (!isUndefined(options)) {
|
|
2626
2593
|
const {
|
|
@@ -2643,13 +2610,10 @@ var LWC = (function (exports) {
|
|
|
2643
2610
|
const distorted = this.valueDistortion(unwrappedValue);
|
|
2644
2611
|
|
|
2645
2612
|
if (this.valueIsObservable(distorted)) {
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
// we return the readonly.
|
|
2649
|
-
return value;
|
|
2650
|
-
}
|
|
2613
|
+
const o = this.getReactiveState(unwrappedValue, distorted); // when trying to extract the writable version of a readonly
|
|
2614
|
+
// we return the readonly.
|
|
2651
2615
|
|
|
2652
|
-
return
|
|
2616
|
+
return o.readOnly === value ? value : o.reactive;
|
|
2653
2617
|
}
|
|
2654
2618
|
|
|
2655
2619
|
return distorted;
|
|
@@ -2660,7 +2624,7 @@ var LWC = (function (exports) {
|
|
|
2660
2624
|
const distorted = this.valueDistortion(value);
|
|
2661
2625
|
|
|
2662
2626
|
if (this.valueIsObservable(distorted)) {
|
|
2663
|
-
return this.
|
|
2627
|
+
return this.getReactiveState(value, distorted).readOnly;
|
|
2664
2628
|
}
|
|
2665
2629
|
|
|
2666
2630
|
return distorted;
|
|
@@ -2670,36 +2634,47 @@ var LWC = (function (exports) {
|
|
|
2670
2634
|
return unwrap$1(p);
|
|
2671
2635
|
}
|
|
2672
2636
|
|
|
2673
|
-
|
|
2674
|
-
|
|
2637
|
+
getReactiveState(value, distortedValue) {
|
|
2638
|
+
const {
|
|
2639
|
+
objectGraph
|
|
2640
|
+
} = this;
|
|
2641
|
+
let reactiveState = objectGraph.get(distortedValue);
|
|
2675
2642
|
|
|
2676
|
-
if (
|
|
2677
|
-
|
|
2678
|
-
const handler = new ReactiveProxyHandler(this, distortedValue);
|
|
2679
|
-
proxy = new Proxy(createShadowTarget(distortedValue), handler);
|
|
2680
|
-
registerProxy(proxy, value);
|
|
2681
|
-
this.reactiveObjectGraph.set(distortedValue, proxy);
|
|
2643
|
+
if (reactiveState) {
|
|
2644
|
+
return reactiveState;
|
|
2682
2645
|
}
|
|
2683
2646
|
|
|
2684
|
-
|
|
2685
|
-
|
|
2647
|
+
const membrane = this;
|
|
2648
|
+
reactiveState = {
|
|
2649
|
+
get reactive() {
|
|
2650
|
+
const reactiveHandler = new ReactiveProxyHandler(membrane, distortedValue); // caching the reactive proxy after the first time it is accessed
|
|
2686
2651
|
|
|
2687
|
-
|
|
2688
|
-
|
|
2652
|
+
const proxy = new Proxy(createShadowTarget(distortedValue), reactiveHandler);
|
|
2653
|
+
registerProxy(proxy, value);
|
|
2654
|
+
ObjectDefineProperty(this, 'reactive', {
|
|
2655
|
+
value: proxy
|
|
2656
|
+
});
|
|
2657
|
+
return proxy;
|
|
2658
|
+
},
|
|
2689
2659
|
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2660
|
+
get readOnly() {
|
|
2661
|
+
const readOnlyHandler = new ReadOnlyHandler(membrane, distortedValue); // caching the readOnly proxy after the first time it is accessed
|
|
2662
|
+
|
|
2663
|
+
const proxy = new Proxy(createShadowTarget(distortedValue), readOnlyHandler);
|
|
2664
|
+
registerProxy(proxy, value);
|
|
2665
|
+
ObjectDefineProperty(this, 'readOnly', {
|
|
2666
|
+
value: proxy
|
|
2667
|
+
});
|
|
2668
|
+
return proxy;
|
|
2669
|
+
}
|
|
2697
2670
|
|
|
2698
|
-
|
|
2671
|
+
};
|
|
2672
|
+
objectGraph.set(distortedValue, reactiveState);
|
|
2673
|
+
return reactiveState;
|
|
2699
2674
|
}
|
|
2700
2675
|
|
|
2701
2676
|
}
|
|
2702
|
-
/** version: 1.
|
|
2677
|
+
/** version: 1.0.0 */
|
|
2703
2678
|
|
|
2704
2679
|
/*
|
|
2705
2680
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5965,7 +5940,6 @@ var LWC = (function (exports) {
|
|
|
5965
5940
|
|
|
5966
5941
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
5967
5942
|
const content = [];
|
|
5968
|
-
let root;
|
|
5969
5943
|
|
|
5970
5944
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
5971
5945
|
let stylesheet = stylesheets[i];
|
|
@@ -5978,46 +5952,23 @@ var LWC = (function (exports) {
|
|
|
5978
5952
|
// the component instance might be attempting to use an old version of
|
|
5979
5953
|
// the stylesheet, while internally, we have a replacement for it.
|
|
5980
5954
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
5981
|
-
}
|
|
5982
|
-
|
|
5983
|
-
const isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
5984
|
-
|
|
5985
|
-
const scopeToken = isScopedCss || vm.shadowMode === 1
|
|
5986
|
-
/* Synthetic */
|
|
5987
|
-
&& vm.renderMode === 1
|
|
5988
|
-
/* Shadow */
|
|
5989
|
-
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
5955
|
+
} // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
5990
5956
|
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
5991
5957
|
|
|
5958
|
+
|
|
5959
|
+
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
5992
5960
|
const useActualHostSelector = vm.renderMode === 0
|
|
5993
5961
|
/* Light */
|
|
5994
5962
|
? !isScopedCss : vm.shadowMode === 0
|
|
5995
5963
|
/* Native */
|
|
5996
|
-
; //
|
|
5997
|
-
// we use an attribute selector on the host to simulate :dir().
|
|
5998
|
-
|
|
5999
|
-
let useNativeDirPseudoclass;
|
|
5964
|
+
; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
6000
5965
|
|
|
6001
|
-
|
|
5966
|
+
const scopeToken = isScopedCss || vm.shadowMode === 1
|
|
5967
|
+
/* Synthetic */
|
|
5968
|
+
&& vm.renderMode === 1
|
|
6002
5969
|
/* Shadow */
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
/* Native */
|
|
6006
|
-
;
|
|
6007
|
-
} else {
|
|
6008
|
-
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
6009
|
-
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
6010
|
-
if (isUndefined$1(root)) {
|
|
6011
|
-
// Only calculate the root once as necessary
|
|
6012
|
-
root = getNearestShadowComponent(vm);
|
|
6013
|
-
}
|
|
6014
|
-
|
|
6015
|
-
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
6016
|
-
/* Native */
|
|
6017
|
-
;
|
|
6018
|
-
}
|
|
6019
|
-
|
|
6020
|
-
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
5970
|
+
? stylesheetToken : undefined;
|
|
5971
|
+
ArrayPush$1.call(content, stylesheet(useActualHostSelector, scopeToken));
|
|
6021
5972
|
}
|
|
6022
5973
|
}
|
|
6023
5974
|
|
|
@@ -6041,12 +5992,14 @@ var LWC = (function (exports) {
|
|
|
6041
5992
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
6042
5993
|
|
|
6043
5994
|
|
|
6044
|
-
function
|
|
5995
|
+
function getNearestNativeShadowComponent(vm) {
|
|
6045
5996
|
let owner = vm;
|
|
6046
5997
|
|
|
6047
5998
|
while (!isNull(owner)) {
|
|
6048
5999
|
if (owner.renderMode === 1
|
|
6049
6000
|
/* Shadow */
|
|
6001
|
+
&& owner.shadowMode === 0
|
|
6002
|
+
/* Native */
|
|
6050
6003
|
) {
|
|
6051
6004
|
return owner;
|
|
6052
6005
|
}
|
|
@@ -6057,20 +6010,6 @@ var LWC = (function (exports) {
|
|
|
6057
6010
|
return owner;
|
|
6058
6011
|
}
|
|
6059
6012
|
|
|
6060
|
-
function getNearestNativeShadowComponent(vm) {
|
|
6061
|
-
const owner = getNearestShadowComponent(vm);
|
|
6062
|
-
|
|
6063
|
-
if (!isNull(owner) && owner.shadowMode === 1
|
|
6064
|
-
/* Synthetic */
|
|
6065
|
-
) {
|
|
6066
|
-
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
6067
|
-
// synthetic, we know we won't find a native component if we go any further.
|
|
6068
|
-
return null;
|
|
6069
|
-
}
|
|
6070
|
-
|
|
6071
|
-
return owner;
|
|
6072
|
-
}
|
|
6073
|
-
|
|
6074
6013
|
function createStylesheet(vm, stylesheets) {
|
|
6075
6014
|
const {
|
|
6076
6015
|
renderer,
|
|
@@ -7811,7 +7750,7 @@ var LWC = (function (exports) {
|
|
|
7811
7750
|
hooksAreSet = true;
|
|
7812
7751
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7813
7752
|
}
|
|
7814
|
-
/* version: 2.5.
|
|
7753
|
+
/* version: 2.5.10-alpha1 */
|
|
7815
7754
|
|
|
7816
7755
|
/*
|
|
7817
7756
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8467,7 +8406,7 @@ var LWC = (function (exports) {
|
|
|
8467
8406
|
});
|
|
8468
8407
|
freeze(LightningElement);
|
|
8469
8408
|
seal(LightningElement.prototype);
|
|
8470
|
-
/* version: 2.5.
|
|
8409
|
+
/* version: 2.5.10-alpha1 */
|
|
8471
8410
|
|
|
8472
8411
|
exports.LightningElement = LightningElement;
|
|
8473
8412
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -8500,4 +8439,4 @@ var LWC = (function (exports) {
|
|
|
8500
8439
|
|
|
8501
8440
|
return exports;
|
|
8502
8441
|
|
|
8503
|
-
}
|
|
8442
|
+
}({}));
|