@salesforce/lwc-adapters-uiapi 1.294.0 → 1.296.0
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/main.js +12 -0
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -60899,11 +60899,23 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
|
60899
60899
|
return config;
|
|
60900
60900
|
}
|
|
60901
60901
|
|
|
60902
|
+
const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
|
|
60902
60903
|
function getHeaders(clientOptions) {
|
|
60903
60904
|
const headers = {};
|
|
60904
60905
|
if (untrustedIsObject(clientOptions)) {
|
|
60905
60906
|
if (typeof clientOptions.ifUnmodifiedSince === 'string') {
|
|
60906
60907
|
headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
|
|
60908
|
+
// HTTP standard format date is expected by UI-API
|
|
60909
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
|
|
60910
|
+
// A component built for Connect API must use If-Unmodified-Since
|
|
60911
|
+
// dates formatted as ISO 8601, which does not match the HTTP spec.
|
|
60912
|
+
// For compatibility, convert the date to match the standard.
|
|
60913
|
+
if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
|
|
60914
|
+
const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
|
|
60915
|
+
if (utcString !== 'Invalid Date') {
|
|
60916
|
+
headers.ifUnmodifiedSince = utcString;
|
|
60917
|
+
}
|
|
60918
|
+
}
|
|
60907
60919
|
}
|
|
60908
60920
|
}
|
|
60909
60921
|
return headers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.296.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "UIAPI adapters with LWC bindings",
|
|
6
6
|
"module": "dist/main.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rm -rf dist src/generated"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
34
|
+
"@salesforce/lds-adapters-uiapi": "^1.296.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@luvio/lwc-luvio": "0.154.20",
|
|
38
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
38
|
+
"@salesforce/lds-default-luvio": "^1.296.0"
|
|
39
39
|
}
|
|
40
40
|
}
|