@zeedhi/common 1.120.4 → 1.120.5
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 +1 -1
- package/dist/zd-common.js +13133 -0
- package/dist/zd-common.min.js +13133 -0
- package/dist/zd-common.umd.js +1 -1
- package/package.json +2 -2
- package/types/services/zd-json-cache/json-cache-service.d.ts +0 -12
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { ITextInput } from '../zd-text-input/interfaces';
|
|
3
|
+
import { NumberInput } from './number-input';
|
|
4
|
+
export type INumberEvent = IEventParam<NumberInput>;
|
|
5
|
+
export interface INumberInput extends ITextInput {
|
|
6
|
+
mask?: any;
|
|
7
|
+
value?: number;
|
|
8
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TextInput } from '../zd-text-input/text-input';
|
|
2
|
+
import { INumberInput } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Number component
|
|
5
|
+
*/
|
|
6
|
+
export declare class NumberInput extends TextInput implements INumberInput {
|
|
7
|
+
mask: any;
|
|
8
|
+
protected defaultMask: any;
|
|
9
|
+
align: string;
|
|
10
|
+
/**
|
|
11
|
+
* AutoNumeric object
|
|
12
|
+
*/
|
|
13
|
+
autoNumericObj: any;
|
|
14
|
+
private formattedValue?;
|
|
15
|
+
private localValue?;
|
|
16
|
+
protected formatterFn: (...args: any) => any;
|
|
17
|
+
protected parserFn: (...args: any) => any;
|
|
18
|
+
private maskValid;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new number input
|
|
21
|
+
*/
|
|
22
|
+
constructor(props: INumberInput);
|
|
23
|
+
validateMask(): void;
|
|
24
|
+
get value(): any;
|
|
25
|
+
set value(value: any);
|
|
26
|
+
/**
|
|
27
|
+
* Input displayed value.
|
|
28
|
+
*/
|
|
29
|
+
get displayValue(): any;
|
|
30
|
+
set displayValue(value: any);
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a formatted value with mask
|
|
33
|
+
* @param value Any value
|
|
34
|
+
* @returns A Formatted value
|
|
35
|
+
*/
|
|
36
|
+
formatter(value: any): string;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves a parsed value without mask
|
|
39
|
+
* @param value Any value
|
|
40
|
+
* @returns A parsed value
|
|
41
|
+
*/
|
|
42
|
+
parser(value: any): any;
|
|
43
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TextInput } from '../zd-text-input/text-input';
|
|
2
|
+
import { IPassword } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Password component.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Password extends TextInput implements IPassword {
|
|
7
|
+
/**
|
|
8
|
+
* Sets password input type.
|
|
9
|
+
*/
|
|
10
|
+
type: string;
|
|
11
|
+
appendIcon: string;
|
|
12
|
+
onCreated(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Change password view
|
|
15
|
+
*/
|
|
16
|
+
toggleView(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
2
|
+
export interface IProgress extends IComponentRender {
|
|
3
|
+
backgroundColor?: string;
|
|
4
|
+
backgroundOpacity?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
centerSlot?: IComponentRender[];
|
|
9
|
+
value?: number | string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { IProgress } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Progress component
|
|
6
|
+
*/
|
|
7
|
+
export declare class Progress extends ComponentRender implements IProgress {
|
|
8
|
+
/**
|
|
9
|
+
* Set component's background color
|
|
10
|
+
*/
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
/**
|
|
13
|
+
* Set component's background opacity
|
|
14
|
+
*/
|
|
15
|
+
backgroundOpacity: string;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the value color
|
|
18
|
+
*/
|
|
19
|
+
color: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the height for the component
|
|
22
|
+
*/
|
|
23
|
+
height: number | string;
|
|
24
|
+
/**
|
|
25
|
+
* Animates the component constantly
|
|
26
|
+
*/
|
|
27
|
+
indeterminate: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Render components on the progress component
|
|
30
|
+
*/
|
|
31
|
+
centerSlot: IComponentRender[];
|
|
32
|
+
/**
|
|
33
|
+
* The percentage value for current progress
|
|
34
|
+
*/
|
|
35
|
+
value: number | string;
|
|
36
|
+
/**
|
|
37
|
+
* Create a new Progress
|
|
38
|
+
* @param props Progress definition
|
|
39
|
+
*/
|
|
40
|
+
constructor(props: IProgress);
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IDatasource, IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IInput } from '../zd-input/interfaces';
|
|
3
|
+
import { Radio } from './radio';
|
|
4
|
+
export type IRadioEvent = IEventParam<Radio>;
|
|
5
|
+
export interface IRadio extends IInput {
|
|
6
|
+
dataColor?: string;
|
|
7
|
+
dataLabel?: string;
|
|
8
|
+
datasource?: IDatasource;
|
|
9
|
+
dataValue?: string;
|
|
10
|
+
vertical?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IDatasource } from '@zeedhi/core';
|
|
2
|
+
import { Input } from '../zd-input/input';
|
|
3
|
+
import { IRadio } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Radio component.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Radio extends Input implements IRadio {
|
|
8
|
+
/**
|
|
9
|
+
* Field on datasource.data that will be used to set radio's color
|
|
10
|
+
*/
|
|
11
|
+
dataColor: string;
|
|
12
|
+
/**
|
|
13
|
+
* Field on datasource.data that will be used to set radio's label
|
|
14
|
+
*/
|
|
15
|
+
dataLabel: string;
|
|
16
|
+
/**
|
|
17
|
+
* Source of radio items
|
|
18
|
+
*/
|
|
19
|
+
datasource?: IDatasource;
|
|
20
|
+
/**
|
|
21
|
+
* Field on datasource.data that will be used to set radio's value
|
|
22
|
+
*/
|
|
23
|
+
dataValue: string;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the radio list direction
|
|
26
|
+
*/
|
|
27
|
+
vertical: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new Radio.
|
|
30
|
+
* @param props Radio properties
|
|
31
|
+
*/
|
|
32
|
+
constructor(props: IRadio);
|
|
33
|
+
onBeforeDestroy(): void;
|
|
34
|
+
onCreated(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Row } from './row';
|
|
4
|
+
export type IRowEvent = IEventParam<Row>;
|
|
5
|
+
export interface IRow extends IComponentRender {
|
|
6
|
+
align?: string;
|
|
7
|
+
dense?: boolean;
|
|
8
|
+
justify?: string;
|
|
9
|
+
noGutters?: boolean;
|
|
10
|
+
height?: number | string;
|
|
11
|
+
maxHeight?: number | string;
|
|
12
|
+
minHeight?: number | string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
2
|
+
import { IRow } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Row component.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Row extends ComponentRender implements IRow {
|
|
7
|
+
/**
|
|
8
|
+
* Applies the align-items css property.
|
|
9
|
+
* Available options are start, center, end, space-between, space-around and stretch.
|
|
10
|
+
*/
|
|
11
|
+
align?: string;
|
|
12
|
+
dense: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Applies the justify-content css property.
|
|
15
|
+
* Available options are start, center, end, space-between and space-around.
|
|
16
|
+
*/
|
|
17
|
+
justify?: string;
|
|
18
|
+
noGutters: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the component height. Possible values for this property can be
|
|
21
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
22
|
+
*/
|
|
23
|
+
height: string | number;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the component min height. Possible values for this property can be
|
|
26
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
27
|
+
*/
|
|
28
|
+
minHeight: string | number;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the component max height. Possible values for this property can be
|
|
31
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
32
|
+
*/
|
|
33
|
+
maxHeight: string | number;
|
|
34
|
+
/**
|
|
35
|
+
* Creates a new Row.
|
|
36
|
+
* @param props Row properties
|
|
37
|
+
*/
|
|
38
|
+
constructor(props: IRow);
|
|
39
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IDatasource } from '@zeedhi/core';
|
|
2
|
+
import { ISelectDataValueOut } from '../../utils';
|
|
3
|
+
import { SearchParam } from '../../utils/datasource-searcher/interfaces';
|
|
4
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
5
|
+
import { ITextInput } from '../zd-text-input/interfaces';
|
|
6
|
+
export interface ISelect extends ITextInput, ISelectDataValueOut {
|
|
7
|
+
autocomplete?: boolean;
|
|
8
|
+
autoSelection?: boolean;
|
|
9
|
+
datasource?: IDatasource;
|
|
10
|
+
dataText?: string | any[];
|
|
11
|
+
dataTextDiscrete?: string | any[];
|
|
12
|
+
dataTextSeparator?: string;
|
|
13
|
+
dataValue?: string;
|
|
14
|
+
dataDisabled?: string;
|
|
15
|
+
menuMaxHeight?: string | number;
|
|
16
|
+
menuMaxWidth?: string | number;
|
|
17
|
+
preventLoadOnFocus?: boolean;
|
|
18
|
+
returnObject?: boolean;
|
|
19
|
+
itemBeforeSlot?: IComponentRender[];
|
|
20
|
+
itemAfterSlot?: IComponentRender[];
|
|
21
|
+
disabledItems?: any[];
|
|
22
|
+
manualMode?: boolean;
|
|
23
|
+
searchParam?: SearchParam;
|
|
24
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { Datasource, IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { ISelectDataValueOutItem, SearchParam } from '../../utils';
|
|
3
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
4
|
+
import { TextInput } from '../zd-text-input/text-input';
|
|
5
|
+
import { ISelect } from './interfaces';
|
|
6
|
+
/**
|
|
7
|
+
* Base class for Select component.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Select extends TextInput implements ISelect {
|
|
10
|
+
/**
|
|
11
|
+
* Source of select items
|
|
12
|
+
*/
|
|
13
|
+
datasource: Datasource;
|
|
14
|
+
/**
|
|
15
|
+
* Field used to display values
|
|
16
|
+
*/
|
|
17
|
+
dataText: string | any[];
|
|
18
|
+
/**
|
|
19
|
+
* Field used to display values when the select is closed
|
|
20
|
+
*/
|
|
21
|
+
dataTextDiscrete: string | any[];
|
|
22
|
+
/**
|
|
23
|
+
* Value used to join display values
|
|
24
|
+
*/
|
|
25
|
+
dataTextSeparator: string;
|
|
26
|
+
/**
|
|
27
|
+
* Field used to save values
|
|
28
|
+
*/
|
|
29
|
+
dataValue: string;
|
|
30
|
+
/**
|
|
31
|
+
* Field used to make the item disabled
|
|
32
|
+
*/
|
|
33
|
+
dataDisabled: string;
|
|
34
|
+
/**
|
|
35
|
+
* Defines if field value should be an object
|
|
36
|
+
*/
|
|
37
|
+
returnObject: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enables search input
|
|
40
|
+
*/
|
|
41
|
+
autocomplete: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Automatically select option if only one is filtered
|
|
44
|
+
*/
|
|
45
|
+
autoSelection: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Prevents load select data when the input is focused
|
|
48
|
+
*/
|
|
49
|
+
preventLoadOnFocus: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum height of select menu
|
|
52
|
+
*/
|
|
53
|
+
menuMaxHeight: string | number;
|
|
54
|
+
/**
|
|
55
|
+
* Maximum width of select menu
|
|
56
|
+
*/
|
|
57
|
+
menuMaxWidth: string | number;
|
|
58
|
+
/**
|
|
59
|
+
* Input select value
|
|
60
|
+
*/
|
|
61
|
+
selectValue: IDictionary<any> | null;
|
|
62
|
+
/**
|
|
63
|
+
* Components that will be rendered in itemAfterSlot case
|
|
64
|
+
*/
|
|
65
|
+
itemAfterSlot: IComponentRender[];
|
|
66
|
+
/**
|
|
67
|
+
* Components that will be rendered in itemBeforeSlot case
|
|
68
|
+
*/
|
|
69
|
+
itemBeforeSlot: IComponentRender[];
|
|
70
|
+
/**
|
|
71
|
+
* Items that will be disabled for selection. Users will still see them
|
|
72
|
+
*/
|
|
73
|
+
disabledItems: any[];
|
|
74
|
+
/**
|
|
75
|
+
* Defines if data handling should be manual or automatic
|
|
76
|
+
*/
|
|
77
|
+
manualMode: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Defines if data handling should be manual or automatic
|
|
80
|
+
*/
|
|
81
|
+
searchParam: SearchParam;
|
|
82
|
+
/**
|
|
83
|
+
* Defines other columns that must me set on form on change
|
|
84
|
+
*/
|
|
85
|
+
dataValueOut: ISelectDataValueOutItem[];
|
|
86
|
+
/**
|
|
87
|
+
* Defines the name of the form target to set using dataValueOut
|
|
88
|
+
*/
|
|
89
|
+
dataValueOutFormName: string;
|
|
90
|
+
/**
|
|
91
|
+
* Input search value
|
|
92
|
+
*/
|
|
93
|
+
private searchValue;
|
|
94
|
+
protected dirtySearchValue: string;
|
|
95
|
+
protected formatterFn: (...args: any) => any;
|
|
96
|
+
private discreteProps?;
|
|
97
|
+
loadMoreAmount: number;
|
|
98
|
+
/**
|
|
99
|
+
* Conditions for pushing a value:
|
|
100
|
+
* 1. Every time a value from outside the datasource is set
|
|
101
|
+
* 2. On blur, if the current value is not part of the cache
|
|
102
|
+
* 3. When the datasource is reloaded, if the current value is not part of the datasource but is in another page
|
|
103
|
+
*
|
|
104
|
+
* Conditions for removing a push
|
|
105
|
+
* 1. When the datasource is reloaded, if the current value cannot be found in another page
|
|
106
|
+
* 2. When the datasource is reloaded, if the push is already part of the datasource
|
|
107
|
+
* 3. When the search is empty
|
|
108
|
+
* 4. On blur, if the current value is null
|
|
109
|
+
*/
|
|
110
|
+
pushedValue: IDictionary | null;
|
|
111
|
+
defaultValue: any;
|
|
112
|
+
protected cachedData: IDictionary[];
|
|
113
|
+
protected cachedTotal: number;
|
|
114
|
+
/**
|
|
115
|
+
* Create a new Select.
|
|
116
|
+
* @param props Select properties
|
|
117
|
+
*/
|
|
118
|
+
constructor(props: ISelect);
|
|
119
|
+
onCreated(): Promise<void>;
|
|
120
|
+
onMounted(element: any): void;
|
|
121
|
+
/**
|
|
122
|
+
* Select items list, containing all of the items that appear on the menu
|
|
123
|
+
* including the pushedValue
|
|
124
|
+
*/
|
|
125
|
+
get items(): IDictionary<any>[];
|
|
126
|
+
/**
|
|
127
|
+
* Initializes the select data properties: dataText, dataValue and dataTextDiscrete
|
|
128
|
+
* @param props Select props
|
|
129
|
+
*/
|
|
130
|
+
private setDataProperties;
|
|
131
|
+
private getAccessorValue;
|
|
132
|
+
/**
|
|
133
|
+
* Retrieves datasource structure applying infinity scroll
|
|
134
|
+
* @param field Field structure
|
|
135
|
+
*/
|
|
136
|
+
private getDefaultDatasource;
|
|
137
|
+
/**
|
|
138
|
+
* Returns the currentRow in the dataText key
|
|
139
|
+
*/
|
|
140
|
+
formatter(value?: string | IDictionary<any> | null, props?: {
|
|
141
|
+
dataText: string | any[];
|
|
142
|
+
dataTextSeparator: string;
|
|
143
|
+
}): any;
|
|
144
|
+
protected registerGetCallback(): void;
|
|
145
|
+
get search(): string;
|
|
146
|
+
set search(value: string);
|
|
147
|
+
/**
|
|
148
|
+
* Sets select default value and dispatches defaultAssigned event.
|
|
149
|
+
* @param value Default value
|
|
150
|
+
*/
|
|
151
|
+
protected setDefaultValue(value: any): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Finds and retrieves items searching by value
|
|
154
|
+
* @param value Default value
|
|
155
|
+
*/
|
|
156
|
+
protected getItemsBySearchValue(value: any): Promise<IDictionary<any>[]>;
|
|
157
|
+
focus(event: Event, element: any): Promise<void>;
|
|
158
|
+
protected afterFocus(): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Field value
|
|
161
|
+
*/
|
|
162
|
+
get value(): any;
|
|
163
|
+
set value(value: any);
|
|
164
|
+
setValue(value: any, callEvent?: boolean): Promise<void>;
|
|
165
|
+
protected setFieldValue(value: any): Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Set value accessors
|
|
168
|
+
* @param row
|
|
169
|
+
* @param value
|
|
170
|
+
*/
|
|
171
|
+
protected setFieldRowValue(row: any): void;
|
|
172
|
+
/**
|
|
173
|
+
* Retrieves value based on the returnObject definition
|
|
174
|
+
*/
|
|
175
|
+
protected getReturnValue(value: IDictionary | null): any;
|
|
176
|
+
/**
|
|
177
|
+
* Retrieves a single-value (dataValue property)
|
|
178
|
+
*/
|
|
179
|
+
protected getValue(value: any | IDictionary | null): any;
|
|
180
|
+
/**
|
|
181
|
+
* Event trigged when component loses the focus and value changes
|
|
182
|
+
* @param value inputted value
|
|
183
|
+
*/
|
|
184
|
+
selectChange(value: any, event?: Event, element?: any): void;
|
|
185
|
+
protected callChangeEvent(value: any, event?: Event, element?: any): void;
|
|
186
|
+
/**
|
|
187
|
+
* Event trigged when value is inputted
|
|
188
|
+
* @param value inputted value
|
|
189
|
+
*/
|
|
190
|
+
selectInput(value: any, event?: Event, element?: any): void;
|
|
191
|
+
/**
|
|
192
|
+
* Updates search value
|
|
193
|
+
* @param value Search value
|
|
194
|
+
*/
|
|
195
|
+
updateSearch(value: string): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Update datasource data
|
|
198
|
+
*/
|
|
199
|
+
updateData(data: IDictionary<any>[]): Promise<any>;
|
|
200
|
+
/**
|
|
201
|
+
* Update datasource items
|
|
202
|
+
*/
|
|
203
|
+
updateItems(items: (string | number)[]): Promise<any>;
|
|
204
|
+
protected doSearch(value: string): Promise<void>;
|
|
205
|
+
private debounceSearch;
|
|
206
|
+
/**
|
|
207
|
+
* Load more data
|
|
208
|
+
*/
|
|
209
|
+
loadMore(): Promise<void>;
|
|
210
|
+
/**
|
|
211
|
+
* Triggered when the component loses focus.
|
|
212
|
+
* @param event DOM event
|
|
213
|
+
* @param element Element that lost the focus
|
|
214
|
+
*/
|
|
215
|
+
blur(event: Event, element: any): void;
|
|
216
|
+
protected checkValueOnBlur(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Checks if the 'load more' option should be shown \
|
|
219
|
+
* conditions to show:
|
|
220
|
+
* - datasource has data
|
|
221
|
+
* - datasource is not loading
|
|
222
|
+
* - datasource is not loadAll
|
|
223
|
+
* - datasource current data length is less than the total
|
|
224
|
+
*/
|
|
225
|
+
showLoadMore(): boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Checks if skeleton loaders should be shown \
|
|
228
|
+
* conditions to show:
|
|
229
|
+
* - datasource is loading and
|
|
230
|
+
* - datasource has no data or has less data than the total
|
|
231
|
+
*/
|
|
232
|
+
showSkeletonLoaders(): boolean;
|
|
233
|
+
onBeforeDestroy(): void;
|
|
234
|
+
/**
|
|
235
|
+
* Retrieves the index of a select value inside a data array
|
|
236
|
+
*/
|
|
237
|
+
indexOf(search: IDictionary | string | number, data?: IDictionary[]): number;
|
|
238
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { EventDef, IComponentEvents } from '../zd-component/interfaces';
|
|
3
|
+
import { ISelect } from '../zd-select/interfaces';
|
|
4
|
+
import { SelectMultiple } from './select-multiple';
|
|
5
|
+
export type ISelectMultipleEvent = IEventParam<SelectMultiple>;
|
|
6
|
+
export interface ISelectMultipleEvents<T = IEventParam<any>> extends IComponentEvents<T> {
|
|
7
|
+
selectedAll?: EventDef<T>;
|
|
8
|
+
unselectedAll?: EventDef<T>;
|
|
9
|
+
}
|
|
10
|
+
export interface ISelectMultiple extends ISelect {
|
|
11
|
+
moreChip?: number;
|
|
12
|
+
showSelectAll?: boolean;
|
|
13
|
+
events?: ISelectMultipleEvents;
|
|
14
|
+
maxRows?: string | number;
|
|
15
|
+
limit?: number | null;
|
|
16
|
+
showCheckboxAll?: boolean;
|
|
17
|
+
checkboxAll?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { Select } from '../zd-select/select';
|
|
3
|
+
import { ISelectMultiple } from './interfaces';
|
|
4
|
+
export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
5
|
+
/**
|
|
6
|
+
* Selected items that were added to datasource
|
|
7
|
+
*/
|
|
8
|
+
insertedValues: IDictionary<any>[];
|
|
9
|
+
/**
|
|
10
|
+
* Inserted values that were unselected
|
|
11
|
+
*/
|
|
12
|
+
private insertsRemoved;
|
|
13
|
+
/**
|
|
14
|
+
* Max number of rows the component can have
|
|
15
|
+
*/
|
|
16
|
+
maxRows?: string | number;
|
|
17
|
+
/**
|
|
18
|
+
* Limit the display of selected options. The rest will be hidden within the 'limitText' string
|
|
19
|
+
*/
|
|
20
|
+
limit: number | null;
|
|
21
|
+
showSelectAll: boolean;
|
|
22
|
+
showCheckboxAll: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Create a new Select.
|
|
25
|
+
* @param props Select properties
|
|
26
|
+
*/
|
|
27
|
+
constructor(props: ISelectMultiple);
|
|
28
|
+
selectValue: IDictionary<any>[];
|
|
29
|
+
updateSelectValue(rows: IDictionary<any>): void;
|
|
30
|
+
private checkboxAllValue;
|
|
31
|
+
get checkboxAll(): boolean;
|
|
32
|
+
set checkboxAll(value: boolean);
|
|
33
|
+
/**
|
|
34
|
+
* Removes item from array a and add it to array b if condition is satisfied
|
|
35
|
+
*/
|
|
36
|
+
private cutFromAToB;
|
|
37
|
+
protected getCondition(filterValue: any): (row: any) => boolean;
|
|
38
|
+
protected setFieldValue(value: any[]): Promise<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Set value accessors
|
|
41
|
+
* @param value
|
|
42
|
+
*/
|
|
43
|
+
protected setFieldRowValue(rows: any[]): void;
|
|
44
|
+
setValue(value: any[] | any, callEvent?: boolean): Promise<void>;
|
|
45
|
+
private getDisplayValue;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves input value
|
|
48
|
+
* @param value inputted
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
protected getValue(value: any): any[] | IDictionary<any>[];
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves input value
|
|
54
|
+
* @param value inputed
|
|
55
|
+
* @protected
|
|
56
|
+
*/
|
|
57
|
+
protected getValues(value: IDictionary<any>[]): IDictionary<any>[] | any[];
|
|
58
|
+
/**
|
|
59
|
+
* Updates search value
|
|
60
|
+
* @param value Search value
|
|
61
|
+
*/
|
|
62
|
+
updateSearch(value: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Inserts selected items in datasource
|
|
65
|
+
*/
|
|
66
|
+
protected insertSelected(): void;
|
|
67
|
+
protected removePushedValue(): void;
|
|
68
|
+
protected doSearch(value: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Removes unselected inserts from datasource
|
|
71
|
+
*/
|
|
72
|
+
private removeInserts;
|
|
73
|
+
/**
|
|
74
|
+
* Return formatted dataText and values
|
|
75
|
+
*/
|
|
76
|
+
formatter(value: IDictionary<any>[]): any;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the text shown when there's one or more selected items that doesn't fit in the input
|
|
79
|
+
*/
|
|
80
|
+
getMoreChipText(moreChip: number): string;
|
|
81
|
+
showLoadMore(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Load more data
|
|
84
|
+
*/
|
|
85
|
+
loadMore(): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Triggered when the component loses focus.
|
|
88
|
+
* @param event DOM event
|
|
89
|
+
* @param element Element that lost the focus
|
|
90
|
+
*/
|
|
91
|
+
blur(event: Event, element: any): void;
|
|
92
|
+
/**
|
|
93
|
+
* Dispatches select/unselect event
|
|
94
|
+
* @param isChanged checked is changed
|
|
95
|
+
* @param event DOM event
|
|
96
|
+
* @param element DOM Element
|
|
97
|
+
*/
|
|
98
|
+
onSelectAll(isSelected: boolean, event: Event, element: any): void;
|
|
99
|
+
selectAllItems(): Promise<void>;
|
|
100
|
+
unSelectAllItems(): Promise<void>;
|
|
101
|
+
protected checkValueOnBlur(): void;
|
|
102
|
+
protected afterFocus(): Promise<void>;
|
|
103
|
+
private setCache;
|
|
104
|
+
protected registerGetCallback(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Updates input rules.
|
|
107
|
+
*/
|
|
108
|
+
protected updateRules(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Retrieves value based on the returnObject definition
|
|
111
|
+
*/
|
|
112
|
+
protected getReturnValue(value: IDictionary[] | null): any[];
|
|
113
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IDictionary, IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { EventDef, IComponentEvents, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { SvgMap } from './svg-map';
|
|
4
|
+
export interface ISvgMapEventParam extends IEventParam<SvgMap> {
|
|
5
|
+
area: SVGElement;
|
|
6
|
+
}
|
|
7
|
+
export interface ISvgMapEvents<T = ISvgMapEventParam | IEventParam<any>> extends IComponentEvents<T> {
|
|
8
|
+
areaClick?: EventDef<T>;
|
|
9
|
+
}
|
|
10
|
+
export type TooltipData = {
|
|
11
|
+
labels: IDictionary;
|
|
12
|
+
data: IDictionary[];
|
|
13
|
+
};
|
|
14
|
+
export interface ISvgMap extends IComponentRender {
|
|
15
|
+
areaColor?: string;
|
|
16
|
+
areaHoverColor?: string;
|
|
17
|
+
areaSelectColor?: string;
|
|
18
|
+
events?: ISvgMapEvents;
|
|
19
|
+
height?: string | number;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
selectedArea?: string | string[];
|
|
22
|
+
src?: string;
|
|
23
|
+
width?: string | number;
|
|
24
|
+
tooltipData?: TooltipData;
|
|
25
|
+
keyColumn?: string;
|
|
26
|
+
}
|