@nanahoshi/mona-ui 0.1.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/README.md +25 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +590 -0
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +168 -0
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +220 -0
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +225 -0
- package/fesm2022/nanahoshi-mona-ui-button.mjs +497 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1569 -0
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +339 -0
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +453 -0
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +200 -0
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +853 -0
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +923 -0
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +495 -0
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +686 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +642 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +485 -0
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +132 -0
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +460 -0
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +659 -0
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +828 -0
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +523 -0
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +615 -0
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -0
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +1400 -0
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +245 -0
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +170 -0
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +680 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs +105 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs +42 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +130 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs +773 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +240 -0
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs +5374 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +87 -0
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +154 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1356 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2263 -0
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +379 -0
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +630 -0
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +527 -0
- package/fesm2022/nanahoshi-mona-ui-list.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +966 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +641 -0
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +536 -0
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +597 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +790 -0
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +83 -0
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +325 -0
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1559 -0
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1321 -0
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +294 -0
- package/fesm2022/nanahoshi-mona-ui-query.mjs +175 -0
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +339 -0
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +565 -0
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1049 -0
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +636 -0
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +843 -0
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +537 -0
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +308 -0
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +664 -0
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +111 -0
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +369 -0
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +314 -0
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +450 -0
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +723 -0
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +716 -0
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +733 -0
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1329 -0
- package/fesm2022/nanahoshi-mona-ui.mjs +9 -0
- package/package.json +289 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +223 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +642 -0
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +70 -0
- package/types/nanahoshi-mona-ui-button-group.d.ts +77 -0
- package/types/nanahoshi-mona-ui-button.d.ts +111 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +262 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +133 -0
- package/types/nanahoshi-mona-ui-chip.d.ts +130 -0
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +113 -0
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +201 -0
- package/types/nanahoshi-mona-ui-color-palette.d.ts +102 -0
- package/types/nanahoshi-mona-ui-color-picker.d.ts +156 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +232 -0
- package/types/nanahoshi-mona-ui-common.d.ts +386 -0
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +129 -0
- package/types/nanahoshi-mona-ui-date-input.d.ts +60 -0
- package/types/nanahoshi-mona-ui-date-picker.d.ts +177 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +199 -0
- package/types/nanahoshi-mona-ui-dialog.d.ts +261 -0
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +159 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +219 -0
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +176 -0
- package/types/nanahoshi-mona-ui-editor.d.ts +113 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +87 -0
- package/types/nanahoshi-mona-ui-fieldset.d.ts +68 -0
- package/types/nanahoshi-mona-ui-filter.d.ts +115 -0
- package/types/nanahoshi-mona-ui-grid.d.ts +1114 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +25 -0
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +28 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +269 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +391 -0
- package/types/nanahoshi-mona-ui-internal.d.ts +136 -0
- package/types/nanahoshi-mona-ui-list-box.d.ts +225 -0
- package/types/nanahoshi-mona-ui-list-view.d.ts +188 -0
- package/types/nanahoshi-mona-ui-list.d.ts +1 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +198 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +247 -0
- package/types/nanahoshi-mona-ui-notification.d.ts +106 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +161 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +238 -0
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -0
- package/types/nanahoshi-mona-ui-popover.d.ts +130 -0
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +412 -0
- package/types/nanahoshi-mona-ui-popup.d.ts +485 -0
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +139 -0
- package/types/nanahoshi-mona-ui-query.d.ts +89 -0
- package/types/nanahoshi-mona-ui-radio-button.d.ts +128 -0
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +166 -0
- package/types/nanahoshi-mona-ui-slider.d.ts +305 -0
- package/types/nanahoshi-mona-ui-split-button.d.ts +182 -0
- package/types/nanahoshi-mona-ui-splitter.d.ts +70 -0
- package/types/nanahoshi-mona-ui-stepper.d.ts +173 -0
- package/types/nanahoshi-mona-ui-switch.d.ts +125 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +158 -0
- package/types/nanahoshi-mona-ui-text-area.d.ts +42 -0
- package/types/nanahoshi-mona-ui-text-box.d.ts +164 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +23 -0
- package/types/nanahoshi-mona-ui-time-picker.d.ts +184 -0
- package/types/nanahoshi-mona-ui-time-selector.d.ts +143 -0
- package/types/nanahoshi-mona-ui-tooltip.d.ts +130 -0
- package/types/nanahoshi-mona-ui-tree-view.d.ts +274 -0
- package/types/nanahoshi-mona-ui-window.d.ts +295 -0
- package/types/nanahoshi-mona-ui.d.ts +2 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
4
|
+
import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective, FirstDayOfWeek } from '@nanahoshi/mona-ui/calendar';
|
|
5
|
+
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
6
|
+
import { DatePopupVariantInput, DateDisabledType } from '@nanahoshi/mona-ui/date-input';
|
|
7
|
+
import * as i1 from '@nanahoshi/mona-ui/dropdowns';
|
|
8
|
+
import { DropdownPopupInput } from '@nanahoshi/mona-ui/dropdowns';
|
|
9
|
+
import { VariantInputs, AttributeConfig } from '@nanahoshi/mona-ui/internal';
|
|
10
|
+
import { ListSizeInputType } from '@nanahoshi/mona-ui/internal/list';
|
|
11
|
+
import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
|
|
12
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
13
|
+
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
14
|
+
import { VariantProps } from 'class-variance-authority';
|
|
15
|
+
|
|
16
|
+
declare const datePickerBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
17
|
+
focused?: boolean | null | undefined;
|
|
18
|
+
rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
|
|
19
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
20
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
+
type DatePickerBaseVariantProps = VariantProps<ReturnType<typeof datePickerBaseThemeVariants>>;
|
|
22
|
+
type DatePickerBaseVariantInput = VariantInputs<DatePickerBaseVariantProps>;
|
|
23
|
+
type DatePickerVariantProps = DatePickerBaseVariantProps;
|
|
24
|
+
type DatePickerVariantInput = Omit<DatePickerBaseVariantInput, "focused">;
|
|
25
|
+
|
|
26
|
+
declare class DatePickerComponent implements FormValueControl<Date | null>, DropdownPopupInput, DatePickerVariantInput, DatePopupVariantInput {
|
|
27
|
+
#private;
|
|
28
|
+
protected readonly baseClass: _angular_core.Signal<string>;
|
|
29
|
+
protected readonly currentDateString: _angular_core.WritableSignal<string>;
|
|
30
|
+
protected readonly decadeCellTemplate: _angular_core.Signal<CalendarDecadeCellTemplateDirective | undefined>;
|
|
31
|
+
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
32
|
+
protected readonly inputAttributes: _angular_core.Signal<AttributeConfig>;
|
|
33
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
34
|
+
protected readonly monthCellTemplate: _angular_core.Signal<CalendarMonthCellTemplateDirective | undefined>;
|
|
35
|
+
protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
|
|
36
|
+
protected readonly pickerPopupClass: _angular_core.Signal<string>;
|
|
37
|
+
protected readonly popupId: string;
|
|
38
|
+
protected readonly popupTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
39
|
+
protected readonly prefixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
40
|
+
protected readonly yearCellTemplate: _angular_core.Signal<CalendarYearCellTemplateDirective | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* @description Emits when the popup is about to close. This event is preventable.
|
|
43
|
+
*/
|
|
44
|
+
readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
|
|
45
|
+
/**
|
|
46
|
+
* @description Emits after the popup is closed.
|
|
47
|
+
*/
|
|
48
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
49
|
+
/**
|
|
50
|
+
* @description Sets the disabled state of the date picker.
|
|
51
|
+
*/
|
|
52
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* @description Sets the disabled dates of the date picker.
|
|
55
|
+
* Accepts either an iterable of Date objects or a predicate function.
|
|
56
|
+
*/
|
|
57
|
+
readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
|
|
58
|
+
/**
|
|
59
|
+
* @description Sets the first day of the week.
|
|
60
|
+
*/
|
|
61
|
+
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
62
|
+
/**
|
|
63
|
+
* @description Sets the date format of the date picker.
|
|
64
|
+
*/
|
|
65
|
+
readonly format: _angular_core.InputSignal<string>;
|
|
66
|
+
/**
|
|
67
|
+
* @description Marks the date picker as invalid. When bound to a signal form field via `[formField]`,
|
|
68
|
+
* this is written by the `FormField` directive.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* @description Sets the maximum date of the date picker.
|
|
74
|
+
*/
|
|
75
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | undefined, unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Sets the minimum date of the date picker.
|
|
78
|
+
*/
|
|
79
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | undefined, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* @description Emits when the popup is about to open. This event is preventable.
|
|
82
|
+
*/
|
|
83
|
+
readonly open: _angular_core.OutputEmitterRef<PreventableEvent<Event>>;
|
|
84
|
+
/**
|
|
85
|
+
* @description Emits after the popup is opened.
|
|
86
|
+
*/
|
|
87
|
+
readonly opened: _angular_core.OutputEmitterRef<void>;
|
|
88
|
+
/**
|
|
89
|
+
* @description Sets the placeholder of the date picker.
|
|
90
|
+
*/
|
|
91
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
92
|
+
/**
|
|
93
|
+
* @description Sets the class of the popup element.
|
|
94
|
+
* @default ""
|
|
95
|
+
*/
|
|
96
|
+
readonly popupClass: _angular_core.InputSignal<string>;
|
|
97
|
+
/**
|
|
98
|
+
* @description Sets the height of the popup element.
|
|
99
|
+
* @default 200
|
|
100
|
+
*/
|
|
101
|
+
readonly popupHeight: _angular_core.InputSignal<ListSizeInputType>;
|
|
102
|
+
/**
|
|
103
|
+
* @description Sets the width of the popup element.
|
|
104
|
+
* @default null
|
|
105
|
+
*/
|
|
106
|
+
readonly popupWidth: _angular_core.InputSignal<ListSizeInputType>;
|
|
107
|
+
/**
|
|
108
|
+
* @description Sets the readonly state of the date picker.
|
|
109
|
+
*/
|
|
110
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* @description When true, the input is readonly but the calendar button remains enabled.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
readonly readonlyInput: _angular_core.InputSignal<boolean>;
|
|
116
|
+
/**
|
|
117
|
+
* @description Sets the required state of the date picker.
|
|
118
|
+
* When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* @description Sets the border radius of the date picker.
|
|
124
|
+
*/
|
|
125
|
+
readonly rounded: _angular_core.InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
126
|
+
/**
|
|
127
|
+
* @description Sets the visibility of the clear button.
|
|
128
|
+
*/
|
|
129
|
+
readonly showClearButton: _angular_core.InputSignal<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* @description Sets the size of the date picker.
|
|
132
|
+
*/
|
|
133
|
+
readonly size: _angular_core.InputSignal<"large" | "medium" | "small" | null | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* @description Emitted when the date picker is interacted with via blur, selection, or clear.
|
|
136
|
+
* The `FormField` directive listens to this to mark the field as touched.
|
|
137
|
+
*/
|
|
138
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
139
|
+
/**
|
|
140
|
+
* @description Sets the touched state of the date picker. When bound to a signal form field via `[formField]`,
|
|
141
|
+
* this is written by the `FormField` directive.
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
readonly touched: _angular_core.InputSignal<boolean>;
|
|
145
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
146
|
+
/**
|
|
147
|
+
* @description Two-way bindable current date value.
|
|
148
|
+
* @default null
|
|
149
|
+
*/
|
|
150
|
+
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
151
|
+
/**
|
|
152
|
+
* @description Enables the display of week numbers in the calendar.
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
readonly weekNumber: _angular_core.InputSignal<boolean>;
|
|
156
|
+
constructor();
|
|
157
|
+
protected onCalendarValueChange(date: Date | Date[] | null): void;
|
|
158
|
+
protected onDateInputBlur(): void;
|
|
159
|
+
protected onDateInputButtonClick(): void;
|
|
160
|
+
protected onDateStringEdit(dateString: string): void;
|
|
161
|
+
private closePopup;
|
|
162
|
+
private compareDatesEqual;
|
|
163
|
+
private dateStringEquals;
|
|
164
|
+
focus(): void;
|
|
165
|
+
private handleKeydown;
|
|
166
|
+
private isDateDisabledByInput;
|
|
167
|
+
private openPopup;
|
|
168
|
+
private setCurrentDate;
|
|
169
|
+
private setKeyboardSubscriptions;
|
|
170
|
+
private setPopupCloseSubscriptions;
|
|
171
|
+
private setSubscriptions;
|
|
172
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
173
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "mona-date-picker", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "prefixTemplate", "yearCellTemplate"], never, true, [{ directive: typeof i1.DropdownPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export { DatePickerComponent };
|
|
177
|
+
export type { DatePickerVariantInput, DatePickerVariantProps };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
4
|
+
import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective, FirstDayOfWeek } from '@nanahoshi/mona-ui/calendar';
|
|
5
|
+
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
6
|
+
import { DateDisabledType, HourFormat } from '@nanahoshi/mona-ui/date-input';
|
|
7
|
+
import * as i1 from '@nanahoshi/mona-ui/dropdowns';
|
|
8
|
+
import { DropdownPopupInput } from '@nanahoshi/mona-ui/dropdowns';
|
|
9
|
+
import { AttributeConfig } from '@nanahoshi/mona-ui/internal';
|
|
10
|
+
import { ListSizeInputType } from '@nanahoshi/mona-ui/internal/list';
|
|
11
|
+
import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
|
|
12
|
+
|
|
13
|
+
type ActiveView = "date" | "time";
|
|
14
|
+
|
|
15
|
+
declare class DateTimePickerComponent implements FormValueControl<Date | null>, DropdownPopupInput {
|
|
16
|
+
#private;
|
|
17
|
+
protected readonly activeView: _angular_core.WritableSignal<ActiveView>;
|
|
18
|
+
protected readonly baseClass: _angular_core.Signal<string>;
|
|
19
|
+
protected readonly currentDateString: _angular_core.WritableSignal<string>;
|
|
20
|
+
protected readonly decadeCellTemplate: _angular_core.Signal<CalendarDecadeCellTemplateDirective | undefined>;
|
|
21
|
+
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
22
|
+
protected readonly footerClass: _angular_core.Signal<string>;
|
|
23
|
+
protected readonly headerClass: _angular_core.Signal<string>;
|
|
24
|
+
protected readonly inputAttributes: _angular_core.Signal<AttributeConfig>;
|
|
25
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
26
|
+
protected readonly monthCellTemplate: _angular_core.Signal<CalendarMonthCellTemplateDirective | undefined>;
|
|
27
|
+
protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
|
|
28
|
+
protected readonly pickerPopupClass: _angular_core.Signal<string>;
|
|
29
|
+
protected readonly popupId: string;
|
|
30
|
+
protected readonly popupTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
31
|
+
protected readonly prefixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
32
|
+
protected readonly timePickerMax: _angular_core.Signal<Date | null>;
|
|
33
|
+
protected readonly timePickerMin: _angular_core.Signal<Date | null>;
|
|
34
|
+
protected readonly yearCellTemplate: _angular_core.Signal<CalendarYearCellTemplateDirective | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* @description Emits when the popup is about to close. This event is preventable.
|
|
37
|
+
*/
|
|
38
|
+
readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
|
|
39
|
+
/**
|
|
40
|
+
* @description Emits after the popup is closed.
|
|
41
|
+
*/
|
|
42
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
43
|
+
/**
|
|
44
|
+
* @description Sets the disabled state of the date time picker.
|
|
45
|
+
*/
|
|
46
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* @description Sets the disabled dates of the date time picker.
|
|
49
|
+
* Accepts either an iterable of Date objects or a predicate function.
|
|
50
|
+
*/
|
|
51
|
+
readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
|
|
52
|
+
/**
|
|
53
|
+
* @description Sets the first day of the week.
|
|
54
|
+
*/
|
|
55
|
+
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
56
|
+
/**
|
|
57
|
+
* @description Sets the date format of the date time picker.
|
|
58
|
+
*/
|
|
59
|
+
readonly format: _angular_core.InputSignal<string>;
|
|
60
|
+
/**
|
|
61
|
+
* @description Sets the hour format of the time picker.
|
|
62
|
+
* @default 24
|
|
63
|
+
*/
|
|
64
|
+
readonly hourFormat: _angular_core.InputSignal<HourFormat>;
|
|
65
|
+
/**
|
|
66
|
+
* @description Sets the hour step of the time picker.
|
|
67
|
+
* @default 1
|
|
68
|
+
*/
|
|
69
|
+
readonly hourStep: _angular_core.InputSignal<number>;
|
|
70
|
+
/**
|
|
71
|
+
* @description Marks the date time picker as invalid. When bound to a signal form field via `[formField]`,
|
|
72
|
+
* this is written by the `FormField` directive.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Sets the maximum date of the date time picker.
|
|
78
|
+
*/
|
|
79
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | undefined, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* @description Sets the minimum date of the date time picker.
|
|
82
|
+
*/
|
|
83
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | undefined, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* @description Sets the minute step of the time picker.
|
|
86
|
+
* @default 1
|
|
87
|
+
*/
|
|
88
|
+
readonly minuteStep: _angular_core.InputSignal<number>;
|
|
89
|
+
/**
|
|
90
|
+
* @description Emits when the popup is about to open. This event is preventable.
|
|
91
|
+
*/
|
|
92
|
+
readonly open: _angular_core.OutputEmitterRef<PreventableEvent<Event>>;
|
|
93
|
+
/**
|
|
94
|
+
* @description Emits after the popup is opened.
|
|
95
|
+
*/
|
|
96
|
+
readonly opened: _angular_core.OutputEmitterRef<void>;
|
|
97
|
+
/**
|
|
98
|
+
* @description Sets the placeholder of the date time picker.
|
|
99
|
+
*/
|
|
100
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
101
|
+
/**
|
|
102
|
+
* @description Sets the class of the popup element.
|
|
103
|
+
* @default ""
|
|
104
|
+
*/
|
|
105
|
+
readonly popupClass: _angular_core.InputSignal<string>;
|
|
106
|
+
/**
|
|
107
|
+
* @description Sets the height of the popup element.
|
|
108
|
+
* @default 200
|
|
109
|
+
*/
|
|
110
|
+
readonly popupHeight: _angular_core.InputSignal<ListSizeInputType>;
|
|
111
|
+
/**
|
|
112
|
+
* @description Sets the width of the popup element.
|
|
113
|
+
* @default null
|
|
114
|
+
*/
|
|
115
|
+
readonly popupWidth: _angular_core.InputSignal<ListSizeInputType>;
|
|
116
|
+
/**
|
|
117
|
+
* @description Sets the readonly state of the date time picker.
|
|
118
|
+
*/
|
|
119
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* @description When true, the input is readonly but the popup button remains enabled.
|
|
122
|
+
* @default false
|
|
123
|
+
*/
|
|
124
|
+
readonly readonlyInput: _angular_core.InputSignal<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* @description Sets the required state of the date time picker.
|
|
127
|
+
* When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
131
|
+
/**
|
|
132
|
+
* @description Sets the border radius of the date time picker.
|
|
133
|
+
*/
|
|
134
|
+
readonly rounded: _angular_core.InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
135
|
+
/**
|
|
136
|
+
* @description Sets the second step of the time picker.
|
|
137
|
+
* @default 1
|
|
138
|
+
*/
|
|
139
|
+
readonly secondStep: _angular_core.InputSignal<number>;
|
|
140
|
+
/**
|
|
141
|
+
* @description Sets the visibility of the clear button.
|
|
142
|
+
*/
|
|
143
|
+
readonly showClearButton: _angular_core.InputSignal<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* @description Sets the visibility of the second selector.
|
|
146
|
+
*/
|
|
147
|
+
readonly showSeconds: _angular_core.InputSignal<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* @description Sets the size of the date time picker.
|
|
150
|
+
*/
|
|
151
|
+
readonly size: _angular_core.InputSignal<"large" | "medium" | "small" | null | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* @description Emitted when the date time picker is interacted with via blur, selection, or clear.
|
|
154
|
+
* The `FormField` directive listens to this to mark the field as touched.
|
|
155
|
+
*/
|
|
156
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
157
|
+
/**
|
|
158
|
+
* @description Sets the touched state of the date time picker. When bound to a signal form field via `[formField]`,
|
|
159
|
+
* this is written by the `FormField` directive.
|
|
160
|
+
* @default false
|
|
161
|
+
*/
|
|
162
|
+
readonly touched: _angular_core.InputSignal<boolean>;
|
|
163
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
164
|
+
/**
|
|
165
|
+
* @description Two-way bindable current date time value.
|
|
166
|
+
* @default null
|
|
167
|
+
*/
|
|
168
|
+
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
169
|
+
/**
|
|
170
|
+
* @description Enables the display of week numbers in the calendar.
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
readonly weekNumber: _angular_core.InputSignal<boolean>;
|
|
174
|
+
constructor();
|
|
175
|
+
protected onCancelClick(): void;
|
|
176
|
+
protected onCalendarValueChange(date: Date | Date[] | null): void;
|
|
177
|
+
protected onDateInputBlur(): void;
|
|
178
|
+
protected onDateInputButtonClick(): void;
|
|
179
|
+
protected onDateStringEdit(dateString: string): void;
|
|
180
|
+
protected onSetDateClick(): void;
|
|
181
|
+
protected onTimeSelectorValueChange(date: Date | null): void;
|
|
182
|
+
private compareDatesEqual;
|
|
183
|
+
private dateStringEquals;
|
|
184
|
+
focus(): void;
|
|
185
|
+
private isDateDisabledByInput;
|
|
186
|
+
private setCurrentDate;
|
|
187
|
+
private closePopup;
|
|
188
|
+
private handleKeydown;
|
|
189
|
+
private openPopup;
|
|
190
|
+
private setKeyboardSubscriptions;
|
|
191
|
+
private setPopupCloseSubscriptions;
|
|
192
|
+
private setSubscriptions;
|
|
193
|
+
private updateDateIfNotInRange;
|
|
194
|
+
private updateCurrentDateString;
|
|
195
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateTimePickerComponent, never>;
|
|
196
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateTimePickerComponent, "mona-datetime-picker", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "hourStep": { "alias": "hourStep"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "secondStep": { "alias": "secondStep"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "prefixTemplate", "yearCellTemplate"], never, true, [{ directive: typeof i1.DropdownPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export { DateTimePickerComponent };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef, TemplateRef, ComponentRef } from '@angular/core';
|
|
3
|
+
import { PopupCloseEvent, PopupRef } from '@nanahoshi/mona-ui/popup';
|
|
4
|
+
import { ButtonVariantProps } from '@nanahoshi/mona-ui/button';
|
|
5
|
+
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
9
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
11
|
+
|
|
12
|
+
type ActionsLayout = "end" | "center" | "start" | "stretched";
|
|
13
|
+
|
|
14
|
+
interface DialogAction<T = unknown> {
|
|
15
|
+
cssClass?: string;
|
|
16
|
+
data?: T;
|
|
17
|
+
iconOnly?: boolean;
|
|
18
|
+
look?: ButtonVariantProps["look"];
|
|
19
|
+
rounded?: ButtonVariantProps["rounded"];
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description Emitted when the user clicks a dialog action button. Call `preventDefault()` to keep the dialog open.
|
|
25
|
+
*/
|
|
26
|
+
declare class DialogActionEvent<T = unknown> extends PreventableEvent {
|
|
27
|
+
#private;
|
|
28
|
+
constructor(action: DialogAction<T>);
|
|
29
|
+
/**
|
|
30
|
+
* @description The action that was clicked.
|
|
31
|
+
*/
|
|
32
|
+
get action(): DialogAction<T>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const dialogBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
36
|
+
rounded?: "large" | "medium" | "none" | "small" | null | undefined;
|
|
37
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
|
+
declare const dialogIconThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
39
|
+
type?: "success" | "error" | "warning" | "info" | "confirm" | null | undefined;
|
|
40
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
41
|
+
declare const dialogIconContainerThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
42
|
+
type DialogBaseVariantProps = VariantProps<ReturnType<typeof dialogBaseThemeVariants>>;
|
|
43
|
+
type DialogBaseVariantInput = VariantInputs<DialogBaseVariantProps>;
|
|
44
|
+
type DialogIconContainerVariantProps = VariantProps<ReturnType<typeof dialogIconContainerThemeVariants>>;
|
|
45
|
+
type DialogIconContainerVariantInput = VariantInputs<DialogIconContainerVariantProps>;
|
|
46
|
+
type DialogIconVariantProps = VariantProps<ReturnType<typeof dialogIconThemeVariants>>;
|
|
47
|
+
type DialogIconVariantInput = VariantInputs<DialogIconVariantProps>;
|
|
48
|
+
type DialogVariantProps = DialogBaseVariantProps & DialogIconContainerVariantProps & DialogIconVariantProps;
|
|
49
|
+
type DialogVariantInput = DialogBaseVariantInput & DialogIconContainerVariantInput & DialogIconVariantInput;
|
|
50
|
+
|
|
51
|
+
declare class DialogComponent implements DialogVariantInput {
|
|
52
|
+
#private;
|
|
53
|
+
private readonly contentTemplate;
|
|
54
|
+
private readonly descriptionTemplate;
|
|
55
|
+
private readonly footerTemplate;
|
|
56
|
+
private readonly iconTemplate;
|
|
57
|
+
private readonly titleTemplate;
|
|
58
|
+
/**
|
|
59
|
+
* @description Emitted when the user clicks an action button. Call `event.preventDefault()` on the emitted
|
|
60
|
+
* `DialogActionEvent` to keep the dialog open.
|
|
61
|
+
*/
|
|
62
|
+
readonly action: _angular_core.OutputEmitterRef<DialogActionEvent<unknown>>;
|
|
63
|
+
/**
|
|
64
|
+
* @description Sets the actions of the dialog.
|
|
65
|
+
* @default []
|
|
66
|
+
*/
|
|
67
|
+
readonly actions: _angular_core.InputSignal<Iterable<DialogAction<unknown>>>;
|
|
68
|
+
/**
|
|
69
|
+
* @description Sets the layout of the actions in the dialog footer.
|
|
70
|
+
* @default "end"
|
|
71
|
+
*/
|
|
72
|
+
readonly actionsLayout: _angular_core.InputSignal<ActionsLayout>;
|
|
73
|
+
/**
|
|
74
|
+
* @description Sets the visibility of the close button in the dialog header.
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
readonly closable: _angular_core.InputSignal<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* @description Emits when the user clicks on the close button or presses the escape key.
|
|
80
|
+
* This event is preventable.
|
|
81
|
+
*/
|
|
82
|
+
readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
|
|
83
|
+
/**
|
|
84
|
+
* @description Emits when the dialog is closed.
|
|
85
|
+
*/
|
|
86
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
87
|
+
/**
|
|
88
|
+
* @description Sets whether the dialog should close when the escape key is pressed.
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
92
|
+
/**
|
|
93
|
+
* @description Sets the description of the dialog.
|
|
94
|
+
*/
|
|
95
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* @description Sets the element that should receive focus when the dialog is opened. When omitted, focus
|
|
98
|
+
* moves to the first focusable element automatically.
|
|
99
|
+
*/
|
|
100
|
+
readonly focusedElement: _angular_core.InputSignal<string | HTMLElement | ElementRef<HTMLElement> | null | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* @description Sets the height of the dialog.
|
|
103
|
+
*/
|
|
104
|
+
readonly height: _angular_core.InputSignal<number | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* @description Sets the left position of the dialog.
|
|
107
|
+
*/
|
|
108
|
+
readonly left: _angular_core.InputSignal<number | undefined>;
|
|
109
|
+
/**
|
|
110
|
+
* @description Sets the maximum height of the dialog.
|
|
111
|
+
*/
|
|
112
|
+
readonly maxHeight: _angular_core.InputSignal<number | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* @description Sets the maximum width of the dialog.
|
|
115
|
+
*/
|
|
116
|
+
readonly maxWidth: _angular_core.InputSignal<number | undefined>;
|
|
117
|
+
/**
|
|
118
|
+
* @description Sets the minimum height of the dialog.
|
|
119
|
+
*/
|
|
120
|
+
readonly minHeight: _angular_core.InputSignal<number | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* @description Sets the minimum width of the dialog.
|
|
123
|
+
*/
|
|
124
|
+
readonly minWidth: _angular_core.InputSignal<number | undefined>;
|
|
125
|
+
/**
|
|
126
|
+
* @description Sets whether the dialog should have an overlay behind it.
|
|
127
|
+
* @default true
|
|
128
|
+
*/
|
|
129
|
+
readonly modal: _angular_core.InputSignal<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* @description Border-radius preset applied to the component.
|
|
132
|
+
* @default "medium"
|
|
133
|
+
*/
|
|
134
|
+
readonly rounded: _angular_core.InputSignal<"large" | "medium" | "none" | "small" | null | undefined>;
|
|
135
|
+
/**
|
|
136
|
+
* @description Primary text content displayed by the component.
|
|
137
|
+
*/
|
|
138
|
+
readonly text: _angular_core.InputSignal<string | undefined>;
|
|
139
|
+
/**
|
|
140
|
+
* @description Title text displayed in the component header or trigger.
|
|
141
|
+
*/
|
|
142
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* @description Sets the top position of the dialog.
|
|
145
|
+
*/
|
|
146
|
+
readonly top: _angular_core.InputSignal<number | undefined>;
|
|
147
|
+
/**
|
|
148
|
+
* @description Visual severity type of the dialog, controlling its icon and semantic role. Set to `null` to
|
|
149
|
+
* render the dialog without an icon.
|
|
150
|
+
* @default "info"
|
|
151
|
+
*/
|
|
152
|
+
readonly type: _angular_core.InputSignal<"success" | "error" | "warning" | "info" | "confirm" | null | undefined>;
|
|
153
|
+
/**
|
|
154
|
+
* @description Sets the width of the dialog.
|
|
155
|
+
*/
|
|
156
|
+
readonly width: _angular_core.InputSignal<number | undefined>;
|
|
157
|
+
constructor();
|
|
158
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogComponent, never>;
|
|
159
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogComponent, "mona-dialog", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "focusedElement": { "alias": "focusedElement"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "left": { "alias": "left"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "top": { "alias": "top"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "action": "action"; "close": "close"; "closed": "closed"; }, ["contentTemplate", "descriptionTemplate", "footerTemplate", "iconTemplate", "titleTemplate"], never, true, never>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare class DialogContentTemplateDirective {
|
|
163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogContentTemplateDirective, never>;
|
|
164
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DialogContentTemplateDirective, "ng-template[monaDialogContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class DialogDescriptionTemplateDirective {
|
|
168
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogDescriptionTemplateDirective, never>;
|
|
169
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DialogDescriptionTemplateDirective, "ng-template[monaDialogDescriptionTemplate]", never, {}, {}, never, never, true, never>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class DialogFooterTemplateDirective {
|
|
173
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogFooterTemplateDirective, never>;
|
|
174
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DialogFooterTemplateDirective, "ng-template[monaDialogFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare class DialogIconTemplateDirective {
|
|
178
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogIconTemplateDirective, never>;
|
|
179
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DialogIconTemplateDirective, "ng-template[monaDialogIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare class DialogTitleTemplateDirective {
|
|
183
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogTitleTemplateDirective, never>;
|
|
184
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DialogTitleTemplateDirective, "ng-template[monaDialogTitleTemplate]", never, {}, {}, never, never, true, never>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type DialogResult = {
|
|
188
|
+
viaClose: true;
|
|
189
|
+
} | {
|
|
190
|
+
viaClose: false;
|
|
191
|
+
action: DialogAction;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
interface DialogSettings {
|
|
195
|
+
actions?: Iterable<DialogAction>;
|
|
196
|
+
actionsLayout?: ActionsLayout;
|
|
197
|
+
closable?: boolean;
|
|
198
|
+
closeOnEscape?: boolean;
|
|
199
|
+
content?: TemplateRef<unknown>;
|
|
200
|
+
description?: string;
|
|
201
|
+
descriptionTemplate?: TemplateRef<unknown>;
|
|
202
|
+
focusedElement?: HTMLElement | ElementRef<HTMLElement> | string | null;
|
|
203
|
+
footerTemplate?: TemplateRef<unknown>;
|
|
204
|
+
height?: number;
|
|
205
|
+
iconTemplate?: TemplateRef<unknown>;
|
|
206
|
+
left?: number;
|
|
207
|
+
maxHeight?: number;
|
|
208
|
+
maxWidth?: number;
|
|
209
|
+
minHeight?: number;
|
|
210
|
+
minWidth?: number;
|
|
211
|
+
modal?: boolean;
|
|
212
|
+
rounded?: DialogVariantProps["rounded"];
|
|
213
|
+
text?: string;
|
|
214
|
+
title?: string;
|
|
215
|
+
titleTemplate?: TemplateRef<unknown>;
|
|
216
|
+
top?: number;
|
|
217
|
+
type?: DialogVariantProps["type"];
|
|
218
|
+
width?: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
interface DialogRefParams<R = unknown> {
|
|
222
|
+
close: (result?: R) => void;
|
|
223
|
+
update: (data: Partial<DialogSettings>) => void;
|
|
224
|
+
get close$(): Observable<PopupCloseEvent<R>>;
|
|
225
|
+
get closed$(): Observable<void>;
|
|
226
|
+
get component(): ComponentRef<unknown> | null;
|
|
227
|
+
get element(): HTMLElement;
|
|
228
|
+
get height(): number;
|
|
229
|
+
get popupRef(): PopupRef;
|
|
230
|
+
get result(): Observable<DialogResult>;
|
|
231
|
+
get width(): number;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare class DialogRef<R = unknown> implements DialogRefParams<R> {
|
|
235
|
+
#private;
|
|
236
|
+
constructor(options: DialogRefParams<R>);
|
|
237
|
+
close(result?: R): void;
|
|
238
|
+
/**
|
|
239
|
+
* @description Updates the dialog's content and appearance in place without closing and reopening it.
|
|
240
|
+
* Only the fields provided are changed; anything omitted keeps its current value.
|
|
241
|
+
*/
|
|
242
|
+
update(data: Partial<DialogSettings>): void;
|
|
243
|
+
get close$(): Observable<PopupCloseEvent<R>>;
|
|
244
|
+
get closed$(): Observable<void>;
|
|
245
|
+
get component(): ComponentRef<unknown> | null;
|
|
246
|
+
get element(): HTMLElement;
|
|
247
|
+
get height(): number;
|
|
248
|
+
get popupRef(): PopupRef;
|
|
249
|
+
get result(): Observable<DialogResult>;
|
|
250
|
+
get width(): number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class DialogService {
|
|
254
|
+
#private;
|
|
255
|
+
show(settings: DialogSettings): DialogRef;
|
|
256
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
|
|
257
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogService>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export { DialogActionEvent, DialogComponent, DialogContentTemplateDirective, DialogDescriptionTemplateDirective, DialogFooterTemplateDirective, DialogIconTemplateDirective, DialogRef, DialogService, DialogTitleTemplateDirective };
|
|
261
|
+
export type { ActionsLayout, DialogAction, DialogResult, DialogSettings, DialogVariantProps };
|