@zeedhi/teknisa-components-common 1.109.1 → 1.111.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.
Files changed (36) hide show
  1. package/coverage/clover.xml +810 -801
  2. package/coverage/coverage-final.json +47 -47
  3. package/coverage/lcov-report/index.html +11 -11
  4. package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +1 -1
  5. package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +1 -1
  6. package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +7 -7
  7. package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
  8. package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
  9. package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
  10. package/coverage/lcov.info +1358 -1357
  11. package/dist/tek-components-common.esm.js +98 -55
  12. package/dist/tek-components-common.umd.js +98 -55
  13. package/package.json +2 -2
  14. package/tests/unit/components/tek-grid/grid.spec.ts +72 -35
  15. package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +12 -8
  16. package/tests/unit/utils/grid-base/grid-controller.spec.ts +51 -9
  17. package/types/components/tek-datasource/rest-datasource.d.ts +6 -6
  18. package/types/components/tek-grid/grid.d.ts +3 -1
  19. package/types/components/tek-grid/interfaces.d.ts +3 -1
  20. package/types/components/tek-tree-grid/interfaces.d.ts +1 -0
  21. package/types/components/tek-tree-grid/tree-grid.d.ts +1 -0
  22. package/types/utils/grid-base/grid-controller.d.ts +2 -4
  23. package/types/components/tek-ag-grid/default-icons.d.ts +0 -53
  24. package/types/components/tek-ag-grid/interfaces.d.ts +0 -9
  25. package/types/components/tek-ag-grid/tek-ag-grid.d.ts +0 -35
  26. package/types/components/tek-datasource/datasource.d.ts +0 -94
  27. package/types/components/tek-grid/default-icons.d.ts +0 -53
  28. package/types/components/tek-grid/filter-dynamic-values.d.ts +0 -9
  29. package/types/components/tek-grid/grid-controller.d.ts +0 -19
  30. package/types/components/tek-grid/grid_column.d.ts +0 -14
  31. package/types/components/tek-grid/grid_controller.d.ts +0 -15
  32. package/types/components/tek-grid/tek-grid.d.ts +0 -35
  33. package/types/components/tek-login/interfaces.d.ts +0 -3
  34. package/types/components/tek-login/login-children.d.ts +0 -3
  35. package/types/components/tek-login/login.d.ts +0 -58
  36. package/types/components/tek-login/login_children.d.ts +0 -3
@@ -854,15 +854,15 @@ class GridBase {
854
854
  hideButton: () => ({
855
855
  name: `${this.grid.name}_hideTooltip`,
856
856
  component: 'ZdTooltip',
857
- label: `{{GridController_${this.grid.componentId}.tooltipName}}`,
857
+ label: 'TEKGRID_HIDE',
858
858
  bottom: true,
859
859
  children: [
860
860
  {
861
861
  name: `${this.grid.name}_hideButton`,
862
862
  component: 'ZdIcon',
863
863
  iconName: 'mdi-chevron-right',
864
- isVisible: true,
865
- cssClass: `{{GridController_${this.grid.componentId}.toolbarStyle}}`,
864
+ isVisible: `{{GridController_${this.grid.componentId}.showHideButton}}`,
865
+ cssClass: '',
866
866
  events: {
867
867
  click: this.hideButtonClick.bind(this),
868
868
  },
@@ -931,6 +931,13 @@ class GridBase {
931
931
  },
932
932
  ],
933
933
  }),
934
+ optionsDivider: (index) => ({
935
+ name: `${this.grid.name}_options_divider${index}`,
936
+ component: 'ZdDivider',
937
+ cssClass: 'toolbar-divider',
938
+ vertical: true,
939
+ isVisible: `{{GridController_${this.grid.componentId}.showOptionsDivider}}`,
940
+ }),
934
941
  columnsButton: () => ({
935
942
  name: `${this.grid.name}_columns_button_tooltip`,
936
943
  component: 'ZdTooltip',
@@ -966,19 +973,34 @@ class GridBase {
966
973
  },
967
974
  children: this.grid.exportActions || this.exportConfigButtons,
968
975
  }),
976
+ actionsDivider: (index) => ({
977
+ name: `${this.grid.name}_actions_divider${index}`,
978
+ component: 'ZdDivider',
979
+ cssClass: 'toolbar-divider',
980
+ vertical: true,
981
+ isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
982
+ }),
969
983
  actionsDropdown: () => ({
970
- name: `${this.grid.name}_actions_dropdown`,
971
- component: 'ZdDropdown',
972
- cssClass: 'tekgrid-actions-dropdown',
973
- offsetY: true,
974
- activator: {
975
- name: `${this.grid.name}_actionsButton`,
976
- component: 'ZdButton',
977
- icon: true,
978
- iconName: 'more',
979
- isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
980
- },
981
- children: this.grid.actions,
984
+ name: `${this.grid.name}_actions_tooltip`,
985
+ component: 'ZdTooltip',
986
+ label: 'TEKGRID_ACTIONS',
987
+ bottom: true,
988
+ children: [
989
+ {
990
+ name: `${this.grid.name}_actions_dropdown`,
991
+ component: 'ZdDropdown',
992
+ cssClass: 'tekgrid-actions-dropdown',
993
+ offsetY: true,
994
+ activator: {
995
+ name: `${this.grid.name}_actionsButton`,
996
+ component: 'ZdButton',
997
+ icon: true,
998
+ iconName: 'more',
999
+ isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
1000
+ },
1001
+ children: this.grid.actions,
1002
+ },
1003
+ ],
982
1004
  }),
983
1005
  saveButton: () => ({
984
1006
  name: `${this.grid.name}_saveButton`,
@@ -1073,8 +1095,8 @@ class GridBase {
1073
1095
  */
1074
1096
  addDefaultToolbarItems(toolbarDivChildren) {
1075
1097
  const defaultItems = [
1076
- 'addButton', 'deleteButton', 'divider', 'refreshButton', 'divider',
1077
- 'columnsButton', 'layoutOptions', 'exportDropdown', 'divider', 'actionsDropdown',
1098
+ 'addButton', 'deleteButton', 'divider', 'refreshButton', 'optionsDivider',
1099
+ 'columnsButton', 'layoutOptions', 'exportDropdown', 'actionsDivider', 'actionsDropdown',
1078
1100
  'saveButton', 'cancelButton', 'divider', 'gridSearch', 'filterButton',
1079
1101
  ];
1080
1102
  defaultItems.forEach((itemName, index) => {
@@ -1111,7 +1133,8 @@ class GridBase {
1111
1133
  component: 'ZdTag',
1112
1134
  tag: 'div',
1113
1135
  cssStyle: 'display: flex; align-items: center',
1114
- isVisible: `{{GridController_${this.grid.componentId}.showToolbar}}`,
1136
+ cssClass: `{{GridController_${this.grid.componentId}.toolbarVisible}}`,
1137
+ isVisible: true,
1115
1138
  children: toolbarDivChildren,
1116
1139
  });
1117
1140
  return toolbarItems;
@@ -1122,8 +1145,18 @@ class GridBase {
1122
1145
  hideButtonClick({ event }) {
1123
1146
  if (!event.defaultPrevented) {
1124
1147
  const instance = Metadata.getInstance(`${this.grid.name}_toolbarDiv`);
1148
+ const icon = Metadata.getInstance(`${this.grid.name}_hideButton`);
1149
+ const tooltip = Metadata.getInstance(`${this.grid.name}_hideTooltip`);
1125
1150
  if (instance) {
1126
- instance.isVisible = !instance.isVisible;
1151
+ instance.cssClass = instance.cssClass === 'toolbar-visible'
1152
+ ? ''
1153
+ : 'toolbar-visible';
1154
+ icon.cssClass = icon.cssClass === 'is-rotated'
1155
+ ? ''
1156
+ : 'is-rotated';
1157
+ tooltip.label = tooltip.label === 'TEKGRID_HIDE'
1158
+ ? 'TEKGRID_SHOW'
1159
+ : 'TEKGRID_HIDE';
1127
1160
  }
1128
1161
  }
1129
1162
  }
@@ -1254,6 +1287,7 @@ Messages.add({
1254
1287
  TEKGRID_DELETE: 'Excluir',
1255
1288
  TEKGRID_REFRESH: 'Atualizar',
1256
1289
  TEKGRID_COLUMNS: 'Colunas',
1290
+ TEKGRID_ACTIONS: 'Ações',
1257
1291
  TEKGRID_SAVE: 'Salvar',
1258
1292
  TEKGRID_CANCEL: 'Cancelar',
1259
1293
  TEKGRID_APPLY: 'Aplicar',
@@ -1326,6 +1360,7 @@ Messages.add({
1326
1360
  TEKGRID_DELETE: 'Delete',
1327
1361
  TEKGRID_REFRESH: 'Refresh',
1328
1362
  TEKGRID_COLUMNS: 'Columns',
1363
+ TEKGRID_ACTIONS: 'Actions',
1329
1364
  TEKGRID_SAVE: 'Save',
1330
1365
  TEKGRID_CANCEL: 'Cancel',
1331
1366
  TEKGRID_APPLY: 'Apply',
@@ -1398,6 +1433,7 @@ Messages.add({
1398
1433
  TEKGRID_DELETE: 'Eliminar',
1399
1434
  TEKGRID_REFRESH: 'Actualizar',
1400
1435
  TEKGRID_COLUMNS: 'Colunas',
1436
+ TEKGRID_ACTIONS: 'Acciónes',
1401
1437
  TEKGRID_SAVE: 'Guardar',
1402
1438
  TEKGRID_CANCEL: 'Cancelar',
1403
1439
  TEKGRID_APPLY: 'Aplicar',
@@ -1461,56 +1497,51 @@ class GridController {
1461
1497
  return this.grid.title;
1462
1498
  }
1463
1499
  get showAddButton() {
1464
- return this.grid.addButton && !this.isEditing && this.openToolbar;
1500
+ return this.grid.addButton && !this.isEditing;
1465
1501
  }
1466
1502
  get showDeleteButton() {
1467
- return this.grid.deleteButton !== 'none' && !this.isEditing && this.openToolbar;
1503
+ return this.grid.deleteButton !== 'none' && !this.isEditing;
1468
1504
  }
1469
1505
  get showFilterButton() {
1470
- return this.grid.filterButton && this.openToolbar;
1506
+ return this.grid.filterButton;
1471
1507
  }
1472
1508
  get showModalFilterProps() {
1473
1509
  return this.grid.modalFilterProps;
1474
1510
  }
1475
1511
  get showSearchInput() {
1476
- return this.grid.showSearch && this.openToolbar;
1477
- }
1478
- get showToolbar() {
1479
- return this.openToolbar;
1480
- }
1481
- set showToolbar(value) {
1482
- this.openToolbar = value;
1483
- }
1484
- get toolbarStyle() {
1485
- return !this.openToolbar ? 'is-rotated' : '';
1486
- }
1487
- get tooltipName() {
1488
- return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
1512
+ return this.grid.showSearch;
1489
1513
  }
1490
1514
  get showReloadButton() {
1491
- return this.grid.showReload && !this.isEditing && this.openToolbar;
1515
+ return this.grid.showReload && !this.isEditing;
1492
1516
  }
1493
1517
  get showColumnsButton() {
1494
- return this.grid.columnsButton && !this.isEditing && this.openToolbar;
1518
+ return this.grid.columnsButton && !this.isEditing;
1495
1519
  }
1496
1520
  get columnsButtonIgnore() {
1497
1521
  return this.grid.columnsButtonIgnore;
1498
1522
  }
1499
1523
  get showLayoutOptionsButton() {
1500
- return this.grid.showLayoutOptions && !this.isEditing && this.openToolbar;
1524
+ return this.grid.showLayoutOptions && !this.isEditing;
1501
1525
  }
1502
1526
  get showDivider() {
1503
- return !this.isEditing && this.openToolbar;
1527
+ return !this.isEditing;
1528
+ }
1529
+ get showOptionsDivider() {
1530
+ return (this.grid.columnsButton || this.grid.showLayoutOptions || this.grid.showExport)
1531
+ && !this.isEditing;
1532
+ }
1533
+ get showHideButton() {
1534
+ return this.grid.showHideButton;
1504
1535
  }
1505
1536
  get showActionsButton() {
1506
- return this.grid.actions.length > 0 && !this.isEditing && this.openToolbar;
1537
+ return this.grid.actions.length > 0 && !this.isEditing;
1507
1538
  }
1508
1539
  get showExportButton() {
1509
- return this.grid.showExport && !this.isEditing && this.openToolbar;
1540
+ return this.grid.showExport && !this.isEditing;
1510
1541
  }
1511
1542
  get showActionAndExportButton() {
1512
1543
  return ((this.showLayoutOptionsButton || this.showColumnsButton)
1513
- && (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing && this.openToolbar;
1544
+ && (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing;
1514
1545
  }
1515
1546
  get isEditing() {
1516
1547
  return this.grid.editing;
@@ -2267,6 +2298,8 @@ class TekGrid extends GridEditable {
2267
2298
  this.mainGrid = true;
2268
2299
  /* Columns to be ignored on columns button */
2269
2300
  this.columnsButtonIgnore = [];
2301
+ /* Show Hide button */
2302
+ this.showHideButton = true;
2270
2303
  /**
2271
2304
  * Enables column dragging
2272
2305
  * @public
@@ -2383,6 +2416,7 @@ class TekGrid extends GridEditable {
2383
2416
  this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
2384
2417
  this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
2385
2418
  this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
2419
+ this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
2386
2420
  this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
2387
2421
  this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
2388
2422
  this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
@@ -2402,6 +2436,7 @@ class TekGrid extends GridEditable {
2402
2436
  this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
2403
2437
  this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
2404
2438
  this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
2439
+ this.reportLabelFormatter = this.getInitValue('reportLabelFormatter', props.reportLabelFormatter, this.reportLabelFormatter);
2405
2440
  this.actions = props.actions || this.actions;
2406
2441
  this.toolbarSlotProps = props.toolbarSlot !== undefined;
2407
2442
  if (this.deleteButton === 'selection') {
@@ -2587,7 +2622,7 @@ class TekGrid extends GridEditable {
2587
2622
  columns: reportAggregations,
2588
2623
  xlsDefaultType: this.xlsDefaultType,
2589
2624
  }),
2590
- }, beforeOpen);
2625
+ }, beforeOpen, this.reportLabelFormatter);
2591
2626
  window.open(reportUrl);
2592
2627
  }
2593
2628
  catch (e) {
@@ -3970,6 +4005,8 @@ class TekTreeGrid extends TreeGridEditable {
3970
4005
  };
3971
4006
  /* Show search Input */
3972
4007
  this.showSearch = true;
4008
+ /* Show Hide button */
4009
+ this.showHideButton = true;
3973
4010
  /* Show Column Filter button */
3974
4011
  this.columnFilterButton = false;
3975
4012
  /* Show Columns button */
@@ -4054,6 +4091,7 @@ class TekTreeGrid extends TreeGridEditable {
4054
4091
  this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
4055
4092
  this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
4056
4093
  this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
4094
+ this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
4057
4095
  this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
4058
4096
  this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
4059
4097
  this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
@@ -4320,6 +4358,7 @@ class TekUserInfo extends UserInfo {
4320
4358
  name: `${this.name}_about_modal`,
4321
4359
  cssClass: 'about-modal',
4322
4360
  grid: { cols: 8, sm: 4, lg: 5 },
4361
+ height: '60%',
4323
4362
  children: [
4324
4363
  {
4325
4364
  name: `${this.name}_about_header`,
@@ -4335,19 +4374,23 @@ class TekUserInfo extends UserInfo {
4335
4374
  modalName: `${this.name}_about_modal`,
4336
4375
  },
4337
4376
  ],
4338
- },
4339
- {
4340
- name: `${this.name}_about_row`,
4341
- component: 'ZdTag',
4342
- tag: 'div',
4343
- cssClass: 'zd-justify-center zd-px-6',
4344
- isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
4345
- children: [
4377
+ leftSlot: [
4346
4378
  {
4347
- name: `${this.name}_about_image`,
4348
- component: 'ZdImage',
4349
- width: '100%',
4350
- src: this.aboutImage,
4379
+ name: `${this.name}_about_row`,
4380
+ component: 'ZdTag',
4381
+ tag: 'div',
4382
+ cssStyle: 'width: 100%',
4383
+ cssClass: 'zd-justify-center zd-px-6',
4384
+ isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
4385
+ children: [
4386
+ {
4387
+ name: `${this.name}_about_image`,
4388
+ cssClass: 'zd-tekUserInfo-about-image',
4389
+ component: 'ZdImage',
4390
+ width: '100%',
4391
+ src: this.aboutImage,
4392
+ },
4393
+ ],
4351
4394
  },
4352
4395
  ],
4353
4396
  },
@@ -858,15 +858,15 @@
858
858
  hideButton: () => ({
859
859
  name: `${this.grid.name}_hideTooltip`,
860
860
  component: 'ZdTooltip',
861
- label: `{{GridController_${this.grid.componentId}.tooltipName}}`,
861
+ label: 'TEKGRID_HIDE',
862
862
  bottom: true,
863
863
  children: [
864
864
  {
865
865
  name: `${this.grid.name}_hideButton`,
866
866
  component: 'ZdIcon',
867
867
  iconName: 'mdi-chevron-right',
868
- isVisible: true,
869
- cssClass: `{{GridController_${this.grid.componentId}.toolbarStyle}}`,
868
+ isVisible: `{{GridController_${this.grid.componentId}.showHideButton}}`,
869
+ cssClass: '',
870
870
  events: {
871
871
  click: this.hideButtonClick.bind(this),
872
872
  },
@@ -935,6 +935,13 @@
935
935
  },
936
936
  ],
937
937
  }),
938
+ optionsDivider: (index) => ({
939
+ name: `${this.grid.name}_options_divider${index}`,
940
+ component: 'ZdDivider',
941
+ cssClass: 'toolbar-divider',
942
+ vertical: true,
943
+ isVisible: `{{GridController_${this.grid.componentId}.showOptionsDivider}}`,
944
+ }),
938
945
  columnsButton: () => ({
939
946
  name: `${this.grid.name}_columns_button_tooltip`,
940
947
  component: 'ZdTooltip',
@@ -970,19 +977,34 @@
970
977
  },
971
978
  children: this.grid.exportActions || this.exportConfigButtons,
972
979
  }),
980
+ actionsDivider: (index) => ({
981
+ name: `${this.grid.name}_actions_divider${index}`,
982
+ component: 'ZdDivider',
983
+ cssClass: 'toolbar-divider',
984
+ vertical: true,
985
+ isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
986
+ }),
973
987
  actionsDropdown: () => ({
974
- name: `${this.grid.name}_actions_dropdown`,
975
- component: 'ZdDropdown',
976
- cssClass: 'tekgrid-actions-dropdown',
977
- offsetY: true,
978
- activator: {
979
- name: `${this.grid.name}_actionsButton`,
980
- component: 'ZdButton',
981
- icon: true,
982
- iconName: 'more',
983
- isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
984
- },
985
- children: this.grid.actions,
988
+ name: `${this.grid.name}_actions_tooltip`,
989
+ component: 'ZdTooltip',
990
+ label: 'TEKGRID_ACTIONS',
991
+ bottom: true,
992
+ children: [
993
+ {
994
+ name: `${this.grid.name}_actions_dropdown`,
995
+ component: 'ZdDropdown',
996
+ cssClass: 'tekgrid-actions-dropdown',
997
+ offsetY: true,
998
+ activator: {
999
+ name: `${this.grid.name}_actionsButton`,
1000
+ component: 'ZdButton',
1001
+ icon: true,
1002
+ iconName: 'more',
1003
+ isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
1004
+ },
1005
+ children: this.grid.actions,
1006
+ },
1007
+ ],
986
1008
  }),
987
1009
  saveButton: () => ({
988
1010
  name: `${this.grid.name}_saveButton`,
@@ -1077,8 +1099,8 @@
1077
1099
  */
1078
1100
  addDefaultToolbarItems(toolbarDivChildren) {
1079
1101
  const defaultItems = [
1080
- 'addButton', 'deleteButton', 'divider', 'refreshButton', 'divider',
1081
- 'columnsButton', 'layoutOptions', 'exportDropdown', 'divider', 'actionsDropdown',
1102
+ 'addButton', 'deleteButton', 'divider', 'refreshButton', 'optionsDivider',
1103
+ 'columnsButton', 'layoutOptions', 'exportDropdown', 'actionsDivider', 'actionsDropdown',
1082
1104
  'saveButton', 'cancelButton', 'divider', 'gridSearch', 'filterButton',
1083
1105
  ];
1084
1106
  defaultItems.forEach((itemName, index) => {
@@ -1115,7 +1137,8 @@
1115
1137
  component: 'ZdTag',
1116
1138
  tag: 'div',
1117
1139
  cssStyle: 'display: flex; align-items: center',
1118
- isVisible: `{{GridController_${this.grid.componentId}.showToolbar}}`,
1140
+ cssClass: `{{GridController_${this.grid.componentId}.toolbarVisible}}`,
1141
+ isVisible: true,
1119
1142
  children: toolbarDivChildren,
1120
1143
  });
1121
1144
  return toolbarItems;
@@ -1126,8 +1149,18 @@
1126
1149
  hideButtonClick({ event }) {
1127
1150
  if (!event.defaultPrevented) {
1128
1151
  const instance = core.Metadata.getInstance(`${this.grid.name}_toolbarDiv`);
1152
+ const icon = core.Metadata.getInstance(`${this.grid.name}_hideButton`);
1153
+ const tooltip = core.Metadata.getInstance(`${this.grid.name}_hideTooltip`);
1129
1154
  if (instance) {
1130
- instance.isVisible = !instance.isVisible;
1155
+ instance.cssClass = instance.cssClass === 'toolbar-visible'
1156
+ ? ''
1157
+ : 'toolbar-visible';
1158
+ icon.cssClass = icon.cssClass === 'is-rotated'
1159
+ ? ''
1160
+ : 'is-rotated';
1161
+ tooltip.label = tooltip.label === 'TEKGRID_HIDE'
1162
+ ? 'TEKGRID_SHOW'
1163
+ : 'TEKGRID_HIDE';
1131
1164
  }
1132
1165
  }
1133
1166
  }
@@ -1258,6 +1291,7 @@
1258
1291
  TEKGRID_DELETE: 'Excluir',
1259
1292
  TEKGRID_REFRESH: 'Atualizar',
1260
1293
  TEKGRID_COLUMNS: 'Colunas',
1294
+ TEKGRID_ACTIONS: 'Ações',
1261
1295
  TEKGRID_SAVE: 'Salvar',
1262
1296
  TEKGRID_CANCEL: 'Cancelar',
1263
1297
  TEKGRID_APPLY: 'Aplicar',
@@ -1330,6 +1364,7 @@
1330
1364
  TEKGRID_DELETE: 'Delete',
1331
1365
  TEKGRID_REFRESH: 'Refresh',
1332
1366
  TEKGRID_COLUMNS: 'Columns',
1367
+ TEKGRID_ACTIONS: 'Actions',
1333
1368
  TEKGRID_SAVE: 'Save',
1334
1369
  TEKGRID_CANCEL: 'Cancel',
1335
1370
  TEKGRID_APPLY: 'Apply',
@@ -1402,6 +1437,7 @@
1402
1437
  TEKGRID_DELETE: 'Eliminar',
1403
1438
  TEKGRID_REFRESH: 'Actualizar',
1404
1439
  TEKGRID_COLUMNS: 'Colunas',
1440
+ TEKGRID_ACTIONS: 'Acciónes',
1405
1441
  TEKGRID_SAVE: 'Guardar',
1406
1442
  TEKGRID_CANCEL: 'Cancelar',
1407
1443
  TEKGRID_APPLY: 'Aplicar',
@@ -1465,56 +1501,51 @@
1465
1501
  return this.grid.title;
1466
1502
  }
1467
1503
  get showAddButton() {
1468
- return this.grid.addButton && !this.isEditing && this.openToolbar;
1504
+ return this.grid.addButton && !this.isEditing;
1469
1505
  }
1470
1506
  get showDeleteButton() {
1471
- return this.grid.deleteButton !== 'none' && !this.isEditing && this.openToolbar;
1507
+ return this.grid.deleteButton !== 'none' && !this.isEditing;
1472
1508
  }
1473
1509
  get showFilterButton() {
1474
- return this.grid.filterButton && this.openToolbar;
1510
+ return this.grid.filterButton;
1475
1511
  }
1476
1512
  get showModalFilterProps() {
1477
1513
  return this.grid.modalFilterProps;
1478
1514
  }
1479
1515
  get showSearchInput() {
1480
- return this.grid.showSearch && this.openToolbar;
1481
- }
1482
- get showToolbar() {
1483
- return this.openToolbar;
1484
- }
1485
- set showToolbar(value) {
1486
- this.openToolbar = value;
1487
- }
1488
- get toolbarStyle() {
1489
- return !this.openToolbar ? 'is-rotated' : '';
1490
- }
1491
- get tooltipName() {
1492
- return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
1516
+ return this.grid.showSearch;
1493
1517
  }
1494
1518
  get showReloadButton() {
1495
- return this.grid.showReload && !this.isEditing && this.openToolbar;
1519
+ return this.grid.showReload && !this.isEditing;
1496
1520
  }
1497
1521
  get showColumnsButton() {
1498
- return this.grid.columnsButton && !this.isEditing && this.openToolbar;
1522
+ return this.grid.columnsButton && !this.isEditing;
1499
1523
  }
1500
1524
  get columnsButtonIgnore() {
1501
1525
  return this.grid.columnsButtonIgnore;
1502
1526
  }
1503
1527
  get showLayoutOptionsButton() {
1504
- return this.grid.showLayoutOptions && !this.isEditing && this.openToolbar;
1528
+ return this.grid.showLayoutOptions && !this.isEditing;
1505
1529
  }
1506
1530
  get showDivider() {
1507
- return !this.isEditing && this.openToolbar;
1531
+ return !this.isEditing;
1532
+ }
1533
+ get showOptionsDivider() {
1534
+ return (this.grid.columnsButton || this.grid.showLayoutOptions || this.grid.showExport)
1535
+ && !this.isEditing;
1536
+ }
1537
+ get showHideButton() {
1538
+ return this.grid.showHideButton;
1508
1539
  }
1509
1540
  get showActionsButton() {
1510
- return this.grid.actions.length > 0 && !this.isEditing && this.openToolbar;
1541
+ return this.grid.actions.length > 0 && !this.isEditing;
1511
1542
  }
1512
1543
  get showExportButton() {
1513
- return this.grid.showExport && !this.isEditing && this.openToolbar;
1544
+ return this.grid.showExport && !this.isEditing;
1514
1545
  }
1515
1546
  get showActionAndExportButton() {
1516
1547
  return ((this.showLayoutOptionsButton || this.showColumnsButton)
1517
- && (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing && this.openToolbar;
1548
+ && (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing;
1518
1549
  }
1519
1550
  get isEditing() {
1520
1551
  return this.grid.editing;
@@ -2271,6 +2302,8 @@
2271
2302
  this.mainGrid = true;
2272
2303
  /* Columns to be ignored on columns button */
2273
2304
  this.columnsButtonIgnore = [];
2305
+ /* Show Hide button */
2306
+ this.showHideButton = true;
2274
2307
  /**
2275
2308
  * Enables column dragging
2276
2309
  * @public
@@ -2387,6 +2420,7 @@
2387
2420
  this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
2388
2421
  this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
2389
2422
  this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
2423
+ this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
2390
2424
  this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
2391
2425
  this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
2392
2426
  this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
@@ -2406,6 +2440,7 @@
2406
2440
  this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
2407
2441
  this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
2408
2442
  this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
2443
+ this.reportLabelFormatter = this.getInitValue('reportLabelFormatter', props.reportLabelFormatter, this.reportLabelFormatter);
2409
2444
  this.actions = props.actions || this.actions;
2410
2445
  this.toolbarSlotProps = props.toolbarSlot !== undefined;
2411
2446
  if (this.deleteButton === 'selection') {
@@ -2591,7 +2626,7 @@
2591
2626
  columns: reportAggregations,
2592
2627
  xlsDefaultType: this.xlsDefaultType,
2593
2628
  }),
2594
- }, beforeOpen);
2629
+ }, beforeOpen, this.reportLabelFormatter);
2595
2630
  window.open(reportUrl);
2596
2631
  }
2597
2632
  catch (e) {
@@ -3974,6 +4009,8 @@
3974
4009
  };
3975
4010
  /* Show search Input */
3976
4011
  this.showSearch = true;
4012
+ /* Show Hide button */
4013
+ this.showHideButton = true;
3977
4014
  /* Show Column Filter button */
3978
4015
  this.columnFilterButton = false;
3979
4016
  /* Show Columns button */
@@ -4058,6 +4095,7 @@
4058
4095
  this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
4059
4096
  this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
4060
4097
  this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
4098
+ this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
4061
4099
  this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
4062
4100
  this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
4063
4101
  this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
@@ -4324,6 +4362,7 @@
4324
4362
  name: `${this.name}_about_modal`,
4325
4363
  cssClass: 'about-modal',
4326
4364
  grid: { cols: 8, sm: 4, lg: 5 },
4365
+ height: '60%',
4327
4366
  children: [
4328
4367
  {
4329
4368
  name: `${this.name}_about_header`,
@@ -4339,19 +4378,23 @@
4339
4378
  modalName: `${this.name}_about_modal`,
4340
4379
  },
4341
4380
  ],
4342
- },
4343
- {
4344
- name: `${this.name}_about_row`,
4345
- component: 'ZdTag',
4346
- tag: 'div',
4347
- cssClass: 'zd-justify-center zd-px-6',
4348
- isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
4349
- children: [
4381
+ leftSlot: [
4350
4382
  {
4351
- name: `${this.name}_about_image`,
4352
- component: 'ZdImage',
4353
- width: '100%',
4354
- src: this.aboutImage,
4383
+ name: `${this.name}_about_row`,
4384
+ component: 'ZdTag',
4385
+ tag: 'div',
4386
+ cssStyle: 'width: 100%',
4387
+ cssClass: 'zd-justify-center zd-px-6',
4388
+ isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
4389
+ children: [
4390
+ {
4391
+ name: `${this.name}_about_image`,
4392
+ cssClass: 'zd-tekUserInfo-about-image',
4393
+ component: 'ZdImage',
4394
+ width: '100%',
4395
+ src: this.aboutImage,
4396
+ },
4397
+ ],
4355
4398
  },
4356
4399
  ],
4357
4400
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/teknisa-components-common",
3
- "version": "1.109.1",
3
+ "version": "1.111.0",
4
4
  "description": "Teknisa Components Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -32,5 +32,5 @@
32
32
  "peerDependencies": {
33
33
  "@zeedhi/core": "^1.97.0"
34
34
  },
35
- "gitHead": "d40cf324961b699346b610c975eaedc46f1a154a"
35
+ "gitHead": "55a6a69ca54e1ee419bdf4608e021222eaf45e51"
36
36
  }