@zeedhi/teknisa-components-common 1.101.1 → 1.103.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 +683 -746
- package/coverage/coverage-final.json +45 -45
- package/coverage/lcov-report/components/crud/crud-add-button.ts.html +250 -0
- package/coverage/lcov-report/components/crud/crud-button.ts.html +292 -0
- package/coverage/lcov-report/components/crud/crud-cancel-button.ts.html +259 -0
- package/coverage/lcov-report/components/crud/crud-delete-button.ts.html +322 -0
- package/coverage/lcov-report/components/crud/crud-form.ts.html +382 -0
- package/coverage/lcov-report/components/crud/crud-save-button.ts.html +253 -0
- package/coverage/lcov-report/components/crud/index.html +191 -0
- package/coverage/lcov-report/components/index.html +116 -0
- package/coverage/lcov-report/components/index.ts.html +394 -0
- package/coverage/lcov-report/components/tek-breadcrumb-header/breadcrumb-header.ts.html +172 -0
- package/coverage/lcov-report/components/tek-breadcrumb-header/index.html +116 -0
- package/coverage/lcov-report/components/tek-card-title/card-title.ts.html +175 -0
- package/coverage/lcov-report/components/tek-card-title/index.html +116 -0
- package/coverage/lcov-report/components/tek-datasource/index.html +146 -0
- package/coverage/lcov-report/components/tek-datasource/interfaces.ts.html +193 -0
- package/coverage/lcov-report/components/tek-datasource/memory-datasource.ts.html +1015 -0
- package/coverage/lcov-report/components/tek-datasource/rest-datasource.ts.html +751 -0
- package/coverage/lcov-report/components/tek-drag-grid/index.html +116 -0
- package/coverage/lcov-report/components/tek-drag-grid/tek-drag-grid.ts.html +409 -0
- package/coverage/lcov-report/components/tek-grid/filter-helper.ts.html +145 -0
- package/coverage/lcov-report/components/tek-grid/grid-column.ts.html +775 -0
- package/coverage/lcov-report/components/tek-grid/grid-columns-button-controller.ts.html +169 -0
- package/coverage/lcov-report/components/tek-grid/grid-columns-button.ts.html +190 -0
- package/coverage/lcov-report/components/tek-grid/grid-filter-button.ts.html +1282 -0
- package/coverage/lcov-report/components/tek-grid/grid.ts.html +3157 -0
- package/coverage/lcov-report/components/tek-grid/index.html +221 -0
- package/coverage/lcov-report/components/tek-grid/interfaces.ts.html +733 -0
- package/coverage/lcov-report/components/tek-grid/layout-options.ts.html +826 -0
- package/coverage/lcov-report/components/tek-image/image.ts.html +313 -0
- package/coverage/lcov-report/components/tek-image/index.html +116 -0
- package/coverage/lcov-report/components/tek-iterable-carousel/index.html +116 -0
- package/coverage/lcov-report/components/tek-iterable-carousel/iterable-carousel.ts.html +175 -0
- package/coverage/lcov-report/components/tek-iterable-component-render/index.html +116 -0
- package/coverage/lcov-report/components/tek-iterable-component-render/iterable-component-render.ts.html +118 -0
- package/coverage/lcov-report/components/tek-loading/index.html +116 -0
- package/coverage/lcov-report/components/tek-loading/loading.ts.html +196 -0
- package/coverage/lcov-report/components/tek-notifications/index.html +116 -0
- package/coverage/lcov-report/components/tek-notifications/notifications.ts.html +271 -0
- package/coverage/lcov-report/components/tek-product-card/index.html +116 -0
- package/coverage/lcov-report/components/tek-product-card/product-card.ts.html +391 -0
- package/coverage/lcov-report/components/tek-tree-grid/index.html +116 -0
- package/coverage/lcov-report/components/tek-tree-grid/tree-grid.ts.html +1255 -0
- package/coverage/lcov-report/components/tek-user-info/TekUserInfoController.ts.html +367 -0
- package/coverage/lcov-report/components/tek-user-info/index.html +146 -0
- package/coverage/lcov-report/components/tek-user-info/tek-user-info-list.ts.html +268 -0
- package/coverage/lcov-report/components/tek-user-info/tek-user-info.ts.html +1096 -0
- package/coverage/lcov-report/error/delete-rows-error.ts.html +118 -0
- package/coverage/lcov-report/error/index.html +116 -0
- package/coverage/lcov-report/index.html +17 -17
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +9 -9
- 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-report/utils/grid-base/export-options/button-option.ts.html +166 -0
- package/coverage/lcov-report/utils/grid-base/export-options/index.html +146 -0
- package/coverage/lcov-report/utils/grid-base/export-options/index.ts.html +94 -0
- package/coverage/lcov-report/utils/grid-base/export-options/multi-option.ts.html +355 -0
- package/coverage/lcov-report/utils/grid-base/grid-base.ts.html +1960 -0
- package/coverage/lcov-report/utils/grid-base/grid-controller.ts.html +457 -0
- package/coverage/lcov-report/utils/grid-base/index.html +131 -0
- package/coverage/lcov-report/utils/index.html +116 -0
- package/coverage/lcov-report/utils/index.ts.html +100 -0
- package/coverage/lcov-report/utils/report-filter/index.html +116 -0
- package/coverage/lcov-report/utils/report-filter/report-filter.ts.html +256 -0
- package/coverage/lcov.info +1173 -1286
- package/dist/tek-components-common.esm.js +249 -171
- package/dist/tek-components-common.umd.js +248 -169
- package/package.json +3 -3
- package/tests/unit/components/tek-grid/grid.spec.ts +224 -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 +2 -0
- package/types/components/tek-grid/interfaces.d.ts +2 -0
- package/types/components/tek-grid/layout-options.d.ts +2 -0
- package/types/components/tek-tree-grid/interfaces.d.ts +2 -0
- package/types/components/tek-tree-grid/tree-grid.d.ts +2 -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',
|
|
@@ -1218,7 +1253,6 @@ Messages.add({
|
|
|
1218
1253
|
TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mês Atual',
|
|
1219
1254
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Ano Atual',
|
|
1220
1255
|
TEKGRID_WITH_GROUPS: '(Com grupos)',
|
|
1221
|
-
TEKGRID_WITHOUT_GROUPS: '(Sem grupos)',
|
|
1222
1256
|
TEKGRID_GRID_MIRROR: '(Espelho do grid)',
|
|
1223
1257
|
},
|
|
1224
1258
|
},
|
|
@@ -1237,6 +1271,8 @@ Messages.add({
|
|
|
1237
1271
|
TEKGRID_BETWEEN: 'is between',
|
|
1238
1272
|
TEKGRID_AND: 'and',
|
|
1239
1273
|
TEKGRID_OR: 'or',
|
|
1274
|
+
TEKGRID_HIDE: 'Hide Actions',
|
|
1275
|
+
TEKGRID_SHOW: 'Show Actions',
|
|
1240
1276
|
TEKGRID_ADD: 'Add',
|
|
1241
1277
|
TEKGRID_DELETE: 'Delete',
|
|
1242
1278
|
TEKGRID_REFRESH: 'Refresh',
|
|
@@ -1289,7 +1325,6 @@ Messages.add({
|
|
|
1289
1325
|
TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Current Month',
|
|
1290
1326
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Current Year',
|
|
1291
1327
|
TEKGRID_WITH_GROUPS: '(With groups)',
|
|
1292
|
-
TEKGRID_WITHOUT_GROUPS: '(No groups)',
|
|
1293
1328
|
TEKGRID_GRID_MIRROR: '(Grid mirror)',
|
|
1294
1329
|
},
|
|
1295
1330
|
},
|
|
@@ -1308,6 +1343,8 @@ Messages.add({
|
|
|
1308
1343
|
TEKGRID_BETWEEN: 'está entre',
|
|
1309
1344
|
TEKGRID_AND: 'e',
|
|
1310
1345
|
TEKGRID_OR: 'o',
|
|
1346
|
+
TEKGRID_HIDE: 'Ocultar Acciones',
|
|
1347
|
+
TEKGRID_SHOW: 'Mostrar Acciones',
|
|
1311
1348
|
TEKGRID_ADD: 'Añadir',
|
|
1312
1349
|
TEKGRID_DELETE: 'Eliminar',
|
|
1313
1350
|
TEKGRID_REFRESH: 'Actualizar',
|
|
@@ -1360,7 +1397,6 @@ Messages.add({
|
|
|
1360
1397
|
TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mes actual',
|
|
1361
1398
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Año actual',
|
|
1362
1399
|
TEKGRID_WITH_GROUPS: '(Con grupos)',
|
|
1363
|
-
TEKGRID_WITHOUT_GROUPS: '(No grupos)',
|
|
1364
1400
|
TEKGRID_GRID_MIRROR: '(Espejo de grid)',
|
|
1365
1401
|
},
|
|
1366
1402
|
},
|
|
@@ -1368,7 +1404,9 @@ Messages.add({
|
|
|
1368
1404
|
|
|
1369
1405
|
class GridController {
|
|
1370
1406
|
constructor(grid) {
|
|
1407
|
+
this.openToolbar = true;
|
|
1371
1408
|
this.grid = grid;
|
|
1409
|
+
this.openToolbar = this.grid.toolbarOpened;
|
|
1372
1410
|
}
|
|
1373
1411
|
get gridTitle() {
|
|
1374
1412
|
return this.grid.title;
|
|
@@ -1388,6 +1426,18 @@ class GridController {
|
|
|
1388
1426
|
get showSearchInput() {
|
|
1389
1427
|
return this.grid.showSearch;
|
|
1390
1428
|
}
|
|
1429
|
+
get showToolbar() {
|
|
1430
|
+
return this.openToolbar;
|
|
1431
|
+
}
|
|
1432
|
+
set showToolbar(value) {
|
|
1433
|
+
this.openToolbar = value;
|
|
1434
|
+
}
|
|
1435
|
+
get toolbarStyle() {
|
|
1436
|
+
return !this.openToolbar ? 'is-rotated' : '';
|
|
1437
|
+
}
|
|
1438
|
+
get tooltipName() {
|
|
1439
|
+
return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
|
|
1440
|
+
}
|
|
1391
1441
|
get showReloadButton() {
|
|
1392
1442
|
return this.grid.showReload;
|
|
1393
1443
|
}
|
|
@@ -2186,7 +2236,7 @@ class TekGrid extends GridEditable {
|
|
|
2186
2236
|
{
|
|
2187
2237
|
type: 'xls',
|
|
2188
2238
|
label: I18n.translate('TEKGRID_EXPORT_AS', {
|
|
2189
|
-
type:
|
|
2239
|
+
type: 'XLS',
|
|
2190
2240
|
}),
|
|
2191
2241
|
},
|
|
2192
2242
|
{
|
|
@@ -2222,6 +2272,8 @@ class TekGrid extends GridEditable {
|
|
|
2222
2272
|
this.editNewRowsOnly = false;
|
|
2223
2273
|
this.showCheckboxAllFilter = Config.gridShowCheckboxAllFilter || false;
|
|
2224
2274
|
this.defaultFilter = {};
|
|
2275
|
+
this.toolbarOpened = true;
|
|
2276
|
+
this.reportTitle = '';
|
|
2225
2277
|
this.defaultLazy = false;
|
|
2226
2278
|
this.groups = [];
|
|
2227
2279
|
this.summary = {};
|
|
@@ -2255,8 +2307,10 @@ class TekGrid extends GridEditable {
|
|
|
2255
2307
|
this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
|
|
2256
2308
|
this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
|
|
2257
2309
|
this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
|
|
2310
|
+
this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
|
|
2258
2311
|
this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
|
|
2259
2312
|
this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
|
|
2313
|
+
this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
|
|
2260
2314
|
this.actions = props.actions || this.actions;
|
|
2261
2315
|
this.toolbarSlotProps = props.toolbarSlot !== undefined;
|
|
2262
2316
|
if (this.deleteButton === 'selection') {
|
|
@@ -2386,9 +2440,13 @@ class TekGrid extends GridEditable {
|
|
|
2386
2440
|
}
|
|
2387
2441
|
getReport(type, portrait, rowObj = {}) {
|
|
2388
2442
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2389
|
-
const report = new Report(this, this.title);
|
|
2443
|
+
const report = new Report(this, this.title || this.reportTitle);
|
|
2390
2444
|
const reportGroups = this.buildReportGroups();
|
|
2391
2445
|
const reportAggregations = this.buildReportAggregations();
|
|
2446
|
+
let typeValue = type;
|
|
2447
|
+
if (reportGroups.length === 0 && type.substring(0, 3) === 'xls') {
|
|
2448
|
+
typeValue = 'xls';
|
|
2449
|
+
}
|
|
2392
2450
|
let filter;
|
|
2393
2451
|
if (this.datasource instanceof TekRestDatasource
|
|
2394
2452
|
|| this.datasource instanceof TekMemoryDatasource) {
|
|
@@ -2430,7 +2488,7 @@ class TekGrid extends GridEditable {
|
|
|
2430
2488
|
beforeOpen = this.events.beforeOpenReport;
|
|
2431
2489
|
}
|
|
2432
2490
|
return report
|
|
2433
|
-
.getReport(
|
|
2491
|
+
.getReport(typeValue, portrait, {
|
|
2434
2492
|
metaData: merge(rowObj, {
|
|
2435
2493
|
filter,
|
|
2436
2494
|
groups: reportGroups,
|
|
@@ -3439,6 +3497,13 @@ class TekGridLayoutOptions extends ComponentRender {
|
|
|
3439
3497
|
this.layouts[layout.name] = layout;
|
|
3440
3498
|
this.saveLayouts();
|
|
3441
3499
|
}
|
|
3500
|
+
discardChanges() {
|
|
3501
|
+
const layoutSelected = this.layouts[this.currentLayoutName];
|
|
3502
|
+
if (this.viewApplyLayout) {
|
|
3503
|
+
this.viewApplyLayout(layoutSelected);
|
|
3504
|
+
}
|
|
3505
|
+
this.layoutEdited = false;
|
|
3506
|
+
}
|
|
3442
3507
|
applyLayout(name, save = true) {
|
|
3443
3508
|
this.currentLayoutName = name;
|
|
3444
3509
|
const layoutSelected = this.layouts[name];
|
|
@@ -3596,6 +3661,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3596
3661
|
* Show refresh button
|
|
3597
3662
|
*/
|
|
3598
3663
|
this.showReload = true;
|
|
3664
|
+
this.toolbarOpened = true;
|
|
3599
3665
|
/**
|
|
3600
3666
|
* Export config
|
|
3601
3667
|
*/
|
|
@@ -3616,7 +3682,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3616
3682
|
{
|
|
3617
3683
|
type: 'xls',
|
|
3618
3684
|
label: I18n.translate('TEKGRID_EXPORT_AS', {
|
|
3619
|
-
type:
|
|
3685
|
+
type: 'XLS',
|
|
3620
3686
|
}),
|
|
3621
3687
|
},
|
|
3622
3688
|
{
|
|
@@ -3639,6 +3705,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3639
3705
|
this.toolbarSlotProps = false;
|
|
3640
3706
|
this.showCheckboxAllFilter = false;
|
|
3641
3707
|
this.defaultFilter = {};
|
|
3708
|
+
this.reportTitle = '';
|
|
3642
3709
|
this.title = this.getInitValue('title', props.title, this.title);
|
|
3643
3710
|
this.addButton = this.getInitValue('addButton', props.addButton, this.addButton);
|
|
3644
3711
|
this.deleteButton = this.getInitValue('deleteButton', props.deleteButton, this.deleteButton);
|
|
@@ -3656,7 +3723,9 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3656
3723
|
this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
|
|
3657
3724
|
this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
|
|
3658
3725
|
this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
|
|
3726
|
+
this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
|
|
3659
3727
|
this.exportActions = props.exportActions || this.exportActions;
|
|
3728
|
+
this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
|
|
3660
3729
|
this.actions = props.actions || this.actions;
|
|
3661
3730
|
this.toolbarSlotProps = props.toolbarSlot !== undefined;
|
|
3662
3731
|
if (this.deleteButton === 'selection') {
|
|
@@ -3736,7 +3805,7 @@ class TekTreeGrid extends TreeGridEditable {
|
|
|
3736
3805
|
}
|
|
3737
3806
|
getReport(type, portrait, rowObj = {}) {
|
|
3738
3807
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3739
|
-
const report = new Report(this, this.title);
|
|
3808
|
+
const report = new Report(this, this.title || this.reportTitle);
|
|
3740
3809
|
const reportGroups = {};
|
|
3741
3810
|
const reportAggregations = {};
|
|
3742
3811
|
let filter;
|
|
@@ -4321,6 +4390,9 @@ Messages.add({
|
|
|
4321
4390
|
LAYOUT: 'Layout: ',
|
|
4322
4391
|
NEW_LAYOUT: 'Novo layout',
|
|
4323
4392
|
DEFAULT_LAYOUT: 'Padrão',
|
|
4393
|
+
LAYOUT_MODIFIED: 'O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações',
|
|
4394
|
+
LAYOUT_NOT_MODIFIED: 'Crie um novo layout ou aplique um dos layouts já existentes',
|
|
4395
|
+
LAYOUT_DISCART_CHANGES: 'Descartar alterações',
|
|
4324
4396
|
},
|
|
4325
4397
|
},
|
|
4326
4398
|
'en-US': {
|
|
@@ -4336,6 +4408,9 @@ Messages.add({
|
|
|
4336
4408
|
LAYOUT: 'Layout: ',
|
|
4337
4409
|
NEW_LAYOUT: 'New layout',
|
|
4338
4410
|
DEFAULT_LAYOUT: 'Default',
|
|
4411
|
+
LAYOUT_MODIFIED: 'The current layout has been modified. Create a new layout, overwrite an existing one or discard changes',
|
|
4412
|
+
LAYOUT_NOT_MODIFIED: 'Create a new layout or apply one of the existing layouts',
|
|
4413
|
+
LAYOUT_DISCART_CHANGES: 'Discard changes',
|
|
4339
4414
|
},
|
|
4340
4415
|
},
|
|
4341
4416
|
'es-CL': {
|
|
@@ -4351,6 +4426,9 @@ Messages.add({
|
|
|
4351
4426
|
LAYOUT: 'Disposición: ',
|
|
4352
4427
|
NEW_LAYOUT: 'Nueva disposición',
|
|
4353
4428
|
DEFAULT_LAYOUT: 'Default',
|
|
4429
|
+
LAYOUT_MODIFIED: 'La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios',
|
|
4430
|
+
LAYOUT_NOT_MODIFIED: 'Cree una nueva disposición o aplique una de las disposiciones existentes',
|
|
4431
|
+
LAYOUT_DISCART_CHANGES: 'Descartar los cambios',
|
|
4354
4432
|
},
|
|
4355
4433
|
},
|
|
4356
4434
|
});
|
|
@@ -4358,4 +4436,4 @@ Messages.add({
|
|
|
4358
4436
|
const packageContent = require('../package.json');
|
|
4359
4437
|
VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
4360
4438
|
|
|
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 };
|
|
4439
|
+
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 };
|