lwc 2.37.3 → 2.38.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 +196 -127
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -0
- package/dist/engine-dom/iife/es2017/engine-dom.js +196 -127
- package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -0
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -1
- package/dist/engine-dom/iife/es2017/engine-dom.min.js.map +1 -0
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +184 -118
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -0
- package/dist/engine-dom/iife/es5/engine-dom.js +226 -157
- package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -0
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -1
- package/dist/engine-dom/iife/es5/engine-dom.min.js.map +1 -0
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +214 -148
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -0
- package/dist/engine-dom/umd/es2017/engine-dom.js +196 -127
- package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -0
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -1
- package/dist/engine-dom/umd/es2017/engine-dom.min.js.map +1 -0
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +184 -118
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -0
- package/dist/engine-dom/umd/es5/engine-dom.js +226 -157
- package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -0
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -1
- package/dist/engine-dom/umd/es5/engine-dom.min.js.map +1 -0
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +214 -148
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -0
- package/dist/engine-server/commonjs/es2017/engine-server.js +181 -129
- package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -0
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -1
- package/dist/engine-server/commonjs/es2017/engine-server.min.js.map +1 -0
- package/dist/engine-server/esm/es2017/engine-server.js +181 -129
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -0
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +12 -5
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -0
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +12 -5
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -0
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js.map +1 -0
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +12 -5
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -0
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +8 -5
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -0
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js.map +1 -0
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +8 -5
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -0
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +12 -5
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -0
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +3 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js.map +1 -0
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +12 -5
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -0
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +8 -5
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -0
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js.map +1 -0
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +8 -5
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -0
- package/dist/wire-service/esm/es2017/wire-service.js +3 -2
- package/dist/wire-service/esm/es2017/wire-service.js.map +1 -0
- package/dist/wire-service/iife/es2017/wire-service.js +3 -2
- package/dist/wire-service/iife/es2017/wire-service.js.map +1 -0
- package/dist/wire-service/iife/es2017/wire-service.min.js +1 -0
- package/dist/wire-service/iife/es2017/wire-service.min.js.map +1 -0
- package/dist/wire-service/iife/es2017/wire-service_debug.js +3 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -0
- package/dist/wire-service/iife/es5/wire-service.js +3 -2
- package/dist/wire-service/iife/es5/wire-service.js.map +1 -0
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -0
- package/dist/wire-service/iife/es5/wire-service.min.js.map +1 -0
- package/dist/wire-service/iife/es5/wire-service_debug.js +3 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -0
- package/dist/wire-service/umd/es2017/wire-service.js +3 -2
- package/dist/wire-service/umd/es2017/wire-service.js.map +1 -0
- package/dist/wire-service/umd/es2017/wire-service.min.js +1 -0
- package/dist/wire-service/umd/es2017/wire-service.min.js.map +1 -0
- package/dist/wire-service/umd/es2017/wire-service_debug.js +3 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -0
- package/dist/wire-service/umd/es5/wire-service.js +3 -2
- package/dist/wire-service/umd/es5/wire-service.js.map +1 -0
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -0
- package/dist/wire-service/umd/es5/wire-service.min.js.map +1 -0
- package/dist/wire-service/umd/es5/wire-service_debug.js +3 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -0
- package/package.json +7 -7
|
@@ -203,6 +203,8 @@ const KEY__SHADOW_RESOLVER = '$shadowResolver$';
|
|
|
203
203
|
const KEY__SHADOW_STATIC = '$shadowStaticNode$';
|
|
204
204
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
205
205
|
const KEY__SCOPED_CSS = '$scoped$';
|
|
206
|
+
const KEY__NATIVE_GET_ELEMENT_BY_ID = '$nativeGetElementById$';
|
|
207
|
+
const KEY__NATIVE_QUERY_SELECTOR_ALL = '$nativeQuerySelectorAll$';
|
|
206
208
|
|
|
207
209
|
/*
|
|
208
210
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
@@ -442,9 +444,9 @@ function htmlEscape(str, attrMode = false) {
|
|
|
442
444
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
443
445
|
*/
|
|
444
446
|
// Increment whenever the LWC template compiler changes
|
|
445
|
-
const LWC_VERSION = "2.
|
|
447
|
+
const LWC_VERSION = "2.38.1";
|
|
446
448
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
447
|
-
/** version: 2.
|
|
449
|
+
/** version: 2.38.1 */
|
|
448
450
|
|
|
449
451
|
/**
|
|
450
452
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -523,7 +525,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
523
525
|
setFeatureFlag(name, value);
|
|
524
526
|
}
|
|
525
527
|
}
|
|
526
|
-
/** version: 2.
|
|
528
|
+
/** version: 2.38.1 */
|
|
527
529
|
|
|
528
530
|
/*
|
|
529
531
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -619,7 +621,7 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
619
621
|
}
|
|
620
622
|
}
|
|
621
623
|
}
|
|
622
|
-
/** version: 2.
|
|
624
|
+
/** version: 2.38.1 */
|
|
623
625
|
|
|
624
626
|
/* proxy-compat-disable */
|
|
625
627
|
|
|
@@ -2193,6 +2195,14 @@ LightningElement.prototype = {
|
|
|
2193
2195
|
}
|
|
2194
2196
|
return renderer.getLastElementChild(vm.elm);
|
|
2195
2197
|
},
|
|
2198
|
+
get ownerDocument() {
|
|
2199
|
+
const vm = getAssociatedVM(this);
|
|
2200
|
+
const renderer = vm.renderer;
|
|
2201
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2202
|
+
warnIfInvokedDuringConstruction(vm, 'ownerDocument');
|
|
2203
|
+
}
|
|
2204
|
+
return renderer.ownerDocument(vm.elm);
|
|
2205
|
+
},
|
|
2196
2206
|
render() {
|
|
2197
2207
|
const vm = getAssociatedVM(this);
|
|
2198
2208
|
return vm.def.template;
|
|
@@ -2267,31 +2277,84 @@ function createObservedFieldPropertyDescriptor(key) {
|
|
|
2267
2277
|
}
|
|
2268
2278
|
|
|
2269
2279
|
/*
|
|
2270
|
-
* Copyright (c)
|
|
2280
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
2271
2281
|
* All rights reserved.
|
|
2272
2282
|
* SPDX-License-Identifier: MIT
|
|
2273
2283
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2274
2284
|
*/
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2285
|
+
const AdapterToTokenMap = new Map();
|
|
2286
|
+
function createContextProviderWithRegister(adapter, registerContextProvider) {
|
|
2287
|
+
let adapterContextToken = AdapterToTokenMap.get(adapter);
|
|
2288
|
+
if (!isUndefined$1(adapterContextToken)) {
|
|
2289
|
+
throw new Error(`Adapter already has a context provider.`);
|
|
2290
|
+
}
|
|
2291
|
+
adapterContextToken = guid();
|
|
2292
|
+
AdapterToTokenMap.set(adapter, adapterContextToken);
|
|
2293
|
+
const providers = new WeakSet();
|
|
2294
|
+
return (elmOrComponent, options) => {
|
|
2295
|
+
if (providers.has(elmOrComponent)) {
|
|
2296
|
+
throw new Error(`Adapter was already installed on ${elmOrComponent}.`);
|
|
2297
|
+
}
|
|
2298
|
+
providers.add(elmOrComponent);
|
|
2299
|
+
const { consumerConnectedCallback, consumerDisconnectedCallback } = options;
|
|
2300
|
+
registerContextProvider(elmOrComponent, adapterContextToken, (subscriptionPayload) => {
|
|
2301
|
+
const { setNewContext, setDisconnectedCallback } = subscriptionPayload;
|
|
2302
|
+
const consumer = {
|
|
2303
|
+
provide(newContext) {
|
|
2304
|
+
setNewContext(newContext);
|
|
2305
|
+
},
|
|
2306
|
+
};
|
|
2307
|
+
const disconnectCallback = () => {
|
|
2308
|
+
if (!isUndefined$1(consumerDisconnectedCallback)) {
|
|
2309
|
+
consumerDisconnectedCallback(consumer);
|
|
2310
|
+
}
|
|
2311
|
+
};
|
|
2312
|
+
setDisconnectedCallback(disconnectCallback);
|
|
2313
|
+
consumerConnectedCallback(consumer);
|
|
2284
2314
|
});
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
2318
|
+
const { adapter } = wireDef;
|
|
2319
|
+
const adapterContextToken = AdapterToTokenMap.get(adapter);
|
|
2320
|
+
if (isUndefined$1(adapterContextToken)) {
|
|
2321
|
+
return; // no provider found, nothing to be done
|
|
2322
|
+
}
|
|
2323
|
+
const { elm, context: { wiredConnecting, wiredDisconnecting }, renderer: { registerContextConsumer }, } = vm;
|
|
2324
|
+
// waiting for the component to be connected to formally request the context via the token
|
|
2325
|
+
ArrayPush$1.call(wiredConnecting, () => {
|
|
2326
|
+
// This will attempt to connect the current element with one of its anscestors
|
|
2327
|
+
// that can provide context for the given wire adapter. This relationship is
|
|
2328
|
+
// keyed on the secret & internal value of `adapterContextToken`, which is unique
|
|
2329
|
+
// to a given wire adapter.
|
|
2330
|
+
//
|
|
2331
|
+
// Depending on the runtime environment, this connection is made using either DOM
|
|
2332
|
+
// events (in the browser) or a custom traversal (on the server).
|
|
2333
|
+
registerContextConsumer(elm, adapterContextToken, {
|
|
2334
|
+
setNewContext(newContext) {
|
|
2335
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
2336
|
+
// TODO: dev-mode validation of config based on the adapter.contextSchema
|
|
2337
|
+
callbackWhenContextIsReady(newContext);
|
|
2288
2338
|
},
|
|
2289
|
-
setDisconnectedCallback
|
|
2290
|
-
|
|
2339
|
+
setDisconnectedCallback(disconnectCallback) {
|
|
2340
|
+
// adds this callback into the disconnect bucket so it gets disconnected from parent
|
|
2341
|
+
// the the element hosting the wire is disconnected
|
|
2342
|
+
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
2291
2343
|
},
|
|
2292
2344
|
});
|
|
2293
|
-
}
|
|
2345
|
+
});
|
|
2294
2346
|
}
|
|
2347
|
+
|
|
2348
|
+
/*
|
|
2349
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
2350
|
+
* All rights reserved.
|
|
2351
|
+
* SPDX-License-Identifier: MIT
|
|
2352
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2353
|
+
*/
|
|
2354
|
+
const DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
|
|
2355
|
+
const DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
|
|
2356
|
+
const WIRE_DEBUG_ENTRY = '@wire';
|
|
2357
|
+
const WireMetaMap = new Map();
|
|
2295
2358
|
function createFieldDataCallback(vm, name) {
|
|
2296
2359
|
return (value) => {
|
|
2297
2360
|
updateComponentValue(vm, name, value);
|
|
@@ -2322,35 +2385,6 @@ function createConfigWatcher(component, configCallback, callbackWhenConfigIsRead
|
|
|
2322
2385
|
ro,
|
|
2323
2386
|
};
|
|
2324
2387
|
}
|
|
2325
|
-
function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
2326
|
-
const { adapter } = wireDef;
|
|
2327
|
-
const adapterContextToken = getAdapterToken(adapter);
|
|
2328
|
-
if (isUndefined$1(adapterContextToken)) {
|
|
2329
|
-
return; // no provider found, nothing to be done
|
|
2330
|
-
}
|
|
2331
|
-
const { elm, context: { wiredConnecting, wiredDisconnecting }, renderer: { dispatchEvent }, } = vm;
|
|
2332
|
-
// waiting for the component to be connected to formally request the context via the token
|
|
2333
|
-
ArrayPush$1.call(wiredConnecting, () => {
|
|
2334
|
-
// This event is responsible for connecting the host element with another
|
|
2335
|
-
// element in the composed path that is providing contextual data. The provider
|
|
2336
|
-
// must be listening for a special dom event with the name corresponding to the value of
|
|
2337
|
-
// `adapterContextToken`, which will remain secret and internal to this file only to
|
|
2338
|
-
// guarantee that the linkage can be forged.
|
|
2339
|
-
const contextRegistrationEvent = new WireContextRegistrationEvent(adapterContextToken, {
|
|
2340
|
-
setNewContext(newContext) {
|
|
2341
|
-
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
2342
|
-
// TODO: dev-mode validation of config based on the adapter.contextSchema
|
|
2343
|
-
callbackWhenContextIsReady(newContext);
|
|
2344
|
-
},
|
|
2345
|
-
setDisconnectedCallback(disconnectCallback) {
|
|
2346
|
-
// adds this callback into the disconnect bucket so it gets disconnected from parent
|
|
2347
|
-
// the the element hosting the wire is disconnected
|
|
2348
|
-
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
2349
|
-
},
|
|
2350
|
-
});
|
|
2351
|
-
dispatchEvent(elm, contextRegistrationEvent);
|
|
2352
|
-
});
|
|
2353
|
-
}
|
|
2354
2388
|
function createConnector(vm, name, wireDef) {
|
|
2355
2389
|
const { method, adapter, configCallback, dynamic } = wireDef;
|
|
2356
2390
|
let debugInfo;
|
|
@@ -2425,13 +2459,6 @@ function createConnector(vm, name, wireDef) {
|
|
|
2425
2459
|
resetConfigWatcher: () => ro.reset(),
|
|
2426
2460
|
};
|
|
2427
2461
|
}
|
|
2428
|
-
const AdapterToTokenMap = new Map();
|
|
2429
|
-
function getAdapterToken(adapter) {
|
|
2430
|
-
return AdapterToTokenMap.get(adapter);
|
|
2431
|
-
}
|
|
2432
|
-
function setAdapterToken(adapter, token) {
|
|
2433
|
-
AdapterToTokenMap.set(adapter, token);
|
|
2434
|
-
}
|
|
2435
2462
|
function storeWiredMethodMeta(descriptor, adapter, configCallback, dynamic) {
|
|
2436
2463
|
// support for callable adapters
|
|
2437
2464
|
if (adapter.adapter) {
|
|
@@ -5892,17 +5919,30 @@ function recursivelyDisconnectChildren(vnodes) {
|
|
|
5892
5919
|
// into snabbdom. Especially useful when the reset is a consequence of an error, in which case the
|
|
5893
5920
|
// children VNodes might not be representing the current state of the DOM.
|
|
5894
5921
|
function resetComponentRoot(vm) {
|
|
5895
|
-
|
|
5896
|
-
for (let i = 0, len = children.length; i < len; i++) {
|
|
5897
|
-
const child = children[i];
|
|
5898
|
-
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
5899
|
-
remove(child.elm, renderRoot);
|
|
5900
|
-
}
|
|
5901
|
-
}
|
|
5922
|
+
recursivelyRemoveChildren(vm.children, vm);
|
|
5902
5923
|
vm.children = EmptyArray;
|
|
5903
5924
|
runChildNodesDisconnectedCallback(vm);
|
|
5904
5925
|
vm.velements = EmptyArray;
|
|
5905
5926
|
}
|
|
5927
|
+
// Helper function to remove all children of the root node.
|
|
5928
|
+
// If the set of children includes VFragment nodes, we need to remove the children of those nodes too.
|
|
5929
|
+
// Since VFragments can contain other VFragments, we need to traverse the entire of tree of VFragments.
|
|
5930
|
+
// If the set contains no VFragment nodes, no traversal is needed.
|
|
5931
|
+
function recursivelyRemoveChildren(vnodes, vm) {
|
|
5932
|
+
const { renderRoot, renderer: { remove }, } = vm;
|
|
5933
|
+
for (let i = 0, len = vnodes.length; i < len; i += 1) {
|
|
5934
|
+
const vnode = vnodes[i];
|
|
5935
|
+
if (!isNull(vnode)) {
|
|
5936
|
+
// VFragments are special; their .elm property does not point to the root element since they have no single root.
|
|
5937
|
+
if (isVFragment(vnode)) {
|
|
5938
|
+
recursivelyRemoveChildren(vnode.children, vm);
|
|
5939
|
+
}
|
|
5940
|
+
else if (!isUndefined$1(vnode.elm)) {
|
|
5941
|
+
remove(vnode.elm, renderRoot);
|
|
5942
|
+
}
|
|
5943
|
+
}
|
|
5944
|
+
}
|
|
5945
|
+
}
|
|
5906
5946
|
function getErrorBoundaryVM(vm) {
|
|
5907
5947
|
let currentVm = vm;
|
|
5908
5948
|
while (!isNull(currentVm)) {
|
|
@@ -5938,67 +5978,10 @@ function runWithBoundaryProtection(vm, owner, pre, job, post) {
|
|
|
5938
5978
|
}
|
|
5939
5979
|
}
|
|
5940
5980
|
}
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
* SPDX-License-Identifier: MIT
|
|
5946
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
5947
|
-
*/
|
|
5948
|
-
// this is lwc internal implementation
|
|
5949
|
-
function createContextProvider(adapter) {
|
|
5950
|
-
let adapterContextToken = getAdapterToken(adapter);
|
|
5951
|
-
if (!isUndefined$1(adapterContextToken)) {
|
|
5952
|
-
throw new Error(`Adapter already has a context provider.`);
|
|
5953
|
-
}
|
|
5954
|
-
adapterContextToken = guid();
|
|
5955
|
-
setAdapterToken(adapter, adapterContextToken);
|
|
5956
|
-
const providers = new WeakSet();
|
|
5957
|
-
return (elm, options) => {
|
|
5958
|
-
if (providers.has(elm)) {
|
|
5959
|
-
throw new Error(`Adapter was already installed on ${elm}.`);
|
|
5960
|
-
}
|
|
5961
|
-
providers.add(elm);
|
|
5962
|
-
const { consumerConnectedCallback, consumerDisconnectedCallback } = options;
|
|
5963
|
-
elm.addEventListener(adapterContextToken, ((evt) => {
|
|
5964
|
-
const { setNewContext, setDisconnectedCallback } = evt;
|
|
5965
|
-
const consumer = {
|
|
5966
|
-
provide(newContext) {
|
|
5967
|
-
setNewContext(newContext);
|
|
5968
|
-
},
|
|
5969
|
-
};
|
|
5970
|
-
const disconnectCallback = () => {
|
|
5971
|
-
if (!isUndefined$1(consumerDisconnectedCallback)) {
|
|
5972
|
-
consumerDisconnectedCallback(consumer);
|
|
5973
|
-
}
|
|
5974
|
-
};
|
|
5975
|
-
setDisconnectedCallback(disconnectCallback);
|
|
5976
|
-
consumerConnectedCallback(consumer);
|
|
5977
|
-
evt.stopImmediatePropagation();
|
|
5978
|
-
}));
|
|
5979
|
-
};
|
|
5980
|
-
}
|
|
5981
|
-
|
|
5982
|
-
/*
|
|
5983
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
5984
|
-
* All rights reserved.
|
|
5985
|
-
* SPDX-License-Identifier: MIT
|
|
5986
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
5987
|
-
*/
|
|
5988
|
-
/**
|
|
5989
|
-
* EXPERIMENTAL: This function allows you to create a reactive readonly
|
|
5990
|
-
* membrane around any object value. This API is subject to change or
|
|
5991
|
-
* being removed.
|
|
5992
|
-
*/
|
|
5993
|
-
function readonly(obj) {
|
|
5994
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
5995
|
-
// TODO [#1292]: Remove the readonly decorator
|
|
5996
|
-
if (arguments.length !== 1) {
|
|
5997
|
-
assert.fail('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
|
|
5998
|
-
}
|
|
5999
|
-
}
|
|
6000
|
-
return getReadOnlyProxy(obj);
|
|
6001
|
-
}
|
|
5981
|
+
// This is a "handoff" from synthetic-shadow to engine-core – we want to clean up after ourselves
|
|
5982
|
+
// so nobody else can misuse these global APIs.
|
|
5983
|
+
delete _globalThis[KEY__NATIVE_GET_ELEMENT_BY_ID];
|
|
5984
|
+
delete _globalThis[KEY__NATIVE_QUERY_SELECTOR_ALL];
|
|
6002
5985
|
|
|
6003
5986
|
/*
|
|
6004
5987
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6215,7 +6198,28 @@ function freezeTemplate(tmpl) {
|
|
|
6215
6198
|
}
|
|
6216
6199
|
}
|
|
6217
6200
|
}
|
|
6218
|
-
|
|
6201
|
+
|
|
6202
|
+
/*
|
|
6203
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6204
|
+
* All rights reserved.
|
|
6205
|
+
* SPDX-License-Identifier: MIT
|
|
6206
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6207
|
+
*/
|
|
6208
|
+
/**
|
|
6209
|
+
* EXPERIMENTAL: This function allows you to create a reactive readonly
|
|
6210
|
+
* membrane around any object value. This API is subject to change or
|
|
6211
|
+
* being removed.
|
|
6212
|
+
*/
|
|
6213
|
+
function readonly(obj) {
|
|
6214
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6215
|
+
// TODO [#1292]: Remove the readonly decorator
|
|
6216
|
+
if (arguments.length !== 1) {
|
|
6217
|
+
assert.fail('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
return getReadOnlyProxy(obj);
|
|
6221
|
+
}
|
|
6222
|
+
/* version: 2.38.1 */
|
|
6219
6223
|
|
|
6220
6224
|
/*
|
|
6221
6225
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -6231,8 +6235,9 @@ const HostParentKey = Symbol('parent');
|
|
|
6231
6235
|
const HostShadowRootKey = Symbol('shadow-root');
|
|
6232
6236
|
const HostChildrenKey = Symbol('children');
|
|
6233
6237
|
const HostAttributesKey = Symbol('attributes');
|
|
6234
|
-
const HostEventListenersKey = Symbol('event-listeners');
|
|
6235
6238
|
const HostValueKey = Symbol('value');
|
|
6239
|
+
const HostHostKey = Symbol('host');
|
|
6240
|
+
const HostContextProvidersKey = Symbol('context-providers');
|
|
6236
6241
|
var HostNodeType;
|
|
6237
6242
|
(function (HostNodeType) {
|
|
6238
6243
|
HostNodeType["Text"] = "text";
|
|
@@ -6256,6 +6261,48 @@ function tokenListToClassName(values) {
|
|
|
6256
6261
|
return Array.from(values).join(' ');
|
|
6257
6262
|
}
|
|
6258
6263
|
|
|
6264
|
+
/*
|
|
6265
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
6266
|
+
* All rights reserved.
|
|
6267
|
+
* SPDX-License-Identifier: MIT
|
|
6268
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6269
|
+
*/
|
|
6270
|
+
function createContextProvider(adapter) {
|
|
6271
|
+
return createContextProviderWithRegister(adapter, registerContextProvider);
|
|
6272
|
+
}
|
|
6273
|
+
function registerContextProvider(elm, adapterContextToken, onContextSubscription) {
|
|
6274
|
+
const vm = getAssociatedVMIfPresent(elm);
|
|
6275
|
+
if (!isUndefined$1(vm)) {
|
|
6276
|
+
elm = vm.elm;
|
|
6277
|
+
}
|
|
6278
|
+
const contextProviders = elm[HostContextProvidersKey];
|
|
6279
|
+
if (isUndefined$1(contextProviders)) {
|
|
6280
|
+
throw new Error('Unable to register context provider on provided `elm`.');
|
|
6281
|
+
}
|
|
6282
|
+
contextProviders.set(adapterContextToken, onContextSubscription);
|
|
6283
|
+
}
|
|
6284
|
+
function registerContextConsumer(elm, adapterContextToken, subscriptionPayload) {
|
|
6285
|
+
// Traverse element ancestors, looking for an element that can provide context
|
|
6286
|
+
// for the adapter identified by `adapterContextToken`. If found, register
|
|
6287
|
+
// to receive context updates from that provider.
|
|
6288
|
+
let currentNode = elm;
|
|
6289
|
+
do {
|
|
6290
|
+
if (currentNode[HostTypeKey] === HostNodeType.Element) {
|
|
6291
|
+
const subscribeToProvider = currentNode[HostContextProvidersKey].get(adapterContextToken);
|
|
6292
|
+
if (!isUndefined$1(subscribeToProvider)) {
|
|
6293
|
+
subscribeToProvider(subscriptionPayload);
|
|
6294
|
+
// If we find a provider, we shouldn't continue traversing
|
|
6295
|
+
// looking for another provider.
|
|
6296
|
+
break;
|
|
6297
|
+
}
|
|
6298
|
+
}
|
|
6299
|
+
currentNode =
|
|
6300
|
+
currentNode[HostTypeKey] === HostNodeType.Element
|
|
6301
|
+
? currentNode[HostParentKey]
|
|
6302
|
+
: currentNode[HostHostKey];
|
|
6303
|
+
} while (!isNull(currentNode));
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6259
6306
|
/*
|
|
6260
6307
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
6261
6308
|
* All rights reserved.
|
|
@@ -6276,7 +6323,7 @@ function createElement$1(tagName, namespace) {
|
|
|
6276
6323
|
[HostShadowRootKey]: null,
|
|
6277
6324
|
[HostChildrenKey]: [],
|
|
6278
6325
|
[HostAttributesKey]: [],
|
|
6279
|
-
[
|
|
6326
|
+
[HostContextProvidersKey]: new Map(),
|
|
6280
6327
|
};
|
|
6281
6328
|
}
|
|
6282
6329
|
const isNativeShadowDefined = false;
|
|
@@ -6342,6 +6389,7 @@ function attachShadow(element, config) {
|
|
|
6342
6389
|
element[HostShadowRootKey] = {
|
|
6343
6390
|
[HostTypeKey]: HostNodeType.ShadowRoot,
|
|
6344
6391
|
[HostChildrenKey]: [],
|
|
6392
|
+
[HostHostKey]: element,
|
|
6345
6393
|
mode: config.mode,
|
|
6346
6394
|
delegatesFocus: !!config.delegatesFocus,
|
|
6347
6395
|
};
|
|
@@ -6538,6 +6586,7 @@ function createCustomElement(tagName, upgradeCallback) {
|
|
|
6538
6586
|
const UpgradableConstructor = getUpgradableElement(tagName);
|
|
6539
6587
|
return new UpgradableConstructor(upgradeCallback);
|
|
6540
6588
|
}
|
|
6589
|
+
const ownerDocument = unsupportedMethod('ownerDocument');
|
|
6541
6590
|
const renderer = {
|
|
6542
6591
|
isNativeShadowDefined,
|
|
6543
6592
|
isSyntheticShadowDefined,
|
|
@@ -6576,6 +6625,8 @@ const renderer = {
|
|
|
6576
6625
|
isConnected,
|
|
6577
6626
|
insertStylesheet,
|
|
6578
6627
|
assertInstanceOfHTMLElement,
|
|
6628
|
+
ownerDocument,
|
|
6629
|
+
registerContextConsumer,
|
|
6579
6630
|
};
|
|
6580
6631
|
|
|
6581
6632
|
/*
|
|
@@ -6652,7 +6703,7 @@ const FakeRootElement = {
|
|
|
6652
6703
|
[HostShadowRootKey]: null,
|
|
6653
6704
|
[HostChildrenKey]: [],
|
|
6654
6705
|
[HostAttributesKey]: [],
|
|
6655
|
-
[
|
|
6706
|
+
[HostContextProvidersKey]: new Map(),
|
|
6656
6707
|
};
|
|
6657
6708
|
function renderComponent(tagName, Ctor, props = {}) {
|
|
6658
6709
|
if (!isString(tagName)) {
|
|
@@ -6703,7 +6754,7 @@ seal(LightningElement.prototype);
|
|
|
6703
6754
|
function createElement() {
|
|
6704
6755
|
throw new Error('createElement is not supported in @lwc/engine-server, only @lwc/engine-dom.');
|
|
6705
6756
|
}
|
|
6706
|
-
/* version: 2.
|
|
6757
|
+
/* version: 2.38.1 */
|
|
6707
6758
|
|
|
6708
6759
|
exports.LightningElement = LightningElement;
|
|
6709
6760
|
exports.api = api$1;
|
|
@@ -6728,3 +6779,4 @@ exports.setHooks = setHooks;
|
|
|
6728
6779
|
exports.track = track;
|
|
6729
6780
|
exports.unwrap = unwrap;
|
|
6730
6781
|
exports.wire = wire;
|
|
6782
|
+
//# sourceMappingURL=engine-server.js.map
|