@izara_project/izara-shared-search-and-sort 1.0.3 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-shared-search-and-sort",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Shared Libraries frontend/backend for Search and Sort stack",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,7 +28,6 @@ const { isEmpty } = lodash;
28
28
  import filtersSharedLib from './FiltersSharedLib.js'; //const filtersSharedLib = require('./FiltersSharedLib');
29
29
 
30
30
  async function createRequiredData(
31
- _izContext,
32
31
  objType,
33
32
  requiredDataFields,
34
33
  complexFilterCombinations,
@@ -37,7 +36,7 @@ async function createRequiredData(
37
36
  requiredDataLinkSteps,
38
37
  values,
39
38
  ) {
40
- _izContext.logger.debug('createRequiredData: ', {
39
+ console.log('createRequiredData: ', {
41
40
  objType,
42
41
  requiredDataFields,
43
42
  complexFilterCombinations,
@@ -57,18 +56,17 @@ async function createRequiredData(
57
56
  let setComplexFilterCombinations = {};
58
57
  let setFilterElementsLink = {}
59
58
 
60
- _izContext.logger.debug('--------------- start requiredData fields ---------------')
59
+ console.log('--------------- start requiredData fields ---------------')
61
60
  for (const requiredDataFieldId of requiredDataFields) {
62
- _izContext.logger.debug('extract requiredDataFields: ', requiredDataFieldId);
61
+ console.log('extract requiredDataFields: ', requiredDataFieldId);
63
62
 
64
63
  let requiredDataLinkObject = requiredDataLinkStepObjects[requiredDataFieldId];
65
- _izContext.logger.debug('requiredDataLinkObject: ', requiredDataLinkObject);
64
+ console.log('requiredDataLinkObject: ', requiredDataLinkObject);
66
65
 
67
66
  let linkSteps = requiredDataLinkObject.linkSteps;
68
- _izContext.logger.debug('initial data: ', { linkSteps });
67
+ console.log('initial data: ', { linkSteps });
69
68
 
70
69
  let [fieldName, returnValue, linkPathErrorObject, linkPathErrorsFound] = await createLinkPath(
71
- _izContext,
72
70
  linkSteps,
73
71
  requiredDataLinkStepObjects,
74
72
  requiredDataLinkSteps,
@@ -78,7 +76,7 @@ async function createRequiredData(
78
76
  errorsObject,
79
77
  errorsFound
80
78
  );
81
- _izContext.logger.debug('return createLinkPath: ', {
79
+ console.log('return createLinkPath: ', {
82
80
  fieldName,
83
81
  returnValue,
84
82
  linkPathErrorObject,
@@ -120,10 +118,10 @@ async function createRequiredData(
120
118
  initialObjType: objType,
121
119
  linkSteps: returnValue.linkSteps
122
120
  };
123
- _izContext.logger.debug('pathObject: ', pathObject);
121
+ console.log('pathObject: ', pathObject);
124
122
 
125
123
  let pathId = hash(pathObject);
126
- _izContext.logger.debug('pathId: ', pathId);
124
+ console.log('pathId: ', pathId);
127
125
 
128
126
  let setObject = {
129
127
  fieldName: fieldName,
@@ -159,10 +157,10 @@ async function createRequiredData(
159
157
  requiredFieldNameObject.filterElements = returnValue.filterElements;
160
158
  Object.assign(setFilterElementsLink, returnValue.filterElements);
161
159
  };
162
- _izContext.logger.debug('requiredFieldNameObject: ', requiredFieldNameObject);
160
+ console.log('requiredFieldNameObject: ', requiredFieldNameObject);
163
161
 
164
162
  let requiredDataFieldNameId = hash(requiredFieldNameObject);
165
- _izContext.logger.debug('requiredDataFieldNameId: ', requiredDataFieldNameId);
163
+ console.log('requiredDataFieldNameId: ', requiredDataFieldNameId);
166
164
 
167
165
  if (isEmpty(requiredDataObject)) {
168
166
  requiredDataObject = {
@@ -174,15 +172,15 @@ async function createRequiredData(
174
172
  };
175
173
 
176
174
  } else {
177
- _izContext.logger.debug("------- requiredData has only fieldName ---------");
175
+ console.log("------- requiredData has only fieldName ---------");
178
176
 
179
177
  let requiredFieldNameObject = {
180
178
  fieldName: fieldName
181
179
  };
182
- _izContext.logger.debug("requiredFieldNameObject: ", requiredFieldNameObject);
180
+ console.log("requiredFieldNameObject: ", requiredFieldNameObject);
183
181
 
184
182
  let requiredDataFieldNameId = hash(requiredFieldNameObject);
185
- _izContext.logger.debug("requiredDataFieldNameId: ", requiredDataFieldNameId);
183
+ console.log("requiredDataFieldNameId: ", requiredDataFieldNameId);
186
184
 
187
185
  if (isEmpty(requiredDataObject)) {
188
186
 
@@ -194,7 +192,7 @@ async function createRequiredData(
194
192
  requiredDataObject[requiredDataFieldNameId] = requiredFieldNameObject;
195
193
  };
196
194
  }
197
- _izContext.logger.debug("before return linkPath: ", { requiredDataObject, linkPathObjects, linkPathSteps });
195
+ console.log("before return linkPath: ", { requiredDataObject, linkPathObjects, linkPathSteps });
198
196
  }
199
197
 
200
198
  let requiredObject = {};
@@ -220,11 +218,11 @@ async function createRequiredData(
220
218
  if (!isEmpty(setFilterElementsLink)) {
221
219
  requiredObject.filterElements = setFilterElementsLink;
222
220
  };
223
- _izContext.logger.debug('requiredObject: ', requiredObject);
221
+ console.log('requiredObject: ', requiredObject);
224
222
 
225
223
  if (!isEmpty(requiredObject)) {
226
224
  requiredDataHash = hash(requiredObject);
227
- _izContext.logger.debug('requiredDataHash: ', requiredDataHash);
225
+ console.log('requiredDataHash: ', requiredDataHash);
228
226
  }
229
227
 
230
228
  let status = 'valid"';
@@ -232,7 +230,7 @@ async function createRequiredData(
232
230
  status = 'invalid';
233
231
  };
234
232
 
235
- _izContext.logger.debug('return : ', {
233
+ console.log('return : ', {
236
234
  requiredDataHash: requiredDataHash,
237
235
  requiredDataObjects: requiredDataObject,
238
236
  linkPathObjects: linkPathObjects,
@@ -262,7 +260,6 @@ async function createRequiredData(
262
260
 
263
261
 
264
262
  async function createLinkPath(
265
- _izContext,
266
263
  linkSteps,
267
264
  requiredDataLinkStepObjects,
268
265
  requiredDataLinkSteps,
@@ -275,7 +272,7 @@ async function createLinkPath(
275
272
  previousLinkId = null,
276
273
  previousLink = null
277
274
  ) {
278
- _izContext.logger.debug('create LinkPath: ', {
275
+ console.log('create LinkPath: ', {
279
276
  linkSteps,
280
277
  requiredDataLinkStepObjects,
281
278
  requiredDataLinkSteps,
@@ -303,24 +300,23 @@ async function createLinkPath(
303
300
  // let childLinkErrors = []
304
301
 
305
302
  let linkStepId = linkSteps[index];
306
- _izContext.logger.debug('linkStepId: ', linkStepId);
303
+ console.log('linkStepId: ', linkStepId);
307
304
 
308
305
  let linkStep = requiredDataLinkSteps[linkStepId];
309
- _izContext.logger.debug('linkStep: ', linkStep);
306
+ console.log('linkStep: ', linkStep);
310
307
 
311
308
  if (index + 1 === linkSteps.length) {
312
309
  // last link that has only fieldName
313
- _izContext.logger.debug('---------- is final link ----------', { index, linkStep });
310
+ console.log('---------- is final link ----------', { index, linkStep });
314
311
 
315
312
  return [linkStep.fieldName, returnValue, errorsObject, errorsFound]
316
313
 
317
314
  } else {
318
315
  // has nextLink
319
- _izContext.logger.debug('---------- is next link ----------', { index, linkStep });
316
+ console.log('---------- is next link ----------', { index, linkStep });
320
317
 
321
318
  let conditionsPromise = checkConditionsLink(
322
319
  // let [conditions, conditionErrObject, conditionErrFound] = await this.checkConditionsLink(
323
- _izContext,
324
320
  linkStep.pathLinkType.objType,
325
321
  linkStep,
326
322
  perParentCombinations,
@@ -334,7 +330,6 @@ async function createLinkPath(
334
330
  );
335
331
 
336
332
  [fieldName, returnValue, errorsObject, errorsFound] = await createLinkPath(
337
- _izContext,
338
333
  linkSteps,
339
334
  requiredDataLinkStepObjects,
340
335
  requiredDataLinkSteps,
@@ -345,7 +340,7 @@ async function createLinkPath(
345
340
  errorsFound,
346
341
  index + 1
347
342
  )
348
- _izContext.logger.debug('createLinkPath in link', {
343
+ console.log('createLinkPath in link', {
349
344
  fieldName,
350
345
  returnValue,
351
346
  errorsObject,
@@ -353,7 +348,7 @@ async function createLinkPath(
353
348
  index
354
349
  });
355
350
 
356
- _izContext.logger.debug('linkStep', linkStep);
351
+ console.log('linkStep', linkStep);
357
352
 
358
353
  let [conditions, conditionErrObject, conditionErrFound] = await conditionsPromise;
359
354
 
@@ -363,7 +358,7 @@ async function createLinkPath(
363
358
  };
364
359
 
365
360
  if (!isEmpty(returnValue)) {
366
- _izContext.logger.debug('----------------- has returnValue ---------------------', { index, fieldName, returnValue, conditions })
361
+ console.log('----------------- has returnValue ---------------------', { index, fieldName, returnValue, conditions })
367
362
 
368
363
  let linkStepObject = {
369
364
  pathLinkType: linkStep.pathLinkType
@@ -422,7 +417,7 @@ async function createLinkPath(
422
417
  };
423
418
  }
424
419
 
425
- _izContext.logger.debug('returnValue', returnValue);
420
+ console.log('returnValue', returnValue);
426
421
 
427
422
  } else {
428
423
  //* error
@@ -457,16 +452,16 @@ async function createLinkPath(
457
452
  };
458
453
  };
459
454
 
460
- _izContext.logger.debug('linkStepObject', linkStepObject);
455
+ console.log('linkStepObject', linkStepObject);
461
456
  let linkStepId = hash(linkStepObject);
462
- _izContext.logger.debug('linkStepId', linkStepId);
457
+ console.log('linkStepId', linkStepId);
463
458
 
464
459
  returnValue['linkSteps'].unshift(linkStepId);
465
460
  returnValue['linkStepObjects'] = Object.assign({ [linkStepId]: linkStepObject }, returnValue['linkStepObjects']);
466
- _izContext.logger.debug('returnValue', returnValue);
461
+ console.log('returnValue', returnValue);
467
462
 
468
463
  } else {
469
- _izContext.logger.debug('----------------- no returnValue ---------------------', { index, fieldName, conditions })
464
+ console.log('----------------- no returnValue ---------------------', { index, fieldName, conditions })
470
465
  //returnValue: { linkSteps, linkStepsObjects, perParent, combinations, sortFieldLinkStepObjects }
471
466
  //sortFieldLinkStepObjects from in sortField in link
472
467
 
@@ -557,15 +552,15 @@ async function createLinkPath(
557
552
  };
558
553
  };
559
554
 
560
- _izContext.logger.debug('linkStepObject', linkStepObject);
555
+ console.log('linkStepObject', linkStepObject);
561
556
  let linkStepId = hash(linkStepObject);
562
- _izContext.logger.debug('linkStepId', linkStepId);
557
+ console.log('linkStepId', linkStepId);
563
558
 
564
559
  returnValue.linkSteps = [linkStepId];
565
560
  returnValue.linkStepObjects = {
566
561
  [linkStepId]: linkStepObject
567
562
  };
568
- _izContext.logger.debug('returnValue', returnValue);
563
+ console.log('returnValue', returnValue);
569
564
  }
570
565
  }
571
566
  return [fieldName, returnValue, errorsObject, errorsFound]
@@ -573,7 +568,6 @@ async function createLinkPath(
573
568
 
574
569
 
575
570
  async function checkConditionsLink(
576
- _izContext,
577
571
  objType,
578
572
  linkStepObject,
579
573
  perParentCombinations,
@@ -585,7 +579,7 @@ async function checkConditionsLink(
585
579
  errorsObject,
586
580
  errorsFound
587
581
  ) {
588
- _izContext.logger.debug('checkConditionsLink:', {
582
+ console.log('checkConditionsLink:', {
589
583
  objType,
590
584
  linkStepObject,
591
585
  perParentCombinations,
@@ -602,16 +596,15 @@ async function checkConditionsLink(
602
596
  let conditionLinkObject = {}
603
597
 
604
598
  if (linkStepObject.hasOwnProperty('filterElements')) {
605
- _izContext.logger.debug('------------ has filterElements ------------');
599
+ console.log('------------ has filterElements ------------');
606
600
 
607
- let [complexFilterRequest, status, filterErrorsObject, filterErrorsFound] = filtersSharedLib.createComplexFilter(
608
- _izContext,
601
+ let [complexFilterRequest, status, filterErrorsObject, filterErrorsFound] = filtersSharedLib.createFiltersRequest(
609
602
  linkStepObject.filterElements.objType,
610
603
  linkStepObject.filterElements.initialLogicalElementId,
611
604
  linkStepObject.filterElements.logicalElements,
612
605
  values
613
606
  );
614
- _izContext.logger.debug('return complexFilter for filterElements: ', {
607
+ console.log('return complexFilter for filterElements: ', {
615
608
  complexFilterRequest,
616
609
  status,
617
610
  filterErrorsObject,
@@ -623,11 +616,11 @@ async function checkConditionsLink(
623
616
  errorsFound = errorsFound.concat(filterErrorsFound)
624
617
  };
625
618
  conditionLinkObject.filterElements = complexFilterRequest.filterElements;
626
- _izContext.logger.debug('conditionLinkObject in condition link: ', conditionLinkObject);
619
+ console.log('conditionLinkObject in condition link: ', conditionLinkObject);
627
620
  }
628
621
 
629
622
  if (linkStepObject.hasOwnProperty('aggregate')) {
630
- _izContext.logger.debug('------------ has aggregate ------------');
623
+ console.log('------------ has aggregate ------------');
631
624
  if (!linkStepObject.hasOwnProperty('sortFields')) {
632
625
  errorsFound.push('if has aggregate need to has sortFields, too');
633
626
  };
@@ -649,19 +642,18 @@ async function checkConditionsLink(
649
642
  let setPerParentCombinations = {};
650
643
  let setFilterElements = {};
651
644
 
652
- _izContext.logger.debug('linkStepObject.sortFields', linkStepObject.sortFields);
645
+ console.log('linkStepObject.sortFields', linkStepObject.sortFields);
653
646
 
654
647
  for (const sortField of linkStepObject.sortFields) {
655
- _izContext.logger.debug('sortField: ', sortField);
656
- _izContext.logger.debug('requiredDataLinkSteps: ', requiredDataLinkSteps);
648
+ console.log('sortField: ', sortField);
649
+ console.log('requiredDataLinkSteps: ', requiredDataLinkSteps);
657
650
  let requiredDataLinkStepSortField = requiredDataLinkStepObjects[sortField.requiredDataLinkStepObjectId];
658
- _izContext.logger.debug('requiredDataLinkStepSortField: ', requiredDataLinkStepSortField);
651
+ console.log('requiredDataLinkStepSortField: ', requiredDataLinkStepSortField);
659
652
 
660
- _izContext.logger.debug(' requiredDataLinkStepSortField.linkSteps: ', requiredDataLinkStepSortField.linkSteps);
653
+ console.log(' requiredDataLinkStepSortField.linkSteps: ', requiredDataLinkStepSortField.linkSteps);
661
654
 
662
655
  //* make all linkPath in here and send out to combine allLinkPath
663
656
  let [fieldName, childLinkStep, linkErrorsObject, linkErrorsFound] = await createLinkPath(
664
- _izContext,
665
657
  requiredDataLinkStepSortField.linkSteps,
666
658
  requiredDataLinkStepObjects,
667
659
  requiredDataLinkSteps,
@@ -671,7 +663,7 @@ async function checkConditionsLink(
671
663
  errorsObject,
672
664
  errorsFound
673
665
  );
674
- _izContext.logger.debug(' cratelinkPath in checkCondition for sortField: ', {
666
+ console.log(' cratelinkPath in checkCondition for sortField: ', {
675
667
  fieldName,
676
668
  childLinkStep,
677
669
  linkErrorsObject,
@@ -685,12 +677,12 @@ async function checkConditionsLink(
685
677
  initialObjType: objType,
686
678
  linkSteps: childLinkStep.linkSteps
687
679
  };
688
- _izContext.logger.debug('pathObject: ', pathObject);
680
+ console.log('pathObject: ', pathObject);
689
681
 
690
682
  let pathId = hash(pathObject);
691
- _izContext.logger.debug('pathId: ', pathId);
683
+ console.log('pathId: ', pathId);
692
684
 
693
- _izContext.logger.debug('linkPathObjects xxxxxx: ', linkPathObjects);
685
+ console.log('linkPathObjects xxxxxx: ', linkPathObjects);
694
686
 
695
687
  Object.assign(linkPathObjects, { [pathId]: pathObject });
696
688
 
@@ -736,7 +728,7 @@ async function checkConditionsLink(
736
728
  fieldName: fieldName,
737
729
  dataType: sortField.dataType
738
730
  });
739
- _izContext.logger.debug('sortFieldObjects: ', sortFieldObjects);
731
+ console.log('sortFieldObjects: ', sortFieldObjects);
740
732
 
741
733
  };
742
734
 
@@ -759,7 +751,7 @@ async function checkConditionsLink(
759
751
  };
760
752
  };
761
753
 
762
- _izContext.logger.debug('conditionLinkObject: ', conditionLinkObject);
754
+ console.log('conditionLinkObject: ', conditionLinkObject);
763
755
 
764
756
  } else {
765
757
  if (linkStepObject.hasOwnProperty('combine')) {
@@ -768,7 +760,7 @@ async function checkConditionsLink(
768
760
  };
769
761
 
770
762
  if (linkStepObject.hasOwnProperty('requestProperties')) {
771
- _izContext.logger.debug('------------ link has requestProperties ------------');
763
+ console.log('------------ link has requestProperties ------------');
772
764
 
773
765
  let perParentCombinationIds = [];
774
766
  let perParentCombinationObjects = {}
@@ -776,27 +768,26 @@ async function checkConditionsLink(
776
768
  let applyCombinations = [];
777
769
 
778
770
  for (const [tag, requestPropertyId] of Object.entries(linkStepObject.requestProperties)) {
779
- _izContext.logger.debug('extract requestProperties', { tag, requestPropertyId });
771
+ console.log('extract requestProperties', { tag, requestPropertyId });
780
772
  let requestPropertyObject = values[requestPropertyId];
781
- _izContext.logger.debug('extract requestProperties', requestPropertyObject);
773
+ console.log('extract requestProperties', requestPropertyObject);
782
774
 
783
775
 
784
776
  if (requestPropertyObject.hasOwnProperty('valueSource')) {
785
777
 
786
778
  if (requestPropertyObject.valueSource === 'perParentCombination') {
787
- _izContext.logger.debug('------------- perParentCombinations -------------');
779
+ console.log('------------- perParentCombinations -------------');
788
780
 
789
781
  let perParentCombinationObject = perParentCombinations[requestPropertyObject.perParentCombinationId];
790
- _izContext.logger.debug('perParentCombinationObject', perParentCombinationObject);
782
+ console.log('perParentCombinationObject', perParentCombinationObject);
791
783
 
792
- let [complexFilterRequest, status, perParentErrorsObject, perParentErrorsFound] = filtersSharedLib.createComplexFilter(
793
- _izContext,
784
+ let [complexFilterRequest, status, perParentErrorsObject, perParentErrorsFound] = filtersSharedLib.createFiltersRequest(
794
785
  perParentCombinationObject.objType,
795
786
  perParentCombinationObject.initialLogicalElementId,
796
787
  perParentCombinationObject.logicalElements,
797
788
  values,
798
789
  );
799
- _izContext.logger.debug('return complexFilter for perParentCombinations: ', {
790
+ console.log('return complexFilter for perParentCombinations: ', {
800
791
  complexFilterRequest,
801
792
  status,
802
793
  perParentErrorsObject,
@@ -820,25 +811,24 @@ async function checkConditionsLink(
820
811
  filterElements: complexFilterRequest.filterElements
821
812
  }
822
813
  });
823
- _izContext.logger.debug('set perParentCombinations: ', { perParentCombinationIds, perParentCombinationObjects });
814
+ console.log('set perParentCombinations: ', { perParentCombinationIds, perParentCombinationObjects });
824
815
 
825
816
  } else if (requestPropertyObject.valueSource === 'complexFilterCombination') {
826
- _izContext.logger.debug('------------- complexFilterCombination will set applyCombinations -------------', complexFilterCombinations);
817
+ console.log('------------- complexFilterCombination will set applyCombinations -------------', complexFilterCombinations);
827
818
 
828
819
  let complexFilterCombinationId = requestPropertyObject.complexFilterCombinationId;
829
- _izContext.logger.debug('complexFilterCombinationId: ', complexFilterCombinationId);
820
+ console.log('complexFilterCombinationId: ', complexFilterCombinationId);
830
821
 
831
822
  let complexFilterCombinationObject = complexFilterCombinations[complexFilterCombinationId];
832
- _izContext.logger.debug('complexFilterCombinationObject: ', complexFilterCombinationObject);
823
+ console.log('complexFilterCombinationObject: ', complexFilterCombinationObject);
833
824
 
834
- let [complexFilterRequest, status, complexFilterErrorsObject, complexFilterErrorsFound] = filtersSharedLib.createComplexFilter(
835
- _izContext,
825
+ let [complexFilterRequest, status, complexFilterErrorsObject, complexFilterErrorsFound] = filtersSharedLib.createFiltersRequest(
836
826
  complexFilterCombinationObject.objType,
837
827
  complexFilterCombinationObject.initialLogicalElementId,
838
828
  complexFilterCombinationObject.logicalElements,
839
829
  values
840
830
  );
841
- _izContext.logger.debug('return complexFilter for complexFilterCombinations: ', {
831
+ console.log('return complexFilter for complexFilterCombinations: ', {
842
832
  complexFilterRequest,
843
833
  status,
844
834
  complexFilterErrorsObject,
@@ -858,7 +848,7 @@ async function checkConditionsLink(
858
848
  filterMainId: complexFilterRequest.filterMainId,
859
849
  // identifiersFieldName: requestPropertyObject.identifierFieldName
860
850
  });
861
- _izContext.logger.debug('applyCombinations: ', applyCombinations);
851
+ console.log('applyCombinations: ', applyCombinations);
862
852
 
863
853
  Object.assign(complexFilterCombinationObjects, {
864
854
  [complexFilterRequest.filterMainId]: {
@@ -890,7 +880,7 @@ async function checkConditionsLink(
890
880
  };
891
881
  };
892
882
 
893
- _izContext.logger.debug('perParentCombinations: ', {
883
+ console.log('perParentCombinations: ', {
894
884
  perParentCombinationIds,
895
885
  perParentCombinationObjects,
896
886
  applyCombinations
@@ -905,15 +895,14 @@ async function checkConditionsLink(
905
895
  conditionLinkObject.applyCombinations = applyCombinations
906
896
  conditionLinkObject.complexFilterCombinationObjects = complexFilterCombinationObjects;
907
897
  };
908
- _izContext.logger.debug('conditionLinkObject: ', conditionLinkObject);
898
+ console.log('conditionLinkObject: ', conditionLinkObject);
909
899
  }
910
- _izContext.logger.debug('conditionLinkObject', conditionLinkObject);
900
+ console.log('conditionLinkObject', conditionLinkObject);
911
901
  return [conditionLinkObject, errorsObject, errorsFound];
912
902
  }
913
903
 
914
904
 
915
905
  function checkConditionsLinkStep(
916
- _izContext,
917
906
  multipleIdentifiers,
918
907
  linkConfig,
919
908
  combine
@@ -935,7 +924,7 @@ function checkConditionsLinkStep(
935
924
  }
936
925
 
937
926
  let requestProperties = false;
938
- if (linkConfig.hasOwnProperty('requestProperties')) {
927
+ if (linkConfig.hasOwnProperty('requestProperties') && !isEmpty(linkConfig.requestProperties)) {
939
928
  requestProperties = true;
940
929
  }
941
930
  if (multipleIdentifiers) {
@@ -984,44 +973,82 @@ function checkConditionsLinkStep(
984
973
 
985
974
 
986
975
  function checkMultipleIdentifers(
987
- _izContext,
988
976
  linkConfig = {},
989
- aggregate = false,
990
- comparison = false,
991
- combine = false,
992
- applyCombinations = false,
977
+ conditions = {},
993
978
  multipleIdentifiers = false,
979
+ //
994
980
  ) {
981
+ // conditions: {
982
+ // aggregate ,
983
+ // comparison,
984
+ // combine ,
985
+ // applyCombinations ,
986
+ // multipleIdentifiers,
987
+ // }
988
+
995
989
  let manyIdentifiers = null;
990
+
996
991
  if (!isEmpty(linkConfig)) {
992
+
997
993
  let toMany = false;
998
994
  if (linkConfig.other.linkType === 'many') {
999
995
  toMany = true;
1000
996
  };
1001
997
 
1002
998
  if (multipleIdentifiers) {
999
+
1003
1000
  if (toMany || !toMany) {
1004
- if (!combine) {
1005
- manyIdentifiers = true;
1006
- } else {
1007
- if (aggregate) {
1008
- manyIdentifiers = false;
1001
+
1002
+ if (conditions.hasOwnProperty("combine") && conditions.combine === true) {
1003
+
1004
+ if (conditions.hasOwnProperty("aggregate")) {
1005
+ if (conditions.aggregate === true) {
1006
+ manyIdentifiers = false;
1007
+ }
1009
1008
  }
1009
+
1010
+ } else {
1011
+ manyIdentifiers = true;
1010
1012
  }
1011
1013
  }
1014
+
1012
1015
  } else {
1016
+
1013
1017
  if (toMany) {
1014
- if (aggregate) {
1018
+
1019
+ if (conditions.hasOwnProperty("aggregate") && conditions.aggregate === true) {
1015
1020
  manyIdentifiers = false;
1016
1021
  } else {
1017
1022
  manyIdentifiers = true;
1018
1023
  }
1024
+
1019
1025
  } else {
1020
- if (!aggregate && !combine && !applyCombinations && !comparison) {
1026
+
1027
+ if (isEmpty(conditions)) {
1028
+
1021
1029
  manyIdentifiers = false;
1030
+
1031
+ } else {
1032
+
1033
+ if (conditions.hasOwnProperty("applyCombinations") && conditions.applyCombinations === true) {
1034
+ manyIdentifiers = true;
1035
+ } else {
1036
+
1037
+ if ((conditions.hasOwnProperty("aggregate") && conditions.aggregate === true)
1038
+ || (conditions.hasOwnProperty("combine") && conditions.combine === true)
1039
+ || (conditions.hasOwnProperty("comparison") && conditions.comparison === true)
1040
+ ) {
1041
+ manyIdentifiers = null;
1042
+ } else {
1043
+ manyIdentifiers = false;
1044
+ }
1045
+ }
1022
1046
  }
1023
1047
  }
1024
1048
  }
1049
+
1050
+ } else {
1051
+ manyIdentifiers = false
1025
1052
  }
1026
1053
  return manyIdentifiers
1027
1054
  }