@vitrosoftware/common-ui-ts 1.1.69 → 1.1.70

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/css/common.css CHANGED
@@ -9,6 +9,10 @@
9
9
  @import url('@vitrosoftware/common-ui-ts/css/third-party/sweetalert2/sweetalert2.css');
10
10
  @import url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/pdf-viewer.css');
11
11
 
12
+ html, body {
13
+ overscroll-behavior-x: none;
14
+ }
15
+
12
16
  :global(.vitro-opacity-low) {
13
17
  opacity: .3;
14
18
  }
@@ -160,11 +160,13 @@
160
160
  width: 16px;
161
161
  }
162
162
 
163
- .vitro-condition-list {
163
+ .vitro-condition-list-container,
164
+ .vitro-operator-list-container {
164
165
  position: absolute;
165
166
  z-index: 1000000;
166
- top: 14px;
167
- left: 0;
167
+ }
168
+
169
+ .vitro-condition-list {
168
170
  width: fit-content;
169
171
  min-width: 270px;
170
172
  border-radius: 4px;
@@ -27,12 +27,21 @@
27
27
  }
28
28
 
29
29
  .vitro-filter :global(.ps) {
30
- overflow: visible !important;
30
+ max-height: 300px;
31
+ }
32
+
33
+ .vitro-filter :global(.ps.ps--active-y) {
34
+ padding-right: 14px;
35
+ }
36
+
37
+ .vitro-filter :global(.vitro-block:last-child) > div > div {
38
+ margin-bottom: 0;
31
39
  }
32
40
 
33
41
  .vitro-add-field {
34
42
  position: relative;
35
43
  margin-bottom: 16px;
44
+ margin-top: 18px;
36
45
  }
37
46
 
38
47
  .vitro-add-field-button,
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { Condition } from './Condition';
3
3
  interface ConditionSelectProps {
4
4
  itemList: Condition[];
5
5
  defaultValue?: Condition;
6
6
  onSelect: (condition: any) => any;
7
- translateX: number;
8
7
  }
9
- export declare const ConditionSelect: (props: ConditionSelectProps) => JSX.Element;
8
+ export declare const ConditionSelect: React.ForwardRefExoticComponent<ConditionSelectProps & React.RefAttributes<unknown>>;
10
9
  export {};
@@ -5,6 +5,7 @@ import { Operator } from '../Criterion/Operator';
5
5
  interface SearchProps {
6
6
  fieldList: any[];
7
7
  visibleFieldList?: any[];
8
+ searchCriterionList?: SearchCriterion[];
8
9
  onFilterChange?: (searchCriterionList: SearchCriterion[]) => any;
9
10
  onSubmit: (searchCriterionList: SearchCriterion[]) => any;
10
11
  onCancel: () => any;
@@ -22,7 +23,7 @@ interface SearchProps {
22
23
  labelAddField: string;
23
24
  defaultSearchFieldName: string;
24
25
  inputPlaceholder?: string;
25
- maxFieldCount: number;
26
+ maxFieldCount?: number;
26
27
  }
27
28
  export declare const Search: (props: SearchProps) => JSX.Element;
28
29
  export {};
package/dist/index.css CHANGED
@@ -9,6 +9,10 @@
9
9
  @import url('@vitrosoftware/common-ui-ts/css/third-party/sweetalert2/sweetalert2.css');
10
10
  @import url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/pdf-viewer.css');
11
11
 
12
+ html, body {
13
+ overscroll-behavior-x: none;
14
+ }
15
+
12
16
  .vitro-opacity-low {
13
17
  opacity: .3;
14
18
  }
@@ -5029,11 +5033,13 @@ ul > li:last-child > ul > li:last-child ._sidebar-item_vitro-active_7p5iOhY {
5029
5033
  width: 16px;
5030
5034
  }
5031
5035
 
5032
- ._criterion_vitro-condition-list_10UIxJI {
5036
+ ._criterion_vitro-condition-list-container_ERfumwB,
5037
+ ._criterion_vitro-operator-list-container_RgT0R_Z {
5033
5038
  position: absolute;
5034
5039
  z-index: 1000000;
5035
- top: 14px;
5036
- left: 0;
5040
+ }
5041
+
5042
+ ._criterion_vitro-condition-list_10UIxJI {
5037
5043
  width: -moz-fit-content;
5038
5044
  width: fit-content;
5039
5045
  min-width: 270px;
@@ -5270,12 +5276,21 @@ ul > li:last-child > ul > li:last-child ._sidebar-item_vitro-active_7p5iOhY {
5270
5276
  }
5271
5277
 
5272
5278
  ._search_vitro-filter_2n-Y-mS .ps {
5273
- overflow: visible !important;
5279
+ max-height: 300px;
5280
+ }
5281
+
5282
+ ._search_vitro-filter_2n-Y-mS .ps.ps--active-y {
5283
+ padding-right: 14px;
5284
+ }
5285
+
5286
+ ._search_vitro-filter_2n-Y-mS .vitro-block:last-child > div > div {
5287
+ margin-bottom: 0;
5274
5288
  }
5275
5289
 
5276
5290
  ._search_vitro-add-field_2hHt1Z2 {
5277
5291
  position: relative;
5278
5292
  margin-bottom: 16px;
5293
+ margin-top: 18px;
5279
5294
  }
5280
5295
 
5281
5296
  ._search_vitro-add-field-button_30hdXYn,
package/dist/index.js CHANGED
@@ -64683,16 +64683,20 @@ var ImagePicker = function ImagePicker(props) {
64683
64683
  }), renderPreview()));
64684
64684
  };
64685
64685
 
64686
- var styles$M = {"vitro-criterion-container":"_criterion_vitro-criterion-container_2cYcSkL","vitro-block":"_criterion_vitro-block_3E9-RXM","vitro-control":"_criterion_vitro-control_2JLaybj","vitro-label":"_criterion_vitro-label_3F6a8dj","vitro-operator-select-container":"_criterion_vitro-operator-select-container_3OkjzXG","vitro-operator-select":"_criterion_vitro-operator-select_1guNlk9","vitro-operator-list":"_criterion_vitro-operator-list_3A2VZsd","vitro-button-cancel":"_criterion_vitro-button-cancel_2C2G0sL","vitro-focus":"_criterion_vitro-focus_3FNLsoN","vitro-error":"_criterion_vitro-error_3pvFrlW","vitro-condition-select":"_criterion_vitro-condition-select_1hTBBg-","vitro-icon":"_criterion_vitro-icon_1DmS0jh","vitro-condition-list":"_criterion_vitro-condition-list_10UIxJI"};
64686
+ var styles$M = {"vitro-criterion-container":"_criterion_vitro-criterion-container_2cYcSkL","vitro-block":"_criterion_vitro-block_3E9-RXM","vitro-control":"_criterion_vitro-control_2JLaybj","vitro-label":"_criterion_vitro-label_3F6a8dj","vitro-operator-select-container":"_criterion_vitro-operator-select-container_3OkjzXG","vitro-operator-select":"_criterion_vitro-operator-select_1guNlk9","vitro-operator-list":"_criterion_vitro-operator-list_3A2VZsd","vitro-button-cancel":"_criterion_vitro-button-cancel_2C2G0sL","vitro-focus":"_criterion_vitro-focus_3FNLsoN","vitro-error":"_criterion_vitro-error_3pvFrlW","vitro-condition-select":"_criterion_vitro-condition-select_1hTBBg-","vitro-icon":"_criterion_vitro-icon_1DmS0jh","vitro-condition-list-container":"_criterion_vitro-condition-list-container_ERfumwB","vitro-operator-list-container":"_criterion_vitro-operator-list-container_RgT0R_Z","vitro-condition-list":"_criterion_vitro-condition-list_10UIxJI"};
64687
64687
 
64688
- var ConditionSelect = function ConditionSelect(props) {
64688
+ var ROOT_ID = 'root';
64689
+ var PX_UNIT$4 = 'px';
64690
+ var ConditionSelect = React.forwardRef(function (props, ref) {
64689
64691
  var _useState = React.useState(props.defaultValue || props.itemList[0]),
64690
64692
  condition = _useState[0],
64691
64693
  setCondition = _useState[1];
64692
64694
  var _useState2 = React.useState(false),
64693
64695
  showSelectList = _useState2[0],
64694
64696
  setShowSelectList = _useState2[1];
64695
- var selectRef = React.useRef(null);
64697
+ var _useState3 = React.useState(null),
64698
+ conditionListContainer = _useState3[0],
64699
+ setConditionListContainer = _useState3[1];
64696
64700
  var listRef = React.useRef(null);
64697
64701
  React.useEffect(function () {
64698
64702
  window.addEventListener(exports.EVENT.MOUSEDOWN, onBlur);
@@ -64701,13 +64705,12 @@ var ConditionSelect = function ConditionSelect(props) {
64701
64705
  };
64702
64706
  });
64703
64707
  React.useEffect(function () {
64704
- if (selectRef && selectRef.current) {
64705
- selectRef.current.style.transform = "translateX(" + props.translateX + "px)";
64706
- }
64707
- }, [props.translateX]);
64708
- React.useEffect(function () {
64709
- if (listRef && listRef.current) {
64710
- listRef.current.style.transform = "translateX(" + props.translateX + "px)";
64708
+ if (showSelectList) {
64709
+ showList();
64710
+ } else {
64711
+ if (conditionListContainer) {
64712
+ conditionListContainer.remove();
64713
+ }
64711
64714
  }
64712
64715
  }, [showSelectList]);
64713
64716
  var toggleSelect = function toggleSelect() {
@@ -64719,34 +64722,61 @@ var ConditionSelect = function ConditionSelect(props) {
64719
64722
  props.onSelect(item);
64720
64723
  };
64721
64724
  var onBlur = function onBlur(e) {
64722
- if (listRef.current && !listRef.current.contains(e.target) && selectRef.current && !selectRef.current.contains(e.target)) {
64725
+ if (listRef.current && !listRef.current.contains(e.target) && ref.current && !ref.current.contains(e.target)) {
64723
64726
  setShowSelectList(false);
64724
64727
  }
64725
64728
  };
64729
+ var getListPosition = function getListPosition() {
64730
+ if (ref.current) {
64731
+ var selectPosition = ref.current.getBoundingClientRect();
64732
+ var top = selectPosition.top + selectPosition.height + 10;
64733
+ return {
64734
+ left: selectPosition.left,
64735
+ top: top
64736
+ };
64737
+ }
64738
+ return null;
64739
+ };
64740
+ var showList = function showList() {
64741
+ var position = getListPosition();
64742
+ var root = document.getElementById(ROOT_ID);
64743
+ if (position && root) {
64744
+ var container = document.createElement('div');
64745
+ container.className = styles$M['vitro-condition-list-container'];
64746
+ container.style.left = position.left + PX_UNIT$4;
64747
+ container.style.top = position.top + PX_UNIT$4;
64748
+ setConditionListContainer(container);
64749
+ var content = React__default.createElement("ul", {
64750
+ ref: listRef,
64751
+ className: styles$M['vitro-condition-list'],
64752
+ onBlur: onBlur
64753
+ }, props.itemList.map(function (item) {
64754
+ return React__default.createElement("li", {
64755
+ onClick: function onClick() {
64756
+ return _onClick(item);
64757
+ }
64758
+ }, item.imageUrl && React__default.createElement(Icon, {
64759
+ defaultUrl: item.imageUrl,
64760
+ className: styles$M['vitro-icon']
64761
+ }), item.text);
64762
+ }));
64763
+ reactDom.render(content, container);
64764
+ root.appendChild(container);
64765
+ }
64766
+ };
64726
64767
  return React__default.createElement(React__default.Fragment, null, condition && React__default.createElement("div", {
64727
- ref: selectRef,
64768
+ ref: ref,
64728
64769
  className: styles$M['vitro-condition-select']
64729
64770
  }, React__default.createElement("div", {
64730
64771
  onClick: toggleSelect
64731
64772
  }, condition.imageUrl ? React__default.createElement(Icon, {
64732
64773
  defaultUrl: condition.imageUrl,
64733
64774
  className: styles$M['vitro-icon']
64734
- }) : condition.text)), showSelectList && React__default.createElement("ul", {
64735
- ref: listRef,
64736
- className: styles$M['vitro-condition-list'],
64737
- onBlur: onBlur
64738
- }, props.itemList.map(function (item) {
64739
- return React__default.createElement("li", {
64740
- onClick: function onClick() {
64741
- return _onClick(item);
64742
- }
64743
- }, item.imageUrl && React__default.createElement(Icon, {
64744
- defaultUrl: item.imageUrl,
64745
- className: styles$M['vitro-icon']
64746
- }), item.text);
64747
- })));
64748
- };
64775
+ }) : condition.text)));
64776
+ });
64749
64777
 
64778
+ var PX_UNIT$5 = 'px';
64779
+ var ROOT_ID$1 = 'root';
64750
64780
  var Criterion = function Criterion(props) {
64751
64781
  var _useState = React.useState(props.operatorList[0]),
64752
64782
  operator = _useState[0],
@@ -64754,9 +64784,9 @@ var Criterion = function Criterion(props) {
64754
64784
  var _useState2 = React.useState(false),
64755
64785
  showOperatorSelectList = _useState2[0],
64756
64786
  setShowOperatorSelectList = _useState2[1];
64757
- var _useState3 = React.useState(0),
64758
- translate = _useState3[0],
64759
- setTranslate = _useState3[1];
64787
+ var _useState3 = React.useState(null),
64788
+ operatorListContainer = _useState3[0],
64789
+ setOperatorListContainer = _useState3[1];
64760
64790
  var _useState4 = React.useState(CTRL.EMPTY),
64761
64791
  state = _useState4[0],
64762
64792
  setState = _useState4[1];
@@ -64779,8 +64809,9 @@ var Criterion = function Criterion(props) {
64779
64809
  condition: defaultCondition.type
64780
64810
  };
64781
64811
  }, []);
64782
- var selectRef = React.useRef(null);
64812
+ var operatorSelectRef = React.useRef(null);
64783
64813
  var labelRef = React.useRef(null);
64814
+ var conditionSelectRef = React.useRef(null);
64784
64815
  React.useEffect(function () {
64785
64816
  window.addEventListener(exports.EVENT.CLICK, onBlurSelect);
64786
64817
  setOperator(defaultOperator);
@@ -64789,17 +64820,26 @@ var Criterion = function Criterion(props) {
64789
64820
  };
64790
64821
  }, []);
64791
64822
  React.useEffect(function () {
64792
- if (labelRef && labelRef.current) {
64793
- setTranslate(labelRef.current.offsetWidth + 8);
64823
+ if (labelRef && labelRef.current && conditionSelectRef && conditionSelectRef.current) {
64824
+ conditionSelectRef.current.style.left = labelRef.current.offsetWidth + 8 + PX_UNIT$5;
64794
64825
  }
64795
64826
  }, [labelRef]);
64827
+ React.useEffect(function () {
64828
+ if (showOperatorSelectList) {
64829
+ showOperatorList();
64830
+ } else {
64831
+ if (operatorListContainer) {
64832
+ operatorListContainer.remove();
64833
+ }
64834
+ }
64835
+ }, [showOperatorSelectList]);
64796
64836
  var onOperatorClick = function onOperatorClick(operator) {
64797
64837
  setOperator(operator);
64798
64838
  value.operator = operator.type;
64799
64839
  onChange(value);
64800
64840
  };
64801
64841
  var onBlurSelect = function onBlurSelect(e) {
64802
- var select = selectRef.current;
64842
+ var select = operatorSelectRef.current;
64803
64843
  if (select && e.target !== select && e.target !== select.children.item(0)) {
64804
64844
  setShowOperatorSelectList(false);
64805
64845
  }
@@ -64832,31 +64872,56 @@ var Criterion = function Criterion(props) {
64832
64872
  value.valueList = Array.isArray(val) ? val : [val];
64833
64873
  onChange(value);
64834
64874
  };
64875
+ var getOperatorListPosition = function getOperatorListPosition() {
64876
+ if (operatorSelectRef.current) {
64877
+ var selectPosition = operatorSelectRef.current.getBoundingClientRect();
64878
+ var top = selectPosition.top + selectPosition.height + 2;
64879
+ return {
64880
+ right: selectPosition.right,
64881
+ top: top
64882
+ };
64883
+ }
64884
+ return null;
64885
+ };
64886
+ var showOperatorList = function showOperatorList() {
64887
+ var position = getOperatorListPosition();
64888
+ var root = document.getElementById(ROOT_ID$1);
64889
+ if (position && root) {
64890
+ var container = document.createElement('div');
64891
+ container.className = styles$M['vitro-operator-list-container'];
64892
+ container.style.left = position.right + PX_UNIT$5;
64893
+ container.style.top = position.top + PX_UNIT$5;
64894
+ setOperatorListContainer(container);
64895
+ var content = React__default.createElement("ul", {
64896
+ className: styles$M['vitro-operator-list']
64897
+ }, props.operatorList.map(function (item) {
64898
+ return React__default.createElement("li", {
64899
+ onClick: function onClick() {
64900
+ return onOperatorClick(item);
64901
+ }
64902
+ }, item.text);
64903
+ }));
64904
+ reactDom.render(content, container);
64905
+ root.appendChild(container);
64906
+ }
64907
+ };
64835
64908
  return React__default.createElement("div", {
64836
64909
  className: styles$M['vitro-criterion-container']
64837
64910
  }, React__default.createElement("div", {
64838
64911
  className: styles$M['vitro-operator-select-container']
64839
64912
  }, props.isShowOperatorSelect && React__default.createElement("div", {
64840
- ref: selectRef,
64913
+ ref: operatorSelectRef,
64841
64914
  className: styles$M['vitro-operator-select'],
64842
64915
  onClick: toggleOperatorSelect
64843
- }, React__default.createElement("div", null, operator.text), showOperatorSelectList && React__default.createElement("ul", {
64844
- className: styles$M['vitro-operator-list']
64845
- }, props.operatorList.map(function (item) {
64846
- return React__default.createElement("li", {
64847
- onClick: function onClick() {
64848
- return onOperatorClick(item);
64849
- }
64850
- }, item.text);
64851
- })))), React__default.createElement("div", {
64916
+ }, React__default.createElement("div", null, operator.text))), React__default.createElement("div", {
64852
64917
  className: styles$M['vitro-control'] + CTRL.SPACE + state
64853
64918
  }, React__default.createElement("div", {
64854
64919
  ref: labelRef,
64855
64920
  className: styles$M['vitro-label']
64856
64921
  }, React__default.createElement("span", null, props.label)), React__default.createElement(ConditionSelect, {
64922
+ ref: conditionSelectRef,
64857
64923
  itemList: props.conditionList,
64858
64924
  onSelect: onConditionClick,
64859
- translateX: translate,
64860
64925
  defaultValue: defaultCondition
64861
64926
  }), React__default.createElement(props.content.component, _extends({}, componentProps, {
64862
64927
  className: styles$M['vitro-control'],
@@ -65365,21 +65430,24 @@ var Search = function Search(props) {
65365
65430
  var _useState3 = React.useState(false),
65366
65431
  isShowAddFieldDialog = _useState3[0],
65367
65432
  setIsShowAddFieldDialog = _useState3[1];
65368
- var _useState4 = React.useState([]),
65369
- filterFieldList = _useState4[0],
65370
- setFilterFieldList = _useState4[1];
65433
+ var _useState4 = React.useState(true),
65434
+ isShowAddFieldButton = _useState4[0],
65435
+ setIsShowAddFieldButton = _useState4[1];
65371
65436
  var _useState5 = React.useState([]),
65372
- searchCriterionList = _useState5[0],
65373
- setSearchCriterionList = _useState5[1];
65437
+ filterFieldList = _useState5[0],
65438
+ setFilterFieldList = _useState5[1];
65374
65439
  var _useState6 = React.useState([]),
65375
- selectedSearchCriterionList = _useState6[0],
65376
- setSelectedSearchCriterionList = _useState6[1];
65440
+ searchCriterionList = _useState6[0],
65441
+ setSearchCriterionList = _useState6[1];
65377
65442
  var _useState7 = React.useState([]),
65378
- checkboxFieldList = _useState7[0],
65379
- setCheckboxFieldList = _useState7[1];
65380
- var _useState8 = React.useState(CTRL.EMPTY),
65381
- state = _useState8[0],
65382
- setState = _useState8[1];
65443
+ selectedSearchCriterionList = _useState7[0],
65444
+ setSelectedSearchCriterionList = _useState7[1];
65445
+ var _useState8 = React.useState([]),
65446
+ checkboxFieldList = _useState8[0],
65447
+ setCheckboxFieldList = _useState8[1];
65448
+ var _useState9 = React.useState(CTRL.EMPTY),
65449
+ state = _useState9[0],
65450
+ setState = _useState9[1];
65383
65451
  var addFieldDialogRef = React.useRef(null);
65384
65452
  var searchRef = React.useRef(null);
65385
65453
  React.useEffect(function () {
@@ -65397,24 +65465,18 @@ var Search = function Search(props) {
65397
65465
  var checkboxList = props.fieldList;
65398
65466
  if (props.visibleFieldList) {
65399
65467
  setFilterFieldList(props.visibleFieldList);
65400
- checkboxList = props.fieldList.map(function (field) {
65401
- var _props$visibleFieldLi;
65402
- if ((_props$visibleFieldLi = props.visibleFieldList) !== null && _props$visibleFieldLi !== void 0 && _props$visibleFieldLi.find(function (f) {
65403
- return f.id === field.id;
65404
- })) {
65405
- return _extends({}, field, {
65406
- value: true
65407
- });
65408
- } else {
65409
- return field;
65410
- }
65411
- });
65468
+ checkboxList = getCheckboxFieldList(props.visibleFieldList);
65412
65469
  }
65413
65470
  setCheckboxFieldList(checkboxList);
65414
65471
  }, [props.visibleFieldList]);
65415
65472
  React.useEffect(function () {
65416
- if (filterFieldList.length >= props.maxFieldCount) {
65417
- setIsShowAddFieldDialog(false);
65473
+ if (props.maxFieldCount) {
65474
+ if (filterFieldList.length >= props.maxFieldCount) {
65475
+ setIsShowAddFieldButton(false);
65476
+ setIsShowAddFieldDialog(false);
65477
+ } else {
65478
+ setIsShowAddFieldButton(true);
65479
+ }
65418
65480
  }
65419
65481
  }, [filterFieldList]);
65420
65482
  React.useEffect(function () {
@@ -65425,6 +65487,15 @@ var Search = function Search(props) {
65425
65487
  setState(styles$O['vitro-active']);
65426
65488
  }
65427
65489
  }, [selectedSearchCriterionList]);
65490
+ React.useEffect(function () {
65491
+ if (props.searchCriterionList && props.searchCriterionList.length) {
65492
+ var list = getSelectedCriterionList(props.searchCriterionList);
65493
+ setSelectedSearchCriterionList(list);
65494
+ var selectedFieldList = getSelectedFieldList(list);
65495
+ setFilterFieldList(selectedFieldList);
65496
+ setCheckboxFieldList(getCheckboxFieldList(selectedFieldList));
65497
+ }
65498
+ }, [props.searchCriterionList]);
65428
65499
  var handleResize = function handleResize() {
65429
65500
  window.innerWidth < 800 ? setIsMobileView(true) : setIsMobileView(false);
65430
65501
  };
@@ -65488,7 +65559,11 @@ var Search = function Search(props) {
65488
65559
  var onSubmit = function onSubmit(value, criterionList) {
65489
65560
  var list = criterionList ? criterionList : searchCriterionList;
65490
65561
  props.onSubmit(list);
65491
- var selectedList = list.map(function (x) {
65562
+ setSelectedSearchCriterionList(getSelectedCriterionList(list));
65563
+ closeSettings();
65564
+ };
65565
+ var getSelectedCriterionList = function getSelectedCriterionList(criterionList) {
65566
+ var list = criterionList.map(function (x) {
65492
65567
  var fieldName = props.fieldList.find(function (field) {
65493
65568
  return field.internalName === x.internalName;
65494
65569
  }).name;
@@ -65496,8 +65571,31 @@ var Search = function Search(props) {
65496
65571
  name: fieldName
65497
65572
  });
65498
65573
  });
65499
- setSelectedSearchCriterionList(selectedList);
65500
- closeSettings();
65574
+ return list;
65575
+ };
65576
+ var getSelectedFieldList = function getSelectedFieldList(criterionList) {
65577
+ var fieldList = [];
65578
+ criterionList.map(function (x) {
65579
+ var field = props.fieldList.find(function (field) {
65580
+ return field.internalName === x.internalName;
65581
+ });
65582
+ fieldList.push(field);
65583
+ });
65584
+ return fieldList;
65585
+ };
65586
+ var getCheckboxFieldList = function getCheckboxFieldList(visibleFieldList) {
65587
+ var checkboxList = props.fieldList.map(function (field) {
65588
+ if (visibleFieldList.find(function (f) {
65589
+ return f.id === field.id;
65590
+ })) {
65591
+ return _extends({}, field, {
65592
+ value: true
65593
+ });
65594
+ } else {
65595
+ return field;
65596
+ }
65597
+ });
65598
+ return checkboxList;
65501
65599
  };
65502
65600
  var onCancel = function onCancel() {
65503
65601
  setSearchCriterionList([]);
@@ -65559,7 +65657,7 @@ var Search = function Search(props) {
65559
65657
  operatorList: props.operatorList,
65560
65658
  getConditionList: props.getConditionList,
65561
65659
  getDefaultCondition: props.getDefaultCondition
65562
- }), filterFieldList.length < props.maxFieldCount && React__default.createElement("div", {
65660
+ }), isShowAddFieldButton && React__default.createElement("div", {
65563
65661
  className: styles$O['vitro-add-field']
65564
65662
  }, React__default.createElement(Button$2, {
65565
65663
  text: props.labelAddField,