@lwrjs/client-modules 0.12.0-alpha.1 → 0.12.0-alpha.2
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.
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.20.
|
|
1456
|
+
/*! version: 0.20.8 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.20.
|
|
2115
|
+
/*! version: 0.20.8 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.20.
|
|
2174
|
+
/*! version: 0.20.8 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.20.
|
|
3860
|
+
/*! version: 0.20.8 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.20.
|
|
4109
|
+
/*! version: 0.20.8 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.20.
|
|
4307
|
+
/*! version: 0.20.8 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -9883,7 +9883,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9883
9883
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9884
9884
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9885
9885
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9886
|
-
/*! version: 0.20.
|
|
9886
|
+
/*! version: 0.20.8 */
|
|
9887
9887
|
|
|
9888
9888
|
/*!
|
|
9889
9889
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -14870,6 +14870,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14870
14870
|
const forOfStateCache$LWS = toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
14871
14871
|
const resourcePromiseCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
14872
14872
|
const resourceStatusCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
14873
|
+
const scriptSrcGetterDistortion$LWS = distortions$LWS.get(isRootRecord$LWS ? HTMLScriptElementProtoSrcGetter$LWS : ObjectLookupOwnGetter$LWS$1(HTMLScriptElementProto$LWS, 'src'));
|
|
14873
14874
|
const scriptSrcSetterDistortion$LWS = distortions$LWS.get(isRootRecord$LWS ? HTMLScriptElementProtoSrcSetter$LWS : ObjectLookupOwnSetter$LWS(HTMLScriptElementProto$LWS, 'src'));
|
|
14874
14875
|
// istanbul ignore next: deprecated code path unreachable via tests
|
|
14875
14876
|
function genStep$LWS(resolve$LWS, reject$LWS, next$LWS, thrower$LWS, genMethodWrapper$LWS, arg$LWS) {
|
|
@@ -14889,25 +14890,19 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14889
14890
|
}
|
|
14890
14891
|
}
|
|
14891
14892
|
// istanbul ignore next: currently unreachable via tests, platformResourceLoader testing is exclusively done in AMD format mode
|
|
14892
|
-
function loadPromise$LWS(element$LWS,
|
|
14893
|
-
const isLinkTag$LWS = tagName$LWS === 'LINK';
|
|
14893
|
+
function loadPromise$LWS(element$LWS, urlAsString$LWS) {
|
|
14894
14894
|
const promise$LWS = new PromiseCtor$LWS((resolve$LWS, reject$LWS) => {
|
|
14895
14895
|
function onerror$LWS(event$LWS) {
|
|
14896
14896
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14897
14897
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14898
14898
|
ReflectApply$LWS$1(EventProtoStopPropagation$LWS, event$LWS, []);
|
|
14899
|
-
|
|
14900
|
-
resourceStatusCache$LWS.set(element$LWS, 1 /* ResourceLoaderStatus.Errored */);
|
|
14901
|
-
}
|
|
14902
|
-
|
|
14899
|
+
resourceStatusCache$LWS.set(element$LWS, 1 /* ResourceLoaderStatus.Errored */);
|
|
14903
14900
|
reject$LWS(createResourceLoadError$LWS(urlAsString$LWS));
|
|
14904
14901
|
}
|
|
14905
14902
|
function onload$LWS() {
|
|
14906
14903
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14907
14904
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14908
|
-
|
|
14909
|
-
resourceStatusCache$LWS.set(element$LWS, 3 /* ResourceLoaderStatus.Loaded */);
|
|
14910
|
-
}
|
|
14905
|
+
resourceStatusCache$LWS.set(element$LWS, 3 /* ResourceLoaderStatus.Loaded */);
|
|
14911
14906
|
// platformResourceLoader and ltng:require have to be synchronized in terms of
|
|
14912
14907
|
// creating and loading scripts. This expando is used by ltng:require to know if a
|
|
14913
14908
|
// script has been loaded by it or not. See W-13034908.
|
|
@@ -14920,10 +14915,8 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14920
14915
|
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14921
14916
|
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14922
14917
|
});
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
resourcePromiseCache$LWS.set(element$LWS, promise$LWS);
|
|
14926
|
-
}
|
|
14918
|
+
resourceStatusCache$LWS.set(element$LWS, 2 /* ResourceLoaderStatus.Loading */);
|
|
14919
|
+
resourcePromiseCache$LWS.set(element$LWS, promise$LWS);
|
|
14927
14920
|
ReflectApply$LWS$1(NodeProtoAppendChild$LWS$1, head$LWS, [element$LWS]);
|
|
14928
14921
|
return promise$LWS;
|
|
14929
14922
|
}
|
|
@@ -14997,6 +14990,31 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14997
14990
|
// istanbul ignore next: currently unreachable via tests, platformResourceLoader testing is exclusively done in AMD format mode
|
|
14998
14991
|
function loadScript$LWS(_thisArg$LWS, url$LWS) {
|
|
14999
14992
|
const urlAsString$LWS = toString$LWS(url$LWS);
|
|
14993
|
+
const resolvedURL$LWS = resolveURL$LWS(urlAsString$LWS);
|
|
14994
|
+
const scripts$LWS = ReflectApply$LWS$1(ElementProtoQuerySelectorAll$LWS, head$LWS, ['script']);
|
|
14995
|
+
for (let i$LWS = 0, {
|
|
14996
|
+
length: length$LWS
|
|
14997
|
+
} = scripts$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
14998
|
+
var _resourceStatusCache$$LWS;
|
|
14999
|
+
const script$LWS = scripts$LWS[i$LWS];
|
|
15000
|
+
// Ensure that this <script> is actually in the resource cache for this sandbox.
|
|
15001
|
+
// Previously this check only looked at the <script>'s src, which would give a
|
|
15002
|
+
// false positive if more than one sandbox had loaded this resource.
|
|
15003
|
+
const status$LWS = (_resourceStatusCache$$LWS = resourceStatusCache$LWS.get(script$LWS)) != null ? _resourceStatusCache$$LWS : 0 /* ResourceLoaderStatus.None */;
|
|
15004
|
+
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
15005
|
+
if (status$LWS && ReflectApply$LWS$1(scriptSrcGetterDistortion$LWS, script$LWS, []) === resolvedURL$LWS) {
|
|
15006
|
+
if (status$LWS === 3 /* ResourceLoaderStatus.Loaded */) {
|
|
15007
|
+
return PromiseResolve$LWS(undefined);
|
|
15008
|
+
}
|
|
15009
|
+
// istanbul ignore if: this status cannot be tested without navigating the page itself during the execution of the request.
|
|
15010
|
+
if (status$LWS === 1 /* ResourceLoaderStatus.Errored */) {
|
|
15011
|
+
return PromiseReject$LWS(createResourceLoadError$LWS(urlAsString$LWS));
|
|
15012
|
+
}
|
|
15013
|
+
if (status$LWS === 2 /* ResourceLoaderStatus.Loading */) {
|
|
15014
|
+
return resourcePromiseCache$LWS.get(script$LWS);
|
|
15015
|
+
}
|
|
15016
|
+
}
|
|
15017
|
+
}
|
|
15000
15018
|
const script$LWS = ReflectApply$LWS$1(DocumentProtoCreateElement$LWS$1, document$LWS, ['script']);
|
|
15001
15019
|
script$LWS.type = 'text/javascript';
|
|
15002
15020
|
// platformResourceLoader and ltng:require have to be synchronized in terms of creating
|
|
@@ -15005,7 +15023,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15005
15023
|
// eslint-disable-next-line no-underscore-dangle
|
|
15006
15024
|
script$LWS._ltngRequireCreated = true;
|
|
15007
15025
|
ReflectApply$LWS$1(scriptSrcSetterDistortion$LWS, script$LWS, [urlAsString$LWS]);
|
|
15008
|
-
return loadPromise$LWS(script$LWS,
|
|
15026
|
+
return loadPromise$LWS(script$LWS, urlAsString$LWS);
|
|
15009
15027
|
},
|
|
15010
15028
|
// Functionality based on platformResourceLoader#loadStyle (http://sfdc.co/bIpMYB) but
|
|
15011
15029
|
// adjusted for multiple sandboxes. This loadStyle will create one <link> element in the DOM
|
|
@@ -15015,8 +15033,8 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15015
15033
|
const urlAsString$LWS = toString$LWS(url$LWS);
|
|
15016
15034
|
let link$LWS = ReflectApply$LWS$1(ElementProtoQuerySelector$LWS, head$LWS, [`link[href=${enquote$LWS(urlAsString$LWS)}]`]);
|
|
15017
15035
|
if (link$LWS) {
|
|
15018
|
-
var _resourceStatusCache
|
|
15019
|
-
const status$LWS = (_resourceStatusCache
|
|
15036
|
+
var _resourceStatusCache$2$LWS;
|
|
15037
|
+
const status$LWS = (_resourceStatusCache$2$LWS = resourceStatusCache$LWS.get(link$LWS)) != null ? _resourceStatusCache$2$LWS : 0 /* ResourceLoaderStatus.None */;
|
|
15020
15038
|
if (status$LWS === 0 /* ResourceLoaderStatus.None */ || status$LWS === 3 /* ResourceLoaderStatus.Loaded */) {
|
|
15021
15039
|
return PromiseResolve$LWS(undefined);
|
|
15022
15040
|
}
|
|
@@ -15031,7 +15049,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15031
15049
|
link$LWS.type = 'text/css';
|
|
15032
15050
|
link$LWS.rel = 'stylesheet';
|
|
15033
15051
|
link$LWS.href = urlAsString$LWS;
|
|
15034
|
-
return loadPromise$LWS(link$LWS,
|
|
15052
|
+
return loadPromise$LWS(link$LWS, urlAsString$LWS);
|
|
15035
15053
|
}];
|
|
15036
15054
|
}
|
|
15037
15055
|
function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
@@ -15044,7 +15062,7 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15044
15062
|
// tools from mistaking the regexp or the replacement string for an
|
|
15045
15063
|
// actual source mapping URL.
|
|
15046
15064
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15047
|
-
sourceText$LWS = `\n//# LWS Version = "0.20.
|
|
15065
|
+
sourceText$LWS = `\n//# LWS Version = "0.20.8"\n${sourceText$LWS}`;
|
|
15048
15066
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15049
15067
|
// Append "'use strict'" to the extracted function body so it is
|
|
15050
15068
|
// evaluated in strict mode.
|
|
@@ -15739,7 +15757,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15739
15757
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15740
15758
|
return secureDep$LWS;
|
|
15741
15759
|
}
|
|
15742
|
-
/*! version: 0.20.
|
|
15760
|
+
/*! version: 0.20.8 */
|
|
15743
15761
|
|
|
15744
15762
|
const loaderDefine = globalThis.LWR.define;
|
|
15745
15763
|
|
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.20.
|
|
1456
|
+
/*! version: 0.20.8 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.20.
|
|
2115
|
+
/*! version: 0.20.8 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.20.
|
|
2174
|
+
/*! version: 0.20.8 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.20.
|
|
3860
|
+
/*! version: 0.20.8 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.20.
|
|
4109
|
+
/*! version: 0.20.8 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.20.
|
|
4307
|
+
/*! version: 0.20.8 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -9883,7 +9883,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9883
9883
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9884
9884
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9885
9885
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9886
|
-
/*! version: 0.20.
|
|
9886
|
+
/*! version: 0.20.8 */
|
|
9887
9887
|
|
|
9888
9888
|
/*!
|
|
9889
9889
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -14870,6 +14870,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14870
14870
|
const forOfStateCache$LWS = toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
14871
14871
|
const resourcePromiseCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
14872
14872
|
const resourceStatusCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
14873
|
+
const scriptSrcGetterDistortion$LWS = distortions$LWS.get(isRootRecord$LWS ? HTMLScriptElementProtoSrcGetter$LWS : ObjectLookupOwnGetter$LWS$1(HTMLScriptElementProto$LWS, 'src'));
|
|
14873
14874
|
const scriptSrcSetterDistortion$LWS = distortions$LWS.get(isRootRecord$LWS ? HTMLScriptElementProtoSrcSetter$LWS : ObjectLookupOwnSetter$LWS(HTMLScriptElementProto$LWS, 'src'));
|
|
14874
14875
|
// istanbul ignore next: deprecated code path unreachable via tests
|
|
14875
14876
|
function genStep$LWS(resolve$LWS, reject$LWS, next$LWS, thrower$LWS, genMethodWrapper$LWS, arg$LWS) {
|
|
@@ -14889,25 +14890,19 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14889
14890
|
}
|
|
14890
14891
|
}
|
|
14891
14892
|
// istanbul ignore next: currently unreachable via tests, platformResourceLoader testing is exclusively done in AMD format mode
|
|
14892
|
-
function loadPromise$LWS(element$LWS,
|
|
14893
|
-
const isLinkTag$LWS = tagName$LWS === 'LINK';
|
|
14893
|
+
function loadPromise$LWS(element$LWS, urlAsString$LWS) {
|
|
14894
14894
|
const promise$LWS = new PromiseCtor$LWS((resolve$LWS, reject$LWS) => {
|
|
14895
14895
|
function onerror$LWS(event$LWS) {
|
|
14896
14896
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14897
14897
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14898
14898
|
ReflectApply$LWS$1(EventProtoStopPropagation$LWS, event$LWS, []);
|
|
14899
|
-
|
|
14900
|
-
resourceStatusCache$LWS.set(element$LWS, 1 /* ResourceLoaderStatus.Errored */);
|
|
14901
|
-
}
|
|
14902
|
-
|
|
14899
|
+
resourceStatusCache$LWS.set(element$LWS, 1 /* ResourceLoaderStatus.Errored */);
|
|
14903
14900
|
reject$LWS(createResourceLoadError$LWS(urlAsString$LWS));
|
|
14904
14901
|
}
|
|
14905
14902
|
function onload$LWS() {
|
|
14906
14903
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14907
14904
|
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14908
|
-
|
|
14909
|
-
resourceStatusCache$LWS.set(element$LWS, 3 /* ResourceLoaderStatus.Loaded */);
|
|
14910
|
-
}
|
|
14905
|
+
resourceStatusCache$LWS.set(element$LWS, 3 /* ResourceLoaderStatus.Loaded */);
|
|
14911
14906
|
// platformResourceLoader and ltng:require have to be synchronized in terms of
|
|
14912
14907
|
// creating and loading scripts. This expando is used by ltng:require to know if a
|
|
14913
14908
|
// script has been loaded by it or not. See W-13034908.
|
|
@@ -14920,10 +14915,8 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14920
14915
|
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, element$LWS, ['error', onerror$LWS]);
|
|
14921
14916
|
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, element$LWS, ['load', onload$LWS]);
|
|
14922
14917
|
});
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
resourcePromiseCache$LWS.set(element$LWS, promise$LWS);
|
|
14926
|
-
}
|
|
14918
|
+
resourceStatusCache$LWS.set(element$LWS, 2 /* ResourceLoaderStatus.Loading */);
|
|
14919
|
+
resourcePromiseCache$LWS.set(element$LWS, promise$LWS);
|
|
14927
14920
|
ReflectApply$LWS$1(NodeProtoAppendChild$LWS$1, head$LWS, [element$LWS]);
|
|
14928
14921
|
return promise$LWS;
|
|
14929
14922
|
}
|
|
@@ -14997,6 +14990,31 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
14997
14990
|
// istanbul ignore next: currently unreachable via tests, platformResourceLoader testing is exclusively done in AMD format mode
|
|
14998
14991
|
function loadScript$LWS(_thisArg$LWS, url$LWS) {
|
|
14999
14992
|
const urlAsString$LWS = toString$LWS(url$LWS);
|
|
14993
|
+
const resolvedURL$LWS = resolveURL$LWS(urlAsString$LWS);
|
|
14994
|
+
const scripts$LWS = ReflectApply$LWS$1(ElementProtoQuerySelectorAll$LWS, head$LWS, ['script']);
|
|
14995
|
+
for (let i$LWS = 0, {
|
|
14996
|
+
length: length$LWS
|
|
14997
|
+
} = scripts$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
14998
|
+
var _resourceStatusCache$$LWS;
|
|
14999
|
+
const script$LWS = scripts$LWS[i$LWS];
|
|
15000
|
+
// Ensure that this <script> is actually in the resource cache for this sandbox.
|
|
15001
|
+
// Previously this check only looked at the <script>'s src, which would give a
|
|
15002
|
+
// false positive if more than one sandbox had loaded this resource.
|
|
15003
|
+
const status$LWS = (_resourceStatusCache$$LWS = resourceStatusCache$LWS.get(script$LWS)) != null ? _resourceStatusCache$$LWS : 0 /* ResourceLoaderStatus.None */;
|
|
15004
|
+
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
15005
|
+
if (status$LWS && ReflectApply$LWS$1(scriptSrcGetterDistortion$LWS, script$LWS, []) === resolvedURL$LWS) {
|
|
15006
|
+
if (status$LWS === 3 /* ResourceLoaderStatus.Loaded */) {
|
|
15007
|
+
return PromiseResolve$LWS(undefined);
|
|
15008
|
+
}
|
|
15009
|
+
// istanbul ignore if: this status cannot be tested without navigating the page itself during the execution of the request.
|
|
15010
|
+
if (status$LWS === 1 /* ResourceLoaderStatus.Errored */) {
|
|
15011
|
+
return PromiseReject$LWS(createResourceLoadError$LWS(urlAsString$LWS));
|
|
15012
|
+
}
|
|
15013
|
+
if (status$LWS === 2 /* ResourceLoaderStatus.Loading */) {
|
|
15014
|
+
return resourcePromiseCache$LWS.get(script$LWS);
|
|
15015
|
+
}
|
|
15016
|
+
}
|
|
15017
|
+
}
|
|
15000
15018
|
const script$LWS = ReflectApply$LWS$1(DocumentProtoCreateElement$LWS$1, document$LWS, ['script']);
|
|
15001
15019
|
script$LWS.type = 'text/javascript';
|
|
15002
15020
|
// platformResourceLoader and ltng:require have to be synchronized in terms of creating
|
|
@@ -15005,7 +15023,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15005
15023
|
// eslint-disable-next-line no-underscore-dangle
|
|
15006
15024
|
script$LWS._ltngRequireCreated = true;
|
|
15007
15025
|
ReflectApply$LWS$1(scriptSrcSetterDistortion$LWS, script$LWS, [urlAsString$LWS]);
|
|
15008
|
-
return loadPromise$LWS(script$LWS,
|
|
15026
|
+
return loadPromise$LWS(script$LWS, urlAsString$LWS);
|
|
15009
15027
|
},
|
|
15010
15028
|
// Functionality based on platformResourceLoader#loadStyle (http://sfdc.co/bIpMYB) but
|
|
15011
15029
|
// adjusted for multiple sandboxes. This loadStyle will create one <link> element in the DOM
|
|
@@ -15015,8 +15033,8 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15015
15033
|
const urlAsString$LWS = toString$LWS(url$LWS);
|
|
15016
15034
|
let link$LWS = ReflectApply$LWS$1(ElementProtoQuerySelector$LWS, head$LWS, [`link[href=${enquote$LWS(urlAsString$LWS)}]`]);
|
|
15017
15035
|
if (link$LWS) {
|
|
15018
|
-
var _resourceStatusCache
|
|
15019
|
-
const status$LWS = (_resourceStatusCache
|
|
15036
|
+
var _resourceStatusCache$2$LWS;
|
|
15037
|
+
const status$LWS = (_resourceStatusCache$2$LWS = resourceStatusCache$LWS.get(link$LWS)) != null ? _resourceStatusCache$2$LWS : 0 /* ResourceLoaderStatus.None */;
|
|
15020
15038
|
if (status$LWS === 0 /* ResourceLoaderStatus.None */ || status$LWS === 3 /* ResourceLoaderStatus.Loaded */) {
|
|
15021
15039
|
return PromiseResolve$LWS(undefined);
|
|
15022
15040
|
}
|
|
@@ -15031,7 +15049,7 @@ function createEvalHelpersFactoryArgs$LWS(record$LWS) {
|
|
|
15031
15049
|
link$LWS.type = 'text/css';
|
|
15032
15050
|
link$LWS.rel = 'stylesheet';
|
|
15033
15051
|
link$LWS.href = urlAsString$LWS;
|
|
15034
|
-
return loadPromise$LWS(link$LWS,
|
|
15052
|
+
return loadPromise$LWS(link$LWS, urlAsString$LWS);
|
|
15035
15053
|
}];
|
|
15036
15054
|
}
|
|
15037
15055
|
function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
@@ -15044,7 +15062,7 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15044
15062
|
// tools from mistaking the regexp or the replacement string for an
|
|
15045
15063
|
// actual source mapping URL.
|
|
15046
15064
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15047
|
-
sourceText$LWS = `\n//# LWS Version = "0.20.
|
|
15065
|
+
sourceText$LWS = `\n//# LWS Version = "0.20.8"\n${sourceText$LWS}`;
|
|
15048
15066
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15049
15067
|
// Append "'use strict'" to the extracted function body so it is
|
|
15050
15068
|
// evaluated in strict mode.
|
|
@@ -15769,7 +15787,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15769
15787
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15770
15788
|
return secureDep$LWS;
|
|
15771
15789
|
}
|
|
15772
|
-
/*! version: 0.20.
|
|
15790
|
+
/*! version: 0.20.8 */
|
|
15773
15791
|
|
|
15774
15792
|
export { CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, createRootWindowSandboxRecord$LWS as createRootWindowSandboxRecord, evaluateFunction$LWS as evaluateFunction, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, trusted, wrapDependency$LWS as wrapDependency };
|
|
15775
15793
|
//# sourceMappingURL=lockerSandbox.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.12.0-alpha.
|
|
7
|
+
"version": "0.12.0-alpha.2",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"build:platform": "node scripts/strip-for-core.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@locker/sandbox": "0.20.
|
|
37
|
-
"@lwrjs/shared-utils": "0.12.0-alpha.
|
|
36
|
+
"@locker/sandbox": "0.20.8",
|
|
37
|
+
"@lwrjs/shared-utils": "0.12.0-alpha.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.12.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.12.0-alpha.2",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
42
42
|
"@rollup/plugin-sucrase": "^5.0.2",
|
|
43
43
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": ">=
|
|
67
|
+
"node": ">=18.0.0"
|
|
68
68
|
},
|
|
69
69
|
"volta": {
|
|
70
70
|
"extends": "../../../package.json"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "586a2aa659882483af9249dc3db7fe07bc842a25"
|
|
73
73
|
}
|