@zeedhi/common 1.120.2 → 1.122.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 +4 -4
- package/dist/zd-common.js +13133 -0
- package/dist/zd-common.min.js +13133 -0
- package/dist/zd-common.umd.js +4 -4
- package/package.json +2 -2
- package/types/components/zd-grid/grid.d.ts +4 -4
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { IDateRange } from './interfaces';
|
|
2
|
+
import { TextInput } from '../zd-text-input/text-input';
|
|
3
|
+
export declare class DateRange extends TextInput implements IDateRange {
|
|
4
|
+
/**
|
|
5
|
+
* Input auto complete.
|
|
6
|
+
*/
|
|
7
|
+
autocomplete: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the date format.
|
|
10
|
+
*/
|
|
11
|
+
dateFormat: string;
|
|
12
|
+
/**
|
|
13
|
+
* Defines the date format displayed.
|
|
14
|
+
*/
|
|
15
|
+
displayFormat: string;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the date input format.
|
|
18
|
+
*/
|
|
19
|
+
inputFormat?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Shows the date picker.
|
|
22
|
+
*/
|
|
23
|
+
showDatePicker: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the first day of the week, starting with 0 for Sunday.
|
|
26
|
+
*/
|
|
27
|
+
firstDayOfWeek: number | string;
|
|
28
|
+
/**
|
|
29
|
+
* Forces 100% width.
|
|
30
|
+
*/
|
|
31
|
+
fullWidth: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the locale. Accepts a string with a BCP 47 language tag.
|
|
34
|
+
*/
|
|
35
|
+
locale?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Allows changing displayed month with mouse scroll
|
|
38
|
+
*/
|
|
39
|
+
scrollable: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Toggles visibility of the week numbers in the body of the calendar.
|
|
42
|
+
*/
|
|
43
|
+
showWeek: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Character that will separate the two dates
|
|
46
|
+
*/
|
|
47
|
+
get splitter(): string;
|
|
48
|
+
set splitter(splitter: string);
|
|
49
|
+
private internalSplitter;
|
|
50
|
+
/**
|
|
51
|
+
* Width of the picker.
|
|
52
|
+
*/
|
|
53
|
+
width: number | string;
|
|
54
|
+
/**
|
|
55
|
+
* Helper options.
|
|
56
|
+
*/
|
|
57
|
+
helperOptions?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Max value allowed.
|
|
60
|
+
*/
|
|
61
|
+
max?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Min value allowed.
|
|
64
|
+
*/
|
|
65
|
+
min?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Helper value.
|
|
68
|
+
*/
|
|
69
|
+
helperValue?: string;
|
|
70
|
+
protected isoFormat: string;
|
|
71
|
+
protected dateError: boolean;
|
|
72
|
+
protected formatterFn: (...args: any) => any;
|
|
73
|
+
protected parserFn: (...args: any) => any;
|
|
74
|
+
protected initialMask?: string;
|
|
75
|
+
unitMask?: string;
|
|
76
|
+
protected isSimpleDisplay: boolean;
|
|
77
|
+
inputMode?: string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Creates a new Date.
|
|
80
|
+
* @param props Date properties
|
|
81
|
+
*/
|
|
82
|
+
constructor(props: IDateRange);
|
|
83
|
+
private getInitialMask;
|
|
84
|
+
formatter(value: any): string;
|
|
85
|
+
parser(value: string): any;
|
|
86
|
+
get displayValue(): string;
|
|
87
|
+
set displayValue(newValue: string);
|
|
88
|
+
get value(): string[];
|
|
89
|
+
set value(value: unknown);
|
|
90
|
+
/**
|
|
91
|
+
* Returns all days ranging from start to end as dayjs objects
|
|
92
|
+
* @returns an array of dayjs objects containing all days between start and end
|
|
93
|
+
*/
|
|
94
|
+
private getDatesInRange;
|
|
95
|
+
/**
|
|
96
|
+
* Assign the updated mask to mask property
|
|
97
|
+
*/
|
|
98
|
+
updateMask(): any;
|
|
99
|
+
/**
|
|
100
|
+
* Gets the updated masked, based on displayFormat if the initial mask is undefined
|
|
101
|
+
*/
|
|
102
|
+
protected getUpdatedMask(): string | undefined;
|
|
103
|
+
protected maskFormat(format: string): string;
|
|
104
|
+
setDateValue(displayValue: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Faz a validação do array de datas
|
|
107
|
+
* @param format o formato da data
|
|
108
|
+
* @param values o array de datas
|
|
109
|
+
* @returns true se todos os valores forem validados
|
|
110
|
+
* */
|
|
111
|
+
isValidDateArray(format: string, values?: string[]): boolean;
|
|
112
|
+
private splitValues;
|
|
113
|
+
isValidDate(value: string, format: string, strict?: boolean): boolean;
|
|
114
|
+
isValidFormatDate(value: string, format: string, strict?: boolean): boolean;
|
|
115
|
+
get isoRangeValue(): string[];
|
|
116
|
+
set isoRangeValue(newValue: string[]);
|
|
117
|
+
formatISODateRangeValue(dates: string[] | string): string[];
|
|
118
|
+
parseISODateRangeValue(values: string[]): any;
|
|
119
|
+
private sortDates;
|
|
120
|
+
dateValidation(): boolean | string;
|
|
121
|
+
click(event?: Event, element?: any): void;
|
|
122
|
+
blur(event: Event, element: any): void;
|
|
123
|
+
focus(event: Event, element: any): void;
|
|
124
|
+
/**
|
|
125
|
+
* Add date mask
|
|
126
|
+
*/
|
|
127
|
+
protected addDateMask(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Removes the component mask if value is valid
|
|
130
|
+
*/
|
|
131
|
+
protected removeDateMask(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Toggle showDatePicker value
|
|
134
|
+
*/
|
|
135
|
+
togglePicker(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Triggered when the appended icon is clicked.
|
|
138
|
+
* @param event DOM event
|
|
139
|
+
* @param element Text input
|
|
140
|
+
*/
|
|
141
|
+
iconClick(event: Event, element: any): void;
|
|
142
|
+
/**
|
|
143
|
+
* Checks if a date format is simple.
|
|
144
|
+
* Simple date formats are the ones that consists only of 'DD', 'MM' or 'YYYY', and mask delimiters
|
|
145
|
+
* @param format The format to be checked
|
|
146
|
+
* @returns true if it is simple, false otherwise
|
|
147
|
+
*/
|
|
148
|
+
protected isSimpleFormat(format: string): boolean;
|
|
149
|
+
private previousHint;
|
|
150
|
+
private previousPersistentHint;
|
|
151
|
+
updateHelperHint(helperValue: string): void;
|
|
152
|
+
change(event?: Event, element?: any): void;
|
|
153
|
+
private getExtremities;
|
|
154
|
+
setNativeDate(date: Date[]): void;
|
|
155
|
+
private dateObject;
|
|
156
|
+
getNativeDate(): Date[];
|
|
157
|
+
getMaskValue(): any;
|
|
158
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ITextInput } from '../zd-text-input/interfaces';
|
|
2
|
+
export interface IDateRange extends ITextInput {
|
|
3
|
+
allowedDates?: ((date: string) => boolean) | string[];
|
|
4
|
+
dateFormat?: string;
|
|
5
|
+
displayFormat?: string;
|
|
6
|
+
firstDayOfWeek?: number | string;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
inputFormat?: string;
|
|
9
|
+
showDatePicker?: boolean;
|
|
10
|
+
showWeek?: boolean;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
orderedDates?: boolean;
|
|
13
|
+
helperOptions?: string[];
|
|
14
|
+
helperValue?: string;
|
|
15
|
+
max?: string;
|
|
16
|
+
min?: string;
|
|
17
|
+
viewMode?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { IButton } from '../zd-button/interfaces';
|
|
2
|
+
import { Component } from '../zd-component/component';
|
|
3
|
+
import { IDialog } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Dialog component.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Dialog extends Component implements IDialog {
|
|
8
|
+
/**
|
|
9
|
+
* Buttons collection that will be displayed on dialog footer
|
|
10
|
+
*/
|
|
11
|
+
buttons: IButton[];
|
|
12
|
+
/**
|
|
13
|
+
* The maximum width of the content
|
|
14
|
+
*/
|
|
15
|
+
maxWidth: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* Clicking outside will not dismiss the dialog
|
|
18
|
+
*/
|
|
19
|
+
persistent: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The text displayed on dialog
|
|
22
|
+
*/
|
|
23
|
+
text: string;
|
|
24
|
+
/**
|
|
25
|
+
* The title displayed on dialog
|
|
26
|
+
*/
|
|
27
|
+
title: string;
|
|
28
|
+
/**
|
|
29
|
+
* Dialog type (normal, success, error, warning, info)
|
|
30
|
+
*/
|
|
31
|
+
type: string;
|
|
32
|
+
/**
|
|
33
|
+
* Confirm button component name
|
|
34
|
+
*/
|
|
35
|
+
confirmButton?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Deny button component name
|
|
38
|
+
*/
|
|
39
|
+
denyButton?: string;
|
|
40
|
+
exit?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Default dialog buttons
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private getDefaultButtons;
|
|
46
|
+
protected defaultValues: {
|
|
47
|
+
confirmButton: string | undefined;
|
|
48
|
+
denyButton: string | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
maxWidth: string | number;
|
|
51
|
+
persistent: boolean;
|
|
52
|
+
type: string;
|
|
53
|
+
title: string;
|
|
54
|
+
text: string;
|
|
55
|
+
exit: boolean | undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new Dialog
|
|
59
|
+
* @param props Dialog structure
|
|
60
|
+
*/
|
|
61
|
+
constructor(props: IDialog);
|
|
62
|
+
/**
|
|
63
|
+
* Assign all dialog properties
|
|
64
|
+
* @param dialog Dialog structure
|
|
65
|
+
*/
|
|
66
|
+
assignDialogProperties(dialog: IDialog): void;
|
|
67
|
+
protected clickDefaultButtonKeyMapping(): any;
|
|
68
|
+
/**
|
|
69
|
+
* Displays dialog
|
|
70
|
+
*/
|
|
71
|
+
show(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Hides dialog
|
|
74
|
+
*/
|
|
75
|
+
hide(): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IButton } from '../zd-button/interfaces';
|
|
2
|
+
import { IComponent } from '../zd-component/interfaces';
|
|
3
|
+
export interface IDialog extends IComponent {
|
|
4
|
+
buttons?: IButton[];
|
|
5
|
+
maxWidth?: string | number;
|
|
6
|
+
persistent?: boolean;
|
|
7
|
+
confirmButton?: string;
|
|
8
|
+
denyButton?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
exit?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
2
|
+
import { IDivider } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Divider component.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Divider extends ComponentRender implements IDivider {
|
|
7
|
+
/**
|
|
8
|
+
* Adds indentation (72px) for normal dividers, reduces max height for vertical.
|
|
9
|
+
*/
|
|
10
|
+
inset: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Displays dividers vertically.
|
|
13
|
+
*/
|
|
14
|
+
vertical: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new Divider.
|
|
17
|
+
* @param props Divider properties
|
|
18
|
+
*/
|
|
19
|
+
constructor(props: IDivider);
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Divider } from './divider';
|
|
4
|
+
export type IDividerEvent = IEventParam<Divider>;
|
|
5
|
+
export interface IDivider extends IComponentRender {
|
|
6
|
+
inset?: boolean;
|
|
7
|
+
vertical?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { IDropdown } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Dropdown component.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Dropdown extends ComponentRender implements IDropdown {
|
|
8
|
+
/**
|
|
9
|
+
* Applies position absolute to the dropdown.
|
|
10
|
+
*/
|
|
11
|
+
absolute: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Designate to put the component that activates the menu.
|
|
14
|
+
*/
|
|
15
|
+
activator: IComponentRender;
|
|
16
|
+
/**
|
|
17
|
+
* Designates if menu should close when its content is clicked.
|
|
18
|
+
*/
|
|
19
|
+
closeOnContentClick: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Designates if menu should close on outside-activator click.
|
|
22
|
+
*/
|
|
23
|
+
closeOnClick: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Applies a cursor to the dropdown.
|
|
26
|
+
*/
|
|
27
|
+
cursor: string;
|
|
28
|
+
/**
|
|
29
|
+
* Disables the menu.
|
|
30
|
+
*/
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Applies hover to the dropdown.
|
|
34
|
+
*/
|
|
35
|
+
hover: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the height for the dropdown.
|
|
38
|
+
*/
|
|
39
|
+
height?: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the maximum height for the dropdown.
|
|
42
|
+
*/
|
|
43
|
+
maxHeight: number | string;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the maximum width for the dropdown.
|
|
46
|
+
*/
|
|
47
|
+
maxWidth: number | string;
|
|
48
|
+
/**
|
|
49
|
+
* Sets the minimum height for the dropdown.
|
|
50
|
+
*/
|
|
51
|
+
minHeight: number | string;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the minimum width for the dropdown.
|
|
54
|
+
*/
|
|
55
|
+
minWidth: number | string;
|
|
56
|
+
/**
|
|
57
|
+
* Offset the menu on the x-axis.
|
|
58
|
+
*/
|
|
59
|
+
offsetX: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Offset the menu on the x-axis.
|
|
62
|
+
*/
|
|
63
|
+
offsetY: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Designates whether menu should open on activator click.
|
|
66
|
+
*/
|
|
67
|
+
openOnClick: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Designates whether menu should open on activator hover.
|
|
70
|
+
*/
|
|
71
|
+
openOnHover: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Controls whether the component is visible or hidden.
|
|
74
|
+
*/
|
|
75
|
+
value?: any;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a new DropDown.
|
|
78
|
+
* @param props DropDown properties
|
|
79
|
+
*/
|
|
80
|
+
constructor(props: IDropdown);
|
|
81
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Dropdown } from './dropdown';
|
|
4
|
+
export type IDropdownEvent = IEventParam<Dropdown>;
|
|
5
|
+
export interface IDropdown extends IComponentRender {
|
|
6
|
+
absolute?: boolean;
|
|
7
|
+
activator: IComponentRender;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
closeOnContentClick?: boolean;
|
|
10
|
+
closeOnClick?: boolean;
|
|
11
|
+
cursor?: string;
|
|
12
|
+
hover?: boolean;
|
|
13
|
+
height?: number | string;
|
|
14
|
+
maxHeight?: number | string;
|
|
15
|
+
maxWidth?: number | string;
|
|
16
|
+
minHeight?: number | string;
|
|
17
|
+
minWidth?: number | string;
|
|
18
|
+
offsetX?: boolean;
|
|
19
|
+
offsetY?: boolean;
|
|
20
|
+
openOnClick?: boolean;
|
|
21
|
+
openOnHover?: boolean;
|
|
22
|
+
value?: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
2
|
+
import { IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { IFooter } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Footer component.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Footer extends ComponentRender implements IFooter {
|
|
8
|
+
/**
|
|
9
|
+
* Applies position absolute to footer.
|
|
10
|
+
*/
|
|
11
|
+
absolute: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Designates the footer as part of the application layout.
|
|
14
|
+
*/
|
|
15
|
+
app: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Render components on the middle of footer.
|
|
18
|
+
*/
|
|
19
|
+
centerSlot: IComponentRender[];
|
|
20
|
+
/**
|
|
21
|
+
* Applies specified color to the control. It can be the name of material or css color in hexa.
|
|
22
|
+
*/
|
|
23
|
+
color: string;
|
|
24
|
+
/**
|
|
25
|
+
* Events registered to the footer.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Applies position fixed to footer.
|
|
29
|
+
*/
|
|
30
|
+
fixed: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Sets the height for footer.
|
|
33
|
+
*/
|
|
34
|
+
height: number | string;
|
|
35
|
+
/**
|
|
36
|
+
* Positions the footer inside the application content.
|
|
37
|
+
*/
|
|
38
|
+
inset: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Render components on the left of footer.
|
|
41
|
+
*/
|
|
42
|
+
leftSlot: IComponentRender[];
|
|
43
|
+
/**
|
|
44
|
+
* Sets the maximum height for the footer.
|
|
45
|
+
*/
|
|
46
|
+
maxHeight?: number | string;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the maximum width for the footer.
|
|
49
|
+
*/
|
|
50
|
+
maxWidth?: number | string;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the minimum height for the footer.
|
|
53
|
+
*/
|
|
54
|
+
minHeight?: number | string;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the minimum width for the footer.
|
|
57
|
+
*/
|
|
58
|
+
minWidth?: number | string;
|
|
59
|
+
/**
|
|
60
|
+
* Remove all padding from the footer.
|
|
61
|
+
*/
|
|
62
|
+
padless: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Render components on the right of footer.
|
|
65
|
+
*/
|
|
66
|
+
rightSlot: IComponentRender[];
|
|
67
|
+
/**
|
|
68
|
+
* Sets the width for the component.
|
|
69
|
+
*/
|
|
70
|
+
width?: number | string;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a new Footer.
|
|
73
|
+
* @param props Footer properties
|
|
74
|
+
*/
|
|
75
|
+
constructor(props: IFooter);
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves named slots visibility
|
|
78
|
+
*/
|
|
79
|
+
get namedSlotsIsVisible(): number;
|
|
80
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IEventParam } from '@zeedhi/core';
|
|
2
|
+
import { IComponentEvents, IComponentRender } from '../zd-component/interfaces';
|
|
3
|
+
import { Footer } from './footer';
|
|
4
|
+
export type IFooterEvent = IEventParam<Footer>;
|
|
5
|
+
export interface IFooterEvents extends IComponentEvents<IFooterEvent> {
|
|
6
|
+
blur: undefined;
|
|
7
|
+
click: undefined;
|
|
8
|
+
focus: undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface IFooter extends IComponentRender {
|
|
11
|
+
absolute?: boolean;
|
|
12
|
+
app?: boolean;
|
|
13
|
+
centerSlot?: IComponentRender[];
|
|
14
|
+
color?: string;
|
|
15
|
+
fixed?: boolean;
|
|
16
|
+
height?: number | string;
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
leftSlot?: IComponentRender[];
|
|
19
|
+
maxHeight?: number | string;
|
|
20
|
+
maxWidth?: number | string;
|
|
21
|
+
minHeight?: number | string;
|
|
22
|
+
minWidth?: number | string;
|
|
23
|
+
padless?: boolean;
|
|
24
|
+
rightSlot?: IComponentRender[];
|
|
25
|
+
width?: number | string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { ComponentRender } from '../zd-component/component-render';
|
|
3
|
+
import { Input } from '../zd-input/input';
|
|
4
|
+
import { IForm, IFormComponent, IFormEvents, IFormGrid } from './interfaces';
|
|
5
|
+
/**
|
|
6
|
+
* Base class for Form component.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Form extends ComponentRender implements IForm {
|
|
9
|
+
/**
|
|
10
|
+
* Children component structure if the component has children.
|
|
11
|
+
*/
|
|
12
|
+
children: IFormComponent[];
|
|
13
|
+
/**
|
|
14
|
+
* Applies the align-items css property.
|
|
15
|
+
* Available options are start, center, end, space-between, space-around and stretch.
|
|
16
|
+
*/
|
|
17
|
+
align?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Applies the justify-content css property.
|
|
20
|
+
* Available options are start, center, end, space-between and space-around.
|
|
21
|
+
*/
|
|
22
|
+
justify?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Defines the component height. Possible values for this property can be
|
|
25
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
26
|
+
*/
|
|
27
|
+
height: string | number;
|
|
28
|
+
/**
|
|
29
|
+
* Defines the component min height. Possible values for this property can be
|
|
30
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
31
|
+
*/
|
|
32
|
+
minHeight: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* Defines the component max height. Possible values for this property can be
|
|
35
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
36
|
+
*/
|
|
37
|
+
maxHeight: string | number;
|
|
38
|
+
/**
|
|
39
|
+
* Defines the component width. Possible values for this property can be
|
|
40
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
41
|
+
*/
|
|
42
|
+
width: string | number;
|
|
43
|
+
/**
|
|
44
|
+
* Defines the component min width. Possible values for this property can be
|
|
45
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
46
|
+
*/
|
|
47
|
+
minWidth: string | number;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the component max height. Possible values for this property can be
|
|
50
|
+
* <samp>'auto', '100%', '400px' or 400</samp>
|
|
51
|
+
*/
|
|
52
|
+
maxWidth: string | number;
|
|
53
|
+
/**
|
|
54
|
+
* Defines form events.
|
|
55
|
+
*/
|
|
56
|
+
events: IFormEvents;
|
|
57
|
+
/**
|
|
58
|
+
* Optional validation method assigned by view layer.
|
|
59
|
+
*/
|
|
60
|
+
private viewValidate?;
|
|
61
|
+
/**
|
|
62
|
+
* Optional submit method.
|
|
63
|
+
*/
|
|
64
|
+
submitFunction?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Reset validation method assigned by view layer.
|
|
67
|
+
*/
|
|
68
|
+
private viewResetValidation?;
|
|
69
|
+
/**
|
|
70
|
+
* Children components that are Inputs.
|
|
71
|
+
*/
|
|
72
|
+
private inputs;
|
|
73
|
+
private internalValue;
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new Form.
|
|
76
|
+
* @param props Form properties
|
|
77
|
+
*/
|
|
78
|
+
constructor(props: IForm);
|
|
79
|
+
/**
|
|
80
|
+
* Form value.
|
|
81
|
+
*/
|
|
82
|
+
get value(): IDictionary;
|
|
83
|
+
set value(value: IDictionary);
|
|
84
|
+
/**
|
|
85
|
+
* Clear all form inputs
|
|
86
|
+
*/
|
|
87
|
+
clearForm(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Saves input instance and defines property on form value.
|
|
90
|
+
* @param component Children component
|
|
91
|
+
*/
|
|
92
|
+
registerInput(component: Input): void;
|
|
93
|
+
/**
|
|
94
|
+
* Children props without grid system.
|
|
95
|
+
*/
|
|
96
|
+
get childrenProps(): {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
children?: import("..").IComponentRender[] | undefined;
|
|
99
|
+
component: string;
|
|
100
|
+
allowDuplicate?: boolean | undefined;
|
|
101
|
+
autofocus?: boolean | undefined;
|
|
102
|
+
componentId?: number | undefined;
|
|
103
|
+
cssClass?: string | undefined;
|
|
104
|
+
cssStyle?: string | IDictionary<any> | undefined;
|
|
105
|
+
events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
106
|
+
directives?: import("..").IComponentDirectives | undefined;
|
|
107
|
+
isVisible?: string | boolean | undefined;
|
|
108
|
+
dark?: boolean | undefined;
|
|
109
|
+
light?: boolean | undefined;
|
|
110
|
+
theme?: string | undefined;
|
|
111
|
+
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
112
|
+
name: string;
|
|
113
|
+
parent?: import("..").IComponentInstance | undefined;
|
|
114
|
+
tabStop?: boolean | undefined;
|
|
115
|
+
userProperties?: IDictionary<any> | undefined;
|
|
116
|
+
fillHeight?: boolean | undefined;
|
|
117
|
+
}[];
|
|
118
|
+
/**
|
|
119
|
+
* Checks if the value matches a col value (1, 2, ... 12) or auto
|
|
120
|
+
*/
|
|
121
|
+
private matchColumn;
|
|
122
|
+
private breakpoints;
|
|
123
|
+
private matchBreakpoint;
|
|
124
|
+
private handleColClass;
|
|
125
|
+
private handleOffsetClass;
|
|
126
|
+
/**
|
|
127
|
+
* This method searches in a css class string to find classes related to grid cols \
|
|
128
|
+
* Parses all of the grid cols classes found to form grid object entries, for example
|
|
129
|
+
* the following class: 'zd-col-sm-12 zd-col-md-6' will become { sm: '12', md: '6' }
|
|
130
|
+
*/
|
|
131
|
+
private parseGridClasses;
|
|
132
|
+
private getChildGrid;
|
|
133
|
+
/**
|
|
134
|
+
* Grid system for each child.
|
|
135
|
+
*/
|
|
136
|
+
get childrenGrid(): IDictionary<IFormGrid>;
|
|
137
|
+
/**
|
|
138
|
+
* Validates form.
|
|
139
|
+
*/
|
|
140
|
+
validate(): Promise<{
|
|
141
|
+
valid: boolean;
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Sets view validation method.
|
|
145
|
+
*/
|
|
146
|
+
setViewValidate(viewValidate: () => Promise<{
|
|
147
|
+
valid: boolean;
|
|
148
|
+
errors: {
|
|
149
|
+
id: string | number;
|
|
150
|
+
errorMessages: string[];
|
|
151
|
+
}[];
|
|
152
|
+
}>): void;
|
|
153
|
+
/**
|
|
154
|
+
* Sets view reset validation method.
|
|
155
|
+
*/
|
|
156
|
+
setViewResetValidation(viewResetValidation: () => void): void;
|
|
157
|
+
/**
|
|
158
|
+
* Triggered when form is submitted and it's valid.
|
|
159
|
+
* @param event DOM Event
|
|
160
|
+
* @param element Form component
|
|
161
|
+
*/
|
|
162
|
+
callSubmitEvent(event: Event, element: any): void;
|
|
163
|
+
/**
|
|
164
|
+
* Triggered when the component is mounted.
|
|
165
|
+
* @param element Element mounted reference
|
|
166
|
+
*/
|
|
167
|
+
onMounted(element: any): void;
|
|
168
|
+
submit(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Reset all form validation errors.
|
|
171
|
+
* @throws Will throw if viewResetValidation is undefined
|
|
172
|
+
*/
|
|
173
|
+
resetValidation(): void;
|
|
174
|
+
}
|