@lwrjs/everywhere 0.17.2-alpha.3 → 0.17.2-alpha.5
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/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/f301b2be87353a5119d7a4f6d83034f9/config.js +12 -0
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/s/3aba11034f11c8d5598c93bfca4d4690/@lwrjs_app-service_amd-bootstrap_module_amd.js +5 -5
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwc/v/{8_12_6/s/386f673e62a516d2ee3206eeaaacfd2f → 8_12_7/s/0390a4359d2ed0e9ea9f26570071fff3}/lwc.js +14 -14
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/everywhereAmd/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js +3 -3
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/init/v/{0_17_2-alpha_3/s/6451a6239fe9143b9edff08eb9b3698f → 0_17_2-alpha_5/s/ee686861fdf5fa9ed99e7a5c780254ae}/lwr_init.js +56 -35
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/loader/v/{0_17_2-alpha_3/s/746749c2fd6d0d429f6a185177cd8749 → 0_17_2-alpha_5/s/8038a935143944754609dca4f2f3e2ef}/lwr_loader.js +68 -18
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/metrics/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/s/fb8c5dd340c69fdf7ded52d3eba633b9/lwr_metrics.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/preInit/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/s/ec0fad0e38a96bb0b88c9f4553460347/lwr_preInit.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/profiler/v/{0_17_2-alpha_3/s/a152b8d35f12ca1b5147c5cd1ee155fb → 0_17_2-alpha_5/s/309a6aefe2693406a267eb1a357d6ab4}/lwr_profiler.js +2 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/vault/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js +1 -1
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-error-shim.js/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/lwr-error-shim.js +1 -1
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-loader-shim.bundle.js/v/{0_17_2-alpha_3 → 0_17_2-alpha_5}/lwr-loader-shim.bundle.js +93 -24
- package/build/assets/amd/lwr-everywhere-debug.js +73 -25
- package/build/assets/amd/lwr-everywhere-min.js +4 -3
- package/build/assets/amd/lwr-everywhere.js +73 -25
- package/build/assets/core/lwr-everywhere-debug.js +69 -21
- package/build/assets/core/lwr-everywhere-min.js +4 -3
- package/build/assets/core/lwr-everywhere.js +69 -21
- package/build/assets/esm/lwr-everywhere-debug.js +1 -1
- package/build/assets/esm/lwr-everywhere-min.js +1 -1
- package/build/assets/esm/lwr-everywhere.js +1 -1
- package/package.json +6 -6
- package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/b994db565f626754886e7e67558cf02e/config.js +0 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* This script is generated */
|
|
2
|
+
/* Client Bootstrap configuration */
|
|
3
|
+
globalThis.LWR = globalThis.LWR || {};
|
|
4
|
+
Object.assign(globalThis.LWR, {"appId":"amd-bootstrap","bootstrapModule":"@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5","autoBoot":true,"imports":{"/1/module/amd/1/l/en-US/mi/%40lwrjs%2Fapp-service%2Famd-bootstrap%2Fmodule%2Famd%2Fv%2F0_17_2-alpha_5/s/3aba11034f11c8d5598c93bfca4d4690/@lwrjs_app-service_amd-bootstrap_module_amd.js":["@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwr%2FpreInit%2Fv%2F0_17_2-alpha_5/s/ec0fad0e38a96bb0b88c9f4553460347/lwr_preInit.js":["lwr/preInit/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwr%2Finit%2Fv%2F0_17_2-alpha_5/s/ee686861fdf5fa9ed99e7a5c780254ae/lwr_init.js":["lwr/init/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwr%2Fmetrics%2Fv%2F0_17_2-alpha_5/s/fb8c5dd340c69fdf7ded52d3eba633b9/lwr_metrics.js":["lwr/metrics/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwc%2Fv%2F8_12_7/s/0390a4359d2ed0e9ea9f26570071fff3/lwc.js":["lwc/v/8_12_7"],"/1/module/amd/1/l/en-US/mi/lwr%2FeverywhereAmd%2Fv%2F0_17_2-alpha_5/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js":["lwr/everywhereAmd/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwr%2Fvault%2Fv%2F0_17_2-alpha_5/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js":["lwr/vault/v/0_17_2-alpha_5"]},"index":{"@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/%40lwrjs%2Fapp-service%2Famd-bootstrap%2Fmodule%2Famd%2Fv%2F0_17_2-alpha_5/s/3aba11034f11c8d5598c93bfca4d4690/@lwrjs_app-service_amd-bootstrap_module_amd.js","lwr/preInit/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2FpreInit%2Fv%2F0_17_2-alpha_5/s/ec0fad0e38a96bb0b88c9f4553460347/lwr_preInit.js","lwr/init/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2Finit%2Fv%2F0_17_2-alpha_5/s/ee686861fdf5fa9ed99e7a5c780254ae/lwr_init.js","lwr/metrics/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2Fmetrics%2Fv%2F0_17_2-alpha_5/s/fb8c5dd340c69fdf7ded52d3eba633b9/lwr_metrics.js","lwc/v/8_12_7":"/1/module/amd/1/l/en-US/mi/lwc%2Fv%2F8_12_7/s/0390a4359d2ed0e9ea9f26570071fff3/lwc.js","lwr/everywhereAmd/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2FeverywhereAmd%2Fv%2F0_17_2-alpha_5/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js","lwr/vault/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2Fvault%2Fv%2F0_17_2-alpha_5/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js"},"rootComponents":["lwr/everywhereAmd/v/0_17_2-alpha_5"],"serverData":{},"requiredModules":["@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5"],"preloadModules":["lwr/preInit/v/0_17_2-alpha_5","lwr/init/v/0_17_2-alpha_5","lwr/metrics/v/0_17_2-alpha_5","lwc/v/8_12_7","lwr/everywhereAmd/v/0_17_2-alpha_5"],"endpoints":{"uris":{"mapping":"/1/mapping/amd/1/l/en-US/mp/"}}});
|
|
5
|
+
globalThis.LWR = {...globalThis.LWR, env: {"SSR":false,"basePath":"","locale":"en-US","assetBasePath":"","uiBasePath":""}};
|
|
6
|
+
globalThis.process={...globalThis.process,env:{...globalThis.process?.env,...{"NODE_ENV":"compat"}}};
|
|
7
|
+
globalThis.lwcRuntimeFlags = { ENABLE_MIXED_SHADOW_MODE: false, ENABLE_WIRE_SYNC_EMIT: false };
|
|
8
|
+
// Appended by Static Site Generator
|
|
9
|
+
if (!globalThis.LWR.imports) { globalThis.LWR.imports = {}; }
|
|
10
|
+
Object.assign(globalThis.LWR.imports, {"/1/module/amd/1/l/en-US/mi/lwr%2Fprofiler%2Fv%2F0_17_2-alpha_5/s/309a6aefe2693406a267eb1a357d6ab4/lwr_profiler.js":["lwr/profiler/v/0_17_2-alpha_5"],"/1/module/amd/1/l/en-US/mi/lwr%2Floader%2Fv%2F0_17_2-alpha_5/s/8038a935143944754609dca4f2f3e2ef/lwr_loader.js":["lwr/loader/v/0_17_2-alpha_5"]})
|
|
11
|
+
if (!globalThis.LWR.index) { globalThis.LWR.index = {}; }
|
|
12
|
+
Object.assign(globalThis.LWR.index, {"lwr/profiler/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2Fprofiler%2Fv%2F0_17_2-alpha_5/s/309a6aefe2693406a267eb1a357d6ab4/lwr_profiler.js","lwr/loader/v/0_17_2-alpha_5":"/1/module/amd/1/l/en-US/mi/lwr%2Floader%2Fv%2F0_17_2-alpha_5/s/8038a935143944754609dca4f2f3e2ef/lwr_loader.js"})
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
LWR.define('@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-
|
|
1
|
+
LWR.define('@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5', ['lwr/loader/v/0_17_2-alpha_5', 'lwr/preInit/v/0_17_2-alpha_5', 'lwr/init/v/0_17_2-alpha_5'], (function (_0_17_2Alpha_5$2, _0_17_2Alpha_5, _0_17_2Alpha_5$1) { 'use strict';
|
|
2
2
|
|
|
3
|
-
const clientBootstrapConfig =
|
|
3
|
+
const clientBootstrapConfig = _0_17_2Alpha_5.getClientBootstrapConfig();
|
|
4
4
|
const { serverData, rootComponents } = clientBootstrapConfig;
|
|
5
5
|
|
|
6
6
|
// initialize additional non-configured root components
|
|
7
7
|
Promise.all(rootComponents.map(async (rootSpecifier) => {
|
|
8
|
-
const element =
|
|
9
|
-
const { default: Ctor } = await
|
|
8
|
+
const element = _0_17_2Alpha_5$1.toKebabCase(rootSpecifier);
|
|
9
|
+
const { default: Ctor } = await _0_17_2Alpha_5$2.load(rootSpecifier, '@lwrjs/app-service/amd-bootstrap/module/amd/v/0_17_2-alpha_5');
|
|
10
10
|
return [element, Ctor];
|
|
11
11
|
})).then((rootModules) => {
|
|
12
|
-
return
|
|
12
|
+
return _0_17_2Alpha_5$1.init(rootModules, serverData);
|
|
13
13
|
}).then(() => {
|
|
14
14
|
globalThis?.lwcRuntimeFlags?.ENABLE_WIRE_SYNC_EMIT &&
|
|
15
15
|
(globalThis.lwcRuntimeFlags = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
LWR.define('lwc/v/
|
|
1
|
+
LWR.define('lwc/v/8_12_7', ['exports'], (function (exports) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -463,7 +463,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
463
463
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
464
464
|
*/
|
|
465
465
|
// Increment whenever the LWC template compiler changes
|
|
466
|
-
const LWC_VERSION = "8.12.
|
|
466
|
+
const LWC_VERSION = "8.12.7";
|
|
467
467
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
468
468
|
|
|
469
469
|
/*
|
|
@@ -581,7 +581,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
581
581
|
}
|
|
582
582
|
return trustedSignals.has(target);
|
|
583
583
|
}
|
|
584
|
-
/** version: 8.12.
|
|
584
|
+
/** version: 8.12.7 */
|
|
585
585
|
|
|
586
586
|
/**
|
|
587
587
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -669,7 +669,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
669
669
|
setFeatureFlag(name, value);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
/** version: 8.12.
|
|
672
|
+
/** version: 8.12.7 */
|
|
673
673
|
|
|
674
674
|
/**
|
|
675
675
|
* Copyright (c) 2025 Salesforce, Inc.
|
|
@@ -1948,7 +1948,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
1948
1948
|
valueMutated(originalTarget, key);
|
|
1949
1949
|
return true;
|
|
1950
1950
|
}
|
|
1951
|
-
/*LWC compiler v8.12.
|
|
1951
|
+
/*LWC compiler v8.12.7*/
|
|
1952
1952
|
}
|
|
1953
1953
|
const getterMap = new WeakMap();
|
|
1954
1954
|
const setterMap = new WeakMap();
|
|
@@ -1995,7 +1995,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
1995
1995
|
/* istanbul ignore next */
|
|
1996
1996
|
return false;
|
|
1997
1997
|
}
|
|
1998
|
-
/*LWC compiler v8.12.
|
|
1998
|
+
/*LWC compiler v8.12.7*/
|
|
1999
1999
|
}
|
|
2000
2000
|
function defaultValueIsObservable(value) {
|
|
2001
2001
|
// intentionally checking for null
|
|
@@ -3687,7 +3687,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
3687
3687
|
}
|
|
3688
3688
|
function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observedFields, proto, hasCustomSuperClass) {
|
|
3689
3689
|
const HTMLBridgeElement = class extends SuperClass {
|
|
3690
|
-
/*LWC compiler v8.12.
|
|
3690
|
+
/*LWC compiler v8.12.7*/
|
|
3691
3691
|
};
|
|
3692
3692
|
// generating the hash table for attributes to avoid duplicate fields and facilitate validation
|
|
3693
3693
|
// and false positives in case of inheritance.
|
|
@@ -9315,7 +9315,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
9315
9315
|
}
|
|
9316
9316
|
return getReadOnlyProxy(obj);
|
|
9317
9317
|
}
|
|
9318
|
-
/** version: 8.12.
|
|
9318
|
+
/** version: 8.12.7 */
|
|
9319
9319
|
|
|
9320
9320
|
/*
|
|
9321
9321
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -9609,7 +9609,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
9609
9609
|
formStateRestoreCallback(state, reason) {
|
|
9610
9610
|
runFormStateRestoreCallback(this, state, reason);
|
|
9611
9611
|
}
|
|
9612
|
-
/*LWC compiler v8.12.
|
|
9612
|
+
/*LWC compiler v8.12.7*/
|
|
9613
9613
|
};
|
|
9614
9614
|
BaseHTMLElement = HTMLElement; // cache to track if it changes
|
|
9615
9615
|
}
|
|
@@ -9624,7 +9624,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
9624
9624
|
// Using a BaseUpgradableConstructor superclass here is a perf optimization to avoid
|
|
9625
9625
|
// re-defining the same logic (connectedCallback, disconnectedCallback, etc.) over and over.
|
|
9626
9626
|
class UpgradableConstructor extends BaseUpgradableConstructor {
|
|
9627
|
-
/*LWC compiler v8.12.
|
|
9627
|
+
/*LWC compiler v8.12.7*/
|
|
9628
9628
|
}
|
|
9629
9629
|
if (isFormAssociated) {
|
|
9630
9630
|
// Perf optimization - the vast majority of components have formAssociated=false,
|
|
@@ -9790,7 +9790,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
9790
9790
|
function isNull(obj) {
|
|
9791
9791
|
return obj === null;
|
|
9792
9792
|
}
|
|
9793
|
-
/** version: 8.12.
|
|
9793
|
+
/** version: 8.12.7 */
|
|
9794
9794
|
|
|
9795
9795
|
/*
|
|
9796
9796
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -9821,7 +9821,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
9821
9821
|
this.setNewContext = setNewContext;
|
|
9822
9822
|
this.setDisconnectedCallback = setDisconnectedCallback;
|
|
9823
9823
|
}
|
|
9824
|
-
/*LWC compiler v8.12.
|
|
9824
|
+
/*LWC compiler v8.12.7*/
|
|
9825
9825
|
}
|
|
9826
9826
|
function registerContextConsumer(elm, adapterContextToken, subscriptionPayload) {
|
|
9827
9827
|
dispatchEvent(elm, new WireContextSubscriptionEvent(adapterContextToken, subscriptionPayload));
|
|
@@ -10249,7 +10249,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
10249
10249
|
formStateRestoreCallback(state, reason) {
|
|
10250
10250
|
runFormStateRestoreCallback(this, state, reason);
|
|
10251
10251
|
}
|
|
10252
|
-
/*LWC compiler v8.12.
|
|
10252
|
+
/*LWC compiler v8.12.7*/
|
|
10253
10253
|
}, _a.observedAttributes = observedAttributes,
|
|
10254
10254
|
// Note CustomElementConstructor is not upgraded by LWC and inherits directly from HTMLElement which means it calls the native
|
|
10255
10255
|
// attachInternals API.
|
|
@@ -10506,7 +10506,7 @@ LWR.define('lwc/v/8_12_6', ['exports'], (function (exports) { 'use strict';
|
|
|
10506
10506
|
});
|
|
10507
10507
|
});
|
|
10508
10508
|
}
|
|
10509
|
-
/** version: 8.12.
|
|
10509
|
+
/** version: 8.12.7 */
|
|
10510
10510
|
|
|
10511
10511
|
exports.LightningElement = LightningElement;
|
|
10512
10512
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
LWR.define('lwr/everywhereAmd/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/everywhereAmd/v/0_17_2-alpha_5', ['exports', 'lwr/vault/v/0_17_2-alpha_5'], (function (exports, _0_17_2Alpha_5) { 'use strict';
|
|
2
2
|
|
|
3
3
|
// IMPORTANT: Do not add any static imports to this file that are not bundled with the amd-client
|
|
4
4
|
|
|
5
5
|
// Do an OAuthed fetch
|
|
6
6
|
async function authFetch(url, accept = 'javascript') {
|
|
7
|
-
const authInfo =
|
|
7
|
+
const authInfo = _0_17_2Alpha_5.getAuthInfo();
|
|
8
8
|
if (authInfo) {
|
|
9
9
|
return fetch(url, {
|
|
10
10
|
headers: {
|
|
@@ -53,7 +53,7 @@ LWR.define('lwr/everywhereAmd/v/0_17_2-alpha_3', ['exports', 'lwr/vault/v/0_17_2
|
|
|
53
53
|
function authenticate(authInfo) {
|
|
54
54
|
// Put OAuth info into the vault
|
|
55
55
|
if (authInfo) {
|
|
56
|
-
|
|
56
|
+
_0_17_2Alpha_5.setAuthInfo(authInfo);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
LWR.define('lwr/init/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/init/v/0_17_2-alpha_5', ['exports', 'lwr/metrics/v/0_17_2-alpha_5', 'lwr/profiler/v/0_17_2-alpha_5', 'lwc/v/8_12_7'], (function (exports, _0_17_2Alpha_5$1, _0_17_2Alpha_5, _8_12_7) { 'use strict';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line lwr/only-allowed-type-imports
|
|
2
4
|
|
|
3
5
|
// <hydrateComponentProxy> - This code is removed in core
|
|
4
6
|
// Note: a build step uses these comments to strip the code for core.
|
|
7
|
+
// eslint-disable-next-line lwr/only-allowed-imports
|
|
5
8
|
|
|
6
9
|
function hydrateComponentProxy(customElement, Ctor, props) {
|
|
7
|
-
|
|
10
|
+
_8_12_7.hydrateComponent(customElement, Ctor, props);
|
|
8
11
|
}
|
|
9
12
|
// </hydrateComponentProxy>
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function shouldYield() {
|
|
16
|
-
const now = performance.now();
|
|
17
|
-
if (now - timeOfLastYield > HYDRATION_TASK_BATCH_DURATION) {
|
|
18
|
-
timeOfLastYield = now;
|
|
19
|
-
return true;
|
|
14
|
+
const shouldYield = (() => {
|
|
15
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
16
|
+
if (!globalThis.performance) {
|
|
17
|
+
return () => false;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
|
|
20
|
+
// Break up hydration tasks into timed batches.
|
|
21
|
+
// Borrowed from https://tinyurl.com/5b4fw7eb
|
|
22
|
+
const HYDRATION_TASK_BATCH_DURATION = 50;
|
|
23
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
24
|
+
let timeOfLastYield = globalThis.performance.now();
|
|
25
|
+
return () => {
|
|
26
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
27
|
+
const now = globalThis.performance.now();
|
|
28
|
+
if (now - timeOfLastYield > HYDRATION_TASK_BATCH_DURATION) {
|
|
29
|
+
timeOfLastYield = now;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
23
35
|
function initializeWebComponent(elementName, Ctor) {
|
|
24
|
-
return
|
|
36
|
+
return _8_12_7.createElement(elementName, {
|
|
25
37
|
is: Ctor
|
|
26
38
|
});
|
|
27
39
|
}
|
|
@@ -57,33 +69,39 @@ LWR.define('lwr/init/v/0_17_2-alpha_3', ['exports', 'lwr/metrics/v/0_17_2-alpha_
|
|
|
57
69
|
* @example - [['x/appRoot', appCtor], ['x/nav', navCtor]]
|
|
58
70
|
*/
|
|
59
71
|
function init(rootModules, serverData = {}) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
72
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
73
|
+
if (typeof globalThis.customElements === 'undefined' || typeof globalThis.document === 'undefined') {
|
|
74
|
+
_0_17_2Alpha_5.logOperationStart({
|
|
75
|
+
id: _0_17_2Alpha_5$1.BOOTSTRAP_END
|
|
63
76
|
});
|
|
64
77
|
return;
|
|
65
78
|
}
|
|
66
|
-
|
|
67
|
-
id:
|
|
79
|
+
_0_17_2Alpha_5.logOperationStart({
|
|
80
|
+
id: _0_17_2Alpha_5$1.INIT
|
|
68
81
|
});
|
|
69
82
|
let index = 0;
|
|
83
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
84
|
+
const document = globalThis.document;
|
|
70
85
|
for (const [specifier, ctor] of rootModules) {
|
|
71
86
|
const elementName = toKebabCase(specifier);
|
|
72
87
|
|
|
73
88
|
// initialize and inject the root module into the LWR Root or DOM if it is missing
|
|
89
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
74
90
|
if (!document.body.querySelector(elementName)) {
|
|
75
|
-
|
|
76
|
-
id:
|
|
91
|
+
_0_17_2Alpha_5.logOperationStart({
|
|
92
|
+
id: _0_17_2Alpha_5$1.INIT_MODULE,
|
|
77
93
|
specifier,
|
|
78
94
|
specifierIndex: ++index
|
|
79
95
|
});
|
|
80
96
|
|
|
81
97
|
// this is for SPA like routes (one component at the root level) utilizing the lwr-root directive
|
|
82
98
|
const component = initializeWebComponent(elementName, ctor);
|
|
99
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
83
100
|
const container = document.querySelector('[lwr-root]');
|
|
101
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
84
102
|
container ? container.appendChild(component) : document.body.appendChild(component);
|
|
85
|
-
|
|
86
|
-
id:
|
|
103
|
+
_0_17_2Alpha_5.logOperationEnd({
|
|
104
|
+
id: _0_17_2Alpha_5$1.INIT_MODULE,
|
|
87
105
|
specifier,
|
|
88
106
|
specifierIndex: index,
|
|
89
107
|
metadata: {
|
|
@@ -94,10 +112,11 @@ LWR.define('lwr/init/v/0_17_2-alpha_3', ['exports', 'lwr/metrics/v/0_17_2-alpha_
|
|
|
94
112
|
}
|
|
95
113
|
|
|
96
114
|
// the page has been rendered or SSR'd, and each component needs to initialized(or hydrated)
|
|
115
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
97
116
|
const elements = document.querySelectorAll(elementName);
|
|
98
117
|
for (const element of elements) {
|
|
99
|
-
|
|
100
|
-
id:
|
|
118
|
+
_0_17_2Alpha_5.logOperationStart({
|
|
119
|
+
id: _0_17_2Alpha_5$1.INIT_MODULE,
|
|
101
120
|
specifier,
|
|
102
121
|
specifierIndex: ++index
|
|
103
122
|
});
|
|
@@ -105,16 +124,18 @@ LWR.define('lwr/init/v/0_17_2-alpha_3', ['exports', 'lwr/metrics/v/0_17_2-alpha_
|
|
|
105
124
|
|
|
106
125
|
// hydrate SSR'd components
|
|
107
126
|
if (propsId) {
|
|
108
|
-
|
|
127
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
128
|
+
if (shouldYield() && globalThis.setTimeout !== undefined) {
|
|
109
129
|
// give room for the browser to render during long hydration tasks
|
|
110
|
-
|
|
130
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
131
|
+
globalThis.setTimeout(() => {
|
|
111
132
|
hydrateComponentProxy(element, ctor, serverData[propsId] || {});
|
|
112
133
|
}, 0);
|
|
113
134
|
} else {
|
|
114
135
|
hydrateComponentProxy(element, ctor, serverData[propsId] || {});
|
|
115
136
|
}
|
|
116
|
-
|
|
117
|
-
id:
|
|
137
|
+
_0_17_2Alpha_5.logOperationEnd({
|
|
138
|
+
id: _0_17_2Alpha_5$1.INIT_MODULE,
|
|
118
139
|
specifier,
|
|
119
140
|
specifierIndex: index,
|
|
120
141
|
metadata: {
|
|
@@ -152,8 +173,8 @@ LWR.define('lwr/init/v/0_17_2-alpha_3', ['exports', 'lwr/metrics/v/0_17_2-alpha_
|
|
|
152
173
|
if (parent) {
|
|
153
174
|
parent.replaceChild(component, element);
|
|
154
175
|
}
|
|
155
|
-
|
|
156
|
-
id:
|
|
176
|
+
_0_17_2Alpha_5.logOperationEnd({
|
|
177
|
+
id: _0_17_2Alpha_5$1.INIT_MODULE,
|
|
157
178
|
specifier,
|
|
158
179
|
specifierIndex: index,
|
|
159
180
|
metadata: {
|
|
@@ -162,11 +183,11 @@ LWR.define('lwr/init/v/0_17_2-alpha_3', ['exports', 'lwr/metrics/v/0_17_2-alpha_
|
|
|
162
183
|
});
|
|
163
184
|
}
|
|
164
185
|
}
|
|
165
|
-
|
|
166
|
-
id:
|
|
186
|
+
_0_17_2Alpha_5.logOperationEnd({
|
|
187
|
+
id: _0_17_2Alpha_5$1.INIT
|
|
167
188
|
});
|
|
168
|
-
|
|
169
|
-
id:
|
|
189
|
+
_0_17_2Alpha_5.logOperationStart({
|
|
190
|
+
id: _0_17_2Alpha_5$1.BOOTSTRAP_END
|
|
170
191
|
});
|
|
171
192
|
}
|
|
172
193
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
LWR.define('lwr/loader/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/loader/v/0_17_2-alpha_5', ['exports'], (function (exports) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) 2021, salesforce.com, inc.
|
|
@@ -6,7 +6,7 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
6
6
|
* SPDX-License-Identifier: MIT
|
|
7
7
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
8
8
|
*/
|
|
9
|
-
/* LWR Module Loader v0.17.2-alpha.
|
|
9
|
+
/* LWR Module Loader v0.17.2-alpha.5 */
|
|
10
10
|
const templateRegex = /\{([0-9]+)\}/g;
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
function templateString(template, args) {
|
|
@@ -25,7 +25,7 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
25
25
|
super();
|
|
26
26
|
this.message = generateErrorMessage(errorInfo, errorArgs);
|
|
27
27
|
}
|
|
28
|
-
/*LWC compiler v8.12.
|
|
28
|
+
/*LWC compiler v8.12.7*/
|
|
29
29
|
}
|
|
30
30
|
function invariant(condition, errorInfo) {
|
|
31
31
|
if (!condition) {
|
|
@@ -102,7 +102,7 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
102
102
|
level: 0,
|
|
103
103
|
message: 'An error occurred handling module conflict'
|
|
104
104
|
});
|
|
105
|
-
|
|
105
|
+
Object.freeze({
|
|
106
106
|
code: 3017,
|
|
107
107
|
level: 0,
|
|
108
108
|
message: 'Marking module(s) as externally loaded, but they are already loaded:'
|
|
@@ -558,6 +558,16 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
558
558
|
}
|
|
559
559
|
const MODULE_LOAD_TIMEOUT_TIMER = 60 * 1000; // 1m
|
|
560
560
|
|
|
561
|
+
var MODULE_WARNING;
|
|
562
|
+
(function (MODULE_WARNING) {
|
|
563
|
+
const MODULE_REDEFINE = 'Module redefine attempted';
|
|
564
|
+
MODULE_WARNING["MODULE_REDEFINE"] = MODULE_REDEFINE;
|
|
565
|
+
const MODULE_ALREADY_LOADED = 'Marking module(s) as externally loaded, but they are already loaded';
|
|
566
|
+
MODULE_WARNING["MODULE_ALREADY_LOADED"] = MODULE_ALREADY_LOADED;
|
|
567
|
+
const ALIAS_UPDATE = 'Alias update attempt';
|
|
568
|
+
MODULE_WARNING["ALIAS_UPDATE"] = ALIAS_UPDATE;
|
|
569
|
+
})(MODULE_WARNING || (MODULE_WARNING = {}));
|
|
570
|
+
|
|
561
571
|
/*!
|
|
562
572
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
563
573
|
*/
|
|
@@ -707,15 +717,24 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
707
717
|
});
|
|
708
718
|
}
|
|
709
719
|
|
|
710
|
-
/* global
|
|
720
|
+
/* global process console */
|
|
711
721
|
|
|
712
722
|
class ModuleRegistry {
|
|
723
|
+
__init() {
|
|
724
|
+
this.isAppMounted = false;
|
|
725
|
+
}
|
|
713
726
|
constructor(config) {
|
|
714
727
|
ModuleRegistry.prototype.__init.call(this);
|
|
715
728
|
ModuleRegistry.prototype.__init2.call(this);
|
|
716
729
|
ModuleRegistry.prototype.__init3.call(this);
|
|
730
|
+
ModuleRegistry.prototype.__init4.call(this);
|
|
717
731
|
this.profiler = config.profiler;
|
|
718
732
|
this.resolver = new ImportMetadataResolver(config, this.importMetadataInvalidationCallback.bind(this));
|
|
733
|
+
this.warnings = {
|
|
734
|
+
[MODULE_WARNING.MODULE_REDEFINE]: [],
|
|
735
|
+
[MODULE_WARNING.MODULE_ALREADY_LOADED]: [],
|
|
736
|
+
[MODULE_WARNING.ALIAS_UPDATE]: []
|
|
737
|
+
};
|
|
719
738
|
}
|
|
720
739
|
async load(id, importer) {
|
|
721
740
|
const metadata = importer ? {
|
|
@@ -837,9 +856,13 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
837
856
|
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
838
857
|
process.env.NODE_ENV !== 'production' &&
|
|
839
858
|
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
840
|
-
process.env.MRT_HMR !== 'true'
|
|
841
|
-
|
|
842
|
-
|
|
859
|
+
process.env.MRT_HMR !== 'true') {
|
|
860
|
+
if (!this.warnings[MODULE_WARNING.MODULE_REDEFINE].includes(name)) {
|
|
861
|
+
this.warnings[MODULE_WARNING.MODULE_REDEFINE].push(name);
|
|
862
|
+
}
|
|
863
|
+
if (this.isAppMounted) {
|
|
864
|
+
this.logMessage('warning', `${MODULE_WARNING.MODULE_REDEFINE}: ${name}`);
|
|
865
|
+
}
|
|
843
866
|
}
|
|
844
867
|
this.lastDefine = mod;
|
|
845
868
|
return;
|
|
@@ -894,25 +917,29 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
894
917
|
};
|
|
895
918
|
this.namedDefineRegistry.set(id, moduleDef);
|
|
896
919
|
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
897
|
-
} else if (process.env.NODE_ENV !== 'production'
|
|
898
|
-
|
|
899
|
-
|
|
920
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
921
|
+
if (!this.warnings[MODULE_WARNING.MODULE_ALREADY_LOADED].includes(id)) {
|
|
922
|
+
this.warnings[MODULE_WARNING.MODULE_ALREADY_LOADED].push(id);
|
|
923
|
+
}
|
|
924
|
+
if (this.isAppMounted) {
|
|
925
|
+
this.logMessage('warning', `${MODULE_WARNING.MODULE_ALREADY_LOADED}: ${id}`);
|
|
926
|
+
}
|
|
900
927
|
}
|
|
901
928
|
});
|
|
902
929
|
}
|
|
903
930
|
|
|
904
931
|
// A registry for named AMD defines containing the *metadata* of AMD module
|
|
905
|
-
|
|
932
|
+
__init2() {
|
|
906
933
|
this.namedDefineRegistry = new Map();
|
|
907
934
|
}
|
|
908
935
|
|
|
909
936
|
// The evaluated module registry where the module identifier (name or URL?) is the key
|
|
910
|
-
|
|
937
|
+
__init3() {
|
|
911
938
|
this.moduleRegistry = new Map();
|
|
912
939
|
}
|
|
913
940
|
|
|
914
941
|
// Aliases of modules in the registry
|
|
915
|
-
|
|
942
|
+
__init4() {
|
|
916
943
|
this.aliases = new Map();
|
|
917
944
|
}
|
|
918
945
|
getImportMetadataResolver() {
|
|
@@ -984,10 +1011,12 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
984
1011
|
// Warn the user if they were not aliasing to the resolvedId
|
|
985
1012
|
const currentResolvedId = this.aliases.get(aliasId);
|
|
986
1013
|
if (currentResolvedId !== resolvedId) {
|
|
987
|
-
|
|
988
|
-
if (
|
|
989
|
-
|
|
990
|
-
|
|
1014
|
+
const warningMsg = `${aliasId}=>${currentResolvedId}, ${resolvedId}`;
|
|
1015
|
+
if (!this.warnings[MODULE_WARNING.ALIAS_UPDATE].includes(warningMsg)) {
|
|
1016
|
+
this.warnings[MODULE_WARNING.ALIAS_UPDATE].push(warningMsg);
|
|
1017
|
+
}
|
|
1018
|
+
if (this.isAppMounted) {
|
|
1019
|
+
this.logMessage('warning', `${MODULE_WARNING.ALIAS_UPDATE}: ${warningMsg}`);
|
|
991
1020
|
}
|
|
992
1021
|
}
|
|
993
1022
|
}
|
|
@@ -1279,6 +1308,24 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
1279
1308
|
isValidResolveResponse(res) {
|
|
1280
1309
|
return res === null || typeof res === 'string' || res && typeof res.url === 'string';
|
|
1281
1310
|
}
|
|
1311
|
+
getModuleWarnings(isAppMounted = false) {
|
|
1312
|
+
this.isAppMounted = isAppMounted;
|
|
1313
|
+
return this.warnings;
|
|
1314
|
+
}
|
|
1315
|
+
logMessage(logType, message) {
|
|
1316
|
+
if (!hasProcessEnv || !hasConsole ||
|
|
1317
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
1318
|
+
process.env.NODE_ENV === 'production') {
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
if (logType == 'warning') {
|
|
1322
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
1323
|
+
console.warn(message);
|
|
1324
|
+
} else {
|
|
1325
|
+
// eslint-disable-next-line lwr/no-unguarded-apis
|
|
1326
|
+
console.log(message);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1282
1329
|
}
|
|
1283
1330
|
|
|
1284
1331
|
/**
|
|
@@ -1406,6 +1453,9 @@ LWR.define('lwr/loader/v/0_17_2-alpha_3', ['exports'], (function (exports) { 'us
|
|
|
1406
1453
|
registerExternalModules(modules) {
|
|
1407
1454
|
this.registry.registerExternalModules(modules);
|
|
1408
1455
|
}
|
|
1456
|
+
getModuleWarnings(isAppMounted = false) {
|
|
1457
|
+
return this.registry.getModuleWarnings(isAppMounted);
|
|
1458
|
+
}
|
|
1409
1459
|
}
|
|
1410
1460
|
|
|
1411
1461
|
exports.Loader = Loader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
LWR.define('lwr/preInit/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/preInit/v/0_17_2-alpha_5', ['exports'], (function (exports) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This module is called in the ABS module (app bootstrap module) to perform neccesary pre initialization steps for an LWR app.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
LWR.define('lwr/profiler/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/profiler/v/0_17_2-alpha_5', ['exports'], (function (exports) { 'use strict';
|
|
2
2
|
|
|
3
3
|
var Phase = /*#__PURE__*/function (Phase) {
|
|
4
4
|
Phase[Phase["Start"] = 0] = "Start";
|
|
@@ -13,6 +13,7 @@ LWR.define('lwr/profiler/v/0_17_2-alpha_3', ['exports'], (function (exports) { '
|
|
|
13
13
|
|
|
14
14
|
// Check if the Performance API is available
|
|
15
15
|
// e.g. JSDom (used in Jest) doesn't implement these
|
|
16
|
+
// eslint-disable-next-line
|
|
16
17
|
const perf = globalThis.performance;
|
|
17
18
|
const isPerfSupported = typeof perf !== 'undefined' && typeof perf.mark === 'function' && typeof perf.clearMarks === 'function' && typeof perf.measure === 'function' && typeof perf.clearMeasures === 'function';
|
|
18
19
|
function getMeasureName(id, specifier) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
LWR.define('lwr/vault/v/0_17_2-
|
|
1
|
+
LWR.define('lwr/vault/v/0_17_2-alpha_5', ['exports'], (function (exports) { 'use strict';
|
|
2
2
|
|
|
3
3
|
// Credential vault for storing setters and subscribers for OAuth info
|
|
4
4
|
// This module is a SINGLETON and must be excluded from ESM bundling
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6
6
|
*/
|
|
7
|
-
/* LWR Error Shim v0.17.2-alpha.
|
|
7
|
+
/* LWR Error Shim v0.17.2-alpha.5 */
|
|
8
8
|
!function(){"use strict";const o=globalThis;if(!(o.LWR&&o.LWR.define)){const r=new Error("The LWR application failed to bootstrap");if(!o.LWR||!o.LWR.onError)throw r;o.LWR.onError(r)}}();
|