@infrab4a/connect 5.1.1-beta.2 → 5.1.1-beta.4
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 +16 -15
- package/index.esm.js +16 -15
- package/package.json +1 -1
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: (value) => value,
|
|
2929
|
-
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,7 +3475,6 @@ class HasuraDeleteVariablesHelper {
|
|
|
3475
3475
|
if (lodash.isNil(instance.identifier[identifierBinded]))
|
|
3476
3476
|
return ids;
|
|
3477
3477
|
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
|
|
3478
|
-
console.warn('columnOption', columnOption);
|
|
3479
3478
|
const value = columnOption?.to(identifiers[identifier], instance) ||
|
|
3480
3479
|
identifiers[identifier];
|
|
3481
3480
|
return {
|
|
@@ -7226,7 +7225,13 @@ class ProductErrorsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHas
|
|
|
7226
7225
|
}
|
|
7227
7226
|
|
|
7228
7227
|
const commonFields = [
|
|
7229
|
-
{
|
|
7228
|
+
{
|
|
7229
|
+
id: {
|
|
7230
|
+
columnName: 'id',
|
|
7231
|
+
to: (value) => +value,
|
|
7232
|
+
from: (value) => value.toString(),
|
|
7233
|
+
},
|
|
7234
|
+
},
|
|
7230
7235
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
7231
7236
|
{ productId: { columnName: 'main_product_id' } },
|
|
7232
7237
|
{ CEST: { columnName: 'cest' } },
|
|
@@ -7630,16 +7635,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7630
7635
|
return reviews;
|
|
7631
7636
|
}
|
|
7632
7637
|
async findCatalog(params, mainGender, options) {
|
|
7633
|
-
// eslint-disable-next-line no-console
|
|
7634
|
-
console.log('findCatalog', JSON.stringify({
|
|
7635
|
-
...params,
|
|
7636
|
-
filters: { ...params.filters, published: true },
|
|
7637
|
-
orderBy: {
|
|
7638
|
-
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7639
|
-
...lodash.omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7640
|
-
hasStock: 'desc',
|
|
7641
|
-
},
|
|
7642
|
-
}));
|
|
7643
7638
|
const result = await this.find({
|
|
7644
7639
|
...params,
|
|
7645
7640
|
filters: { ...params.filters, published: true },
|
|
@@ -8117,7 +8112,13 @@ class WishlistHasuraGraphQL extends Wishlist {
|
|
|
8117
8112
|
}
|
|
8118
8113
|
|
|
8119
8114
|
const fieldsConfiguration = [
|
|
8120
|
-
{
|
|
8115
|
+
{
|
|
8116
|
+
id: {
|
|
8117
|
+
columnName: 'id',
|
|
8118
|
+
to: (value) => +value,
|
|
8119
|
+
from: (value) => value.toString(),
|
|
8120
|
+
},
|
|
8121
|
+
},
|
|
8121
8122
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
8122
8123
|
'name',
|
|
8123
8124
|
'description',
|
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: (value) => value,
|
|
2904
|
-
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,7 +3450,6 @@ class HasuraDeleteVariablesHelper {
|
|
|
3450
3450
|
if (isNil(instance.identifier[identifierBinded]))
|
|
3451
3451
|
return ids;
|
|
3452
3452
|
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
|
|
3453
|
-
console.warn('columnOption', columnOption);
|
|
3454
3453
|
const value = columnOption?.to(identifiers[identifier], instance) ||
|
|
3455
3454
|
identifiers[identifier];
|
|
3456
3455
|
return {
|
|
@@ -7201,7 +7200,13 @@ class ProductErrorsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHas
|
|
|
7201
7200
|
}
|
|
7202
7201
|
|
|
7203
7202
|
const commonFields = [
|
|
7204
|
-
{
|
|
7203
|
+
{
|
|
7204
|
+
id: {
|
|
7205
|
+
columnName: 'id',
|
|
7206
|
+
to: (value) => +value,
|
|
7207
|
+
from: (value) => value.toString(),
|
|
7208
|
+
},
|
|
7209
|
+
},
|
|
7205
7210
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
7206
7211
|
{ productId: { columnName: 'main_product_id' } },
|
|
7207
7212
|
{ CEST: { columnName: 'cest' } },
|
|
@@ -7605,16 +7610,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7605
7610
|
return reviews;
|
|
7606
7611
|
}
|
|
7607
7612
|
async findCatalog(params, mainGender, options) {
|
|
7608
|
-
// eslint-disable-next-line no-console
|
|
7609
|
-
console.log('findCatalog', JSON.stringify({
|
|
7610
|
-
...params,
|
|
7611
|
-
filters: { ...params.filters, published: true },
|
|
7612
|
-
orderBy: {
|
|
7613
|
-
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7614
|
-
...omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7615
|
-
hasStock: 'desc',
|
|
7616
|
-
},
|
|
7617
|
-
}));
|
|
7618
7613
|
const result = await this.find({
|
|
7619
7614
|
...params,
|
|
7620
7615
|
filters: { ...params.filters, published: true },
|
|
@@ -8092,7 +8087,13 @@ class WishlistHasuraGraphQL extends Wishlist {
|
|
|
8092
8087
|
}
|
|
8093
8088
|
|
|
8094
8089
|
const fieldsConfiguration = [
|
|
8095
|
-
{
|
|
8090
|
+
{
|
|
8091
|
+
id: {
|
|
8092
|
+
columnName: 'id',
|
|
8093
|
+
to: (value) => +value,
|
|
8094
|
+
from: (value) => value.toString(),
|
|
8095
|
+
},
|
|
8096
|
+
},
|
|
8096
8097
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
8097
8098
|
'name',
|
|
8098
8099
|
'description',
|