@zeedhi/teknisa-components-common 1.105.2 → 1.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage/clover.xml +448 -443
- package/coverage/coverage-final.json +45 -45
- package/coverage/lcov-report/index.html +9 -9
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
- package/coverage/lcov.info +725 -721
- package/dist/tek-components-common.esm.js +23 -11
- package/dist/tek-components-common.umd.js +22 -10
- package/package.json +2 -2
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +1 -0
- package/tests/unit/components/tek-grid/grid.spec.ts +34 -1
- package/types/components/tek-ag-grid/default-icons.d.ts +53 -0
- package/types/components/tek-ag-grid/interfaces.d.ts +9 -0
- package/types/components/tek-ag-grid/tek-ag-grid.d.ts +35 -0
- package/types/components/tek-datasource/datasource.d.ts +94 -0
- package/types/components/tek-datasource/memory-datasource.d.ts +1 -0
- package/types/components/tek-datasource/rest-datasource.d.ts +3 -0
- package/types/components/tek-grid/default-icons.d.ts +53 -0
- package/types/components/tek-grid/filter-dynamic-values.d.ts +9 -0
- package/types/components/tek-grid/grid-controller.d.ts +19 -0
- package/types/components/tek-grid/grid.d.ts +1 -1
- package/types/components/tek-grid/grid_column.d.ts +14 -0
- package/types/components/tek-grid/grid_controller.d.ts +15 -0
- package/types/components/tek-grid/tek-grid.d.ts +35 -0
- package/types/components/tek-login/interfaces.d.ts +3 -0
- package/types/components/tek-login/login-children.d.ts +3 -0
- package/types/components/tek-login/login.d.ts +58 -0
- package/types/components/tek-login/login_children.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyMap, I18n, FormatterParserProvider, Messages, Metadata, DatasourceFactory, MemoryDatasource, URL, Utils, RestDatasource, Config, Accessor, Loader, DateHelper, Http, Singleton, VersionService } from '@zeedhi/core';
|
|
2
|
-
import { Form, Button, Tooltip, GridEditable, Grid, ComponentRender, Iterable, Carousel, IterableComponentRender as IterableComponentRender$1, Loading as Loading$1, GridColumnEditable, Report, ColumnNotFoundError, IterableColumnsButtonController, IterableColumnsButton, ModalService, SelectMultiple, TreeGridEditable, List } from '@zeedhi/common';
|
|
2
|
+
import { Form, Button, Tooltip, GridEditable, Grid, ComponentRender, Iterable, Carousel, IterableComponentRender as IterableComponentRender$1, Loading as Loading$1, GridColumnEditable, Report, EmptyDataError, AlertService, ColumnNotFoundError, IterableColumnsButtonController, IterableColumnsButton, ModalService, SelectMultiple, TreeGridEditable, List } from '@zeedhi/common';
|
|
3
3
|
import debounce from 'lodash.debounce';
|
|
4
4
|
import merge from 'lodash.merge';
|
|
5
5
|
import { UserInfo } from '@zeedhi/zd-user-info-common';
|
|
@@ -1254,6 +1254,7 @@ Messages.add({
|
|
|
1254
1254
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Ano Atual',
|
|
1255
1255
|
TEKGRID_WITH_GROUPS: '(Com grupos)',
|
|
1256
1256
|
TEKGRID_GRID_MIRROR: '(Espelho do grid)',
|
|
1257
|
+
TEKGRID_NO_DATA: 'Não há dados para gerar o relatório',
|
|
1257
1258
|
},
|
|
1258
1259
|
},
|
|
1259
1260
|
'en-US': {
|
|
@@ -1326,6 +1327,7 @@ Messages.add({
|
|
|
1326
1327
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Current Year',
|
|
1327
1328
|
TEKGRID_WITH_GROUPS: '(With groups)',
|
|
1328
1329
|
TEKGRID_GRID_MIRROR: '(Grid mirror)',
|
|
1330
|
+
TEKGRID_NO_DATA: 'There is no data to generate the report',
|
|
1329
1331
|
},
|
|
1330
1332
|
},
|
|
1331
1333
|
'es-CL': {
|
|
@@ -1398,6 +1400,7 @@ Messages.add({
|
|
|
1398
1400
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Año actual',
|
|
1399
1401
|
TEKGRID_WITH_GROUPS: '(Con grupos)',
|
|
1400
1402
|
TEKGRID_GRID_MIRROR: '(Espejo de grid)',
|
|
1403
|
+
TEKGRID_NO_DATA: 'No hay datos para generar el reporte',
|
|
1401
1404
|
},
|
|
1402
1405
|
},
|
|
1403
1406
|
});
|
|
@@ -2490,16 +2493,25 @@ class TekGrid extends GridEditable {
|
|
|
2490
2493
|
if (typeof this.events.beforeOpenReport === 'function') {
|
|
2491
2494
|
beforeOpen = this.events.beforeOpenReport;
|
|
2492
2495
|
}
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2496
|
+
try {
|
|
2497
|
+
const reportUrl = yield report
|
|
2498
|
+
.getReport(typeValue, portrait, {
|
|
2499
|
+
metaData: merge(rowObj, {
|
|
2500
|
+
filter,
|
|
2501
|
+
groups: reportGroups,
|
|
2502
|
+
columns: reportAggregations,
|
|
2503
|
+
xlsDefaultType: this.xlsDefaultType,
|
|
2504
|
+
}),
|
|
2505
|
+
}, beforeOpen);
|
|
2506
|
+
window.open(reportUrl);
|
|
2507
|
+
}
|
|
2508
|
+
catch (e) {
|
|
2509
|
+
if (e instanceof EmptyDataError) {
|
|
2510
|
+
AlertService.show({ name: 'no-data-warning', text: I18n.translate('TEKGRID_NO_DATA'), color: 'warning' });
|
|
2511
|
+
return;
|
|
2512
|
+
}
|
|
2513
|
+
throw e;
|
|
2514
|
+
}
|
|
2503
2515
|
});
|
|
2504
2516
|
}
|
|
2505
2517
|
registerTask(task) {
|
|
@@ -1258,6 +1258,7 @@
|
|
|
1258
1258
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Ano Atual',
|
|
1259
1259
|
TEKGRID_WITH_GROUPS: '(Com grupos)',
|
|
1260
1260
|
TEKGRID_GRID_MIRROR: '(Espelho do grid)',
|
|
1261
|
+
TEKGRID_NO_DATA: 'Não há dados para gerar o relatório',
|
|
1261
1262
|
},
|
|
1262
1263
|
},
|
|
1263
1264
|
'en-US': {
|
|
@@ -1330,6 +1331,7 @@
|
|
|
1330
1331
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Current Year',
|
|
1331
1332
|
TEKGRID_WITH_GROUPS: '(With groups)',
|
|
1332
1333
|
TEKGRID_GRID_MIRROR: '(Grid mirror)',
|
|
1334
|
+
TEKGRID_NO_DATA: 'There is no data to generate the report',
|
|
1333
1335
|
},
|
|
1334
1336
|
},
|
|
1335
1337
|
'es-CL': {
|
|
@@ -1402,6 +1404,7 @@
|
|
|
1402
1404
|
TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Año actual',
|
|
1403
1405
|
TEKGRID_WITH_GROUPS: '(Con grupos)',
|
|
1404
1406
|
TEKGRID_GRID_MIRROR: '(Espejo de grid)',
|
|
1407
|
+
TEKGRID_NO_DATA: 'No hay datos para generar el reporte',
|
|
1405
1408
|
},
|
|
1406
1409
|
},
|
|
1407
1410
|
});
|
|
@@ -2494,16 +2497,25 @@
|
|
|
2494
2497
|
if (typeof this.events.beforeOpenReport === 'function') {
|
|
2495
2498
|
beforeOpen = this.events.beforeOpenReport;
|
|
2496
2499
|
}
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2500
|
+
try {
|
|
2501
|
+
const reportUrl = yield report
|
|
2502
|
+
.getReport(typeValue, portrait, {
|
|
2503
|
+
metaData: merge__default["default"](rowObj, {
|
|
2504
|
+
filter,
|
|
2505
|
+
groups: reportGroups,
|
|
2506
|
+
columns: reportAggregations,
|
|
2507
|
+
xlsDefaultType: this.xlsDefaultType,
|
|
2508
|
+
}),
|
|
2509
|
+
}, beforeOpen);
|
|
2510
|
+
window.open(reportUrl);
|
|
2511
|
+
}
|
|
2512
|
+
catch (e) {
|
|
2513
|
+
if (e instanceof common.EmptyDataError) {
|
|
2514
|
+
common.AlertService.show({ name: 'no-data-warning', text: core.I18n.translate('TEKGRID_NO_DATA'), color: 'warning' });
|
|
2515
|
+
return;
|
|
2516
|
+
}
|
|
2517
|
+
throw e;
|
|
2518
|
+
}
|
|
2507
2519
|
});
|
|
2508
2520
|
}
|
|
2509
2521
|
registerTask(task) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/teknisa-components-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.107.0",
|
|
4
4
|
"description": "Teknisa Components Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@zeedhi/core": "^1.97.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "1123e6f810f91d3dbff16805911d4558caf9d6b2"
|
|
36
36
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Button, Dropdown, IModal, Modal, ModalService, Search, TextInput, Text, Report,
|
|
5
|
+
AlertService,
|
|
6
|
+
EmptyDataError,
|
|
5
7
|
} from '@zeedhi/common';
|
|
6
8
|
import {
|
|
7
9
|
KeyMap, Http, Metadata, IDictionary, IEventParam,
|
|
@@ -375,7 +377,7 @@ describe('TekGrid', () => {
|
|
|
375
377
|
|
|
376
378
|
const getReport = async () => { await instance.getReport('pdf'); };
|
|
377
379
|
|
|
378
|
-
expect(getReport).
|
|
380
|
+
expect(getReport).not.toThrow();
|
|
379
381
|
|
|
380
382
|
const getColumnSpy = jest.spyOn(instance, 'getColumn').mockImplementationOnce(() => {
|
|
381
383
|
throw Error();
|
|
@@ -414,6 +416,37 @@ describe('TekGrid', () => {
|
|
|
414
416
|
},
|
|
415
417
|
}, undefined);
|
|
416
418
|
});
|
|
419
|
+
|
|
420
|
+
it('when data is empty, should show alert', async () => {
|
|
421
|
+
reportSpy = jest.spyOn(Report.prototype, 'getReport').mockImplementation(() => { throw new EmptyDataError(); });
|
|
422
|
+
const alertSpy = jest.spyOn(AlertService, 'show').mockImplementation(() => 1);
|
|
423
|
+
|
|
424
|
+
const instance = new TekGrid({
|
|
425
|
+
name: 'grid',
|
|
426
|
+
component: 'TekGrid',
|
|
427
|
+
datasource: {
|
|
428
|
+
data: [],
|
|
429
|
+
},
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
expect(async () => instance.getReport('xls2')).not.toThrow();
|
|
433
|
+
|
|
434
|
+
expect(alertSpy).toHaveBeenCalledWith({ name: 'no-data-warning', text: 'TEKGRID_NO_DATA', color: 'warning' });
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
it('when an error happens, should throw normally', async () => {
|
|
438
|
+
reportSpy = jest.spyOn(Report.prototype, 'getReport').mockImplementation(() => { throw new Error(); });
|
|
439
|
+
|
|
440
|
+
const instance = new TekGrid({
|
|
441
|
+
name: 'grid',
|
|
442
|
+
component: 'TekGrid',
|
|
443
|
+
datasource: {
|
|
444
|
+
data: [],
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
expect(async () => instance.getReport('xls2')).rejects.toThrow();
|
|
449
|
+
});
|
|
417
450
|
});
|
|
418
451
|
|
|
419
452
|
describe('saveChanges()', () => {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare const defaultIcons: {
|
|
2
|
+
columnGroupOpened: string;
|
|
3
|
+
columnGroupClosed: string;
|
|
4
|
+
columnSelectClosed: string;
|
|
5
|
+
columnSelectOpen: string;
|
|
6
|
+
columnSelectIndeterminate: string;
|
|
7
|
+
columnMovePin: string;
|
|
8
|
+
columnMoveHide: string;
|
|
9
|
+
columnMoveMove: string;
|
|
10
|
+
columnMoveLeft: string;
|
|
11
|
+
columnMoveRight: string;
|
|
12
|
+
columnMoveGroup: string;
|
|
13
|
+
columnMoveValue: string;
|
|
14
|
+
dropNotAllowed: string;
|
|
15
|
+
groupContracted: string;
|
|
16
|
+
groupExpanded: string;
|
|
17
|
+
chart: string;
|
|
18
|
+
close: string;
|
|
19
|
+
cancel: string;
|
|
20
|
+
check: string;
|
|
21
|
+
first: string;
|
|
22
|
+
previous: string;
|
|
23
|
+
next: string;
|
|
24
|
+
last: string;
|
|
25
|
+
linked: string;
|
|
26
|
+
unlinked: string;
|
|
27
|
+
colorPicker: string;
|
|
28
|
+
groupLoading: string;
|
|
29
|
+
menu: string;
|
|
30
|
+
filter: string;
|
|
31
|
+
columns: string;
|
|
32
|
+
maximize: string;
|
|
33
|
+
minimize: string;
|
|
34
|
+
menuPin: string;
|
|
35
|
+
menuValue: string;
|
|
36
|
+
menuAddRowGroup: string;
|
|
37
|
+
menuRemoveRowGroup: string;
|
|
38
|
+
clipboardCopy: string;
|
|
39
|
+
clipboardPaste: string;
|
|
40
|
+
rowGroupPanel: string;
|
|
41
|
+
valuePanel: string;
|
|
42
|
+
columnDrag: string;
|
|
43
|
+
rowDrag: string;
|
|
44
|
+
save: string;
|
|
45
|
+
smallDown: string;
|
|
46
|
+
smallLeft: string;
|
|
47
|
+
smallRight: string;
|
|
48
|
+
smallUp: string;
|
|
49
|
+
sortAscending: string;
|
|
50
|
+
sortDescending: string;
|
|
51
|
+
sortUnSort: string;
|
|
52
|
+
};
|
|
53
|
+
export default defaultIcons;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IIterable } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary } from '@zeedhi/core';
|
|
3
|
+
export interface ITekAgGrid extends IIterable {
|
|
4
|
+
dense?: boolean;
|
|
5
|
+
frameworkComponents?: IDictionary;
|
|
6
|
+
gridOptions?: IDictionary;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
icons?: IDictionary<string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Iterable } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary } from '@zeedhi/core';
|
|
3
|
+
import { ITekAgGrid } from './interfaces';
|
|
4
|
+
/** Grid Component */
|
|
5
|
+
export declare class TekAgGrid extends Iterable implements ITekAgGrid {
|
|
6
|
+
cssClass: string;
|
|
7
|
+
dense: boolean;
|
|
8
|
+
frameworkComponents: IDictionary;
|
|
9
|
+
gridOptions: IDictionary;
|
|
10
|
+
height: string | number;
|
|
11
|
+
icons: IDictionary<string>;
|
|
12
|
+
gridComponent: any;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new AgGrid.
|
|
15
|
+
* @param props AgGrid properties
|
|
16
|
+
*/
|
|
17
|
+
constructor(props: ITekAgGrid);
|
|
18
|
+
private createOptionsAccessors;
|
|
19
|
+
private setAccessor;
|
|
20
|
+
/**
|
|
21
|
+
* Reload dataset
|
|
22
|
+
*/
|
|
23
|
+
reload(): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Compares two dates
|
|
26
|
+
* @param date1
|
|
27
|
+
* @param date2
|
|
28
|
+
* @param format
|
|
29
|
+
* @returns -1 if date1 after date2
|
|
30
|
+
* @returns 0 if date1 equal date2
|
|
31
|
+
* @returns 1 if date1 before date2
|
|
32
|
+
*/
|
|
33
|
+
dateComparator(date1: string | Date, date2: string | Date, format?: string): 1 | -1 | 0;
|
|
34
|
+
private getDateAsString;
|
|
35
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IDatasource, IDictionary, RestDatasource } from '@zeedhi/core';
|
|
2
|
+
import { IDynamicFilterItem, ITekRestDatasource } from './interfaces';
|
|
3
|
+
export declare class TekRestDatasource extends RestDatasource implements ITekRestDatasource {
|
|
4
|
+
/** Dynamic filter data */
|
|
5
|
+
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
6
|
+
/** Search Join data */
|
|
7
|
+
searchJoin: IDictionary<Array<string | number>>;
|
|
8
|
+
/**
|
|
9
|
+
* URL reserved keys
|
|
10
|
+
*/
|
|
11
|
+
protected reservedKeys: IDictionary<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Dynamic Filter Operations
|
|
14
|
+
*/
|
|
15
|
+
dynamicFilterOperations: IDictionary<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Dynamic Filter Relations
|
|
18
|
+
*/
|
|
19
|
+
dynamicFilterRelations: IDictionary<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Dynamic Filter applied flag
|
|
22
|
+
*/
|
|
23
|
+
protected dynamicFilterApplied: string;
|
|
24
|
+
/**
|
|
25
|
+
* Create new datasource
|
|
26
|
+
* @param props Datasource properties
|
|
27
|
+
*/
|
|
28
|
+
constructor(props: ITekRestDatasource);
|
|
29
|
+
protected updateInternalProperties(datasource?: IDatasource): void;
|
|
30
|
+
protected getEncodedParam(urlParam: string, datasourceParam?: IDictionary<any>): IDictionary<any>;
|
|
31
|
+
protected getQueryStringValues(): IDictionary<any>;
|
|
32
|
+
protected getUrlQueryString(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Adds a new dynamic filter position or replace if exists
|
|
35
|
+
* @param column Dynamic Filter column name
|
|
36
|
+
* @param value Dynamic Filter value
|
|
37
|
+
* @returns Promise with data collection
|
|
38
|
+
*/
|
|
39
|
+
addDynamicFilter(column: string, value: any): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Removes a dynamic filter position
|
|
42
|
+
* @param column Dynamic Filter column name
|
|
43
|
+
* @returns Promise with data collection
|
|
44
|
+
*/
|
|
45
|
+
removeDynamicFilter(column: string): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Sets new dynamic filter value
|
|
48
|
+
* @param filter Dynamic Filter value
|
|
49
|
+
* @returns Promise with data collection
|
|
50
|
+
*/
|
|
51
|
+
setDynamicFilter(filter: IDictionary<any>): Promise<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Clears Dynamic filter value
|
|
54
|
+
* @returns Promise with data collection
|
|
55
|
+
*/
|
|
56
|
+
clearDynamicFilter(): Promise<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Resets page and selected rows and tries to update the url
|
|
59
|
+
* @returns Promise with data collection
|
|
60
|
+
*/
|
|
61
|
+
protected updateDynamicFilter(): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a filter value is valid
|
|
64
|
+
* @param value Filter value
|
|
65
|
+
* @returns Is valid filter value
|
|
66
|
+
*/
|
|
67
|
+
protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves request params
|
|
70
|
+
*/
|
|
71
|
+
protected getRequestParams(): any;
|
|
72
|
+
clone(): {
|
|
73
|
+
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
74
|
+
searchJoin: IDictionary<(string | number)[]>;
|
|
75
|
+
type: string;
|
|
76
|
+
route?: string | undefined;
|
|
77
|
+
lazyLoad?: boolean | undefined;
|
|
78
|
+
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;
|
|
79
|
+
find?: IDictionary<any> | undefined;
|
|
80
|
+
currentRow?: IDictionary<any> | undefined;
|
|
81
|
+
data?: IDictionary<any>[] | undefined;
|
|
82
|
+
filter?: IDictionary<any> | undefined;
|
|
83
|
+
limit?: string | number | undefined;
|
|
84
|
+
loadAll?: boolean | undefined;
|
|
85
|
+
loading?: boolean | undefined;
|
|
86
|
+
order?: string[] | undefined;
|
|
87
|
+
page?: string | number | undefined;
|
|
88
|
+
search?: string | undefined;
|
|
89
|
+
searchIn?: string[] | undefined;
|
|
90
|
+
uniqueKey?: string | undefined;
|
|
91
|
+
watchUrl?: boolean | undefined;
|
|
92
|
+
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -84,6 +84,7 @@ export declare class TekMemoryDatasource extends MemoryDatasource implements ITe
|
|
|
84
84
|
*/
|
|
85
85
|
search?: string | undefined;
|
|
86
86
|
searchIn?: string[] | undefined;
|
|
87
|
+
searchInParams?: IDictionary<any> | undefined;
|
|
87
88
|
uniqueKey?: string | undefined;
|
|
88
89
|
watchUrl?: boolean | undefined;
|
|
89
90
|
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
@@ -85,6 +85,9 @@ export declare class TekRestDatasource extends RestDatasource implements ITekRes
|
|
|
85
85
|
page?: string | number | undefined;
|
|
86
86
|
search?: string | undefined;
|
|
87
87
|
searchIn?: string[] | undefined;
|
|
88
|
+
searchInParams?: IDictionary<any> | undefined; /**
|
|
89
|
+
* Dynamic Filter applied flag
|
|
90
|
+
*/
|
|
88
91
|
uniqueKey?: string | undefined;
|
|
89
92
|
watchUrl?: boolean | undefined;
|
|
90
93
|
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare const defaultIcons: {
|
|
2
|
+
columnGroupOpened: string;
|
|
3
|
+
columnGroupClosed: string;
|
|
4
|
+
columnSelectClosed: string;
|
|
5
|
+
columnSelectOpen: string;
|
|
6
|
+
columnSelectIndeterminate: string;
|
|
7
|
+
columnMovePin: string;
|
|
8
|
+
columnMoveHide: string;
|
|
9
|
+
columnMoveMove: string;
|
|
10
|
+
columnMoveLeft: string;
|
|
11
|
+
columnMoveRight: string;
|
|
12
|
+
columnMoveGroup: string;
|
|
13
|
+
columnMoveValue: string;
|
|
14
|
+
dropNotAllowed: string;
|
|
15
|
+
groupContracted: string;
|
|
16
|
+
groupExpanded: string;
|
|
17
|
+
chart: string;
|
|
18
|
+
close: string;
|
|
19
|
+
cancel: string;
|
|
20
|
+
check: string;
|
|
21
|
+
first: string;
|
|
22
|
+
previous: string;
|
|
23
|
+
next: string;
|
|
24
|
+
last: string;
|
|
25
|
+
linked: string;
|
|
26
|
+
unlinked: string;
|
|
27
|
+
colorPicker: string;
|
|
28
|
+
groupLoading: string;
|
|
29
|
+
menu: string;
|
|
30
|
+
filter: string;
|
|
31
|
+
columns: string;
|
|
32
|
+
maximize: string;
|
|
33
|
+
minimize: string;
|
|
34
|
+
menuPin: string;
|
|
35
|
+
menuValue: string;
|
|
36
|
+
menuAddRowGroup: string;
|
|
37
|
+
menuRemoveRowGroup: string;
|
|
38
|
+
clipboardCopy: string;
|
|
39
|
+
clipboardPaste: string;
|
|
40
|
+
rowGroupPanel: string;
|
|
41
|
+
valuePanel: string;
|
|
42
|
+
columnDrag: string;
|
|
43
|
+
rowDrag: string;
|
|
44
|
+
save: string;
|
|
45
|
+
smallDown: string;
|
|
46
|
+
smallLeft: string;
|
|
47
|
+
smallRight: string;
|
|
48
|
+
smallUp: string;
|
|
49
|
+
sortAscending: string;
|
|
50
|
+
sortDescending: string;
|
|
51
|
+
sortUnSort: string;
|
|
52
|
+
};
|
|
53
|
+
export default defaultIcons;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TekGridColumn } from '..';
|
|
2
|
+
export declare class TekFilterDynamicValues {
|
|
3
|
+
private static values;
|
|
4
|
+
private static formatDate;
|
|
5
|
+
static getLabel(name: string): string;
|
|
6
|
+
static getValue(name: string, column: TekGridColumn): string | string[];
|
|
7
|
+
static register(name: string, label: string, fn: () => Date | [Date, Date]): void;
|
|
8
|
+
static unregister(name: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TekGrid } from './grid';
|
|
2
|
+
export declare class TekGridController {
|
|
3
|
+
private grid;
|
|
4
|
+
constructor(grid: TekGrid);
|
|
5
|
+
get gridTitle(): string;
|
|
6
|
+
get showAddButton(): boolean;
|
|
7
|
+
get showDeleteButton(): boolean;
|
|
8
|
+
get showFilterButton(): boolean;
|
|
9
|
+
get showColumnsButton(): boolean;
|
|
10
|
+
get columnsButtonIgnore(): string[];
|
|
11
|
+
get showLayoutOptions(): boolean;
|
|
12
|
+
get showFirstDivider(): boolean;
|
|
13
|
+
get showActionsButton(): boolean;
|
|
14
|
+
get showExportButton(): boolean;
|
|
15
|
+
get showActionAndExportButton(): boolean;
|
|
16
|
+
get isEditing(): boolean;
|
|
17
|
+
get isNotEditing(): boolean;
|
|
18
|
+
get disableDeleteButton(): boolean;
|
|
19
|
+
}
|
|
@@ -101,7 +101,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
101
101
|
columnHasFilterData(column: TekGridColumn): boolean;
|
|
102
102
|
private buildReportGroups;
|
|
103
103
|
private buildReportAggregations;
|
|
104
|
-
getReport(type: string, portrait?: boolean, rowObj?: any): Promise<
|
|
104
|
+
getReport(type: string, portrait?: boolean, rowObj?: any): Promise<void>;
|
|
105
105
|
private groups;
|
|
106
106
|
private summary;
|
|
107
107
|
private originalDatasourceLoadAll?;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridColumnEditable } from '@zeedhi/common';
|
|
2
|
+
import { ITekGridColumn } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Grid column
|
|
5
|
+
*/
|
|
6
|
+
export declare class TekGridColumn extends GridColumnEditable implements ITekGridColumn {
|
|
7
|
+
filterProps: any;
|
|
8
|
+
filterable: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new TekGrid Column.
|
|
11
|
+
* @param props TekGrid column properties
|
|
12
|
+
*/
|
|
13
|
+
constructor(props: ITekGridColumn);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TekGrid } from './grid';
|
|
2
|
+
export declare class TekGridController {
|
|
3
|
+
private grid;
|
|
4
|
+
constructor(grid: TekGrid);
|
|
5
|
+
get gridTitle(): string;
|
|
6
|
+
get showAddButton(): boolean;
|
|
7
|
+
get showDeleteButton(): boolean;
|
|
8
|
+
get showFilterButton(): boolean;
|
|
9
|
+
get showColumnsButton(): boolean;
|
|
10
|
+
get showFirstDivider(): boolean;
|
|
11
|
+
get showActionsButton(): boolean;
|
|
12
|
+
get isEditing(): boolean;
|
|
13
|
+
get isNotEditing(): boolean;
|
|
14
|
+
get disableDeleteButton(): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Iterable } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary } from '@zeedhi/core';
|
|
3
|
+
import { ITekGrid } from './interfaces';
|
|
4
|
+
/** Grid Component */
|
|
5
|
+
export declare class TekGrid extends Iterable implements ITekGrid {
|
|
6
|
+
cssClass: string;
|
|
7
|
+
dense: boolean;
|
|
8
|
+
frameworkComponents: IDictionary;
|
|
9
|
+
gridOptions: IDictionary;
|
|
10
|
+
height: string | number;
|
|
11
|
+
icons: IDictionary<string>;
|
|
12
|
+
gridComponent: any;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new Grid.
|
|
15
|
+
* @param props Grid properties
|
|
16
|
+
*/
|
|
17
|
+
constructor(props: ITekGrid);
|
|
18
|
+
private createOptionsAccessors;
|
|
19
|
+
private setAccessor;
|
|
20
|
+
/**
|
|
21
|
+
* Reload dataset
|
|
22
|
+
*/
|
|
23
|
+
reload(): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Compares two dates
|
|
26
|
+
* @param date1
|
|
27
|
+
* @param date2
|
|
28
|
+
* @param format
|
|
29
|
+
* @returns -1 if date1 after date2
|
|
30
|
+
* @returns 0 if date1 equal date2
|
|
31
|
+
* @returns 1 if date1 before date2
|
|
32
|
+
*/
|
|
33
|
+
dateComparator(date1: string | Date, date2: string | Date, format?: string): 1 | -1 | 0;
|
|
34
|
+
private getDateAsString;
|
|
35
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Button, Checkbox, IComponentRender, Login, Select, Text } from '@zeedhi/common';
|
|
2
|
+
import { IEventParam } from '@zeedhi/core';
|
|
3
|
+
import { ITekLogin } from './interfaces';
|
|
4
|
+
export declare class TekLogin extends Login implements ITekLogin {
|
|
5
|
+
cardWidth: string | number;
|
|
6
|
+
layout: string;
|
|
7
|
+
children: IComponentRender[];
|
|
8
|
+
constructor(props: ITekLogin);
|
|
9
|
+
private testLicenseKeyMap;
|
|
10
|
+
private attempts;
|
|
11
|
+
private confirmSessionChange;
|
|
12
|
+
private user;
|
|
13
|
+
private password;
|
|
14
|
+
private hash;
|
|
15
|
+
private userData;
|
|
16
|
+
private privacyModal?;
|
|
17
|
+
onMounted(element: HTMLElement): void;
|
|
18
|
+
onBeforeDestroy(): void;
|
|
19
|
+
privacyClick({ component }: IEventParam<Text>): void;
|
|
20
|
+
private findPrivacyPolicyByAuthentication;
|
|
21
|
+
private openModalPrivacyPolicy;
|
|
22
|
+
loginEmailPrivacyPolicyCancel(): void;
|
|
23
|
+
loginEmailPrivacyPolicyConfirm({ component }: IEventParam<Button>): void;
|
|
24
|
+
forgetClick(): void;
|
|
25
|
+
loginForgetPasswordConfirm({ component }: IEventParam<Button>): void;
|
|
26
|
+
loginForgetPasswordCancel(): void;
|
|
27
|
+
private requestNewPassword;
|
|
28
|
+
private setCurrentLanguage;
|
|
29
|
+
private getLanguageNewFormat;
|
|
30
|
+
private getLanguageOldFormat;
|
|
31
|
+
private updateLanguages;
|
|
32
|
+
private getDataSource;
|
|
33
|
+
private setDataSource;
|
|
34
|
+
private getProductLanguages;
|
|
35
|
+
changeLanguage({ component }: IEventParam<Select>): void;
|
|
36
|
+
changeKeepConnected({ component }: IEventParam<Checkbox>): void;
|
|
37
|
+
private generateKey;
|
|
38
|
+
loginClick({ component }: IEventParam<Button>): void;
|
|
39
|
+
private doLogin;
|
|
40
|
+
private checkLoginResponse;
|
|
41
|
+
private checkErrorResponse;
|
|
42
|
+
private expiredPasswordValidation;
|
|
43
|
+
private showDialogExpiredPassword;
|
|
44
|
+
private openExpiredPasswordWidget;
|
|
45
|
+
private showMessage;
|
|
46
|
+
loginExpiredPasswordConfirm({ component }: IEventParam<Button>): void;
|
|
47
|
+
loginExpiredPasswordCancel(): void;
|
|
48
|
+
private showForm;
|
|
49
|
+
private updatePassword;
|
|
50
|
+
private validateRcUrl;
|
|
51
|
+
private redirectAfterLogin;
|
|
52
|
+
private isJson;
|
|
53
|
+
private defaultError;
|
|
54
|
+
private showInvalidPasswordMaskMessage;
|
|
55
|
+
private setLogAccess;
|
|
56
|
+
private redirectToProduct;
|
|
57
|
+
private testLicenseConnection;
|
|
58
|
+
}
|