ng-primitives 0.120.5 → 0.121.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/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +30 -47
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +66 -119
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +70 -108
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +33 -49
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +12 -12
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +83 -149
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +42 -87
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +81 -57
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +50 -81
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +19 -19
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +15 -14
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +78 -77
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +21 -20
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +67 -66
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +72 -71
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +3 -2
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +19 -3
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +61 -60
- package/{select/index.d.ts → types/ng-primitives-select.d.ts} +39 -38
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +59 -58
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +45 -44
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +2 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +69 -68
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +48 -47
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/tooltip/index.d.ts +0 -376
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +0 -0
- /package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +0 -0
- /package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +0 -0
- /package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{input/index.d.ts → types/ng-primitives-input.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +0 -0
- /package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +0 -0
- /package/{state/index.d.ts → types/ng-primitives-state.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +0 -0
- /package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { WritableSignal, Signal } from '@angular/core';
|
|
3
|
+
import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as rxjs from 'rxjs';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The `NgpPaginationButton` directive is used to create a pagination button.
|
|
10
|
+
*/
|
|
11
|
+
declare class NgpPaginationButton {
|
|
12
|
+
/**
|
|
13
|
+
* Define the page this button represents.
|
|
14
|
+
*/
|
|
15
|
+
readonly page: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the button is disabled.
|
|
18
|
+
*/
|
|
19
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
20
|
+
protected readonly state: {
|
|
21
|
+
page: _angular_core.Signal<number>;
|
|
22
|
+
disabled: _angular_core.Signal<boolean>;
|
|
23
|
+
goToPage: () => void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Go to the page this button represents.
|
|
27
|
+
*/
|
|
28
|
+
goToPage(): void;
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPaginationButton, never>;
|
|
30
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPaginationButton, "[ngpPaginationButton]", ["ngpPaginationButton"], { "page": { "alias": "ngpPaginationButtonPage"; "required": true; "isSignal": true; }; "disabled": { "alias": "ngpPaginationButtonDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The `NgpPaginationFirst` directive is used to create a pagination button that navigates to the first page.
|
|
35
|
+
*/
|
|
36
|
+
declare class NgpPaginationFirst {
|
|
37
|
+
/**
|
|
38
|
+
* Whether the button is disabled.
|
|
39
|
+
*/
|
|
40
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
41
|
+
protected readonly state: {
|
|
42
|
+
disabled: _angular_core.Signal<boolean>;
|
|
43
|
+
goToFirstPage: () => void;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Go to the first page.
|
|
47
|
+
*/
|
|
48
|
+
goToFirstPage(): void;
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPaginationFirst, never>;
|
|
50
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPaginationFirst, "[ngpPaginationFirst]", ["ngpPaginationFirst"], { "disabled": { "alias": "ngpPaginationFirstDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The `NgpPaginationLast` directive is used to create a pagination button that navigates to the last page.
|
|
55
|
+
*/
|
|
56
|
+
declare class NgpPaginationLast {
|
|
57
|
+
/**
|
|
58
|
+
* Whether the button is disabled.
|
|
59
|
+
*/
|
|
60
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
61
|
+
protected readonly state: {
|
|
62
|
+
disabled: _angular_core.Signal<boolean>;
|
|
63
|
+
goToLastPage: () => void;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Go to the last page.
|
|
67
|
+
*/
|
|
68
|
+
goToLastPage(): void;
|
|
69
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPaginationLast, never>;
|
|
70
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPaginationLast, "[ngpPaginationLast]", ["ngpPaginationLast"], { "disabled": { "alias": "ngpPaginationLastDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The `NgpPaginationNext` directive is used to create a pagination button that navigates to the next page.
|
|
75
|
+
*/
|
|
76
|
+
declare class NgpPaginationNext {
|
|
77
|
+
/**
|
|
78
|
+
* Whether the button is disabled.
|
|
79
|
+
*/
|
|
80
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
81
|
+
protected readonly state: {
|
|
82
|
+
disabled: _angular_core.Signal<boolean>;
|
|
83
|
+
goToNextPage: () => void;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Go to the next page.
|
|
87
|
+
*/
|
|
88
|
+
goToNextPage(): void;
|
|
89
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPaginationNext, never>;
|
|
90
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPaginationNext, "[ngpPaginationNext]", ["ngpPaginationNext"], { "disabled": { "alias": "ngpPaginationNextDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The `NgpPaginationPrevious` directive is used to create a pagination button that navigates to the previous page.
|
|
95
|
+
*/
|
|
96
|
+
declare class NgpPaginationPrevious {
|
|
97
|
+
/**
|
|
98
|
+
* Whether the button is disabled.
|
|
99
|
+
*/
|
|
100
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
101
|
+
protected readonly state: {
|
|
102
|
+
disabled: _angular_core.Signal<boolean>;
|
|
103
|
+
goToPreviousPage: () => void;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Go to the previous page.
|
|
107
|
+
*/
|
|
108
|
+
goToPreviousPage(): void;
|
|
109
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPaginationPrevious, never>;
|
|
110
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPaginationPrevious, "[ngpPaginationPrevious]", ["ngpPaginationPrevious"], { "disabled": { "alias": "ngpPaginationPreviousDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The `NgpPagination` directive is used to create a pagination control.
|
|
115
|
+
*/
|
|
116
|
+
declare class NgpPagination {
|
|
117
|
+
/**
|
|
118
|
+
* The currently selected page. Leave unset for uncontrolled usage, where the
|
|
119
|
+
* internal state is seeded from `defaultPage`.
|
|
120
|
+
*/
|
|
121
|
+
readonly page: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
122
|
+
/**
|
|
123
|
+
* The default page for uncontrolled usage.
|
|
124
|
+
* @default 1
|
|
125
|
+
*/
|
|
126
|
+
readonly defaultPage: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
127
|
+
/**
|
|
128
|
+
* The event that is fired when the page changes.
|
|
129
|
+
*/
|
|
130
|
+
readonly pageChange: _angular_core.OutputEmitterRef<number>;
|
|
131
|
+
/**
|
|
132
|
+
* The total number of pages.
|
|
133
|
+
*/
|
|
134
|
+
readonly pageCount: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
135
|
+
/**
|
|
136
|
+
* Whether the pagination is disabled.
|
|
137
|
+
*/
|
|
138
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
139
|
+
/**
|
|
140
|
+
* The control state for the pagination.
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
protected readonly state: {
|
|
144
|
+
page: _angular_core.WritableSignal<number>;
|
|
145
|
+
pageCount: _angular_core.Signal<number>;
|
|
146
|
+
pageChange: rxjs.Observable<number>;
|
|
147
|
+
disabled: _angular_core.Signal<boolean>;
|
|
148
|
+
firstPage: _angular_core.Signal<boolean>;
|
|
149
|
+
lastPage: _angular_core.Signal<boolean>;
|
|
150
|
+
goToPage: (page: number) => void;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Go to the specified page.
|
|
154
|
+
* @param page The page to go to.
|
|
155
|
+
*/
|
|
156
|
+
goToPage(page: number): void;
|
|
157
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpPagination, never>;
|
|
158
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpPagination, "[ngpPagination]", ["ngpPagination"], { "page": { "alias": "ngpPaginationPage"; "required": false; "isSignal": true; }; "defaultPage": { "alias": "ngpPaginationDefaultPage"; "required": false; "isSignal": true; }; "pageCount": { "alias": "ngpPaginationPageCount"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpPaginationDisabled"; "required": false; "isSignal": true; }; }, { "pageChange": "ngpPaginationPageChange"; }, never, never, true, never>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
interface NgpPaginationState {
|
|
162
|
+
/**
|
|
163
|
+
* The currently selected page.
|
|
164
|
+
*/
|
|
165
|
+
readonly page: WritableSignal<number>;
|
|
166
|
+
/**
|
|
167
|
+
* The total number of pages.
|
|
168
|
+
*/
|
|
169
|
+
readonly pageCount: Signal<number>;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the pagination is disabled.
|
|
172
|
+
*/
|
|
173
|
+
readonly disabled: Signal<boolean>;
|
|
174
|
+
/**
|
|
175
|
+
* Determine if we are on the first page.
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
readonly firstPage: Signal<boolean>;
|
|
179
|
+
/**
|
|
180
|
+
* Determine if we are on the last page.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
readonly lastPage: Signal<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* The event that is fired when the page changes.
|
|
186
|
+
*/
|
|
187
|
+
readonly pageChange: Observable<number>;
|
|
188
|
+
/**
|
|
189
|
+
* Go to the specified page.
|
|
190
|
+
* @param page The page to go to.
|
|
191
|
+
*/
|
|
192
|
+
goToPage: (page: number) => void;
|
|
193
|
+
}
|
|
194
|
+
interface NgpPaginationProps {
|
|
195
|
+
/**
|
|
196
|
+
* The currently selected page. When `undefined`, the pagination is uncontrolled
|
|
197
|
+
* and seeds from `defaultPage`.
|
|
198
|
+
*/
|
|
199
|
+
readonly page?: Signal<number | undefined>;
|
|
200
|
+
/**
|
|
201
|
+
* The default page for uncontrolled usage.
|
|
202
|
+
*/
|
|
203
|
+
readonly defaultPage?: Signal<number>;
|
|
204
|
+
/**
|
|
205
|
+
* The total number of pages.
|
|
206
|
+
*/
|
|
207
|
+
readonly pageCount?: Signal<number>;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the pagination is disabled.
|
|
210
|
+
*/
|
|
211
|
+
readonly disabled?: Signal<boolean>;
|
|
212
|
+
/** Callback fired when the page state changes. */
|
|
213
|
+
onPageChange: (page: number) => void;
|
|
214
|
+
}
|
|
215
|
+
declare const NgpPaginationStateToken: _angular_core.InjectionToken<WritableSignal<{
|
|
216
|
+
page: WritableSignal<number>;
|
|
217
|
+
pageCount: Signal<number>;
|
|
218
|
+
pageChange: Observable<number>;
|
|
219
|
+
disabled: Signal<boolean>;
|
|
220
|
+
firstPage: Signal<boolean>;
|
|
221
|
+
lastPage: Signal<boolean>;
|
|
222
|
+
goToPage: (page: number) => void;
|
|
223
|
+
}>>;
|
|
224
|
+
declare const ngpPagination: ({ page: _page, defaultPage: _defaultPage, pageCount: _pageCount, disabled: _disabled, onPageChange, }: NgpPaginationProps) => {
|
|
225
|
+
page: WritableSignal<number>;
|
|
226
|
+
pageCount: Signal<number>;
|
|
227
|
+
pageChange: Observable<number>;
|
|
228
|
+
disabled: Signal<boolean>;
|
|
229
|
+
firstPage: Signal<boolean>;
|
|
230
|
+
lastPage: Signal<boolean>;
|
|
231
|
+
goToPage: (page: number) => void;
|
|
232
|
+
};
|
|
233
|
+
declare const injectPaginationState: {
|
|
234
|
+
(): Signal<{
|
|
235
|
+
page: WritableSignal<number>;
|
|
236
|
+
pageCount: Signal<number>;
|
|
237
|
+
pageChange: Observable<number>;
|
|
238
|
+
disabled: Signal<boolean>;
|
|
239
|
+
firstPage: Signal<boolean>;
|
|
240
|
+
lastPage: Signal<boolean>;
|
|
241
|
+
goToPage: (page: number) => void;
|
|
242
|
+
}>;
|
|
243
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
244
|
+
page: WritableSignal<number>;
|
|
245
|
+
pageCount: Signal<number>;
|
|
246
|
+
pageChange: Observable<number>;
|
|
247
|
+
disabled: Signal<boolean>;
|
|
248
|
+
firstPage: Signal<boolean>;
|
|
249
|
+
lastPage: Signal<boolean>;
|
|
250
|
+
goToPage: (page: number) => void;
|
|
251
|
+
} | null>;
|
|
252
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
253
|
+
page: WritableSignal<number>;
|
|
254
|
+
pageCount: Signal<number>;
|
|
255
|
+
pageChange: Observable<number>;
|
|
256
|
+
disabled: Signal<boolean>;
|
|
257
|
+
firstPage: Signal<boolean>;
|
|
258
|
+
lastPage: Signal<boolean>;
|
|
259
|
+
goToPage: (page: number) => void;
|
|
260
|
+
}> | Signal<{
|
|
261
|
+
page: WritableSignal<number>;
|
|
262
|
+
pageCount: Signal<number>;
|
|
263
|
+
pageChange: Observable<number>;
|
|
264
|
+
disabled: Signal<boolean>;
|
|
265
|
+
firstPage: Signal<boolean>;
|
|
266
|
+
lastPage: Signal<boolean>;
|
|
267
|
+
goToPage: (page: number) => void;
|
|
268
|
+
} | null>;
|
|
269
|
+
};
|
|
270
|
+
declare const providePaginationState: (opts?: {
|
|
271
|
+
inherit?: boolean;
|
|
272
|
+
}) => _angular_core.FactoryProvider;
|
|
273
|
+
|
|
274
|
+
interface NgpPaginationButtonState {
|
|
275
|
+
/**
|
|
276
|
+
* Define the page this button represents.
|
|
277
|
+
*/
|
|
278
|
+
readonly page: Signal<number>;
|
|
279
|
+
/**
|
|
280
|
+
* Whether the button is disabled, accounting for the parent pagination state.
|
|
281
|
+
*/
|
|
282
|
+
readonly disabled: Signal<boolean>;
|
|
283
|
+
/**
|
|
284
|
+
* Go to the page this button represents.
|
|
285
|
+
*/
|
|
286
|
+
goToPage(): void;
|
|
287
|
+
}
|
|
288
|
+
interface NgpPaginationButtonProps {
|
|
289
|
+
/**
|
|
290
|
+
* Define the page this button represents.
|
|
291
|
+
*/
|
|
292
|
+
readonly page?: Signal<number>;
|
|
293
|
+
/**
|
|
294
|
+
* Whether the button is disabled.
|
|
295
|
+
*/
|
|
296
|
+
readonly disabled?: Signal<boolean>;
|
|
297
|
+
}
|
|
298
|
+
declare const NgpPaginationButtonStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
299
|
+
page: Signal<number>;
|
|
300
|
+
disabled: Signal<boolean>;
|
|
301
|
+
goToPage: () => void;
|
|
302
|
+
}>>;
|
|
303
|
+
declare const ngpPaginationButton: ({ page, disabled: _disabled, }: NgpPaginationButtonProps) => {
|
|
304
|
+
page: Signal<number>;
|
|
305
|
+
disabled: Signal<boolean>;
|
|
306
|
+
goToPage: () => void;
|
|
307
|
+
};
|
|
308
|
+
declare const injectPaginationButtonState: {
|
|
309
|
+
(): Signal<{
|
|
310
|
+
page: Signal<number>;
|
|
311
|
+
disabled: Signal<boolean>;
|
|
312
|
+
goToPage: () => void;
|
|
313
|
+
}>;
|
|
314
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
315
|
+
page: Signal<number>;
|
|
316
|
+
disabled: Signal<boolean>;
|
|
317
|
+
goToPage: () => void;
|
|
318
|
+
} | null>;
|
|
319
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
320
|
+
page: Signal<number>;
|
|
321
|
+
disabled: Signal<boolean>;
|
|
322
|
+
goToPage: () => void;
|
|
323
|
+
}> | Signal<{
|
|
324
|
+
page: Signal<number>;
|
|
325
|
+
disabled: Signal<boolean>;
|
|
326
|
+
goToPage: () => void;
|
|
327
|
+
} | null>;
|
|
328
|
+
};
|
|
329
|
+
declare const providePaginationButtonState: (opts?: {
|
|
330
|
+
inherit?: boolean;
|
|
331
|
+
}) => _angular_core.FactoryProvider;
|
|
332
|
+
|
|
333
|
+
interface NgpPaginationFirstState {
|
|
334
|
+
/**
|
|
335
|
+
* Whether the button is disabled, accounting for the parent pagination state.
|
|
336
|
+
*/
|
|
337
|
+
readonly disabled: Signal<boolean>;
|
|
338
|
+
/**
|
|
339
|
+
* Go to the first page.
|
|
340
|
+
*/
|
|
341
|
+
goToFirstPage(): void;
|
|
342
|
+
}
|
|
343
|
+
interface NgpPaginationFirstProps {
|
|
344
|
+
/**
|
|
345
|
+
* Whether the button is disabled.
|
|
346
|
+
*/
|
|
347
|
+
readonly disabled?: Signal<boolean>;
|
|
348
|
+
}
|
|
349
|
+
declare const NgpPaginationFirstStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
350
|
+
disabled: Signal<boolean>;
|
|
351
|
+
goToFirstPage: () => void;
|
|
352
|
+
}>>;
|
|
353
|
+
declare const ngpPaginationFirst: ({ disabled: _disabled }: NgpPaginationFirstProps) => {
|
|
354
|
+
disabled: Signal<boolean>;
|
|
355
|
+
goToFirstPage: () => void;
|
|
356
|
+
};
|
|
357
|
+
declare const injectPaginationFirstState: {
|
|
358
|
+
(): Signal<{
|
|
359
|
+
disabled: Signal<boolean>;
|
|
360
|
+
goToFirstPage: () => void;
|
|
361
|
+
}>;
|
|
362
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
363
|
+
disabled: Signal<boolean>;
|
|
364
|
+
goToFirstPage: () => void;
|
|
365
|
+
} | null>;
|
|
366
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
367
|
+
disabled: Signal<boolean>;
|
|
368
|
+
goToFirstPage: () => void;
|
|
369
|
+
}> | Signal<{
|
|
370
|
+
disabled: Signal<boolean>;
|
|
371
|
+
goToFirstPage: () => void;
|
|
372
|
+
} | null>;
|
|
373
|
+
};
|
|
374
|
+
declare const providePaginationFirstState: (opts?: {
|
|
375
|
+
inherit?: boolean;
|
|
376
|
+
}) => _angular_core.FactoryProvider;
|
|
377
|
+
|
|
378
|
+
interface NgpPaginationLastState {
|
|
379
|
+
/** Whether the button is disabled, accounting for the parent pagination state. */
|
|
380
|
+
readonly disabled: Signal<boolean>;
|
|
381
|
+
/** Go to the last page. */
|
|
382
|
+
goToLastPage(): void;
|
|
383
|
+
}
|
|
384
|
+
interface NgpPaginationLastProps {
|
|
385
|
+
/** Whether the button is disabled. */
|
|
386
|
+
readonly disabled?: Signal<boolean>;
|
|
387
|
+
}
|
|
388
|
+
declare const NgpPaginationLastStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
389
|
+
disabled: Signal<boolean>;
|
|
390
|
+
goToLastPage: () => void;
|
|
391
|
+
}>>;
|
|
392
|
+
declare const ngpPaginationLast: ({ disabled: _disabled }: NgpPaginationLastProps) => {
|
|
393
|
+
disabled: Signal<boolean>;
|
|
394
|
+
goToLastPage: () => void;
|
|
395
|
+
};
|
|
396
|
+
declare const injectPaginationLastState: {
|
|
397
|
+
(): Signal<{
|
|
398
|
+
disabled: Signal<boolean>;
|
|
399
|
+
goToLastPage: () => void;
|
|
400
|
+
}>;
|
|
401
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
402
|
+
disabled: Signal<boolean>;
|
|
403
|
+
goToLastPage: () => void;
|
|
404
|
+
} | null>;
|
|
405
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
406
|
+
disabled: Signal<boolean>;
|
|
407
|
+
goToLastPage: () => void;
|
|
408
|
+
}> | Signal<{
|
|
409
|
+
disabled: Signal<boolean>;
|
|
410
|
+
goToLastPage: () => void;
|
|
411
|
+
} | null>;
|
|
412
|
+
};
|
|
413
|
+
declare const providePaginationLastState: (opts?: {
|
|
414
|
+
inherit?: boolean;
|
|
415
|
+
}) => _angular_core.FactoryProvider;
|
|
416
|
+
|
|
417
|
+
interface NgpPaginationNextState {
|
|
418
|
+
/** Whether the button is disabled, accounting for the parent pagination state. */
|
|
419
|
+
readonly disabled: Signal<boolean>;
|
|
420
|
+
/** Go to the next page. */
|
|
421
|
+
goToNextPage(): void;
|
|
422
|
+
}
|
|
423
|
+
interface NgpPaginationNextProps {
|
|
424
|
+
/** Whether the button is disabled */
|
|
425
|
+
readonly disabled?: Signal<boolean>;
|
|
426
|
+
}
|
|
427
|
+
declare const NgpPaginationNextStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
428
|
+
disabled: Signal<boolean>;
|
|
429
|
+
goToNextPage: () => void;
|
|
430
|
+
}>>;
|
|
431
|
+
declare const ngpPaginationNext: ({ disabled: _disabled }: NgpPaginationNextProps) => {
|
|
432
|
+
disabled: Signal<boolean>;
|
|
433
|
+
goToNextPage: () => void;
|
|
434
|
+
};
|
|
435
|
+
declare const injectPaginationNextState: {
|
|
436
|
+
(): Signal<{
|
|
437
|
+
disabled: Signal<boolean>;
|
|
438
|
+
goToNextPage: () => void;
|
|
439
|
+
}>;
|
|
440
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
441
|
+
disabled: Signal<boolean>;
|
|
442
|
+
goToNextPage: () => void;
|
|
443
|
+
} | null>;
|
|
444
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
445
|
+
disabled: Signal<boolean>;
|
|
446
|
+
goToNextPage: () => void;
|
|
447
|
+
}> | Signal<{
|
|
448
|
+
disabled: Signal<boolean>;
|
|
449
|
+
goToNextPage: () => void;
|
|
450
|
+
} | null>;
|
|
451
|
+
};
|
|
452
|
+
declare const providePaginationNextState: (opts?: {
|
|
453
|
+
inherit?: boolean;
|
|
454
|
+
}) => _angular_core.FactoryProvider;
|
|
455
|
+
|
|
456
|
+
interface NgpPaginationPreviousState {
|
|
457
|
+
/**
|
|
458
|
+
* Whether the button is disabled, accounting for the parent pagination state.
|
|
459
|
+
*/
|
|
460
|
+
readonly disabled: Signal<boolean>;
|
|
461
|
+
/**
|
|
462
|
+
* Go to the previous page.
|
|
463
|
+
*/
|
|
464
|
+
goToPreviousPage(): void;
|
|
465
|
+
}
|
|
466
|
+
interface NgpPaginationPreviousProps {
|
|
467
|
+
/**
|
|
468
|
+
* Whether the button is disabled.
|
|
469
|
+
*/
|
|
470
|
+
readonly disabled?: Signal<boolean>;
|
|
471
|
+
}
|
|
472
|
+
declare const NgpPaginationPreviousStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
473
|
+
disabled: Signal<boolean>;
|
|
474
|
+
goToPreviousPage: () => void;
|
|
475
|
+
}>>;
|
|
476
|
+
declare const ngpPaginationPrevious: ({ disabled: _disabled }: NgpPaginationPreviousProps) => {
|
|
477
|
+
disabled: Signal<boolean>;
|
|
478
|
+
goToPreviousPage: () => void;
|
|
479
|
+
};
|
|
480
|
+
declare const injectPaginationPreviousState: {
|
|
481
|
+
(): Signal<{
|
|
482
|
+
disabled: Signal<boolean>;
|
|
483
|
+
goToPreviousPage: () => void;
|
|
484
|
+
}>;
|
|
485
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
486
|
+
disabled: Signal<boolean>;
|
|
487
|
+
goToPreviousPage: () => void;
|
|
488
|
+
} | null>;
|
|
489
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
490
|
+
disabled: Signal<boolean>;
|
|
491
|
+
goToPreviousPage: () => void;
|
|
492
|
+
}> | Signal<{
|
|
493
|
+
disabled: Signal<boolean>;
|
|
494
|
+
goToPreviousPage: () => void;
|
|
495
|
+
} | null>;
|
|
496
|
+
};
|
|
497
|
+
declare const providePaginationPreviousState: (opts?: {
|
|
498
|
+
inherit?: boolean;
|
|
499
|
+
}) => _angular_core.FactoryProvider;
|
|
500
|
+
|
|
501
|
+
export { NgpPagination, NgpPaginationButton, NgpPaginationButtonStateToken, NgpPaginationFirst, NgpPaginationFirstStateToken, NgpPaginationLast, NgpPaginationLastStateToken, NgpPaginationNext, NgpPaginationNextStateToken, NgpPaginationPrevious, NgpPaginationPreviousStateToken, NgpPaginationStateToken, injectPaginationButtonState, injectPaginationFirstState, injectPaginationLastState, injectPaginationNextState, injectPaginationPreviousState, injectPaginationState, ngpPagination, ngpPaginationButton, ngpPaginationFirst, ngpPaginationLast, ngpPaginationNext, ngpPaginationPrevious, providePaginationButtonState, providePaginationFirstState, providePaginationLastState, providePaginationNextState, providePaginationPreviousState, providePaginationState };
|
|
502
|
+
export type { NgpPaginationButtonProps, NgpPaginationButtonState, NgpPaginationFirstProps, NgpPaginationFirstState, NgpPaginationLastProps, NgpPaginationLastState, NgpPaginationNextProps, NgpPaginationNextState, NgpPaginationPreviousProps, NgpPaginationPreviousState, NgpPaginationProps, NgpPaginationState };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { NgpOffset, NgpFlip, NgpDismissGuard, NgpShift, NgpOverlayArrowState, NgpOverlayArrowProps, NgpOverlayContent, NgpOverlay, NgpOffsetInput, NgpFlipInput, NgpShiftInput, NgpDismissGuardInput } from 'ng-primitives/portal';
|
|
2
2
|
export { NgpOverlayArrowProps as NgpPopoverArrowProps, NgpOverlayArrowState as NgpPopoverArrowState, injectOverlayContext as injectPopoverContext } from 'ng-primitives/portal';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { Provider,
|
|
4
|
+
import { Provider, WritableSignal, ElementRef, Signal, OnDestroy } from '@angular/core';
|
|
5
5
|
import { Placement } from '@floating-ui/dom';
|
|
6
6
|
import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
|
|
7
7
|
import * as ng_primitives_state from 'ng-primitives/state';
|
|
8
8
|
import { StateInjectionOptions } from 'ng-primitives/state';
|
|
9
|
+
import * as ng_primitives_popover from 'ng-primitives/popover';
|
|
9
10
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
10
11
|
import * as i1 from 'ng-primitives/focus-trap';
|
|
11
12
|
|
|
@@ -413,7 +414,7 @@ declare class NgpPopoverTrigger<T = null> implements OnDestroy {
|
|
|
413
414
|
/**
|
|
414
415
|
* The popover trigger state.
|
|
415
416
|
*/
|
|
416
|
-
protected readonly state: NgpPopoverTriggerState<T>;
|
|
417
|
+
protected readonly state: ng_primitives_popover.NgpPopoverTriggerState<T>;
|
|
417
418
|
ngOnDestroy(): void;
|
|
418
419
|
/**
|
|
419
420
|
* Show the popover.
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Provider, WritableSignal, TemplateRef, Type, Injector, ViewContainerRef, Signal, ValueProvider, ApplicationRef } from '@angular/core';
|
|
1
3
|
import * as _floating_ui_dom from '@floating-ui/dom';
|
|
2
4
|
import { Placement, Strategy, Middleware } from '@floating-ui/dom';
|
|
3
|
-
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { WritableSignal, TemplateRef, Type, Injector, ViewContainerRef, Signal, Provider, ValueProvider, ApplicationRef } from '@angular/core';
|
|
5
5
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
7
|
import * as ng_primitives_state from 'ng-primitives/state';
|
|
8
8
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Provide a null `ControlContainer` at the element level of an overlay-content root directive
|
|
12
|
+
* (e.g. `NgpPopover`, `NgpTooltip`, `NgpMenu`).
|
|
13
|
+
*
|
|
14
|
+
* Overlay content is portaled but its template is often declared inside a form, so its
|
|
15
|
+
* element-injector chain can reach that outer form's `ControlContainer` and leak it into the
|
|
16
|
+
* overlay (ngp#677 / angular#57390). This backstop resolves `ControlContainer` to `null` at the
|
|
17
|
+
* content root: a form declared *inside* the content sits closer in the injector chain and still
|
|
18
|
+
* wins, while a control with no inner form resolves to `null` here instead of escaping to the
|
|
19
|
+
* outer form.
|
|
20
|
+
*
|
|
21
|
+
* Pairs with the `EmbeddedViewInjector` in `overlay.ts`, which returns `notFoundValue` for the
|
|
22
|
+
* `Host`/`SkipSelf` `ControlContainer` lookup so the element-injector walk runs and reaches this.
|
|
23
|
+
*/
|
|
24
|
+
declare function provideControlContainerIsolation(): Provider;
|
|
25
|
+
|
|
10
26
|
/**
|
|
11
27
|
* Options for configuring flip behavior to keep the floating element in view.
|
|
12
28
|
* The flip middleware ensures the floating element flips to the opposite side
|
|
@@ -933,5 +949,5 @@ declare class NoopScrollStrategy implements ScrollStrategy {
|
|
|
933
949
|
disable(): void;
|
|
934
950
|
}
|
|
935
951
|
|
|
936
|
-
export { BlockScrollStrategy, CloseScrollStrategy, NgpComponentPortal, NgpOverlay, NgpOverlayArrowStateToken, NgpOverlayCooldownManager, NgpOverlayRegistry, NgpPortal, NgpTemplatePortal, NoopScrollStrategy, coerceFlip, coerceOffset, coerceShift, createOverlay, createPortal, dismissGuardAttribute, injectOverlay, injectOverlayArrowState, injectOverlayContext, ngpOverlayArrow, provideOverlayArrowState, provideOverlayContext };
|
|
952
|
+
export { BlockScrollStrategy, CloseScrollStrategy, NgpComponentPortal, NgpOverlay, NgpOverlayArrowStateToken, NgpOverlayCooldownManager, NgpOverlayRegistry, NgpPortal, NgpTemplatePortal, NoopScrollStrategy, coerceFlip, coerceOffset, coerceShift, createOverlay, createPortal, dismissGuardAttribute, injectOverlay, injectOverlayArrowState, injectOverlayContext, ngpOverlayArrow, provideControlContainerIsolation, provideOverlayArrowState, provideOverlayContext };
|
|
937
953
|
export type { NgpDismissGuard, NgpDismissGuardInput, NgpDismissPolicy, NgpFlip, NgpFlipInput, NgpFlipOptions, NgpOffset, NgpOffsetInput, NgpOffsetOptions, NgpOverlayArrowProps, NgpOverlayArrowState, NgpOverlayConfig, NgpOverlayContent, NgpOverlayEntry, NgpOverlayRef, NgpOverlayTemplateContext, NgpPosition, NgpShift, NgpShiftInput, NgpShiftOptions, ScrollStrategy };
|