@zeedhi/teknisa-components-common 1.101.0 → 1.102.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 +706 -687
- package/coverage/coverage-final.json +45 -45
- package/coverage/lcov-report/index.html +17 -17
- 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 +1213 -1175
- package/dist/tek-components-common.esm.js +236 -163
- package/dist/tek-components-common.umd.js +235 -161
- package/package.json +2 -2
- package/tests/unit/components/tek-grid/grid.spec.ts +197 -104
- package/tests/unit/components/tek-grid/layout_options.spec.ts +70 -0
- package/tests/unit/components/tree-grid/tree-grid.spec.ts +1 -1
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +8 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/tek-grid/grid.d.ts +1 -0
- package/types/components/tek-grid/interfaces.d.ts +1 -0
- package/types/components/tek-grid/layout-options.d.ts +2 -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-base.d.ts +166 -154
- package/types/utils/grid-base/grid-controller.d.ts +5 -0
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyMap, I18n, FormatterParserProvider, Messages,
|
|
1
|
+
import { KeyMap, I18n, FormatterParserProvider, Messages, Metadata, DatasourceFactory, MemoryDatasource, URL, Utils, RestDatasource, Config, Accessor, Loader, DateHelper, Http, Singleton, VersionService } from '@zeedhi/core';
|
|
2
2
|
import { Form, Button, Tooltip, GridEditable, Grid, ComponentRender, Iterable, Carousel, IterableComponentRender as IterableComponentRender$1, Loading as Loading$1, GridColumnEditable, Report, ColumnNotFoundError, IterableColumnsButtonController, IterableColumnsButton, ModalService, SelectMultiple, TreeGridEditable, List } from '@zeedhi/common';
|
|
3
3
|
import debounce from 'lodash.debounce';
|
|
4
4
|
import merge from 'lodash.merge';
|
|
@@ -808,6 +808,7 @@ class GridBase {
|
|
|
808
808
|
this.exportConfigButtons = [];
|
|
809
809
|
this.atoms = {
|
|
810
810
|
TITLE: '_gridTitle',
|
|
811
|
+
HIDE_BUTTON: '_hideButton',
|
|
811
812
|
ADD_BUTTON: '_addButton',
|
|
812
813
|
DELETE_BUTTON: '_deleteButton',
|
|
813
814
|
REFRESH_BUTTON: '_refreshButton',
|
|
@@ -849,194 +850,218 @@ class GridBase {
|
|
|
849
850
|
title: this.grid.title,
|
|
850
851
|
},
|
|
851
852
|
{
|
|
852
|
-
name: `${this.grid.name}
|
|
853
|
-
component: '
|
|
853
|
+
name: `${this.grid.name}_hideTooltip`,
|
|
854
|
+
component: 'ZdTooltip',
|
|
855
|
+
label: `{{GridController_${this.grid.componentId}.tooltipName}}`,
|
|
856
|
+
bottom: true,
|
|
857
|
+
children: [
|
|
858
|
+
{
|
|
859
|
+
name: `${this.grid.name}_hideButton`,
|
|
860
|
+
component: 'ZdIcon',
|
|
861
|
+
iconName: 'mdi-chevron-right',
|
|
862
|
+
isVisible: `{{GridController_${this.grid.componentId}.isNotEditing}}`,
|
|
863
|
+
cssClass: `{{GridController_${this.grid.componentId}.toolbarStyle}}`,
|
|
864
|
+
events: {
|
|
865
|
+
click: this.hideButtonClick.bind(this),
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
],
|
|
854
869
|
},
|
|
855
870
|
{
|
|
856
|
-
name: `${this.grid.name}
|
|
871
|
+
name: `${this.grid.name}_toolbarDiv`,
|
|
857
872
|
component: 'ZdTag',
|
|
858
|
-
tag: '
|
|
859
|
-
cssStyle: 'display: flex',
|
|
860
|
-
isVisible: `{{GridController_${this.grid.componentId}.
|
|
873
|
+
tag: 'div',
|
|
874
|
+
cssStyle: 'display: flex; align-items: center',
|
|
875
|
+
isVisible: `{{GridController_${this.grid.componentId}.showToolbar}}`,
|
|
861
876
|
children: [
|
|
862
877
|
{
|
|
863
|
-
name: `${this.grid.name}
|
|
864
|
-
component: '
|
|
865
|
-
|
|
866
|
-
|
|
878
|
+
name: `${this.grid.name}_notEditingSpan`,
|
|
879
|
+
component: 'ZdTag',
|
|
880
|
+
tag: 'span',
|
|
881
|
+
cssStyle: 'display: flex',
|
|
882
|
+
isVisible: `{{GridController_${this.grid.componentId}.isNotEditing}}`,
|
|
867
883
|
children: [
|
|
868
884
|
{
|
|
869
|
-
name: `${this.grid.name}
|
|
870
|
-
component: '
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
885
|
+
name: `${this.grid.name}_add_tooltip`,
|
|
886
|
+
component: 'ZdTooltip',
|
|
887
|
+
label: 'TEKGRID_ADD',
|
|
888
|
+
bottom: true,
|
|
889
|
+
children: [
|
|
890
|
+
{
|
|
891
|
+
name: `${this.grid.name}_addButton`,
|
|
892
|
+
component: 'ZdButton',
|
|
893
|
+
icon: true,
|
|
894
|
+
iconName: 'add',
|
|
895
|
+
isVisible: `{{GridController_${this.grid.componentId}.showAddButton}}`,
|
|
896
|
+
events: {
|
|
897
|
+
click: this.addButtonClick.bind(this),
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
],
|
|
877
901
|
},
|
|
878
|
-
],
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
name: `${this.grid.name}_delete_tooltip`,
|
|
882
|
-
component: 'ZdTooltip',
|
|
883
|
-
label: 'TEKGRID_DELETE',
|
|
884
|
-
bottom: true,
|
|
885
|
-
children: [
|
|
886
902
|
{
|
|
887
|
-
name: `${this.grid.name}
|
|
888
|
-
component: '
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
903
|
+
name: `${this.grid.name}_delete_tooltip`,
|
|
904
|
+
component: 'ZdTooltip',
|
|
905
|
+
label: 'TEKGRID_DELETE',
|
|
906
|
+
bottom: true,
|
|
907
|
+
children: [
|
|
908
|
+
{
|
|
909
|
+
name: `${this.grid.name}_deleteButton`,
|
|
910
|
+
component: 'ZdButton',
|
|
911
|
+
icon: true,
|
|
912
|
+
iconName: 'delete',
|
|
913
|
+
isVisible: `{{GridController_${this.grid.componentId}.showDeleteButton}}`,
|
|
914
|
+
disabled: `{{GridController_${this.grid.componentId}.disableDeleteButton}}`,
|
|
915
|
+
events: {
|
|
916
|
+
click: this.deleteButtonClick.bind(this),
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
],
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: `${this.grid.name}_divider1`,
|
|
923
|
+
component: 'ZdDivider',
|
|
924
|
+
cssClass: 'toolbar-divider',
|
|
925
|
+
vertical: true,
|
|
926
|
+
isVisible: `{{GridController_${this.grid.componentId}.showDivider1}}`,
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
name: `${this.grid.name}_refresh_tooltip`,
|
|
930
|
+
component: 'ZdTooltip',
|
|
931
|
+
label: 'TEKGRID_REFRESH',
|
|
932
|
+
bottom: true,
|
|
933
|
+
children: [
|
|
934
|
+
{
|
|
935
|
+
name: `${this.grid.name}_refreshButton`,
|
|
936
|
+
component: 'ZdButton',
|
|
937
|
+
icon: true,
|
|
938
|
+
iconName: 'refresh',
|
|
939
|
+
isVisible: `{{GridController_${this.grid.componentId}.showReloadButton}}`,
|
|
940
|
+
events: {
|
|
941
|
+
click: this.reloadGrid.bind(this),
|
|
942
|
+
},
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: `${this.grid.name}_divider2`,
|
|
948
|
+
component: 'ZdDivider',
|
|
949
|
+
cssClass: 'toolbar-divider',
|
|
950
|
+
vertical: true,
|
|
951
|
+
isVisible: `{{GridController_${this.grid.componentId}.showDivider2}}`,
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: `${this.grid.name}_columns_button_tooltip`,
|
|
955
|
+
component: 'ZdTooltip',
|
|
956
|
+
label: 'TEKGRID_COLUMNS',
|
|
957
|
+
bottom: true,
|
|
958
|
+
children: [
|
|
959
|
+
{
|
|
960
|
+
name: `${this.grid.name}_columnsButton`,
|
|
961
|
+
component: 'TekGridColumnsButton',
|
|
962
|
+
isVisible: `{{GridController_${this.grid.componentId}.showColumnsButton}}`,
|
|
963
|
+
iterableComponentName: this.grid.name,
|
|
964
|
+
hideGroups: !(this.grid instanceof TekGrid),
|
|
965
|
+
ignoreColumns: `{{GridController_${this.grid.componentId}.columnsButtonIgnore}}`,
|
|
966
|
+
},
|
|
967
|
+
],
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
name: `${this.grid.name}_layout_options`,
|
|
971
|
+
component: 'TekGridLayoutOptions',
|
|
972
|
+
isVisible: `{{GridController_${this.grid.componentId}.showLayoutOptionsButton}}`,
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
name: `${this.grid.name}_dividerActions`,
|
|
976
|
+
component: 'ZdDivider',
|
|
977
|
+
cssClass: 'toolbar-divider',
|
|
978
|
+
vertical: true,
|
|
979
|
+
isVisible: `{{GridController_${this.grid.componentId}.showActionAndExportButton}}`,
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: `${this.grid.name}_export_dropdown`,
|
|
983
|
+
component: 'ZdDropdown',
|
|
984
|
+
cssClass: 'tekgrid-actions-dropdown',
|
|
985
|
+
offsetY: true,
|
|
986
|
+
activator: {
|
|
987
|
+
name: `${this.grid.name}_exportButton`,
|
|
988
|
+
component: 'ZdButton',
|
|
989
|
+
icon: true,
|
|
990
|
+
iconName: 'fileDownload',
|
|
991
|
+
isVisible: `{{GridController_${this.grid.componentId}.showExportButton}}`,
|
|
895
992
|
},
|
|
993
|
+
children: this.grid.exportActions || this.exportConfigButtons,
|
|
896
994
|
},
|
|
897
|
-
],
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
name: `${this.grid.name}_divider1`,
|
|
901
|
-
component: 'ZdDivider',
|
|
902
|
-
cssClass: 'toolbar-divider',
|
|
903
|
-
vertical: true,
|
|
904
|
-
isVisible: `{{GridController_${this.grid.componentId}.showDivider1}}`,
|
|
905
|
-
},
|
|
906
|
-
{
|
|
907
|
-
name: `${this.grid.name}_refresh_tooltip`,
|
|
908
|
-
component: 'ZdTooltip',
|
|
909
|
-
label: 'TEKGRID_REFRESH',
|
|
910
|
-
bottom: true,
|
|
911
|
-
children: [
|
|
912
995
|
{
|
|
913
|
-
name: `${this.grid.name}
|
|
914
|
-
component: '
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
996
|
+
name: `${this.grid.name}_actions_dropdown`,
|
|
997
|
+
component: 'ZdDropdown',
|
|
998
|
+
cssClass: 'tekgrid-actions-dropdown',
|
|
999
|
+
offsetY: true,
|
|
1000
|
+
activator: {
|
|
1001
|
+
name: `${this.grid.name}_actionsButton`,
|
|
1002
|
+
component: 'ZdButton',
|
|
1003
|
+
icon: true,
|
|
1004
|
+
iconName: 'more',
|
|
1005
|
+
isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
|
|
920
1006
|
},
|
|
1007
|
+
children: this.grid.actions,
|
|
921
1008
|
},
|
|
922
|
-
],
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
name: `${this.grid.name}_divider2`,
|
|
926
|
-
component: 'ZdDivider',
|
|
927
|
-
cssClass: 'toolbar-divider',
|
|
928
|
-
vertical: true,
|
|
929
|
-
isVisible: `{{GridController_${this.grid.componentId}.showDivider2}}`,
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
name: `${this.grid.name}_columns_button_tooltip`,
|
|
933
|
-
component: 'ZdTooltip',
|
|
934
|
-
label: 'TEKGRID_COLUMNS',
|
|
935
|
-
bottom: true,
|
|
936
|
-
children: [
|
|
937
1009
|
{
|
|
938
|
-
name: `${this.grid.name}
|
|
939
|
-
component: '
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
ignoreColumns: `{{GridController_${this.grid.componentId}.columnsButtonIgnore}}`,
|
|
1010
|
+
name: `${this.grid.name}_divider3`,
|
|
1011
|
+
component: 'ZdDivider',
|
|
1012
|
+
cssClass: 'toolbar-divider',
|
|
1013
|
+
vertical: true,
|
|
1014
|
+
isVisible: `{{GridController_${this.grid.componentId}.showDivider3}}`,
|
|
944
1015
|
},
|
|
945
1016
|
],
|
|
946
1017
|
},
|
|
947
1018
|
{
|
|
948
|
-
name: `${this.grid.name}
|
|
949
|
-
component: '
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
cssClass: 'toolbar-divider',
|
|
956
|
-
vertical: true,
|
|
957
|
-
isVisible: `{{GridController_${this.grid.componentId}.showActionAndExportButton}}`,
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
name: `${this.grid.name}_export_dropdown`,
|
|
961
|
-
component: 'ZdDropdown',
|
|
962
|
-
cssClass: 'tekgrid-actions-dropdown',
|
|
963
|
-
offsetY: true,
|
|
964
|
-
activator: {
|
|
965
|
-
name: `${this.grid.name}_exportButton`,
|
|
966
|
-
component: 'ZdButton',
|
|
967
|
-
icon: true,
|
|
968
|
-
iconName: 'fileDownload',
|
|
969
|
-
isVisible: `{{GridController_${this.grid.componentId}.showExportButton}}`,
|
|
1019
|
+
name: `${this.grid.name}_saveButton`,
|
|
1020
|
+
component: 'ZdButton',
|
|
1021
|
+
label: 'TEKGRID_SAVE',
|
|
1022
|
+
isVisible: `{{GridController_${this.grid.componentId}.showEditButtons}}`,
|
|
1023
|
+
small: true,
|
|
1024
|
+
events: {
|
|
1025
|
+
click: this.saveChanges.bind(this),
|
|
970
1026
|
},
|
|
971
|
-
children: this.grid.exportActions || this.exportConfigButtons,
|
|
972
1027
|
},
|
|
973
1028
|
{
|
|
974
|
-
name: `${this.grid.name}
|
|
975
|
-
component: '
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
isVisible: `{{GridController_${this.grid.componentId}.showActionsButton}}`,
|
|
1029
|
+
name: `${this.grid.name}_cancelButton`,
|
|
1030
|
+
component: 'ZdButton',
|
|
1031
|
+
label: 'TEKGRID_CANCEL',
|
|
1032
|
+
outline: true,
|
|
1033
|
+
cssClass: 'zd-mx-2',
|
|
1034
|
+
isVisible: `{{GridController_${this.grid.componentId}.showEditButtons}}`,
|
|
1035
|
+
small: true,
|
|
1036
|
+
events: {
|
|
1037
|
+
click: this.cancelChanges.bind(this),
|
|
984
1038
|
},
|
|
985
|
-
children: this.grid.actions,
|
|
986
1039
|
},
|
|
987
1040
|
{
|
|
988
|
-
name: `${this.grid.name}
|
|
989
|
-
component: '
|
|
990
|
-
cssClass: '
|
|
991
|
-
|
|
992
|
-
isVisible: `{{GridController_${this.grid.componentId}.
|
|
1041
|
+
name: `${this.grid.name}_gridSearch`,
|
|
1042
|
+
component: 'ZdSearch',
|
|
1043
|
+
cssClass: 'zd-grid-search',
|
|
1044
|
+
iterableComponentName: `${this.grid.name}`,
|
|
1045
|
+
isVisible: `{{GridController_${this.grid.componentId}.showSearchInput}}`,
|
|
993
1046
|
},
|
|
994
|
-
],
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
name: `${this.grid.name}_saveButton`,
|
|
998
|
-
component: 'ZdButton',
|
|
999
|
-
label: 'TEKGRID_SAVE',
|
|
1000
|
-
isVisible: `{{GridController_${this.grid.componentId}.showEditButtons}}`,
|
|
1001
|
-
small: true,
|
|
1002
|
-
events: {
|
|
1003
|
-
click: this.saveChanges.bind(this),
|
|
1004
|
-
},
|
|
1005
|
-
},
|
|
1006
|
-
{
|
|
1007
|
-
name: `${this.grid.name}_cancelButton`,
|
|
1008
|
-
component: 'ZdButton',
|
|
1009
|
-
label: 'TEKGRID_CANCEL',
|
|
1010
|
-
outline: true,
|
|
1011
|
-
cssClass: 'zd-mx-2',
|
|
1012
|
-
isVisible: `{{GridController_${this.grid.componentId}.showEditButtons}}`,
|
|
1013
|
-
small: true,
|
|
1014
|
-
events: {
|
|
1015
|
-
click: this.cancelChanges.bind(this),
|
|
1016
|
-
},
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
name: `${this.grid.name}_gridSearch`,
|
|
1020
|
-
component: 'ZdSearch',
|
|
1021
|
-
cssClass: 'zd-grid-search',
|
|
1022
|
-
isVisible: `{{GridController_${this.grid.componentId}.showSearchInput}}`,
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
name: `${this.grid.name}_filter_tooltip`,
|
|
1026
|
-
component: 'ZdTooltip',
|
|
1027
|
-
label: 'TEKGRID_FILTER',
|
|
1028
|
-
bottom: true,
|
|
1029
|
-
children: [
|
|
1030
1047
|
{
|
|
1031
|
-
name: `${this.grid.name}
|
|
1032
|
-
component: '
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1048
|
+
name: `${this.grid.name}_filter_tooltip`,
|
|
1049
|
+
component: 'ZdTooltip',
|
|
1050
|
+
label: 'TEKGRID_FILTER',
|
|
1051
|
+
bottom: true,
|
|
1052
|
+
children: [
|
|
1053
|
+
{
|
|
1054
|
+
name: `${this.grid.name}_filterButton`,
|
|
1055
|
+
component: 'TekGridFilterButton',
|
|
1056
|
+
grid: this.grid,
|
|
1057
|
+
gridName: this.grid.name,
|
|
1058
|
+
showCheckboxAll: this.grid.showCheckboxAllFilter,
|
|
1059
|
+
isVisible: `{{GridController_${this.grid.componentId}.showFilterButton}}`,
|
|
1060
|
+
events: {
|
|
1061
|
+
onCreated: this.loadFilterButton.bind(this),
|
|
1062
|
+
},
|
|
1063
|
+
},
|
|
1064
|
+
],
|
|
1040
1065
|
},
|
|
1041
1066
|
],
|
|
1042
1067
|
},
|
|
@@ -1045,6 +1070,14 @@ class GridBase {
|
|
|
1045
1070
|
loadFilterButton({ component }) {
|
|
1046
1071
|
this.filterButton = component;
|
|
1047
1072
|
}
|
|
1073
|
+
hideButtonClick({ event }) {
|
|
1074
|
+
if (!event.defaultPrevented) {
|
|
1075
|
+
const instance = Metadata.getInstance(`${this.grid.name}_toolbarDiv`);
|
|
1076
|
+
if (instance) {
|
|
1077
|
+
instance.isVisible = !instance.isVisible;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1048
1081
|
addButtonClick({ event }) {
|
|
1049
1082
|
if (this.grid.editNewRowsOnly) {
|
|
1050
1083
|
this.grid.editingNewRows = true;
|
|
@@ -1166,6 +1199,8 @@ Messages.add({
|
|
|
1166
1199
|
TEKGRID_BETWEEN: 'está entre',
|
|
1167
1200
|
TEKGRID_AND: 'e',
|
|
1168
1201
|
TEKGRID_OR: 'ou',
|
|
1202
|
+
TEKGRID_HIDE: 'Esconder Ações',
|
|
1203
|
+
TEKGRID_SHOW: 'Mostrar Ações',
|
|
1169
1204
|
TEKGRID_ADD: 'Adicionar',
|
|
1170
1205
|
TEKGRID_DELETE: 'Excluir',
|
|
1171
1206
|
TEKGRID_REFRESH: 'Atualizar',
|
|
@@ -1237,6 +1272,8 @@ Messages.add({
|
|
|
1237
1272
|
TEKGRID_BETWEEN: 'is between',
|
|
1238
1273
|
TEKGRID_AND: 'and',
|
|
1239
1274
|
TEKGRID_OR: 'or',
|
|
1275
|
+
TEKGRID_HIDE: 'Hide Actions',
|
|
1276
|
+
TEKGRID_SHOW: 'Show Actions',
|
|
1240
1277
|
TEKGRID_ADD: 'Add',
|
|
1241
1278
|
TEKGRID_DELETE: 'Delete',
|
|
1242
1279
|
TEKGRID_REFRESH: 'Refresh',
|
|
@@ -1308,6 +1345,8 @@ Messages.add({
|
|
|
1308
1345
|
TEKGRID_BETWEEN: 'está entre',
|
|
1309
1346
|
TEKGRID_AND: 'e',
|
|
1310
1347
|
TEKGRID_OR: 'o',
|
|
1348
|
+
TEKGRID_HIDE: 'Ocultar Acciones',
|
|
1349
|
+
TEKGRID_SHOW: 'Mostrar Acciones',
|
|
1311
1350
|
TEKGRID_ADD: 'Añadir',
|
|
1312
1351
|
TEKGRID_DELETE: 'Eliminar',
|
|
1313
1352
|
TEKGRID_REFRESH: 'Actualizar',
|
|
@@ -1368,7 +1407,9 @@ Messages.add({
|
|
|
1368
1407
|
|
|
1369
1408
|
class GridController {
|
|
1370
1409
|
constructor(grid) {
|
|
1410
|
+
this.openToolbar = true;
|
|
1371
1411
|
this.grid = grid;
|
|
1412
|
+
this.openToolbar = this.grid.toolbarOpened;
|
|
1372
1413
|
}
|
|
1373
1414
|
get gridTitle() {
|
|
1374
1415
|
return this.grid.title;
|
|
@@ -1388,6 +1429,18 @@ class GridController {
|
|
|
1388
1429
|
get showSearchInput() {
|
|
1389
1430
|
return this.grid.showSearch;
|
|
1390
1431
|
}
|
|
1432
|
+
get showToolbar() {
|
|
1433
|
+
return this.openToolbar;
|
|
1434
|
+
}
|
|
1435
|
+
set showToolbar(value) {
|
|
1436
|
+
this.openToolbar = value;
|
|
1437
|
+
}
|
|
1438
|
+
get toolbarStyle() {
|
|
1439
|
+
return !this.openToolbar ? 'is-rotated' : '';
|
|
1440
|
+
}
|
|
1441
|
+
get tooltipName() {
|
|
1442
|
+
return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
|
|
1443
|
+
}
|
|
1391
1444
|
get showReloadButton() {
|
|
1392
1445
|
return this.grid.showReload;
|
|
1393
1446
|
}
|
|
@@ -2222,6 +2275,7 @@ class TekGrid extends GridEditable {
|
|
|
2222
2275
|
this.editNewRowsOnly = false;
|
|
2223
2276
|
this.showCheckboxAllFilter = Config.gridShowCheckboxAllFilter || false;
|
|
2224
2277
|
this.defaultFilter = {};
|
|
2278
|
+
this.toolbarOpened = true;
|
|
2225
2279
|
this.defaultLazy = false;
|
|
2226
2280
|
this.groups = [];
|
|
2227
2281
|
this.summary = {};
|
|
@@ -2255,6 +2309,7 @@ class TekGrid extends GridEditable {
|
|
|
2255
2309
|
this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
|
|
2256
2310
|
this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
|
|
2257
2311
|
this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
|
|
2312
|
+
this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
|
|
2258
2313
|
this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
|
|
2259
2314
|
this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
|
|
2260
2315
|
this.actions = props.actions || this.actions;
|
|
@@ -3439,6 +3494,13 @@ class TekGridLayoutOptions extends ComponentRender {
|
|
|
3439
3494
|
this.layouts[layout.name] = layout;
|
|
3440
3495
|
this.saveLayouts();
|
|
3441
3496
|
}
|
|
3497
|
+
discardChanges() {
|
|
3498
|
+
const layoutSelected = this.layouts[this.currentLayoutName];
|
|
3499
|
+
if (this.viewApplyLayout) {
|
|
3500
|
+
this.viewApplyLayout(layoutSelected);
|
|
3501
|
+
}
|
|
3502
|
+
this.layoutEdited = false;
|
|
3503
|
+
}
|
|
3442
3504
|
applyLayout(name, save = true) {
|
|
3443
3505
|
this.currentLayoutName = name;
|
|
3444
3506
|
const layoutSelected = this.layouts[name];
|
|
@@ -3596,6 +3658,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3596
3658
|
* Show refresh button
|
|
3597
3659
|
*/
|
|
3598
3660
|
this.showReload = true;
|
|
3661
|
+
this.toolbarOpened = true;
|
|
3599
3662
|
/**
|
|
3600
3663
|
* Export config
|
|
3601
3664
|
*/
|
|
@@ -3656,6 +3719,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3656
3719
|
this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
|
|
3657
3720
|
this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
|
|
3658
3721
|
this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
|
|
3722
|
+
this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
|
|
3659
3723
|
this.exportActions = props.exportActions || this.exportActions;
|
|
3660
3724
|
this.actions = props.actions || this.actions;
|
|
3661
3725
|
this.toolbarSlotProps = props.toolbarSlot !== undefined;
|
|
@@ -4321,6 +4385,9 @@ Messages.add({
|
|
|
4321
4385
|
LAYOUT: 'Layout: ',
|
|
4322
4386
|
NEW_LAYOUT: 'Novo layout',
|
|
4323
4387
|
DEFAULT_LAYOUT: 'Padrão',
|
|
4388
|
+
LAYOUT_MODIFIED: 'O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações',
|
|
4389
|
+
LAYOUT_NOT_MODIFIED: 'Crie um novo layout ou aplique um dos layouts já existentes',
|
|
4390
|
+
LAYOUT_DISCART_CHANGES: 'Descartar alterações',
|
|
4324
4391
|
},
|
|
4325
4392
|
},
|
|
4326
4393
|
'en-US': {
|
|
@@ -4336,6 +4403,9 @@ Messages.add({
|
|
|
4336
4403
|
LAYOUT: 'Layout: ',
|
|
4337
4404
|
NEW_LAYOUT: 'New layout',
|
|
4338
4405
|
DEFAULT_LAYOUT: 'Default',
|
|
4406
|
+
LAYOUT_MODIFIED: 'The current layout has been modified. Create a new layout, overwrite an existing one or discard changes',
|
|
4407
|
+
LAYOUT_NOT_MODIFIED: 'Create a new layout or apply one of the existing layouts',
|
|
4408
|
+
LAYOUT_DISCART_CHANGES: 'Discard changes',
|
|
4339
4409
|
},
|
|
4340
4410
|
},
|
|
4341
4411
|
'es-CL': {
|
|
@@ -4351,6 +4421,9 @@ Messages.add({
|
|
|
4351
4421
|
LAYOUT: 'Disposición: ',
|
|
4352
4422
|
NEW_LAYOUT: 'Nueva disposición',
|
|
4353
4423
|
DEFAULT_LAYOUT: 'Default',
|
|
4424
|
+
LAYOUT_MODIFIED: 'La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios',
|
|
4425
|
+
LAYOUT_NOT_MODIFIED: 'Cree una nueva disposición o aplique una de las disposiciones existentes',
|
|
4426
|
+
LAYOUT_DISCART_CHANGES: 'Descartar los cambios',
|
|
4354
4427
|
},
|
|
4355
4428
|
},
|
|
4356
4429
|
});
|
|
@@ -4358,4 +4431,4 @@ Messages.add({
|
|
|
4358
4431
|
const packageContent = require('../package.json');
|
|
4359
4432
|
VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
4360
4433
|
|
|
4361
|
-
export { BreadcrumbHeader, CardTitle, CrudAddButton, CrudButton, CrudCancelButton, CrudDeleteButton, CrudForm, CrudSaveButton, DynamicFilterOperations, DynamicFilterRelations, Image, IterableCarousel, IterableComponentRender, Loading, Notifications, ProductCard, TekDragGrid, TekFilterHelper, TekGrid, TekGridColumn, TekGridColumnsButton, TekGridFilterButton, TekGridLayoutOptions, TekMemoryDatasource, TekRestDatasource, TekTreeGrid, TekUserInfo, TekUserInfoList, columnAggregationValues };
|
|
4434
|
+
export { BreadcrumbHeader, CardTitle, CrudAddButton, CrudButton, CrudCancelButton, CrudDeleteButton, CrudForm, CrudSaveButton, DynamicFilterOperations, DynamicFilterRelations, Image, IterableCarousel, IterableComponentRender, Loading, Notifications, ProductCard, TekDragGrid, TekFilterHelper, TekGrid, TekGridColumn, TekGridColumnsButton, TekGridColumnsButtonController, TekGridFilterButton, TekGridLayoutOptions, TekMemoryDatasource, TekRestDatasource, TekTreeGrid, TekUserInfo, TekUserInfoList, columnAggregationValues };
|