@zeedhi/teknisa-components-common 1.117.1 → 3.0.1
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/.package.json +43 -0
- package/dist/teknisa-components-common.js +3802 -0
- package/dist/teknisa-components-common.min.js +3802 -0
- package/dist/types/components/index.d.ts +7 -0
- package/{types → dist/types}/components/tek-breadcrumb-header/breadcrumb-header.d.ts +12 -12
- package/{types → dist/types}/components/tek-breadcrumb-header/interfaces.d.ts +6 -6
- package/dist/types/components/tek-datasource/index.d.ts +3 -0
- package/{types → dist/types}/components/tek-datasource/interfaces.d.ts +16 -16
- package/{types/components/tek-datasource/memory-datasource.d.ts → dist/types/components/tek-datasource/tek-memory-datasource.d.ts} +93 -100
- package/{types/components/tek-datasource/rest-datasource.d.ts → dist/types/components/tek-datasource/tek-rest-datasource.d.ts} +95 -103
- package/dist/types/components/tek-grid/columns-searcher.d.ts +5 -0
- package/dist/types/components/tek-grid/dynamic-filter-datasource-factory.d.ts +6 -0
- package/{types → dist/types}/components/tek-grid/filter-helper.d.ts +7 -7
- package/{types → dist/types}/components/tek-grid/grid-filter-button.d.ts +29 -31
- package/dist/types/components/tek-grid/grouped-data-manager.d.ts +82 -0
- package/dist/types/components/tek-grid/grouped-data-selector.d.ts +7 -0
- package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +14 -0
- package/dist/types/components/tek-grid/index.d.ts +18 -0
- package/dist/types/components/tek-grid/interfaces.d.ts +259 -0
- package/dist/types/components/tek-grid/keymap-grouped.d.ts +6 -0
- package/{types → dist/types}/components/tek-grid/layout-options.d.ts +39 -31
- package/{types/components/tek-grid/grid-column.d.ts → dist/types/components/tek-grid/tek-grid-column.d.ts} +42 -45
- package/{types/components/tek-grid/grid-columns-button-controller.d.ts → dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.d.ts} +8 -8
- package/{types/components/tek-grid/grid-columns-button.d.ts → dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.d.ts} +13 -12
- package/dist/types/components/tek-grid/tek-grid-controller.d.ts +31 -0
- package/dist/types/components/tek-grid/tek-grid-events.d.ts +31 -0
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/button-option.d.ts +17 -16
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/index.d.ts +3 -3
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.d.ts +5 -0
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/multi-option.d.ts +12 -12
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/index.d.ts +2 -0
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +22 -0
- package/dist/types/components/tek-grid/tek-grid.d.ts +216 -0
- package/{types → dist/types}/components/tek-user-info/TekUserInfoController.d.ts +22 -21
- package/{types → dist/types}/components/tek-user-info/interfaces.d.ts +27 -28
- package/{types → dist/types}/components/tek-user-info/tek-user-info-list.d.ts +32 -31
- package/{types → dist/types}/components/tek-user-info/tek-user-info.d.ts +37 -38
- package/{types → dist/types}/error/delete-rows-error.d.ts +6 -6
- package/dist/types/error/tek-grid-delete-rows-error.d.ts +7 -0
- package/dist/types/error/teknisa-common-error.d.ts +6 -0
- package/dist/types/index.d.ts +2 -0
- package/{types → dist/types}/utils/config/config.d.ts +7 -7
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/is-filled-object/is-filled-object.d.ts +2 -0
- package/dist/types/utils/is-nil.d.ts +1 -0
- package/environments.json +14 -0
- package/package.json +26 -18
- package/src/components/index.ts +101 -0
- package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +29 -0
- package/src/components/tek-breadcrumb-header/interfaces.ts +7 -0
- package/src/components/tek-datasource/index.ts +3 -0
- package/src/components/tek-datasource/interfaces.ts +36 -0
- package/src/components/tek-datasource/tek-memory-datasource.ts +314 -0
- package/src/components/tek-datasource/tek-rest-datasource.ts +224 -0
- package/src/components/tek-grid/columns-searcher.ts +22 -0
- package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +20 -0
- package/src/components/tek-grid/filter-helper.ts +20 -0
- package/src/components/tek-grid/grid-filter-button.ts +419 -0
- package/src/components/tek-grid/grouped-data-manager.ts +448 -0
- package/src/components/tek-grid/grouped-data-selector.ts +40 -0
- package/src/components/tek-grid/grouped-view-navigator.ts +84 -0
- package/src/components/tek-grid/index.ts +18 -0
- package/src/components/tek-grid/interfaces.ts +329 -0
- package/src/components/tek-grid/keymap-grouped.ts +20 -0
- package/src/components/tek-grid/layout-options.ts +248 -0
- package/src/components/tek-grid/tek-grid-column.ts +193 -0
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +28 -0
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +38 -0
- package/src/components/tek-grid/tek-grid-controller.ts +140 -0
- package/src/components/tek-grid/tek-grid-events.ts +105 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +26 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +3 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +6 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +85 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +2 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +365 -0
- package/src/components/tek-grid/tek-grid.ts +1118 -0
- package/src/components/tek-user-info/TekUserInfoController.ts +87 -0
- package/src/components/tek-user-info/interfaces.ts +21 -0
- package/src/components/tek-user-info/tek-user-info-list.ts +64 -0
- package/src/components/tek-user-info/tek-user-info.ts +337 -0
- package/src/error/tek-grid-delete-rows-error.ts +15 -0
- package/src/error/teknisa-common-error.ts +8 -0
- package/src/index.ts +2 -0
- package/src/utils/config/config.ts +8 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/is-filled-object/is-filled-object.ts +5 -0
- package/src/utils/is-nil.ts +3 -0
- package/tests/__helpers__/component-event-helper.ts +1 -1
- package/tests/__helpers__/get-child-helper.ts +1 -1
- package/tests/__helpers__/mock-created-helper.ts +1 -1
- package/tests/unit/components/crud/crud-button.spec.ts +1 -1
- package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +1 -11
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +5 -7
- package/tests/unit/components/tek-drag-grid/tek-drag-grid.spec.ts +1 -1
- package/tests/unit/components/tek-grid/button-option.spec.ts +49 -0
- package/tests/unit/components/tek-grid/columns-searcher.spec.ts +112 -0
- package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +90 -0
- package/tests/unit/components/tek-grid/filter-helper.spec.ts +34 -130
- package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +114 -239
- package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +593 -0
- package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +136 -0
- package/tests/unit/components/tek-grid/grouped-view-navigator.spec.ts +244 -0
- package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +20 -0
- package/tests/unit/components/tek-grid/{layout_options.spec.ts → layout-options.spec.ts} +70 -30
- package/tests/unit/components/tek-grid/multi-option.spec.ts +139 -0
- package/tests/unit/components/tek-grid/{grid-column.spec.ts → tek-grid-column.spec.ts} +44 -2
- package/tests/unit/components/tek-grid/{grid-columns-button.spec.ts → tek-grid-columns-button.spec.ts} +42 -9
- package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +253 -0
- package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +186 -0
- package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +34 -0
- package/tests/unit/components/tek-grid/tek-grid.spec.ts +895 -0
- package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +482 -0
- package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +422 -0
- package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +1 -1
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +10 -14
- package/tests/unit/components/tree-grid/tree-grid.spec.ts +4 -28
- package/tests/unit/utils/grid-base/export-options/multi-option.spec.ts +2 -2
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +17 -152
- package/tsconfig.build.json +7 -0
- package/coverage/clover.xml +0 -2007
- package/coverage/coverage-final.json +0 -48
- 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 -431
- 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__/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 -176
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +0 -94
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +0 -121
- package/coverage/lcov.info +0 -3885
- package/dist/tek-components-common.esm.js +0 -4833
- package/dist/tek-components-common.umd.js +0 -4870
- package/tests/unit/components/tek-grid/grid.spec.ts +0 -3377
- package/tests/unit/utils/grid-base/delete-rows-error.spec.ts +0 -24
- package/types/components/crud/crud-add-button.d.ts +0 -38
- package/types/components/crud/crud-button.d.ts +0 -27
- package/types/components/crud/crud-cancel-button.d.ts +0 -28
- package/types/components/crud/crud-delete-button.d.ts +0 -42
- package/types/components/crud/crud-form.d.ts +0 -46
- package/types/components/crud/crud-save-button.d.ts +0 -24
- package/types/components/crud/interfaces.d.ts +0 -15
- package/types/components/index.d.ts +0 -41
- package/types/components/tek-card-title/card-title.d.ts +0 -14
- package/types/components/tek-card-title/interfaces.d.ts +0 -9
- package/types/components/tek-drag-grid/interfaces.d.ts +0 -7
- package/types/components/tek-drag-grid/tek-drag-grid.d.ts +0 -36
- package/types/components/tek-grid/grid.d.ts +0 -267
- package/types/components/tek-grid/interfaces.d.ts +0 -203
- package/types/components/tek-image/image.d.ts +0 -55
- package/types/components/tek-image/interfaces.d.ts +0 -12
- package/types/components/tek-iterable-carousel/interfaces.d.ts +0 -5
- package/types/components/tek-iterable-carousel/iterable-carousel.d.ts +0 -13
- package/types/components/tek-iterable-component-render/interfaces.d.ts +0 -3
- package/types/components/tek-iterable-component-render/iterable-component-render.d.ts +0 -10
- package/types/components/tek-loading/interfaces.d.ts +0 -6
- package/types/components/tek-loading/loading.d.ts +0 -24
- package/types/components/tek-notifications/interfaces.d.ts +0 -22
- package/types/components/tek-notifications/notifications.d.ts +0 -35
- package/types/components/tek-product-card/interfaces.d.ts +0 -19
- package/types/components/tek-product-card/product-card.d.ts +0 -66
- package/types/components/tek-tree-grid/interfaces.d.ts +0 -30
- package/types/components/tek-tree-grid/tree-grid.d.ts +0 -102
- package/types/error/incomplete-groups-error.d.ts +0 -8
- package/types/index.d.ts +0 -2
- package/types/utils/extract-properties.d.ts +0 -7
- package/types/utils/grid-base/export-options/interfaces.d.ts +0 -5
- package/types/utils/grid-base/grid-base.d.ts +0 -59
- package/types/utils/grid-base/grid-controller.d.ts +0 -27
- package/types/utils/index.d.ts +0 -6
- package/types/utils/report-filter/report-filter.d.ts +0 -12
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { TekGridDeleteRowsError } from '../../../../src/error/delete-rows-error';
|
|
2
|
-
|
|
3
|
-
describe('TekGridDeleteRowsError', () => {
|
|
4
|
-
describe('constructor()', () => {
|
|
5
|
-
it('should create an instance of the error with the correct name and message', () => {
|
|
6
|
-
// Cria uma nova instância do erro
|
|
7
|
-
const error = new TekGridDeleteRowsError();
|
|
8
|
-
|
|
9
|
-
// Verifica se a instância foi criada corretamente
|
|
10
|
-
expect(error).toBeInstanceOf(TekGridDeleteRowsError);
|
|
11
|
-
expect(error).toBeInstanceOf(Error);
|
|
12
|
-
|
|
13
|
-
// Verifica se o nome do erro está correto
|
|
14
|
-
expect(error.name).toBe('TekGridDeleteRowsError');
|
|
15
|
-
|
|
16
|
-
// Verifica se a mensagem de erro está correta
|
|
17
|
-
expect(error.message).toBe(
|
|
18
|
-
'TekGrid can\'t automatically delete rows when selectAllPages property is true.'
|
|
19
|
-
+ ' You should delete them manually using the beforeDelete event and preventing'
|
|
20
|
-
+ ' the default execution',
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ICrudAddButton } from './interfaces';
|
|
2
|
-
import { CrudButton } from './crud-button';
|
|
3
|
-
/**
|
|
4
|
-
* Button to be used on Crud Forms
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrudAddButton extends CrudButton implements ICrudAddButton {
|
|
7
|
-
/**
|
|
8
|
-
* Button tooltip
|
|
9
|
-
*/
|
|
10
|
-
private defaultTooltip;
|
|
11
|
-
/**
|
|
12
|
-
* Button flat
|
|
13
|
-
*/
|
|
14
|
-
private defaultFlat;
|
|
15
|
-
/**
|
|
16
|
-
* Button icon
|
|
17
|
-
*/
|
|
18
|
-
private defaultIcon;
|
|
19
|
-
/**
|
|
20
|
-
* Button icon name
|
|
21
|
-
*/
|
|
22
|
-
private defaultIconName;
|
|
23
|
-
/**
|
|
24
|
-
* Button icon color
|
|
25
|
-
*/
|
|
26
|
-
private defaultColor;
|
|
27
|
-
/**
|
|
28
|
-
* Create new Crud Add Button
|
|
29
|
-
* @param props component properties
|
|
30
|
-
*/
|
|
31
|
-
constructor(props: ICrudAddButton);
|
|
32
|
-
/**
|
|
33
|
-
* Triggered when the component is clicked.
|
|
34
|
-
* @param event DOM event
|
|
35
|
-
* @param element Element clicked
|
|
36
|
-
*/
|
|
37
|
-
click(event: Event, element: HTMLElement): void;
|
|
38
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Button, Tooltip } from '@zeedhi/common';
|
|
2
|
-
import { ICrudButton } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Button to be used on Crud Forms
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrudButton extends Button implements ICrudButton {
|
|
7
|
-
/**
|
|
8
|
-
* Click shortcut key
|
|
9
|
-
*/
|
|
10
|
-
clickShortcutKey?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Button tooltip
|
|
13
|
-
*/
|
|
14
|
-
tooltip: Tooltip;
|
|
15
|
-
private tooltipDefault;
|
|
16
|
-
/**
|
|
17
|
-
* Create new Crud Button
|
|
18
|
-
* @param props component properties
|
|
19
|
-
*/
|
|
20
|
-
constructor(props: ICrudButton);
|
|
21
|
-
private shortcutClick;
|
|
22
|
-
initKeyMap(parentElement: HTMLElement): void;
|
|
23
|
-
/**
|
|
24
|
-
* Return if parent (form or grid) is editing
|
|
25
|
-
*/
|
|
26
|
-
get parentIsEditing(): boolean;
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ICrudCancelButton } from './interfaces';
|
|
2
|
-
import { CrudButton } from './crud-button';
|
|
3
|
-
/**
|
|
4
|
-
* Button to be used on Crud Forms
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrudCancelButton extends CrudButton implements ICrudCancelButton {
|
|
7
|
-
/**
|
|
8
|
-
* Button label
|
|
9
|
-
*/
|
|
10
|
-
private defaultLabel;
|
|
11
|
-
/**
|
|
12
|
-
* Button outline
|
|
13
|
-
*/
|
|
14
|
-
private defaultOutline;
|
|
15
|
-
/**
|
|
16
|
-
* Create new Crud Cancel Button
|
|
17
|
-
* @param props component properties
|
|
18
|
-
*/
|
|
19
|
-
constructor(props: ICrudCancelButton);
|
|
20
|
-
/**
|
|
21
|
-
* Triggered when the component is clicked.
|
|
22
|
-
* @param event DOM event
|
|
23
|
-
* @param element Element clicked
|
|
24
|
-
*/
|
|
25
|
-
click(event: Event, element: HTMLElement): void;
|
|
26
|
-
get disabled(): boolean;
|
|
27
|
-
set disabled(_value: boolean);
|
|
28
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ICrudDeleteButton } from './interfaces';
|
|
2
|
-
import { CrudButton } from './crud-button';
|
|
3
|
-
/**
|
|
4
|
-
* Button to be used on Crud Forms
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrudDeleteButton extends CrudButton implements ICrudDeleteButton {
|
|
7
|
-
/**
|
|
8
|
-
* Button tooltip
|
|
9
|
-
*/
|
|
10
|
-
private defaultTooltip;
|
|
11
|
-
/**
|
|
12
|
-
* Button flat
|
|
13
|
-
*/
|
|
14
|
-
private defaultFlat;
|
|
15
|
-
/**
|
|
16
|
-
* Button icon
|
|
17
|
-
*/
|
|
18
|
-
private defaultIcon;
|
|
19
|
-
/**
|
|
20
|
-
* Button icon name
|
|
21
|
-
*/
|
|
22
|
-
private defaultIconName;
|
|
23
|
-
/**
|
|
24
|
-
* Button icon color
|
|
25
|
-
*/
|
|
26
|
-
private defaultColor;
|
|
27
|
-
/**
|
|
28
|
-
* Create new Crud Delete Button
|
|
29
|
-
* @param props component properties
|
|
30
|
-
*/
|
|
31
|
-
constructor(props: ICrudDeleteButton);
|
|
32
|
-
/**
|
|
33
|
-
* Triggered when the component is clicked.
|
|
34
|
-
* @param event DOM event
|
|
35
|
-
* @param element Element clicked
|
|
36
|
-
*/
|
|
37
|
-
click(event: Event, element: HTMLElement): void;
|
|
38
|
-
get parentHasCurrentRow(): any;
|
|
39
|
-
get parentHasSelectedRows(): boolean;
|
|
40
|
-
get disabled(): boolean;
|
|
41
|
-
set disabled(_value: boolean);
|
|
42
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Form, Component } from '@zeedhi/common';
|
|
2
|
-
import { IDictionary } from '@zeedhi/core';
|
|
3
|
-
import { ICrudForm } from './interfaces';
|
|
4
|
-
/**
|
|
5
|
-
* Form to be used on Crud operations
|
|
6
|
-
*/
|
|
7
|
-
export declare class CrudForm extends Form implements ICrudForm {
|
|
8
|
-
/**
|
|
9
|
-
* Form edit state
|
|
10
|
-
*/
|
|
11
|
-
editing: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Stores value before editing
|
|
14
|
-
*/
|
|
15
|
-
private beforeEditValue?;
|
|
16
|
-
/**
|
|
17
|
-
* Stores unsaved Value
|
|
18
|
-
*/
|
|
19
|
-
private unSavedValue?;
|
|
20
|
-
/**
|
|
21
|
-
* Create new Crud Form
|
|
22
|
-
* @param props component properties
|
|
23
|
-
*/
|
|
24
|
-
constructor(props: ICrudForm);
|
|
25
|
-
setValue(value: IDictionary, autoSave?: boolean): void;
|
|
26
|
-
/**
|
|
27
|
-
* Cancel edit and return value to original
|
|
28
|
-
*/
|
|
29
|
-
cancelEdit(): void;
|
|
30
|
-
/**
|
|
31
|
-
* SaveEdit
|
|
32
|
-
*/
|
|
33
|
-
saveEdit(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Update value using child input value
|
|
36
|
-
* @param child child input
|
|
37
|
-
* @param value input value
|
|
38
|
-
*/
|
|
39
|
-
updateChild(child: Component, value: any): void;
|
|
40
|
-
private nullCast;
|
|
41
|
-
onMounted(element: HTMLElement): void;
|
|
42
|
-
/**
|
|
43
|
-
* Form is focused
|
|
44
|
-
*/
|
|
45
|
-
focus(): void;
|
|
46
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ICrudSaveButton } from './interfaces';
|
|
2
|
-
import { CrudButton } from './crud-button';
|
|
3
|
-
/**
|
|
4
|
-
* Button to be used on Crud Forms
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrudSaveButton extends CrudButton implements ICrudSaveButton {
|
|
7
|
-
/**
|
|
8
|
-
* Button label
|
|
9
|
-
*/
|
|
10
|
-
private defaultLabel;
|
|
11
|
-
/**
|
|
12
|
-
* Create new Crud Save Button
|
|
13
|
-
* @param props component properties
|
|
14
|
-
*/
|
|
15
|
-
constructor(props: ICrudSaveButton);
|
|
16
|
-
/**
|
|
17
|
-
* Triggered when the component is clicked.
|
|
18
|
-
* @param event DOM event
|
|
19
|
-
* @param element Element clicked
|
|
20
|
-
*/
|
|
21
|
-
click(event: Event, element: HTMLElement): void;
|
|
22
|
-
get disabled(): boolean;
|
|
23
|
-
set disabled(_value: boolean);
|
|
24
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IButton, IForm, ITooltip } from '@zeedhi/common';
|
|
2
|
-
export interface ICrudForm extends IForm {
|
|
3
|
-
}
|
|
4
|
-
export interface ICrudButton extends IButton {
|
|
5
|
-
clickShortcutKey?: string;
|
|
6
|
-
tooltip?: ITooltip;
|
|
7
|
-
}
|
|
8
|
-
export interface ICrudSaveButton extends ICrudButton {
|
|
9
|
-
}
|
|
10
|
-
export interface ICrudCancelButton extends ICrudButton {
|
|
11
|
-
}
|
|
12
|
-
export interface ICrudAddButton extends ICrudButton {
|
|
13
|
-
}
|
|
14
|
-
export interface ICrudDeleteButton extends ICrudButton {
|
|
15
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export * from './crud/crud-form';
|
|
2
|
-
export * from './crud/crud-button';
|
|
3
|
-
export * from './crud/crud-add-button';
|
|
4
|
-
export * from './crud/crud-cancel-button';
|
|
5
|
-
export * from './crud/crud-delete-button';
|
|
6
|
-
export * from './crud/crud-save-button';
|
|
7
|
-
export * from './crud/interfaces';
|
|
8
|
-
export * from './tek-breadcrumb-header/breadcrumb-header';
|
|
9
|
-
export * from './tek-breadcrumb-header/interfaces';
|
|
10
|
-
export * from './tek-card-title/card-title';
|
|
11
|
-
export * from './tek-card-title/interfaces';
|
|
12
|
-
export * from './tek-image/image';
|
|
13
|
-
export * from './tek-image/interfaces';
|
|
14
|
-
export * from './tek-product-card/product-card';
|
|
15
|
-
export * from './tek-product-card/interfaces';
|
|
16
|
-
export * from './tek-iterable-component-render/iterable-component-render';
|
|
17
|
-
export * from './tek-iterable-component-render/interfaces';
|
|
18
|
-
export * from './tek-iterable-carousel/iterable-carousel';
|
|
19
|
-
export * from './tek-iterable-carousel/interfaces';
|
|
20
|
-
export * from './tek-loading/loading';
|
|
21
|
-
export * from './tek-loading/interfaces';
|
|
22
|
-
export * from './tek-notifications/notifications';
|
|
23
|
-
export * from './tek-notifications/interfaces';
|
|
24
|
-
export * from './tek-grid/interfaces';
|
|
25
|
-
export * from './tek-grid/grid';
|
|
26
|
-
export * from './tek-grid/grid-column';
|
|
27
|
-
export * from './tek-grid/grid-columns-button';
|
|
28
|
-
export * from './tek-grid/grid-columns-button-controller';
|
|
29
|
-
export * from './tek-grid/grid-filter-button';
|
|
30
|
-
export * from './tek-grid/layout-options';
|
|
31
|
-
export * from './tek-grid/filter-helper';
|
|
32
|
-
export * from './tek-datasource/interfaces';
|
|
33
|
-
export * from './tek-datasource/rest-datasource';
|
|
34
|
-
export * from './tek-datasource/memory-datasource';
|
|
35
|
-
export * from './tek-tree-grid/interfaces';
|
|
36
|
-
export * from './tek-tree-grid/tree-grid';
|
|
37
|
-
export * from './tek-user-info/interfaces';
|
|
38
|
-
export * from './tek-user-info/tek-user-info';
|
|
39
|
-
export * from './tek-user-info/tek-user-info-list';
|
|
40
|
-
export * from './tek-drag-grid/interfaces';
|
|
41
|
-
export * from './tek-drag-grid/tek-drag-grid';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentRender, IComponentRender } from '@zeedhi/common';
|
|
2
|
-
import { ICardTitle } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* CardTitle component join an icon, title, rightSlot and a divider
|
|
5
|
-
*/
|
|
6
|
-
export declare class CardTitle extends ComponentRender implements ICardTitle {
|
|
7
|
-
title: string;
|
|
8
|
-
subtitle: string;
|
|
9
|
-
iconName: string;
|
|
10
|
-
rightSlot: IComponentRender[];
|
|
11
|
-
showDivider: boolean;
|
|
12
|
-
to: string;
|
|
13
|
-
constructor(props: ICardTitle);
|
|
14
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IDraggable } from '@zeedhi/zd-drag-grid-common';
|
|
2
|
-
import { IDictionary } from '@zeedhi/core';
|
|
3
|
-
import { TekGrid } from '../tek-grid/grid';
|
|
4
|
-
import { ITekDragGrid } from './interfaces';
|
|
5
|
-
export declare class TekDragGrid extends TekGrid implements ITekDragGrid {
|
|
6
|
-
private internalOrderColumnName;
|
|
7
|
-
private internalOrderMode;
|
|
8
|
-
protected draggable: IDraggable;
|
|
9
|
-
constructor(props: ITekDragGrid);
|
|
10
|
-
set orderColumnName(value: string);
|
|
11
|
-
get orderColumnName(): string;
|
|
12
|
-
set orderMode(value: 'asc' | 'desc');
|
|
13
|
-
get orderMode(): 'asc' | 'desc';
|
|
14
|
-
/**
|
|
15
|
-
* Event triggered when dragged element is moving
|
|
16
|
-
* @param event DOM event
|
|
17
|
-
* @param row row being dragged
|
|
18
|
-
* @param element HTML element
|
|
19
|
-
* @returns return false to cancel dragging
|
|
20
|
-
*/
|
|
21
|
-
onDragMove(event: Event, row: IDictionary, element: HTMLElement): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Event triggered when drag starts
|
|
24
|
-
* @param event DOM event
|
|
25
|
-
* @param row row being dragged
|
|
26
|
-
* @param element HTML element
|
|
27
|
-
*/
|
|
28
|
-
onDragStart(event: Event, row: IDictionary, element: HTMLElement): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Event triggered when drag ends
|
|
31
|
-
* @param event DOM event
|
|
32
|
-
* @param row row being dragged
|
|
33
|
-
* @param element HTML element
|
|
34
|
-
*/
|
|
35
|
-
onDragEnd(event: Event, row: IDictionary, element: HTMLElement): void;
|
|
36
|
-
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { GridEditable, IComponentRender, Input, LabelFormatter, GridColumnEditable } from '@zeedhi/common';
|
|
2
|
-
import { Datasource, IDictionary, IEventParam } from '@zeedhi/core';
|
|
3
|
-
import { ITekGridAtoms } from '../../utils';
|
|
4
|
-
import { TekGridColumn } from './grid-column';
|
|
5
|
-
import { IGroupedData, IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig, ITekGridGroup, ITekGridGroupFooter } from './interfaces';
|
|
6
|
-
import { TekGridLayoutOptions } from './layout-options';
|
|
7
|
-
export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
8
|
-
title: string;
|
|
9
|
-
addButton: boolean;
|
|
10
|
-
deleteButton: 'none' | 'currentRow' | 'selection';
|
|
11
|
-
actions: IComponentRender[];
|
|
12
|
-
showEditButtons: boolean;
|
|
13
|
-
filterButton: boolean;
|
|
14
|
-
showSearch: boolean;
|
|
15
|
-
columnFilterButton: boolean;
|
|
16
|
-
columnsButton: boolean;
|
|
17
|
-
mainGrid: boolean;
|
|
18
|
-
columnsButtonIgnore: string[];
|
|
19
|
-
showHideButton: boolean;
|
|
20
|
-
events: ITekGridEvents;
|
|
21
|
-
/**
|
|
22
|
-
* Enables column dragging
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
dragColumns: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Components that will be rendered on toolbar slot
|
|
28
|
-
*/
|
|
29
|
-
toolbarConfig: (IComponentRender | string)[];
|
|
30
|
-
/**
|
|
31
|
-
* Enables column resizing
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
resizeColumns: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Enables layout saving
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
showLayoutOptions: boolean;
|
|
40
|
-
xlsDefaultType?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Editable columns
|
|
43
|
-
*/
|
|
44
|
-
columns: TekGridColumn[];
|
|
45
|
-
modalFilterProps: IModalFilterProps;
|
|
46
|
-
/**
|
|
47
|
-
* Show export button
|
|
48
|
-
*/
|
|
49
|
-
showExport: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Show refresh button
|
|
52
|
-
*/
|
|
53
|
-
showReload: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Export config
|
|
56
|
-
*/
|
|
57
|
-
exportConfig: ITekGridExportConfig[];
|
|
58
|
-
/**
|
|
59
|
-
* Actions to overwrite the default export config
|
|
60
|
-
*/
|
|
61
|
-
exportActions?: IComponentRender[];
|
|
62
|
-
/**
|
|
63
|
-
* Groups should be opened by default after building
|
|
64
|
-
*/
|
|
65
|
-
groupsOpened: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Show Total summary
|
|
68
|
-
*/
|
|
69
|
-
showSummaryTotal: boolean;
|
|
70
|
-
groupColumnNames: string[];
|
|
71
|
-
summaryColumns: TekGridColumn[];
|
|
72
|
-
groupColumns: TekGridColumn[];
|
|
73
|
-
private toolbarSlotProps;
|
|
74
|
-
groupedData: IGroupedData[];
|
|
75
|
-
viewUpdateScrollData?: () => void;
|
|
76
|
-
private gridBase;
|
|
77
|
-
filterRelationsDatasource: Datasource;
|
|
78
|
-
filterOperationsDatasource: Datasource;
|
|
79
|
-
editNewRowsOnly: boolean;
|
|
80
|
-
protected keyShortcutKeyMapping: any;
|
|
81
|
-
showCheckboxAllFilter: boolean;
|
|
82
|
-
defaultFilter: IDictionary;
|
|
83
|
-
toolbarOpened: boolean;
|
|
84
|
-
reportTitle: string;
|
|
85
|
-
reportLabelFormatter?: LabelFormatter;
|
|
86
|
-
/**
|
|
87
|
-
* TekGrid class constructor
|
|
88
|
-
* @param props TekGrid properties
|
|
89
|
-
*/
|
|
90
|
-
constructor(props: ITekGrid);
|
|
91
|
-
protected getDatasourceDefaults(): {
|
|
92
|
-
lazyLoad: boolean;
|
|
93
|
-
};
|
|
94
|
-
private defaultLazy;
|
|
95
|
-
private getDefaultLazy;
|
|
96
|
-
onCreated(): void;
|
|
97
|
-
onMounted(element: HTMLElement): void;
|
|
98
|
-
onBeforeDestroy(): void;
|
|
99
|
-
protected focusSearchInput(): void;
|
|
100
|
-
get layoutOptions(): TekGridLayoutOptions | undefined;
|
|
101
|
-
protected instantiateCancelColumn(): TekGridColumn;
|
|
102
|
-
/**
|
|
103
|
-
* Get Grid columns objects
|
|
104
|
-
* @param columns Grid columns parameter
|
|
105
|
-
*/
|
|
106
|
-
protected getColumns(columns: ITekGridColumn[]): TekGridColumn[];
|
|
107
|
-
columnHasFilterData(column: TekGridColumn): boolean;
|
|
108
|
-
private buildReportGroups;
|
|
109
|
-
private buildReportAggregations;
|
|
110
|
-
getReport(type: string, portrait?: boolean, rowObj?: any): Promise<void>;
|
|
111
|
-
private groups;
|
|
112
|
-
private summary;
|
|
113
|
-
private originalDatasourceLoadAll?;
|
|
114
|
-
private originalDatasourceLimit?;
|
|
115
|
-
/**
|
|
116
|
-
* Tasks that should be finished before loading the grid data
|
|
117
|
-
*/
|
|
118
|
-
private tasksBeforeLoad;
|
|
119
|
-
registerTask(task: Promise<any>): void;
|
|
120
|
-
private request;
|
|
121
|
-
/**
|
|
122
|
-
* Loads grid data after resolving all tasks
|
|
123
|
-
*/
|
|
124
|
-
loadAfterTasks(): Promise<void | undefined>;
|
|
125
|
-
private initGrouping;
|
|
126
|
-
private buildGetFunction;
|
|
127
|
-
updateGrouping: (lazyLoad?: boolean) => void;
|
|
128
|
-
updateGroupedData(lazyLoad: boolean): Promise<void>;
|
|
129
|
-
/**
|
|
130
|
-
* It takes a flat array of data and groups it by the group columns specified in
|
|
131
|
-
* the grid.
|
|
132
|
-
*/
|
|
133
|
-
buildGroupedData(): void;
|
|
134
|
-
private initGroups;
|
|
135
|
-
private initSummaryColumns;
|
|
136
|
-
private addGroupHeader;
|
|
137
|
-
private addGroupFooters;
|
|
138
|
-
/**
|
|
139
|
-
* Creates a group footer, calculating its summary data
|
|
140
|
-
* @param group Group to which this footer is related
|
|
141
|
-
* @param groupIndex Index of the group
|
|
142
|
-
* @returns new group footer
|
|
143
|
-
*/
|
|
144
|
-
getGroupFooter(group: ITekGridGroup, groupIndex: number): ITekGridGroupFooter;
|
|
145
|
-
/**
|
|
146
|
-
* Gets all of the group headers that belong to the group at the specified index
|
|
147
|
-
* This method should be called only during the groups creation process because it depends on the
|
|
148
|
-
* group creation order (because it accesses lastGroupHeaderRow that changes during the creation process)
|
|
149
|
-
* @param groupIndex
|
|
150
|
-
* @returns
|
|
151
|
-
*/
|
|
152
|
-
private getGroupHeaders;
|
|
153
|
-
/**
|
|
154
|
-
* Updates all footers summary data and the summary total
|
|
155
|
-
*/
|
|
156
|
-
updateSummary(): void;
|
|
157
|
-
/**
|
|
158
|
-
* Takes a group footer and updates its summary data
|
|
159
|
-
*/
|
|
160
|
-
private updateGroupFooterSummary;
|
|
161
|
-
/**
|
|
162
|
-
* Updates the total summary data
|
|
163
|
-
*/
|
|
164
|
-
private updateSummaryTotal;
|
|
165
|
-
private resetFooterVariables;
|
|
166
|
-
private isUndefined;
|
|
167
|
-
private calcSummaryValues;
|
|
168
|
-
private calcSummary;
|
|
169
|
-
private getSummary;
|
|
170
|
-
private getSummaryData;
|
|
171
|
-
openGroup(group: IDictionary<any>): void;
|
|
172
|
-
isItemVisible(row: IDictionary<any>): any;
|
|
173
|
-
private getGroupValue;
|
|
174
|
-
getEditedRows(revalidate?: boolean, silent?: boolean): {
|
|
175
|
-
[x: string]: any;
|
|
176
|
-
}[];
|
|
177
|
-
setSearch(search: string): Promise<any>;
|
|
178
|
-
isGrouped(): number | false;
|
|
179
|
-
navigateDown(params?: any): void;
|
|
180
|
-
navigateUp(params?: any): void;
|
|
181
|
-
directionalLeft(params: IEventParam<any>): void;
|
|
182
|
-
directionalRight(params: IEventParam<any>): void;
|
|
183
|
-
/**
|
|
184
|
-
* Dispatches row click event
|
|
185
|
-
* @param row Grid row
|
|
186
|
-
* @param event DOM event
|
|
187
|
-
* @param element DOM Element
|
|
188
|
-
*/
|
|
189
|
-
rowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
|
|
190
|
-
rowDoubleClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
|
|
191
|
-
/**
|
|
192
|
-
* Dispatches group row click event
|
|
193
|
-
* @param row Grid row
|
|
194
|
-
* @param event DOM event
|
|
195
|
-
* @param element DOM Element
|
|
196
|
-
*/
|
|
197
|
-
groupRowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
|
|
198
|
-
groupRowDoubleClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
|
|
199
|
-
/**
|
|
200
|
-
* Dispatches group select/unselect event
|
|
201
|
-
* @param row Group row
|
|
202
|
-
* @param isSelected Row is selected
|
|
203
|
-
* @param event DOM event
|
|
204
|
-
* @param element DOM Element
|
|
205
|
-
*/
|
|
206
|
-
selectGroupClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: HTMLElement): void;
|
|
207
|
-
getAtomInstance<T>(key: keyof ITekGridAtoms): T;
|
|
208
|
-
getFilterInputs(columnName?: string): Input[];
|
|
209
|
-
isColumnSearchable(column: TekGridColumn): boolean;
|
|
210
|
-
getColumn(name: string): TekGridColumn;
|
|
211
|
-
/**
|
|
212
|
-
* Adds new row to the datasource data and pushes it to the editedRows
|
|
213
|
-
* @param row Row
|
|
214
|
-
* @param position whether the new Row will be inserted at the beginning or end of the data array
|
|
215
|
-
*/
|
|
216
|
-
addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
|
|
217
|
-
/**
|
|
218
|
-
* Takes a row and adds it to the selected group (datasource.currentRow)
|
|
219
|
-
* @param row the new row to be added
|
|
220
|
-
* @param position the position, at the beginning of the group or at the end
|
|
221
|
-
*/
|
|
222
|
-
addToSelection(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
|
|
223
|
-
/**
|
|
224
|
-
* Adds a new row to the groupedData array
|
|
225
|
-
* @param row the new row to be added
|
|
226
|
-
* @param position the position, at the beginning of the group or at the end
|
|
227
|
-
*/
|
|
228
|
-
private addGroupedRow;
|
|
229
|
-
private findMissingGroups;
|
|
230
|
-
/**
|
|
231
|
-
* Finds the last group (most internal group) where a row should be inserted
|
|
232
|
-
* @param row to be inserted
|
|
233
|
-
* @returns the index and the group where the row should be inserted
|
|
234
|
-
*/
|
|
235
|
-
private findLastGroupingIndex;
|
|
236
|
-
/**
|
|
237
|
-
* Creates a group hierarchy for a new row, creating intermediate groups if needed
|
|
238
|
-
* @param row to be inserted
|
|
239
|
-
* @returns the index and the group where the row should be inserted
|
|
240
|
-
*/
|
|
241
|
-
private createGroupHierarchyForRow;
|
|
242
|
-
/**
|
|
243
|
-
* Adds a row to the children of a group
|
|
244
|
-
*/
|
|
245
|
-
private addRowToGroupChildren;
|
|
246
|
-
/**
|
|
247
|
-
* Checks if a row is a group header, adding typescript type-checking
|
|
248
|
-
*/
|
|
249
|
-
private isGroupHeader;
|
|
250
|
-
/**
|
|
251
|
-
* Checks if a row is a group footer, adding typescript type-checking
|
|
252
|
-
*/
|
|
253
|
-
private isGroupFooter;
|
|
254
|
-
/**
|
|
255
|
-
* Checks if a row is a summary, adding typescript type-checking
|
|
256
|
-
*/
|
|
257
|
-
private isGroupSummary;
|
|
258
|
-
/**
|
|
259
|
-
* Checks if a row is the last grouping of the grid (the most internal grouping)
|
|
260
|
-
*/
|
|
261
|
-
private isLastGrouping;
|
|
262
|
-
/**
|
|
263
|
-
* change event of editable components
|
|
264
|
-
* - override to call updateSummary on change
|
|
265
|
-
*/
|
|
266
|
-
protected changeEditableComponent(column: GridColumnEditable, row: IDictionary<any>, value: any, component?: Input): void;
|
|
267
|
-
}
|