@infrab4a/connect 5.1.1-beta.1 → 5.1.1-beta.3
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 +21 -13
- package/index.esm.js +21 -13
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2921,7 +2921,13 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
|
2921
2921
|
return { columnName: attributeName.toString(), attributeName };
|
|
2922
2922
|
if (Array.isArray(fieldOption))
|
|
2923
2923
|
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2924
|
-
return {
|
|
2924
|
+
return {
|
|
2925
|
+
attributeName,
|
|
2926
|
+
columnName: attributeName.toString(),
|
|
2927
|
+
...fieldOption,
|
|
2928
|
+
to: fieldOption.to || ((value) => value),
|
|
2929
|
+
from: fieldOption.from || ((value) => value),
|
|
2930
|
+
};
|
|
2925
2931
|
};
|
|
2926
2932
|
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2927
2933
|
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
@@ -7219,7 +7225,13 @@ class ProductErrorsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHas
|
|
|
7219
7225
|
}
|
|
7220
7226
|
|
|
7221
7227
|
const commonFields = [
|
|
7222
|
-
{
|
|
7228
|
+
{
|
|
7229
|
+
id: {
|
|
7230
|
+
columnName: 'id',
|
|
7231
|
+
to: (value) => +value,
|
|
7232
|
+
from: (value) => value.toString(),
|
|
7233
|
+
},
|
|
7234
|
+
},
|
|
7223
7235
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
7224
7236
|
{ productId: { columnName: 'main_product_id' } },
|
|
7225
7237
|
{ CEST: { columnName: 'cest' } },
|
|
@@ -7623,16 +7635,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7623
7635
|
return reviews;
|
|
7624
7636
|
}
|
|
7625
7637
|
async findCatalog(params, mainGender, options) {
|
|
7626
|
-
// eslint-disable-next-line no-console
|
|
7627
|
-
console.log('findCatalog', JSON.stringify({
|
|
7628
|
-
...params,
|
|
7629
|
-
filters: { ...params.filters, published: true },
|
|
7630
|
-
orderBy: {
|
|
7631
|
-
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7632
|
-
...lodash.omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7633
|
-
hasStock: 'desc',
|
|
7634
|
-
},
|
|
7635
|
-
}));
|
|
7636
7638
|
const result = await this.find({
|
|
7637
7639
|
...params,
|
|
7638
7640
|
filters: { ...params.filters, published: true },
|
|
@@ -8110,7 +8112,13 @@ class WishlistHasuraGraphQL extends Wishlist {
|
|
|
8110
8112
|
}
|
|
8111
8113
|
|
|
8112
8114
|
const fieldsConfiguration = [
|
|
8113
|
-
{
|
|
8115
|
+
{
|
|
8116
|
+
id: {
|
|
8117
|
+
columnName: 'id',
|
|
8118
|
+
to: (value) => +value,
|
|
8119
|
+
from: (value) => value.toString(),
|
|
8120
|
+
},
|
|
8121
|
+
},
|
|
8114
8122
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
8115
8123
|
'name',
|
|
8116
8124
|
'description',
|
package/index.esm.js
CHANGED
|
@@ -2896,7 +2896,13 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
|
2896
2896
|
return { columnName: attributeName.toString(), attributeName };
|
|
2897
2897
|
if (Array.isArray(fieldOption))
|
|
2898
2898
|
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2899
|
-
return {
|
|
2899
|
+
return {
|
|
2900
|
+
attributeName,
|
|
2901
|
+
columnName: attributeName.toString(),
|
|
2902
|
+
...fieldOption,
|
|
2903
|
+
to: fieldOption.to || ((value) => value),
|
|
2904
|
+
from: fieldOption.from || ((value) => value),
|
|
2905
|
+
};
|
|
2900
2906
|
};
|
|
2901
2907
|
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2902
2908
|
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
@@ -7194,7 +7200,13 @@ class ProductErrorsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHas
|
|
|
7194
7200
|
}
|
|
7195
7201
|
|
|
7196
7202
|
const commonFields = [
|
|
7197
|
-
{
|
|
7203
|
+
{
|
|
7204
|
+
id: {
|
|
7205
|
+
columnName: 'id',
|
|
7206
|
+
to: (value) => +value,
|
|
7207
|
+
from: (value) => value.toString(),
|
|
7208
|
+
},
|
|
7209
|
+
},
|
|
7198
7210
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
7199
7211
|
{ productId: { columnName: 'main_product_id' } },
|
|
7200
7212
|
{ CEST: { columnName: 'cest' } },
|
|
@@ -7598,16 +7610,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7598
7610
|
return reviews;
|
|
7599
7611
|
}
|
|
7600
7612
|
async findCatalog(params, mainGender, options) {
|
|
7601
|
-
// eslint-disable-next-line no-console
|
|
7602
|
-
console.log('findCatalog', JSON.stringify({
|
|
7603
|
-
...params,
|
|
7604
|
-
filters: { ...params.filters, published: true },
|
|
7605
|
-
orderBy: {
|
|
7606
|
-
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7607
|
-
...omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7608
|
-
hasStock: 'desc',
|
|
7609
|
-
},
|
|
7610
|
-
}));
|
|
7611
7613
|
const result = await this.find({
|
|
7612
7614
|
...params,
|
|
7613
7615
|
filters: { ...params.filters, published: true },
|
|
@@ -8085,7 +8087,13 @@ class WishlistHasuraGraphQL extends Wishlist {
|
|
|
8085
8087
|
}
|
|
8086
8088
|
|
|
8087
8089
|
const fieldsConfiguration = [
|
|
8088
|
-
{
|
|
8090
|
+
{
|
|
8091
|
+
id: {
|
|
8092
|
+
columnName: 'id',
|
|
8093
|
+
to: (value) => +value,
|
|
8094
|
+
from: (value) => value.toString(),
|
|
8095
|
+
},
|
|
8096
|
+
},
|
|
8089
8097
|
{ firestoreId: { columnName: 'firestore_id' } },
|
|
8090
8098
|
'name',
|
|
8091
8099
|
'description',
|