@ngneers/controls 0.0.1-next.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/ngneers-controls-accordion.mjs +234 -0
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
- package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api.mjs +347 -0
- package/fesm2022/ngneers-controls-api.mjs.map +1 -0
- package/fesm2022/ngneers-controls-avatar.mjs +77 -0
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-base.mjs +620 -0
- package/fesm2022/ngneers-controls-base.mjs.map +1 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button-group.mjs +110 -0
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button.mjs +83 -0
- package/fesm2022/ngneers-controls-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
- package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar.mjs +801 -0
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
- package/fesm2022/ngneers-controls-chip.mjs +55 -0
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
- package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
- package/fesm2022/ngneers-controls-defer.mjs +72 -0
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-dialog.mjs +407 -0
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
- package/fesm2022/ngneers-controls-directives.mjs +498 -0
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
- package/fesm2022/ngneers-controls-drawer.mjs +271 -0
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-errors.mjs +329 -0
- package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
- package/fesm2022/ngneers-controls-filter.mjs +708 -0
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-hint.mjs +153 -0
- package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n.mjs +57 -0
- package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon.mjs +195 -0
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
- package/fesm2022/ngneers-controls-inplace.mjs +150 -0
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-field.mjs +165 -0
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input.mjs +72 -0
- package/fesm2022/ngneers-controls-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-item-view.mjs +473 -0
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
- package/fesm2022/ngneers-controls-list-box.mjs +281 -0
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
- package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
- package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-menu.mjs +371 -0
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-message.mjs +30 -0
- package/fesm2022/ngneers-controls-message.mjs.map +1 -0
- package/fesm2022/ngneers-controls-number-input.mjs +366 -0
- package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-paginator.mjs +129 -0
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
- package/fesm2022/ngneers-controls-popover.mjs +215 -0
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
- package/fesm2022/ngneers-controls-progress.mjs +98 -0
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
- package/fesm2022/ngneers-controls-radio.mjs +152 -0
- package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
- package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
- package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroller.mjs +308 -0
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select-button.mjs +58 -0
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select.mjs +417 -0
- package/fesm2022/ngneers-controls-select.mjs.map +1 -0
- package/fesm2022/ngneers-controls-slider.mjs +167 -0
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
- package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
- package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
- package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spinner.mjs +184 -0
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
- package/fesm2022/ngneers-controls-splitter.mjs +604 -0
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-state.mjs +185 -0
- package/fesm2022/ngneers-controls-state.mjs.map +1 -0
- package/fesm2022/ngneers-controls-switch.mjs +39 -0
- package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
- package/fesm2022/ngneers-controls-table.mjs +2634 -0
- package/fesm2022/ngneers-controls-table.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tabs.mjs +336 -0
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tag.mjs +30 -0
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toast.mjs +350 -0
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tree.mjs +599 -0
- package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
- package/fesm2022/ngneers-controls-upload.mjs +377 -0
- package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils.mjs +261 -0
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
- package/fesm2022/ngneers-controls.mjs +6 -0
- package/fesm2022/ngneers-controls.mjs.map +1 -0
- package/package.json +302 -0
- package/types/ngneers-controls-accordion.d.ts +139 -0
- package/types/ngneers-controls-api-ng.d.ts +364 -0
- package/types/ngneers-controls-api-resize.d.ts +318 -0
- package/types/ngneers-controls-api.d.ts +145 -0
- package/types/ngneers-controls-avatar.d.ts +54 -0
- package/types/ngneers-controls-base.d.ts +277 -0
- package/types/ngneers-controls-breadcrumb.d.ts +272 -0
- package/types/ngneers-controls-button-group.d.ts +46 -0
- package/types/ngneers-controls-button.d.ts +48 -0
- package/types/ngneers-controls-calendar.d.ts +466 -0
- package/types/ngneers-controls-checkbox.d.ts +40 -0
- package/types/ngneers-controls-chip.d.ts +202 -0
- package/types/ngneers-controls-default-icons.d.ts +5 -0
- package/types/ngneers-controls-defer.d.ts +48 -0
- package/types/ngneers-controls-dialog.d.ts +399 -0
- package/types/ngneers-controls-directives.d.ts +171 -0
- package/types/ngneers-controls-drawer.d.ts +308 -0
- package/types/ngneers-controls-edit-inplace.d.ts +263 -0
- package/types/ngneers-controls-errors.d.ts +155 -0
- package/types/ngneers-controls-filter.d.ts +609 -0
- package/types/ngneers-controls-hint.d.ts +88 -0
- package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
- package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
- package/types/ngneers-controls-i18n.d.ts +186 -0
- package/types/ngneers-controls-icon.d.ts +68 -0
- package/types/ngneers-controls-inplace.d.ts +98 -0
- package/types/ngneers-controls-input-field.d.ts +248 -0
- package/types/ngneers-controls-input.d.ts +30 -0
- package/types/ngneers-controls-item-view.d.ts +215 -0
- package/types/ngneers-controls-list-box.d.ts +334 -0
- package/types/ngneers-controls-mask-input.d.ts +434 -0
- package/types/ngneers-controls-menu.d.ts +192 -0
- package/types/ngneers-controls-message.d.ts +21 -0
- package/types/ngneers-controls-number-input.d.ts +146 -0
- package/types/ngneers-controls-paginator.d.ts +255 -0
- package/types/ngneers-controls-popover.d.ts +116 -0
- package/types/ngneers-controls-progress.d.ts +49 -0
- package/types/ngneers-controls-radio.d.ts +91 -0
- package/types/ngneers-controls-roving-focus.d.ts +107 -0
- package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
- package/types/ngneers-controls-scroller.d.ts +151 -0
- package/types/ngneers-controls-select-button.d.ts +51 -0
- package/types/ngneers-controls-select.d.ts +409 -0
- package/types/ngneers-controls-slider.d.ts +57 -0
- package/types/ngneers-controls-snackbar.d.ts +330 -0
- package/types/ngneers-controls-spin-buttons.d.ts +69 -0
- package/types/ngneers-controls-spinner.d.ts +117 -0
- package/types/ngneers-controls-splitter.d.ts +465 -0
- package/types/ngneers-controls-state.d.ts +102 -0
- package/types/ngneers-controls-switch.d.ts +18 -0
- package/types/ngneers-controls-table.d.ts +3127 -0
- package/types/ngneers-controls-tabs.d.ts +118 -0
- package/types/ngneers-controls-tag.d.ts +21 -0
- package/types/ngneers-controls-toast.d.ts +298 -0
- package/types/ngneers-controls-toggle-button.d.ts +48 -0
- package/types/ngneers-controls-tooltip.d.ts +189 -0
- package/types/ngneers-controls-tree.d.ts +409 -0
- package/types/ngneers-controls-upload.d.ts +347 -0
- package/types/ngneers-controls-utils-ng.d.ts +129 -0
- package/types/ngneers-controls-utils.d.ts +130 -0
- package/types/ngneers-controls.d.ts +2 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import * as _ngneers_signal_translate from '@ngneers/signal-translate';
|
|
4
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
5
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
6
|
+
import { ValueControlBase } from '@ngneers/controls/base';
|
|
7
|
+
|
|
8
|
+
type EditTemplateType = {
|
|
9
|
+
$implicit: {
|
|
10
|
+
close: () => void;
|
|
11
|
+
value: string;
|
|
12
|
+
update: (value: string) => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type DisplayTemplateType = {
|
|
16
|
+
$implicit: {
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare abstract class EditInplaceTemplates extends ValueControlBase<'editInplace', string> {
|
|
22
|
+
private readonly _defaultDisplayTemplate;
|
|
23
|
+
private readonly _userDisplayTemplate;
|
|
24
|
+
/**
|
|
25
|
+
* Set a custom template for the display.
|
|
26
|
+
* Can also be set using an `<ng-template>` element with `#display` template reference variable.
|
|
27
|
+
*/
|
|
28
|
+
readonly templateDisplay: _angular_core.InputSignal<TemplateRef<DisplayTemplateType> | null>;
|
|
29
|
+
protected readonly displayTemplate: _angular_core.Signal<TemplateRef<DisplayTemplateType>>;
|
|
30
|
+
private readonly _defaultEditTemplate;
|
|
31
|
+
private readonly _userEditTemplate;
|
|
32
|
+
/**
|
|
33
|
+
* Set a custom template for the edit view.
|
|
34
|
+
* Can also be set using an `<ng-template>` element with `#edit` template reference variable.
|
|
35
|
+
*/
|
|
36
|
+
readonly templateEdit: _angular_core.InputSignal<TemplateRef<EditTemplateType> | null>;
|
|
37
|
+
protected readonly editTemplate: _angular_core.Signal<TemplateRef<EditTemplateType>>;
|
|
38
|
+
/**
|
|
39
|
+
* Types for the edit-inplace templates.
|
|
40
|
+
*/
|
|
41
|
+
readonly templateTypes: {
|
|
42
|
+
/**
|
|
43
|
+
* Type of the template variable for the display template.
|
|
44
|
+
*/
|
|
45
|
+
display: DisplayTemplateType;
|
|
46
|
+
/**
|
|
47
|
+
* Type of the template variable for the edit template.
|
|
48
|
+
*/
|
|
49
|
+
edit: EditTemplateType;
|
|
50
|
+
} & {
|
|
51
|
+
$implicit: {
|
|
52
|
+
display: Partial<DisplayTemplateType>;
|
|
53
|
+
edit: Partial<EditTemplateType>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditInplaceTemplates, never>;
|
|
57
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EditInplaceTemplates, never, never, { "templateDisplay": { "alias": "templateDisplay"; "required": false; "isSignal": true; }; "templateEdit": { "alias": "templateEdit"; "required": false; "isSignal": true; }; }, {}, ["_userDisplayTemplate", "_userEditTemplate"], never, true, never>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @category control
|
|
62
|
+
*/
|
|
63
|
+
declare class NgnEditInplace extends EditInplaceTemplates {
|
|
64
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"edit-inplace", ["root", "disabled", "readonly", "invalid", "default-display", "default-fallback-display", "default-edit", "default-edit-input", "default-edit-close-button", "sr-only"], readonly [{
|
|
65
|
+
readonly class: "inplace";
|
|
66
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"inplace", ["root", "content", "display", "disabled"], readonly []>;
|
|
67
|
+
}]>>;
|
|
68
|
+
protected readonly i18n: _ngneers_signal_translate.TranslationsSignal<{
|
|
69
|
+
calendar: {
|
|
70
|
+
today: string;
|
|
71
|
+
input: string;
|
|
72
|
+
selectYear: string;
|
|
73
|
+
selectMonth: string;
|
|
74
|
+
previousMonth: string;
|
|
75
|
+
nextMonth: string;
|
|
76
|
+
weekdays: {
|
|
77
|
+
monday: string;
|
|
78
|
+
tuesday: string;
|
|
79
|
+
wednesday: string;
|
|
80
|
+
thursday: string;
|
|
81
|
+
friday: string;
|
|
82
|
+
saturday: string;
|
|
83
|
+
sunday: string;
|
|
84
|
+
};
|
|
85
|
+
weekdaysShort: {
|
|
86
|
+
monday: string;
|
|
87
|
+
tuesday: string;
|
|
88
|
+
wednesday: string;
|
|
89
|
+
thursday: string;
|
|
90
|
+
friday: string;
|
|
91
|
+
saturday: string;
|
|
92
|
+
sunday: string;
|
|
93
|
+
};
|
|
94
|
+
months: {
|
|
95
|
+
january: string;
|
|
96
|
+
february: string;
|
|
97
|
+
march: string;
|
|
98
|
+
april: string;
|
|
99
|
+
may: string;
|
|
100
|
+
june: string;
|
|
101
|
+
july: string;
|
|
102
|
+
august: string;
|
|
103
|
+
september: string;
|
|
104
|
+
october: string;
|
|
105
|
+
november: string;
|
|
106
|
+
december: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
editInplace: {
|
|
110
|
+
placeholder: string;
|
|
111
|
+
confirm: string;
|
|
112
|
+
};
|
|
113
|
+
filter: {
|
|
114
|
+
noFilter: string;
|
|
115
|
+
addCondition: string;
|
|
116
|
+
removeCondition: string;
|
|
117
|
+
operator: string;
|
|
118
|
+
value: string;
|
|
119
|
+
clear: string;
|
|
120
|
+
apply: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
matchModeLabel: string;
|
|
123
|
+
match: {
|
|
124
|
+
all: string;
|
|
125
|
+
any: string;
|
|
126
|
+
and: string;
|
|
127
|
+
or: string;
|
|
128
|
+
};
|
|
129
|
+
selected: string;
|
|
130
|
+
conditions: string;
|
|
131
|
+
operators: {
|
|
132
|
+
isEqual: string;
|
|
133
|
+
isNotEqual: string;
|
|
134
|
+
contains: string;
|
|
135
|
+
startsWith: string;
|
|
136
|
+
endsWith: string;
|
|
137
|
+
in: string;
|
|
138
|
+
isEmpty: string;
|
|
139
|
+
isNotEmpty: string;
|
|
140
|
+
greaterThan: string;
|
|
141
|
+
greaterThanOrEqual: string;
|
|
142
|
+
lessThan: string;
|
|
143
|
+
lessThanOrEqual: string;
|
|
144
|
+
after: string;
|
|
145
|
+
onOrAfter: string;
|
|
146
|
+
before: string;
|
|
147
|
+
onOrBefore: string;
|
|
148
|
+
isTrue: string;
|
|
149
|
+
isFalse: string;
|
|
150
|
+
custom: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
splitter: {
|
|
154
|
+
handleLabel: string;
|
|
155
|
+
};
|
|
156
|
+
inputField: {
|
|
157
|
+
clearInput: string;
|
|
158
|
+
};
|
|
159
|
+
maskInput: {
|
|
160
|
+
roleDescription: string;
|
|
161
|
+
segmentRange: string;
|
|
162
|
+
optionSeparator: string;
|
|
163
|
+
};
|
|
164
|
+
drawer: {
|
|
165
|
+
close: string;
|
|
166
|
+
};
|
|
167
|
+
dialog: {
|
|
168
|
+
close: string;
|
|
169
|
+
};
|
|
170
|
+
chip: {
|
|
171
|
+
close: string;
|
|
172
|
+
};
|
|
173
|
+
breadcrumb: {
|
|
174
|
+
overflow: string;
|
|
175
|
+
};
|
|
176
|
+
toast: {
|
|
177
|
+
close: string;
|
|
178
|
+
region: string;
|
|
179
|
+
};
|
|
180
|
+
snackbar: {
|
|
181
|
+
close: string;
|
|
182
|
+
region: string;
|
|
183
|
+
severity: {
|
|
184
|
+
error: string;
|
|
185
|
+
warning: string;
|
|
186
|
+
success: string;
|
|
187
|
+
info: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
upload: {
|
|
191
|
+
upload: string;
|
|
192
|
+
uploadNamed: string;
|
|
193
|
+
retryNamed: string;
|
|
194
|
+
cancelNamed: string;
|
|
195
|
+
removeNamed: string;
|
|
196
|
+
progressNamed: string;
|
|
197
|
+
};
|
|
198
|
+
select: {
|
|
199
|
+
filterOptions: string;
|
|
200
|
+
};
|
|
201
|
+
paginator: {
|
|
202
|
+
previousPage: string;
|
|
203
|
+
nextPage: string;
|
|
204
|
+
};
|
|
205
|
+
listBox: {
|
|
206
|
+
noItemsFound: string;
|
|
207
|
+
};
|
|
208
|
+
tree: {
|
|
209
|
+
noItemsFound: string;
|
|
210
|
+
};
|
|
211
|
+
table: {
|
|
212
|
+
selectAllRows: string;
|
|
213
|
+
selectRow: string;
|
|
214
|
+
sortedBy: string;
|
|
215
|
+
sortAscending: string;
|
|
216
|
+
sortDescending: string;
|
|
217
|
+
sortCleared: string;
|
|
218
|
+
selectedCount: string;
|
|
219
|
+
page: string;
|
|
220
|
+
resultCount: string;
|
|
221
|
+
};
|
|
222
|
+
state: {
|
|
223
|
+
loading: string;
|
|
224
|
+
success: string;
|
|
225
|
+
warning: string;
|
|
226
|
+
error: string;
|
|
227
|
+
cancelled: string;
|
|
228
|
+
};
|
|
229
|
+
}, "_">;
|
|
230
|
+
protected readonly closeContent: () => void;
|
|
231
|
+
/**
|
|
232
|
+
* Controls the visibility of the content.
|
|
233
|
+
*/
|
|
234
|
+
readonly editVisible: _angular_core.ModelSignal<boolean>;
|
|
235
|
+
/**
|
|
236
|
+
* Whether the content is loaded lazily.
|
|
237
|
+
* @default true
|
|
238
|
+
*/
|
|
239
|
+
readonly lazy: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the content is cached when closed.
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
readonly cache: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
245
|
+
/**
|
|
246
|
+
* Switches to the edit view.
|
|
247
|
+
*/
|
|
248
|
+
switchToEdit(): void;
|
|
249
|
+
/**
|
|
250
|
+
* Switches to the display view.
|
|
251
|
+
*/
|
|
252
|
+
switchToDisplay(): void;
|
|
253
|
+
/**
|
|
254
|
+
* Toggles between the display and content views.
|
|
255
|
+
*/
|
|
256
|
+
toggle(): void;
|
|
257
|
+
protected focusOut(event: FocusEvent): void;
|
|
258
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnEditInplace, never>;
|
|
259
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnEditInplace, "ngn-edit-inplace", never, { "editVisible": { "alias": "editVisible"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "cache": { "alias": "cache"; "required": false; "isSignal": true; }; }, { "editVisible": "editVisibleChange"; }, never, never, true, never>;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export { NgnEditInplace };
|
|
263
|
+
export type { DisplayTemplateType, EditTemplateType };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, InjectionToken, Provider } from '@angular/core';
|
|
3
|
+
import { NgnHint } from '@ngneers/controls/hint';
|
|
4
|
+
import { ValidationErrors } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Origin of a normalized validation error.
|
|
8
|
+
* @category types
|
|
9
|
+
*/
|
|
10
|
+
type NgnErrorsSource = 'control' | 'group' | 'custom';
|
|
11
|
+
/**
|
|
12
|
+
* Interaction state that controls when validation messages are visible.
|
|
13
|
+
* @category types
|
|
14
|
+
*/
|
|
15
|
+
type NgnErrorsShowOn = 'touched' | 'dirty' | 'submitted' | 'always' | 'never';
|
|
16
|
+
/**
|
|
17
|
+
* Message aggregation mode for visible errors.
|
|
18
|
+
* @category types
|
|
19
|
+
*/
|
|
20
|
+
type NgnErrorsMode = 'first' | 'all';
|
|
21
|
+
/**
|
|
22
|
+
* Static or computed message for a validation error key.
|
|
23
|
+
* @category types
|
|
24
|
+
*/
|
|
25
|
+
type NgnErrorsMessage = string | ((error: NgnErrorsMessageContext) => string | null | undefined);
|
|
26
|
+
/**
|
|
27
|
+
* Map of validation error keys to message resolvers.
|
|
28
|
+
* @category types
|
|
29
|
+
*/
|
|
30
|
+
type NgnErrorsMessages = Record<string, NgnErrorsMessage>;
|
|
31
|
+
/**
|
|
32
|
+
* Custom errors supplied directly to ngnErrors.
|
|
33
|
+
* @category types
|
|
34
|
+
*/
|
|
35
|
+
type NgnErrorsCustom = ValidationErrors | readonly (string | NgnErrorsCustomEntry)[] | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Custom error entry with optional value, params, and explicit message.
|
|
38
|
+
* @category types
|
|
39
|
+
*/
|
|
40
|
+
interface NgnErrorsCustomEntry {
|
|
41
|
+
key: string;
|
|
42
|
+
value?: unknown;
|
|
43
|
+
message?: string;
|
|
44
|
+
params?: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Normalized validation error exposed by ngnErrors.
|
|
48
|
+
* @category types
|
|
49
|
+
*/
|
|
50
|
+
interface NgnError {
|
|
51
|
+
key: string;
|
|
52
|
+
value: unknown;
|
|
53
|
+
source: NgnErrorsSource;
|
|
54
|
+
message: string;
|
|
55
|
+
params: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Context passed to computed validation message resolvers.
|
|
59
|
+
* @category types
|
|
60
|
+
*/
|
|
61
|
+
interface NgnErrorsMessageContext {
|
|
62
|
+
key: string;
|
|
63
|
+
value: unknown;
|
|
64
|
+
source: NgnErrorsSource;
|
|
65
|
+
params: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Current validation state that can be bridged into hint controls.
|
|
69
|
+
* @category types
|
|
70
|
+
*/
|
|
71
|
+
interface NgnErrorsState {
|
|
72
|
+
visible: boolean;
|
|
73
|
+
pending: boolean;
|
|
74
|
+
errors: readonly NgnError[];
|
|
75
|
+
firstError: NgnError | null;
|
|
76
|
+
message: string | null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare class NgnErrors {
|
|
80
|
+
/**
|
|
81
|
+
* Hint instance that receives the resolved validation state.
|
|
82
|
+
* @category inputs
|
|
83
|
+
*/
|
|
84
|
+
readonly ngnErrorsHint: _angular_core.InputSignal<NgnHint | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* Interaction state that controls when errors become visible.
|
|
87
|
+
* @category inputs
|
|
88
|
+
*/
|
|
89
|
+
readonly ngnErrorsShowOn: _angular_core.InputSignal<NgnErrorsShowOn>;
|
|
90
|
+
/**
|
|
91
|
+
* Whether to show the first matching error or all messages.
|
|
92
|
+
* @category inputs
|
|
93
|
+
*/
|
|
94
|
+
readonly ngnErrorsMode: _angular_core.InputSignal<NgnErrorsMode>;
|
|
95
|
+
/**
|
|
96
|
+
* Per-instance messages that override globally provided defaults.
|
|
97
|
+
* @category inputs
|
|
98
|
+
*/
|
|
99
|
+
readonly ngnErrorsMessages: _angular_core.InputSignal<NgnErrorsMessages | null>;
|
|
100
|
+
/**
|
|
101
|
+
* Additional errors supplied independently of Angular form validation.
|
|
102
|
+
* @category inputs
|
|
103
|
+
*/
|
|
104
|
+
readonly ngnErrorsCustom: _angular_core.InputSignal<NgnErrorsCustom>;
|
|
105
|
+
private readonly _ngControl;
|
|
106
|
+
private readonly _selfContainer;
|
|
107
|
+
private readonly _parentContainer;
|
|
108
|
+
private readonly _ngnControl;
|
|
109
|
+
private readonly _globalMessages;
|
|
110
|
+
private readonly _version;
|
|
111
|
+
readonly errors: Signal<readonly NgnError[]>;
|
|
112
|
+
readonly firstError: Signal<NgnError | null>;
|
|
113
|
+
readonly pending: Signal<boolean>;
|
|
114
|
+
readonly visible: Signal<boolean>;
|
|
115
|
+
readonly message: Signal<string | null>;
|
|
116
|
+
readonly state: Signal<NgnErrorsState>;
|
|
117
|
+
constructor();
|
|
118
|
+
private _watchControl;
|
|
119
|
+
private _hostControl;
|
|
120
|
+
private _parentControl;
|
|
121
|
+
private _rootControl;
|
|
122
|
+
private _submittedSource;
|
|
123
|
+
private _submitted;
|
|
124
|
+
private _normalizeGroupErrors;
|
|
125
|
+
private _normalizeCustomErrors;
|
|
126
|
+
private _normalizeErrors;
|
|
127
|
+
private _createCustomEntryError;
|
|
128
|
+
private _createError;
|
|
129
|
+
private _isGroupErrorRelevant;
|
|
130
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnErrors, never>;
|
|
131
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnErrors, "[ngnErrors]", ["ngnErrors"], { "ngnErrorsHint": { "alias": "ngnErrorsHint"; "required": false; "isSignal": true; }; "ngnErrorsShowOn": { "alias": "ngnErrorsShowOn"; "required": false; "isSignal": true; }; "ngnErrorsMode": { "alias": "ngnErrorsMode"; "required": false; "isSignal": true; }; "ngnErrorsMessages": { "alias": "ngnErrorsMessages"; "required": false; "isSignal": true; }; "ngnErrorsCustom": { "alias": "ngnErrorsCustom"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Multi-provider token for validation error message maps.
|
|
136
|
+
* @category providers
|
|
137
|
+
*/
|
|
138
|
+
declare const NGN_ERRORS_MESSAGES: InjectionToken<readonly NgnErrorsMessages[]>;
|
|
139
|
+
/**
|
|
140
|
+
* Provide custom validation error messages that are merged with defaults.
|
|
141
|
+
* @category providers
|
|
142
|
+
*/
|
|
143
|
+
declare function provideNgnErrorsMessages(messages: NgnErrorsMessages): Provider;
|
|
144
|
+
/**
|
|
145
|
+
* Inject all provided validation message maps as a single merged object.
|
|
146
|
+
* @category providers
|
|
147
|
+
*/
|
|
148
|
+
declare function injectNgnErrorsMessages(): NgnErrorsMessages;
|
|
149
|
+
declare const defaultNgnErrorsMessages: NgnErrorsMessages;
|
|
150
|
+
declare function resolveNgnErrorMessage(context: NgnErrorsMessageContext, messages: NgnErrorsMessages): string;
|
|
151
|
+
declare function paramsFromValue(value: unknown): Record<string, unknown>;
|
|
152
|
+
declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
153
|
+
|
|
154
|
+
export { NGN_ERRORS_MESSAGES, NgnErrors, defaultNgnErrorsMessages, injectNgnErrorsMessages, isRecord, paramsFromValue, provideNgnErrorsMessages, resolveNgnErrorMessage };
|
|
155
|
+
export type { NgnError, NgnErrorsCustom, NgnErrorsCustomEntry, NgnErrorsMessage, NgnErrorsMessageContext, NgnErrorsMessages, NgnErrorsMode, NgnErrorsShowOn, NgnErrorsSource, NgnErrorsState };
|