@salesforce/lds-runtime-mobile 1.309.0 → 1.310.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.
Files changed (3) hide show
  1. package/dist/main.js +13 -5
  2. package/package.json +18 -18
  3. package/sfdc/main.js +13 -5
package/dist/main.js CHANGED
@@ -7796,14 +7796,22 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
7796
7796
  if (fieldInfo !== undefined) {
7797
7797
  const { dataType } = fieldInfo;
7798
7798
  recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
7799
+ // for a DateTime field, we are going to convert the string to an ISOString value.
7799
7800
  if (dataType === 'DateTime' &&
7800
7801
  draftField !== null &&
7801
7802
  typeof draftField === 'string') {
7802
- try {
7803
- recordFields[fieldName].value = new Date(draftField).toISOString();
7803
+ // if it is empty string, then convert it to null.
7804
+ if (draftField === '') {
7805
+ recordFields[fieldName].value = null;
7804
7806
  }
7805
- catch (e) {
7806
- throw Error('date field value not valid');
7807
+ else {
7808
+ // attempt to convert it to ISO string value
7809
+ try {
7810
+ recordFields[fieldName].value = new Date(draftField).toISOString();
7811
+ }
7812
+ catch (e) {
7813
+ throw Error('date field value not valid');
7814
+ }
7807
7815
  }
7808
7816
  }
7809
7817
  }
@@ -19180,4 +19188,4 @@ register({
19180
19188
  });
19181
19189
 
19182
19190
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
19183
- // version: 1.309.0-e7611a7fb5
19191
+ // version: 1.310.0-6f61f12f95
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.309.0",
3
+ "version": "1.310.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,27 +32,27 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@salesforce/lds-adapters-uiapi-mobile": "^1.309.0",
36
- "@salesforce/lds-bindings": "^1.309.0",
37
- "@salesforce/lds-instrumentation": "^1.309.0",
38
- "@salesforce/lds-priming": "^1.309.0",
35
+ "@salesforce/lds-adapters-uiapi-mobile": "^1.310.0",
36
+ "@salesforce/lds-bindings": "^1.310.0",
37
+ "@salesforce/lds-instrumentation": "^1.310.0",
38
+ "@salesforce/lds-priming": "^1.310.0",
39
39
  "@salesforce/user": "0.0.21",
40
40
  "o11y": "250.7.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@salesforce/lds-adapters-graphql": "^1.309.0",
44
- "@salesforce/lds-drafts": "^1.309.0",
45
- "@salesforce/lds-drafts-adapters-uiapi": "^1.309.0",
46
- "@salesforce/lds-durable-records": "^1.309.0",
47
- "@salesforce/lds-graphql-eval": "^1.309.0",
48
- "@salesforce/lds-graphql-local-evaluation": "^1.309.0",
49
- "@salesforce/lds-network-adapter": "^1.309.0",
50
- "@salesforce/lds-network-nimbus": "^1.309.0",
51
- "@salesforce/lds-store-binary": "^1.309.0",
52
- "@salesforce/lds-store-nimbus": "^1.309.0",
53
- "@salesforce/lds-store-sql": "^1.309.0",
54
- "@salesforce/lds-utils-adapters": "^1.309.0",
55
- "@salesforce/nimbus-plugin-lds": "^1.309.0",
43
+ "@salesforce/lds-adapters-graphql": "^1.310.0",
44
+ "@salesforce/lds-drafts": "^1.310.0",
45
+ "@salesforce/lds-drafts-adapters-uiapi": "^1.310.0",
46
+ "@salesforce/lds-durable-records": "^1.310.0",
47
+ "@salesforce/lds-graphql-eval": "^1.310.0",
48
+ "@salesforce/lds-graphql-local-evaluation": "^1.310.0",
49
+ "@salesforce/lds-network-adapter": "^1.310.0",
50
+ "@salesforce/lds-network-nimbus": "^1.310.0",
51
+ "@salesforce/lds-store-binary": "^1.310.0",
52
+ "@salesforce/lds-store-nimbus": "^1.310.0",
53
+ "@salesforce/lds-store-sql": "^1.310.0",
54
+ "@salesforce/lds-utils-adapters": "^1.310.0",
55
+ "@salesforce/nimbus-plugin-lds": "^1.310.0",
56
56
  "babel-plugin-dynamic-import-node": "^2.3.3",
57
57
  "wait-for-expect": "^3.0.2"
58
58
  },
package/sfdc/main.js CHANGED
@@ -7796,14 +7796,22 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
7796
7796
  if (fieldInfo !== undefined) {
7797
7797
  const { dataType } = fieldInfo;
7798
7798
  recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
7799
+ // for a DateTime field, we are going to convert the string to an ISOString value.
7799
7800
  if (dataType === 'DateTime' &&
7800
7801
  draftField !== null &&
7801
7802
  typeof draftField === 'string') {
7802
- try {
7803
- recordFields[fieldName].value = new Date(draftField).toISOString();
7803
+ // if it is empty string, then convert it to null.
7804
+ if (draftField === '') {
7805
+ recordFields[fieldName].value = null;
7804
7806
  }
7805
- catch (e) {
7806
- throw Error('date field value not valid');
7807
+ else {
7808
+ // attempt to convert it to ISO string value
7809
+ try {
7810
+ recordFields[fieldName].value = new Date(draftField).toISOString();
7811
+ }
7812
+ catch (e) {
7813
+ throw Error('date field value not valid');
7814
+ }
7807
7815
  }
7808
7816
  }
7809
7817
  }
@@ -19180,4 +19188,4 @@ register({
19180
19188
  });
19181
19189
 
19182
19190
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
19183
- // version: 1.309.0-e7611a7fb5
19191
+ // version: 1.310.0-6f61f12f95