@zeedhi/teknisa-components-common 3.1.0 → 3.2.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/dist/teknisa-components-common.es.js +3536 -0
- package/dist/types/components/tek-breadcrumb-header/breadcrumb-header.d.ts +2 -2
- package/dist/types/components/tek-breadcrumb-header/interfaces.d.ts +1 -1
- package/dist/types/components/tek-datasource/tek-memory-datasource.d.ts +1 -21
- package/dist/types/components/tek-datasource/tek-rest-datasource.d.ts +6 -28
- package/dist/types/components/tek-grid/filter-helper.d.ts +2 -2
- package/dist/types/components/tek-grid/grid-filter-button.d.ts +1 -0
- package/dist/types/components/tek-grid/grouped-data-manager.d.ts +8 -1
- package/dist/types/components/tek-grid/interfaces.d.ts +8 -1
- package/dist/types/components/tek-grid/tek-grid-controller.d.ts +19 -17
- package/dist/types/components/tek-grid/tek-grid-data-editor.d.ts +11 -0
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.d.ts +1 -1
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +8 -1
- package/dist/types/components/tek-grid/tek-grid.d.ts +22 -5
- package/dist/types/components/tek-loading/interfaces.d.ts +1 -1
- package/dist/types/components/tek-loading/loading.d.ts +1 -1
- package/dist/types/components/tek-user-info/TekUserInfoController.d.ts +4 -4
- package/dist/types/utils/extract-properties/extract-properties.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/report-filter/report-filter.d.ts +12 -0
- package/package.json +30 -12
- package/coverage/clover.xml +0 -6
- package/coverage/coverage-final.json +0 -1
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -101
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +0 -100
- package/coverage/lcov-report/tests/__helpers__/create-component.ts.html +0 -109
- package/coverage/lcov-report/tests/__helpers__/find-component.ts.html +0 -139
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +0 -94
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +0 -166
- package/coverage/lcov-report/tests/__helpers__/index.html +0 -221
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +0 -106
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +0 -121
- package/coverage/lcov-report/tests/__helpers__/spy-on-all-methods.ts.html +0 -223
- package/coverage/lcov.info +0 -0
- package/dist/teknisa-components-common.js +0 -3808
- package/dist/teknisa-components-common.min.js +0 -3808
- package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +0 -14
- package/environments.json +0 -26
- package/jest.config.cjs +0 -23
- package/src/components/index.ts +0 -101
- package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +0 -29
- package/src/components/tek-breadcrumb-header/interfaces.ts +0 -7
- package/src/components/tek-datasource/index.ts +0 -3
- package/src/components/tek-datasource/interfaces.ts +0 -36
- package/src/components/tek-datasource/tek-memory-datasource.ts +0 -314
- package/src/components/tek-datasource/tek-rest-datasource.ts +0 -224
- package/src/components/tek-grid/columns-searcher.ts +0 -22
- package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +0 -20
- package/src/components/tek-grid/filter-helper.ts +0 -20
- package/src/components/tek-grid/grid-filter-button.ts +0 -421
- package/src/components/tek-grid/grouped-data-manager.ts +0 -448
- package/src/components/tek-grid/grouped-data-navigator.ts +0 -66
- package/src/components/tek-grid/grouped-data-selector.ts +0 -40
- package/src/components/tek-grid/index.ts +0 -18
- package/src/components/tek-grid/interfaces.ts +0 -329
- package/src/components/tek-grid/keymap-grouped.ts +0 -20
- package/src/components/tek-grid/layout-options.ts +0 -248
- package/src/components/tek-grid/tek-grid-column.ts +0 -193
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +0 -28
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +0 -38
- package/src/components/tek-grid/tek-grid-controller.ts +0 -140
- package/src/components/tek-grid/tek-grid-events.ts +0 -105
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +0 -26
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +0 -3
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +0 -6
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +0 -85
- package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +0 -2
- package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +0 -365
- package/src/components/tek-grid/tek-grid.ts +0 -1122
- package/src/components/tek-loading/interfaces.ts +0 -7
- package/src/components/tek-loading/loading.ts +0 -27
- package/src/components/tek-user-info/TekUserInfoController.ts +0 -87
- package/src/components/tek-user-info/interfaces.ts +0 -21
- package/src/components/tek-user-info/tek-user-info-list.ts +0 -64
- package/src/components/tek-user-info/tek-user-info.ts +0 -337
- package/src/error/tek-grid-delete-rows-error.ts +0 -15
- package/src/error/teknisa-common-error.ts +0 -8
- package/src/utils/config/config.ts +0 -8
- package/src/utils/index.ts +0 -3
- package/src/utils/is-filled-object/is-filled-object.ts +0 -5
- package/src/utils/is-nil.ts +0 -3
- package/tests/__helpers__/component-event-helper.ts +0 -5
- package/tests/__helpers__/create-component.ts +0 -8
- package/tests/__helpers__/find-component.ts +0 -18
- package/tests/__helpers__/flush-promises-helper.ts +0 -3
- package/tests/__helpers__/get-child-helper.ts +0 -27
- package/tests/__helpers__/index.ts +0 -7
- package/tests/__helpers__/mock-created-helper.ts +0 -12
- package/tests/__helpers__/spy-on-all-methods.ts +0 -46
- package/tests/__mocks__/@zeedhi/core/i18n.js +0 -75
- package/tests/__mocks__/@zeedhi/core.js +0 -5
- package/tests/unit/components/tek-breadcrumb-header/tek-breadcrumb-header.spec.ts +0 -43
- package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +0 -463
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +0 -362
- package/tests/unit/components/tek-grid/button-option.spec.ts +0 -49
- package/tests/unit/components/tek-grid/columns-searcher.spec.ts +0 -112
- package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +0 -90
- package/tests/unit/components/tek-grid/filter-helper.spec.ts +0 -56
- package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +0 -842
- package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +0 -593
- package/tests/unit/components/tek-grid/grouped-data-navigator.spec.ts +0 -143
- package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +0 -136
- package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +0 -20
- package/tests/unit/components/tek-grid/layout-options.spec.ts +0 -1020
- package/tests/unit/components/tek-grid/tek-grid-column.spec.ts +0 -318
- package/tests/unit/components/tek-grid/tek-grid-columns-button.spec.ts +0 -229
- package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +0 -253
- package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +0 -186
- package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +0 -34
- package/tests/unit/components/tek-grid/tek-grid.spec.ts +0 -897
- package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +0 -482
- package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +0 -422
- package/tests/unit/components/tek-loading/loading.spec.ts +0 -29
- package/tests/unit/components/tek-user-info/TekUserInfoContoller.spec.ts +0 -220
- package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +0 -96
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +0 -442
- package/tests/unit/utils/mock-console.ts +0 -18
- package/tests/unit/utils/setup.ts +0 -5
- package/tsconfig.build.json +0 -7
- package/tsconfig.eslint.json +0 -9
|
@@ -0,0 +1,3536 @@
|
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var J = (d, i, t) => i in d ? j(d, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[i] = t;
|
|
3
|
+
var s = (d, i, t) => J(d, typeof i != "symbol" ? i + "" : i, t);
|
|
4
|
+
import { DatasourceFactory as y, MemoryDatasource as Z, URL as E, Utils as B, RestDatasource as z, Metadata as I, DateHelper as G, Config as D, I18n as g, Messages as _, Accessor as w, Loader as f, Http as L } from "@zeedhi/core";
|
|
5
|
+
import { ComponentRender as Q, Loading as q, GridColumnEditable as W, Button as X, ModalService as F, SelectMultiple as $, NonInitializedError as M, DataNavigator as tt, DataEditorWithAdd as et, GridEditableEvents as it, DataSelector as ot, Iterable as K, TableActionBuilder as rt, IterableTable as st, ViewNavigator as at, Report as nt, EmptyDataError as lt, AlertService as dt, KeyMapMerger as ht, KeyMapNavigation as ut, KeyMapEditing as ct, ColumnNotFoundError as gt, IterableColumnsButtonController as mt, IterableColumnsButton as Et, List as At } from "@zeedhi/common";
|
|
6
|
+
import k from "lodash.debounce";
|
|
7
|
+
import It from "lodash.clonedeep";
|
|
8
|
+
import pt from "lodash.merge";
|
|
9
|
+
import { UserInfo as Rt } from "@zeedhi/zd-user-info-common";
|
|
10
|
+
class Xt extends Q {
|
|
11
|
+
constructor(t) {
|
|
12
|
+
super(t);
|
|
13
|
+
s(this, "breadcrumb");
|
|
14
|
+
s(this, "title", "");
|
|
15
|
+
s(this, "rightSlot", []);
|
|
16
|
+
this.breadcrumb = this.getBreadcrumbProperties(t.breadcrumb), this.title = this.getInitValue("title", t.title, this.title), this.rightSlot = t.rightSlot || this.rightSlot;
|
|
17
|
+
}
|
|
18
|
+
getBreadcrumbProperties(t) {
|
|
19
|
+
return {
|
|
20
|
+
...t,
|
|
21
|
+
name: t.name,
|
|
22
|
+
component: "ZdBreadcrumb",
|
|
23
|
+
divider: ">"
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|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CABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqSRVAQEAIfkEBQQA/wAsAAAAAJYAlgAACPEA/wkcSLCgwYMIEypcyLChw4cQI0qcSLGixYsYM2rcyLGjx48gQ4ocSbKkyZMoU6pcybKly5cwY8qcSbOmzZs4c+rcybOnz59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufbjggACH5BAUEAP8ALAAAAAABAAEAAAgEAP8FBAA7";
|
|
28
|
+
class $t extends q {
|
|
29
|
+
constructor(t) {
|
|
30
|
+
super(t);
|
|
31
|
+
/**
|
|
32
|
+
* Text shown in the loading overlay.
|
|
33
|
+
*/
|
|
34
|
+
s(this, "text", "");
|
|
35
|
+
/**
|
|
36
|
+
* Loading image.
|
|
37
|
+
*/
|
|
38
|
+
s(this, "image", Tt);
|
|
39
|
+
this.text = this.getInitValue("text", t.text, this.text), this.image = this.getInitValue("image", t.image, this.image);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const x = {
|
|
43
|
+
CONTAINS: !0,
|
|
44
|
+
NOT_CONTAINS: !0,
|
|
45
|
+
EQUALS: !0,
|
|
46
|
+
NOT_EQUALS: !0,
|
|
47
|
+
GREATER_THAN: !0,
|
|
48
|
+
LESS_THAN: !0,
|
|
49
|
+
GREATER_THAN_EQUALS: !0,
|
|
50
|
+
LESS_THAN_EQUALS: !0,
|
|
51
|
+
IN: !0,
|
|
52
|
+
NOT_IN: !0,
|
|
53
|
+
BETWEEN: !0
|
|
54
|
+
}, V = {
|
|
55
|
+
AND: !0,
|
|
56
|
+
OR: !0
|
|
57
|
+
};
|
|
58
|
+
class C extends Z {
|
|
59
|
+
/**
|
|
60
|
+
* Create new datasource
|
|
61
|
+
* @param props Datasource properties
|
|
62
|
+
*/
|
|
63
|
+
constructor(t) {
|
|
64
|
+
super(t);
|
|
65
|
+
/**
|
|
66
|
+
* Dynamic Filter Operations
|
|
67
|
+
*/
|
|
68
|
+
s(this, "dynamicFilterOperations", x);
|
|
69
|
+
/**
|
|
70
|
+
* Dynamic Filter Relations
|
|
71
|
+
*/
|
|
72
|
+
s(this, "dynamicFilterRelations", V);
|
|
73
|
+
/**
|
|
74
|
+
* Dynamic Filter applied flag
|
|
75
|
+
*/
|
|
76
|
+
s(this, "dynamicFilterApplied", "");
|
|
77
|
+
this.watchUrl || (this.dynamicFilter = this.getInitValue("dynamicFilter", t.dynamicFilter, {}), this.searchJoin = this.getInitValue("searchJoin", t.searchJoin, {})), this.createAccessors(), this.createObjAccessors(this.dynamicFilter, "dynamicFilter"), this.createObjAccessors(this.searchJoin, "searchJoin");
|
|
78
|
+
}
|
|
79
|
+
updateReservedKeys() {
|
|
80
|
+
this.reservedKeys.dynamic_filter = !0, this.reservedKeys.search_join = !0;
|
|
81
|
+
}
|
|
82
|
+
updateInternalProperties(t = {}) {
|
|
83
|
+
if (!this.watchUrl) return;
|
|
84
|
+
this.updateReservedKeys(), super.updateInternalProperties(t);
|
|
85
|
+
const e = E.getParsedQueryStringFromUrl();
|
|
86
|
+
this.dynamicFilter = this.getEncodedParam(e.dynamic_filter, t.dynamicFilter), this.searchJoin = this.getEncodedParam(e.search_join, t.searchJoin);
|
|
87
|
+
}
|
|
88
|
+
getEncodedParam(t, e = {}) {
|
|
89
|
+
return t ? JSON.parse(atob(t)) : e;
|
|
90
|
+
}
|
|
91
|
+
getQueryStringValues() {
|
|
92
|
+
const t = super.getQueryStringValues();
|
|
93
|
+
return this.dynamicFilter && Object.keys(this.dynamicFilter).length && (t.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter))), this.searchJoin && Object.keys(this.searchJoin).length && (t.search_join = btoa(JSON.stringify(this.searchJoin))), t;
|
|
94
|
+
}
|
|
95
|
+
getUrlQueryString() {
|
|
96
|
+
const t = super.getUrlQueryString(), e = E.getParsedQueryStringFromUrl();
|
|
97
|
+
let o = "";
|
|
98
|
+
e.dynamic_filter && (o = `&${E.getFormattedQueryString({
|
|
99
|
+
dynamic_filter: e.dynamic_filter
|
|
100
|
+
})}`);
|
|
101
|
+
let r = "";
|
|
102
|
+
return e.search_join && (r = `&${E.getFormattedQueryString({
|
|
103
|
+
search_join: e.search_join
|
|
104
|
+
})}`), t + o + r;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Adds a new dynamic filter position or replace if exists
|
|
108
|
+
* @param column Dynamic Filter column name
|
|
109
|
+
* @param value Dynamic Filter value
|
|
110
|
+
* @returns Promise with data collection
|
|
111
|
+
*/
|
|
112
|
+
addDynamicFilter(t, e) {
|
|
113
|
+
return this.isValidDynamicFilterValue(t, e) ? (this.dynamicFilter[t] = e, this.updateDynamicFilter()) : this.removeDynamicFilter(t);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Removes a dynamic filter position
|
|
117
|
+
* @param column Dynamic Filter column name
|
|
118
|
+
* @returns Promise with data collection
|
|
119
|
+
*/
|
|
120
|
+
removeDynamicFilter(t) {
|
|
121
|
+
return delete this.dynamicFilter[t], this.updateDynamicFilter();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Sets new dynamic filter value
|
|
125
|
+
* @param filter Dynamic Filter value
|
|
126
|
+
* @returns Promise with data collection
|
|
127
|
+
*/
|
|
128
|
+
setDynamicFilter(t) {
|
|
129
|
+
return this.dynamicFilter = {}, Object.keys(t).forEach((e) => {
|
|
130
|
+
this.isValidDynamicFilterValue(e, t[e]) ? this.dynamicFilter[e] = t[e] : delete this.dynamicFilter[e];
|
|
131
|
+
}), this.updateDynamicFilter();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Clears Dynamic filter value
|
|
135
|
+
* @returns Promise with data collection
|
|
136
|
+
*/
|
|
137
|
+
clearDynamicFilter() {
|
|
138
|
+
return this.dynamicFilter = {}, this.updateDynamicFilter();
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Resets page and selected rows and tries to update the url
|
|
142
|
+
* @returns Promise with data collection
|
|
143
|
+
*/
|
|
144
|
+
async updateDynamicFilter() {
|
|
145
|
+
return this.page = this.firstPage, this.selectedRows = [], this.visibleSelectedRows = [], this.watchUrl && (this.dynamicFilter && Object.keys(this.dynamicFilter).length ? E.updateQueryString({
|
|
146
|
+
dynamic_filter: btoa(JSON.stringify(this.dynamicFilter))
|
|
147
|
+
}) : E.updateQueryString({
|
|
148
|
+
dynamic_filter: void 0
|
|
149
|
+
})), this.get();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Checks if a filter value is valid
|
|
153
|
+
* @param value Filter value
|
|
154
|
+
* @returns Is valid filter value
|
|
155
|
+
*/
|
|
156
|
+
isValidDynamicFilterValue(t, e) {
|
|
157
|
+
return !this.reservedKeys[t] && e && e.length > 0 && e.every(
|
|
158
|
+
(o) => this.dynamicFilterOperations[o.operation] && this.dynamicFilterRelations[o.relation] && o.value !== "" && o.value !== null
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
clone() {
|
|
162
|
+
return {
|
|
163
|
+
...super.clone(),
|
|
164
|
+
dynamicFilter: this.dynamicFilter,
|
|
165
|
+
searchJoin: this.searchJoin,
|
|
166
|
+
type: "tek-memory"
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Updates filtered data
|
|
171
|
+
*/
|
|
172
|
+
updateFilteredData() {
|
|
173
|
+
this.filteredData = Object.keys(this.filter).length ? this.allData.filter((r) => this.getRowByFilter(r)) : Array.from(this.allData), this.dynamicFilter && Object.keys(this.dynamicFilter).length && (this.filteredData = this.filteredData.filter((r) => this.getRowByDynamicFilter(r)));
|
|
174
|
+
const t = (r) => {
|
|
175
|
+
const a = { ...r };
|
|
176
|
+
return this.searchJoin && Object.keys(this.searchJoin).forEach((n) => delete a[n]), this.getRowBySearch(a);
|
|
177
|
+
};
|
|
178
|
+
let o = (this.search ? this.filteredData.filter(t) : this.filteredData).map((r) => r[this.uniqueKey]);
|
|
179
|
+
if (this.searchJoin && Object.keys(this.searchJoin).length) {
|
|
180
|
+
const r = this.filteredData.filter((a) => this.getRowBySearchJoin(a));
|
|
181
|
+
o = o.concat(r.map((a) => a[this.uniqueKey])).sort();
|
|
182
|
+
}
|
|
183
|
+
this.filteredData = this.allData.filter((r) => o.indexOf(r[this.uniqueKey]) !== -1);
|
|
184
|
+
}
|
|
185
|
+
getRowByDynamicFilter(t) {
|
|
186
|
+
let e;
|
|
187
|
+
try {
|
|
188
|
+
Object.keys(this.dynamicFilter).forEach((o) => {
|
|
189
|
+
this.dynamicFilter[o].forEach((a) => {
|
|
190
|
+
if (e === !1 && a.relation === "AND" || e === !0 && a.relation === "OR") return;
|
|
191
|
+
const n = B.normalize(t[o].toString());
|
|
192
|
+
let l = "";
|
|
193
|
+
if (Array.isArray(a.value))
|
|
194
|
+
switch (l = a.value.map((h) => B.normalize(h.toString())), a.operation) {
|
|
195
|
+
case "IN":
|
|
196
|
+
e = l.includes(n);
|
|
197
|
+
break;
|
|
198
|
+
case "NOT_IN":
|
|
199
|
+
e = !l.includes(n);
|
|
200
|
+
break;
|
|
201
|
+
case "BETWEEN":
|
|
202
|
+
e = (Number(n) || n) >= (Number(l[0]) || l[0]) && (Number(n) || n) <= (Number(l[1]) || l[1]);
|
|
203
|
+
break;
|
|
204
|
+
default:
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
else
|
|
208
|
+
switch (l = B.normalize(a.value.toString()), a.operation) {
|
|
209
|
+
case "CONTAINS":
|
|
210
|
+
e = n.indexOf(l) !== -1;
|
|
211
|
+
break;
|
|
212
|
+
case "NOT_CONTAINS":
|
|
213
|
+
e = n.indexOf(l) === -1;
|
|
214
|
+
break;
|
|
215
|
+
case "EQUALS":
|
|
216
|
+
e = n === l;
|
|
217
|
+
break;
|
|
218
|
+
case "NOT_EQUALS":
|
|
219
|
+
e = n !== l;
|
|
220
|
+
break;
|
|
221
|
+
case "GREATER_THAN":
|
|
222
|
+
e = (Number(n) || n) > (Number(l) || l);
|
|
223
|
+
break;
|
|
224
|
+
case "LESS_THAN":
|
|
225
|
+
e = (Number(n) || n) < (Number(l) || l);
|
|
226
|
+
break;
|
|
227
|
+
case "GREATER_THAN_EQUALS":
|
|
228
|
+
e = (Number(n) || n) >= (Number(l) || l);
|
|
229
|
+
break;
|
|
230
|
+
case "LESS_THAN_EQUALS":
|
|
231
|
+
e = (Number(n) || n) <= (Number(l) || l);
|
|
232
|
+
break;
|
|
233
|
+
default:
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
} catch {
|
|
239
|
+
}
|
|
240
|
+
return e;
|
|
241
|
+
}
|
|
242
|
+
getRowBySearchJoin(t) {
|
|
243
|
+
return Object.keys(this.searchJoin).some((e) => this.searchJoin[e].includes(t[e]));
|
|
244
|
+
}
|
|
245
|
+
hasFilter(t) {
|
|
246
|
+
return this.dynamicFilter[t] && this.dynamicFilter[t].length > 0;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
y.register("tek-memory", C);
|
|
250
|
+
class N extends z {
|
|
251
|
+
/**
|
|
252
|
+
* Create new datasource
|
|
253
|
+
* @param props Datasource properties
|
|
254
|
+
*/
|
|
255
|
+
constructor(t) {
|
|
256
|
+
super({ ...t, lazyLoad: !0 });
|
|
257
|
+
/**
|
|
258
|
+
* Dynamic Filter Operations
|
|
259
|
+
*/
|
|
260
|
+
s(this, "dynamicFilterOperations", x);
|
|
261
|
+
/**
|
|
262
|
+
* Dynamic Filter Relations
|
|
263
|
+
*/
|
|
264
|
+
s(this, "dynamicFilterRelations", V);
|
|
265
|
+
/**
|
|
266
|
+
* Dynamic Filter applied flag
|
|
267
|
+
*/
|
|
268
|
+
s(this, "dynamicFilterApplied", "");
|
|
269
|
+
this.watchUrl || (this.dynamicFilter = this.getInitValue("dynamicFilter", t.dynamicFilter, {}), this.searchJoin = this.getInitValue("searchJoin", t.searchJoin, {})), this.lazyLoad = this.getInitValue("lazyLoad", t.lazyLoad, this.lazyLoad), this.createAccessors(), this.createObjAccessors(this.dynamicFilter, "dynamicFilter"), this.createObjAccessors(this.searchJoin, "searchJoin");
|
|
270
|
+
}
|
|
271
|
+
updateReservedKeys() {
|
|
272
|
+
this.reservedKeys.dynamic_filter = !0, this.reservedKeys.search_join = !0;
|
|
273
|
+
}
|
|
274
|
+
updateInternalProperties(t = {}) {
|
|
275
|
+
if (!this.watchUrl) return;
|
|
276
|
+
this.updateReservedKeys(), super.updateInternalProperties(t);
|
|
277
|
+
const e = E.getParsedQueryStringFromUrl();
|
|
278
|
+
this.dynamicFilter = this.getEncodedParam(e.dynamic_filter, t.dynamicFilter), this.searchJoin = this.getEncodedParam(e.search_join, t.searchJoin);
|
|
279
|
+
}
|
|
280
|
+
getEncodedParam(t, e = {}) {
|
|
281
|
+
return t ? JSON.parse(atob(t)) : e;
|
|
282
|
+
}
|
|
283
|
+
getQueryStringValues() {
|
|
284
|
+
const t = super.getQueryStringValues();
|
|
285
|
+
return this.dynamicFilter && Object.keys(this.dynamicFilter).length && (t.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter))), this.searchJoin && Object.keys(this.searchJoin).length && (t.search_join = btoa(JSON.stringify(this.searchJoin))), t;
|
|
286
|
+
}
|
|
287
|
+
getUrlQueryString() {
|
|
288
|
+
const t = super.getUrlQueryString(), e = E.getParsedQueryStringFromUrl();
|
|
289
|
+
let o = "";
|
|
290
|
+
e.dynamic_filter && (o = `&${E.getFormattedQueryString({
|
|
291
|
+
dynamic_filter: e.dynamic_filter
|
|
292
|
+
})}`);
|
|
293
|
+
let r = "";
|
|
294
|
+
return e.search_join && (r = `&${E.getFormattedQueryString({
|
|
295
|
+
search_join: e.search_join
|
|
296
|
+
})}`), t + o + r;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Adds a new dynamic filter position or replace if exists
|
|
300
|
+
* @param column Dynamic Filter column name
|
|
301
|
+
* @param value Dynamic Filter value
|
|
302
|
+
* @returns Promise with data collection
|
|
303
|
+
*/
|
|
304
|
+
addDynamicFilter(t, e) {
|
|
305
|
+
return this.isValidDynamicFilterValue(t, e) ? (this.dynamicFilter[t] = e, this.updateDynamicFilter()) : this.removeDynamicFilter(t);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Removes a dynamic filter position
|
|
309
|
+
* @param column Dynamic Filter column name
|
|
310
|
+
* @returns Promise with data collection
|
|
311
|
+
*/
|
|
312
|
+
removeDynamicFilter(t) {
|
|
313
|
+
return delete this.dynamicFilter[t], this.updateDynamicFilter();
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Sets new dynamic filter value
|
|
317
|
+
* @param filter Dynamic Filter value
|
|
318
|
+
* @returns Promise with data collection
|
|
319
|
+
*/
|
|
320
|
+
setDynamicFilter(t) {
|
|
321
|
+
return this.dynamicFilter = {}, Object.keys(t).forEach((e) => {
|
|
322
|
+
this.isValidDynamicFilterValue(e, t[e]) ? this.dynamicFilter[e] = t[e] : delete this.dynamicFilter[e];
|
|
323
|
+
}), this.updateDynamicFilter();
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Clears Dynamic filter value
|
|
327
|
+
* @returns Promise with data collection
|
|
328
|
+
*/
|
|
329
|
+
clearDynamicFilter() {
|
|
330
|
+
return this.dynamicFilter = {}, this.updateDynamicFilter();
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Resets page and selected rows and tries to update the url
|
|
334
|
+
* @returns Promise with data collection
|
|
335
|
+
*/
|
|
336
|
+
async updateDynamicFilter() {
|
|
337
|
+
return this.page = this.firstPage, this.selectedRows = [], this.visibleSelectedRows = [], this.watchUrl && (this.dynamicFilter && Object.keys(this.dynamicFilter).length ? E.updateQueryString({
|
|
338
|
+
dynamic_filter: btoa(JSON.stringify(this.dynamicFilter))
|
|
339
|
+
}) : E.updateQueryString({
|
|
340
|
+
dynamic_filter: void 0
|
|
341
|
+
})), this.get();
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Checks if a filter value is valid
|
|
345
|
+
* @param value Filter value
|
|
346
|
+
* @returns Is valid filter value
|
|
347
|
+
*/
|
|
348
|
+
isValidDynamicFilterValue(t, e) {
|
|
349
|
+
return !this.reservedKeys[t] && e && e.length > 0 && e.every(
|
|
350
|
+
(o) => this.dynamicFilterOperations[o.operation] && this.dynamicFilterRelations[o.relation] && o.value !== "" && o.value !== null
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Retrieves request params
|
|
355
|
+
*/
|
|
356
|
+
getRequestParams() {
|
|
357
|
+
const t = super.getRequestParams(), e = (r) => !!(r && Object.keys(r).length), o = this.dynamicFilter && Object.keys(this.dynamicFilter).every((r) => {
|
|
358
|
+
const a = this.dynamicFilter[r];
|
|
359
|
+
return a && a.length > 0 && this.isValidDynamicFilterValue(r, a);
|
|
360
|
+
});
|
|
361
|
+
return e(this.dynamicFilter) && o && (t.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter))), e(this.searchJoin) && (t.search_join = btoa(JSON.stringify(this.searchJoin))), t;
|
|
362
|
+
}
|
|
363
|
+
hasFilter(t) {
|
|
364
|
+
return this.dynamicFilter[t] && this.dynamicFilter[t].length > 0;
|
|
365
|
+
}
|
|
366
|
+
clone() {
|
|
367
|
+
return {
|
|
368
|
+
...super.clone(),
|
|
369
|
+
dynamicFilter: this.dynamicFilter,
|
|
370
|
+
searchJoin: this.searchJoin,
|
|
371
|
+
type: "tek-rest"
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
y.register("tek-rest", N);
|
|
376
|
+
class Dt {
|
|
377
|
+
constructor(i) {
|
|
378
|
+
s(this, "config");
|
|
379
|
+
this.config = i;
|
|
380
|
+
}
|
|
381
|
+
buildComponent(i) {
|
|
382
|
+
const { type: t, label: e, portrait: o = !0, iconName: r } = this.config, a = o ? "portrait" : "landscape";
|
|
383
|
+
return {
|
|
384
|
+
label: e,
|
|
385
|
+
iconName: r,
|
|
386
|
+
name: `${i.name}_export_${t}_${a}`,
|
|
387
|
+
component: "ZdButton",
|
|
388
|
+
flat: !0,
|
|
389
|
+
events: {
|
|
390
|
+
click: () => i.getReport(t, o)
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
class Ct {
|
|
396
|
+
constructor(i) {
|
|
397
|
+
s(this, "config");
|
|
398
|
+
this.config = i;
|
|
399
|
+
}
|
|
400
|
+
formatName(i, t, e) {
|
|
401
|
+
return `${e.name}_export_${t}_${i}`;
|
|
402
|
+
}
|
|
403
|
+
buildTooltip(i, t, e) {
|
|
404
|
+
const { label: o } = i;
|
|
405
|
+
return {
|
|
406
|
+
name: this.formatName(`tooltip_${o}`, t, e),
|
|
407
|
+
component: "ZdTooltip",
|
|
408
|
+
bottom: !0,
|
|
409
|
+
label: o,
|
|
410
|
+
children: []
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
buildButton(i, t, e) {
|
|
414
|
+
const { cssClass: o, label: r, iconName: a, reportParams: n } = i, { portrait: l, rowObj: h } = n || {};
|
|
415
|
+
return {
|
|
416
|
+
name: this.formatName(`button_${r}`, t, e),
|
|
417
|
+
component: "ZdButton",
|
|
418
|
+
cssClass: o,
|
|
419
|
+
icon: !0,
|
|
420
|
+
iconName: a,
|
|
421
|
+
events: {
|
|
422
|
+
click: () => e.getReport(t, l, h)
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
buildDivider(i, t, e) {
|
|
427
|
+
const { label: o } = i;
|
|
428
|
+
return {
|
|
429
|
+
name: this.formatName(`divider_${o}`, t, e),
|
|
430
|
+
component: "ZdDivider",
|
|
431
|
+
cssClass: "zd-my-1",
|
|
432
|
+
vertical: !0
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
buildComponent(i) {
|
|
436
|
+
const { type: t, label: e, multiOption: o } = this.config, r = o.flatMap((l) => [
|
|
437
|
+
{
|
|
438
|
+
...this.buildTooltip(l, t, i),
|
|
439
|
+
children: [this.buildButton(l, t, i)]
|
|
440
|
+
},
|
|
441
|
+
this.buildDivider(l, t, i)
|
|
442
|
+
]);
|
|
443
|
+
r.pop();
|
|
444
|
+
const a = {
|
|
445
|
+
name: this.formatName("text", t, i),
|
|
446
|
+
component: "ZdText",
|
|
447
|
+
cssClass: "zd-display-flex zd-align-center zd-flex-grow-1 tek-grid-export-multioption-text",
|
|
448
|
+
events: {
|
|
449
|
+
click: ({ event: l }) => l == null ? void 0 : l.stopPropagation()
|
|
450
|
+
},
|
|
451
|
+
text: e || ""
|
|
452
|
+
};
|
|
453
|
+
return {
|
|
454
|
+
name: this.formatName("row", t, i),
|
|
455
|
+
component: "ZdRow",
|
|
456
|
+
cssClass: "zd-display-flex zd-ma-0 zd-py-0 zd-gap-x-1 tek-grid-export-multioption-row",
|
|
457
|
+
children: [a, ...r]
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
class Nt extends Error {
|
|
462
|
+
constructor(i) {
|
|
463
|
+
super(`[Teknisa Common err]: ${i}`);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
class Ot extends Nt {
|
|
467
|
+
constructor() {
|
|
468
|
+
super(
|
|
469
|
+
"TekGrid can't automatically delete rows when selectAllPages property is true. You should delete them manually using the beforeDelete event and preventing the default execution"
|
|
470
|
+
), this.name = "TekGridDeleteRowsError";
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
class ft {
|
|
474
|
+
constructor(i, t) {
|
|
475
|
+
s(this, "grid");
|
|
476
|
+
s(this, "groupsVisibility");
|
|
477
|
+
s(this, "atoms", {
|
|
478
|
+
TITLE: "_gridTitle",
|
|
479
|
+
HIDE_BUTTON: "_hideButton",
|
|
480
|
+
ADD_BUTTON: "_addButton",
|
|
481
|
+
DELETE_BUTTON: "_deleteButton",
|
|
482
|
+
REFRESH_BUTTON: "_refreshButton",
|
|
483
|
+
COLUMNS_BUTTON: "_columnsButton",
|
|
484
|
+
LAYOUT_BUTTON: "_layout_options",
|
|
485
|
+
EXPORT_BUTTON: "_exportButton",
|
|
486
|
+
ACTIONS_BUTTON: "_actionsButton",
|
|
487
|
+
SAVE_BUTTON: "_saveButton",
|
|
488
|
+
CANCEL_BUTTON: "_cancelButton",
|
|
489
|
+
SEARCH: "_gridSearch",
|
|
490
|
+
FILTER_BUTTON: "_filterButton",
|
|
491
|
+
FILTER_MODAL: "-filter-modal",
|
|
492
|
+
FILTER_FORM: "-filter-form",
|
|
493
|
+
EXPORT_DROPDOWN: "_export_dropdown",
|
|
494
|
+
ACTIONS_DROPDOWN: "_actions_dropdown",
|
|
495
|
+
HIDE_TOOLTIP: "_hideTooltip",
|
|
496
|
+
TOOLBAR_DIV: "_toolbarDiv",
|
|
497
|
+
NOT_EDITING_SPAN: "_notEditingSpan",
|
|
498
|
+
ADD_TOOLTIP: "_add_tooltip",
|
|
499
|
+
DELETE_TOOLTIP: "_delete_tooltip",
|
|
500
|
+
DIVIDER1: "_divider1",
|
|
501
|
+
REFRESH_TOOLTIP: "_refresh_tooltip",
|
|
502
|
+
DIVIDER2: "_divider2",
|
|
503
|
+
COLUMNS_TOOLTIP: "_columns_button_tooltip",
|
|
504
|
+
DIVIDER_ACTIONS: "_dividerActions",
|
|
505
|
+
DIVIDER3: "_divider3",
|
|
506
|
+
FILTER_TOOLTIP: "_filter_tooltip"
|
|
507
|
+
});
|
|
508
|
+
s(this, "filterButton");
|
|
509
|
+
this.grid = i, this.groupsVisibility = t;
|
|
510
|
+
}
|
|
511
|
+
getAtomName(i) {
|
|
512
|
+
return `${this.grid.name}${this.atoms[i]}`;
|
|
513
|
+
}
|
|
514
|
+
getAtomInstance(i) {
|
|
515
|
+
return I.getInstance(`${this.grid.name}${this.atoms[i]}`);
|
|
516
|
+
}
|
|
517
|
+
loadFilterButton({ component: i }) {
|
|
518
|
+
this.filterButton = i;
|
|
519
|
+
}
|
|
520
|
+
getFilterInputs(i) {
|
|
521
|
+
return this.filterButton.getFilterInputs(i);
|
|
522
|
+
}
|
|
523
|
+
getOption(i) {
|
|
524
|
+
return i.multiOption ? new Ct(i) : new Dt(i);
|
|
525
|
+
}
|
|
526
|
+
getExportConfigButtons() {
|
|
527
|
+
return this.grid.exportConfig.map((i) => this.getOption(i).buildComponent(this.grid));
|
|
528
|
+
}
|
|
529
|
+
hideButtonClick({ event: i }) {
|
|
530
|
+
if (!i.defaultPrevented) {
|
|
531
|
+
const t = I.getInstance(`${this.grid.name}_toolbarDiv`);
|
|
532
|
+
t && (t.isVisible = !t.isVisible);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
cancelChanges({ event: i }) {
|
|
536
|
+
this.grid.callEvent("beforeCancel", { component: this.grid, event: i }), i.defaultPrevented || ((async () => (await this.grid.cancelEditedRows(), this.grid.editingNewRows = !1))(), this.grid.callEvent("afterCancel", { component: this.grid }));
|
|
537
|
+
}
|
|
538
|
+
saveChanges({ event: i }) {
|
|
539
|
+
this.grid.callEvent("beforeSave", { component: this.grid, event: i }), i.defaultPrevented || ((async () => (await this.grid.saveEditedRows(), this.grid.editingNewRows = !1))(), this.grid.callEvent("afterSave", { component: this.grid }));
|
|
540
|
+
}
|
|
541
|
+
addButtonClick({ event: i }) {
|
|
542
|
+
this.grid.editNewRowsOnly && (this.grid.editingNewRows = !0), this.grid.callEvent("addClick", { component: this.grid, event: i });
|
|
543
|
+
}
|
|
544
|
+
deleteButtonClick({ event: i }) {
|
|
545
|
+
if (this.grid.callEvent("beforeDelete", { component: this.grid, event: i }), !i.defaultPrevented) {
|
|
546
|
+
if (this.grid.selectAllPages)
|
|
547
|
+
throw new Ot();
|
|
548
|
+
this.grid.deleteRows(), this.grid.callEvent("afterDelete", { component: this.grid });
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
reloadGrid({ event: i }) {
|
|
552
|
+
this.grid.callEvent("beforeReload", { component: this.grid, event: i }), !(i != null && i.defaultPrevented) && this.grid.reload();
|
|
553
|
+
}
|
|
554
|
+
getDefaultToolbarItems(i) {
|
|
555
|
+
return {
|
|
556
|
+
addButton: () => ({
|
|
557
|
+
name: this.getAtomName("ADD_TOOLTIP"),
|
|
558
|
+
component: "ZdTooltip",
|
|
559
|
+
label: "TEKGRID_ADD",
|
|
560
|
+
bottom: !0,
|
|
561
|
+
children: [
|
|
562
|
+
{
|
|
563
|
+
name: this.getAtomName("ADD_BUTTON"),
|
|
564
|
+
component: "ZdButton",
|
|
565
|
+
icon: !0,
|
|
566
|
+
iconName: "mdi-plus-box",
|
|
567
|
+
isVisible: `{{GridController_${this.grid.name}.showAddButton}}`,
|
|
568
|
+
events: {
|
|
569
|
+
click: this.addButtonClick.bind(this)
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
}),
|
|
574
|
+
deleteButton: () => ({
|
|
575
|
+
name: this.getAtomName("DELETE_TOOLTIP"),
|
|
576
|
+
component: "ZdTooltip",
|
|
577
|
+
label: "TEKGRID_DELETE",
|
|
578
|
+
bottom: !0,
|
|
579
|
+
children: [
|
|
580
|
+
{
|
|
581
|
+
name: this.getAtomName("DELETE_BUTTON"),
|
|
582
|
+
component: "ZdButton",
|
|
583
|
+
icon: !0,
|
|
584
|
+
iconName: "mdi-trash-can-outline",
|
|
585
|
+
isVisible: `{{GridController_${this.grid.name}.showDeleteButton}}`,
|
|
586
|
+
disabled: `{{GridController_${this.grid.name}.disableDeleteButton}}`,
|
|
587
|
+
events: {
|
|
588
|
+
click: this.deleteButtonClick.bind(this)
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}),
|
|
593
|
+
divider: (t) => ({
|
|
594
|
+
name: `${this.grid.name}_divider${t}`,
|
|
595
|
+
component: "ZdDivider",
|
|
596
|
+
cssClass: "toolbar-divider",
|
|
597
|
+
vertical: !0
|
|
598
|
+
}),
|
|
599
|
+
refreshButton: () => ({
|
|
600
|
+
name: this.getAtomName("REFRESH_TOOLTIP"),
|
|
601
|
+
component: "ZdTooltip",
|
|
602
|
+
label: "TEKGRID_REFRESH",
|
|
603
|
+
bottom: !0,
|
|
604
|
+
children: [
|
|
605
|
+
{
|
|
606
|
+
name: this.getAtomName("REFRESH_BUTTON"),
|
|
607
|
+
component: "ZdButton",
|
|
608
|
+
icon: !0,
|
|
609
|
+
iconName: "refresh",
|
|
610
|
+
isVisible: `{{GridController_${this.grid.name}.showReloadButton}}`,
|
|
611
|
+
events: {
|
|
612
|
+
click: this.reloadGrid.bind(this)
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
}),
|
|
617
|
+
columnsButton: () => ({
|
|
618
|
+
name: this.getAtomName("COLUMNS_BUTTON"),
|
|
619
|
+
component: "TekGridColumnsButton",
|
|
620
|
+
isVisible: `{{GridController_${this.grid.name}.showColumnsButton}}`,
|
|
621
|
+
iterableComponentName: this.grid.name,
|
|
622
|
+
hideGroups: this.groupsVisibility === "hide",
|
|
623
|
+
ignoreColumns: `{{GridController_${this.grid.name}.columnsButtonIgnore}}`
|
|
624
|
+
}),
|
|
625
|
+
layoutOptions: () => ({
|
|
626
|
+
name: this.getAtomName("LAYOUT_BUTTON"),
|
|
627
|
+
component: "TekGridLayoutOptions",
|
|
628
|
+
isVisible: `{{GridController_${this.grid.name}.showLayoutOptionsButton}}`
|
|
629
|
+
}),
|
|
630
|
+
exportDropdown: () => ({
|
|
631
|
+
name: this.getAtomName("EXPORT_DROPDOWN"),
|
|
632
|
+
component: "ZdDropdown",
|
|
633
|
+
cssClass: "tekgrid-actions-dropdown",
|
|
634
|
+
offsetY: !0,
|
|
635
|
+
activator: {
|
|
636
|
+
name: this.getAtomName("EXPORT_BUTTON"),
|
|
637
|
+
component: "ZdButton",
|
|
638
|
+
icon: !0,
|
|
639
|
+
iconName: "mdi-file-download-outline",
|
|
640
|
+
isVisible: `{{GridController_${this.grid.name}.showExportButton}}`
|
|
641
|
+
},
|
|
642
|
+
children: this.grid.exportActions || i
|
|
643
|
+
}),
|
|
644
|
+
actionsDropdown: () => ({
|
|
645
|
+
name: this.getAtomName("ACTIONS_DROPDOWN"),
|
|
646
|
+
component: "ZdDropdown",
|
|
647
|
+
cssClass: "tekgrid-actions-dropdown",
|
|
648
|
+
offsetY: !0,
|
|
649
|
+
activator: {
|
|
650
|
+
name: this.getAtomName("ACTIONS_BUTTON"),
|
|
651
|
+
component: "ZdButton",
|
|
652
|
+
icon: !0,
|
|
653
|
+
iconName: "mdi-dots-vertical",
|
|
654
|
+
isVisible: `{{GridController_${this.grid.name}.showActionsButton}}`
|
|
655
|
+
},
|
|
656
|
+
children: this.grid.actions
|
|
657
|
+
}),
|
|
658
|
+
saveButton: () => ({
|
|
659
|
+
name: this.getAtomName("SAVE_BUTTON"),
|
|
660
|
+
component: "ZdButton",
|
|
661
|
+
label: "TEKGRID_SAVE",
|
|
662
|
+
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
663
|
+
small: !0,
|
|
664
|
+
events: {
|
|
665
|
+
click: this.saveChanges.bind(this)
|
|
666
|
+
}
|
|
667
|
+
}),
|
|
668
|
+
cancelButton: () => ({
|
|
669
|
+
name: this.getAtomName("CANCEL_BUTTON"),
|
|
670
|
+
component: "ZdButton",
|
|
671
|
+
label: "TEKGRID_CANCEL",
|
|
672
|
+
outline: !0,
|
|
673
|
+
cssClass: "zd-mx-2",
|
|
674
|
+
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
675
|
+
small: !0,
|
|
676
|
+
events: {
|
|
677
|
+
click: this.cancelChanges.bind(this)
|
|
678
|
+
}
|
|
679
|
+
}),
|
|
680
|
+
gridSearch: () => ({
|
|
681
|
+
name: this.getAtomName("SEARCH"),
|
|
682
|
+
component: "ZdSearch",
|
|
683
|
+
cssClass: "zd-grid-search",
|
|
684
|
+
iterableComponentName: `${this.grid.name}`,
|
|
685
|
+
isVisible: `{{GridController_${this.grid.name}.showSearchInput}}`
|
|
686
|
+
}),
|
|
687
|
+
filterButton: () => ({
|
|
688
|
+
name: this.getAtomName("FILTER_TOOLTIP"),
|
|
689
|
+
component: "ZdTooltip",
|
|
690
|
+
label: "TEKGRID_FILTER",
|
|
691
|
+
bottom: !0,
|
|
692
|
+
children: [
|
|
693
|
+
{
|
|
694
|
+
name: this.getAtomName("FILTER_BUTTON"),
|
|
695
|
+
component: "TekGridFilterButton",
|
|
696
|
+
grid: this.grid,
|
|
697
|
+
gridName: this.grid.name,
|
|
698
|
+
showCheckboxAll: this.grid.showCheckboxAllFilter,
|
|
699
|
+
isVisible: `{{GridController_${this.grid.name}.showFilterButton}}`,
|
|
700
|
+
events: {
|
|
701
|
+
onCreated: this.loadFilterButton.bind(this)
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
]
|
|
705
|
+
})
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
processUserToolbarItems(i) {
|
|
709
|
+
const t = this.getDefaultToolbarItems(i), e = {
|
|
710
|
+
addButton: "addButton",
|
|
711
|
+
deleteButton: "deleteButton",
|
|
712
|
+
refreshButton: "showReload",
|
|
713
|
+
columnsButton: "columnsButton",
|
|
714
|
+
layoutOptions: "showLayoutOptions",
|
|
715
|
+
exportDropdown: "showExport",
|
|
716
|
+
actionsDropdown: "showExport",
|
|
717
|
+
gridSearch: "showSearch",
|
|
718
|
+
filterButton: "filterButton"
|
|
719
|
+
}, o = [];
|
|
720
|
+
return this.grid.toolbarConfig.forEach((r, a) => {
|
|
721
|
+
if (typeof r == "object" && r.component) {
|
|
722
|
+
o.push(r);
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
if (typeof r != "string") {
|
|
726
|
+
console.warn("Invalid item in toolbarConfig:", r);
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
const n = e[r];
|
|
730
|
+
n && !this.grid[n] && (this.grid[n] = !0);
|
|
731
|
+
const l = t[r];
|
|
732
|
+
if (!l) {
|
|
733
|
+
console.warn(`Predefined toolbar item "${r}" not found.`);
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const h = l(a);
|
|
737
|
+
h && o.push(h);
|
|
738
|
+
}), o;
|
|
739
|
+
}
|
|
740
|
+
getHeaderItems() {
|
|
741
|
+
return [
|
|
742
|
+
{
|
|
743
|
+
name: this.getAtomName("TITLE"),
|
|
744
|
+
component: "ZdText",
|
|
745
|
+
cssClass: "toolbar-title",
|
|
746
|
+
tag: "h2",
|
|
747
|
+
text: this.grid.title,
|
|
748
|
+
title: this.grid.title
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: `${this.grid.name}_spacer`,
|
|
752
|
+
component: "VSpacer"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
name: this.getAtomName("HIDE_TOOLTIP"),
|
|
756
|
+
component: "ZdTooltip",
|
|
757
|
+
label: `{{GridController_${this.grid.name}.tooltipName}}`,
|
|
758
|
+
bottom: !0,
|
|
759
|
+
children: [
|
|
760
|
+
{
|
|
761
|
+
name: this.getAtomName("HIDE_BUTTON"),
|
|
762
|
+
component: "ZdButton",
|
|
763
|
+
flat: !0,
|
|
764
|
+
icon: !0,
|
|
765
|
+
iconName: "mdi-chevron-right",
|
|
766
|
+
color: "grey",
|
|
767
|
+
isVisible: `{{GridController_${this.grid.name}.showHideButton}}`,
|
|
768
|
+
cssClass: `{{GridController_${this.grid.name}.toolbarClass}}`,
|
|
769
|
+
events: {
|
|
770
|
+
click: this.hideButtonClick.bind(this)
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
];
|
|
776
|
+
}
|
|
777
|
+
getProperties() {
|
|
778
|
+
const i = this.getExportConfigButtons();
|
|
779
|
+
return this.grid.toolbarConfig && this.grid.toolbarConfig.length > 0 ? [
|
|
780
|
+
...this.getHeaderItems(),
|
|
781
|
+
{
|
|
782
|
+
name: this.getAtomName("TOOLBAR_DIV"),
|
|
783
|
+
component: "ZdTag",
|
|
784
|
+
tag: "div",
|
|
785
|
+
cssStyle: "display: flex; align-items: center",
|
|
786
|
+
cssClass: `{{GridController_${this.grid.name}.toolbarCollapseClass}}`,
|
|
787
|
+
isVisible: `{{GridController_${this.grid.name}.showToolbar}}`,
|
|
788
|
+
children: this.processUserToolbarItems(i)
|
|
789
|
+
}
|
|
790
|
+
] : [
|
|
791
|
+
...this.getHeaderItems(),
|
|
792
|
+
{
|
|
793
|
+
name: this.getAtomName("TOOLBAR_DIV"),
|
|
794
|
+
component: "ZdTag",
|
|
795
|
+
tag: "div",
|
|
796
|
+
cssStyle: "display: flex; align-items: center",
|
|
797
|
+
cssClass: `{{GridController_${this.grid.name}.toolbarCollapseClass}}`,
|
|
798
|
+
isVisible: `{{GridController_${this.grid.name}.showToolbar}}`,
|
|
799
|
+
children: [
|
|
800
|
+
{
|
|
801
|
+
name: this.getAtomName("NOT_EDITING_SPAN"),
|
|
802
|
+
component: "ZdTag",
|
|
803
|
+
tag: "span",
|
|
804
|
+
cssStyle: "display: flex",
|
|
805
|
+
isVisible: `{{GridController_${this.grid.name}.isNotEditing}}`,
|
|
806
|
+
children: [
|
|
807
|
+
{
|
|
808
|
+
name: this.getAtomName("ADD_TOOLTIP"),
|
|
809
|
+
component: "ZdTooltip",
|
|
810
|
+
label: "TEKGRID_ADD",
|
|
811
|
+
bottom: !0,
|
|
812
|
+
children: [
|
|
813
|
+
{
|
|
814
|
+
name: this.getAtomName("ADD_BUTTON"),
|
|
815
|
+
component: "ZdButton",
|
|
816
|
+
icon: !0,
|
|
817
|
+
iconName: "mdi-plus-box",
|
|
818
|
+
isVisible: `{{GridController_${this.grid.name}.showAddButton}}`,
|
|
819
|
+
events: {
|
|
820
|
+
click: this.addButtonClick.bind(this)
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
name: this.getAtomName("DELETE_TOOLTIP"),
|
|
827
|
+
component: "ZdTooltip",
|
|
828
|
+
label: "TEKGRID_DELETE",
|
|
829
|
+
bottom: !0,
|
|
830
|
+
children: [
|
|
831
|
+
{
|
|
832
|
+
name: this.getAtomName("DELETE_BUTTON"),
|
|
833
|
+
component: "ZdButton",
|
|
834
|
+
icon: !0,
|
|
835
|
+
iconName: "mdi-trash-can-outline",
|
|
836
|
+
isVisible: `{{GridController_${this.grid.name}.showDeleteButton}}`,
|
|
837
|
+
disabled: `{{GridController_${this.grid.name}.disableDeleteButton}}`,
|
|
838
|
+
events: {
|
|
839
|
+
click: this.deleteButtonClick.bind(this)
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: this.getAtomName("DIVIDER1"),
|
|
846
|
+
component: "ZdDivider",
|
|
847
|
+
cssClass: "toolbar-divider",
|
|
848
|
+
vertical: !0,
|
|
849
|
+
isVisible: `{{GridController_${this.grid.name}.showDivider1}}`
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
name: this.getAtomName("REFRESH_TOOLTIP"),
|
|
853
|
+
component: "ZdTooltip",
|
|
854
|
+
label: "TEKGRID_REFRESH",
|
|
855
|
+
bottom: !0,
|
|
856
|
+
children: [
|
|
857
|
+
{
|
|
858
|
+
name: this.getAtomName("REFRESH_BUTTON"),
|
|
859
|
+
component: "ZdButton",
|
|
860
|
+
icon: !0,
|
|
861
|
+
iconName: "refresh",
|
|
862
|
+
isVisible: `{{GridController_${this.grid.name}.showReloadButton}}`,
|
|
863
|
+
events: {
|
|
864
|
+
click: this.reloadGrid.bind(this)
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
name: this.getAtomName("DIVIDER2"),
|
|
871
|
+
component: "ZdDivider",
|
|
872
|
+
cssClass: "toolbar-divider",
|
|
873
|
+
vertical: !0,
|
|
874
|
+
isVisible: `{{GridController_${this.grid.name}.showDivider2}}`
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
name: this.getAtomName("COLUMNS_BUTTON"),
|
|
878
|
+
component: "TekGridColumnsButton",
|
|
879
|
+
isVisible: `{{GridController_${this.grid.name}.showColumnsButton}}`,
|
|
880
|
+
iterableComponentName: this.grid.name,
|
|
881
|
+
hideGroups: this.groupsVisibility === "hide",
|
|
882
|
+
ignoreColumns: `{{GridController_${this.grid.name}.columnsButtonIgnore}}`
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: this.getAtomName("LAYOUT_BUTTON"),
|
|
886
|
+
component: "TekGridLayoutOptions",
|
|
887
|
+
isVisible: `{{GridController_${this.grid.name}.showLayoutOptionsButton}}`
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
name: this.getAtomName("DIVIDER_ACTIONS"),
|
|
891
|
+
component: "ZdDivider",
|
|
892
|
+
cssClass: "toolbar-divider",
|
|
893
|
+
vertical: !0,
|
|
894
|
+
isVisible: `{{GridController_${this.grid.name}.showActionAndExportButton}}`
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: this.getAtomName("EXPORT_DROPDOWN"),
|
|
898
|
+
component: "ZdDropdown",
|
|
899
|
+
cssClass: "tekgrid-actions-dropdown",
|
|
900
|
+
offsetY: !0,
|
|
901
|
+
activator: {
|
|
902
|
+
name: this.getAtomName("EXPORT_BUTTON"),
|
|
903
|
+
component: "ZdButton",
|
|
904
|
+
icon: !0,
|
|
905
|
+
iconName: "mdi-file-download-outline",
|
|
906
|
+
isVisible: `{{GridController_${this.grid.name}.showExportButton}}`
|
|
907
|
+
},
|
|
908
|
+
children: this.grid.exportActions || i
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: this.getAtomName("ACTIONS_DROPDOWN"),
|
|
912
|
+
component: "ZdDropdown",
|
|
913
|
+
cssClass: "tekgrid-actions-dropdown",
|
|
914
|
+
offsetY: !0,
|
|
915
|
+
activator: {
|
|
916
|
+
name: this.getAtomName("ACTIONS_BUTTON"),
|
|
917
|
+
component: "ZdButton",
|
|
918
|
+
icon: !0,
|
|
919
|
+
iconName: "mdi-dots-vertical",
|
|
920
|
+
isVisible: `{{GridController_${this.grid.name}.showActionsButton}}`
|
|
921
|
+
},
|
|
922
|
+
children: this.grid.actions
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
name: this.getAtomName("DIVIDER3"),
|
|
926
|
+
component: "ZdDivider",
|
|
927
|
+
cssClass: "toolbar-divider",
|
|
928
|
+
vertical: !0,
|
|
929
|
+
isVisible: `{{GridController_${this.grid.name}.showDivider3}}`
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: this.getAtomName("SAVE_BUTTON"),
|
|
935
|
+
component: "ZdButton",
|
|
936
|
+
label: "TEKGRID_SAVE",
|
|
937
|
+
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
938
|
+
small: !0,
|
|
939
|
+
events: {
|
|
940
|
+
click: this.saveChanges.bind(this)
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
name: this.getAtomName("CANCEL_BUTTON"),
|
|
945
|
+
component: "ZdButton",
|
|
946
|
+
label: "TEKGRID_CANCEL",
|
|
947
|
+
outline: !0,
|
|
948
|
+
cssClass: "zd-mx-2",
|
|
949
|
+
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
950
|
+
small: !0,
|
|
951
|
+
events: {
|
|
952
|
+
click: this.cancelChanges.bind(this)
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
name: this.getAtomName("SEARCH"),
|
|
957
|
+
component: "ZdSearch",
|
|
958
|
+
cssClass: "zd-grid-search",
|
|
959
|
+
iterableComponentName: `${this.grid.name}`,
|
|
960
|
+
isVisible: `{{GridController_${this.grid.name}.showSearchInput}}`
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: this.getAtomName("FILTER_TOOLTIP"),
|
|
964
|
+
component: "ZdTooltip",
|
|
965
|
+
label: "TEKGRID_FILTER",
|
|
966
|
+
bottom: !0,
|
|
967
|
+
children: [
|
|
968
|
+
{
|
|
969
|
+
name: this.getAtomName("FILTER_BUTTON"),
|
|
970
|
+
component: "TekGridFilterButton",
|
|
971
|
+
grid: this.grid,
|
|
972
|
+
gridName: this.grid.name,
|
|
973
|
+
showCheckboxAll: this.grid.showCheckboxAllFilter,
|
|
974
|
+
isVisible: `{{GridController_${this.grid.name}.showFilterButton}}`,
|
|
975
|
+
events: {
|
|
976
|
+
onCreated: this.loadFilterButton.bind(this)
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
]
|
|
982
|
+
}
|
|
983
|
+
];
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
class yt {
|
|
987
|
+
async searchColumn(i, t) {
|
|
988
|
+
const e = i.filter((r) => {
|
|
989
|
+
var a;
|
|
990
|
+
return !!((a = r.componentProps) != null && a.datasource) && !r.skipLookupSearch;
|
|
991
|
+
}), o = {};
|
|
992
|
+
if (t) {
|
|
993
|
+
const r = e.map(async (a) => {
|
|
994
|
+
const n = await a.memorySearch(t), l = a.componentProps.datasource.uniqueKey;
|
|
995
|
+
o[a.name] = n.map((h) => h[l]);
|
|
996
|
+
});
|
|
997
|
+
await Promise.all(r);
|
|
998
|
+
}
|
|
999
|
+
return o;
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
class St {
|
|
1003
|
+
factory(i) {
|
|
1004
|
+
return y.factory({
|
|
1005
|
+
data: this.getFilterOptionsData(i),
|
|
1006
|
+
loadAll: !0,
|
|
1007
|
+
translate: ["text"]
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
getFilterOptionsData(i) {
|
|
1011
|
+
return Object.keys(i).map((e) => ({
|
|
1012
|
+
text: `TEKGRID_${e}`,
|
|
1013
|
+
value: e
|
|
1014
|
+
}));
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
class Gt {
|
|
1018
|
+
static getLabel(i) {
|
|
1019
|
+
return G.getLabel(i);
|
|
1020
|
+
}
|
|
1021
|
+
static getValue(i, t) {
|
|
1022
|
+
return G.getValue(i, t.componentProps.dateFormat);
|
|
1023
|
+
}
|
|
1024
|
+
static register(i, t, e) {
|
|
1025
|
+
G.register(i, t, e);
|
|
1026
|
+
}
|
|
1027
|
+
static unregister(i) {
|
|
1028
|
+
G.unregister(i);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
class U extends W {
|
|
1032
|
+
/* istanbul ignore next */
|
|
1033
|
+
/**
|
|
1034
|
+
* Creates a new TekGrid Column.
|
|
1035
|
+
* @param props TekGrid column properties
|
|
1036
|
+
*/
|
|
1037
|
+
constructor(t, e) {
|
|
1038
|
+
super(t);
|
|
1039
|
+
/* filter component props */
|
|
1040
|
+
s(this, "filterProps", []);
|
|
1041
|
+
/* column can be use to filter */
|
|
1042
|
+
s(this, "filterable", !0);
|
|
1043
|
+
/* Index of the column inside filter modal */
|
|
1044
|
+
s(this, "filterIndex");
|
|
1045
|
+
/* should not consider lookup column on search */
|
|
1046
|
+
s(this, "skipLookupSearch", !1);
|
|
1047
|
+
/* column is grouped */
|
|
1048
|
+
s(this, "groupedValue", !1);
|
|
1049
|
+
/* column group is opened */
|
|
1050
|
+
s(this, "groupOpenedValue", !1);
|
|
1051
|
+
/* Value to show when grouped value is empty */
|
|
1052
|
+
s(this, "groupLabelForEmptyValue", "");
|
|
1053
|
+
/* column has aggregation */
|
|
1054
|
+
s(this, "aggregationValue");
|
|
1055
|
+
/* column is visible */
|
|
1056
|
+
s(this, "isVisibleValue", !0);
|
|
1057
|
+
/**
|
|
1058
|
+
* Defines if the column should store the componentProps datasource.data in memory
|
|
1059
|
+
*/
|
|
1060
|
+
s(this, "storeData", !0);
|
|
1061
|
+
s(this, "grid");
|
|
1062
|
+
this.grid = e, this.isVisible = this.getInitValue("isVisible", t.isVisible, this.isVisible), this.filterProps = this.getInitValue("filterProps", t.filterProps, this.filterProps), this.filterable = this.getInitValue("filterable", t.filterable, this.filterable), this.filterIndex = this.getInitValue("filterIndex", t.filterIndex, this.filterIndex), this.skipLookupSearch = this.getInitValue("skipLookupSearch", t.skipLookupSearch, this.skipLookupSearch), this.grouped = this.getInitValue("grouped", t.grouped, this.grouped), this.groupOpened = this.getInitValue("groupOpened", t.groupOpened, this.groupOpened), this.aggregation = this.getInitValue("aggregation", t.aggregation, this.aggregation), this.groupLabelForEmptyValue = this.getInitValue(
|
|
1063
|
+
"groupLabelForEmptyValue",
|
|
1064
|
+
t.groupLabelForEmptyValue,
|
|
1065
|
+
this.groupLabelForEmptyValue
|
|
1066
|
+
), this.storeData = this.getInitValue("storeData", t.storeData, this.storeData), this.createAccessors();
|
|
1067
|
+
}
|
|
1068
|
+
async getBatchLookupData(t, e) {
|
|
1069
|
+
const o = [], r = [];
|
|
1070
|
+
return e.forEach((a) => {
|
|
1071
|
+
if (this.lookupData[a]) {
|
|
1072
|
+
o.push(this.lookupData[a]);
|
|
1073
|
+
return;
|
|
1074
|
+
}
|
|
1075
|
+
const n = this.lookupDatasource.data.findIndex((l) => l[t] === a);
|
|
1076
|
+
if (n !== -1) {
|
|
1077
|
+
this.lookupData[a] = this.lookupDatasource.data[n], o.push(this.lookupData[a]);
|
|
1078
|
+
return;
|
|
1079
|
+
}
|
|
1080
|
+
r.push(a);
|
|
1081
|
+
}), r.length > 0 && (await this.lookupFn(t, r), r.forEach((a) => {
|
|
1082
|
+
const n = this.lookupData[a];
|
|
1083
|
+
n && o.push(n);
|
|
1084
|
+
})), o;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Memory search, without changing lookupDatasource
|
|
1088
|
+
*/
|
|
1089
|
+
async memorySearch(t) {
|
|
1090
|
+
if (!this.lookupDatasource)
|
|
1091
|
+
throw new Error("Can't search in a column that doesn't have a datasource");
|
|
1092
|
+
let { data: e } = this.lookupDatasource;
|
|
1093
|
+
if (this.storeData)
|
|
1094
|
+
e.length || (e = await this.lookupDatasource.get());
|
|
1095
|
+
else {
|
|
1096
|
+
const n = y.factory({
|
|
1097
|
+
...this.componentProps.datasource,
|
|
1098
|
+
lazyLoad: !0,
|
|
1099
|
+
loadAll: !0
|
|
1100
|
+
});
|
|
1101
|
+
n.initialize(), e = await n.get();
|
|
1102
|
+
}
|
|
1103
|
+
const { dataText: o } = this.componentProps, r = Array.isArray(o) ? o : [o], a = y.factory({
|
|
1104
|
+
searchIn: r,
|
|
1105
|
+
data: e,
|
|
1106
|
+
type: "memory",
|
|
1107
|
+
loadAll: !0
|
|
1108
|
+
});
|
|
1109
|
+
return a.initialize(), a.setSearch(t);
|
|
1110
|
+
}
|
|
1111
|
+
get grouped() {
|
|
1112
|
+
return this.groupedValue;
|
|
1113
|
+
}
|
|
1114
|
+
set grouped(t) {
|
|
1115
|
+
const e = t !== this.groupedValue;
|
|
1116
|
+
this.groupedValue = t, e && this.changeGrouping();
|
|
1117
|
+
}
|
|
1118
|
+
get aggregation() {
|
|
1119
|
+
return this.aggregationValue;
|
|
1120
|
+
}
|
|
1121
|
+
set aggregation(t) {
|
|
1122
|
+
const e = t !== this.aggregationValue;
|
|
1123
|
+
this.aggregationValue = t, e && this.changeGrouping();
|
|
1124
|
+
}
|
|
1125
|
+
get groupOpened() {
|
|
1126
|
+
return this.groupOpenedValue;
|
|
1127
|
+
}
|
|
1128
|
+
set groupOpened(t) {
|
|
1129
|
+
const e = t !== this.groupOpenedValue;
|
|
1130
|
+
this.groupOpenedValue = t, e && this.changeGrouping();
|
|
1131
|
+
}
|
|
1132
|
+
/* istanbul ignore next */
|
|
1133
|
+
// @ts-expect-error
|
|
1134
|
+
get isVisible() {
|
|
1135
|
+
return this.isVisibleValue && !this.grouped;
|
|
1136
|
+
}
|
|
1137
|
+
/* istanbul ignore next */
|
|
1138
|
+
set isVisible(t) {
|
|
1139
|
+
this.isVisibleValue = t;
|
|
1140
|
+
}
|
|
1141
|
+
changeGrouping() {
|
|
1142
|
+
setTimeout(() => {
|
|
1143
|
+
this.grid.updateGrouping();
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
class te extends X {
|
|
1148
|
+
constructor(t) {
|
|
1149
|
+
super(t);
|
|
1150
|
+
s(this, "gridName");
|
|
1151
|
+
s(this, "grid");
|
|
1152
|
+
s(this, "showCheckboxAll", !1);
|
|
1153
|
+
s(this, "filterModal");
|
|
1154
|
+
s(this, "filterFormInputs", {});
|
|
1155
|
+
this.gridName = this.getInitValue("gridName", t.gridName, this.gridName), this.grid = this.getInitValue("grid", t.grid, void 0), this.showCheckboxAll = this.getInitValue("showCheckboxAll", t.showCheckboxAll, this.showCheckboxAll), this.createAccessors(), this.grid || this.loadGrid();
|
|
1156
|
+
}
|
|
1157
|
+
loadGrid(t) {
|
|
1158
|
+
t && (this.gridName = t), this.gridName && (this.grid = I.getInstances(this.gridName)[0]);
|
|
1159
|
+
}
|
|
1160
|
+
click(t) {
|
|
1161
|
+
this.callEvent("click", { component: this, event: t }), this.grid.callEvent("filterClick", { component: this.grid, event: t }), t != null && t.defaultPrevented || this.createFilterFromColumns.call(this);
|
|
1162
|
+
}
|
|
1163
|
+
loadFilterValues({ component: t }) {
|
|
1164
|
+
const e = [], { datasource: o } = this.grid;
|
|
1165
|
+
if (o instanceof N || o instanceof C) {
|
|
1166
|
+
const { dynamicFilter: r } = o, a = { ...this.grid.defaultFilter, ...r };
|
|
1167
|
+
Object.keys(a).forEach((n) => {
|
|
1168
|
+
a[n] && a[n].length > 0 && a[n].forEach((l, h) => {
|
|
1169
|
+
const c = l.relation || "AND", u = l.operation || "CONTAINS", A = `${this.grid.name}-filter-${c}-${u}-${n}-${h}`;
|
|
1170
|
+
e.push(A), t.value[A] = l.value;
|
|
1171
|
+
let m = "";
|
|
1172
|
+
const S = this.grid.getColumn(n);
|
|
1173
|
+
if (S instanceof U) {
|
|
1174
|
+
const { filterProps: p } = S;
|
|
1175
|
+
Array.isArray(p) ? p.forEach((T) => {
|
|
1176
|
+
(T.relation || "AND") === c && (T.operation || "CONTAINS") === u && (m = T.helperValue || "");
|
|
1177
|
+
}) : m = p.helperValue || "";
|
|
1178
|
+
const R = I.getInstances(A);
|
|
1179
|
+
m && R.length && R[0] && (R[0].hint = Gt.getLabel(m));
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
});
|
|
1183
|
+
} else {
|
|
1184
|
+
const { filter: r } = o, a = { ...this.grid.defaultFilter, ...r };
|
|
1185
|
+
Object.keys(a).forEach((n) => {
|
|
1186
|
+
if (a[n]) {
|
|
1187
|
+
const l = `${this.grid.name}-filter-AND-CONTAINS-${n}-0`;
|
|
1188
|
+
e.push(l), t.value[l] = a[n];
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
Object.keys(t.value).forEach((r) => {
|
|
1193
|
+
e.indexOf(r) === -1 && (t.value[r] = null);
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
hideFilterModal() {
|
|
1197
|
+
this.filterModal.hide();
|
|
1198
|
+
}
|
|
1199
|
+
destroyFilterModal() {
|
|
1200
|
+
this.filterModal && this.filterModal.destroy();
|
|
1201
|
+
}
|
|
1202
|
+
createFilterFromColumns() {
|
|
1203
|
+
if (this.filterModal)
|
|
1204
|
+
this.loadFilterValues({ component: I.getInstance(`${this.grid.name}-filter-form`) });
|
|
1205
|
+
else {
|
|
1206
|
+
const e = Object.assign({
|
|
1207
|
+
height: "auto",
|
|
1208
|
+
maxHeight: "18.75rem",
|
|
1209
|
+
persistent: !0,
|
|
1210
|
+
title: "FILTER"
|
|
1211
|
+
}, this.grid.modalFilterProps), o = {
|
|
1212
|
+
name: `${this.grid.name}-filter-modal`,
|
|
1213
|
+
persistent: e.persistent,
|
|
1214
|
+
grid: e.grid,
|
|
1215
|
+
cssClass: e.cssClass,
|
|
1216
|
+
cssStyle: e.cssStyle,
|
|
1217
|
+
draggable: e.draggable,
|
|
1218
|
+
dragHandle: e.dragHandle,
|
|
1219
|
+
fullscreen: e.fullscreen,
|
|
1220
|
+
light: e.light,
|
|
1221
|
+
dark: e.dark,
|
|
1222
|
+
escKeydownStop: !1,
|
|
1223
|
+
children: [
|
|
1224
|
+
{
|
|
1225
|
+
name: `${this.grid.name}-filter-header-container`,
|
|
1226
|
+
component: "ZdContainer",
|
|
1227
|
+
cssClass: "zd-pa-0 zd-display-flex",
|
|
1228
|
+
children: [
|
|
1229
|
+
{
|
|
1230
|
+
name: `${this.grid.name}-filter-title`,
|
|
1231
|
+
component: "ZdText",
|
|
1232
|
+
cssStyle: "color: var(--v-primary-base);",
|
|
1233
|
+
text: e.title,
|
|
1234
|
+
tag: "h3"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
name: `${this.grid.name}-filter-spacer`,
|
|
1238
|
+
component: "VSpacer"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
name: `${this.grid.name}-filter-close-button`,
|
|
1242
|
+
component: "ZdModalCloseButton",
|
|
1243
|
+
small: !0,
|
|
1244
|
+
modalName: `${this.grid.name}-filter-modal`
|
|
1245
|
+
}
|
|
1246
|
+
]
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
name: `${this.grid.name}-filter-content-container`,
|
|
1250
|
+
component: "ZdContainer",
|
|
1251
|
+
scrollView: !0,
|
|
1252
|
+
cssClass: "zd-my-2 zd-pa-0 tek-grid-filter-content-container",
|
|
1253
|
+
maxHeight: e.maxHeight,
|
|
1254
|
+
height: e.height,
|
|
1255
|
+
children: [
|
|
1256
|
+
{
|
|
1257
|
+
name: `${this.grid.name}-filter-form`,
|
|
1258
|
+
component: "ZdForm",
|
|
1259
|
+
cssClass: "zd-my-2 zd-pa-0",
|
|
1260
|
+
children: this.getFilterModalComponents(),
|
|
1261
|
+
events: {
|
|
1262
|
+
onMounted: this.loadFilterValues.bind(this)
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
]
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
name: `${this.grid.name}-filter-footer-container`,
|
|
1269
|
+
component: "ZdContainer",
|
|
1270
|
+
cssClass: "zd-pa-0",
|
|
1271
|
+
children: [
|
|
1272
|
+
{
|
|
1273
|
+
name: `${this.grid.name}-filter-footer`,
|
|
1274
|
+
component: "ZdFooter",
|
|
1275
|
+
color: "transparent",
|
|
1276
|
+
padless: !0,
|
|
1277
|
+
leftSlot: [
|
|
1278
|
+
{
|
|
1279
|
+
name: `${this.grid.name}-filter-clearButton`,
|
|
1280
|
+
component: "ZdButton",
|
|
1281
|
+
label: "CLEAR",
|
|
1282
|
+
outline: !0,
|
|
1283
|
+
events: {
|
|
1284
|
+
click: this.clearFilter.bind(this)
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
],
|
|
1288
|
+
rightSlot: [
|
|
1289
|
+
{
|
|
1290
|
+
name: `${this.grid.name}-filter-cancelButton`,
|
|
1291
|
+
component: "ZdButton",
|
|
1292
|
+
label: "CANCEL",
|
|
1293
|
+
keyMap: {
|
|
1294
|
+
esc: {
|
|
1295
|
+
event: this.hideFilterModal.bind(this),
|
|
1296
|
+
focus: !0,
|
|
1297
|
+
visible: !0,
|
|
1298
|
+
input: !0,
|
|
1299
|
+
stop: !0
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
outline: !0,
|
|
1303
|
+
events: {
|
|
1304
|
+
click: this.hideFilterModal.bind(this)
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
name: `${this.grid.name}-filter-okButton`,
|
|
1309
|
+
component: "ZdButton",
|
|
1310
|
+
label: "OK",
|
|
1311
|
+
events: {
|
|
1312
|
+
click: this.applyFilter.bind(this)
|
|
1313
|
+
},
|
|
1314
|
+
keyMap: {
|
|
1315
|
+
"mod+enter": {
|
|
1316
|
+
event: this.applyFilter.bind(this),
|
|
1317
|
+
focus: !0,
|
|
1318
|
+
input: !0,
|
|
1319
|
+
stop: !0,
|
|
1320
|
+
visible: !0
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
]
|
|
1325
|
+
}
|
|
1326
|
+
]
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1329
|
+
};
|
|
1330
|
+
this.filterModal = F.create(o);
|
|
1331
|
+
}
|
|
1332
|
+
this.filterModal.show();
|
|
1333
|
+
}
|
|
1334
|
+
onBeforeDestroy() {
|
|
1335
|
+
super.onBeforeDestroy(), this.destroyFilterModal();
|
|
1336
|
+
}
|
|
1337
|
+
formatFormValue(t) {
|
|
1338
|
+
return Object.keys(t.value).reduce((e, o) => {
|
|
1339
|
+
try {
|
|
1340
|
+
const r = t.getChildInstance(o);
|
|
1341
|
+
return !(r instanceof $) || !r.checkboxAll ? e : D.selectAllCompatibilityMode ? (e[o] = "T", e) : (delete e[o], e);
|
|
1342
|
+
} catch {
|
|
1343
|
+
return e;
|
|
1344
|
+
}
|
|
1345
|
+
}, { ...t.value });
|
|
1346
|
+
}
|
|
1347
|
+
async applyFilter({ event: t }) {
|
|
1348
|
+
const e = I.getInstance(`${this.grid.name}-filter-form`);
|
|
1349
|
+
if ((await e.validate()).valid) {
|
|
1350
|
+
const { datasource: r } = this.grid, a = {}, n = this.formatFormValue(e);
|
|
1351
|
+
r instanceof N || r instanceof C ? (Object.keys(n).forEach((l) => {
|
|
1352
|
+
const h = n[l];
|
|
1353
|
+
if (h && !(Array.isArray(h) && !h.length)) {
|
|
1354
|
+
const c = l.split(`${this.grid.name}-filter-`)[1], [u, A] = c.split("-");
|
|
1355
|
+
let m = c.split(`${u}-${A}-`)[1];
|
|
1356
|
+
m = m.split("-").slice(0, -1).join("-"), a[m] || (a[m] = []);
|
|
1357
|
+
const S = h;
|
|
1358
|
+
a[m].push({
|
|
1359
|
+
relation: u,
|
|
1360
|
+
operation: A,
|
|
1361
|
+
value: S
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
}), r.dynamicFilter = a, this.setFilter(a, t, r.setDynamicFilter.bind(r))) : (Object.keys(n).forEach((l) => {
|
|
1365
|
+
let h = l.split(`${this.grid.name}-filter-AND-CONTAINS-`)[1];
|
|
1366
|
+
h = h.split("-").slice(0, -1).join("-");
|
|
1367
|
+
const c = n[l];
|
|
1368
|
+
c && !(Array.isArray(c) && !c.length) && (a[h] = c);
|
|
1369
|
+
}), r.filter = a, this.setFilter(a, t, r.setFilter.bind(r))), this.grid.changeLayout(t);
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
setFilter(t, e, o) {
|
|
1373
|
+
this.grid.callEvent("beforeApplyFilter", { component: this.grid, event: e }), !e.defaultPrevented && (o(t), this.hideFilterModal());
|
|
1374
|
+
}
|
|
1375
|
+
clearFilter() {
|
|
1376
|
+
const t = I.getInstance(`${this.grid.name}-filter-form`);
|
|
1377
|
+
Object.keys(t.value).forEach((e) => {
|
|
1378
|
+
t.value[e] = null;
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
sortFilterIndex(t, e) {
|
|
1382
|
+
const o = t.filterIndex !== void 0 ? t.filterIndex : Number.MAX_SAFE_INTEGER, r = e.filterIndex !== void 0 ? e.filterIndex : Number.MAX_SAFE_INTEGER;
|
|
1383
|
+
return o - r;
|
|
1384
|
+
}
|
|
1385
|
+
getFilterInputs(t) {
|
|
1386
|
+
const e = (r) => I.getInstance(r);
|
|
1387
|
+
return t ? this.filterFormInputs[t].map(e) : Object.values(this.filterFormInputs).reduce((r, a) => [...r, ...a.map(e)], []);
|
|
1388
|
+
}
|
|
1389
|
+
getFilterModalComponents() {
|
|
1390
|
+
const t = [];
|
|
1391
|
+
let e;
|
|
1392
|
+
return [...this.grid.columns].sort(this.sortFilterIndex).forEach((o) => {
|
|
1393
|
+
const r = Array.isArray(o.filterProps) ? o.filterProps : [o.filterProps];
|
|
1394
|
+
o.filterable && r && r.length > 0 && (this.filterFormInputs[o.name] = [], r.forEach((a, n) => {
|
|
1395
|
+
const { datasource: l } = this.grid;
|
|
1396
|
+
if (l instanceof N || l instanceof C) {
|
|
1397
|
+
const A = a.relation || "AND", m = a.operation || "CONTAINS";
|
|
1398
|
+
e = `${this.grid.name}-filter-${A}-${m}-${o.name}-${n}`;
|
|
1399
|
+
} else
|
|
1400
|
+
e = `${this.grid.name}-filter-AND-CONTAINS-${o.name}-${n}`;
|
|
1401
|
+
this.filterFormInputs[o.name].push(e);
|
|
1402
|
+
const { dataValueOut: h, ...c } = o.componentProps || {}, u = {
|
|
1403
|
+
label: o.label,
|
|
1404
|
+
...c,
|
|
1405
|
+
...a,
|
|
1406
|
+
name: e
|
|
1407
|
+
};
|
|
1408
|
+
a.helperOptions && (u.events || (u.events = {}), u.events.change = this.changeHelperEvent.bind(this, o)), u.component === "ZdSelectMultiple" && (u.showCheckboxAll = u.showCheckboxAll ?? this.showCheckboxAll), t.push(u);
|
|
1409
|
+
}));
|
|
1410
|
+
}), t;
|
|
1411
|
+
}
|
|
1412
|
+
changeHelperEvent(t, { component: e }) {
|
|
1413
|
+
const { helperValue: o } = e, r = e.name;
|
|
1414
|
+
Array.isArray(t.filterProps) ? t.filterProps.forEach((a) => {
|
|
1415
|
+
const n = r.split(`${this.grid.name}-filter-`)[1], [l, h] = n.split("-");
|
|
1416
|
+
(a.relation || "AND") === l && (a.operation || "CONTAINS") === h && (a.helperValue = o);
|
|
1417
|
+
}) : t.filterProps.helperValue = o;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
const wt = (d, i) => {
|
|
1421
|
+
const t = {};
|
|
1422
|
+
return i.forEach((e) => {
|
|
1423
|
+
d[e] !== void 0 && (t[e] = d[e]);
|
|
1424
|
+
}), t;
|
|
1425
|
+
}, _t = (d) => !!d && typeof d == "object" && !Array.isArray(d) && !!Object.keys(d).length;
|
|
1426
|
+
function v(d) {
|
|
1427
|
+
return d == null;
|
|
1428
|
+
}
|
|
1429
|
+
class bt {
|
|
1430
|
+
constructor(i) {
|
|
1431
|
+
s(this, "filter", {});
|
|
1432
|
+
s(this, "messages", {
|
|
1433
|
+
CONTAINS: "TEKGRID_CONTAINS",
|
|
1434
|
+
NOT_CONTAINS: "TEKGRID_NOT_CONTAINS",
|
|
1435
|
+
EQUALS: "TEKGRID_EQUALS",
|
|
1436
|
+
NOT_EQUAL: "TEKGRID_NOT_EQUALS",
|
|
1437
|
+
GREATER_THAN: "TEKGRID_GREATER_THAN",
|
|
1438
|
+
LESS_THAN: "TEKGRID_LESS_THAN",
|
|
1439
|
+
GREATER_THAN_EQUALS: "TEKGRID_GREATER_THAN_EQUALS",
|
|
1440
|
+
LESS_THAN_EQUALS: "TEKGRID_LESS_THAN_EQUALS",
|
|
1441
|
+
IN: "TEKGRID_IN",
|
|
1442
|
+
NOT_IN: "TEKGRID_NOT_IN",
|
|
1443
|
+
BETWEEN: "TEKGRID_BETWEEN",
|
|
1444
|
+
AND: "TEKGRID_AND",
|
|
1445
|
+
OR: "TEKGRID_OR"
|
|
1446
|
+
});
|
|
1447
|
+
this.filter = i;
|
|
1448
|
+
}
|
|
1449
|
+
build() {
|
|
1450
|
+
return Object.keys(this.filter).map((i) => {
|
|
1451
|
+
const t = this.filter[i], e = [];
|
|
1452
|
+
return t.forEach((r, a) => {
|
|
1453
|
+
const n = this.messages[r.operation];
|
|
1454
|
+
if (e.push(g.translate(n)), e.push(r.value), !(a === t.length - 1)) {
|
|
1455
|
+
const h = t[a + 1], c = this.messages[h.relation];
|
|
1456
|
+
e.push(g.translate(c));
|
|
1457
|
+
}
|
|
1458
|
+
}), {
|
|
1459
|
+
value: e.join(" ").trim(),
|
|
1460
|
+
label: i
|
|
1461
|
+
};
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
class Bt {
|
|
1466
|
+
constructor(i) {
|
|
1467
|
+
s(this, "grid");
|
|
1468
|
+
s(this, "summaryColumns", []);
|
|
1469
|
+
s(this, "groups", []);
|
|
1470
|
+
s(this, "summary", {});
|
|
1471
|
+
s(this, "groupedData", []);
|
|
1472
|
+
s(this, "groupColumnNames", []);
|
|
1473
|
+
s(this, "groupColumns", []);
|
|
1474
|
+
s(this, "originalDatasourceLoadAll");
|
|
1475
|
+
s(this, "originalDatasourceLimit");
|
|
1476
|
+
s(this, "viewUpdateScrollData");
|
|
1477
|
+
s(this, "viewUpdateFixedColumns");
|
|
1478
|
+
/**
|
|
1479
|
+
* Tasks that should be finished before loading the grid data
|
|
1480
|
+
*/
|
|
1481
|
+
s(this, "tasksBeforeLoad", []);
|
|
1482
|
+
s(this, "request", () => {
|
|
1483
|
+
throw new M(this.constructor.name);
|
|
1484
|
+
});
|
|
1485
|
+
s(this, "debounceUpdateGrouping", () => {
|
|
1486
|
+
throw new M(this.constructor.name);
|
|
1487
|
+
});
|
|
1488
|
+
this.grid = i;
|
|
1489
|
+
}
|
|
1490
|
+
setViewUpdateFixedColumns(i) {
|
|
1491
|
+
this.viewUpdateFixedColumns = i;
|
|
1492
|
+
}
|
|
1493
|
+
setViewUpdateScrollData(i) {
|
|
1494
|
+
this.viewUpdateScrollData = i;
|
|
1495
|
+
}
|
|
1496
|
+
registerTask(i) {
|
|
1497
|
+
this.tasksBeforeLoad.push(i);
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Loads grid data after resolving all tasks
|
|
1501
|
+
*/
|
|
1502
|
+
async loadAfterTasks() {
|
|
1503
|
+
return Promise.all(this.tasksBeforeLoad.map((i) => i.catch(() => {
|
|
1504
|
+
}))), this.tasksBeforeLoad = [], this.request();
|
|
1505
|
+
}
|
|
1506
|
+
initializeDebounceFunctions() {
|
|
1507
|
+
this.request = k(() => {
|
|
1508
|
+
this.grid.reload();
|
|
1509
|
+
}, 500), this.debounceUpdateGrouping = k((i = !1) => {
|
|
1510
|
+
this.updateGroupedData(i);
|
|
1511
|
+
}, 100);
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Initializes grid groups, summary columns and registers the grid datasource callback
|
|
1515
|
+
* @param lazyLoad defines if the grid should automatically load data after updating the datasource
|
|
1516
|
+
*/
|
|
1517
|
+
initializeGrouping(i) {
|
|
1518
|
+
this.initializeDebounceFunctions(), this.initGroups(), this.initSummaryColumns(), this.originalDatasourceLoadAll = this.grid.datasource.loadAll, this.originalDatasourceLimit = this.grid.datasource.limit, this.grid.datasource.registerGetCallback((t) => this.onGet(t)), this.updateGrouping(i);
|
|
1519
|
+
}
|
|
1520
|
+
onGet(i) {
|
|
1521
|
+
return this.isGrouped() && this.buildGroupedData(), i;
|
|
1522
|
+
}
|
|
1523
|
+
resetFooterVariables(i) {
|
|
1524
|
+
this.summaryColumns.forEach((t) => {
|
|
1525
|
+
i.footer[t.name] = {
|
|
1526
|
+
count: 0,
|
|
1527
|
+
sum: void 0,
|
|
1528
|
+
avg: void 0,
|
|
1529
|
+
min: void 0,
|
|
1530
|
+
max: void 0
|
|
1531
|
+
};
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
initGroups() {
|
|
1535
|
+
this.groups = [], this.groupColumns.forEach((i) => {
|
|
1536
|
+
const t = {
|
|
1537
|
+
column: i,
|
|
1538
|
+
name: i.name,
|
|
1539
|
+
label: i.label,
|
|
1540
|
+
lastValue: void 0,
|
|
1541
|
+
initialized: !1,
|
|
1542
|
+
footer: {}
|
|
1543
|
+
};
|
|
1544
|
+
this.resetFooterVariables(t), this.groups.push(t);
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
getGroupedData() {
|
|
1548
|
+
return this.groupedData;
|
|
1549
|
+
}
|
|
1550
|
+
initSummaryColumns() {
|
|
1551
|
+
this.summaryColumns = this.grid.columns.filter((i) => !!i.aggregation && !i.grouped), this.summary = {};
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Calls updateGroupedData with debounce
|
|
1555
|
+
*/
|
|
1556
|
+
updateGrouping(i) {
|
|
1557
|
+
this.debounceUpdateGrouping(i);
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* Inits summary columns, updates the grid datasource and, if needed, reloads the grid data
|
|
1561
|
+
*/
|
|
1562
|
+
async updateGroupedData(i) {
|
|
1563
|
+
this.initSummaryColumns(), this.updateGridDatasource(), i || await this.loadAfterTasks(), this.grid.virtualScroll && this.viewUpdateScrollData && this.viewUpdateScrollData(), this.viewUpdateFixedColumns && this.viewUpdateFixedColumns();
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1566
|
+
* When using groups, should update the grid datasource order to reflect the group order
|
|
1567
|
+
* If the grid is not grouped, should not update the datasource order
|
|
1568
|
+
*/
|
|
1569
|
+
updateGridDatasource() {
|
|
1570
|
+
if (this.groupedData = [], this.groupColumns = this.grid.columns.filter((i) => i.grouped), this.groupColumnNames = this.groupColumns.map((i) => i.name), this.isGrouped()) {
|
|
1571
|
+
if (this.groupColumns.length) {
|
|
1572
|
+
const i = this.getOrder(this.groupColumnNames, this.grid.datasource.order);
|
|
1573
|
+
this.grid.datasource.order = i;
|
|
1574
|
+
}
|
|
1575
|
+
this.grid.datasource.loadAll = !0;
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
this.grid.datasource.loadAll = this.originalDatasourceLoadAll, this.grid.datasource.limit = this.originalDatasourceLimit;
|
|
1579
|
+
}
|
|
1580
|
+
/**
|
|
1581
|
+
* Returns the order to be used in the grid datasource based on the group column names and the grid order
|
|
1582
|
+
*/
|
|
1583
|
+
getOrder(i, t) {
|
|
1584
|
+
const e = i.map((r) => `${r}.asc`), o = t.filter((r) => i.indexOf(r.split(".")[0]) === -1);
|
|
1585
|
+
return [...e, ...o];
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* Returns the summary data for the group
|
|
1589
|
+
*/
|
|
1590
|
+
getSummaryData(i) {
|
|
1591
|
+
const t = {};
|
|
1592
|
+
return this.summaryColumns.forEach((e) => {
|
|
1593
|
+
const { aggregation: o } = e, r = i[e.name];
|
|
1594
|
+
if (!r) {
|
|
1595
|
+
t[e.name] = 0;
|
|
1596
|
+
return;
|
|
1597
|
+
}
|
|
1598
|
+
o === "COUNT" ? t[e.name] = r.count : o === "SUM" ? t[e.name] = r.sum : o === "AVG" ? r.avg ? t[e.name] = r.avg : typeof r.sum == "number" && (t[e.name] = r.sum / r.count) : o === "MIN" ? t[e.name] = r.min : t[e.name] = r.max;
|
|
1599
|
+
}), t;
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Adds group footers to the grouped data
|
|
1603
|
+
*/
|
|
1604
|
+
addGroupFooters(i) {
|
|
1605
|
+
if (this.summaryColumns.length !== 0) {
|
|
1606
|
+
for (let t = this.groups.length - 1; t >= i; t -= 1)
|
|
1607
|
+
if (this.groups[t].initialized) {
|
|
1608
|
+
const e = {
|
|
1609
|
+
groupFooter: !0,
|
|
1610
|
+
groupIndex: t,
|
|
1611
|
+
groupHeaders: [],
|
|
1612
|
+
groupLabel: this.groups[t].lastGroupHeaderRow.groupLabel,
|
|
1613
|
+
groupValue: this.groups[t].lastGroupHeaderRow.groupValue,
|
|
1614
|
+
...this.getSummaryData(this.groups[t].footer)
|
|
1615
|
+
};
|
|
1616
|
+
for (let o = 0; o < t; o += 1) {
|
|
1617
|
+
const { lastGroupHeaderRow: r } = this.groups[o];
|
|
1618
|
+
r && e.groupHeaders.push(r);
|
|
1619
|
+
}
|
|
1620
|
+
this.groupedData.push(e);
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
getGroupValue(i, t) {
|
|
1625
|
+
const e = this.grid.getColumn(i.column.name), o = this.grid.getAppliedConditions({ row: t, column: e });
|
|
1626
|
+
return _t(o) || this.grid.reapplyConditions(t), e.formatterByRow(t, o);
|
|
1627
|
+
}
|
|
1628
|
+
addGroupHeader(i, t, e) {
|
|
1629
|
+
const o = this.getGroupValue(t, i) || t.column.groupLabelForEmptyValue, r = {
|
|
1630
|
+
group: !0,
|
|
1631
|
+
groupRow: i,
|
|
1632
|
+
groupColumnName: t.column.name,
|
|
1633
|
+
groupHeader: !0,
|
|
1634
|
+
groupIndex: e,
|
|
1635
|
+
groupLabel: g.translate(t.label),
|
|
1636
|
+
groupValue: o,
|
|
1637
|
+
groupOpened: t.column.groupOpened || this.grid.groupsOpened,
|
|
1638
|
+
groupHeaders: [],
|
|
1639
|
+
children: []
|
|
1640
|
+
};
|
|
1641
|
+
for (let a = 0; a < e; a += 1)
|
|
1642
|
+
r.groupHeaders.push(this.groups[a].lastGroupHeaderRow);
|
|
1643
|
+
t.lastGroupHeaderRow = r, t.initialized = !0, this.groupedData.push(r);
|
|
1644
|
+
}
|
|
1645
|
+
calcSummaryValues(i, t, e) {
|
|
1646
|
+
const o = this.grid.getVisibleValue(e, i);
|
|
1647
|
+
if (!v(o)) {
|
|
1648
|
+
if (t.count += 1, this.grid.events.calcSummary) {
|
|
1649
|
+
this.grid.calcSummary(i, t, e);
|
|
1650
|
+
return;
|
|
1651
|
+
}
|
|
1652
|
+
t.min === void 0 && (t.min = o), t.max === void 0 && (t.max = o), t.min = o < t.min ? o : t.min, t.max = o > t.max ? o : t.max, typeof o == "number" && (t.sum = (t.sum || 0) + o);
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
calcSummary(i) {
|
|
1656
|
+
this.summaryColumns.length !== 0 && this.summaryColumns.forEach((t) => {
|
|
1657
|
+
const e = t.name;
|
|
1658
|
+
v(this.summary[e]) && (this.summary[e] = {
|
|
1659
|
+
count: 0,
|
|
1660
|
+
sum: void 0,
|
|
1661
|
+
avg: void 0,
|
|
1662
|
+
min: void 0,
|
|
1663
|
+
max: void 0
|
|
1664
|
+
}), this.calcSummaryValues(t, this.summary[e], i), this.groups.forEach((o) => {
|
|
1665
|
+
this.calcSummaryValues(t, o.footer[e], i);
|
|
1666
|
+
});
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
addSummary() {
|
|
1670
|
+
if (this.summaryColumns.length === 0) return;
|
|
1671
|
+
const i = {
|
|
1672
|
+
groupFooter: !0,
|
|
1673
|
+
groupSummary: !0,
|
|
1674
|
+
...this.getSummaryData(this.summary)
|
|
1675
|
+
};
|
|
1676
|
+
this.groupedData.push(i);
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* It takes a flat array of data and groups it by the group columns specified in
|
|
1680
|
+
* the grid.
|
|
1681
|
+
*/
|
|
1682
|
+
buildGroupedData() {
|
|
1683
|
+
this.initGroups(), this.initSummaryColumns(), this.groupedData = [], this.grid.getData().forEach((t) => {
|
|
1684
|
+
let e = !1;
|
|
1685
|
+
this.groups.forEach((o, r) => {
|
|
1686
|
+
const a = t[o.name];
|
|
1687
|
+
(o.lastValue !== a || e) && (e || this.addGroupFooters(r), o.lastValue = a, this.resetFooterVariables(o), this.addGroupHeader(t, o, r), e = !0);
|
|
1688
|
+
}), this.groups.forEach((o) => {
|
|
1689
|
+
o.lastGroupHeaderRow.children.push(t);
|
|
1690
|
+
}), this.groupedData.push({
|
|
1691
|
+
...t,
|
|
1692
|
+
groupHeaders: this.groups.map((o) => o.lastGroupHeaderRow).filter(Boolean)
|
|
1693
|
+
}), this.calcSummary(t);
|
|
1694
|
+
}), this.groupedData.length > 0 && (this.addGroupFooters(0), this.grid.showSummaryTotal && this.addSummary());
|
|
1695
|
+
}
|
|
1696
|
+
updateGroupFooterSummary(i) {
|
|
1697
|
+
const t = this.groups[i.groupIndex], e = this.getSummaryData(t.footer);
|
|
1698
|
+
Object.keys(e).forEach((o) => {
|
|
1699
|
+
i[o] = e[o];
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
updateSummaryTotal(i) {
|
|
1703
|
+
const t = this.getSummaryData(this.summary);
|
|
1704
|
+
Object.keys(t).forEach((e) => {
|
|
1705
|
+
i[e] = t[e];
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Recalculates all group footers and the summary total in place, without rebuilding
|
|
1710
|
+
* the grouped data structure. Used to reflect in-progress cell edits.
|
|
1711
|
+
*/
|
|
1712
|
+
updateSummary() {
|
|
1713
|
+
this.summary = {}, this.groups.forEach((i) => this.resetFooterVariables(i)), this.groupedData.forEach((i) => {
|
|
1714
|
+
if (!i.group) {
|
|
1715
|
+
if (i.groupFooter && i.groupSummary) {
|
|
1716
|
+
this.updateSummaryTotal(i);
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
if (i.groupFooter) {
|
|
1720
|
+
this.updateGroupFooterSummary(i), this.resetFooterVariables(this.groups[i.groupIndex]);
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
this.calcSummary(i);
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
}
|
|
1727
|
+
openGroup(i) {
|
|
1728
|
+
i.groupOpened = !i.groupOpened, this.grid.virtualScroll && this.viewUpdateScrollData && this.viewUpdateScrollData();
|
|
1729
|
+
}
|
|
1730
|
+
isItemVisible(i) {
|
|
1731
|
+
var t;
|
|
1732
|
+
return !((t = i.groupHeaders) != null && t.length) || i.groupHeaders.every((e) => e.groupOpened);
|
|
1733
|
+
}
|
|
1734
|
+
isGrouped() {
|
|
1735
|
+
return !!this.groupColumnNames.length || this.grid.showSummaryTotal && !!this.summaryColumns.length;
|
|
1736
|
+
}
|
|
1737
|
+
isColumnSearchable(i) {
|
|
1738
|
+
return i.searchable && (!this.grid.searchVisibleOnly || i.isVisible || i.grouped);
|
|
1739
|
+
}
|
|
1740
|
+
directionalLeft() {
|
|
1741
|
+
var e;
|
|
1742
|
+
const { currentRow: i } = this.grid.datasource;
|
|
1743
|
+
if (i.group && i.groupOpened) {
|
|
1744
|
+
i.groupOpened = !1;
|
|
1745
|
+
return;
|
|
1746
|
+
}
|
|
1747
|
+
if (this.grid.cellSelection || !((e = i.groupHeaders) != null && e.length)) return;
|
|
1748
|
+
const t = i.groupHeaders[i.groupHeaders.length - 1];
|
|
1749
|
+
this.grid.setCurrentRow(t);
|
|
1750
|
+
}
|
|
1751
|
+
directionalRight() {
|
|
1752
|
+
const { currentRow: i } = this.grid.datasource;
|
|
1753
|
+
!i.group || i.groupOpened || (i.groupOpened = !0);
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
class Lt {
|
|
1757
|
+
constructor(i) {
|
|
1758
|
+
s(this, "dataNavigator");
|
|
1759
|
+
s(this, "grid");
|
|
1760
|
+
this.dataNavigator = new tt(i), this.grid = i;
|
|
1761
|
+
}
|
|
1762
|
+
navigatePageUp() {
|
|
1763
|
+
this.dataNavigator.navigatePageUp();
|
|
1764
|
+
}
|
|
1765
|
+
navigatePageDown() {
|
|
1766
|
+
this.dataNavigator.navigatePageDown();
|
|
1767
|
+
}
|
|
1768
|
+
navigateDatasource(i) {
|
|
1769
|
+
if (!this.grid.isGrouped()) {
|
|
1770
|
+
this.dataNavigator.navigateDatasource(i);
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1773
|
+
this.navigateGroupedDatasource(i);
|
|
1774
|
+
}
|
|
1775
|
+
getRowIndex(i, t) {
|
|
1776
|
+
if (t !== void 0) return t;
|
|
1777
|
+
const { currentRow: e } = this.grid.datasource;
|
|
1778
|
+
return i.findIndex((o) => {
|
|
1779
|
+
if (e.group)
|
|
1780
|
+
return o.group && o.groupValue === e.groupValue;
|
|
1781
|
+
const r = this.grid.getRowKey(o), a = this.grid.getRowKey(e);
|
|
1782
|
+
return r && r === a;
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
navigateGroupedDatasource(i, t) {
|
|
1786
|
+
const e = this.grid.getGroupedData(), o = i === "up";
|
|
1787
|
+
if (!e.length || o && t === -1 || !o && t === e.length) return;
|
|
1788
|
+
let r = this.getRowIndex(e, t);
|
|
1789
|
+
o && r === -1 && (r = e.length);
|
|
1790
|
+
const a = r + (o ? -1 : 1), n = e[a];
|
|
1791
|
+
if (!n || !this.grid.isItemVisible(n) || n.groupFooter) {
|
|
1792
|
+
this.navigateGroupedDatasource(i, a);
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
this.grid.setCurrentRow(n);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
const Ft = (...d) => d, Kt = Ft("SUM", "MIN", "MAX", "AVG", "COUNT", void 0);
|
|
1799
|
+
class Ut {
|
|
1800
|
+
getMap(i) {
|
|
1801
|
+
return {
|
|
1802
|
+
left: {
|
|
1803
|
+
event: i.directionalLeft.bind(i),
|
|
1804
|
+
stop: !0,
|
|
1805
|
+
active: !0
|
|
1806
|
+
},
|
|
1807
|
+
right: {
|
|
1808
|
+
event: i.directionalRight.bind(i),
|
|
1809
|
+
stop: !0,
|
|
1810
|
+
active: !0
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
class Mt extends et {
|
|
1816
|
+
changeEditableComponent(i, t, e, o) {
|
|
1817
|
+
super.changeEditableComponent(i, t, e, o), this.grid.updateSummary();
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
class kt {
|
|
1821
|
+
constructor(i) {
|
|
1822
|
+
s(this, "grid");
|
|
1823
|
+
s(this, "openToolbar", !0);
|
|
1824
|
+
this.grid = i, this.openToolbar = this.grid.toolbarOpened;
|
|
1825
|
+
}
|
|
1826
|
+
get gridTitle() {
|
|
1827
|
+
return this.grid.title;
|
|
1828
|
+
}
|
|
1829
|
+
get showAddButton() {
|
|
1830
|
+
return this.grid.addButton;
|
|
1831
|
+
}
|
|
1832
|
+
get showDeleteButton() {
|
|
1833
|
+
return this.grid.deleteButton !== "none";
|
|
1834
|
+
}
|
|
1835
|
+
get showFilterButton() {
|
|
1836
|
+
return this.grid.filterButton;
|
|
1837
|
+
}
|
|
1838
|
+
get showModalFilterProps() {
|
|
1839
|
+
return this.grid.modalFilterProps;
|
|
1840
|
+
}
|
|
1841
|
+
get showSearchInput() {
|
|
1842
|
+
return this.grid.showSearch;
|
|
1843
|
+
}
|
|
1844
|
+
get showToolbar() {
|
|
1845
|
+
return this.openToolbar;
|
|
1846
|
+
}
|
|
1847
|
+
get showHideButton() {
|
|
1848
|
+
return this.grid.showHideButton && this.isNotEditing;
|
|
1849
|
+
}
|
|
1850
|
+
get toolbarCollapseClass() {
|
|
1851
|
+
return this.openToolbar ? "" : "toolbar-visible";
|
|
1852
|
+
}
|
|
1853
|
+
set showToolbar(i) {
|
|
1854
|
+
this.openToolbar = i;
|
|
1855
|
+
}
|
|
1856
|
+
get toolbarClass() {
|
|
1857
|
+
return this.openToolbar ? "" : "is-rotated";
|
|
1858
|
+
}
|
|
1859
|
+
get tooltipName() {
|
|
1860
|
+
return this.openToolbar ? "TEKGRID_HIDE" : "TEKGRID_SHOW";
|
|
1861
|
+
}
|
|
1862
|
+
get showReloadButton() {
|
|
1863
|
+
return this.grid.showReload;
|
|
1864
|
+
}
|
|
1865
|
+
get showDivider2() {
|
|
1866
|
+
return this.showReloadButton && (this.showLayoutOptionsButton || this.showColumnsButton || this.showActionsButton || this.showExportButton || this.showSearchInput);
|
|
1867
|
+
}
|
|
1868
|
+
get showColumnsButton() {
|
|
1869
|
+
return this.grid.columnsButton;
|
|
1870
|
+
}
|
|
1871
|
+
get columnsButtonIgnore() {
|
|
1872
|
+
return this.grid.columnsButtonIgnore;
|
|
1873
|
+
}
|
|
1874
|
+
get showLayoutOptionsButton() {
|
|
1875
|
+
return this.grid.showLayoutOptions;
|
|
1876
|
+
}
|
|
1877
|
+
get showDivider1() {
|
|
1878
|
+
return (this.showAddButton || this.showDeleteButton) && (this.showReloadButton || this.showLayoutOptionsButton || this.showColumnsButton || this.showActionsButton || this.showExportButton || this.showSearchInput);
|
|
1879
|
+
}
|
|
1880
|
+
get showActionsButton() {
|
|
1881
|
+
return this.grid.actions.length > 0;
|
|
1882
|
+
}
|
|
1883
|
+
get showExportButton() {
|
|
1884
|
+
return this.grid.showExport;
|
|
1885
|
+
}
|
|
1886
|
+
get showActionAndExportButton() {
|
|
1887
|
+
return (this.showLayoutOptionsButton || this.showColumnsButton) && (this.showActionsButton || this.showExportButton || this.showSearchInput);
|
|
1888
|
+
}
|
|
1889
|
+
get showDivider3() {
|
|
1890
|
+
return (this.showActionsButton || this.showExportButton) && this.showSearchInput;
|
|
1891
|
+
}
|
|
1892
|
+
get isEditing() {
|
|
1893
|
+
return this.grid.editing;
|
|
1894
|
+
}
|
|
1895
|
+
get showEditButtons() {
|
|
1896
|
+
return this.isEditing && this.grid.showEditButtons;
|
|
1897
|
+
}
|
|
1898
|
+
get isNotEditing() {
|
|
1899
|
+
return !this.isEditing;
|
|
1900
|
+
}
|
|
1901
|
+
get disableDeleteButton() {
|
|
1902
|
+
if (this.grid.deleteButton === "selection") {
|
|
1903
|
+
if (this.grid.selectAllPages) {
|
|
1904
|
+
const { allSelected: i, except: t } = this.grid.selectionState;
|
|
1905
|
+
return i && t.length === this.grid.datasource.total || !i && t.length === 0;
|
|
1906
|
+
}
|
|
1907
|
+
return this.grid.selectedRows.length === 0;
|
|
1908
|
+
}
|
|
1909
|
+
return this.grid.deleteButton === "currentRow" ? !this.grid.datasource.currentRow[this.grid.datasource.uniqueKey] : !1;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
class vt extends it {
|
|
1913
|
+
constructor(t) {
|
|
1914
|
+
super(t);
|
|
1915
|
+
s(this, "tekGrid");
|
|
1916
|
+
/**
|
|
1917
|
+
* Flag to prevent row click
|
|
1918
|
+
*/
|
|
1919
|
+
s(this, "preventRowClick", !1);
|
|
1920
|
+
s(this, "preventRowDoubleClick", !1);
|
|
1921
|
+
this.tekGrid = t;
|
|
1922
|
+
}
|
|
1923
|
+
calcSummary(t, e, o) {
|
|
1924
|
+
this.tekGrid.callEvent("calcSummary", {
|
|
1925
|
+
component: this.tekGrid,
|
|
1926
|
+
column: t,
|
|
1927
|
+
columnName: t.name,
|
|
1928
|
+
summary: e,
|
|
1929
|
+
row: o,
|
|
1930
|
+
rowValue: o[t.name]
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1933
|
+
rowDoubleClick(t, e, o) {
|
|
1934
|
+
this.preventRowDoubleClick || (this.tekGrid.datasource.currentRow = t, this.tekGrid.callEvent("rowDoubleClick", {
|
|
1935
|
+
event: e,
|
|
1936
|
+
element: o,
|
|
1937
|
+
row: t,
|
|
1938
|
+
component: this.tekGrid,
|
|
1939
|
+
column: void 0
|
|
1940
|
+
})), this.preventRowDoubleClick = !1;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Dispatches group row click event
|
|
1944
|
+
* @param row Grid row
|
|
1945
|
+
* @param event DOM event
|
|
1946
|
+
* @param element DOM Element
|
|
1947
|
+
*/
|
|
1948
|
+
groupRowClick(t, e, o) {
|
|
1949
|
+
this.preventRowClick || this.tekGrid.callEvent("groupRowClick", {
|
|
1950
|
+
event: e,
|
|
1951
|
+
element: o,
|
|
1952
|
+
row: t,
|
|
1953
|
+
component: this.tekGrid,
|
|
1954
|
+
column: void 0
|
|
1955
|
+
}), this.preventRowClick = !1;
|
|
1956
|
+
}
|
|
1957
|
+
groupRowDoubleClick(t, e, o) {
|
|
1958
|
+
this.preventRowDoubleClick || this.tekGrid.callEvent("groupRowDoubleClick", {
|
|
1959
|
+
event: e,
|
|
1960
|
+
element: o,
|
|
1961
|
+
row: t,
|
|
1962
|
+
component: this.tekGrid,
|
|
1963
|
+
column: void 0
|
|
1964
|
+
}), this.preventRowDoubleClick = !1;
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Dispatches group select/unselect event
|
|
1968
|
+
* @param row Group row
|
|
1969
|
+
* @param isSelected Row is selected
|
|
1970
|
+
* @param event DOM event
|
|
1971
|
+
* @param element DOM Element
|
|
1972
|
+
*/
|
|
1973
|
+
selectGroupClick(t, e, o, r) {
|
|
1974
|
+
e ? this.tekGrid.callEvent("groupSelected", {
|
|
1975
|
+
event: o,
|
|
1976
|
+
element: r,
|
|
1977
|
+
row: t,
|
|
1978
|
+
component: this.tekGrid,
|
|
1979
|
+
column: void 0
|
|
1980
|
+
}) : this.tekGrid.callEvent("groupUnselected", {
|
|
1981
|
+
event: o,
|
|
1982
|
+
element: r,
|
|
1983
|
+
row: t,
|
|
1984
|
+
component: this.tekGrid,
|
|
1985
|
+
column: void 0
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
class Qt extends ot {
|
|
1990
|
+
selectAll(i) {
|
|
1991
|
+
if (!this.iterable.selectable) return;
|
|
1992
|
+
this.iterable.selectionState = { allSelected: i, except: [] };
|
|
1993
|
+
const t = this.getData();
|
|
1994
|
+
if (!i) {
|
|
1995
|
+
t.forEach((e) => {
|
|
1996
|
+
const o = this.iterable.selectedRows.indexOf(e);
|
|
1997
|
+
o > -1 && this.iterable.selectedRows.splice(o, 1);
|
|
1998
|
+
});
|
|
1999
|
+
return;
|
|
2000
|
+
}
|
|
2001
|
+
t.forEach((e) => {
|
|
2002
|
+
if (this.callDisableSelection(e)) return;
|
|
2003
|
+
this.iterable.getRowKey(e) && this.iterable.selectedRows.indexOf(e) === -1 && this.iterable.selectedRows.push(e);
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
2006
|
+
getData() {
|
|
2007
|
+
return this.iterable.isGrouped() ? this.iterable.getGroupedData() : this.iterable.getData();
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
class xt extends K {
|
|
2011
|
+
/**
|
|
2012
|
+
* TekGrid class constructor
|
|
2013
|
+
* @param props TekGrid properties
|
|
2014
|
+
*/
|
|
2015
|
+
constructor(t) {
|
|
2016
|
+
super(t);
|
|
2017
|
+
s(this, "tableActionBuilder");
|
|
2018
|
+
s(this, "iterableTable");
|
|
2019
|
+
s(this, "dataSelector");
|
|
2020
|
+
s(this, "tekGridEvents");
|
|
2021
|
+
s(this, "dataNavigator");
|
|
2022
|
+
s(this, "viewNavigator");
|
|
2023
|
+
s(this, "keyMapMerger");
|
|
2024
|
+
s(this, "dataEditor");
|
|
2025
|
+
s(this, "columnsSearcher");
|
|
2026
|
+
s(this, "groupedDataManager");
|
|
2027
|
+
s(this, "tekGridToolbarProvider");
|
|
2028
|
+
/* Grid Title */
|
|
2029
|
+
s(this, "title", "");
|
|
2030
|
+
/* Show Add button */
|
|
2031
|
+
s(this, "addButton", !1);
|
|
2032
|
+
/* Show Delete button */
|
|
2033
|
+
s(this, "deleteButton", "none");
|
|
2034
|
+
/* Show Delete button */
|
|
2035
|
+
s(this, "actions", []);
|
|
2036
|
+
/* Show edit button */
|
|
2037
|
+
s(this, "showEditButtons", !0);
|
|
2038
|
+
/* Show Filter button */
|
|
2039
|
+
s(this, "filterButton", !1);
|
|
2040
|
+
/* Show SearchInput */
|
|
2041
|
+
s(this, "showSearch", !0);
|
|
2042
|
+
/* Show Column Filter button */
|
|
2043
|
+
s(this, "columnFilterButton", !1);
|
|
2044
|
+
/* Show Columns button */
|
|
2045
|
+
s(this, "columnsButton", !1);
|
|
2046
|
+
/* Defines if the grid is the unique grid on screen */
|
|
2047
|
+
s(this, "mainGrid", !0);
|
|
2048
|
+
/* Columns to be ignored on columns button */
|
|
2049
|
+
s(this, "columnsButtonIgnore", []);
|
|
2050
|
+
/**
|
|
2051
|
+
* Components that will be rendered on toolbar slot
|
|
2052
|
+
*/
|
|
2053
|
+
s(this, "toolbarConfig", []);
|
|
2054
|
+
/* Show Hide button */
|
|
2055
|
+
s(this, "showHideButton", !0);
|
|
2056
|
+
/**
|
|
2057
|
+
* Enables column dragging
|
|
2058
|
+
* @public
|
|
2059
|
+
*/
|
|
2060
|
+
s(this, "dragColumns", !0);
|
|
2061
|
+
/**
|
|
2062
|
+
* Enables column resizing
|
|
2063
|
+
* @public
|
|
2064
|
+
*/
|
|
2065
|
+
s(this, "resizeColumns", !0);
|
|
2066
|
+
/**
|
|
2067
|
+
* Enables layout saving
|
|
2068
|
+
* @public
|
|
2069
|
+
*/
|
|
2070
|
+
s(this, "showLayoutOptions", !0);
|
|
2071
|
+
s(this, "xlsDefaultType");
|
|
2072
|
+
s(this, "modalFilterProps", {
|
|
2073
|
+
name: this.name,
|
|
2074
|
+
height: "auto",
|
|
2075
|
+
persistent: !0,
|
|
2076
|
+
cssClass: "",
|
|
2077
|
+
cssStyle: "",
|
|
2078
|
+
dark: !1,
|
|
2079
|
+
draggable: !1,
|
|
2080
|
+
fullscreen: !1,
|
|
2081
|
+
dragHandle: "",
|
|
2082
|
+
title: "FILTER"
|
|
2083
|
+
});
|
|
2084
|
+
/**
|
|
2085
|
+
* Show export button
|
|
2086
|
+
*/
|
|
2087
|
+
s(this, "showExport", !1);
|
|
2088
|
+
/**
|
|
2089
|
+
* Show refresh button
|
|
2090
|
+
*/
|
|
2091
|
+
s(this, "showReload", !0);
|
|
2092
|
+
/**
|
|
2093
|
+
* Export config
|
|
2094
|
+
*/
|
|
2095
|
+
s(this, "exportConfig", [
|
|
2096
|
+
{
|
|
2097
|
+
type: "pdf",
|
|
2098
|
+
label: g.translate("TEKGRID_EXPORT_AS", { type: "PDF" }),
|
|
2099
|
+
multiOption: [
|
|
2100
|
+
{ label: g.translate("TEKGRID_PORTRAIT"), iconName: "mdi-file-outline" },
|
|
2101
|
+
{
|
|
2102
|
+
label: g.translate("TEKGRID_LANDSCAPE"),
|
|
2103
|
+
iconName: "mdi-file-outline",
|
|
2104
|
+
cssClass: "tek-grid-export-landscape",
|
|
2105
|
+
reportParams: { portrait: !1 }
|
|
2106
|
+
}
|
|
2107
|
+
]
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
type: "xls",
|
|
2111
|
+
label: g.translate("TEKGRID_EXPORT_AS", {
|
|
2112
|
+
type: "XLS"
|
|
2113
|
+
})
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
type: "xls2",
|
|
2117
|
+
label: g.translate("TEKGRID_EXPORT_AS", {
|
|
2118
|
+
type: `XLS ${g.translate("TEKGRID_WITH_GROUPS")}`
|
|
2119
|
+
})
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
type: "xls3",
|
|
2123
|
+
label: g.translate("TEKGRID_EXPORT_AS", {
|
|
2124
|
+
type: `XLS ${g.translate("TEKGRID_GRID_MIRROR")}`
|
|
2125
|
+
})
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
type: "csv",
|
|
2129
|
+
label: g.translate("TEKGRID_EXPORT_AS", { type: "CSV" })
|
|
2130
|
+
}
|
|
2131
|
+
]);
|
|
2132
|
+
/**
|
|
2133
|
+
* Actions to overwrite the default export config
|
|
2134
|
+
*/
|
|
2135
|
+
s(this, "exportActions");
|
|
2136
|
+
/**
|
|
2137
|
+
* Groups should be opened by default after building
|
|
2138
|
+
*/
|
|
2139
|
+
s(this, "groupsOpened", !1);
|
|
2140
|
+
/**
|
|
2141
|
+
* Show Total summary
|
|
2142
|
+
*/
|
|
2143
|
+
s(this, "showSummaryTotal", !0);
|
|
2144
|
+
s(this, "editNewRowsOnly", !1);
|
|
2145
|
+
s(this, "keyShortcutKeyMapping");
|
|
2146
|
+
s(this, "showCheckboxAllFilter", D.gridShowCheckboxAllFilter || !1);
|
|
2147
|
+
s(this, "defaultFilter", {});
|
|
2148
|
+
s(this, "toolbarOpened", !0);
|
|
2149
|
+
s(this, "reportTitle", "");
|
|
2150
|
+
s(this, "reportLabelFormatter");
|
|
2151
|
+
s(this, "editing", !1);
|
|
2152
|
+
s(this, "currentColumn", null);
|
|
2153
|
+
s(this, "selectedRows", []);
|
|
2154
|
+
s(this, "selectionState", {
|
|
2155
|
+
allSelected: !1,
|
|
2156
|
+
except: []
|
|
2157
|
+
});
|
|
2158
|
+
s(this, "rowStyleConditions");
|
|
2159
|
+
s(this, "selectAllPages", D.gridSelectAllPages);
|
|
2160
|
+
s(this, "selectable", !1);
|
|
2161
|
+
s(this, "disableSelection");
|
|
2162
|
+
s(this, "cellSelection", !1);
|
|
2163
|
+
s(this, "toolbarSlot", [{ name: "<<NAME>>_gridSearch", component: "ZdSearch" }]);
|
|
2164
|
+
s(this, "footerSlot", [
|
|
2165
|
+
{ name: "<<NAME>>_iterablePagination", component: "ZdIterablePagination" },
|
|
2166
|
+
{
|
|
2167
|
+
name: "<<NAME>>_iterableInfoDiv",
|
|
2168
|
+
component: "ZdTag",
|
|
2169
|
+
cssClass: "zd-grid-div-footer",
|
|
2170
|
+
tag: "div",
|
|
2171
|
+
children: [
|
|
2172
|
+
{
|
|
2173
|
+
name: "<<NAME>>_iterablePageSize",
|
|
2174
|
+
component: "ZdIterablePageSize",
|
|
2175
|
+
iterableComponentName: "<<NAME>>"
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
name: "<<NAME>>_iterablePageInfo",
|
|
2179
|
+
component: "ZdIterablePageInfo",
|
|
2180
|
+
iterableComponentName: "<<NAME>>"
|
|
2181
|
+
}
|
|
2182
|
+
]
|
|
2183
|
+
}
|
|
2184
|
+
]);
|
|
2185
|
+
s(this, "noResultsText", "NO_RESULT");
|
|
2186
|
+
s(this, "noResultSlot", [
|
|
2187
|
+
{
|
|
2188
|
+
name: "<<NAME>>_no-result",
|
|
2189
|
+
component: "ZdText",
|
|
2190
|
+
cssClass: "no-result",
|
|
2191
|
+
text: this.noResultsText
|
|
2192
|
+
}
|
|
2193
|
+
]);
|
|
2194
|
+
s(this, "errorSlot", []);
|
|
2195
|
+
s(this, "dense", !0);
|
|
2196
|
+
s(this, "headerBackground", "");
|
|
2197
|
+
s(this, "headerCellTextColor", "");
|
|
2198
|
+
s(this, "height", "auto");
|
|
2199
|
+
s(this, "loadingText", "LOADING");
|
|
2200
|
+
s(this, "maxHeight", "none");
|
|
2201
|
+
s(this, "maxWidth", "none");
|
|
2202
|
+
s(this, "minHeight", "auto");
|
|
2203
|
+
s(this, "minWidth", "auto");
|
|
2204
|
+
s(this, "noDataText", "NO_DATA");
|
|
2205
|
+
s(this, "noDataSlot", [
|
|
2206
|
+
{
|
|
2207
|
+
name: "<<NAME>>_no-data",
|
|
2208
|
+
component: "ZdText",
|
|
2209
|
+
cssClass: "no-data",
|
|
2210
|
+
text: this.noDataText
|
|
2211
|
+
}
|
|
2212
|
+
]);
|
|
2213
|
+
s(this, "showFooter", !0);
|
|
2214
|
+
s(this, "showHeader", !0);
|
|
2215
|
+
s(this, "showSelectAll", !0);
|
|
2216
|
+
s(this, "width", "100%");
|
|
2217
|
+
s(this, "backgroundColor", "transparent");
|
|
2218
|
+
s(this, "canEditRow");
|
|
2219
|
+
s(this, "showCancelColumn", !1);
|
|
2220
|
+
s(this, "doubleClickEdit", !1);
|
|
2221
|
+
s(this, "singleEdit", !1);
|
|
2222
|
+
s(this, "editingNewRows", !1);
|
|
2223
|
+
s(this, "defaultLazy", !1);
|
|
2224
|
+
s(this, "toolbarSlotProps", !1);
|
|
2225
|
+
s(this, "filterRelationsDatasource");
|
|
2226
|
+
s(this, "filterOperationsDatasource");
|
|
2227
|
+
this.title = this.getInitValue("title", t.title, this.title), this.addButton = this.getInitValue("addButton", t.addButton, this.addButton), this.deleteButton = this.getInitValue("deleteButton", t.deleteButton, this.deleteButton), this.filterButton = this.getInitValue("filterButton", t.filterButton, this.filterButton), this.showSearch = this.getInitValue("showSearch", t.showSearch, this.showSearch), this.columnFilterButton = this.getInitValue(
|
|
2228
|
+
"columnFilterButton",
|
|
2229
|
+
t.columnFilterButton,
|
|
2230
|
+
this.columnFilterButton
|
|
2231
|
+
), this.columnsButton = this.getInitValue("columnsButton", t.columnsButton, this.columnsButton), this.columnsButtonIgnore = this.getInitValue(
|
|
2232
|
+
"columnsButtonIgnore",
|
|
2233
|
+
t.columnsButtonIgnore,
|
|
2234
|
+
this.columnsButtonIgnore
|
|
2235
|
+
), this.showEditButtons = this.getInitValue("showEditButtons", t.showEditButtons, this.showEditButtons), this.dragColumns = this.getInitValue("dragColumns", t.dragColumns, this.dragColumns), this.resizeColumns = this.getInitValue("resizeColumns", t.resizeColumns, this.resizeColumns), this.showLayoutOptions = this.getInitValue("showLayoutOptions", t.showLayoutOptions, this.showLayoutOptions), this.xlsDefaultType = this.getInitValue("xlsDefaultType", t.xlsDefaultType, this.xlsDefaultType), this.showExport = this.getInitValue("showExport", t.showExport, this.showExport), this.showReload = this.getInitValue("showReload", t.showReload, this.showReload), this.exportConfig = this.getInitValue("exportConfig", t.exportConfig, this.exportConfig), this.modalFilterProps = this.getInitValue("modalFilterProps", t.modalFilterProps, this.modalFilterProps), this.exportActions = t.exportActions || this.exportActions, this.groupsOpened = this.getInitValue("groupsOpened", t.groupsOpened, this.groupsOpened), this.showSummaryTotal = this.getInitValue("showSummaryTotal", t.showSummaryTotal, this.showSummaryTotal), this.showCheckboxAllFilter = this.getInitValue(
|
|
2236
|
+
"showCheckboxAllFilter",
|
|
2237
|
+
t.showCheckboxAllFilter,
|
|
2238
|
+
this.showCheckboxAllFilter
|
|
2239
|
+
), this.defaultFilter = this.getInitValue("defaultFilter", t.defaultFilter, this.defaultFilter), this.toolbarConfig = this.getInitValue("toolbarConfig", t.toolbarConfig, this.toolbarConfig), this.showHideButton = this.getInitValue("showHideButton", t.showHideButton, this.showHideButton), this.toolbarOpened = this.getInitValue("toolbarOpened", t.toolbarOpened, this.toolbarOpened), this.editNewRowsOnly = this.getInitValue("editNewRowsOnly", t.editNewRowsOnly, this.editNewRowsOnly), this.mainGrid = this.getInitValue("mainGrid", t.mainGrid, this.mainGrid), this.reportTitle = this.getInitValue("reportTitle", t.reportTitle, this.reportTitle), this.reportLabelFormatter = this.getInitValue(
|
|
2240
|
+
"reportLabelFormatter",
|
|
2241
|
+
t.reportLabelFormatter,
|
|
2242
|
+
this.reportLabelFormatter
|
|
2243
|
+
), this.actions = t.actions || this.actions, this.toolbarSlotProps = t.toolbarSlot !== void 0, this.cellSelection = this.getInitValue("cellSelection", t.cellSelection, this.cellSelection), this.dense = this.getInitValue("dense", t.dense, this.dense), this.disableSelection = this.getInitValue("disableSelection", t.disableSelection, this.disableSelection), this.dragColumns = this.getInitValue("dragColumns", t.dragColumns, this.dragColumns), this.fillHeight = this.getInitValue("fillHeight", t.fillHeight, this.fillHeight), this.headerCellTextColor = this.getInitValue(
|
|
2244
|
+
"headerCellTextColor",
|
|
2245
|
+
t.headerCellTextColor,
|
|
2246
|
+
this.headerCellTextColor
|
|
2247
|
+
), this.height = this.getInitValue("height", t.height, this.height), this.loadingText = this.getInitValue("loadingText", t.loadingText, this.loadingText), this.maxHeight = this.getInitValue("maxHeight", t.maxHeight, this.maxHeight), this.maxWidth = this.getInitValue("maxWidth", t.maxWidth, this.maxWidth), this.minHeight = this.getInitValue("minHeight", t.minHeight, this.minHeight), this.minWidth = this.getInitValue("minWidth", t.minWidth, this.minWidth), this.noDataText = this.getInitValue("noDataText", t.noDataText, this.noDataText), this.noResultsText = this.getInitValue("noResultsText", t.noResultsText, this.noResultsText), this.resizeColumns = this.getInitValue("resizeColumns", t.resizeColumns, this.resizeColumns), this.rowStyleConditions = this.getInitValue(
|
|
2248
|
+
"rowStyleConditions",
|
|
2249
|
+
t.rowStyleConditions,
|
|
2250
|
+
this.rowStyleConditions
|
|
2251
|
+
), this.selectable = this.getInitValue("selectable", t.selectable, this.selectable), this.selectAllPages = this.getInitValue("selectAllPages", t.selectAllPages, this.selectAllPages), this.showFooter = this.getInitValue("showFooter", t.showFooter, this.showFooter), this.showHeader = this.getInitValue("showHeader", t.showHeader, this.showHeader), this.showSelectAll = this.getInitValue("showSelectAll", t.showSelectAll, this.showSelectAll), this.width = this.getInitValue("width", t.width, this.width), this.backgroundColor = this.getInitValue("backgroundColor", t.backgroundColor, this.backgroundColor);
|
|
2252
|
+
const e = this.backgroundColor === "transparent" ? "" : this.backgroundColor;
|
|
2253
|
+
this.headerBackground = this.getInitValue("headerBackground", t.headerBackground, e), this.doubleClickEdit = this.getInitValue("doubleClickEdit", t.doubleClickEdit, this.doubleClickEdit), this.singleEdit = this.getInitValue("singleEdit", t.singleEdit, this.singleEdit), this.showCancelColumn = this.getInitValue("showCancelColumn", t.showCancelColumn, this.showCancelColumn), this.canEditRow = this.getInitValue("canEditRow", t.canEditRow, this.canEditRow), this.editingNewRows = this.getInitValue("editingNewRows", t.editingNewRows, this.editingNewRows), this.toolbarSlot = t.toolbarSlot || this.toolbarSlot, this.footerSlot = t.footerSlot || this.footerSlot, this.noDataSlot = t.noDataSlot || this.noDataSlot, this.noResultSlot = t.noResultSlot || this.noResultSlot, this.errorSlot = t.errorSlot || this.errorSlot, this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot), this.footerSlot = this.changeDefaultSlotNames(this.footerSlot), this.toolbarSlot = this.changeDefaultSlotNames(this.toolbarSlot), this.noResultSlot = this.changeDefaultSlotNames(this.noResultSlot), this.errorSlot = this.changeDefaultSlotNames(this.errorSlot), this.defaultLazy = this.getDefaultLazy(t), this.deleteButton === "selection" && (this.selectable = !0), this.tableActionBuilder = new rt(this), this.iterableTable = new st(this), this.dataSelector = new Qt(this), this.tekGridEvents = new vt(this), this.dataNavigator = new Lt(this), this.viewNavigator = new at(), this.dataEditor = new Mt(this), this.columnsSearcher = new yt(), this.groupedDataManager = new Bt(this), this.tekGridToolbarProvider = new ft(this, "show");
|
|
2254
|
+
}
|
|
2255
|
+
initializeDatasource(t) {
|
|
2256
|
+
var o;
|
|
2257
|
+
let e = It(t.datasource);
|
|
2258
|
+
if (typeof t.datasource == "string" && w.isAccessorDefinition(t.datasource)) {
|
|
2259
|
+
const [r, a] = w.getAccessor(t.datasource);
|
|
2260
|
+
e = f.getInstance(r)[a];
|
|
2261
|
+
}
|
|
2262
|
+
this.datasource = y.factory({
|
|
2263
|
+
...e,
|
|
2264
|
+
searchIn: ((o = t.datasource) == null ? void 0 : o.searchIn) || `{{IterableController_${this.name}.searchIn}}`,
|
|
2265
|
+
lazyLoad: !0
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
columnHasFilter(t) {
|
|
2269
|
+
return this.datasource.hasFilter(t);
|
|
2270
|
+
}
|
|
2271
|
+
registerTask(t) {
|
|
2272
|
+
this.groupedDataManager.registerTask(t);
|
|
2273
|
+
}
|
|
2274
|
+
async loadAfterTasks() {
|
|
2275
|
+
return this.groupedDataManager.loadAfterTasks();
|
|
2276
|
+
}
|
|
2277
|
+
calcSummary(t, e, o) {
|
|
2278
|
+
this.tekGridEvents.calcSummary(t, e, o);
|
|
2279
|
+
}
|
|
2280
|
+
getDefaultLazy(t) {
|
|
2281
|
+
if (typeof t.datasource == "object")
|
|
2282
|
+
return t.datasource.lazyLoad;
|
|
2283
|
+
if (typeof t.datasource == "string" && w.isAccessorDefinition(t.datasource)) {
|
|
2284
|
+
const [e, o] = w.getAccessor(t.datasource);
|
|
2285
|
+
return f.getInstance(e)[o].lazyLoad || !1;
|
|
2286
|
+
}
|
|
2287
|
+
return !1;
|
|
2288
|
+
}
|
|
2289
|
+
initializeGrouping(t) {
|
|
2290
|
+
this.groupedDataManager.initializeGrouping(t);
|
|
2291
|
+
}
|
|
2292
|
+
updateGrouping(t) {
|
|
2293
|
+
return this.groupedDataManager.updateGrouping(t);
|
|
2294
|
+
}
|
|
2295
|
+
updateGroupedData(t) {
|
|
2296
|
+
return this.groupedDataManager.updateGroupedData(t);
|
|
2297
|
+
}
|
|
2298
|
+
buildGroupedData() {
|
|
2299
|
+
this.groupedDataManager.buildGroupedData();
|
|
2300
|
+
}
|
|
2301
|
+
updateSummary() {
|
|
2302
|
+
this.groupedDataManager.updateSummary();
|
|
2303
|
+
}
|
|
2304
|
+
openGroup(t) {
|
|
2305
|
+
this.groupedDataManager.openGroup(t);
|
|
2306
|
+
}
|
|
2307
|
+
isItemVisible(t) {
|
|
2308
|
+
return this.groupedDataManager.isItemVisible(t);
|
|
2309
|
+
}
|
|
2310
|
+
isGrouped() {
|
|
2311
|
+
return this.groupedDataManager.isGrouped();
|
|
2312
|
+
}
|
|
2313
|
+
isColumnSearchable(t) {
|
|
2314
|
+
return this.groupedDataManager.isColumnSearchable(t);
|
|
2315
|
+
}
|
|
2316
|
+
getGroupedData() {
|
|
2317
|
+
return this.groupedDataManager.getGroupedData();
|
|
2318
|
+
}
|
|
2319
|
+
directionalLeft(t) {
|
|
2320
|
+
this.groupedDataManager.directionalLeft(t), this.viewNavigator.navigateLeft(t);
|
|
2321
|
+
}
|
|
2322
|
+
directionalRight(t) {
|
|
2323
|
+
this.groupedDataManager.directionalRight(t), this.viewNavigator.navigateRight(t);
|
|
2324
|
+
}
|
|
2325
|
+
buildReportGroups() {
|
|
2326
|
+
return this.columns.filter((t) => t.grouped).map((t) => ({
|
|
2327
|
+
field: t.name,
|
|
2328
|
+
header: {
|
|
2329
|
+
displayfield: t.name,
|
|
2330
|
+
label: g.translate(t.label)
|
|
2331
|
+
},
|
|
2332
|
+
name: t.name
|
|
2333
|
+
}));
|
|
2334
|
+
}
|
|
2335
|
+
buildReportAggregations() {
|
|
2336
|
+
const t = {};
|
|
2337
|
+
return this.columns.filter((e) => e.aggregation).forEach((e) => {
|
|
2338
|
+
t[e.name] = { expression: e.aggregation };
|
|
2339
|
+
}), t;
|
|
2340
|
+
}
|
|
2341
|
+
async getReport(t, e, o = {}) {
|
|
2342
|
+
const r = new nt(this, this.title || this.reportTitle), a = this.buildReportGroups(), n = this.buildReportAggregations();
|
|
2343
|
+
let l = t;
|
|
2344
|
+
a.length === 0 && t.substring(0, 3) === "xls" && (l = "xls");
|
|
2345
|
+
let h;
|
|
2346
|
+
if (this.datasource instanceof N || this.datasource instanceof C) {
|
|
2347
|
+
const u = { ...this.datasource.dynamicFilter }, A = async (p) => {
|
|
2348
|
+
let R;
|
|
2349
|
+
try {
|
|
2350
|
+
R = this.getColumn(p);
|
|
2351
|
+
} catch (O) {
|
|
2352
|
+
if (O instanceof gt)
|
|
2353
|
+
return;
|
|
2354
|
+
throw O;
|
|
2355
|
+
}
|
|
2356
|
+
const { label: T } = R;
|
|
2357
|
+
if (u[T] = [...u[p]], delete u[p], !R.componentProps.datasource) return;
|
|
2358
|
+
const P = u[T].map(
|
|
2359
|
+
(O) => O.value
|
|
2360
|
+
);
|
|
2361
|
+
await R.getBatchLookupData(p, P), u[T] = u[T].map((O) => {
|
|
2362
|
+
const b = { ...O }, { value: H } = b, Y = R.formatterByRow(
|
|
2363
|
+
{ [p]: H },
|
|
2364
|
+
{ formatterDataText: void 0 }
|
|
2365
|
+
);
|
|
2366
|
+
return b.value = Y, b;
|
|
2367
|
+
});
|
|
2368
|
+
}, m = Object.keys(u).map(A);
|
|
2369
|
+
await Promise.all(m), h = new bt(u).build();
|
|
2370
|
+
}
|
|
2371
|
+
let c;
|
|
2372
|
+
typeof this.events.beforeOpenReport == "function" && (c = this.events.beforeOpenReport);
|
|
2373
|
+
try {
|
|
2374
|
+
const u = await r.getReport(
|
|
2375
|
+
l,
|
|
2376
|
+
e,
|
|
2377
|
+
{
|
|
2378
|
+
metaData: pt(o, {
|
|
2379
|
+
filter: h,
|
|
2380
|
+
groups: a,
|
|
2381
|
+
columns: n,
|
|
2382
|
+
xlsDefaultType: this.xlsDefaultType
|
|
2383
|
+
})
|
|
2384
|
+
},
|
|
2385
|
+
c,
|
|
2386
|
+
this.reportLabelFormatter
|
|
2387
|
+
);
|
|
2388
|
+
return window.open(u);
|
|
2389
|
+
} catch (u) {
|
|
2390
|
+
if (u instanceof lt)
|
|
2391
|
+
return dt.show({ name: "no-data-warning", text: g.translate("TEKGRID_NO_DATA"), color: "warning" }), null;
|
|
2392
|
+
throw u;
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
setViewUpdateFixedColumns(t) {
|
|
2396
|
+
this.groupedDataManager.setViewUpdateFixedColumns(t);
|
|
2397
|
+
}
|
|
2398
|
+
setViewUpdateScrollData(t) {
|
|
2399
|
+
this.groupedDataManager.setViewUpdateScrollData(t);
|
|
2400
|
+
}
|
|
2401
|
+
onCreated() {
|
|
2402
|
+
this.createGridController(), this.addCancelColumn(), super.onCreated(), f.addController(`GridController_${this.name}`, kt, [this]), this.toolbarSlotProps || (this.toolbarSlot = this.tekGridToolbarProvider.getProperties()), this.createDynamicFilterDatasources();
|
|
2403
|
+
}
|
|
2404
|
+
createDynamicFilterDatasources() {
|
|
2405
|
+
if (!(this.datasource instanceof N || this.datasource instanceof C)) return;
|
|
2406
|
+
const t = new St();
|
|
2407
|
+
this.filterRelationsDatasource = t.factory(this.datasource.dynamicFilterRelations), this.filterOperationsDatasource = t.factory(this.datasource.dynamicFilterOperations);
|
|
2408
|
+
}
|
|
2409
|
+
onMounted(t) {
|
|
2410
|
+
super.onMounted(t), this.keyMapMerger = new ht(this, [ut, ct, Ut]), this.keyMapMerger.bind(t), this.initializeGrouping(this.defaultLazy);
|
|
2411
|
+
}
|
|
2412
|
+
onBeforeDestroy() {
|
|
2413
|
+
super.onBeforeDestroy(), this.keyMapMerger.unbind();
|
|
2414
|
+
}
|
|
2415
|
+
createColumn(t) {
|
|
2416
|
+
return new U(t, this);
|
|
2417
|
+
}
|
|
2418
|
+
getConditionalProps({ row: t, column: e }) {
|
|
2419
|
+
const o = this.getRowStyleConditions(t), r = this.getAppliedConditions({ row: t, column: e });
|
|
2420
|
+
return { ...o, ...r };
|
|
2421
|
+
}
|
|
2422
|
+
changeOrder(t) {
|
|
2423
|
+
return this.iterableTable.changeOrder(t);
|
|
2424
|
+
}
|
|
2425
|
+
selectCell(t, e) {
|
|
2426
|
+
this.iterableTable.selectCell(t, e);
|
|
2427
|
+
}
|
|
2428
|
+
reapplyRowStyleConditions(t) {
|
|
2429
|
+
return this.iterableTable.reapplyRowStyleConditions(t);
|
|
2430
|
+
}
|
|
2431
|
+
getRowStyleConditions(t) {
|
|
2432
|
+
return this.iterableTable.getRowStyleConditions(t);
|
|
2433
|
+
}
|
|
2434
|
+
deleteRows() {
|
|
2435
|
+
return this.iterableTable.deleteRows();
|
|
2436
|
+
}
|
|
2437
|
+
selectAll(t) {
|
|
2438
|
+
this.dataSelector.selectAll(t);
|
|
2439
|
+
}
|
|
2440
|
+
toggleRow(t) {
|
|
2441
|
+
this.dataSelector.toggleRow(t);
|
|
2442
|
+
}
|
|
2443
|
+
selectRow(t, e) {
|
|
2444
|
+
this.dataSelector.selectRow(t, e);
|
|
2445
|
+
}
|
|
2446
|
+
callDisableSelection(t) {
|
|
2447
|
+
return this.dataSelector.callDisableSelection(t);
|
|
2448
|
+
}
|
|
2449
|
+
selectClick(t, e, o, r) {
|
|
2450
|
+
this.dataSelector.selectClick(t, e, o, r);
|
|
2451
|
+
}
|
|
2452
|
+
selectAllClick(t, e, o) {
|
|
2453
|
+
this.dataSelector.selectAllClick(t, e, o);
|
|
2454
|
+
}
|
|
2455
|
+
navigatePageUp() {
|
|
2456
|
+
this.dataNavigator.navigatePageUp();
|
|
2457
|
+
}
|
|
2458
|
+
navigatePageDown() {
|
|
2459
|
+
this.dataNavigator.navigatePageDown();
|
|
2460
|
+
}
|
|
2461
|
+
setViewNavigate(t) {
|
|
2462
|
+
this.viewNavigator.setViewNavigate(t);
|
|
2463
|
+
}
|
|
2464
|
+
navigateLeft(t) {
|
|
2465
|
+
this.cellSelection && this.viewNavigator.navigateLeft(t);
|
|
2466
|
+
}
|
|
2467
|
+
navigateRight(t) {
|
|
2468
|
+
this.cellSelection && this.viewNavigator.navigateRight(t);
|
|
2469
|
+
}
|
|
2470
|
+
navigateUp() {
|
|
2471
|
+
this.viewNavigator.navigateUp();
|
|
2472
|
+
}
|
|
2473
|
+
navigateDown() {
|
|
2474
|
+
this.viewNavigator.navigateDown();
|
|
2475
|
+
}
|
|
2476
|
+
navigateDatasource(t) {
|
|
2477
|
+
this.dataNavigator.navigateDatasource(t);
|
|
2478
|
+
}
|
|
2479
|
+
getActionComponent(t, e, o, r) {
|
|
2480
|
+
return this.tableActionBuilder.getActionComponent(t, e, o, r);
|
|
2481
|
+
}
|
|
2482
|
+
createGridController() {
|
|
2483
|
+
this.dataEditor.createGridController();
|
|
2484
|
+
}
|
|
2485
|
+
addCancelColumn() {
|
|
2486
|
+
this.dataEditor.addCancelColumn();
|
|
2487
|
+
}
|
|
2488
|
+
getCancelColumnProps() {
|
|
2489
|
+
return this.dataEditor.getCancelColumnProps();
|
|
2490
|
+
}
|
|
2491
|
+
isAdded(t) {
|
|
2492
|
+
return this.dataEditor.isAdded(t);
|
|
2493
|
+
}
|
|
2494
|
+
cancelAddedRow(t) {
|
|
2495
|
+
return this.dataEditor.cancelAddedRow(t);
|
|
2496
|
+
}
|
|
2497
|
+
cancelAddedRows() {
|
|
2498
|
+
return this.dataEditor.cancelAddedRows();
|
|
2499
|
+
}
|
|
2500
|
+
getAddedRows() {
|
|
2501
|
+
return this.dataEditor.getAddedRows();
|
|
2502
|
+
}
|
|
2503
|
+
addNewRow(t, e) {
|
|
2504
|
+
return this.dataEditor.addNewRow(t, e);
|
|
2505
|
+
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Adds a new row taking the group column values from the currently selected row (or group header),
|
|
2508
|
+
* so callers don't need to manually specify them when adding a row within a selected group.
|
|
2509
|
+
*/
|
|
2510
|
+
addToSelection(t, e = "end") {
|
|
2511
|
+
const { currentRow: o } = this.datasource, r = o.groupHeader ? o.groupRow : o, a = this.columns.filter((h) => h.grouped).map((h) => h.name), n = wt(r, a), l = { ...t, ...n };
|
|
2512
|
+
return this.addNewRow(l, e);
|
|
2513
|
+
}
|
|
2514
|
+
getVisibleValue(t, e) {
|
|
2515
|
+
return this.dataEditor.getVisibleValue(t, e);
|
|
2516
|
+
}
|
|
2517
|
+
getVisibleRow(t) {
|
|
2518
|
+
return this.dataEditor.getVisibleRow(t);
|
|
2519
|
+
}
|
|
2520
|
+
getEditableComponent(t, e) {
|
|
2521
|
+
return this.dataEditor.getEditableComponent(t, e);
|
|
2522
|
+
}
|
|
2523
|
+
isEdited(t, e) {
|
|
2524
|
+
return this.dataEditor.isEdited(t, e);
|
|
2525
|
+
}
|
|
2526
|
+
isValid(t, e, o) {
|
|
2527
|
+
return this.dataEditor.isValid(t, e, o);
|
|
2528
|
+
}
|
|
2529
|
+
checkValid(t, e) {
|
|
2530
|
+
return this.dataEditor.checkValid(t, e);
|
|
2531
|
+
}
|
|
2532
|
+
isGridValid(t) {
|
|
2533
|
+
return this.dataEditor.isGridValid(t);
|
|
2534
|
+
}
|
|
2535
|
+
getComponent(t, e) {
|
|
2536
|
+
return this.dataEditor.getComponent(t, e);
|
|
2537
|
+
}
|
|
2538
|
+
updateRow(t) {
|
|
2539
|
+
this.dataEditor.updateRow(t);
|
|
2540
|
+
}
|
|
2541
|
+
updateCell(t, e, o) {
|
|
2542
|
+
this.dataEditor.updateCell(t, e, o);
|
|
2543
|
+
}
|
|
2544
|
+
setViewEnterEdit(t) {
|
|
2545
|
+
this.dataEditor.setViewEnterEdit(t);
|
|
2546
|
+
}
|
|
2547
|
+
enterEdit(t, e) {
|
|
2548
|
+
this.dataEditor.enterEdit(t, e);
|
|
2549
|
+
}
|
|
2550
|
+
cancelEditedRows() {
|
|
2551
|
+
return this.dataEditor.cancelEditedRows();
|
|
2552
|
+
}
|
|
2553
|
+
saveEditedRows(t) {
|
|
2554
|
+
return this.dataEditor.saveEditedRows(t);
|
|
2555
|
+
}
|
|
2556
|
+
reapplyCanEditRow(t) {
|
|
2557
|
+
return this.dataEditor.reapplyCanEditRow(t);
|
|
2558
|
+
}
|
|
2559
|
+
getCanEditRow(t) {
|
|
2560
|
+
return this.dataEditor.getCanEditRow(t);
|
|
2561
|
+
}
|
|
2562
|
+
getEditedRows(t, e) {
|
|
2563
|
+
return this.dataEditor.getEditedRows(t, e);
|
|
2564
|
+
}
|
|
2565
|
+
getEditedRow(t) {
|
|
2566
|
+
return this.dataEditor.getEditedRow(t);
|
|
2567
|
+
}
|
|
2568
|
+
rowClick(t, e, o) {
|
|
2569
|
+
this.tekGridEvents.rowClick(t, e, o);
|
|
2570
|
+
}
|
|
2571
|
+
rowDoubleClick(t, e, o) {
|
|
2572
|
+
this.tekGridEvents.rowDoubleClick(t, e, o);
|
|
2573
|
+
}
|
|
2574
|
+
cellDoubleClick(t, e, o, r) {
|
|
2575
|
+
this.tekGridEvents.cellDoubleClick(t, e, o, r);
|
|
2576
|
+
}
|
|
2577
|
+
inlineEdit(t, e, o, r) {
|
|
2578
|
+
this.tekGridEvents.inlineEdit(t, e, o, r);
|
|
2579
|
+
}
|
|
2580
|
+
cellClick(t, e, o, r) {
|
|
2581
|
+
this.tekGridEvents.cellClick(t, e, o, r);
|
|
2582
|
+
}
|
|
2583
|
+
cellClickEvent(t, e, o, r) {
|
|
2584
|
+
this.tekGridEvents.cellClickEvent(t, e, o, r);
|
|
2585
|
+
}
|
|
2586
|
+
groupRowClick(t, e, o) {
|
|
2587
|
+
this.tekGridEvents.groupRowClick(t, e, o);
|
|
2588
|
+
}
|
|
2589
|
+
groupRowDoubleClick(t, e, o) {
|
|
2590
|
+
this.tekGridEvents.groupRowDoubleClick(t, e, o);
|
|
2591
|
+
}
|
|
2592
|
+
selectGroupClick(t, e, o, r) {
|
|
2593
|
+
this.tekGridEvents.selectGroupClick(t, e, o, r);
|
|
2594
|
+
}
|
|
2595
|
+
async setSearch(t) {
|
|
2596
|
+
const { datasource: e } = this;
|
|
2597
|
+
return (e instanceof N || e instanceof C) && (e.searchJoin = await this.columnsSearcher.searchColumn(this.columns, t)), e.page = 1, e.setSearch(t);
|
|
2598
|
+
}
|
|
2599
|
+
getAtomInstance(t) {
|
|
2600
|
+
return this.tekGridToolbarProvider.getAtomInstance(t);
|
|
2601
|
+
}
|
|
2602
|
+
getAtomName(t) {
|
|
2603
|
+
return this.tekGridToolbarProvider.getAtomName(t);
|
|
2604
|
+
}
|
|
2605
|
+
getFilterInputs(t) {
|
|
2606
|
+
return this.tekGridToolbarProvider.getFilterInputs(t);
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
_.add({
|
|
2610
|
+
"pt-BR": {
|
|
2611
|
+
translation: {
|
|
2612
|
+
TEKGRID_CONTAINS: "contém",
|
|
2613
|
+
TEKGRID_NOT_CONTAINS: "não contém",
|
|
2614
|
+
TEKGRID_EQUALS: "é igual a",
|
|
2615
|
+
TEKGRID_NOT_EQUALS: "é diferente de",
|
|
2616
|
+
TEKGRID_GREATER_THAN: "é maior que",
|
|
2617
|
+
TEKGRID_LESS_THAN: "é menor que",
|
|
2618
|
+
TEKGRID_GREATER_THAN_EQUALS: "é maior ou igual a",
|
|
2619
|
+
TEKGRID_LESS_THAN_EQUALS: "é menor ou igual a",
|
|
2620
|
+
TEKGRID_IN: "um dos valores",
|
|
2621
|
+
TEKGRID_NOT_IN: "nenhum dos valores",
|
|
2622
|
+
TEKGRID_BETWEEN: "está entre",
|
|
2623
|
+
TEKGRID_AND: "e",
|
|
2624
|
+
TEKGRID_OR: "ou",
|
|
2625
|
+
TEKGRID_HIDE: "Esconder Ações",
|
|
2626
|
+
TEKGRID_SHOW: "Mostrar Ações",
|
|
2627
|
+
TEKGRID_ADD: "Adicionar",
|
|
2628
|
+
TEKGRID_DELETE: "Excluir",
|
|
2629
|
+
TEKGRID_REFRESH: "Atualizar",
|
|
2630
|
+
TEKGRID_COLUMNS: "Colunas",
|
|
2631
|
+
TEKGRID_SAVE: "Salvar",
|
|
2632
|
+
TEKGRID_CANCEL: "Cancelar",
|
|
2633
|
+
TEKGRID_APPLY: "Aplicar",
|
|
2634
|
+
TEKGRID_FILTER: "Filtro",
|
|
2635
|
+
TEKGRID_MULTIPLE_VALUE_HINT: 'Separe valores usando ";"',
|
|
2636
|
+
TEKGRID_EXPORT: "Exportar",
|
|
2637
|
+
TEKGRID_EXPORT_AS: "Exportar como {{ type }}",
|
|
2638
|
+
TEKGRID_PORTRAIT: "Retrato",
|
|
2639
|
+
TEKGRID_LANDSCAPE: "Paisagem",
|
|
2640
|
+
TEKGRID_COLUMN_VISIBLE: "Visível",
|
|
2641
|
+
TEKGRID_COLUMN_GROUPED: "Grupo",
|
|
2642
|
+
TEKGRID_COLUMN_AGGREGATION: "Totalização",
|
|
2643
|
+
TEKGRID_COLUMN_LABEL: "Rótulo",
|
|
2644
|
+
TEKGRID_COLUMN_ALIGNMENT: "Alinhamento",
|
|
2645
|
+
TEKGRID_COLUMN_GROUP_OPENED: "Aberto (grupo)",
|
|
2646
|
+
TEKGRID_COLUMN_ORDER: "Ordem",
|
|
2647
|
+
TEKGRID_COLUMN_ORDER_DIRECTION: "Direção (ordem)",
|
|
2648
|
+
TEKGRID_AGGREGATION_SUM: "Soma",
|
|
2649
|
+
TEKGRID_AGGREGATION_AVG: "Média",
|
|
2650
|
+
TEKGRID_AGGREGATION_MAX: "Máximo",
|
|
2651
|
+
TEKGRID_AGGREGATION_MIN: "Mínimo",
|
|
2652
|
+
TEKGRID_AGGREGATION_COUNT: "Contador",
|
|
2653
|
+
TEKGRID_MORE_OPTIONS: "Mais opções",
|
|
2654
|
+
TEKGRID_COLUMNS_OPTIONS: "Configuração de colunas",
|
|
2655
|
+
TEKGRID_CLOSE: "Fechar",
|
|
2656
|
+
TEKGRID_FIXED_COLUMNS: "Colunas fixadas",
|
|
2657
|
+
TEKGRID_VISIBLE_COLUMNS: "Colunas visíveis",
|
|
2658
|
+
TEKGRID_GROUPED_COLUMNS: "Colunas agrupadas",
|
|
2659
|
+
TEKGRID_ORDER: "Ordem",
|
|
2660
|
+
TEKGRID_OTHER_COLUMNS: "Outras colunas",
|
|
2661
|
+
TEKGRID_DROP_COLUMNS: "Arraste colunas aqui",
|
|
2662
|
+
TEKGRID_DETAILS_FOR: "Detalhes para:",
|
|
2663
|
+
TEKGRID_LEFT: "Esquerda",
|
|
2664
|
+
TEKGRID_CENTER: "Centro",
|
|
2665
|
+
TEKGRID_RIGHT: "Direita",
|
|
2666
|
+
TEKGRID_ASC: "Crescente",
|
|
2667
|
+
TEKGRID_DESC: "Decrescente",
|
|
2668
|
+
TEKGRID_SELECT_COLUMN: "(selecione uma ou mais colunas)",
|
|
2669
|
+
TEKGRID_SELECT_ALL: "Selecionar todas",
|
|
2670
|
+
TEKGRID_HELPERVALUE_TODAY: "Hoje",
|
|
2671
|
+
TEKGRID_HELPERVALUE_TOMORROW: "Amanhã",
|
|
2672
|
+
TEKGRID_HELPERVALUE_YESTERDAY: "Ontem",
|
|
2673
|
+
TEKGRID_HELPERVALUE_LAST_7_DAYS: "Últimos 7 Dias",
|
|
2674
|
+
TEKGRID_HELPERVALUE_NEXT_7_DAYS: "Próximos 7 Dias",
|
|
2675
|
+
TEKGRID_HELPERVALUE_CURRENT_WEEK: "Semana Atual",
|
|
2676
|
+
TEKGRID_HELPERVALUE_CURRENT_MONTH: "Mês Atual",
|
|
2677
|
+
TEKGRID_HELPERVALUE_CURRENT_YEAR: "Ano Atual",
|
|
2678
|
+
TEKGRID_WITH_GROUPS: "(Com grupos)",
|
|
2679
|
+
TEKGRID_GRID_MIRROR: "(Espelho do grid)",
|
|
2680
|
+
TEKGRID_NO_DATA: "Não há dados para gerar o relatório"
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
"en-US": {
|
|
2684
|
+
translation: {
|
|
2685
|
+
TEKGRID_CONTAINS: "contains",
|
|
2686
|
+
TEKGRID_NOT_CONTAINS: "does not contain",
|
|
2687
|
+
TEKGRID_EQUALS: "is equal to",
|
|
2688
|
+
TEKGRID_NOT_EQUALS: "is different from",
|
|
2689
|
+
TEKGRID_GREATER_THAN: "is greater than",
|
|
2690
|
+
TEKGRID_LESS_THAN: "is less than",
|
|
2691
|
+
TEKGRID_GREATER_THAN_EQUALS: "is greater or equals to",
|
|
2692
|
+
TEKGRID_LESS_THAN_EQUALS: "is less or equals to",
|
|
2693
|
+
TEKGRID_IN: "is in",
|
|
2694
|
+
TEKGRID_NOT_IN: "is not in",
|
|
2695
|
+
TEKGRID_BETWEEN: "is between",
|
|
2696
|
+
TEKGRID_AND: "and",
|
|
2697
|
+
TEKGRID_OR: "or",
|
|
2698
|
+
TEKGRID_HIDE: "Hide Actions",
|
|
2699
|
+
TEKGRID_SHOW: "Show Actions",
|
|
2700
|
+
TEKGRID_ADD: "Add",
|
|
2701
|
+
TEKGRID_DELETE: "Delete",
|
|
2702
|
+
TEKGRID_REFRESH: "Refresh",
|
|
2703
|
+
TEKGRID_COLUMNS: "Columns",
|
|
2704
|
+
TEKGRID_SAVE: "Save",
|
|
2705
|
+
TEKGRID_CANCEL: "Cancel",
|
|
2706
|
+
TEKGRID_APPLY: "Apply",
|
|
2707
|
+
TEKGRID_FILTER: "Filter",
|
|
2708
|
+
TEKGRID_MULTIPLE_VALUE_HINT: 'Separate values using ";"',
|
|
2709
|
+
TEKGRID_EXPORT: "Export",
|
|
2710
|
+
TEKGRID_EXPORT_AS: "Export as {{ type }}",
|
|
2711
|
+
TEKGRID_PORTRAIT: "Portrait",
|
|
2712
|
+
TEKGRID_LANDSCAPE: "Landscape",
|
|
2713
|
+
TEKGRID_COLUMN_VISIBLE: "Visible",
|
|
2714
|
+
TEKGRID_COLUMN_GROUPED: "Grouped",
|
|
2715
|
+
TEKGRID_COLUMN_AGGREGATION: "Aggregation",
|
|
2716
|
+
TEKGRID_COLUMN_LABEL: "Label",
|
|
2717
|
+
TEKGRID_COLUMN_ALIGNMENT: "Alignment",
|
|
2718
|
+
TEKGRID_COLUMN_GROUP_OPENED: "Opened (group)",
|
|
2719
|
+
TEKGRID_COLUMN_ORDER: "Order",
|
|
2720
|
+
TEKGRID_COLUMN_ORDER_DIRECTION: "Direction (order)",
|
|
2721
|
+
TEKGRID_AGGREGATION_SUM: "Sum",
|
|
2722
|
+
TEKGRID_AGGREGATION_AVG: "Average",
|
|
2723
|
+
TEKGRID_AGGREGATION_MAX: "Maximum",
|
|
2724
|
+
TEKGRID_AGGREGATION_MIN: "Minimum",
|
|
2725
|
+
TEKGRID_AGGREGATION_COUNT: "Count",
|
|
2726
|
+
TEKGRID_MORE_OPTIONS: "More options",
|
|
2727
|
+
TEKGRID_COLUMNS_OPTIONS: "Columns configuration",
|
|
2728
|
+
TEKGRID_CLOSE: "Close",
|
|
2729
|
+
TEKGRID_FIXED_COLUMNS: "Fixed columns",
|
|
2730
|
+
TEKGRID_VISIBLE_COLUMNS: "Visible columns",
|
|
2731
|
+
TEKGRID_GROUPED_COLUMNS: "Grouped columns",
|
|
2732
|
+
TEKGRID_ORDER: "Order",
|
|
2733
|
+
TEKGRID_OTHER_COLUMNS: "Other columns",
|
|
2734
|
+
TEKGRID_DROP_COLUMNS: "Drop columns here",
|
|
2735
|
+
TEKGRID_DETAILS_FOR: "Details for:",
|
|
2736
|
+
TEKGRID_LEFT: "Left",
|
|
2737
|
+
TEKGRID_CENTER: "Center",
|
|
2738
|
+
TEKGRID_RIGHT: "Right",
|
|
2739
|
+
TEKGRID_ASC: "Ascending",
|
|
2740
|
+
TEKGRID_DESC: "Descending",
|
|
2741
|
+
TEKGRID_SELECT_COLUMN: "(select one or more columns)",
|
|
2742
|
+
TEKGRID_SELECT_ALL: "Select all",
|
|
2743
|
+
TEKGRID_HELPERVALUE_TODAY: "Today",
|
|
2744
|
+
TEKGRID_HELPERVALUE_TOMORROW: "Tomorrow",
|
|
2745
|
+
TEKGRID_HELPERVALUE_YESTERDAY: "Yesterday",
|
|
2746
|
+
TEKGRID_HELPERVALUE_LAST_7_DAYS: "Last 7 Days",
|
|
2747
|
+
TEKGRID_HELPERVALUE_NEXT_7_DAYS: "Next 7 Days",
|
|
2748
|
+
TEKGRID_HELPERVALUE_CURRENT_WEEK: "Current Week",
|
|
2749
|
+
TEKGRID_HELPERVALUE_CURRENT_MONTH: "Current Month",
|
|
2750
|
+
TEKGRID_HELPERVALUE_CURRENT_YEAR: "Current Year",
|
|
2751
|
+
TEKGRID_WITH_GROUPS: "(With groups)",
|
|
2752
|
+
TEKGRID_GRID_MIRROR: "(Grid mirror)",
|
|
2753
|
+
TEKGRID_NO_DATA: "There is no data to generate the report"
|
|
2754
|
+
}
|
|
2755
|
+
},
|
|
2756
|
+
"es-CL": {
|
|
2757
|
+
translation: {
|
|
2758
|
+
TEKGRID_CONTAINS: "contiene",
|
|
2759
|
+
TEKGRID_NOT_CONTAINS: "no contiene",
|
|
2760
|
+
TEKGRID_EQUALS: "igual",
|
|
2761
|
+
TEKGRID_NOT_EQUALS: "es diferente de",
|
|
2762
|
+
TEKGRID_GREATER_THAN: "es mayor que",
|
|
2763
|
+
TEKGRID_LESS_THAN: "es menor que",
|
|
2764
|
+
TEKGRID_GREATER_THAN_EQUALS: "es mayor o igual que",
|
|
2765
|
+
TEKGRID_LESS_THAN_EQUALS: "es menor o igual que",
|
|
2766
|
+
TEKGRID_IN: "uno de los valores",
|
|
2767
|
+
TEKGRID_NOT_IN: "ninguno de los valores",
|
|
2768
|
+
TEKGRID_BETWEEN: "está entre",
|
|
2769
|
+
TEKGRID_AND: "e",
|
|
2770
|
+
TEKGRID_OR: "o",
|
|
2771
|
+
TEKGRID_HIDE: "Ocultar Acciones",
|
|
2772
|
+
TEKGRID_SHOW: "Mostrar Acciones",
|
|
2773
|
+
TEKGRID_ADD: "Añadir",
|
|
2774
|
+
TEKGRID_DELETE: "Eliminar",
|
|
2775
|
+
TEKGRID_REFRESH: "Actualizar",
|
|
2776
|
+
TEKGRID_COLUMNS: "Colunas",
|
|
2777
|
+
TEKGRID_SAVE: "Guardar",
|
|
2778
|
+
TEKGRID_CANCEL: "Cancelar",
|
|
2779
|
+
TEKGRID_APPLY: "Aplicar",
|
|
2780
|
+
TEKGRID_FILTER: "Filtro",
|
|
2781
|
+
TEKGRID_MULTIPLE_VALUE_HINT: 'Separe los valores usando ";"',
|
|
2782
|
+
TEKGRID_EXPORT: "Exportar",
|
|
2783
|
+
TEKGRID_EXPORT_AS: "Exportar como {{ type }}",
|
|
2784
|
+
TEKGRID_PORTRAIT: "Vertical",
|
|
2785
|
+
TEKGRID_LANDSCAPE: "Horizontal",
|
|
2786
|
+
TEKGRID_COLUMN_VISIBLE: "Visible",
|
|
2787
|
+
TEKGRID_COLUMN_GROUPED: "Grupo",
|
|
2788
|
+
TEKGRID_COLUMN_AGGREGATION: "Totalización",
|
|
2789
|
+
TEKGRID_COLUMN_LABEL: "Etiqueta",
|
|
2790
|
+
TEKGRID_COLUMN_ALIGNMENT: "alineación",
|
|
2791
|
+
TEKGRID_COLUMN_GROUP_OPENED: "Abierto (grupo)",
|
|
2792
|
+
TEKGRID_COLUMN_ORDER: "Orden",
|
|
2793
|
+
TEKGRID_COLUMN_ORDER_DIRECTION: "Dirección (orden)",
|
|
2794
|
+
TEKGRID_AGGREGATION_SUM: "Suma",
|
|
2795
|
+
TEKGRID_AGGREGATION_AVG: "Media",
|
|
2796
|
+
TEKGRID_AGGREGATION_MAX: "Máximo",
|
|
2797
|
+
TEKGRID_AGGREGATION_MIN: "Mínimo",
|
|
2798
|
+
TEKGRID_AGGREGATION_COUNT: "Contar",
|
|
2799
|
+
TEKGRID_MORE_OPTIONS: "Mas opciones",
|
|
2800
|
+
TEKGRID_COLUMNS_OPTIONS: "Configuración de columna",
|
|
2801
|
+
TEKGRID_CLOSE: "Cerrar",
|
|
2802
|
+
TEKGRID_FIXED_COLUMNS: "Columnas fijas",
|
|
2803
|
+
TEKGRID_VISIBLE_COLUMNS: "Columnas visibles",
|
|
2804
|
+
TEKGRID_GROUPED_COLUMNS: "Columnas agrupadas",
|
|
2805
|
+
TEKGRID_ORDER: "Orden",
|
|
2806
|
+
TEKGRID_OTHER_COLUMNS: "Otras columnas",
|
|
2807
|
+
TEKGRID_DROP_COLUMNS: "Arrastra columnas aquí",
|
|
2808
|
+
TEKGRID_DETAILS_FOR: "Detalles para",
|
|
2809
|
+
TEKGRID_LEFT: "Izquierda",
|
|
2810
|
+
TEKGRID_CENTER: "Centro",
|
|
2811
|
+
TEKGRID_RIGHT: "Derecha",
|
|
2812
|
+
TEKGRID_ASC: "Creciente",
|
|
2813
|
+
TEKGRID_DESC: "Decreciente",
|
|
2814
|
+
TEKGRID_SELECT_COLUMN: "(seleccione una o más columnas)",
|
|
2815
|
+
TEKGRID_SELECT_ALL: "Seleccionar todas",
|
|
2816
|
+
TEKGRID_HELPERVALUE_TODAY: "Hoy",
|
|
2817
|
+
TEKGRID_HELPERVALUE_TOMORROW: "Mañana",
|
|
2818
|
+
TEKGRID_HELPERVALUE_YESTERDAY: "Ayer",
|
|
2819
|
+
TEKGRID_HELPERVALUE_LAST_7_DAYS: "Últimos 7 días",
|
|
2820
|
+
TEKGRID_HELPERVALUE_NEXT_7_DAYS: "Próximos 7 días",
|
|
2821
|
+
TEKGRID_HELPERVALUE_CURRENT_WEEK: "Semana actual",
|
|
2822
|
+
TEKGRID_HELPERVALUE_CURRENT_MONTH: "Mes actual",
|
|
2823
|
+
TEKGRID_HELPERVALUE_CURRENT_YEAR: "Año actual",
|
|
2824
|
+
TEKGRID_WITH_GROUPS: "(Con grupos)",
|
|
2825
|
+
TEKGRID_GRID_MIRROR: "(Espejo de grid)",
|
|
2826
|
+
TEKGRID_NO_DATA: "No hay datos para generar el reporte"
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
});
|
|
2830
|
+
_.add({
|
|
2831
|
+
"pt-BR": {
|
|
2832
|
+
translation: {
|
|
2833
|
+
NO_NOTIFICATIONS: "Nenhuma Notificação",
|
|
2834
|
+
MARK_ALL_AS_READ: "Marcar todas como lidas",
|
|
2835
|
+
NOTIFICATIONS: "Notificações",
|
|
2836
|
+
SEE_ALL_NOTIFICATIONS: "Ver todas notificações",
|
|
2837
|
+
UNAVAILABLE_IMAGE: "Imagem indisponível",
|
|
2838
|
+
REFRESH: "Atualizar",
|
|
2839
|
+
ACTIONS: "Ações",
|
|
2840
|
+
FILTER: "Filtro",
|
|
2841
|
+
LAYOUT: "Layout: ",
|
|
2842
|
+
NEW_LAYOUT: "Novo layout",
|
|
2843
|
+
DEFAULT_LAYOUT: "Padrão",
|
|
2844
|
+
LAYOUT_MODIFIED: "O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações",
|
|
2845
|
+
// eslint-disable-line
|
|
2846
|
+
LAYOUT_NOT_MODIFIED: "Crie um novo layout ou aplique um dos layouts já existentes",
|
|
2847
|
+
LAYOUT_DISCART_CHANGES: "Descartar alterações"
|
|
2848
|
+
}
|
|
2849
|
+
},
|
|
2850
|
+
"en-US": {
|
|
2851
|
+
translation: {
|
|
2852
|
+
NO_NOTIFICATIONS: "No Notifications",
|
|
2853
|
+
MARK_ALL_AS_READ: "Mark all as read",
|
|
2854
|
+
NOTIFICATIONS: "Notifications",
|
|
2855
|
+
SEE_ALL_NOTIFICATIONS: "See all notifications",
|
|
2856
|
+
UNAVAILABLE_IMAGE: "Unavailable image",
|
|
2857
|
+
REFRESH: "Refresh",
|
|
2858
|
+
ACTIONS: "Actions",
|
|
2859
|
+
FILTER: "Filter",
|
|
2860
|
+
LAYOUT: "Layout: ",
|
|
2861
|
+
NEW_LAYOUT: "New layout",
|
|
2862
|
+
DEFAULT_LAYOUT: "Default",
|
|
2863
|
+
LAYOUT_MODIFIED: "The current layout has been modified. Create a new layout, overwrite an existing one or discard changes",
|
|
2864
|
+
// eslint-disable-line
|
|
2865
|
+
LAYOUT_NOT_MODIFIED: "Create a new layout or apply one of the existing layouts",
|
|
2866
|
+
LAYOUT_DISCART_CHANGES: "Discard changes"
|
|
2867
|
+
}
|
|
2868
|
+
},
|
|
2869
|
+
"es-CL": {
|
|
2870
|
+
translation: {
|
|
2871
|
+
NO_NOTIFICATIONS: "Sin Notificación",
|
|
2872
|
+
MARK_ALL_AS_READ: "Marcar todo como leído",
|
|
2873
|
+
NOTIFICATIONS: "Notificaciones",
|
|
2874
|
+
SEE_ALL_NOTIFICATIONS: "Ver todas las notificaciones",
|
|
2875
|
+
UNAVAILABLE_IMAGE: "Imagen no disponible",
|
|
2876
|
+
REFRESH: "Actualizar",
|
|
2877
|
+
ACTIONS: "Acciones",
|
|
2878
|
+
FILTER: "Filtro",
|
|
2879
|
+
LAYOUT: "Disposición: ",
|
|
2880
|
+
NEW_LAYOUT: "Nueva disposición",
|
|
2881
|
+
DEFAULT_LAYOUT: "Default",
|
|
2882
|
+
LAYOUT_MODIFIED: "La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios",
|
|
2883
|
+
// eslint-disable-line
|
|
2884
|
+
LAYOUT_NOT_MODIFIED: "Cree una nueva disposición o aplique una de las disposiciones existentes",
|
|
2885
|
+
LAYOUT_DISCART_CHANGES: "Descartar los cambios"
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2889
|
+
class ee extends Q {
|
|
2890
|
+
constructor() {
|
|
2891
|
+
super(...arguments);
|
|
2892
|
+
s(this, "currentLayoutName", "");
|
|
2893
|
+
s(this, "layoutEdited", !1);
|
|
2894
|
+
s(this, "layouts", {});
|
|
2895
|
+
s(this, "layoutNames", []);
|
|
2896
|
+
s(this, "viewApplyLayout");
|
|
2897
|
+
s(this, "viewGetCurrentLayout");
|
|
2898
|
+
s(this, "originalColumnProps", []);
|
|
2899
|
+
s(this, "originalDatasourceOrder", []);
|
|
2900
|
+
s(this, "originalDatasourceDynamicFilter", {});
|
|
2901
|
+
s(this, "originalDatasourceFilter", {});
|
|
2902
|
+
s(this, "grid");
|
|
2903
|
+
}
|
|
2904
|
+
getParentGrid() {
|
|
2905
|
+
let { parent: t } = this;
|
|
2906
|
+
for (; t && !(t.constructor === K || t.constructor.prototype instanceof K); )
|
|
2907
|
+
t = t.parent;
|
|
2908
|
+
return t;
|
|
2909
|
+
}
|
|
2910
|
+
async onMounted(t) {
|
|
2911
|
+
super.onMounted(t), this.grid = this.getParentGrid(), this.originalDatasourceOrder = [...this.grid.datasource.order], this.originalDatasourceDynamicFilter = {
|
|
2912
|
+
...this.grid.datasource.dynamicFilter
|
|
2913
|
+
}, this.originalDatasourceFilter = { ...this.grid.datasource.filter }, this.originalColumnProps = this.grid.columns.map((r) => ({
|
|
2914
|
+
name: r.name,
|
|
2915
|
+
label: r.label,
|
|
2916
|
+
align: r.align,
|
|
2917
|
+
isVisible: r.isVisible,
|
|
2918
|
+
minWidth: r.minWidth,
|
|
2919
|
+
maxWidth: r.maxWidth,
|
|
2920
|
+
width: r.width,
|
|
2921
|
+
fixed: r.fixed,
|
|
2922
|
+
grouped: r.grouped,
|
|
2923
|
+
groupOpened: r.groupOpened,
|
|
2924
|
+
aggregation: r.aggregation,
|
|
2925
|
+
filterHelperValue: this.getHelperValue(r)
|
|
2926
|
+
}));
|
|
2927
|
+
let e = {};
|
|
2928
|
+
const o = this.loadLayoutsInfo();
|
|
2929
|
+
this.grid instanceof xt && this.grid.registerTask(o), e = await o, e.layouts && (this.layouts = e.layouts, this.layoutNames = Object.keys(this.layouts), e.currentLayoutName && (this.currentLayoutName = e.currentLayoutName, this.applyLayout(this.currentLayoutName, !1)));
|
|
2930
|
+
}
|
|
2931
|
+
async loadLayoutsInfo() {
|
|
2932
|
+
const t = this.events.loadLayouts || this.grid.events.loadLayouts;
|
|
2933
|
+
if (t && typeof t == "function")
|
|
2934
|
+
return t({ component: this.grid });
|
|
2935
|
+
if (D.loadGridLayoutsEndPoint) {
|
|
2936
|
+
const e = D.loadGridLayoutsEndPoint, r = (await L.get(`${e}?id=${this.grid.name}`)).data.data;
|
|
2937
|
+
return r.length && r[0] ? r[0].layouts : r.layouts || {};
|
|
2938
|
+
}
|
|
2939
|
+
return JSON.parse(localStorage.getItem(this.grid.name) || "{}");
|
|
2940
|
+
}
|
|
2941
|
+
getHelperValue(t) {
|
|
2942
|
+
return t instanceof U ? Array.isArray(t.filterProps) ? t.filterProps.map((e) => e.helperValue) : t.filterProps.helperValue : "";
|
|
2943
|
+
}
|
|
2944
|
+
newLayout(t) {
|
|
2945
|
+
this.fixColumns(t), this.currentLayoutName = t.name, this.addLayout(t), this.layoutEdited = !1;
|
|
2946
|
+
}
|
|
2947
|
+
addLayout(t) {
|
|
2948
|
+
this.fixColumns(t), this.layouts[t.name] = t, this.saveLayouts();
|
|
2949
|
+
}
|
|
2950
|
+
discardChanges() {
|
|
2951
|
+
const t = this.layouts[this.currentLayoutName];
|
|
2952
|
+
this.viewApplyLayout && this.viewApplyLayout(t), this.layoutEdited = !1;
|
|
2953
|
+
}
|
|
2954
|
+
applyLayout(t, e = !0) {
|
|
2955
|
+
this.currentLayoutName = t;
|
|
2956
|
+
const o = this.layouts[t];
|
|
2957
|
+
this.viewApplyLayout && this.viewApplyLayout(o), e && this.saveLayouts(), this.layoutEdited = !1;
|
|
2958
|
+
}
|
|
2959
|
+
saveLayouts() {
|
|
2960
|
+
this.layoutNames = Object.keys(this.layouts);
|
|
2961
|
+
const t = {
|
|
2962
|
+
currentLayoutName: this.currentLayoutName,
|
|
2963
|
+
layouts: this.layouts
|
|
2964
|
+
}, e = this.events.saveLayouts || this.grid.events.saveLayouts;
|
|
2965
|
+
if (e && typeof e == "function")
|
|
2966
|
+
e({ component: this.grid, layouts: t });
|
|
2967
|
+
else if (D.saveGridLayoutsEndPoint) {
|
|
2968
|
+
const o = D.saveGridLayoutsEndPoint;
|
|
2969
|
+
L.post(o, { id: this.grid.name, layouts: t });
|
|
2970
|
+
} else
|
|
2971
|
+
localStorage.setItem(this.grid.name, JSON.stringify(t));
|
|
2972
|
+
}
|
|
2973
|
+
deleteLayout(t) {
|
|
2974
|
+
this.currentLayoutName === t && (this.currentLayoutName = "", this.applyLayout(this.currentLayoutName, !1)), delete this.layouts[t], this.saveLayouts();
|
|
2975
|
+
}
|
|
2976
|
+
updateLayout(t, e) {
|
|
2977
|
+
this.fixColumns(e), this.currentLayoutName = t, e.name = t, this.layouts[e.name] = e, this.saveLayouts(), this.layoutEdited = !1;
|
|
2978
|
+
}
|
|
2979
|
+
updateDefaultLayout(t) {
|
|
2980
|
+
this.fixColumns(t), this.originalDatasourceOrder = t.order || this.originalDatasourceOrder, this.originalDatasourceDynamicFilter = t.dynamicFilter || this.originalDatasourceDynamicFilter, this.originalDatasourceFilter = t.filter || this.originalDatasourceFilter, t.columns && (this.originalColumnProps = t.columns.map((e) => {
|
|
2981
|
+
const o = this.originalColumnProps.findIndex((a) => a.name === e.name);
|
|
2982
|
+
return {
|
|
2983
|
+
...o !== -1 ? this.originalColumnProps[o] : {},
|
|
2984
|
+
...e
|
|
2985
|
+
};
|
|
2986
|
+
})), this.currentLayoutName === "" && this.applyLayout(this.currentLayoutName, !1);
|
|
2987
|
+
}
|
|
2988
|
+
fixColumns(t) {
|
|
2989
|
+
const e = !!t.columns;
|
|
2990
|
+
t.columns = t.columns || [];
|
|
2991
|
+
const o = t.columns.map((r) => r.name);
|
|
2992
|
+
this.grid.columns.forEach((r) => {
|
|
2993
|
+
(!e || o.indexOf(r.name) === -1) && t.columns.push({
|
|
2994
|
+
name: r.name,
|
|
2995
|
+
label: r.label,
|
|
2996
|
+
align: r.align,
|
|
2997
|
+
isVisible: !e && r.isVisible,
|
|
2998
|
+
width: r.width,
|
|
2999
|
+
minWidth: r.minWidth,
|
|
3000
|
+
maxWidth: r.maxWidth,
|
|
3001
|
+
fixed: r.fixed,
|
|
3002
|
+
grouped: r.grouped,
|
|
3003
|
+
groupOpened: r.groupOpened,
|
|
3004
|
+
aggregation: r.aggregation,
|
|
3005
|
+
filterHelperValue: this.getHelperValue(r)
|
|
3006
|
+
});
|
|
3007
|
+
});
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
class Vt extends mt {
|
|
3011
|
+
changeGroupedColumn(i, { component: t, event: e, element: o }) {
|
|
3012
|
+
if (i.grouped = t.value, !i.grouped) {
|
|
3013
|
+
const r = this.iterableComponent.datasource.order.indexOf(`${i.name}.asc`);
|
|
3014
|
+
this.iterableComponent.datasource.order.splice(r, 1);
|
|
3015
|
+
}
|
|
3016
|
+
this.iterableComponent.changeLayout(e, o);
|
|
3017
|
+
}
|
|
3018
|
+
changeAggregationColumn(i, { component: t, event: e, element: o }) {
|
|
3019
|
+
const r = t.value || void 0;
|
|
3020
|
+
i.aggregation !== r && this.iterableComponent.changeLayout(e, o), i.aggregation = r;
|
|
3021
|
+
}
|
|
3022
|
+
showHideTekColumn(i, { component: t, event: e, element: o }) {
|
|
3023
|
+
!t.value && i.grouped && (i.grouped = !1), i.isVisible = t.value, this.iterableComponent.changeLayout(e, o);
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
class ie extends Et {
|
|
3027
|
+
constructor(t) {
|
|
3028
|
+
super(t);
|
|
3029
|
+
s(this, "hideGroups", !1);
|
|
3030
|
+
s(this, "aggregationDataSet", []);
|
|
3031
|
+
this.hideGroups = this.getInitValue("hideGroups", t.hideGroups, this.hideGroups), this.createAccessors();
|
|
3032
|
+
}
|
|
3033
|
+
onCreated() {
|
|
3034
|
+
super.onCreated(), f.addController(`IterableColumnsButtonController_${this.name}`, Vt, [
|
|
3035
|
+
this.iterableComponent
|
|
3036
|
+
]), this.controller = f.getInstance(`IterableColumnsButtonController_${this.name}`);
|
|
3037
|
+
}
|
|
3038
|
+
getAggregationSelectData() {
|
|
3039
|
+
return this.aggregationDataSet.length || (this.aggregationDataSet = Kt.filter(Boolean).map((t) => ({
|
|
3040
|
+
text: g.translate(`TEKGRID_AGGREGATION_${t}`),
|
|
3041
|
+
value: t
|
|
3042
|
+
}))), this.aggregationDataSet;
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
class Pt {
|
|
3046
|
+
constructor(i) {
|
|
3047
|
+
s(this, "component");
|
|
3048
|
+
this.component = i;
|
|
3049
|
+
}
|
|
3050
|
+
get versionInfo() {
|
|
3051
|
+
return this.component.versionInfo;
|
|
3052
|
+
}
|
|
3053
|
+
get name() {
|
|
3054
|
+
var i;
|
|
3055
|
+
return ((i = this.versionInfo) == null ? void 0 : i.name) || "";
|
|
3056
|
+
}
|
|
3057
|
+
set name(i) {
|
|
3058
|
+
this.versionInfo && (this.versionInfo.name = i);
|
|
3059
|
+
}
|
|
3060
|
+
get version() {
|
|
3061
|
+
var i;
|
|
3062
|
+
return ((i = this.versionInfo) == null ? void 0 : i.version) || "";
|
|
3063
|
+
}
|
|
3064
|
+
set version(i) {
|
|
3065
|
+
this.versionInfo && (this.versionInfo.version = i);
|
|
3066
|
+
}
|
|
3067
|
+
get hasDefaultEmail() {
|
|
3068
|
+
return !!this.component.defaultEmail;
|
|
3069
|
+
}
|
|
3070
|
+
get hasAboutImage() {
|
|
3071
|
+
return !!this.component.aboutImage;
|
|
3072
|
+
}
|
|
3073
|
+
mergeText(i, t) {
|
|
3074
|
+
return `<li>${i} - <b>${t}</b></li>`;
|
|
3075
|
+
}
|
|
3076
|
+
get mainVersion() {
|
|
3077
|
+
var i;
|
|
3078
|
+
return !((i = this.versionInfo) != null && i.name) || !this.versionInfo.version ? "" : `${this.versionInfo.name} - <b>${this.versionInfo.version}</b>`;
|
|
3079
|
+
}
|
|
3080
|
+
getItems(i) {
|
|
3081
|
+
return this.versionInfo ? `<ul>${this.versionInfo[i].map((e) => this.mergeText(e.name, e.version)).join("")}</ul>` : [];
|
|
3082
|
+
}
|
|
3083
|
+
get frontendItems() {
|
|
3084
|
+
return this.getItems("frontend");
|
|
3085
|
+
}
|
|
3086
|
+
get backendItems() {
|
|
3087
|
+
return this.getItems("backend");
|
|
3088
|
+
}
|
|
3089
|
+
get modulesItems() {
|
|
3090
|
+
return this.getItems("modules");
|
|
3091
|
+
}
|
|
3092
|
+
get showReportError() {
|
|
3093
|
+
const { reportError: i } = this.component.visibleItems;
|
|
3094
|
+
return i || i === void 0;
|
|
3095
|
+
}
|
|
3096
|
+
get showVersionInfo() {
|
|
3097
|
+
const { versionInfo: i } = this.component.visibleItems;
|
|
3098
|
+
return i || i === void 0;
|
|
3099
|
+
}
|
|
3100
|
+
get showAbout() {
|
|
3101
|
+
const { about: i } = this.component.visibleItems;
|
|
3102
|
+
return i || i === void 0;
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
class Ht extends Rt {
|
|
3106
|
+
constructor(t) {
|
|
3107
|
+
super(t);
|
|
3108
|
+
s(this, "aboutModal");
|
|
3109
|
+
s(this, "reportModal");
|
|
3110
|
+
/**
|
|
3111
|
+
* Data about the application version
|
|
3112
|
+
*/
|
|
3113
|
+
s(this, "versionInfo", null);
|
|
3114
|
+
/**
|
|
3115
|
+
* Default email address to be defined in the Report Bug form
|
|
3116
|
+
*/
|
|
3117
|
+
s(this, "defaultEmail", "");
|
|
3118
|
+
/**
|
|
3119
|
+
* Url from which the version info will be retrieved
|
|
3120
|
+
*/
|
|
3121
|
+
s(this, "versionUrl", "");
|
|
3122
|
+
/**
|
|
3123
|
+
* Path to the image to be shown on about modal
|
|
3124
|
+
*/
|
|
3125
|
+
s(this, "aboutImage", "");
|
|
3126
|
+
s(this, "propBottomSlot");
|
|
3127
|
+
this.versionInfo = this.getInitValue("versionInfo", t.versionInfo, this.versionInfo), this.defaultEmail = this.getInitValue("defaultEmail", t.defaultEmail, this.defaultEmail), this.versionUrl = this.getInitValue("versionUrl", t.versionUrl, this.versionUrl), this.aboutImage = this.getInitValue("aboutImage", t.aboutImage, this.aboutImage), this.createAccessors(), this.propBottomSlot = t.bottomSlot;
|
|
3128
|
+
}
|
|
3129
|
+
getBottomSlot() {
|
|
3130
|
+
return [
|
|
3131
|
+
{
|
|
3132
|
+
name: `${this.name}_bottom_list`,
|
|
3133
|
+
component: "TekUserInfoList",
|
|
3134
|
+
parentName: this.name
|
|
3135
|
+
}
|
|
3136
|
+
];
|
|
3137
|
+
}
|
|
3138
|
+
onAboutClick() {
|
|
3139
|
+
this.aboutModal || (this.aboutModal = F.create({
|
|
3140
|
+
name: `${this.name}_about_modal`,
|
|
3141
|
+
cssClass: "about-modal",
|
|
3142
|
+
grid: { cols: 8, sm: 4, lg: 5 },
|
|
3143
|
+
children: [
|
|
3144
|
+
{
|
|
3145
|
+
name: `${this.name}_about_header`,
|
|
3146
|
+
component: "ZdHeader",
|
|
3147
|
+
color: "transparent",
|
|
3148
|
+
padless: !0,
|
|
3149
|
+
elevation: 0,
|
|
3150
|
+
rightSlot: [
|
|
3151
|
+
{
|
|
3152
|
+
name: `${this.name}_about_close_button`,
|
|
3153
|
+
component: "ZdModalCloseButton",
|
|
3154
|
+
small: !0,
|
|
3155
|
+
modalName: `${this.name}_about_modal`
|
|
3156
|
+
}
|
|
3157
|
+
]
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
name: `${this.name}_about_row`,
|
|
3161
|
+
component: "ZdTag",
|
|
3162
|
+
tag: "div",
|
|
3163
|
+
cssClass: "zd-justify-center zd-px-6",
|
|
3164
|
+
isVisible: `{{TekUserInfoController_${this.componentId}.hasAboutImage}}`,
|
|
3165
|
+
children: [
|
|
3166
|
+
{
|
|
3167
|
+
name: `${this.name}_about_image`,
|
|
3168
|
+
component: "ZdImage",
|
|
3169
|
+
width: "100%",
|
|
3170
|
+
src: this.aboutImage
|
|
3171
|
+
}
|
|
3172
|
+
]
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
name: `${this.name}_version_tabs`,
|
|
3176
|
+
cssClass: "zd-pt-3 zd-tekUserInfo-tab",
|
|
3177
|
+
component: "ZdTabs",
|
|
3178
|
+
tabs: [
|
|
3179
|
+
{
|
|
3180
|
+
name: `${this.name}_version_frontend_tab`,
|
|
3181
|
+
tabTitle: "Frontend",
|
|
3182
|
+
children: this.getVersionTree("frontend")
|
|
3183
|
+
},
|
|
3184
|
+
{
|
|
3185
|
+
name: `${this.name}_version_backend_tab`,
|
|
3186
|
+
tabTitle: "Backend",
|
|
3187
|
+
children: this.getVersionTree("backend")
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
name: `${this.name}_version_modules_tab`,
|
|
3191
|
+
tabTitle: "Modules",
|
|
3192
|
+
children: this.getVersionTree("modules")
|
|
3193
|
+
}
|
|
3194
|
+
]
|
|
3195
|
+
}
|
|
3196
|
+
]
|
|
3197
|
+
})), this.aboutModal.show();
|
|
3198
|
+
}
|
|
3199
|
+
getVersionTree(t) {
|
|
3200
|
+
if (!this.versionInfo) return [];
|
|
3201
|
+
const e = {
|
|
3202
|
+
name: `${this.name}_version_${t}_main`,
|
|
3203
|
+
component: "ZdText",
|
|
3204
|
+
text: `{{TekUserInfoController_${this.componentId}.mainVersion}}`
|
|
3205
|
+
}, o = {
|
|
3206
|
+
name: `${this.name}_version_${t}`,
|
|
3207
|
+
component: "ZdText",
|
|
3208
|
+
cssClass: "zd-pl-4",
|
|
3209
|
+
text: `{{TekUserInfoController_${this.componentId}.${t}Items}}`
|
|
3210
|
+
};
|
|
3211
|
+
return [e, o];
|
|
3212
|
+
}
|
|
3213
|
+
onReportClick() {
|
|
3214
|
+
this.reportModal || (this.reportModal = F.create({
|
|
3215
|
+
name: `${this.name}_report_modal`,
|
|
3216
|
+
children: [
|
|
3217
|
+
{
|
|
3218
|
+
name: `${this.name}_report_header`,
|
|
3219
|
+
component: "ZdHeader",
|
|
3220
|
+
color: "transparent",
|
|
3221
|
+
padless: !0,
|
|
3222
|
+
elevation: 0,
|
|
3223
|
+
leftSlot: [
|
|
3224
|
+
{
|
|
3225
|
+
name: `${this.name}_report_title`,
|
|
3226
|
+
component: "ZdText",
|
|
3227
|
+
text: "TEKUSERINFO_REPORT_ERROR",
|
|
3228
|
+
cssClass: "zd-theme-font-title"
|
|
3229
|
+
}
|
|
3230
|
+
],
|
|
3231
|
+
rightSlot: [
|
|
3232
|
+
{
|
|
3233
|
+
name: `${this.name}_report_close_button`,
|
|
3234
|
+
component: "ZdModalCloseButton",
|
|
3235
|
+
small: !0,
|
|
3236
|
+
modalName: `${this.name}_report_modal`
|
|
3237
|
+
}
|
|
3238
|
+
]
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
name: `${this.name}_report_form`,
|
|
3242
|
+
component: "ZdForm",
|
|
3243
|
+
cssClass: "zd-pt-4",
|
|
3244
|
+
children: [
|
|
3245
|
+
{
|
|
3246
|
+
name: "report_email",
|
|
3247
|
+
component: "ZdTextInput",
|
|
3248
|
+
label: "E-mail",
|
|
3249
|
+
grid: {
|
|
3250
|
+
cols: "12"
|
|
3251
|
+
},
|
|
3252
|
+
value: this.defaultEmail,
|
|
3253
|
+
readonly: `{{TekUserInfoController_${this.componentId}.hasDefaultEmail}}`,
|
|
3254
|
+
validations: {
|
|
3255
|
+
required: {},
|
|
3256
|
+
email: {}
|
|
3257
|
+
}
|
|
3258
|
+
},
|
|
3259
|
+
{
|
|
3260
|
+
name: "report_cc",
|
|
3261
|
+
component: "ZdTextInput",
|
|
3262
|
+
label: "CC",
|
|
3263
|
+
placeholder: "TEKUSERINFO_EMAIL_PLACEHOLDER",
|
|
3264
|
+
grid: {
|
|
3265
|
+
cols: "12"
|
|
3266
|
+
}
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
name: "report_type",
|
|
3270
|
+
component: "ZdSelect",
|
|
3271
|
+
label: "TEKUSERINFO_TYPE",
|
|
3272
|
+
dataValue: "value",
|
|
3273
|
+
dataText: "text",
|
|
3274
|
+
datasource: {
|
|
3275
|
+
uniqueKey: "value",
|
|
3276
|
+
translate: !0,
|
|
3277
|
+
data: [
|
|
3278
|
+
{ value: "0", text: "TEKUSERINFO_ERROR" },
|
|
3279
|
+
{ value: "1", text: "TEKUSERINFO_IMPROVEMENT" }
|
|
3280
|
+
]
|
|
3281
|
+
},
|
|
3282
|
+
grid: {
|
|
3283
|
+
cols: "12"
|
|
3284
|
+
},
|
|
3285
|
+
validations: {
|
|
3286
|
+
required: {}
|
|
3287
|
+
}
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
name: "report_description",
|
|
3291
|
+
component: "ZdTextarea",
|
|
3292
|
+
label: "TEKUSERINFO_DESCRIPTION",
|
|
3293
|
+
grid: {
|
|
3294
|
+
cols: "12"
|
|
3295
|
+
},
|
|
3296
|
+
validations: {
|
|
3297
|
+
required: {}
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
]
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
name: `${this.name}_report_footer`,
|
|
3304
|
+
component: "ZdFooter",
|
|
3305
|
+
color: "transparent",
|
|
3306
|
+
padless: !0,
|
|
3307
|
+
rightSlot: [
|
|
3308
|
+
{
|
|
3309
|
+
name: `${this.name}_report_cancel`,
|
|
3310
|
+
component: "ZdButton",
|
|
3311
|
+
label: "TEKUSERINFO_CANCEL",
|
|
3312
|
+
outline: !0,
|
|
3313
|
+
events: {
|
|
3314
|
+
click: () => {
|
|
3315
|
+
var t;
|
|
3316
|
+
(t = this.reportModal) == null || t.hide();
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
name: `${this.name}_report_send`,
|
|
3322
|
+
component: "ZdButton",
|
|
3323
|
+
label: "TEKUSERINFO_SEND",
|
|
3324
|
+
events: {
|
|
3325
|
+
click: (t) => this.onSendReport(t)
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
]
|
|
3329
|
+
}
|
|
3330
|
+
]
|
|
3331
|
+
})), this.reportModal.show();
|
|
3332
|
+
}
|
|
3333
|
+
async onSendReport({ event: t, element: e }) {
|
|
3334
|
+
if (!this.reportModal) return;
|
|
3335
|
+
const o = I.getInstance(`${this.name}_report_form`);
|
|
3336
|
+
(await o.validate()).valid && (this.callEvent("onSendReport", {
|
|
3337
|
+
event: t,
|
|
3338
|
+
element: e,
|
|
3339
|
+
component: this,
|
|
3340
|
+
form: o
|
|
3341
|
+
}), this.reportModal.hide());
|
|
3342
|
+
}
|
|
3343
|
+
onCreated() {
|
|
3344
|
+
super.onCreated(), f.addController(`TekUserInfoController_${this.componentId}`, Pt, [this]), this.bottomSlot = this.propBottomSlot ? this.propBottomSlot : this.getBottomSlot();
|
|
3345
|
+
}
|
|
3346
|
+
async onMounted(t) {
|
|
3347
|
+
if (super.onMounted(t), this.versionUrl) {
|
|
3348
|
+
const e = await L.get(this.versionUrl);
|
|
3349
|
+
this.versionInfo = e.data.versionInfo;
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
_.add({
|
|
3354
|
+
"pt-BR": {
|
|
3355
|
+
translation: {
|
|
3356
|
+
TEKUSERINFO_ABOUT: "Sobre",
|
|
3357
|
+
TEKUSERINFO_REPORT_ERROR: "Reportar Erro",
|
|
3358
|
+
TEKUSERINFO_EMAIL_PLACEHOLDER: 'Separe e-mails usando ";"',
|
|
3359
|
+
TEKUSERINFO_TYPE: "Tipo",
|
|
3360
|
+
TEKUSERINFO_ERROR: "Erro",
|
|
3361
|
+
TEKUSERINFO_IMPROVEMENT: "Melhoria",
|
|
3362
|
+
TEKUSERINFO_DESCRIPTION: "Descrição",
|
|
3363
|
+
TEKUSERINFO_CANCEL: "Cancelar",
|
|
3364
|
+
TEKUSERINFO_SEND: "Enviar"
|
|
3365
|
+
}
|
|
3366
|
+
},
|
|
3367
|
+
"en-US": {
|
|
3368
|
+
translation: {
|
|
3369
|
+
TEKUSERINFO_ABOUT: "About",
|
|
3370
|
+
TEKUSERINFO_REPORT_ERROR: "Report Bug",
|
|
3371
|
+
TEKUSERINFO_EMAIL_PLACEHOLDER: 'Separate e-mails using ";"',
|
|
3372
|
+
TEKUSERINFO_TYPE: "Type",
|
|
3373
|
+
TEKUSERINFO_ERROR: "Bug",
|
|
3374
|
+
TEKUSERINFO_IMPROVEMENT: "Improvement",
|
|
3375
|
+
TEKUSERINFO_DESCRIPTION: "Description",
|
|
3376
|
+
TEKUSERINFO_CANCEL: "Cancel",
|
|
3377
|
+
TEKUSERINFO_SEND: "Send"
|
|
3378
|
+
}
|
|
3379
|
+
},
|
|
3380
|
+
"es-CL": {
|
|
3381
|
+
translation: {
|
|
3382
|
+
TEKUSERINFO_ABOUT: "Sobre",
|
|
3383
|
+
TEKUSERINFO_REPORT_ERROR: "Reportar Error",
|
|
3384
|
+
TEKUSERINFO_EMAIL_PLACEHOLDER: 'Separar e-mails usando ";"',
|
|
3385
|
+
TEKUSERINFO_TYPE: "Tipo",
|
|
3386
|
+
TEKUSERINFO_ERROR: "Error",
|
|
3387
|
+
TEKUSERINFO_IMPROVEMENT: "Mejora",
|
|
3388
|
+
TEKUSERINFO_DESCRIPTION: "Descripción",
|
|
3389
|
+
TEKUSERINFO_CANCEL: "Cancelar",
|
|
3390
|
+
TEKUSERINFO_SEND: "Enviar"
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
});
|
|
3394
|
+
class oe extends At {
|
|
3395
|
+
constructor(t) {
|
|
3396
|
+
super(t);
|
|
3397
|
+
/**
|
|
3398
|
+
* Name of the user info component
|
|
3399
|
+
*/
|
|
3400
|
+
s(this, "parentName", "");
|
|
3401
|
+
s(this, "dense", !0);
|
|
3402
|
+
this.parentName = t.parentName || "";
|
|
3403
|
+
}
|
|
3404
|
+
onCreated() {
|
|
3405
|
+
super.onCreated(), this.items = this.getItems();
|
|
3406
|
+
}
|
|
3407
|
+
getItems() {
|
|
3408
|
+
const t = this.parentName ? I.getInstance(this.parentName) : this.parent;
|
|
3409
|
+
if (!(t instanceof Ht))
|
|
3410
|
+
throw Error(`Could not find the TekUserInfo component associated with ${this.name} TekUserInfoList`);
|
|
3411
|
+
return [
|
|
3412
|
+
{
|
|
3413
|
+
name: `${t.name}_version`,
|
|
3414
|
+
component: "ZdListItem",
|
|
3415
|
+
title: `{{TekUserInfoController_${t.componentId}.name}}`,
|
|
3416
|
+
subtitle: `{{TekUserInfoController_${t.componentId}.version}}`,
|
|
3417
|
+
isVisible: `{{TekUserInfoController_${t.componentId}.showVersionInfo}}`,
|
|
3418
|
+
cssClass: "zd-px-2"
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
name: `${t.name}_about`,
|
|
3422
|
+
component: "ZdListItem",
|
|
3423
|
+
title: "TEKUSERINFO_ABOUT",
|
|
3424
|
+
prependIcon: "infoOutline",
|
|
3425
|
+
cssClass: "zd-px-2",
|
|
3426
|
+
isVisible: `{{TekUserInfoController_${t.componentId}.showAbout}}`,
|
|
3427
|
+
events: {
|
|
3428
|
+
click: () => t.onAboutClick()
|
|
3429
|
+
}
|
|
3430
|
+
},
|
|
3431
|
+
{
|
|
3432
|
+
name: `${t.name}_report`,
|
|
3433
|
+
component: "ZdListItem",
|
|
3434
|
+
title: "TEKUSERINFO_REPORT_ERROR",
|
|
3435
|
+
prependIcon: "mdi-ladybug",
|
|
3436
|
+
cssClass: "zd-px-2",
|
|
3437
|
+
isVisible: `{{TekUserInfoController_${t.componentId}.showReportError}}`,
|
|
3438
|
+
events: {
|
|
3439
|
+
click: () => t.onReportClick()
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
];
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
_.add({
|
|
3446
|
+
"pt-BR": {
|
|
3447
|
+
translation: {
|
|
3448
|
+
NO_NOTIFICATIONS: "Nenhuma Notificação",
|
|
3449
|
+
MARK_ALL_AS_READ: "Marcar todas como lidas",
|
|
3450
|
+
NOTIFICATIONS: "Notificações",
|
|
3451
|
+
SEE_ALL_NOTIFICATIONS: "Ver todas notificações",
|
|
3452
|
+
UNAVAILABLE_IMAGE: "Imagem indisponível",
|
|
3453
|
+
REFRESH: "Atualizar",
|
|
3454
|
+
ACTIONS: "Ações",
|
|
3455
|
+
FILTER: "Filtro",
|
|
3456
|
+
LAYOUT: "Layout: ",
|
|
3457
|
+
NEW_LAYOUT: "Novo layout",
|
|
3458
|
+
DEFAULT_LAYOUT: "Padrão",
|
|
3459
|
+
LAYOUT_MODIFIED: "O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações",
|
|
3460
|
+
// eslint-disable-line
|
|
3461
|
+
LAYOUT_NOT_MODIFIED: "Crie um novo layout ou aplique um dos layouts já existentes",
|
|
3462
|
+
LAYOUT_DISCART_CHANGES: "Descartar alterações"
|
|
3463
|
+
}
|
|
3464
|
+
},
|
|
3465
|
+
"en-US": {
|
|
3466
|
+
translation: {
|
|
3467
|
+
NO_NOTIFICATIONS: "No Notifications",
|
|
3468
|
+
MARK_ALL_AS_READ: "Mark all as read",
|
|
3469
|
+
NOTIFICATIONS: "Notifications",
|
|
3470
|
+
SEE_ALL_NOTIFICATIONS: "See all notifications",
|
|
3471
|
+
UNAVAILABLE_IMAGE: "Unavailable image",
|
|
3472
|
+
REFRESH: "Refresh",
|
|
3473
|
+
ACTIONS: "Actions",
|
|
3474
|
+
FILTER: "Filter",
|
|
3475
|
+
LAYOUT: "Layout: ",
|
|
3476
|
+
NEW_LAYOUT: "New layout",
|
|
3477
|
+
DEFAULT_LAYOUT: "Default",
|
|
3478
|
+
LAYOUT_MODIFIED: "The current layout has been modified. Create a new layout, overwrite an existing one or discard changes",
|
|
3479
|
+
// eslint-disable-line
|
|
3480
|
+
LAYOUT_NOT_MODIFIED: "Create a new layout or apply one of the existing layouts",
|
|
3481
|
+
LAYOUT_DISCART_CHANGES: "Discard changes"
|
|
3482
|
+
}
|
|
3483
|
+
},
|
|
3484
|
+
"es-CL": {
|
|
3485
|
+
translation: {
|
|
3486
|
+
NO_NOTIFICATIONS: "Sin Notificación",
|
|
3487
|
+
MARK_ALL_AS_READ: "Marcar todo como leído",
|
|
3488
|
+
NOTIFICATIONS: "Notificaciones",
|
|
3489
|
+
SEE_ALL_NOTIFICATIONS: "Ver todas las notificaciones",
|
|
3490
|
+
UNAVAILABLE_IMAGE: "Imagen no disponible",
|
|
3491
|
+
REFRESH: "Actualizar",
|
|
3492
|
+
ACTIONS: "Acciones",
|
|
3493
|
+
FILTER: "Filtro",
|
|
3494
|
+
LAYOUT: "Disposición: ",
|
|
3495
|
+
NEW_LAYOUT: "Nueva disposición",
|
|
3496
|
+
DEFAULT_LAYOUT: "Default",
|
|
3497
|
+
LAYOUT_MODIFIED: "La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios",
|
|
3498
|
+
// eslint-disable-line
|
|
3499
|
+
LAYOUT_NOT_MODIFIED: "Cree una nueva disposición o aplique una de las disposiciones existentes",
|
|
3500
|
+
LAYOUT_DISCART_CHANGES: "Descartar los cambios"
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
});
|
|
3504
|
+
export {
|
|
3505
|
+
Xt as BreadcrumbHeader,
|
|
3506
|
+
Dt as ButtonOption,
|
|
3507
|
+
yt as ColumnsSearcher,
|
|
3508
|
+
St as DynamicFilterDatasourceFactory,
|
|
3509
|
+
x as DynamicFilterOperations,
|
|
3510
|
+
V as DynamicFilterRelations,
|
|
3511
|
+
Bt as GroupedDataManager,
|
|
3512
|
+
Lt as GroupedDataNavigator,
|
|
3513
|
+
Qt as GroupedDataSelector,
|
|
3514
|
+
Ut as KeyMapGrouped,
|
|
3515
|
+
$t as Loading,
|
|
3516
|
+
Ct as MultiOption,
|
|
3517
|
+
bt as ReportFilter,
|
|
3518
|
+
Gt as TekFilterHelper,
|
|
3519
|
+
xt as TekGrid,
|
|
3520
|
+
U as TekGridColumn,
|
|
3521
|
+
ie as TekGridColumnsButton,
|
|
3522
|
+
Vt as TekGridColumnsButtonController,
|
|
3523
|
+
kt as TekGridController,
|
|
3524
|
+
vt as TekGridEvents,
|
|
3525
|
+
te as TekGridFilterButton,
|
|
3526
|
+
ee as TekGridLayoutOptions,
|
|
3527
|
+
ft as TekGridToolbarProvider,
|
|
3528
|
+
C as TekMemoryDatasource,
|
|
3529
|
+
N as TekRestDatasource,
|
|
3530
|
+
Ht as TekUserInfo,
|
|
3531
|
+
oe as TekUserInfoList,
|
|
3532
|
+
Kt as columnAggregationValues,
|
|
3533
|
+
wt as extractProperties,
|
|
3534
|
+
_t as isFilledObject,
|
|
3535
|
+
v as isNil
|
|
3536
|
+
};
|