@salesforce/lwc-adapters-uiapi 1.321.0 → 1.322.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 (2) hide show
  1. package/dist/main.js +43 -23
  2. package/package.json +3 -3
package/dist/main.js CHANGED
@@ -19400,7 +19400,7 @@ function validate$1E(obj, path = 'RecordLayoutSectionUserStateRepresentation') {
19400
19400
  }
19401
19401
 
19402
19402
  const TTL$B = 900000;
19403
- const VERSION$2u = "4ba42e1fa0fb00cf78fce86082da41c9";
19403
+ const VERSION$2u = "12123f1aca1b5a48303b1d099f9f5629";
19404
19404
  function validate$1D(obj, path = 'RecordLayoutUserStateRepresentation') {
19405
19405
  const v_error = (() => {
19406
19406
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -19413,8 +19413,29 @@ function validate$1D(obj, path = 'RecordLayoutUserStateRepresentation') {
19413
19413
  }
19414
19414
  const obj_id = obj.id;
19415
19415
  const path_id = path + '.id';
19416
- if (typeof obj_id !== 'string') {
19417
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
19416
+ let obj_id_union0 = null;
19417
+ const obj_id_union0_error = (() => {
19418
+ if (typeof obj_id !== 'string') {
19419
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
19420
+ }
19421
+ })();
19422
+ if (obj_id_union0_error != null) {
19423
+ obj_id_union0 = obj_id_union0_error.message;
19424
+ }
19425
+ let obj_id_union1 = null;
19426
+ const obj_id_union1_error = (() => {
19427
+ if (obj_id !== null) {
19428
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
19429
+ }
19430
+ })();
19431
+ if (obj_id_union1_error != null) {
19432
+ obj_id_union1 = obj_id_union1_error.message;
19433
+ }
19434
+ if (obj_id_union0 && obj_id_union1) {
19435
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
19436
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
19437
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
19438
+ return new TypeError(message);
19418
19439
  }
19419
19440
  const obj_layoutType = obj.layoutType;
19420
19441
  const path_layoutType = path + '.layoutType';
@@ -27733,11 +27754,11 @@ function validateAdapterConfig$Q(untrustedConfig, _configPropertyNames) {
27733
27754
  if (config === null) {
27734
27755
  return null;
27735
27756
  }
27736
- // recordTypeId coercion is nuts: if `null` (but not undefined) then use MASTER record type id
27737
27757
  let recordTypeId = config.recordTypeId;
27738
27758
  if (recordTypeId === undefined) {
27739
27759
  // must check untrusted bc config has been coerced
27740
- if (untrustedConfig.recordTypeId !== null) {
27760
+ if (untrustedConfig.recordTypeId !== null &&
27761
+ untrustedConfig.recordTypeId !== undefined) {
27741
27762
  return null;
27742
27763
  }
27743
27764
  recordTypeId = MAIN_RECORD_TYPE_ID;
@@ -58401,6 +58422,23 @@ function getInContextFragmentType$d(fragment, fragmentMap) {
58401
58422
  return sharedGetFragmentType(fragment, fragmentMap);
58402
58423
  }
58403
58424
 
58425
+ function getFieldType$b(field) {
58426
+ switch (field.name.value) {
58427
+ case '__typename': {
58428
+ return {
58429
+ isArray: false,
58430
+ typename: 'String',
58431
+ };
58432
+ }
58433
+ default: {
58434
+ return {
58435
+ isArray: false,
58436
+ typename: 'Setup__SetupAggregateConnection',
58437
+ };
58438
+ }
58439
+ }
58440
+ }
58441
+
58404
58442
  const name$2 = 'Setup__SetupQueryAggregate';
58405
58443
  const VERSION$e = '0592284764c8e58016880e291b9ffb64';
58406
58444
  function keyBuilder$g(luvio, path, data) {
@@ -58518,24 +58556,6 @@ function getTypeCacheKeys$b(cacheKeySink, astNode, state) {
58518
58556
  }
58519
58557
  // Deal with mapped types' cache keys
58520
58558
  }
58521
- function getFieldType$b(field) {
58522
- switch (field.name.value) {
58523
- case '__typename': {
58524
- return {
58525
- isArray: false,
58526
- typename: 'String'
58527
- };
58528
- }
58529
- case 'recordQueryAggregate': {
58530
- return {
58531
- isArray: false,
58532
- typename: 'Setup__SetupAggregateConnection'
58533
- };
58534
- }
58535
- default:
58536
- return undefined;
58537
- }
58538
- }
58539
58559
  function ingestFieldByType$2(typename, parentKey, requestedField, sink, fieldKey, fieldData, state) {
58540
58560
  // TODO: add validation logic to only allow nullable fields to be null in the future
58541
58561
  if (fieldData === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lwc-adapters-uiapi",
3
- "version": "1.321.0",
3
+ "version": "1.322.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.321.0"
34
+ "@salesforce/lds-adapters-uiapi": "^1.322.0"
35
35
  },
36
36
  "dependencies": {
37
37
  "@luvio/lwc-luvio": "0.156.5",
38
- "@salesforce/lds-default-luvio": "^1.321.0"
38
+ "@salesforce/lds-default-luvio": "^1.322.0"
39
39
  }
40
40
  }