@salesforce/lds-worker-api 1.297.0 → 1.298.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.
@@ -15,6 +15,7 @@ import { parseAndVisit, gql } from 'force/ldsGraphqlParser';
15
15
  import * as lightningAppsApi from 'lightning/uiAppsApi';
16
16
  import * as unstableLightningAppsApi from 'lightning/unstable_uiAppsApi';
17
17
  import * as lightningLayoutApi from 'lightning/uiLayoutApi';
18
+ import * as lightningLayoutUserStateApi from 'lightning/uiLayoutUserStateApi';
18
19
  import * as unstableLightningLayoutApi from 'lightning/unstable_uiLayoutApi';
19
20
  import * as lightningListApi from 'lightning/uiListApi';
20
21
  import * as unstableLightningListApi from 'lightning/unstable_uiListApi';
@@ -60,7 +61,7 @@ function getAdapterMaps() {
60
61
  if (lazyDMLAdapterMap === undefined || lazyImperativeAdapterMap === undefined) {
61
62
  // We should eventually be explicit about what we expose here instead of exporting everything from the modules,
62
63
  // this is our API contract to native callers and should be explicit
63
- const map = Object.assign({}, gqlApi, lightningAppsApi, lightningLayoutApi, lightningListApi, lightningLookupsApi, lightningObjectApi, lightningRecordActionsApi, lightningRecordApi, lightningRecordAvatarApi, lightningRelatedListApi, lightningGraphQLApi, unstableLightningAppsApi, unstableLightningLayoutApi, unstableLightningListApi, unstableLightningLookupsApi, unstableLightningObjectApi, unstableLightningRecordActionsApi, unstableLightningRecordApi, unstableLightningRecordAvatarApi, unstableLightningRelatedListApi);
64
+ const map = Object.assign({}, gqlApi, lightningAppsApi, lightningLayoutApi, lightningLayoutUserStateApi, lightningListApi, lightningLookupsApi, lightningObjectApi, lightningRecordActionsApi, lightningRecordApi, lightningRecordAvatarApi, lightningRelatedListApi, lightningGraphQLApi, unstableLightningAppsApi, unstableLightningLayoutApi, unstableLightningListApi, unstableLightningLookupsApi, unstableLightningObjectApi, unstableLightningRecordActionsApi, unstableLightningRecordApi, unstableLightningRecordAvatarApi, unstableLightningRelatedListApi);
64
65
  const imperativeAdapterNames = keys(map).filter((name) => name.endsWith(IMPERATIVE_ADAPTER_SUFFIX));
65
66
  const imperativeMap = {};
66
67
  for (const adapterName of imperativeAdapterNames) {
@@ -1070,4 +1071,4 @@ if (process.env.NODE_ENV !== 'production') {
1070
1071
  }
1071
1072
 
1072
1073
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
1073
- // version: 1.297.0-1fc775982
1074
+ // version: 1.298.0-3a2eedddc
@@ -4204,7 +4204,7 @@ function withDefaultLuvio(callback) {
4204
4204
  }
4205
4205
  callbacks.push(callback);
4206
4206
  }
4207
- // version: 1.297.0-1fc775982
4207
+ // version: 1.298.0-3a2eedddc
4208
4208
 
4209
4209
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4210
4210
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15712,7 +15712,7 @@ function gql(literals, ...subs) {
15712
15712
  }
15713
15713
  return superResult;
15714
15714
  }
15715
- // version: 1.297.0-1fc775982
15715
+ // version: 1.298.0-3a2eedddc
15716
15716
 
15717
15717
  function unwrap(data) {
15718
15718
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16641,7 +16641,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16641
16641
  const { apiFamily, name } = metadata;
16642
16642
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16643
16643
  }
16644
- // version: 1.297.0-1fc775982
16644
+ // version: 1.298.0-3a2eedddc
16645
16645
 
16646
16646
  /**
16647
16647
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -43198,11 +43198,23 @@ function validateAdapterConfig$2$1(untrustedConfig, configPropertyNames) {
43198
43198
  return config;
43199
43199
  }
43200
43200
 
43201
+ const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
43201
43202
  function getHeaders(clientOptions) {
43202
43203
  const headers = {};
43203
43204
  if (untrustedIsObject$2(clientOptions)) {
43204
43205
  if (typeof clientOptions.ifUnmodifiedSince === 'string') {
43205
43206
  headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
43207
+ // HTTP standard format date is expected by UI-API
43208
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
43209
+ // A component built for Connect API must use If-Unmodified-Since
43210
+ // dates formatted as ISO 8601, which does not match the HTTP spec.
43211
+ // For compatibility, convert the date to match the standard.
43212
+ if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
43213
+ const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
43214
+ if (utcString !== 'Invalid Date') {
43215
+ headers.ifUnmodifiedSince = utcString;
43216
+ }
43217
+ }
43206
43218
  }
43207
43219
  }
43208
43220
  return headers;
@@ -44238,7 +44250,7 @@ withDefaultLuvio((luvio) => {
44238
44250
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
44239
44251
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
44240
44252
  });
44241
- // version: 1.297.0-e0cfbd880
44253
+ // version: 1.298.0-6f15dc1ec
44242
44254
 
44243
44255
  var ldsIdempotencyWriteDisabled = {
44244
44256
  isOpen: function (e) {
@@ -62648,7 +62660,7 @@ register$1({
62648
62660
  id: '@salesforce/lds-network-adapter',
62649
62661
  instrument: instrument$2,
62650
62662
  });
62651
- // version: 1.297.0-1fc775982
62663
+ // version: 1.298.0-3a2eedddc
62652
62664
 
62653
62665
  const { create: create$3, keys: keys$3 } = Object;
62654
62666
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -82717,7 +82729,7 @@ register$1({
82717
82729
  configuration: { ...configurationForGraphQLAdapters$1 },
82718
82730
  instrument: instrument$1,
82719
82731
  });
82720
- // version: 1.297.0-e0cfbd880
82732
+ // version: 1.298.0-6f15dc1ec
82721
82733
 
82722
82734
  // On core the unstable adapters are re-exported with different names,
82723
82735
  // we want to match them here.
@@ -84973,7 +84985,7 @@ withDefaultLuvio((luvio) => {
84973
84985
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
84974
84986
  graphQLImperative = ldsAdapter;
84975
84987
  });
84976
- // version: 1.297.0-e0cfbd880
84988
+ // version: 1.298.0-6f15dc1ec
84977
84989
 
84978
84990
  var gqlApi = /*#__PURE__*/Object.freeze({
84979
84991
  __proto__: null,
@@ -84998,7 +85010,7 @@ function getAdapterMaps() {
84998
85010
  if (lazyDMLAdapterMap === undefined || lazyImperativeAdapterMap === undefined) {
84999
85011
  // We should eventually be explicit about what we expose here instead of exporting everything from the modules,
85000
85012
  // this is our API contract to native callers and should be explicit
85001
- const map = Object.assign({}, gqlApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi);
85013
+ const map = Object.assign({}, gqlApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi);
85002
85014
  const imperativeAdapterNames = keys$3(map).filter((name) => name.endsWith(IMPERATIVE_ADAPTER_SUFFIX));
85003
85015
  const imperativeMap = {};
85004
85016
  for (const adapterName of imperativeAdapterNames) {
@@ -85708,7 +85720,7 @@ const callbacks$1 = [];
85708
85720
  function register(r) {
85709
85721
  callbacks$1.forEach((callback) => callback(r));
85710
85722
  }
85711
- // version: 1.297.0-1fc775982
85723
+ // version: 1.298.0-3a2eedddc
85712
85724
 
85713
85725
  /**
85714
85726
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -90670,4 +90682,4 @@ const { luvio } = getRuntime();
90670
90682
  setDefaultLuvio({ luvio });
90671
90683
 
90672
90684
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
90673
- // version: 1.297.0-1fc775982
90685
+ // version: 1.298.0-3a2eedddc
@@ -4210,7 +4210,7 @@
4210
4210
  }
4211
4211
  callbacks.push(callback);
4212
4212
  }
4213
- // version: 1.297.0-1fc775982
4213
+ // version: 1.298.0-3a2eedddc
4214
4214
 
4215
4215
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4216
4216
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15718,7 +15718,7 @@
15718
15718
  }
15719
15719
  return superResult;
15720
15720
  }
15721
- // version: 1.297.0-1fc775982
15721
+ // version: 1.298.0-3a2eedddc
15722
15722
 
15723
15723
  function unwrap(data) {
15724
15724
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16647,7 +16647,7 @@
16647
16647
  const { apiFamily, name } = metadata;
16648
16648
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16649
16649
  }
16650
- // version: 1.297.0-1fc775982
16650
+ // version: 1.298.0-3a2eedddc
16651
16651
 
16652
16652
  /**
16653
16653
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -43204,11 +43204,23 @@
43204
43204
  return config;
43205
43205
  }
43206
43206
 
43207
+ const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
43207
43208
  function getHeaders(clientOptions) {
43208
43209
  const headers = {};
43209
43210
  if (untrustedIsObject$2(clientOptions)) {
43210
43211
  if (typeof clientOptions.ifUnmodifiedSince === 'string') {
43211
43212
  headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
43213
+ // HTTP standard format date is expected by UI-API
43214
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
43215
+ // A component built for Connect API must use If-Unmodified-Since
43216
+ // dates formatted as ISO 8601, which does not match the HTTP spec.
43217
+ // For compatibility, convert the date to match the standard.
43218
+ if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
43219
+ const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
43220
+ if (utcString !== 'Invalid Date') {
43221
+ headers.ifUnmodifiedSince = utcString;
43222
+ }
43223
+ }
43212
43224
  }
43213
43225
  }
43214
43226
  return headers;
@@ -44244,7 +44256,7 @@
44244
44256
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
44245
44257
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
44246
44258
  });
44247
- // version: 1.297.0-e0cfbd880
44259
+ // version: 1.298.0-6f15dc1ec
44248
44260
 
44249
44261
  var ldsIdempotencyWriteDisabled = {
44250
44262
  isOpen: function (e) {
@@ -62654,7 +62666,7 @@
62654
62666
  id: '@salesforce/lds-network-adapter',
62655
62667
  instrument: instrument$2,
62656
62668
  });
62657
- // version: 1.297.0-1fc775982
62669
+ // version: 1.298.0-3a2eedddc
62658
62670
 
62659
62671
  const { create: create$3, keys: keys$3 } = Object;
62660
62672
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -82723,7 +82735,7 @@
82723
82735
  configuration: { ...configurationForGraphQLAdapters$1 },
82724
82736
  instrument: instrument$1,
82725
82737
  });
82726
- // version: 1.297.0-e0cfbd880
82738
+ // version: 1.298.0-6f15dc1ec
82727
82739
 
82728
82740
  // On core the unstable adapters are re-exported with different names,
82729
82741
  // we want to match them here.
@@ -84979,7 +84991,7 @@
84979
84991
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
84980
84992
  graphQLImperative = ldsAdapter;
84981
84993
  });
84982
- // version: 1.297.0-e0cfbd880
84994
+ // version: 1.298.0-6f15dc1ec
84983
84995
 
84984
84996
  var gqlApi = /*#__PURE__*/Object.freeze({
84985
84997
  __proto__: null,
@@ -85004,7 +85016,7 @@
85004
85016
  if (lazyDMLAdapterMap === undefined || lazyImperativeAdapterMap === undefined) {
85005
85017
  // We should eventually be explicit about what we expose here instead of exporting everything from the modules,
85006
85018
  // this is our API contract to native callers and should be explicit
85007
- const map = Object.assign({}, gqlApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi);
85019
+ const map = Object.assign({}, gqlApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi, unstableLightningRelatedListApi);
85008
85020
  const imperativeAdapterNames = keys$3(map).filter((name) => name.endsWith(IMPERATIVE_ADAPTER_SUFFIX));
85009
85021
  const imperativeMap = {};
85010
85022
  for (const adapterName of imperativeAdapterNames) {
@@ -85714,7 +85726,7 @@
85714
85726
  function register(r) {
85715
85727
  callbacks$1.forEach((callback) => callback(r));
85716
85728
  }
85717
- // version: 1.297.0-1fc775982
85729
+ // version: 1.298.0-3a2eedddc
85718
85730
 
85719
85731
  /**
85720
85732
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -90695,4 +90707,4 @@
90695
90707
  exports.subscribeToAdapter = subscribeToAdapter;
90696
90708
 
90697
90709
  }));
90698
- // version: 1.297.0-1fc775982
90710
+ // version: 1.298.0-3a2eedddc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.297.0",
3
+ "version": "1.298.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",
@@ -35,15 +35,15 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
38
- "@salesforce/lds-adapters-graphql": "^1.297.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.297.0",
40
- "@salesforce/lds-default-luvio": "^1.297.0",
41
- "@salesforce/lds-drafts": "^1.297.0",
42
- "@salesforce/lds-graphql-parser": "^1.297.0",
43
- "@salesforce/lds-luvio-engine": "^1.297.0",
44
- "@salesforce/lds-priming": "^1.297.0",
45
- "@salesforce/lds-runtime-mobile": "^1.297.0",
46
- "@salesforce/nimbus-plugin-lds": "^1.297.0",
38
+ "@salesforce/lds-adapters-graphql": "^1.298.0",
39
+ "@salesforce/lds-adapters-uiapi": "^1.298.0",
40
+ "@salesforce/lds-default-luvio": "^1.298.0",
41
+ "@salesforce/lds-drafts": "^1.298.0",
42
+ "@salesforce/lds-graphql-parser": "^1.298.0",
43
+ "@salesforce/lds-luvio-engine": "^1.298.0",
44
+ "@salesforce/lds-priming": "^1.298.0",
45
+ "@salesforce/lds-runtime-mobile": "^1.298.0",
46
+ "@salesforce/nimbus-plugin-lds": "^1.298.0",
47
47
  "ajv": "^8.11.0",
48
48
  "glob": "^7.1.5",
49
49
  "nimbus-types": "^2.0.0-alpha1",