@zeedhi/teknisa-components-common 1.110.0 → 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.
- package/coverage/clover.xml +790 -783
- package/coverage/coverage-final.json +47 -47
- package/coverage/lcov-report/index.html +13 -13
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +7 -7
- package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
- package/coverage/lcov.info +1314 -1317
- package/dist/tek-components-common.esm.js +89 -54
- package/dist/tek-components-common.umd.js +89 -54
- package/package.json +2 -2
- package/tests/unit/components/tek-grid/grid.spec.ts +39 -31
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +12 -8
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +51 -9
- package/types/components/tek-grid/grid.d.ts +1 -0
- package/types/components/tek-grid/interfaces.d.ts +1 -0
- package/types/components/tek-tree-grid/interfaces.d.ts +1 -0
- package/types/components/tek-tree-grid/tree-grid.d.ts +1 -0
- package/types/utils/grid-base/grid-controller.d.ts +2 -4
- package/types/components/tek-ag-grid/default-icons.d.ts +0 -53
- package/types/components/tek-ag-grid/interfaces.d.ts +0 -9
- package/types/components/tek-ag-grid/tek-ag-grid.d.ts +0 -35
- package/types/components/tek-datasource/datasource.d.ts +0 -94
- package/types/components/tek-grid/default-icons.d.ts +0 -53
- package/types/components/tek-grid/filter-dynamic-values.d.ts +0 -9
- package/types/components/tek-grid/grid-controller.d.ts +0 -19
- package/types/components/tek-grid/grid_column.d.ts +0 -14
- package/types/components/tek-grid/grid_controller.d.ts +0 -15
- package/types/components/tek-grid/tek-grid.d.ts +0 -35
- package/types/components/tek-login/interfaces.d.ts +0 -3
- package/types/components/tek-login/login-children.d.ts +0 -3
- package/types/components/tek-login/login.d.ts +0 -58
- 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:
|
|
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:
|
|
865
|
-
cssClass:
|
|
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',
|
|
@@ -967,25 +974,33 @@ class GridBase {
|
|
|
967
974
|
children: this.grid.exportActions || this.exportConfigButtons,
|
|
968
975
|
}),
|
|
969
976
|
actionsDivider: (index) => ({
|
|
970
|
-
name: `${this.grid.name}
|
|
977
|
+
name: `${this.grid.name}_actions_divider${index}`,
|
|
971
978
|
component: 'ZdDivider',
|
|
972
979
|
cssClass: 'toolbar-divider',
|
|
973
980
|
vertical: true,
|
|
974
981
|
isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
|
|
975
982
|
}),
|
|
976
983
|
actionsDropdown: () => ({
|
|
977
|
-
name: `${this.grid.name}
|
|
978
|
-
component: '
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
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
|
+
],
|
|
989
1004
|
}),
|
|
990
1005
|
saveButton: () => ({
|
|
991
1006
|
name: `${this.grid.name}_saveButton`,
|
|
@@ -1080,7 +1095,7 @@ class GridBase {
|
|
|
1080
1095
|
*/
|
|
1081
1096
|
addDefaultToolbarItems(toolbarDivChildren) {
|
|
1082
1097
|
const defaultItems = [
|
|
1083
|
-
'addButton', 'deleteButton', 'divider', 'refreshButton', '
|
|
1098
|
+
'addButton', 'deleteButton', 'divider', 'refreshButton', 'optionsDivider',
|
|
1084
1099
|
'columnsButton', 'layoutOptions', 'exportDropdown', 'actionsDivider', 'actionsDropdown',
|
|
1085
1100
|
'saveButton', 'cancelButton', 'divider', 'gridSearch', 'filterButton',
|
|
1086
1101
|
];
|
|
@@ -1118,7 +1133,8 @@ class GridBase {
|
|
|
1118
1133
|
component: 'ZdTag',
|
|
1119
1134
|
tag: 'div',
|
|
1120
1135
|
cssStyle: 'display: flex; align-items: center',
|
|
1121
|
-
|
|
1136
|
+
cssClass: `{{GridController_${this.grid.componentId}.toolbarVisible}}`,
|
|
1137
|
+
isVisible: true,
|
|
1122
1138
|
children: toolbarDivChildren,
|
|
1123
1139
|
});
|
|
1124
1140
|
return toolbarItems;
|
|
@@ -1129,8 +1145,18 @@ class GridBase {
|
|
|
1129
1145
|
hideButtonClick({ event }) {
|
|
1130
1146
|
if (!event.defaultPrevented) {
|
|
1131
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`);
|
|
1132
1150
|
if (instance) {
|
|
1133
|
-
instance.
|
|
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';
|
|
1134
1160
|
}
|
|
1135
1161
|
}
|
|
1136
1162
|
}
|
|
@@ -1261,6 +1287,7 @@ Messages.add({
|
|
|
1261
1287
|
TEKGRID_DELETE: 'Excluir',
|
|
1262
1288
|
TEKGRID_REFRESH: 'Atualizar',
|
|
1263
1289
|
TEKGRID_COLUMNS: 'Colunas',
|
|
1290
|
+
TEKGRID_ACTIONS: 'Ações',
|
|
1264
1291
|
TEKGRID_SAVE: 'Salvar',
|
|
1265
1292
|
TEKGRID_CANCEL: 'Cancelar',
|
|
1266
1293
|
TEKGRID_APPLY: 'Aplicar',
|
|
@@ -1333,6 +1360,7 @@ Messages.add({
|
|
|
1333
1360
|
TEKGRID_DELETE: 'Delete',
|
|
1334
1361
|
TEKGRID_REFRESH: 'Refresh',
|
|
1335
1362
|
TEKGRID_COLUMNS: 'Columns',
|
|
1363
|
+
TEKGRID_ACTIONS: 'Actions',
|
|
1336
1364
|
TEKGRID_SAVE: 'Save',
|
|
1337
1365
|
TEKGRID_CANCEL: 'Cancel',
|
|
1338
1366
|
TEKGRID_APPLY: 'Apply',
|
|
@@ -1405,6 +1433,7 @@ Messages.add({
|
|
|
1405
1433
|
TEKGRID_DELETE: 'Eliminar',
|
|
1406
1434
|
TEKGRID_REFRESH: 'Actualizar',
|
|
1407
1435
|
TEKGRID_COLUMNS: 'Colunas',
|
|
1436
|
+
TEKGRID_ACTIONS: 'Acciónes',
|
|
1408
1437
|
TEKGRID_SAVE: 'Guardar',
|
|
1409
1438
|
TEKGRID_CANCEL: 'Cancelar',
|
|
1410
1439
|
TEKGRID_APPLY: 'Aplicar',
|
|
@@ -1468,56 +1497,51 @@ class GridController {
|
|
|
1468
1497
|
return this.grid.title;
|
|
1469
1498
|
}
|
|
1470
1499
|
get showAddButton() {
|
|
1471
|
-
return this.grid.addButton && !this.isEditing
|
|
1500
|
+
return this.grid.addButton && !this.isEditing;
|
|
1472
1501
|
}
|
|
1473
1502
|
get showDeleteButton() {
|
|
1474
|
-
return this.grid.deleteButton !== 'none' && !this.isEditing
|
|
1503
|
+
return this.grid.deleteButton !== 'none' && !this.isEditing;
|
|
1475
1504
|
}
|
|
1476
1505
|
get showFilterButton() {
|
|
1477
|
-
return this.grid.filterButton
|
|
1506
|
+
return this.grid.filterButton;
|
|
1478
1507
|
}
|
|
1479
1508
|
get showModalFilterProps() {
|
|
1480
1509
|
return this.grid.modalFilterProps;
|
|
1481
1510
|
}
|
|
1482
1511
|
get showSearchInput() {
|
|
1483
|
-
return this.grid.showSearch
|
|
1484
|
-
}
|
|
1485
|
-
get showToolbar() {
|
|
1486
|
-
return this.openToolbar;
|
|
1487
|
-
}
|
|
1488
|
-
set showToolbar(value) {
|
|
1489
|
-
this.openToolbar = value;
|
|
1490
|
-
}
|
|
1491
|
-
get toolbarStyle() {
|
|
1492
|
-
return !this.openToolbar ? 'is-rotated' : '';
|
|
1493
|
-
}
|
|
1494
|
-
get tooltipName() {
|
|
1495
|
-
return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
|
|
1512
|
+
return this.grid.showSearch;
|
|
1496
1513
|
}
|
|
1497
1514
|
get showReloadButton() {
|
|
1498
|
-
return this.grid.showReload && !this.isEditing
|
|
1515
|
+
return this.grid.showReload && !this.isEditing;
|
|
1499
1516
|
}
|
|
1500
1517
|
get showColumnsButton() {
|
|
1501
|
-
return this.grid.columnsButton && !this.isEditing
|
|
1518
|
+
return this.grid.columnsButton && !this.isEditing;
|
|
1502
1519
|
}
|
|
1503
1520
|
get columnsButtonIgnore() {
|
|
1504
1521
|
return this.grid.columnsButtonIgnore;
|
|
1505
1522
|
}
|
|
1506
1523
|
get showLayoutOptionsButton() {
|
|
1507
|
-
return this.grid.showLayoutOptions && !this.isEditing
|
|
1524
|
+
return this.grid.showLayoutOptions && !this.isEditing;
|
|
1508
1525
|
}
|
|
1509
1526
|
get showDivider() {
|
|
1510
|
-
return !this.isEditing
|
|
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;
|
|
1511
1535
|
}
|
|
1512
1536
|
get showActionsButton() {
|
|
1513
|
-
return this.grid.actions.length > 0 && !this.isEditing
|
|
1537
|
+
return this.grid.actions.length > 0 && !this.isEditing;
|
|
1514
1538
|
}
|
|
1515
1539
|
get showExportButton() {
|
|
1516
|
-
return this.grid.showExport && !this.isEditing
|
|
1540
|
+
return this.grid.showExport && !this.isEditing;
|
|
1517
1541
|
}
|
|
1518
1542
|
get showActionAndExportButton() {
|
|
1519
1543
|
return ((this.showLayoutOptionsButton || this.showColumnsButton)
|
|
1520
|
-
&& (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing
|
|
1544
|
+
&& (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing;
|
|
1521
1545
|
}
|
|
1522
1546
|
get isEditing() {
|
|
1523
1547
|
return this.grid.editing;
|
|
@@ -2274,6 +2298,8 @@ class TekGrid extends GridEditable {
|
|
|
2274
2298
|
this.mainGrid = true;
|
|
2275
2299
|
/* Columns to be ignored on columns button */
|
|
2276
2300
|
this.columnsButtonIgnore = [];
|
|
2301
|
+
/* Show Hide button */
|
|
2302
|
+
this.showHideButton = true;
|
|
2277
2303
|
/**
|
|
2278
2304
|
* Enables column dragging
|
|
2279
2305
|
* @public
|
|
@@ -2390,6 +2416,7 @@ class TekGrid extends GridEditable {
|
|
|
2390
2416
|
this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
|
|
2391
2417
|
this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
|
|
2392
2418
|
this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
|
|
2419
|
+
this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
|
|
2393
2420
|
this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
|
|
2394
2421
|
this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
|
|
2395
2422
|
this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
|
|
@@ -3978,6 +4005,8 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3978
4005
|
};
|
|
3979
4006
|
/* Show search Input */
|
|
3980
4007
|
this.showSearch = true;
|
|
4008
|
+
/* Show Hide button */
|
|
4009
|
+
this.showHideButton = true;
|
|
3981
4010
|
/* Show Column Filter button */
|
|
3982
4011
|
this.columnFilterButton = false;
|
|
3983
4012
|
/* Show Columns button */
|
|
@@ -4062,6 +4091,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
4062
4091
|
this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
|
|
4063
4092
|
this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
|
|
4064
4093
|
this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
|
|
4094
|
+
this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
|
|
4065
4095
|
this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
|
|
4066
4096
|
this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
|
|
4067
4097
|
this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
|
|
@@ -4328,6 +4358,7 @@ class TekUserInfo extends UserInfo {
|
|
|
4328
4358
|
name: `${this.name}_about_modal`,
|
|
4329
4359
|
cssClass: 'about-modal',
|
|
4330
4360
|
grid: { cols: 8, sm: 4, lg: 5 },
|
|
4361
|
+
height: '60%',
|
|
4331
4362
|
children: [
|
|
4332
4363
|
{
|
|
4333
4364
|
name: `${this.name}_about_header`,
|
|
@@ -4343,19 +4374,23 @@ class TekUserInfo extends UserInfo {
|
|
|
4343
4374
|
modalName: `${this.name}_about_modal`,
|
|
4344
4375
|
},
|
|
4345
4376
|
],
|
|
4346
|
-
|
|
4347
|
-
{
|
|
4348
|
-
name: `${this.name}_about_row`,
|
|
4349
|
-
component: 'ZdTag',
|
|
4350
|
-
tag: 'div',
|
|
4351
|
-
cssClass: 'zd-justify-center zd-px-6',
|
|
4352
|
-
isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
|
|
4353
|
-
children: [
|
|
4377
|
+
leftSlot: [
|
|
4354
4378
|
{
|
|
4355
|
-
name: `${this.name}
|
|
4356
|
-
component: '
|
|
4357
|
-
|
|
4358
|
-
|
|
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
|
+
],
|
|
4359
4394
|
},
|
|
4360
4395
|
],
|
|
4361
4396
|
},
|
|
@@ -858,15 +858,15 @@
|
|
|
858
858
|
hideButton: () => ({
|
|
859
859
|
name: `${this.grid.name}_hideTooltip`,
|
|
860
860
|
component: 'ZdTooltip',
|
|
861
|
-
label:
|
|
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:
|
|
869
|
-
cssClass:
|
|
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',
|
|
@@ -971,25 +978,33 @@
|
|
|
971
978
|
children: this.grid.exportActions || this.exportConfigButtons,
|
|
972
979
|
}),
|
|
973
980
|
actionsDivider: (index) => ({
|
|
974
|
-
name: `${this.grid.name}
|
|
981
|
+
name: `${this.grid.name}_actions_divider${index}`,
|
|
975
982
|
component: 'ZdDivider',
|
|
976
983
|
cssClass: 'toolbar-divider',
|
|
977
984
|
vertical: true,
|
|
978
985
|
isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
|
|
979
986
|
}),
|
|
980
987
|
actionsDropdown: () => ({
|
|
981
|
-
name: `${this.grid.name}
|
|
982
|
-
component: '
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
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
|
+
],
|
|
993
1008
|
}),
|
|
994
1009
|
saveButton: () => ({
|
|
995
1010
|
name: `${this.grid.name}_saveButton`,
|
|
@@ -1084,7 +1099,7 @@
|
|
|
1084
1099
|
*/
|
|
1085
1100
|
addDefaultToolbarItems(toolbarDivChildren) {
|
|
1086
1101
|
const defaultItems = [
|
|
1087
|
-
'addButton', 'deleteButton', 'divider', 'refreshButton', '
|
|
1102
|
+
'addButton', 'deleteButton', 'divider', 'refreshButton', 'optionsDivider',
|
|
1088
1103
|
'columnsButton', 'layoutOptions', 'exportDropdown', 'actionsDivider', 'actionsDropdown',
|
|
1089
1104
|
'saveButton', 'cancelButton', 'divider', 'gridSearch', 'filterButton',
|
|
1090
1105
|
];
|
|
@@ -1122,7 +1137,8 @@
|
|
|
1122
1137
|
component: 'ZdTag',
|
|
1123
1138
|
tag: 'div',
|
|
1124
1139
|
cssStyle: 'display: flex; align-items: center',
|
|
1125
|
-
|
|
1140
|
+
cssClass: `{{GridController_${this.grid.componentId}.toolbarVisible}}`,
|
|
1141
|
+
isVisible: true,
|
|
1126
1142
|
children: toolbarDivChildren,
|
|
1127
1143
|
});
|
|
1128
1144
|
return toolbarItems;
|
|
@@ -1133,8 +1149,18 @@
|
|
|
1133
1149
|
hideButtonClick({ event }) {
|
|
1134
1150
|
if (!event.defaultPrevented) {
|
|
1135
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`);
|
|
1136
1154
|
if (instance) {
|
|
1137
|
-
instance.
|
|
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';
|
|
1138
1164
|
}
|
|
1139
1165
|
}
|
|
1140
1166
|
}
|
|
@@ -1265,6 +1291,7 @@
|
|
|
1265
1291
|
TEKGRID_DELETE: 'Excluir',
|
|
1266
1292
|
TEKGRID_REFRESH: 'Atualizar',
|
|
1267
1293
|
TEKGRID_COLUMNS: 'Colunas',
|
|
1294
|
+
TEKGRID_ACTIONS: 'Ações',
|
|
1268
1295
|
TEKGRID_SAVE: 'Salvar',
|
|
1269
1296
|
TEKGRID_CANCEL: 'Cancelar',
|
|
1270
1297
|
TEKGRID_APPLY: 'Aplicar',
|
|
@@ -1337,6 +1364,7 @@
|
|
|
1337
1364
|
TEKGRID_DELETE: 'Delete',
|
|
1338
1365
|
TEKGRID_REFRESH: 'Refresh',
|
|
1339
1366
|
TEKGRID_COLUMNS: 'Columns',
|
|
1367
|
+
TEKGRID_ACTIONS: 'Actions',
|
|
1340
1368
|
TEKGRID_SAVE: 'Save',
|
|
1341
1369
|
TEKGRID_CANCEL: 'Cancel',
|
|
1342
1370
|
TEKGRID_APPLY: 'Apply',
|
|
@@ -1409,6 +1437,7 @@
|
|
|
1409
1437
|
TEKGRID_DELETE: 'Eliminar',
|
|
1410
1438
|
TEKGRID_REFRESH: 'Actualizar',
|
|
1411
1439
|
TEKGRID_COLUMNS: 'Colunas',
|
|
1440
|
+
TEKGRID_ACTIONS: 'Acciónes',
|
|
1412
1441
|
TEKGRID_SAVE: 'Guardar',
|
|
1413
1442
|
TEKGRID_CANCEL: 'Cancelar',
|
|
1414
1443
|
TEKGRID_APPLY: 'Aplicar',
|
|
@@ -1472,56 +1501,51 @@
|
|
|
1472
1501
|
return this.grid.title;
|
|
1473
1502
|
}
|
|
1474
1503
|
get showAddButton() {
|
|
1475
|
-
return this.grid.addButton && !this.isEditing
|
|
1504
|
+
return this.grid.addButton && !this.isEditing;
|
|
1476
1505
|
}
|
|
1477
1506
|
get showDeleteButton() {
|
|
1478
|
-
return this.grid.deleteButton !== 'none' && !this.isEditing
|
|
1507
|
+
return this.grid.deleteButton !== 'none' && !this.isEditing;
|
|
1479
1508
|
}
|
|
1480
1509
|
get showFilterButton() {
|
|
1481
|
-
return this.grid.filterButton
|
|
1510
|
+
return this.grid.filterButton;
|
|
1482
1511
|
}
|
|
1483
1512
|
get showModalFilterProps() {
|
|
1484
1513
|
return this.grid.modalFilterProps;
|
|
1485
1514
|
}
|
|
1486
1515
|
get showSearchInput() {
|
|
1487
|
-
return this.grid.showSearch
|
|
1488
|
-
}
|
|
1489
|
-
get showToolbar() {
|
|
1490
|
-
return this.openToolbar;
|
|
1491
|
-
}
|
|
1492
|
-
set showToolbar(value) {
|
|
1493
|
-
this.openToolbar = value;
|
|
1494
|
-
}
|
|
1495
|
-
get toolbarStyle() {
|
|
1496
|
-
return !this.openToolbar ? 'is-rotated' : '';
|
|
1497
|
-
}
|
|
1498
|
-
get tooltipName() {
|
|
1499
|
-
return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
|
|
1516
|
+
return this.grid.showSearch;
|
|
1500
1517
|
}
|
|
1501
1518
|
get showReloadButton() {
|
|
1502
|
-
return this.grid.showReload && !this.isEditing
|
|
1519
|
+
return this.grid.showReload && !this.isEditing;
|
|
1503
1520
|
}
|
|
1504
1521
|
get showColumnsButton() {
|
|
1505
|
-
return this.grid.columnsButton && !this.isEditing
|
|
1522
|
+
return this.grid.columnsButton && !this.isEditing;
|
|
1506
1523
|
}
|
|
1507
1524
|
get columnsButtonIgnore() {
|
|
1508
1525
|
return this.grid.columnsButtonIgnore;
|
|
1509
1526
|
}
|
|
1510
1527
|
get showLayoutOptionsButton() {
|
|
1511
|
-
return this.grid.showLayoutOptions && !this.isEditing
|
|
1528
|
+
return this.grid.showLayoutOptions && !this.isEditing;
|
|
1512
1529
|
}
|
|
1513
1530
|
get showDivider() {
|
|
1514
|
-
return !this.isEditing
|
|
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;
|
|
1515
1539
|
}
|
|
1516
1540
|
get showActionsButton() {
|
|
1517
|
-
return this.grid.actions.length > 0 && !this.isEditing
|
|
1541
|
+
return this.grid.actions.length > 0 && !this.isEditing;
|
|
1518
1542
|
}
|
|
1519
1543
|
get showExportButton() {
|
|
1520
|
-
return this.grid.showExport && !this.isEditing
|
|
1544
|
+
return this.grid.showExport && !this.isEditing;
|
|
1521
1545
|
}
|
|
1522
1546
|
get showActionAndExportButton() {
|
|
1523
1547
|
return ((this.showLayoutOptionsButton || this.showColumnsButton)
|
|
1524
|
-
&& (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing
|
|
1548
|
+
&& (this.showActionsButton || this.showExportButton || this.showSearchInput)) && !this.isEditing;
|
|
1525
1549
|
}
|
|
1526
1550
|
get isEditing() {
|
|
1527
1551
|
return this.grid.editing;
|
|
@@ -2278,6 +2302,8 @@
|
|
|
2278
2302
|
this.mainGrid = true;
|
|
2279
2303
|
/* Columns to be ignored on columns button */
|
|
2280
2304
|
this.columnsButtonIgnore = [];
|
|
2305
|
+
/* Show Hide button */
|
|
2306
|
+
this.showHideButton = true;
|
|
2281
2307
|
/**
|
|
2282
2308
|
* Enables column dragging
|
|
2283
2309
|
* @public
|
|
@@ -2394,6 +2420,7 @@
|
|
|
2394
2420
|
this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
|
|
2395
2421
|
this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
|
|
2396
2422
|
this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
|
|
2423
|
+
this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
|
|
2397
2424
|
this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
|
|
2398
2425
|
this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
|
|
2399
2426
|
this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
|
|
@@ -3982,6 +4009,8 @@
|
|
|
3982
4009
|
};
|
|
3983
4010
|
/* Show search Input */
|
|
3984
4011
|
this.showSearch = true;
|
|
4012
|
+
/* Show Hide button */
|
|
4013
|
+
this.showHideButton = true;
|
|
3985
4014
|
/* Show Column Filter button */
|
|
3986
4015
|
this.columnFilterButton = false;
|
|
3987
4016
|
/* Show Columns button */
|
|
@@ -4066,6 +4095,7 @@
|
|
|
4066
4095
|
this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
|
|
4067
4096
|
this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
|
|
4068
4097
|
this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
|
|
4098
|
+
this.showHideButton = this.getInitValue('showHideButton', props.showHideButton, this.showHideButton);
|
|
4069
4099
|
this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
|
|
4070
4100
|
this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
|
|
4071
4101
|
this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
|
|
@@ -4332,6 +4362,7 @@
|
|
|
4332
4362
|
name: `${this.name}_about_modal`,
|
|
4333
4363
|
cssClass: 'about-modal',
|
|
4334
4364
|
grid: { cols: 8, sm: 4, lg: 5 },
|
|
4365
|
+
height: '60%',
|
|
4335
4366
|
children: [
|
|
4336
4367
|
{
|
|
4337
4368
|
name: `${this.name}_about_header`,
|
|
@@ -4347,19 +4378,23 @@
|
|
|
4347
4378
|
modalName: `${this.name}_about_modal`,
|
|
4348
4379
|
},
|
|
4349
4380
|
],
|
|
4350
|
-
|
|
4351
|
-
{
|
|
4352
|
-
name: `${this.name}_about_row`,
|
|
4353
|
-
component: 'ZdTag',
|
|
4354
|
-
tag: 'div',
|
|
4355
|
-
cssClass: 'zd-justify-center zd-px-6',
|
|
4356
|
-
isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
|
|
4357
|
-
children: [
|
|
4381
|
+
leftSlot: [
|
|
4358
4382
|
{
|
|
4359
|
-
name: `${this.name}
|
|
4360
|
-
component: '
|
|
4361
|
-
|
|
4362
|
-
|
|
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
|
+
],
|
|
4363
4398
|
},
|
|
4364
4399
|
],
|
|
4365
4400
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/teknisa-components-common",
|
|
3
|
-
"version": "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": "
|
|
35
|
+
"gitHead": "55a6a69ca54e1ee419bdf4608e021222eaf45e51"
|
|
36
36
|
}
|