@infrab4a/connect 5.1.1-beta.6 → 5.1.1-beta.8

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/index.cjs.js CHANGED
@@ -2925,8 +2925,8 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
2925
2925
  attributeName,
2926
2926
  columnName: attributeName.toString(),
2927
2927
  ...fieldOption,
2928
- to: fieldOption.to || ((value) => value),
2929
- from: fieldOption.from || ((value) => value),
2928
+ // to: fieldOption.to || ((value) => value),
2929
+ // from: fieldOption.from || ((value) => value),
2930
2930
  };
2931
2931
  };
2932
2932
  AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
@@ -3475,8 +3475,12 @@ class HasuraDeleteVariablesHelper {
3475
3475
  if (lodash.isNil(instance.identifier[identifierBinded]))
3476
3476
  return ids;
3477
3477
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3478
- const value = columnOption?.to(identifiers[identifier], instance) ||
3479
- identifiers[identifier];
3478
+ // const value =
3479
+ // columnOption?.to(identifiers[identifier as keyof DeleteRepositoryParams<MBase>], instance) ||
3480
+ // identifiers[identifier as keyof DeleteRepositoryParams<MBase>]
3481
+ const value = 'to' in columnOption
3482
+ ? columnOption?.to?.(identifiers[identifier], instance)
3483
+ : identifiers[identifier];
3480
3484
  return {
3481
3485
  ...ids,
3482
3486
  [columnOption.columnName]: {
@@ -3919,8 +3923,14 @@ class HasuraGetVariablesHelper {
3919
3923
  return ids;
3920
3924
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3921
3925
  console.warn('columnOption', columnOption);
3922
- const value = columnOption?.to?.(identifiers[identifier], instance) ||
3923
- identifiers[identifier];
3926
+ console.warn('columnOption 1', identifiers[identifier]);
3927
+ console.warn('columnOption 2', identifiers[identifier]);
3928
+ // const value =
3929
+ // columnOption?.to?.(identifiers[identifier as keyof typeof identifiers], instance) ||
3930
+ // identifiers[identifier as keyof typeof identifiers]
3931
+ const value = 'to' in columnOption
3932
+ ? columnOption?.to?.(identifiers[identifier], instance)
3933
+ : identifiers[identifier];
3924
3934
  console.warn('columnOption value', value);
3925
3935
  console.warn('columnOption ...ids', ids);
3926
3936
  console.warn('columnOption return', {
package/index.esm.js CHANGED
@@ -2900,8 +2900,8 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
2900
2900
  attributeName,
2901
2901
  columnName: attributeName.toString(),
2902
2902
  ...fieldOption,
2903
- to: fieldOption.to || ((value) => value),
2904
- from: fieldOption.from || ((value) => value),
2903
+ // to: fieldOption.to || ((value) => value),
2904
+ // from: fieldOption.from || ((value) => value),
2905
2905
  };
2906
2906
  };
2907
2907
  AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
@@ -3450,8 +3450,12 @@ class HasuraDeleteVariablesHelper {
3450
3450
  if (isNil(instance.identifier[identifierBinded]))
3451
3451
  return ids;
3452
3452
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3453
- const value = columnOption?.to(identifiers[identifier], instance) ||
3454
- identifiers[identifier];
3453
+ // const value =
3454
+ // columnOption?.to(identifiers[identifier as keyof DeleteRepositoryParams<MBase>], instance) ||
3455
+ // identifiers[identifier as keyof DeleteRepositoryParams<MBase>]
3456
+ const value = 'to' in columnOption
3457
+ ? columnOption?.to?.(identifiers[identifier], instance)
3458
+ : identifiers[identifier];
3455
3459
  return {
3456
3460
  ...ids,
3457
3461
  [columnOption.columnName]: {
@@ -3894,8 +3898,14 @@ class HasuraGetVariablesHelper {
3894
3898
  return ids;
3895
3899
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3896
3900
  console.warn('columnOption', columnOption);
3897
- const value = columnOption?.to?.(identifiers[identifier], instance) ||
3898
- identifiers[identifier];
3901
+ console.warn('columnOption 1', identifiers[identifier]);
3902
+ console.warn('columnOption 2', identifiers[identifier]);
3903
+ // const value =
3904
+ // columnOption?.to?.(identifiers[identifier as keyof typeof identifiers], instance) ||
3905
+ // identifiers[identifier as keyof typeof identifiers]
3906
+ const value = 'to' in columnOption
3907
+ ? columnOption?.to?.(identifiers[identifier], instance)
3908
+ : identifiers[identifier];
3899
3909
  console.warn('columnOption value', value);
3900
3910
  console.warn('columnOption ...ids', ids);
3901
3911
  console.warn('columnOption return', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.1.1-beta.6",
3
+ "version": "5.1.1-beta.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },