@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-87855.0 → 0.0.0-bugfix-dev-KB-85772.0

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.
@@ -64815,8 +64815,7 @@ class AgGridController {
64815
64815
  }
64816
64816
  showFilterColumn(configs) {
64817
64817
  var _a;
64818
- const presentationMetadata = this.resolveDescriptionColMetadata(configs.columnName);
64819
- (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(Object.assign(Object.assign({}, configs), { fieldDescriptor: presentationMetadata }));
64818
+ (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
64820
64819
  }
64821
64820
  constructor(_enterprise) {
64822
64821
  this.DEFAULT_ROW_HEIGHT = 30;
@@ -64872,15 +64871,10 @@ class AgGridController {
64872
64871
  return;
64873
64872
  }
64874
64873
  return Array.from(this._filteredColumns.entries())
64875
- .map(([col, items]) => {
64874
+ .map(([column, items]) => {
64876
64875
  var _a;
64877
64876
  const checkedOptions = items.filter(option => option.check);
64878
64877
  if (checkedOptions.length > 0) {
64879
- let column = col;
64880
- const presentationFrom = this.getCodeColFromDescriptionCol(col);
64881
- if (!core.StringUtils.isEmpty(presentationFrom)) {
64882
- column = presentationFrom;
64883
- }
64884
64878
  const fieldDescriptor = this._dataUnit.getField(column);
64885
64879
  const dataType = (_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.dataType) !== null && _a !== void 0 ? _a : core.DataType.TEXT;
64886
64880
  let placeholders = '';
@@ -65074,23 +65068,6 @@ class AgGridController {
65074
65068
  action: () => this.showFilterColumn({ columnName, columnLabel, leftPosition: this._filterColumnleftPosition, filteredOptions: this._filteredColumns.get(columnName) }),
65075
65069
  };
65076
65070
  }
65077
- resolveDescriptionColMetadata(columnName) {
65078
- var _a;
65079
- const colDef = (_a = this._gridOptions.columnApi.getColumn(columnName)) === null || _a === void 0 ? void 0 : _a.getColDef();
65080
- const presentationFrom = this.getCodeColFromDescriptionCol(columnName);
65081
- if (!core.StringUtils.isEmpty(presentationFrom)) {
65082
- return {
65083
- label: colDef.headerName,
65084
- name: columnName,
65085
- userInterface: core.UserInterface.SHORTTEXT,
65086
- dataType: core.DataType.TEXT,
65087
- properties: {
65088
- [constants.PRESENTATION_FROM_COL_PROP_NAME]: presentationFrom
65089
- }
65090
- };
65091
- }
65092
- return undefined;
65093
- }
65094
65071
  buildMenuItemOptionPin(params) {
65095
65072
  const { column, columnApi } = params;
65096
65073
  const isPinned = params.column.isPinned();
@@ -65688,7 +65665,7 @@ class AgGridController {
65688
65665
  return filterOptions.map(item => item.check).includes(true);
65689
65666
  }
65690
65667
  buildColDef(source) {
65691
- var _a, _b, _c, _d, _e;
65668
+ var _a, _b, _c, _d;
65692
65669
  let tooltip = undefined;
65693
65670
  const propSortable = core.StringUtils.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
65694
65671
  if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
@@ -65697,7 +65674,6 @@ class AgGridController {
65697
65674
  else if (propSortable === false) {
65698
65675
  tooltip = 'Coluna não pode ser ordenada';
65699
65676
  }
65700
- const presentationFrom = (_d = source === null || source === void 0 ? void 0 : source.props) === null || _d === void 0 ? void 0 : _d.get(constants.PRESENTATION_FROM_COL_PROP_NAME);
65701
65677
  return this._editionManager.configureColumn({
65702
65678
  headerName: source.label,
65703
65679
  field: source.name,
@@ -65705,16 +65681,16 @@ class AgGridController {
65705
65681
  resizable: true,
65706
65682
  headerComponent: 'ezGridCustomHeader',
65707
65683
  headerComponentParams: {
65708
- presentationFrom,
65709
65684
  tooltip: tooltip,
65710
65685
  isSortable: propSortable,
65711
65686
  hasFilter: () => this.hasFilterColumn(source.name),
65712
65687
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
65713
65688
  },
65714
65689
  valueFormatter: params => {
65715
- var _a, _b, _c;
65690
+ var _a, _b, _c, _d;
65691
+ const presentationFrom = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get(constants.PRESENTATION_FROM_COL_PROP_NAME);
65716
65692
  if (presentationFrom) {
65717
- return (_c = (_b = (_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a[presentationFrom]) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : "";
65693
+ return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.data) === null || _b === void 0 ? void 0 : _b[presentationFrom]) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : "";
65718
65694
  }
65719
65695
  if (params.value === undefined || params.value === null) {
65720
65696
  return "";
@@ -65735,7 +65711,7 @@ class AgGridController {
65735
65711
  return this.getFormatterByColumn(params, source);
65736
65712
  },
65737
65713
  cellStyle: this.getStyleByColumn(source),
65738
- editable: !((_e = source.props) === null || _e === void 0 ? void 0 : _e.has(constants.PRESENTATION_FROM_COL_PROP_NAME))
65714
+ editable: !((_d = source.props) === null || _d === void 0 ? void 0 : _d.has(constants.PRESENTATION_FROM_COL_PROP_NAME))
65739
65715
  });
65740
65716
  }
65741
65717
  setCustomFormatters(customFormatters) {
@@ -66006,12 +65982,6 @@ class AgGridController {
66006
65982
  const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
66007
65983
  return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
66008
65984
  }
66009
- getCodeColFromDescriptionCol(descriptionColName) {
66010
- var _a;
66011
- const colGrid = this._gridOptions.columnApi.getColumn(descriptionColName);
66012
- const colDef = colGrid === null || colGrid === void 0 ? void 0 : colGrid.getColDef();
66013
- return (_a = colDef === null || colDef === void 0 ? void 0 : colDef.headerComponentParams) === null || _a === void 0 ? void 0 : _a.presentationFrom;
66014
- }
66015
65985
  }
66016
65986
 
66017
65987
  function enableSelectAll(total) {
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-9e5554cb.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const constants = require('./constants-569271bc.js');
8
7
 
9
8
  const filterColumnCss = ".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";
10
9
 
@@ -40,14 +39,13 @@ const FilterColumn = class {
40
39
  * @Params IFilterColumnConfigs informações para configurar o filtro
41
40
  */
42
41
  async show(configs) {
43
- var _a;
44
42
  if (this.canShow(configs)) {
45
43
  await this.hide();
46
- this.fieldDescriptor = (_a = configs.fieldDescriptor) !== null && _a !== void 0 ? _a : this.dataUnit.getField(configs.columnName);
44
+ this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
47
45
  this.buildIsTextSearch();
48
46
  this.columnName = configs.columnName;
49
47
  this.columnLabel = configs.columnLabel;
50
- await this.setOptions(configs);
48
+ await this.setOptions(configs.filteredOptions);
51
49
  await this.ezPopoverElement.showUnder(`filter-column-${configs.columnName}-${this.dataUnit.dataUnitId}`);
52
50
  }
53
51
  }
@@ -85,22 +83,14 @@ const FilterColumn = class {
85
83
  return this.fieldDescriptor.userInterface === core.UserInterface.SWITCH
86
84
  || this.fieldDescriptor.userInterface === core.UserInterface.CHECKBOX;
87
85
  }
88
- async setOptions(config) {
89
- var _a, _b, _c, _d;
90
- const selectedItems = config.filteredOptions;
86
+ async setOptions(selectedItems) {
91
87
  const validateFieldUserInterfaceOptionSelector = this.hasToUseOptions();
92
88
  if (validateFieldUserInterfaceOptionSelector) {
93
89
  this.useOptions = validateFieldUserInterfaceOptionSelector;
94
90
  this.options = validateFieldUserInterfaceOptionSelector ? this.buildOptions(selectedItems) : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : null);
95
91
  return;
96
92
  }
97
- let colName = this.columnName;
98
- const staticOptionsConfig = { onlyLabel: false };
99
- if ((_b = (_a = config.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[constants.PRESENTATION_FROM_COL_PROP_NAME]) {
100
- colName = (_d = (_c = config.fieldDescriptor) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d[constants.PRESENTATION_FROM_COL_PROP_NAME];
101
- staticOptionsConfig.onlyLabel = true;
102
- }
103
- const options = await this.dataSource.getStaticOptions(colName, staticOptionsConfig);
93
+ const options = await this.dataSource.getStaticOptions(this.columnName);
104
94
  if (options != undefined) {
105
95
  const selected = new Set((selectedItems || []).filter(item => item.check).map(item => item.label));
106
96
  this.useOptions = true;
@@ -31,8 +31,7 @@ export default class AgGridController {
31
31
  }
32
32
  showFilterColumn(configs) {
33
33
  var _a;
34
- const presentationMetadata = this.resolveDescriptionColMetadata(configs.columnName);
35
- (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(Object.assign(Object.assign({}, configs), { fieldDescriptor: presentationMetadata }));
34
+ (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
36
35
  }
37
36
  constructor(_enterprise) {
38
37
  this.DEFAULT_ROW_HEIGHT = 30;
@@ -88,15 +87,10 @@ export default class AgGridController {
88
87
  return;
89
88
  }
90
89
  return Array.from(this._filteredColumns.entries())
91
- .map(([col, items]) => {
90
+ .map(([column, items]) => {
92
91
  var _a;
93
92
  const checkedOptions = items.filter(option => option.check);
94
93
  if (checkedOptions.length > 0) {
95
- let column = col;
96
- const presentationFrom = this.getCodeColFromDescriptionCol(col);
97
- if (!StringUtils.isEmpty(presentationFrom)) {
98
- column = presentationFrom;
99
- }
100
94
  const fieldDescriptor = this._dataUnit.getField(column);
101
95
  const dataType = (_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.dataType) !== null && _a !== void 0 ? _a : DataType.TEXT;
102
96
  let placeholders = '';
@@ -290,23 +284,6 @@ export default class AgGridController {
290
284
  action: () => this.showFilterColumn({ columnName, columnLabel, leftPosition: this._filterColumnleftPosition, filteredOptions: this._filteredColumns.get(columnName) }),
291
285
  };
292
286
  }
293
- resolveDescriptionColMetadata(columnName) {
294
- var _a;
295
- const colDef = (_a = this._gridOptions.columnApi.getColumn(columnName)) === null || _a === void 0 ? void 0 : _a.getColDef();
296
- const presentationFrom = this.getCodeColFromDescriptionCol(columnName);
297
- if (!StringUtils.isEmpty(presentationFrom)) {
298
- return {
299
- label: colDef.headerName,
300
- name: columnName,
301
- userInterface: UserInterface.SHORTTEXT,
302
- dataType: DataType.TEXT,
303
- properties: {
304
- [PRESENTATION_FROM_COL_PROP_NAME]: presentationFrom
305
- }
306
- };
307
- }
308
- return undefined;
309
- }
310
287
  buildMenuItemOptionPin(params) {
311
288
  const { column, columnApi } = params;
312
289
  const isPinned = params.column.isPinned();
@@ -904,7 +881,7 @@ export default class AgGridController {
904
881
  return filterOptions.map(item => item.check).includes(true);
905
882
  }
906
883
  buildColDef(source) {
907
- var _a, _b, _c, _d, _e;
884
+ var _a, _b, _c, _d;
908
885
  let tooltip = undefined;
909
886
  const propSortable = StringUtils.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
910
887
  if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
@@ -913,7 +890,6 @@ export default class AgGridController {
913
890
  else if (propSortable === false) {
914
891
  tooltip = 'Coluna não pode ser ordenada';
915
892
  }
916
- const presentationFrom = (_d = source === null || source === void 0 ? void 0 : source.props) === null || _d === void 0 ? void 0 : _d.get(PRESENTATION_FROM_COL_PROP_NAME);
917
893
  return this._editionManager.configureColumn({
918
894
  headerName: source.label,
919
895
  field: source.name,
@@ -921,16 +897,16 @@ export default class AgGridController {
921
897
  resizable: true,
922
898
  headerComponent: 'ezGridCustomHeader',
923
899
  headerComponentParams: {
924
- presentationFrom,
925
900
  tooltip: tooltip,
926
901
  isSortable: propSortable,
927
902
  hasFilter: () => this.hasFilterColumn(source.name),
928
903
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
929
904
  },
930
905
  valueFormatter: params => {
931
- var _a, _b, _c;
906
+ var _a, _b, _c, _d;
907
+ const presentationFrom = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get(PRESENTATION_FROM_COL_PROP_NAME);
932
908
  if (presentationFrom) {
933
- return (_c = (_b = (_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a[presentationFrom]) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : "";
909
+ return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.data) === null || _b === void 0 ? void 0 : _b[presentationFrom]) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : "";
934
910
  }
935
911
  if (params.value === undefined || params.value === null) {
936
912
  return "";
@@ -951,7 +927,7 @@ export default class AgGridController {
951
927
  return this.getFormatterByColumn(params, source);
952
928
  },
953
929
  cellStyle: this.getStyleByColumn(source),
954
- editable: !((_e = source.props) === null || _e === void 0 ? void 0 : _e.has(PRESENTATION_FROM_COL_PROP_NAME))
930
+ editable: !((_d = source.props) === null || _d === void 0 ? void 0 : _d.has(PRESENTATION_FROM_COL_PROP_NAME))
955
931
  });
956
932
  }
957
933
  setCustomFormatters(customFormatters) {
@@ -1222,10 +1198,4 @@ export default class AgGridController {
1222
1198
  const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
1223
1199
  return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
1224
1200
  }
1225
- getCodeColFromDescriptionCol(descriptionColName) {
1226
- var _a;
1227
- const colGrid = this._gridOptions.columnApi.getColumn(descriptionColName);
1228
- const colDef = colGrid === null || colGrid === void 0 ? void 0 : colGrid.getColDef();
1229
- return (_a = colDef === null || colDef === void 0 ? void 0 : colDef.headerComponentParams) === null || _a === void 0 ? void 0 : _a.presentationFrom;
1230
- }
1231
1201
  }
@@ -1,6 +1,5 @@
1
1
  import { UserInterface } from '@sankhyalabs/core';
2
2
  import { h } from '@stencil/core';
3
- import { PRESENTATION_FROM_COL_PROP_NAME } from '../../../utils/constants';
4
3
  const windowInstace = window;
5
4
  const onSubmitFilter = new CustomEvent('onSubmitFilter', {
6
5
  detail: {
@@ -31,14 +30,13 @@ export class FilterColumn {
31
30
  * @Params IFilterColumnConfigs informações para configurar o filtro
32
31
  */
33
32
  async show(configs) {
34
- var _a;
35
33
  if (this.canShow(configs)) {
36
34
  await this.hide();
37
- this.fieldDescriptor = (_a = configs.fieldDescriptor) !== null && _a !== void 0 ? _a : this.dataUnit.getField(configs.columnName);
35
+ this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
38
36
  this.buildIsTextSearch();
39
37
  this.columnName = configs.columnName;
40
38
  this.columnLabel = configs.columnLabel;
41
- await this.setOptions(configs);
39
+ await this.setOptions(configs.filteredOptions);
42
40
  await this.ezPopoverElement.showUnder(`filter-column-${configs.columnName}-${this.dataUnit.dataUnitId}`);
43
41
  }
44
42
  }
@@ -76,22 +74,14 @@ export class FilterColumn {
76
74
  return this.fieldDescriptor.userInterface === UserInterface.SWITCH
77
75
  || this.fieldDescriptor.userInterface === UserInterface.CHECKBOX;
78
76
  }
79
- async setOptions(config) {
80
- var _a, _b, _c, _d;
81
- const selectedItems = config.filteredOptions;
77
+ async setOptions(selectedItems) {
82
78
  const validateFieldUserInterfaceOptionSelector = this.hasToUseOptions();
83
79
  if (validateFieldUserInterfaceOptionSelector) {
84
80
  this.useOptions = validateFieldUserInterfaceOptionSelector;
85
81
  this.options = validateFieldUserInterfaceOptionSelector ? this.buildOptions(selectedItems) : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : null);
86
82
  return;
87
83
  }
88
- let colName = this.columnName;
89
- const staticOptionsConfig = { onlyLabel: false };
90
- if ((_b = (_a = config.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_FROM_COL_PROP_NAME]) {
91
- colName = (_d = (_c = config.fieldDescriptor) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d[PRESENTATION_FROM_COL_PROP_NAME];
92
- staticOptionsConfig.onlyLabel = true;
93
- }
94
- const options = await this.dataSource.getStaticOptions(colName, staticOptionsConfig);
84
+ const options = await this.dataSource.getStaticOptions(this.columnName);
95
85
  if (options != undefined) {
96
86
  const selected = new Set((selectedItems || []).filter(item => item.check).map(item => item.label));
97
87
  this.useOptions = true;
@@ -669,11 +669,8 @@ export class EzSearchPlus {
669
669
  "required": false,
670
670
  "optional": false,
671
671
  "docs": {
672
- "tags": [{
673
- "name": "deprecated",
674
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
675
- }],
676
- "text": ""
672
+ "tags": [],
673
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
677
674
  },
678
675
  "attribute": "show-selected-value",
679
676
  "reflect": false,
@@ -690,11 +687,8 @@ export class EzSearchPlus {
690
687
  "required": false,
691
688
  "optional": false,
692
689
  "docs": {
693
- "tags": [{
694
- "name": "deprecated",
695
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
696
- }],
697
- "text": ""
690
+ "tags": [],
691
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
698
692
  },
699
693
  "attribute": "suppress-empty-option",
700
694
  "reflect": false,
@@ -711,11 +705,8 @@ export class EzSearchPlus {
711
705
  "required": false,
712
706
  "optional": false,
713
707
  "docs": {
714
- "tags": [{
715
- "name": "deprecated",
716
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
717
- }],
718
- "text": ""
708
+ "tags": [],
709
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
719
710
  },
720
711
  "attribute": "hide-error-on-focus-out",
721
712
  "reflect": false,
@@ -737,11 +728,8 @@ export class EzSearchPlus {
737
728
  "required": false,
738
729
  "optional": false,
739
730
  "docs": {
740
- "tags": [{
741
- "name": "deprecated",
742
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
743
- }],
744
- "text": ""
731
+ "tags": [],
732
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
745
733
  }
746
734
  },
747
735
  "isTextSearch": {
@@ -755,11 +743,8 @@ export class EzSearchPlus {
755
743
  "required": false,
756
744
  "optional": false,
757
745
  "docs": {
758
- "tags": [{
759
- "name": "deprecated",
760
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
761
- }],
762
- "text": ""
746
+ "tags": [],
747
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
763
748
  },
764
749
  "attribute": "is-text-search",
765
750
  "reflect": false,
@@ -776,11 +761,8 @@ export class EzSearchPlus {
776
761
  "required": false,
777
762
  "optional": false,
778
763
  "docs": {
779
- "tags": [{
780
- "name": "deprecated",
781
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
782
- }],
783
- "text": ""
764
+ "tags": [],
765
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
784
766
  },
785
767
  "attribute": "ignore-limit-chars-to-search",
786
768
  "reflect": false,
@@ -797,11 +779,8 @@ export class EzSearchPlus {
797
779
  "required": false,
798
780
  "optional": false,
799
781
  "docs": {
800
- "tags": [{
801
- "name": "deprecated",
802
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
803
- }],
804
- "text": ""
782
+ "tags": [],
783
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
805
784
  },
806
785
  "attribute": "suppress-search",
807
786
  "reflect": false,
@@ -818,11 +797,8 @@ export class EzSearchPlus {
818
797
  "required": false,
819
798
  "optional": false,
820
799
  "docs": {
821
- "tags": [{
822
- "name": "deprecated",
823
- "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
824
- }],
825
- "text": ""
800
+ "tags": [],
801
+ "text": "Propriedade depreciada na nova vers\u00E3o do componente de pesquisa."
826
802
  },
827
803
  "attribute": "suppress-pre-load",
828
804
  "reflect": false,
@@ -1,6 +1,6 @@
1
1
  import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
2
2
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
3
- import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, KeyboardManager, ArrayUtils as ArrayUtils$1, DataUnit, LockManager, LockManagerOperation, DataType, NumberUtils as NumberUtils$1, MaskFormatter, SortMode, ColumnFilterManager as ColumnFilterManager$1, FieldComparator, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
3
+ import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, KeyboardManager, ArrayUtils as ArrayUtils$1, DataUnit, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ColumnFilterManager as ColumnFilterManager$1, FieldComparator, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
4
4
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
5
5
 
6
6
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
@@ -71014,8 +71014,7 @@ class AgGridController {
71014
71014
  }
71015
71015
  showFilterColumn(configs) {
71016
71016
  var _a;
71017
- const presentationMetadata = this.resolveDescriptionColMetadata(configs.columnName);
71018
- (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(Object.assign(Object.assign({}, configs), { fieldDescriptor: presentationMetadata }));
71017
+ (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
71019
71018
  }
71020
71019
  constructor(_enterprise) {
71021
71020
  this.DEFAULT_ROW_HEIGHT = 30;
@@ -71071,15 +71070,10 @@ class AgGridController {
71071
71070
  return;
71072
71071
  }
71073
71072
  return Array.from(this._filteredColumns.entries())
71074
- .map(([col, items]) => {
71073
+ .map(([column, items]) => {
71075
71074
  var _a;
71076
71075
  const checkedOptions = items.filter(option => option.check);
71077
71076
  if (checkedOptions.length > 0) {
71078
- let column = col;
71079
- const presentationFrom = this.getCodeColFromDescriptionCol(col);
71080
- if (!StringUtils$1.isEmpty(presentationFrom)) {
71081
- column = presentationFrom;
71082
- }
71083
71077
  const fieldDescriptor = this._dataUnit.getField(column);
71084
71078
  const dataType = (_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.dataType) !== null && _a !== void 0 ? _a : DataType.TEXT;
71085
71079
  let placeholders = '';
@@ -71273,23 +71267,6 @@ class AgGridController {
71273
71267
  action: () => this.showFilterColumn({ columnName, columnLabel, leftPosition: this._filterColumnleftPosition, filteredOptions: this._filteredColumns.get(columnName) }),
71274
71268
  };
71275
71269
  }
71276
- resolveDescriptionColMetadata(columnName) {
71277
- var _a;
71278
- const colDef = (_a = this._gridOptions.columnApi.getColumn(columnName)) === null || _a === void 0 ? void 0 : _a.getColDef();
71279
- const presentationFrom = this.getCodeColFromDescriptionCol(columnName);
71280
- if (!StringUtils$1.isEmpty(presentationFrom)) {
71281
- return {
71282
- label: colDef.headerName,
71283
- name: columnName,
71284
- userInterface: UserInterface.SHORTTEXT,
71285
- dataType: DataType.TEXT,
71286
- properties: {
71287
- [PRESENTATION_FROM_COL_PROP_NAME]: presentationFrom
71288
- }
71289
- };
71290
- }
71291
- return undefined;
71292
- }
71293
71270
  buildMenuItemOptionPin(params) {
71294
71271
  const { column, columnApi } = params;
71295
71272
  const isPinned = params.column.isPinned();
@@ -71887,7 +71864,7 @@ class AgGridController {
71887
71864
  return filterOptions.map(item => item.check).includes(true);
71888
71865
  }
71889
71866
  buildColDef(source) {
71890
- var _a, _b, _c, _d, _e;
71867
+ var _a, _b, _c, _d;
71891
71868
  let tooltip = undefined;
71892
71869
  const propSortable = StringUtils$1.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
71893
71870
  if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
@@ -71896,7 +71873,6 @@ class AgGridController {
71896
71873
  else if (propSortable === false) {
71897
71874
  tooltip = 'Coluna não pode ser ordenada';
71898
71875
  }
71899
- const presentationFrom = (_d = source === null || source === void 0 ? void 0 : source.props) === null || _d === void 0 ? void 0 : _d.get(PRESENTATION_FROM_COL_PROP_NAME);
71900
71876
  return this._editionManager.configureColumn({
71901
71877
  headerName: source.label,
71902
71878
  field: source.name,
@@ -71904,16 +71880,16 @@ class AgGridController {
71904
71880
  resizable: true,
71905
71881
  headerComponent: 'ezGridCustomHeader',
71906
71882
  headerComponentParams: {
71907
- presentationFrom,
71908
71883
  tooltip: tooltip,
71909
71884
  isSortable: propSortable,
71910
71885
  hasFilter: () => this.hasFilterColumn(source.name),
71911
71886
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
71912
71887
  },
71913
71888
  valueFormatter: params => {
71914
- var _a, _b, _c;
71889
+ var _a, _b, _c, _d;
71890
+ const presentationFrom = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get(PRESENTATION_FROM_COL_PROP_NAME);
71915
71891
  if (presentationFrom) {
71916
- return (_c = (_b = (_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a[presentationFrom]) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : "";
71892
+ return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.data) === null || _b === void 0 ? void 0 : _b[presentationFrom]) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : "";
71917
71893
  }
71918
71894
  if (params.value === undefined || params.value === null) {
71919
71895
  return "";
@@ -71934,7 +71910,7 @@ class AgGridController {
71934
71910
  return this.getFormatterByColumn(params, source);
71935
71911
  },
71936
71912
  cellStyle: this.getStyleByColumn(source),
71937
- editable: !((_e = source.props) === null || _e === void 0 ? void 0 : _e.has(PRESENTATION_FROM_COL_PROP_NAME))
71913
+ editable: !((_d = source.props) === null || _d === void 0 ? void 0 : _d.has(PRESENTATION_FROM_COL_PROP_NAME))
71938
71914
  });
71939
71915
  }
71940
71916
  setCustomFormatters(customFormatters) {
@@ -72205,12 +72181,6 @@ class AgGridController {
72205
72181
  const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
72206
72182
  return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
72207
72183
  }
72208
- getCodeColFromDescriptionCol(descriptionColName) {
72209
- var _a;
72210
- const colGrid = this._gridOptions.columnApi.getColumn(descriptionColName);
72211
- const colDef = colGrid === null || colGrid === void 0 ? void 0 : colGrid.getColDef();
72212
- return (_a = colDef === null || colDef === void 0 ? void 0 : colDef.headerComponentParams) === null || _a === void 0 ? void 0 : _a.presentationFrom;
72213
- }
72214
72184
  }
72215
72185
 
72216
72186
  function enableSelectAll(total) {
@@ -81250,14 +81220,13 @@ const FilterColumn$1 = class extends HTMLElement$1 {
81250
81220
  * @Params IFilterColumnConfigs informações para configurar o filtro
81251
81221
  */
81252
81222
  async show(configs) {
81253
- var _a;
81254
81223
  if (this.canShow(configs)) {
81255
81224
  await this.hide();
81256
- this.fieldDescriptor = (_a = configs.fieldDescriptor) !== null && _a !== void 0 ? _a : this.dataUnit.getField(configs.columnName);
81225
+ this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
81257
81226
  this.buildIsTextSearch();
81258
81227
  this.columnName = configs.columnName;
81259
81228
  this.columnLabel = configs.columnLabel;
81260
- await this.setOptions(configs);
81229
+ await this.setOptions(configs.filteredOptions);
81261
81230
  await this.ezPopoverElement.showUnder(`filter-column-${configs.columnName}-${this.dataUnit.dataUnitId}`);
81262
81231
  }
81263
81232
  }
@@ -81295,22 +81264,14 @@ const FilterColumn$1 = class extends HTMLElement$1 {
81295
81264
  return this.fieldDescriptor.userInterface === UserInterface.SWITCH
81296
81265
  || this.fieldDescriptor.userInterface === UserInterface.CHECKBOX;
81297
81266
  }
81298
- async setOptions(config) {
81299
- var _a, _b, _c, _d;
81300
- const selectedItems = config.filteredOptions;
81267
+ async setOptions(selectedItems) {
81301
81268
  const validateFieldUserInterfaceOptionSelector = this.hasToUseOptions();
81302
81269
  if (validateFieldUserInterfaceOptionSelector) {
81303
81270
  this.useOptions = validateFieldUserInterfaceOptionSelector;
81304
81271
  this.options = validateFieldUserInterfaceOptionSelector ? this.buildOptions(selectedItems) : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : null);
81305
81272
  return;
81306
81273
  }
81307
- let colName = this.columnName;
81308
- const staticOptionsConfig = { onlyLabel: false };
81309
- if ((_b = (_a = config.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_FROM_COL_PROP_NAME]) {
81310
- colName = (_d = (_c = config.fieldDescriptor) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d[PRESENTATION_FROM_COL_PROP_NAME];
81311
- staticOptionsConfig.onlyLabel = true;
81312
- }
81313
- const options = await this.dataSource.getStaticOptions(colName, staticOptionsConfig);
81274
+ const options = await this.dataSource.getStaticOptions(this.columnName);
81314
81275
  if (options != undefined) {
81315
81276
  const selected = new Set((selectedItems || []).filter(item => item.check).map(item => item.label));
81316
81277
  this.useOptions = true;