@zeedhi/common 1.118.0 → 1.120.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/types/components/index.d.ts +151 -0
- package/dist/types/components/zd-alert/alert.d.ts +94 -0
- package/dist/types/components/zd-alert/interfaces.d.ts +18 -0
- package/dist/types/components/zd-badge/badge.d.ts +28 -0
- package/dist/types/components/zd-badge/interfaces.d.ts +10 -0
- package/dist/types/components/zd-breadcrumbs/breadcrumbs.d.ts +32 -0
- package/dist/types/components/zd-breadcrumbs/interfaces.d.ts +24 -0
- package/dist/types/components/zd-button/button.d.ts +89 -0
- package/dist/types/components/zd-button/interfaces.d.ts +48 -0
- package/dist/types/components/zd-button-group/button-group.d.ts +67 -0
- package/dist/types/components/zd-button-group/interfaces.d.ts +25 -0
- package/dist/types/components/zd-card/card.d.ts +152 -0
- package/dist/types/components/zd-card/interfaces.d.ts +40 -0
- package/dist/types/components/zd-carousel/carousel.d.ts +163 -0
- package/dist/types/components/zd-carousel/interfaces.d.ts +49 -0
- package/dist/types/components/zd-checkbox/checkbox.d.ts +12 -0
- package/dist/types/components/zd-checkbox/interfaces.d.ts +5 -0
- package/dist/types/components/zd-checkbox-multiple/checkbox-multiple.d.ts +39 -0
- package/dist/types/components/zd-checkbox-multiple/interfaces.d.ts +13 -0
- package/dist/types/components/zd-chip/chip.d.ts +60 -0
- package/dist/types/components/zd-chip/interfaces.d.ts +18 -0
- package/dist/types/components/zd-code-viewer/code-viewer.d.ts +86 -0
- package/dist/types/components/zd-code-viewer/interfaces.d.ts +13 -0
- package/dist/types/components/zd-col/col.d.ts +33 -0
- package/dist/types/components/zd-col/interfaces.d.ts +15 -0
- package/dist/types/components/zd-collapse-card/collapse-card.d.ts +56 -0
- package/dist/types/components/zd-collapse-card/interfaces.d.ts +14 -0
- package/dist/types/components/zd-component/child-not-found.d.ts +6 -0
- package/dist/types/components/zd-component/component-render.d.ts +16 -0
- package/dist/types/components/zd-component/component.d.ts +120 -0
- package/dist/types/components/zd-component/interfaces.d.ts +74 -0
- package/dist/types/components/zd-container/container.d.ts +45 -0
- package/dist/types/components/zd-container/interfaces.d.ts +12 -0
- package/dist/types/components/zd-currency/currency.d.ts +12 -0
- package/dist/types/components/zd-currency/interfaces.d.ts +6 -0
- package/dist/types/components/zd-date-input/date-input.d.ts +152 -0
- package/dist/types/components/zd-date-input/interfaces.d.ts +27 -0
- package/dist/types/components/zd-date-range/date-range.d.ts +158 -0
- package/dist/types/components/zd-date-range/interfaces.d.ts +18 -0
- package/dist/types/components/zd-dialog/dialog.d.ts +76 -0
- package/dist/types/components/zd-dialog/interfaces.d.ts +13 -0
- package/dist/types/components/zd-divider/divider.d.ts +20 -0
- package/dist/types/components/zd-divider/interfaces.d.ts +8 -0
- package/dist/types/components/zd-dropdown/dropdown.d.ts +81 -0
- package/dist/types/components/zd-dropdown/interfaces.d.ts +23 -0
- package/dist/types/components/zd-footer/footer.d.ts +80 -0
- package/dist/types/components/zd-footer/interfaces.d.ts +26 -0
- package/dist/types/components/zd-form/form.d.ts +174 -0
- package/dist/types/components/zd-form/interfaces.d.ts +36 -0
- package/dist/types/components/zd-frame/frame.d.ts +81 -0
- package/dist/types/components/zd-frame/interfaces.d.ts +23 -0
- package/dist/types/components/zd-frame-page/frame-page.d.ts +14 -0
- package/dist/types/components/zd-frame-page/interfaces.d.ts +4 -0
- package/dist/types/components/zd-grid/data-navigator.d.ts +12 -0
- package/dist/types/components/zd-grid/data-selector.d.ts +25 -0
- package/dist/types/components/zd-grid/grid-column.d.ts +47 -0
- package/dist/types/components/zd-grid/grid-events.d.ts +26 -0
- package/dist/types/components/zd-grid/grid.d.ts +85 -0
- package/dist/types/components/zd-grid/index.d.ts +11 -0
- package/dist/types/components/zd-grid/interfaces.d.ts +148 -0
- package/dist/types/components/zd-grid/iterable-table.d.ts +28 -0
- package/dist/types/components/zd-grid/keymap-merger.d.ts +26 -0
- package/dist/types/components/zd-grid/keymap-navigation.d.ts +6 -0
- package/dist/types/components/zd-grid/table-action-builder.d.ts +19 -0
- package/dist/types/components/zd-grid/view-navigator.d.ts +10 -0
- package/dist/types/components/zd-grid-editable/data-editor-with-add.d.ts +35 -0
- package/dist/types/components/zd-grid-editable/data-editor.d.ts +64 -0
- package/dist/types/components/zd-grid-editable/errors/index.d.ts +2 -0
- package/dist/types/components/zd-grid-editable/errors/not-editing.d.ts +6 -0
- package/dist/types/components/zd-grid-editable/errors/row-not-found.d.ts +6 -0
- package/dist/types/components/zd-grid-editable/grid-column-editable.d.ts +9 -0
- package/dist/types/components/zd-grid-editable/grid-editable-controller.d.ts +8 -0
- package/dist/types/components/zd-grid-editable/grid-editable-events.d.ts +32 -0
- package/dist/types/components/zd-grid-editable/grid-editable.d.ts +124 -0
- package/dist/types/components/zd-grid-editable/index.d.ts +8 -0
- package/dist/types/components/zd-grid-editable/interfaces.d.ts +66 -0
- package/dist/types/components/zd-grid-editable/keymap-editing.d.ts +7 -0
- package/dist/types/components/zd-header/header.d.ts +94 -0
- package/dist/types/components/zd-header/interfaces.d.ts +29 -0
- package/dist/types/components/zd-icon/icon.d.ts +55 -0
- package/dist/types/components/zd-icon/interfaces.d.ts +13 -0
- package/dist/types/components/zd-image/image.d.ts +73 -0
- package/dist/types/components/zd-image/interfaces.d.ts +17 -0
- package/dist/types/components/zd-increment/increment.d.ts +56 -0
- package/dist/types/components/zd-increment/interfaces.d.ts +9 -0
- package/dist/types/components/zd-input/input-factory.d.ts +6 -0
- package/dist/types/components/zd-input/input.d.ts +223 -0
- package/dist/types/components/zd-input/interfaces.d.ts +38 -0
- package/dist/types/components/zd-iterable/column-not-found.d.ts +6 -0
- package/dist/types/components/zd-iterable/column.d.ts +78 -0
- package/dist/types/components/zd-iterable/conditions-manager.d.ts +49 -0
- package/dist/types/components/zd-iterable/interfaces.d.ts +103 -0
- package/dist/types/components/zd-iterable/iterable-columns-button-controller.d.ts +9 -0
- package/dist/types/components/zd-iterable/iterable-columns-button.d.ts +35 -0
- package/dist/types/components/zd-iterable/iterable-controller.d.ts +8 -0
- package/dist/types/components/zd-iterable/iterable-page-component.d.ts +27 -0
- package/dist/types/components/zd-iterable/iterable-page-info.d.ts +7 -0
- package/dist/types/components/zd-iterable/iterable-page-size.d.ts +62 -0
- package/dist/types/components/zd-iterable/iterable-pagination.d.ts +28 -0
- package/dist/types/components/zd-iterable/iterable.d.ts +77 -0
- package/dist/types/components/zd-iterable/search.d.ts +31 -0
- package/dist/types/components/zd-iterable-component-render/interfaces.d.ts +34 -0
- package/dist/types/components/zd-iterable-component-render/iterable-component-render.d.ts +84 -0
- package/dist/types/components/zd-layout/interfaces.d.ts +7 -0
- package/dist/types/components/zd-layout/layout.d.ts +9 -0
- package/dist/types/components/zd-list/interfaces.d.ts +44 -0
- package/dist/types/components/zd-list/item-not-found.d.ts +6 -0
- package/dist/types/components/zd-list/list-group.d.ts +30 -0
- package/dist/types/components/zd-list/list-item.d.ts +46 -0
- package/dist/types/components/zd-list/list.d.ts +81 -0
- package/dist/types/components/zd-loading/interfaces.d.ts +7 -0
- package/dist/types/components/zd-loading/loading.d.ts +21 -0
- package/dist/types/components/zd-login/interfaces.d.ts +25 -0
- package/dist/types/components/zd-login/login-button.d.ts +50 -0
- package/dist/types/components/zd-login/login.d.ts +54 -0
- package/dist/types/components/zd-main/interfaces.d.ts +5 -0
- package/dist/types/components/zd-main/main.d.ts +7 -0
- package/dist/types/components/zd-master-detail/detail-not-found.d.ts +7 -0
- package/dist/types/components/zd-master-detail/interfaces.d.ts +10 -0
- package/dist/types/components/zd-master-detail/master-detail.d.ts +18 -0
- package/dist/types/components/zd-master-detail/master-not-found.d.ts +7 -0
- package/dist/types/components/zd-menu/interfaces.d.ts +68 -0
- package/dist/types/components/zd-menu/menu-button.d.ts +29 -0
- package/dist/types/components/zd-menu/menu-group.d.ts +61 -0
- package/dist/types/components/zd-menu/menu-link.d.ts +50 -0
- package/dist/types/components/zd-menu/menu-separator.d.ts +7 -0
- package/dist/types/components/zd-menu/menu.d.ts +199 -0
- package/dist/types/components/zd-modal/interfaces.d.ts +35 -0
- package/dist/types/components/zd-modal/modal-close-button.d.ts +28 -0
- package/dist/types/components/zd-modal/modal.d.ts +53 -0
- package/dist/types/components/zd-month/interfaces.d.ts +6 -0
- package/dist/types/components/zd-month/month.d.ts +33 -0
- package/dist/types/components/zd-number-input/interfaces.d.ts +8 -0
- package/dist/types/components/zd-number-input/number-input.d.ts +43 -0
- package/dist/types/components/zd-password/interfaces.d.ts +6 -0
- package/dist/types/components/zd-password/password.d.ts +17 -0
- package/dist/types/components/zd-progress/interfaces.d.ts +10 -0
- package/dist/types/components/zd-progress/progress.d.ts +41 -0
- package/dist/types/components/zd-radio/interfaces.d.ts +11 -0
- package/dist/types/components/zd-radio/radio.d.ts +35 -0
- package/dist/types/components/zd-row/interfaces.d.ts +13 -0
- package/dist/types/components/zd-row/row.d.ts +39 -0
- package/dist/types/components/zd-select/interfaces.d.ts +24 -0
- package/dist/types/components/zd-select/select.d.ts +238 -0
- package/dist/types/components/zd-select-multiple/interfaces.d.ts +18 -0
- package/dist/types/components/zd-select-multiple/select-multiple.d.ts +113 -0
- package/dist/types/components/zd-svg-map/interfaces.d.ts +26 -0
- package/dist/types/components/zd-svg-map/svg-map.d.ts +35 -0
- package/dist/types/components/zd-switch/interfaces.d.ts +7 -0
- package/dist/types/components/zd-switch/switch.d.ts +16 -0
- package/dist/types/components/zd-table/interfaces.d.ts +25 -0
- package/dist/types/components/zd-table/table.d.ts +42 -0
- package/dist/types/components/zd-tabs/interfaces.d.ts +40 -0
- package/dist/types/components/zd-tabs/tab-not-found.d.ts +11 -0
- package/dist/types/components/zd-tabs/tab.d.ts +57 -0
- package/dist/types/components/zd-tabs/tabs.d.ts +86 -0
- package/dist/types/components/zd-tag/interfaces.d.ts +7 -0
- package/dist/types/components/zd-tag/tag.d.ts +13 -0
- package/dist/types/components/zd-text/interfaces.d.ts +9 -0
- package/dist/types/components/zd-text/text.d.ts +8 -0
- package/dist/types/components/zd-text-input/interfaces.d.ts +23 -0
- package/dist/types/components/zd-text-input/text-input.d.ts +91 -0
- package/dist/types/components/zd-textarea/interfaces.d.ts +21 -0
- package/dist/types/components/zd-textarea/textarea.d.ts +71 -0
- package/dist/types/components/zd-time/interfaces.d.ts +22 -0
- package/dist/types/components/zd-time/time-format-selector.d.ts +8 -0
- package/dist/types/components/zd-time/time.d.ts +149 -0
- package/dist/types/components/zd-toggleable/interfaces.d.ts +6 -0
- package/dist/types/components/zd-toggleable/toggleable.d.ts +21 -0
- package/dist/types/components/zd-tooltip/interfaces.d.ts +18 -0
- package/dist/types/components/zd-tooltip/tooltip.d.ts +57 -0
- package/dist/types/components/zd-tree/interfaces.d.ts +107 -0
- package/dist/types/components/zd-tree/tree.d.ts +161 -0
- package/dist/types/components/zd-tree-grid/index.d.ts +6 -0
- package/dist/types/components/zd-tree-grid/interfaces.d.ts +35 -0
- package/dist/types/components/zd-tree-grid/iterable-tree.d.ts +10 -0
- package/dist/types/components/zd-tree-grid/keymap-tree.d.ts +7 -0
- package/dist/types/components/zd-tree-grid/tree-data-navigator.d.ts +10 -0
- package/dist/types/components/zd-tree-grid/tree-data-selector.d.ts +18 -0
- package/dist/types/components/zd-tree-grid/tree-grid.d.ts +119 -0
- package/dist/types/error/delete-rows.d.ts +7 -0
- package/dist/types/error/index.d.ts +3 -0
- package/dist/types/error/non-initialized.d.ts +7 -0
- package/dist/types/error/zeedhi-error.d.ts +6 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/services/index.d.ts +4 -0
- package/dist/types/services/zd-alert/alert-queue.d.ts +13 -0
- package/dist/types/services/zd-alert/alert-replace.d.ts +18 -0
- package/dist/types/services/zd-alert/alert-service.d.ts +45 -0
- package/dist/types/services/zd-alert/alert-stack.d.ts +9 -0
- package/dist/types/services/zd-alert/index.d.ts +5 -0
- package/dist/types/services/zd-alert/interfaces.d.ts +6 -0
- package/dist/types/services/zd-dialog/dialog-service.d.ts +24 -0
- package/dist/types/services/zd-loading/loading-service.d.ts +17 -0
- package/dist/types/services/zd-modal/modal-service.d.ts +39 -0
- package/dist/types/utils/data-value-out/data-value-out.d.ts +5 -0
- package/dist/types/utils/data-value-out/index.d.ts +2 -0
- package/dist/types/utils/data-value-out/interfaces.d.ts +8 -0
- package/dist/types/utils/datasource-searcher/datasource-searcher.d.ts +6 -0
- package/dist/types/utils/datasource-searcher/index.d.ts +2 -0
- package/dist/types/utils/datasource-searcher/interfaces.d.ts +5 -0
- package/dist/types/utils/icons/icons.d.ts +24 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/omit/omit.d.ts +11 -0
- package/dist/types/utils/theme/theme.d.ts +34 -0
- package/dist/types/utils/tree-data-structure/index.d.ts +2 -0
- package/dist/types/utils/tree-data-structure/interfaces.d.ts +30 -0
- package/dist/types/utils/tree-data-structure/tree-data-structure.d.ts +155 -0
- package/dist/types/utils/unique-by/unique-by.d.ts +3 -0
- package/dist/zd-common.esm.js +87 -24
- package/dist/zd-common.js +13133 -0
- package/dist/zd-common.min.js +13133 -0
- package/dist/zd-common.umd.js +87 -24
- package/package.json +2 -2
- package/types/components/zd-apex-chart/apex-chart.d.ts +1 -1
- package/types/components/zd-apex-chart/interfaces.d.ts +1 -1
- package/types/components/zd-card/card.d.ts +1 -1
- package/types/components/zd-card/interfaces.d.ts +1 -1
- package/types/components/zd-carousel/carousel.d.ts +1 -1
- package/types/components/zd-carousel/interfaces.d.ts +1 -1
- package/types/components/zd-code-editor/code-editor.d.ts +1 -1
- package/types/components/zd-code-editor/interfaces.d.ts +1 -1
- package/types/components/zd-col/col.d.ts +1 -1
- package/types/components/zd-col/interfaces.d.ts +1 -1
- package/types/components/zd-container/container.d.ts +1 -1
- package/types/components/zd-container/interfaces.d.ts +1 -1
- package/types/components/zd-dashboard/dashboard.d.ts +1 -1
- package/types/components/zd-dashboard/interfaces.d.ts +1 -1
- package/types/components/zd-date/date-range.d.ts +24 -4
- package/types/components/zd-form/form.d.ts +1 -1
- package/types/components/zd-form/interfaces.d.ts +1 -1
- package/types/components/zd-frame/frame.d.ts +1 -1
- package/types/components/zd-frame/interfaces.d.ts +1 -1
- package/types/components/zd-grid/grid.d.ts +1 -1
- package/types/components/zd-grid/interfaces.d.ts +1 -1
- package/types/components/zd-image/image.d.ts +1 -1
- package/types/components/zd-image/interfaces.d.ts +1 -1
- package/types/components/zd-iterable-component-render/interfaces.d.ts +1 -1
- package/types/components/zd-iterable-component-render/iterable-component-render.d.ts +1 -1
- package/types/components/zd-list/interfaces.d.ts +1 -1
- package/types/components/zd-list/list.d.ts +1 -1
- package/types/components/zd-master-detail/interfaces.d.ts +1 -1
- package/types/components/zd-master-detail/master-detail.d.ts +1 -1
- package/types/components/zd-row/interfaces.d.ts +1 -1
- package/types/components/zd-row/row.d.ts +1 -1
- package/types/components/zd-selectable-list/interfaces.d.ts +1 -1
- package/types/components/zd-selectable-list/selectable-list.d.ts +1 -1
- package/types/components/zd-table/interfaces.d.ts +1 -1
- package/types/components/zd-table/table.d.ts +1 -1
- package/types/components/zd-tabs/interfaces.d.ts +1 -1
- package/types/components/zd-tabs/tabs.d.ts +1 -1
- package/types/components/zd-textarea/interfaces.d.ts +1 -1
- package/types/components/zd-textarea/textarea.d.ts +1 -1
- package/types/components/zd-tooltip/interfaces.d.ts +1 -0
- package/types/components/zd-tooltip/tooltip.d.ts +4 -0
- package/types/components/zd-tree/interfaces.d.ts +1 -1
- package/types/components/zd-tree/tree.d.ts +1 -1
- package/types/services/zd-json-cache/json-cache-service.d.ts +0 -12
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { EventDef, IComponentEvents, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Form } from './form';
|
|
4
|
+
export type IFormEvent = IEventParam<Form>;
|
|
5
|
+
export interface IFormEvents extends IComponentEvents<IFormEvent> {
|
|
6
|
+
submit?: EventDef<IFormEvent>;
|
|
7
|
+
}
|
|
8
|
+
export interface IFormGrid {
|
|
9
|
+
cols?: string;
|
|
10
|
+
lg?: string;
|
|
11
|
+
md?: string;
|
|
12
|
+
sm?: string;
|
|
13
|
+
xl?: string;
|
|
14
|
+
xxl?: string;
|
|
15
|
+
offset?: string;
|
|
16
|
+
'offset-lg'?: string;
|
|
17
|
+
'offset-md'?: string;
|
|
18
|
+
'offset-sm'?: string;
|
|
19
|
+
'offset-xl'?: string;
|
|
20
|
+
'offset-xxl'?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IFormComponent extends IComponentRender {
|
|
23
|
+
grid?: IFormGrid;
|
|
24
|
+
}
|
|
25
|
+
export interface IForm extends IComponentRender {
|
|
26
|
+
align?: string;
|
|
27
|
+
justify?: string;
|
|
28
|
+
height?: number | string;
|
|
29
|
+
maxHeight?: number | string;
|
|
30
|
+
minHeight?: number | string;
|
|
31
|
+
width?: number | string;
|
|
32
|
+
maxWidth?: number | string;
|
|
33
|
+
minWidth?: number | string;
|
|
34
|
+
children?: IFormComponent[];
|
|
35
|
+
events?: IFormEvents;
|
|
36
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
3
|
+
import { IFrame, IFrameEvents } from './interfaces';
|
|
4
|
+
export declare class Frame extends ComponentRender implements IFrame {
|
|
5
|
+
loading: boolean;
|
|
6
|
+
local: boolean;
|
|
7
|
+
metadata: object;
|
|
8
|
+
override: object;
|
|
9
|
+
params: object;
|
|
10
|
+
overrideNamedProps: IDictionary;
|
|
11
|
+
path: string;
|
|
12
|
+
cache: boolean;
|
|
13
|
+
JSONCache: boolean | string;
|
|
14
|
+
events: IFrameEvents;
|
|
15
|
+
cacheDuration: number;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the component height. Possible values for this property can be
|
|
18
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
19
|
+
*/
|
|
20
|
+
height: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the component min height. Possible values for this property can be
|
|
23
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
24
|
+
*/
|
|
25
|
+
minHeight: string | number;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the component max height. Possible values for this property can be
|
|
28
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
29
|
+
*/
|
|
30
|
+
maxHeight: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* Defines the component width. Possible values for this property can be
|
|
33
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
34
|
+
*/
|
|
35
|
+
width: string | number;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the component min width. Possible values for this property can be
|
|
38
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
39
|
+
*/
|
|
40
|
+
minWidth: string | number;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the component max height. Possible values for this property can be
|
|
43
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
44
|
+
*/
|
|
45
|
+
maxWidth: string | number;
|
|
46
|
+
type: string;
|
|
47
|
+
private readonly headerName;
|
|
48
|
+
private static readonly cacheName;
|
|
49
|
+
protected resolveLoad?: (value: object) => void;
|
|
50
|
+
protected rejectLoad?: (reason?: any) => void;
|
|
51
|
+
constructor(props: IFrame);
|
|
52
|
+
onCreated(): void;
|
|
53
|
+
overrideNamedPropsFunc(metadata: object): any;
|
|
54
|
+
reload(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Triggered when frame is load.
|
|
57
|
+
* @param event
|
|
58
|
+
* @param element
|
|
59
|
+
*/
|
|
60
|
+
afterLoad(event?: Event, element?: HTMLElement): void;
|
|
61
|
+
/**
|
|
62
|
+
* Deletes all frame cached requests
|
|
63
|
+
*/
|
|
64
|
+
static deleteCache(): Promise<boolean>;
|
|
65
|
+
waitLoading(): Promise<object>;
|
|
66
|
+
protected notFoundError(e: unknown): void;
|
|
67
|
+
private getMetadata;
|
|
68
|
+
private requestPage;
|
|
69
|
+
/**
|
|
70
|
+
* Checks if cache response is valid (not expired yet)
|
|
71
|
+
* @param response
|
|
72
|
+
*/
|
|
73
|
+
private isValid;
|
|
74
|
+
/**
|
|
75
|
+
* Puts the metadata in defined cache with defined url
|
|
76
|
+
* @param cache Cache object in which data will be stored
|
|
77
|
+
* @param url Metadata url
|
|
78
|
+
* @param metadata Metadata to be stored
|
|
79
|
+
*/
|
|
80
|
+
private putCache;
|
|
81
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IDictionary, IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { EventDef, IComponentEvents, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Frame } from './frame';
|
|
4
|
+
export type IFrameEvent = IEventParam<Frame>;
|
|
5
|
+
export interface IFrameEvents<T = IFrameEvent> extends IComponentEvents<T> {
|
|
6
|
+
onAfterLoad?: EventDef<T>;
|
|
7
|
+
}
|
|
8
|
+
export interface IFrame extends IComponentRender {
|
|
9
|
+
path: string;
|
|
10
|
+
local?: boolean;
|
|
11
|
+
override?: object;
|
|
12
|
+
overrideNamedProps?: IDictionary;
|
|
13
|
+
cache?: boolean;
|
|
14
|
+
JSONCache?: boolean | string;
|
|
15
|
+
cacheDuration?: number;
|
|
16
|
+
height?: number | string;
|
|
17
|
+
maxHeight?: number | string;
|
|
18
|
+
minHeight?: number | string;
|
|
19
|
+
width?: number | string;
|
|
20
|
+
maxWidth?: number | string;
|
|
21
|
+
minWidth?: number | string;
|
|
22
|
+
type?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Frame } from '../zd-frame/frame';
|
|
2
|
+
import { IFramePage } from './interfaces';
|
|
3
|
+
export declare class FramePage extends Frame implements IFramePage {
|
|
4
|
+
/**
|
|
5
|
+
* Set "NotFound" to the frame
|
|
6
|
+
*/
|
|
7
|
+
notFoundRoute: string;
|
|
8
|
+
constructor(props: IFramePage);
|
|
9
|
+
/**
|
|
10
|
+
* Triggered before the component is destroyed.
|
|
11
|
+
*/
|
|
12
|
+
onBeforeDestroy(): void;
|
|
13
|
+
protected notFoundError(e: unknown): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Direction, IDataNavigator, IGrid, IIterableTable } from './interfaces';
|
|
2
|
+
export declare class DataNavigator implements IDataNavigator {
|
|
3
|
+
protected iterable: IGrid & IIterableTable;
|
|
4
|
+
constructor(iterable: IGrid & IIterableTable);
|
|
5
|
+
navigateDatasource(direction: Direction): void;
|
|
6
|
+
private navigateFirst;
|
|
7
|
+
private navigateLast;
|
|
8
|
+
private navigateInitial;
|
|
9
|
+
navigatePageDown(): void;
|
|
10
|
+
navigatePageUp(): void;
|
|
11
|
+
private navigateCurrentRow;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { IDataSelector, IGrid } from './interfaces';
|
|
3
|
+
export declare class DataSelector implements IDataSelector {
|
|
4
|
+
protected iterable: IGrid;
|
|
5
|
+
constructor(iterable: IGrid);
|
|
6
|
+
selectAll(isSelected: boolean): void;
|
|
7
|
+
toggleRow(row: IDictionary): void;
|
|
8
|
+
selectRow(row: IDictionary, select: boolean): void;
|
|
9
|
+
callDisableSelection(row: IDictionary<any>): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Dispatches select/unselect event
|
|
12
|
+
* @param row Grid row
|
|
13
|
+
* @param isSelected Row is selected
|
|
14
|
+
* @param event DOM event
|
|
15
|
+
* @param element DOM Element
|
|
16
|
+
*/
|
|
17
|
+
selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Dispatches select/unselect all rows event
|
|
20
|
+
* @param isSelected Row is selected
|
|
21
|
+
* @param event DOM event
|
|
22
|
+
* @param element DOM Element
|
|
23
|
+
*/
|
|
24
|
+
selectAllClick(isSelected: boolean, event: Event, element: any): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { Column } from '../zd-iterable/column';
|
|
3
|
+
import { IChildrenActionColumn, IGridColumn } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Grid column
|
|
6
|
+
*/
|
|
7
|
+
export declare class GridColumn extends Column implements IGridColumn {
|
|
8
|
+
children: IChildrenActionColumn[];
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new Grid Column.
|
|
11
|
+
* @param props Grid column properties
|
|
12
|
+
*/
|
|
13
|
+
constructor(props: IGridColumn);
|
|
14
|
+
/**
|
|
15
|
+
* Children props without grid system.
|
|
16
|
+
*/
|
|
17
|
+
get childrenProps(): {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
allowDuplicate?: boolean | undefined;
|
|
20
|
+
autofocus?: boolean | undefined;
|
|
21
|
+
children?: import("..").IComponent[] | undefined;
|
|
22
|
+
componentId?: number | undefined;
|
|
23
|
+
cssClass?: string | undefined;
|
|
24
|
+
cssStyle?: string | IDictionary<any> | undefined;
|
|
25
|
+
events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
26
|
+
directives?: import("..").IComponentDirectives | undefined;
|
|
27
|
+
isVisible?: string | boolean | undefined;
|
|
28
|
+
dark?: boolean | undefined;
|
|
29
|
+
light?: boolean | undefined;
|
|
30
|
+
theme?: string | undefined;
|
|
31
|
+
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
32
|
+
name: string;
|
|
33
|
+
parent?: import("..").IComponentInstance | undefined;
|
|
34
|
+
tabStop?: boolean | undefined;
|
|
35
|
+
userProperties?: IDictionary<any> | undefined;
|
|
36
|
+
fillHeight?: boolean | undefined;
|
|
37
|
+
}[];
|
|
38
|
+
/**
|
|
39
|
+
* Get the Column without the conditions object
|
|
40
|
+
* @param component Column component
|
|
41
|
+
*/
|
|
42
|
+
getColumnWithoutConditions(component: any): any;
|
|
43
|
+
/**
|
|
44
|
+
* checkOutValues
|
|
45
|
+
*/
|
|
46
|
+
checkOutValues(component: any, row: IDictionary<any>, newRow: IDictionary<any>): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { GridColumn } from './grid-column';
|
|
3
|
+
import { IGrid, IGridEvents } from './interfaces';
|
|
4
|
+
export declare class GridEvents implements IGridEvents {
|
|
5
|
+
protected iterable: IGrid;
|
|
6
|
+
/**
|
|
7
|
+
* Flag to prevent row click
|
|
8
|
+
*/
|
|
9
|
+
protected preventRowClick: boolean;
|
|
10
|
+
constructor(iterable: IGrid);
|
|
11
|
+
/**
|
|
12
|
+
* Dispatches row click event
|
|
13
|
+
* @param row Grid row
|
|
14
|
+
* @param event DOM event
|
|
15
|
+
* @param element DOM Element
|
|
16
|
+
*/
|
|
17
|
+
rowClick(row: IDictionary<any>, event: Event, element: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Dispatches cell click Event
|
|
20
|
+
* @param row Grid row
|
|
21
|
+
* @param column Grid column
|
|
22
|
+
* @param event DOM event
|
|
23
|
+
* @param element DOM Element
|
|
24
|
+
*/
|
|
25
|
+
cellClick(row: IDictionary<any>, column: GridColumn, event: Event, element: any): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { IDictionary, IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IComponent, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Iterable } from '../zd-iterable/iterable';
|
|
4
|
+
import { GridColumn } from './grid-column';
|
|
5
|
+
import { Direction, IGrid, IGridColumn, IGridEvents, IGridProps, VerticalDirection } from './interfaces';
|
|
6
|
+
export declare class Grid extends Iterable<GridColumn> implements IGrid, IGridEvents {
|
|
7
|
+
private tableActionBuilder;
|
|
8
|
+
private iterableTable;
|
|
9
|
+
private dataSelector;
|
|
10
|
+
private gridEvents;
|
|
11
|
+
private dataNavigator;
|
|
12
|
+
private viewNavigator;
|
|
13
|
+
private keyMapMerger;
|
|
14
|
+
currentColumn: GridColumn | null;
|
|
15
|
+
selectedRows: IDictionary<any>[];
|
|
16
|
+
selectionState: {
|
|
17
|
+
allSelected: boolean;
|
|
18
|
+
except: IDictionary<any>[];
|
|
19
|
+
};
|
|
20
|
+
rowStyleConditions?: (row: IDictionary) => IDictionary;
|
|
21
|
+
selectAllPages: boolean;
|
|
22
|
+
selectable: boolean;
|
|
23
|
+
disableSelection?: (args: {
|
|
24
|
+
row: IDictionary<any>;
|
|
25
|
+
component: IGrid;
|
|
26
|
+
}) => boolean;
|
|
27
|
+
cellSelection: boolean;
|
|
28
|
+
toolbarSlot: IComponentRender[];
|
|
29
|
+
footerSlot: IComponentRender[];
|
|
30
|
+
noResultsText: string;
|
|
31
|
+
noResultSlot: IComponentRender[];
|
|
32
|
+
errorSlot: IComponentRender[];
|
|
33
|
+
dense: boolean;
|
|
34
|
+
dragColumns: boolean;
|
|
35
|
+
headerBackground: string;
|
|
36
|
+
headerCellTextColor: string;
|
|
37
|
+
height: string | number;
|
|
38
|
+
loadingText: string;
|
|
39
|
+
maxHeight: string | number;
|
|
40
|
+
maxWidth: string | number;
|
|
41
|
+
minHeight: string | number;
|
|
42
|
+
minWidth: string | number;
|
|
43
|
+
noDataText: string;
|
|
44
|
+
noDataSlot: IComponentRender[];
|
|
45
|
+
resizeColumns: boolean;
|
|
46
|
+
showFooter: boolean;
|
|
47
|
+
showHeader: boolean;
|
|
48
|
+
showSelectAll: boolean;
|
|
49
|
+
width: string | number;
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
constructor(props: IGridProps);
|
|
52
|
+
getConditionalProps({ row, column }: {
|
|
53
|
+
row: IDictionary;
|
|
54
|
+
column: GridColumn;
|
|
55
|
+
}): Partial<IComponentRender>;
|
|
56
|
+
onMounted(element: HTMLElement): void;
|
|
57
|
+
onBeforeDestroy(): void;
|
|
58
|
+
navigatePageUp(): void;
|
|
59
|
+
navigatePageDown(): void;
|
|
60
|
+
setViewNavigate(viewNavigate: (direction: Direction, event?: Event) => void): void;
|
|
61
|
+
navigateLeft(params: IEventParam<any>): void;
|
|
62
|
+
navigateRight(params: IEventParam<any>): void;
|
|
63
|
+
navigateUp(): void;
|
|
64
|
+
navigateDown(): void;
|
|
65
|
+
navigateDatasource(direction: VerticalDirection): void;
|
|
66
|
+
createColumn(column: IGridColumn): GridColumn;
|
|
67
|
+
rowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
|
|
68
|
+
cellClick(row: IDictionary<any>, column: GridColumn, event: Event, element?: HTMLElement): void;
|
|
69
|
+
selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element?: HTMLElement): void;
|
|
70
|
+
selectAllClick(isSelected: boolean, event: Event, element?: HTMLElement): void;
|
|
71
|
+
selectAll(isSelected: boolean): void;
|
|
72
|
+
toggleRow(row: IDictionary): void;
|
|
73
|
+
selectRow(row: IDictionary, select: boolean): void;
|
|
74
|
+
callDisableSelection(row: IDictionary): boolean;
|
|
75
|
+
changeOrder(sortBy: {
|
|
76
|
+
key: string;
|
|
77
|
+
order: 'asc' | 'desc';
|
|
78
|
+
}[]): Promise<void>;
|
|
79
|
+
selectCell(row: IDictionary, column: GridColumn): void;
|
|
80
|
+
reapplyRowStyleConditions(row: IDictionary): IDictionary;
|
|
81
|
+
getRowStyleConditions(row: IDictionary): IDictionary;
|
|
82
|
+
deleteRows(): Promise<any[]>;
|
|
83
|
+
getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
|
|
84
|
+
changeData(data?: IDictionary<any>[]): void;
|
|
85
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './data-selector';
|
|
2
|
+
export * from './grid-column';
|
|
3
|
+
export * from './grid-events';
|
|
4
|
+
export * from './grid';
|
|
5
|
+
export * from './interfaces';
|
|
6
|
+
export * from './iterable-table';
|
|
7
|
+
export * from './table-action-builder';
|
|
8
|
+
export * from './keymap-navigation';
|
|
9
|
+
export * from './keymap-merger';
|
|
10
|
+
export * from './data-navigator';
|
|
11
|
+
export * from './view-navigator';
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { IDictionary, IEventParam, IKeyMap } from '@zeedhi/core';
|
|
2
|
+
import { EventDef, IComponent, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { IColumn, IIterable, IIterableEvents, IIterableProps } from '../zd-iterable/interfaces';
|
|
4
|
+
import { Grid } from './grid';
|
|
5
|
+
import { GridColumn } from './grid-column';
|
|
6
|
+
export interface IGridColumn extends IColumn {
|
|
7
|
+
children?: IChildrenActionColumn[];
|
|
8
|
+
}
|
|
9
|
+
export interface IChildrenActionColumn extends IComponent {
|
|
10
|
+
conditions?: IDictionary;
|
|
11
|
+
}
|
|
12
|
+
export interface ITableActionBuilder {
|
|
13
|
+
getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
|
|
14
|
+
}
|
|
15
|
+
export interface IIterableTable {
|
|
16
|
+
changeOrder(sortBy: {
|
|
17
|
+
key: string;
|
|
18
|
+
order: 'asc' | 'desc';
|
|
19
|
+
}[]): Promise<void>;
|
|
20
|
+
selectCell(row: IDictionary, column: GridColumn): void;
|
|
21
|
+
reapplyRowStyleConditions(row: IDictionary): IDictionary;
|
|
22
|
+
getRowStyleConditions(row: IDictionary): IDictionary;
|
|
23
|
+
deleteRows(): Promise<any[]>;
|
|
24
|
+
}
|
|
25
|
+
export interface IDataSelector {
|
|
26
|
+
selectAll(isSelected: boolean): void;
|
|
27
|
+
toggleRow(row: IDictionary): void;
|
|
28
|
+
selectRow(row: IDictionary, select: boolean): void;
|
|
29
|
+
callDisableSelection(row: IDictionary): boolean;
|
|
30
|
+
selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element?: HTMLElement): void;
|
|
31
|
+
selectAllClick(isSelected: boolean, event: Event, element?: HTMLElement): void;
|
|
32
|
+
}
|
|
33
|
+
export interface IGridEvents {
|
|
34
|
+
rowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
|
|
35
|
+
cellClick(row: IDictionary<any>, column: GridColumn, event: Event, element?: HTMLElement): void;
|
|
36
|
+
}
|
|
37
|
+
export type Direction = 'up' | 'down' | 'left' | 'right';
|
|
38
|
+
export type VerticalDirection = 'up' | 'down';
|
|
39
|
+
export interface IDataNavigator {
|
|
40
|
+
navigateDatasource(direction: VerticalDirection): void;
|
|
41
|
+
navigatePageUp(): void;
|
|
42
|
+
navigatePageDown(): void;
|
|
43
|
+
}
|
|
44
|
+
export interface IViewNavigator {
|
|
45
|
+
navigateLeft({ event }: IEventParam<any>): void;
|
|
46
|
+
navigateRight({ event }: IEventParam<any>): void;
|
|
47
|
+
navigateUp(): void;
|
|
48
|
+
navigateDown(): void;
|
|
49
|
+
setViewNavigate(viewNavigate: (direction: Direction, event?: Event) => void): void;
|
|
50
|
+
}
|
|
51
|
+
export interface IKeyMapConfig<T> {
|
|
52
|
+
getMap(instance: T): IKeyMap;
|
|
53
|
+
}
|
|
54
|
+
export interface IKeyMapMerger {
|
|
55
|
+
bind(element: HTMLElement): void;
|
|
56
|
+
unbind(): void;
|
|
57
|
+
}
|
|
58
|
+
export interface IGridEvent extends IEventParam<Grid> {
|
|
59
|
+
row: IDictionary;
|
|
60
|
+
column: IColumn;
|
|
61
|
+
}
|
|
62
|
+
export interface GridEventsProp<T = IGridEvent | IEventParam<any>> extends IIterableEvents<T> {
|
|
63
|
+
cellClick?: EventDef<T>;
|
|
64
|
+
rowClick?: EventDef<T>;
|
|
65
|
+
selected?: EventDef<T>;
|
|
66
|
+
selectedAll?: EventDef<T>;
|
|
67
|
+
unselected?: EventDef<T>;
|
|
68
|
+
unselectedAll?: EventDef<T>;
|
|
69
|
+
}
|
|
70
|
+
export interface IGridProps extends IIterableProps {
|
|
71
|
+
backgroundColor?: string;
|
|
72
|
+
cellSelection?: boolean;
|
|
73
|
+
dense?: boolean;
|
|
74
|
+
disableSelection?: (args: {
|
|
75
|
+
row: IDictionary<any>;
|
|
76
|
+
component: Grid;
|
|
77
|
+
}) => boolean;
|
|
78
|
+
dragColumns?: boolean;
|
|
79
|
+
errorSlot?: IComponentRender[];
|
|
80
|
+
events?: GridEventsProp;
|
|
81
|
+
fillHeight?: boolean;
|
|
82
|
+
footerSlot?: IComponentRender[];
|
|
83
|
+
headerBackground?: string;
|
|
84
|
+
headerCellTextColor?: string;
|
|
85
|
+
height?: number | string;
|
|
86
|
+
loadingText?: string;
|
|
87
|
+
maxHeight?: number | string;
|
|
88
|
+
maxWidth?: number | string;
|
|
89
|
+
minHeight?: number | string;
|
|
90
|
+
minWidth?: number | string;
|
|
91
|
+
noDataSlot?: IComponentRender[];
|
|
92
|
+
noDataText?: string;
|
|
93
|
+
noResultSlot?: IComponentRender[];
|
|
94
|
+
noResultsText?: string;
|
|
95
|
+
resizeColumns?: boolean;
|
|
96
|
+
rowStyleConditions?: (row: IDictionary) => IDictionary;
|
|
97
|
+
selectable?: boolean;
|
|
98
|
+
selectAllPages?: boolean;
|
|
99
|
+
showFooter?: boolean;
|
|
100
|
+
showHeader?: boolean;
|
|
101
|
+
showSelectAll?: boolean;
|
|
102
|
+
toolbarSlot?: IComponentRender[];
|
|
103
|
+
width?: number | string;
|
|
104
|
+
}
|
|
105
|
+
export interface IGrid<T = GridColumn> extends IIterable<T>, IIterableTable, IDataSelector, IDataNavigator, IViewNavigator, ITableActionBuilder {
|
|
106
|
+
backgroundColor: string;
|
|
107
|
+
cellSelection: boolean;
|
|
108
|
+
currentColumn: GridColumn | null;
|
|
109
|
+
dense: boolean;
|
|
110
|
+
disableSelection?: (args: {
|
|
111
|
+
row: IDictionary<any>;
|
|
112
|
+
component: IGrid;
|
|
113
|
+
}) => boolean;
|
|
114
|
+
dragColumns: boolean;
|
|
115
|
+
errorSlot: IComponentRender[];
|
|
116
|
+
events: GridEventsProp;
|
|
117
|
+
footerSlot: IComponentRender[];
|
|
118
|
+
headerBackground: string;
|
|
119
|
+
headerCellTextColor: string;
|
|
120
|
+
height: number | string;
|
|
121
|
+
loadingText: string;
|
|
122
|
+
maxHeight: number | string;
|
|
123
|
+
maxWidth: number | string;
|
|
124
|
+
minHeight: number | string;
|
|
125
|
+
minWidth: number | string;
|
|
126
|
+
noDataSlot: IComponentRender[];
|
|
127
|
+
noDataText: string;
|
|
128
|
+
noResultSlot: IComponentRender[];
|
|
129
|
+
noResultsText: string;
|
|
130
|
+
resizeColumns: boolean;
|
|
131
|
+
rowStyleConditions?: (row: IDictionary) => IDictionary;
|
|
132
|
+
selectable: boolean;
|
|
133
|
+
selectAllPages: boolean;
|
|
134
|
+
selectedRows: IDictionary[];
|
|
135
|
+
selectionState: {
|
|
136
|
+
allSelected: boolean;
|
|
137
|
+
except: IDictionary<any>[];
|
|
138
|
+
};
|
|
139
|
+
showFooter: boolean;
|
|
140
|
+
showHeader: boolean;
|
|
141
|
+
showSelectAll: boolean;
|
|
142
|
+
toolbarSlot: IComponentRender[];
|
|
143
|
+
width: number | string;
|
|
144
|
+
getConditionalProps({ row, column }: {
|
|
145
|
+
row: IDictionary;
|
|
146
|
+
column: T;
|
|
147
|
+
}): Partial<IComponentRender>;
|
|
148
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { GridColumn } from './grid-column';
|
|
3
|
+
import { IGrid, IIterableTable } from './interfaces';
|
|
4
|
+
export declare class IterableTable implements IIterableTable {
|
|
5
|
+
protected iterable: IGrid;
|
|
6
|
+
/**
|
|
7
|
+
* Available order types
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
orderTypes: {
|
|
11
|
+
asc: 'asc';
|
|
12
|
+
desc: 'desc';
|
|
13
|
+
};
|
|
14
|
+
constructor(iterable: IGrid);
|
|
15
|
+
/**
|
|
16
|
+
* Changes column order
|
|
17
|
+
* @async
|
|
18
|
+
*/
|
|
19
|
+
changeOrder(sortBy: {
|
|
20
|
+
key: string;
|
|
21
|
+
order: 'asc' | 'desc';
|
|
22
|
+
}[]): Promise<void>;
|
|
23
|
+
selectCell(row: IDictionary, column: GridColumn): void;
|
|
24
|
+
protected rowStyleConditions: Map<any, any>;
|
|
25
|
+
reapplyRowStyleConditions(row: IDictionary<any>): IDictionary<any>;
|
|
26
|
+
getRowStyleConditions(row: IDictionary): IDictionary;
|
|
27
|
+
deleteRows(): Promise<any[]>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from '../zd-component/component';
|
|
2
|
+
import { IKeyMapConfig, IKeyMapMerger } from './interfaces';
|
|
3
|
+
type ClassType<T> = {
|
|
4
|
+
new (): T;
|
|
5
|
+
};
|
|
6
|
+
type ConfigClassType = ClassType<IKeyMapConfig<Component>>;
|
|
7
|
+
/**
|
|
8
|
+
* This class' purpose is to allow merging multiple keyMap configurations
|
|
9
|
+
* into the same component instance and element
|
|
10
|
+
*
|
|
11
|
+
* Also allows users to overwrite the default keyMap by defining their own
|
|
12
|
+
* keymaps via component props
|
|
13
|
+
*/
|
|
14
|
+
export declare class KeyMapMerger implements IKeyMapMerger {
|
|
15
|
+
private instance;
|
|
16
|
+
private configs;
|
|
17
|
+
private map;
|
|
18
|
+
constructor(instance: Component, configs: ConfigClassType[]);
|
|
19
|
+
/**
|
|
20
|
+
* Filters keyMap to allow user to overwrite the default keyMapping
|
|
21
|
+
*/
|
|
22
|
+
private filterKeyMapping;
|
|
23
|
+
bind(element: HTMLElement): void;
|
|
24
|
+
unbind(): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IKeyMap } from '@zeedhi/core';
|
|
2
|
+
import { Component } from '../zd-component/component';
|
|
3
|
+
import { IDataNavigator, IKeyMapConfig, IViewNavigator } from './interfaces';
|
|
4
|
+
export declare class KeyMapNavigation implements IKeyMapConfig<IViewNavigator & IDataNavigator> {
|
|
5
|
+
getMap(instance: Component & IViewNavigator & IDataNavigator): IKeyMap;
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { Component } from '../zd-component/component';
|
|
3
|
+
import { IComponent } from '../zd-component/interfaces';
|
|
4
|
+
import { Iterable } from '../zd-iterable/iterable';
|
|
5
|
+
import { GridColumn } from './grid-column';
|
|
6
|
+
import { ITableActionBuilder } from './interfaces';
|
|
7
|
+
export declare class TableActionBuilder implements ITableActionBuilder {
|
|
8
|
+
protected iterable: Iterable;
|
|
9
|
+
constructor(iterable: Iterable);
|
|
10
|
+
getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
|
|
11
|
+
private setGridRowsInEvents;
|
|
12
|
+
private filterObject;
|
|
13
|
+
private deleteAccessorProps;
|
|
14
|
+
protected updateActionInstance(instanceName: string, newComponent: IComponent): Component<IComponent>;
|
|
15
|
+
protected getActionProps(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath: string): {
|
|
16
|
+
props: IComponent;
|
|
17
|
+
instance: Component<IComponent> | null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { Direction, IViewNavigator } from './interfaces';
|
|
3
|
+
export declare class ViewNavigator implements IViewNavigator {
|
|
4
|
+
protected viewNavigate: ((direction: Direction, event?: Event) => void) | null;
|
|
5
|
+
setViewNavigate(viewNavigate: (direction: Direction, event?: Event) => void): void;
|
|
6
|
+
navigateLeft({ event }: IEventParam<any>): void;
|
|
7
|
+
navigateRight({ event }: IEventParam<any>): void;
|
|
8
|
+
navigateUp(): void;
|
|
9
|
+
navigateDown(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { Input } from '../zd-input/input';
|
|
3
|
+
import { DataEditor } from './data-editor';
|
|
4
|
+
import { IDataEditorWithAdd, IGridColumnEditable, IGridEditable } from './interfaces';
|
|
5
|
+
export declare class DataEditorWithAdd extends DataEditor implements IDataEditorWithAdd {
|
|
6
|
+
private NEW_ROW_IDENTIFIER;
|
|
7
|
+
/**
|
|
8
|
+
* Rows with newRowIdentifier
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
private addedRows;
|
|
12
|
+
constructor(grid: IGridEditable);
|
|
13
|
+
addCancelColumn(): void;
|
|
14
|
+
getCancelColumnProps(): IGridColumnEditable;
|
|
15
|
+
createGridController(): void;
|
|
16
|
+
isAdded(row: IDictionary): boolean;
|
|
17
|
+
cancelAddedRow(key: string | number): Promise<any>;
|
|
18
|
+
cancelAddedRows(): Promise<void>;
|
|
19
|
+
getAddedRows(): IDictionary<any>[];
|
|
20
|
+
addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
|
|
21
|
+
changeEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, value: any, component?: Input): void;
|
|
22
|
+
private addDataRow;
|
|
23
|
+
/**
|
|
24
|
+
* Saves all edited rows if they are valid
|
|
25
|
+
* @param revalidate Defines if the fields should be revalidated
|
|
26
|
+
* @throws Will throw when it finds an invalid row
|
|
27
|
+
*/
|
|
28
|
+
saveEditedRows(revalidate?: boolean): Promise<void[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Cancels all edited rows and enable grid components
|
|
31
|
+
*/
|
|
32
|
+
cancelEditedRows(): Promise<void>;
|
|
33
|
+
protected omitInternals(editedRow: IDictionary): any;
|
|
34
|
+
reapplyCanEditRow(row: IDictionary<any>): void;
|
|
35
|
+
}
|