@ngneers/controls 0.0.1-pre1 → 0.0.1-pre3
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/LICENSE +21 -0
- package/fesm2022/ngneers-controls-accordion.mjs +194 -0
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-ng.mjs +668 -0
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api.mjs +256 -227
- package/fesm2022/ngneers-controls-api.mjs.map +1 -1
- package/fesm2022/ngneers-controls-avatar.mjs +70 -0
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-base.mjs +397 -0
- package/fesm2022/ngneers-controls-base.mjs.map +1 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs +74 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button-group.mjs +51 -0
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button.mjs +62 -0
- package/fesm2022/ngneers-controls-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar-time-C7UnIFzU.mjs +63 -0
- package/fesm2022/ngneers-controls-calendar-time-C7UnIFzU.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar.mjs +468 -0
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-checkbox.mjs +58 -0
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
- package/fesm2022/ngneers-controls-chip.mjs +52 -0
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-defer.mjs +43 -0
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-dialog.mjs +329 -33
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -1
- package/fesm2022/ngneers-controls-directives.mjs +443 -0
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
- package/fesm2022/ngneers-controls-drawer.mjs +232 -0
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs +120 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-filter.mjs +516 -0
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs +87 -0
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs +87 -0
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.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-calendar-z5xA9wTT.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-calendar-z5xA9wTT.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon.mjs +60 -18
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
- package/fesm2022/ngneers-controls-inplace.mjs +107 -0
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-field.mjs +141 -0
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-mask.mjs +282 -0
- package/fesm2022/ngneers-controls-input-mask.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input.mjs +69 -0
- package/fesm2022/ngneers-controls-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-item-view.mjs +441 -0
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
- package/fesm2022/ngneers-controls-list-box.mjs +157 -53
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
- package/fesm2022/ngneers-controls-menu.mjs +332 -0
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-message.mjs +29 -0
- package/fesm2022/ngneers-controls-message.mjs.map +1 -0
- package/fesm2022/ngneers-controls-paginator.mjs +111 -0
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
- package/fesm2022/ngneers-controls-popover.mjs +129 -40
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -1
- package/fesm2022/ngneers-controls-progress.mjs +82 -0
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroller.mjs +162 -78
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select-button.mjs +55 -0
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select.mjs +313 -103
- package/fesm2022/ngneers-controls-select.mjs.map +1 -1
- package/fesm2022/ngneers-controls-slider.mjs +155 -0
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spinner.mjs +169 -0
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
- package/fesm2022/ngneers-controls-splitter.mjs +717 -0
- package/fesm2022/ngneers-controls-splitter.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 +379 -0
- package/fesm2022/ngneers-controls-table.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tabs.mjs +287 -0
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tag.mjs +29 -0
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toast.mjs +184 -0
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs +65 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tooltip.mjs +454 -0
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs +227 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils.mjs +217 -60
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -1
- package/fesm2022/ngneers-controls.mjs.map +1 -1
- package/package.json +167 -32
- package/types/ngneers-controls-accordion.d.ts +114 -0
- package/types/ngneers-controls-api-ng.d.ts +291 -0
- package/types/ngneers-controls-api.d.ts +99 -0
- package/types/ngneers-controls-avatar.d.ts +50 -0
- package/types/ngneers-controls-base.d.ts +166 -0
- package/types/ngneers-controls-breadcrumb.d.ts +86 -0
- package/types/ngneers-controls-button-group.d.ts +30 -0
- package/types/ngneers-controls-button.d.ts +34 -0
- package/types/ngneers-controls-calendar.d.ts +275 -0
- package/types/ngneers-controls-checkbox.d.ts +38 -0
- package/types/ngneers-controls-chip.d.ts +37 -0
- package/types/ngneers-controls-defer.d.ts +22 -0
- package/types/ngneers-controls-dialog.d.ts +218 -0
- package/types/ngneers-controls-directives.d.ts +146 -0
- package/types/ngneers-controls-drawer.d.ts +220 -0
- package/types/ngneers-controls-edit-inplace.d.ts +182 -0
- package/types/ngneers-controls-filter.d.ts +304 -0
- package/types/ngneers-controls-i18n.d.ts +108 -0
- package/types/ngneers-controls-icon.d.ts +74 -0
- package/types/ngneers-controls-inplace.d.ts +95 -0
- package/types/ngneers-controls-input-field.d.ts +159 -0
- package/types/ngneers-controls-input-mask.d.ts +83 -0
- package/types/ngneers-controls-input.d.ts +27 -0
- package/types/ngneers-controls-item-view.d.ts +211 -0
- package/types/ngneers-controls-list-box.d.ts +216 -0
- package/types/ngneers-controls-menu.d.ts +178 -0
- package/types/ngneers-controls-message.d.ts +19 -0
- package/types/ngneers-controls-paginator.d.ts +162 -0
- package/types/ngneers-controls-popover.d.ts +101 -0
- package/types/ngneers-controls-progress.d.ts +44 -0
- package/types/ngneers-controls-scroller.d.ts +137 -0
- package/types/ngneers-controls-select-button.d.ts +37 -0
- package/types/ngneers-controls-select.d.ts +314 -0
- package/types/ngneers-controls-slider.d.ts +53 -0
- package/types/ngneers-controls-spinner.d.ts +105 -0
- package/types/ngneers-controls-splitter.d.ts +391 -0
- package/types/ngneers-controls-switch.d.ts +18 -0
- package/types/ngneers-controls-table.d.ts +157 -0
- package/types/ngneers-controls-tabs.d.ts +106 -0
- package/types/ngneers-controls-tag.d.ts +19 -0
- package/types/ngneers-controls-toast.d.ts +70 -0
- package/types/ngneers-controls-toggle-button.d.ts +46 -0
- package/types/ngneers-controls-tooltip.d.ts +188 -0
- package/types/ngneers-controls-utils-ng.d.ts +57 -0
- package/types/ngneers-controls-utils.d.ts +130 -0
- package/api/index.d.ts +0 -134
- package/custom-types/index.d.ts +0 -7
- package/dialog/index.d.ts +0 -43
- package/fesm2022/ngneers-controls-custom-types.mjs +0 -4
- package/fesm2022/ngneers-controls-custom-types.mjs.map +0 -1
- package/fesm2022/ngneers-controls-form-field.mjs +0 -33
- package/fesm2022/ngneers-controls-form-field.mjs.map +0 -1
- package/fesm2022/ngneers-controls-lazy-cacher.mjs +0 -30
- package/fesm2022/ngneers-controls-lazy-cacher.mjs.map +0 -1
- package/fesm2022/ngneers-controls-text-field.mjs +0 -23
- package/fesm2022/ngneers-controls-text-field.mjs.map +0 -1
- package/form-field/index.d.ts +0 -19
- package/icon/index.d.ts +0 -30
- package/lazy-cacher/index.d.ts +0 -14
- package/list-box/index.d.ts +0 -58
- package/popover/index.d.ts +0 -41
- package/scroller/index.d.ts +0 -95
- package/select/index.d.ts +0 -86
- package/text-field/index.d.ts +0 -10
- package/utils/index.d.ts +0 -36
- /package/{index.d.ts → types/ngneers-controls.d.ts} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken } 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 { NgnBase } from '@ngneers/controls/base';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @category control
|
|
10
|
+
*/
|
|
11
|
+
declare class NgnInputField extends NgnBase<'inputField'> {
|
|
12
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [_ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>>;
|
|
13
|
+
protected readonly i18n: _ngneers_signal_translate.TranslationsSignal<{
|
|
14
|
+
calendar: {
|
|
15
|
+
today: string;
|
|
16
|
+
selectYear: string;
|
|
17
|
+
weekdays: {
|
|
18
|
+
monday: string;
|
|
19
|
+
tuesday: string;
|
|
20
|
+
wednesday: string;
|
|
21
|
+
thursday: string;
|
|
22
|
+
friday: string;
|
|
23
|
+
saturday: string;
|
|
24
|
+
sunday: string;
|
|
25
|
+
};
|
|
26
|
+
weekdaysShort: {
|
|
27
|
+
monday: string;
|
|
28
|
+
tuesday: string;
|
|
29
|
+
wednesday: string;
|
|
30
|
+
thursday: string;
|
|
31
|
+
friday: string;
|
|
32
|
+
saturday: string;
|
|
33
|
+
sunday: string;
|
|
34
|
+
};
|
|
35
|
+
months: {
|
|
36
|
+
january: string;
|
|
37
|
+
february: string;
|
|
38
|
+
march: string;
|
|
39
|
+
april: string;
|
|
40
|
+
may: string;
|
|
41
|
+
june: string;
|
|
42
|
+
july: string;
|
|
43
|
+
august: string;
|
|
44
|
+
september: string;
|
|
45
|
+
october: string;
|
|
46
|
+
november: string;
|
|
47
|
+
december: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
editInplace: {
|
|
51
|
+
placeholder: string;
|
|
52
|
+
};
|
|
53
|
+
filter: {
|
|
54
|
+
noFilter: string;
|
|
55
|
+
addCondition: string;
|
|
56
|
+
removeCondition: string;
|
|
57
|
+
clear: string;
|
|
58
|
+
matchModeLabel: string;
|
|
59
|
+
match: {
|
|
60
|
+
all: string;
|
|
61
|
+
any: string;
|
|
62
|
+
};
|
|
63
|
+
selected: string;
|
|
64
|
+
conditions: string;
|
|
65
|
+
operators: {
|
|
66
|
+
isEqual: string;
|
|
67
|
+
isNotEqual: string;
|
|
68
|
+
contains: string;
|
|
69
|
+
startsWith: string;
|
|
70
|
+
endsWith: string;
|
|
71
|
+
in: string;
|
|
72
|
+
isEmpty: string;
|
|
73
|
+
isNotEmpty: string;
|
|
74
|
+
greaterThan: string;
|
|
75
|
+
greaterThanOrEqual: string;
|
|
76
|
+
lessThan: string;
|
|
77
|
+
lessThanOrEqual: string;
|
|
78
|
+
after: string;
|
|
79
|
+
onOrAfter: string;
|
|
80
|
+
before: string;
|
|
81
|
+
onOrBefore: string;
|
|
82
|
+
isTrue: string;
|
|
83
|
+
isFalse: string;
|
|
84
|
+
custom: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
splitter: {
|
|
88
|
+
handleLabel: string;
|
|
89
|
+
};
|
|
90
|
+
inputField: {
|
|
91
|
+
clearInput: string;
|
|
92
|
+
};
|
|
93
|
+
drawer: {
|
|
94
|
+
close: string;
|
|
95
|
+
};
|
|
96
|
+
}, "_">;
|
|
97
|
+
private readonly _parentInputfield;
|
|
98
|
+
protected readonly hasParentInputfield: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Label for the input field
|
|
101
|
+
* @default null
|
|
102
|
+
*/
|
|
103
|
+
readonly label: _angular_core.InputSignal<string | null>;
|
|
104
|
+
/**
|
|
105
|
+
* Sets the `aria-labelledby` attribute on the input element
|
|
106
|
+
* @default null
|
|
107
|
+
*/
|
|
108
|
+
readonly labelledBy: _angular_core.InputSignal<string | null>;
|
|
109
|
+
/**
|
|
110
|
+
* The kind of label presentation
|
|
111
|
+
* @todo add link to custom kind documentation subsection label
|
|
112
|
+
* @default undefined
|
|
113
|
+
*/
|
|
114
|
+
readonly labelKind: _angular_core.InputSignal<unknown>;
|
|
115
|
+
/**
|
|
116
|
+
* ID for the input element
|
|
117
|
+
*/
|
|
118
|
+
readonly inputId: _angular_core.InputSignal<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Show clear button
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
readonly showClearButton: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
124
|
+
/**
|
|
125
|
+
* Custom icon for the clear button. Use with `showClearButton`.
|
|
126
|
+
*/
|
|
127
|
+
readonly iconClearButton: _angular_core.InputSignal<string | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
* Tabindex for the input field itself.
|
|
130
|
+
* When another focusable (input) element is present inside the input field, this should be set to -1.
|
|
131
|
+
* @default -1
|
|
132
|
+
*/
|
|
133
|
+
readonly tabindex: _angular_core.InputSignal<number>;
|
|
134
|
+
/**
|
|
135
|
+
* Explicitly apply invalid state styling
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
139
|
+
/**
|
|
140
|
+
* Explicitly apply readonly state styling
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
144
|
+
/**
|
|
145
|
+
* Explicitly apply disabled state styling
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
149
|
+
private readonly _ngnInput;
|
|
150
|
+
constructor();
|
|
151
|
+
protected clicked(event: MouseEvent): void;
|
|
152
|
+
protected clearButtonClicked(event: MouseEvent): void;
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnInputField, never>;
|
|
154
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnInputField, "ngn-input-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelledBy": { "alias": "labelledBy"; "required": false; "isSignal": true; }; "labelKind": { "alias": "labelKind"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "iconClearButton": { "alias": "iconClearButton"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["_ngnInput"], ["input, textarea", "*"], true, never>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare const INPUT_FIELD: InjectionToken<NgnInputField>;
|
|
158
|
+
|
|
159
|
+
export { INPUT_FIELD, NgnInputField };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
3
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
4
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
5
|
+
|
|
6
|
+
type InputMaskCfgEntry = {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
accepts: RegExp;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
type InputMaskCfg = (InputMaskCfgEntry | string)[];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @category control
|
|
15
|
+
*/
|
|
16
|
+
declare class NgnInputMask extends NgnBase<'inputMask'> {
|
|
17
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"input-mask", ["root", "mask", "mask-placeholder", "mask-text"], readonly [_ngneers_controls_themes.ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [_ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>, _ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>]>>;
|
|
18
|
+
/**
|
|
19
|
+
* The mask to apply to the input. Can be a predefined mask key, a custom mask configuration, or a string pattern.
|
|
20
|
+
*/
|
|
21
|
+
readonly mask: _angular_core.InputSignal<string | InputMaskCfg | null>;
|
|
22
|
+
private readonly _ngnInput;
|
|
23
|
+
private readonly _inputElement;
|
|
24
|
+
constructor();
|
|
25
|
+
private readonly _maskHelper;
|
|
26
|
+
protected onInput(event: Event): void;
|
|
27
|
+
protected readonly currentInputValue: _angular_core.WritableSignal<string>;
|
|
28
|
+
private readonly _mask;
|
|
29
|
+
protected readonly maskWatermark: _angular_core.Signal<string | null>;
|
|
30
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
31
|
+
protected onBeforeInput(event: Event): void;
|
|
32
|
+
private _updateValue;
|
|
33
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnInputMask, never>;
|
|
34
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnInputMask, "ngn-input-mask", never, { "mask": { "alias": "mask"; "required": false; "isSignal": true; }; }, {}, ["_ngnInput"], ["*"], true, never>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const MASKS: {
|
|
38
|
+
readonly time: [{
|
|
39
|
+
readonly accepts: RegExp;
|
|
40
|
+
readonly default: "0";
|
|
41
|
+
readonly placeholder: "H";
|
|
42
|
+
}, {
|
|
43
|
+
readonly accepts: RegExp;
|
|
44
|
+
readonly default: "0";
|
|
45
|
+
readonly placeholder: "H";
|
|
46
|
+
}, ":", {
|
|
47
|
+
readonly accepts: RegExp;
|
|
48
|
+
readonly default: "0";
|
|
49
|
+
readonly placeholder: "M";
|
|
50
|
+
}, {
|
|
51
|
+
readonly accepts: RegExp;
|
|
52
|
+
readonly default: "0";
|
|
53
|
+
readonly placeholder: "M";
|
|
54
|
+
}];
|
|
55
|
+
readonly timeSeconds: [{
|
|
56
|
+
readonly accepts: RegExp;
|
|
57
|
+
readonly default: "0";
|
|
58
|
+
readonly placeholder: "H";
|
|
59
|
+
}, {
|
|
60
|
+
readonly accepts: RegExp;
|
|
61
|
+
readonly default: "0";
|
|
62
|
+
readonly placeholder: "H";
|
|
63
|
+
}, ":", {
|
|
64
|
+
readonly accepts: RegExp;
|
|
65
|
+
readonly default: "0";
|
|
66
|
+
readonly placeholder: "M";
|
|
67
|
+
}, {
|
|
68
|
+
readonly accepts: RegExp;
|
|
69
|
+
readonly default: "0";
|
|
70
|
+
readonly placeholder: "M";
|
|
71
|
+
}, ":", {
|
|
72
|
+
readonly accepts: RegExp;
|
|
73
|
+
readonly default: "0";
|
|
74
|
+
readonly placeholder: "S";
|
|
75
|
+
}, {
|
|
76
|
+
readonly accepts: RegExp;
|
|
77
|
+
readonly default: "0";
|
|
78
|
+
readonly placeholder: "S";
|
|
79
|
+
}];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { MASKS, NgnInputMask };
|
|
83
|
+
export type { InputMaskCfg, InputMaskCfgEntry };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
2
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { AfterViewInit } from '@angular/core';
|
|
5
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @category control
|
|
9
|
+
*/
|
|
10
|
+
declare class NgnInput extends NgnBase<'input'> implements AfterViewInit {
|
|
11
|
+
protected readonly hasParentInputfield: _angular_core.WritableSignal<boolean>;
|
|
12
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"input", ["root", "invalid", "empty"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>>;
|
|
13
|
+
protected readonly inputFieldTheme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate>;
|
|
14
|
+
/**
|
|
15
|
+
* Explicitly apply invalid state styling
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
19
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
20
|
+
private readonly _input;
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
constructor();
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnInput, never>;
|
|
24
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnInput, "input[ngnInput], textarea[ngnInput]", never, { "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { NgnInput };
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, AfterViewInit } from '@angular/core';
|
|
3
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
4
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
5
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
6
|
+
import { IconType } from '@ngneers/controls-custom-types';
|
|
7
|
+
|
|
8
|
+
type OverflowStrategy = 'start' | 'end' | 'center' | 'aroundIndex';
|
|
9
|
+
|
|
10
|
+
type ItemOverflowLocation = 'start' | 'end' | 'center';
|
|
11
|
+
type OverflowOrderEntry = {
|
|
12
|
+
index: number;
|
|
13
|
+
location: ItemOverflowLocation;
|
|
14
|
+
};
|
|
15
|
+
type OverflowOrder = readonly OverflowOrderEntry[];
|
|
16
|
+
|
|
17
|
+
declare abstract class ItemViewTemplates<T> extends NgnBase<'itemView'> {
|
|
18
|
+
/**
|
|
19
|
+
* The template to be used for rendering each item in the item view.
|
|
20
|
+
* Can also be set using the `item` content child.
|
|
21
|
+
*/
|
|
22
|
+
readonly templateItem: _angular_core.InputSignal<TemplateRef<Partial<{
|
|
23
|
+
$implicit: T;
|
|
24
|
+
index: number;
|
|
25
|
+
last: boolean;
|
|
26
|
+
first: boolean;
|
|
27
|
+
}>> | null>;
|
|
28
|
+
private readonly _userItemTemplate;
|
|
29
|
+
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<Partial<{
|
|
30
|
+
$implicit: T;
|
|
31
|
+
index: number;
|
|
32
|
+
last: boolean;
|
|
33
|
+
first: boolean;
|
|
34
|
+
}>> | null>;
|
|
35
|
+
private readonly _defaultSeparatorTemplate;
|
|
36
|
+
private readonly _userSeparatorTemplate;
|
|
37
|
+
/**
|
|
38
|
+
* Set a custom template for the separators of the breadcrumb.
|
|
39
|
+
* Can also be set using an `<ng-template>` element with `#separator` template reference variable.
|
|
40
|
+
*/
|
|
41
|
+
readonly templateSeparator: _angular_core.InputSignal<TemplateRef<{
|
|
42
|
+
$implicit: {
|
|
43
|
+
icon?: IconType;
|
|
44
|
+
character?: string;
|
|
45
|
+
};
|
|
46
|
+
}> | null>;
|
|
47
|
+
protected readonly separatorTemplate: _angular_core.Signal<TemplateRef<{
|
|
48
|
+
$implicit: {
|
|
49
|
+
icon?: IconType;
|
|
50
|
+
character?: string;
|
|
51
|
+
};
|
|
52
|
+
}>>;
|
|
53
|
+
private readonly _defaultOverflowItemTemplate;
|
|
54
|
+
private readonly _userOverflowItemTemplate;
|
|
55
|
+
/**
|
|
56
|
+
* Set a custom template for the overflow item.
|
|
57
|
+
* Can also be set using an `<ng-template>` element with `#overflow` template reference variable.
|
|
58
|
+
*/
|
|
59
|
+
readonly templateOverflow: _angular_core.InputSignal<TemplateRef<{
|
|
60
|
+
$implicit: {
|
|
61
|
+
totalCount: number;
|
|
62
|
+
overflowCount: number;
|
|
63
|
+
overflowItems: T[];
|
|
64
|
+
};
|
|
65
|
+
}> | null>;
|
|
66
|
+
protected readonly overflowTemplate: _angular_core.Signal<TemplateRef<{
|
|
67
|
+
$implicit: {
|
|
68
|
+
totalCount: number;
|
|
69
|
+
overflowCount: number;
|
|
70
|
+
overflowItems: T[];
|
|
71
|
+
};
|
|
72
|
+
}>>;
|
|
73
|
+
/**
|
|
74
|
+
* Template types for the item-view.
|
|
75
|
+
* Can be used with the {@link NgnTemplate} directive for type safe ng-templates.
|
|
76
|
+
*/
|
|
77
|
+
readonly templateTypes: {
|
|
78
|
+
item: {
|
|
79
|
+
$implicit: T;
|
|
80
|
+
index: number;
|
|
81
|
+
last: boolean;
|
|
82
|
+
first: boolean;
|
|
83
|
+
};
|
|
84
|
+
separator: {
|
|
85
|
+
$implicit: {
|
|
86
|
+
icon?: IconType;
|
|
87
|
+
character?: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
overflow: {
|
|
91
|
+
$implicit: {
|
|
92
|
+
totalCount: number;
|
|
93
|
+
overflowCount: number;
|
|
94
|
+
overflowItems: T[];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
} & {
|
|
98
|
+
$implicit: {
|
|
99
|
+
item: Partial<{
|
|
100
|
+
$implicit: T;
|
|
101
|
+
index: number;
|
|
102
|
+
last: boolean;
|
|
103
|
+
first: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
separator: Partial<{
|
|
106
|
+
$implicit: {
|
|
107
|
+
icon?: IconType;
|
|
108
|
+
character?: string;
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
overflow: Partial<{
|
|
112
|
+
$implicit: {
|
|
113
|
+
totalCount: number;
|
|
114
|
+
overflowCount: number;
|
|
115
|
+
overflowItems: T[];
|
|
116
|
+
};
|
|
117
|
+
}>;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ItemViewTemplates<any>, never>;
|
|
121
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ItemViewTemplates<any>, never, never, { "templateItem": { "alias": "templateItem"; "required": false; "isSignal": true; }; "templateSeparator": { "alias": "templateSeparator"; "required": false; "isSignal": true; }; "templateOverflow": { "alias": "templateOverflow"; "required": false; "isSignal": true; }; }, {}, ["_userItemTemplate", "_userSeparatorTemplate", "_userOverflowItemTemplate"], never, true, never>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type RenderItem<T> = {
|
|
125
|
+
id: string | number;
|
|
126
|
+
kind: 'visibleItem';
|
|
127
|
+
item: T;
|
|
128
|
+
} | {
|
|
129
|
+
id: string | number;
|
|
130
|
+
kind: 'overflowItem';
|
|
131
|
+
location: ItemOverflowLocation;
|
|
132
|
+
item: T;
|
|
133
|
+
} | {
|
|
134
|
+
id: string;
|
|
135
|
+
kind: 'overflowIndicator';
|
|
136
|
+
visible: boolean;
|
|
137
|
+
items: T[];
|
|
138
|
+
hasSeparator: boolean;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* @category control
|
|
142
|
+
*/
|
|
143
|
+
declare class NgnItemView<T extends object, IdField extends keyof T> extends ItemViewTemplates<T> implements AfterViewInit {
|
|
144
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"item-view", ["root", "item", "item-overflowing", "more-items", "more-items-hidden", "more-items-default", "hidden-separator"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>>;
|
|
145
|
+
/**
|
|
146
|
+
* The key of the id property in the item object. This is used to track items in the template.
|
|
147
|
+
*/
|
|
148
|
+
readonly idField: _angular_core.InputSignal<IdField>;
|
|
149
|
+
/**
|
|
150
|
+
* The items to be displayed in the item view.
|
|
151
|
+
* This is a required input and should be an array of items of type {@link T}.
|
|
152
|
+
*/
|
|
153
|
+
readonly items: _angular_core.InputSignal<readonly T[]>;
|
|
154
|
+
/**
|
|
155
|
+
* A separator string (character) to be displayed between items. Set `true` for `,` or provide a custom string.
|
|
156
|
+
*/
|
|
157
|
+
readonly separator: _angular_core.InputSignal<string | true | undefined>;
|
|
158
|
+
/**
|
|
159
|
+
* A separator icon to be displayed between items.
|
|
160
|
+
*/
|
|
161
|
+
readonly iconItemSeparator: _angular_core.InputSignal<string | undefined>;
|
|
162
|
+
/**
|
|
163
|
+
* Strategy to use when there are more items than can be displayed in the available space.
|
|
164
|
+
* The value determines where the items should start to overflow.
|
|
165
|
+
* @default 'end'
|
|
166
|
+
*/
|
|
167
|
+
readonly overflowStrategy: _angular_core.InputSignal<OverflowStrategy>;
|
|
168
|
+
/**
|
|
169
|
+
* The amount of items to keep visible after or before overflowing, depending on the {@link overflowStrategy}.
|
|
170
|
+
* @default 0
|
|
171
|
+
*/
|
|
172
|
+
readonly overflowStrategyFreezeCount: _angular_core.InputSignal<number>;
|
|
173
|
+
/**
|
|
174
|
+
* Index of the item to be used as the overflow indicator when using the 'aroundIndex' overflow strategy.
|
|
175
|
+
* This input is only relevant when the {@link overflowStrategy} is set to 'aroundIndex'.
|
|
176
|
+
* @default 0
|
|
177
|
+
*/
|
|
178
|
+
readonly overflowStrategyIndex: _angular_core.InputSignal<number>;
|
|
179
|
+
/**
|
|
180
|
+
* Set this to `true` for greatly improving performance when all items have the same width.
|
|
181
|
+
* Especially true for large lists of items.
|
|
182
|
+
*
|
|
183
|
+
* ⚠️ This reduces the accessibility of the control as screen
|
|
184
|
+
* readers will not be able to determine the number of hidden items and keyboard users cannot directly
|
|
185
|
+
* navigate to them. Use this only for potentially very large lists (with items of identical width) where users will not
|
|
186
|
+
* need to access overflowed items directly.
|
|
187
|
+
* @default false
|
|
188
|
+
*/
|
|
189
|
+
readonly sameWidthItems: _angular_core.InputSignal<boolean>;
|
|
190
|
+
private readonly _themeGap;
|
|
191
|
+
private readonly _isBrowser;
|
|
192
|
+
protected readonly separatorChar: _angular_core.Signal<string | undefined>;
|
|
193
|
+
private readonly _enableSizeMeasuring;
|
|
194
|
+
private readonly _renderedItemRefs;
|
|
195
|
+
private readonly _firstItemRef;
|
|
196
|
+
private readonly _firstItemWidth;
|
|
197
|
+
private readonly _renderedItemSizes;
|
|
198
|
+
private readonly _renderedItemWidths;
|
|
199
|
+
private readonly _containerSize;
|
|
200
|
+
private readonly _overflowItemRef;
|
|
201
|
+
private readonly _overflowItemSize;
|
|
202
|
+
protected readonly itemOverflowCheckOrder: _angular_core.Signal<OverflowOrder>;
|
|
203
|
+
protected readonly renderedItems: _angular_core.Signal<RenderItem<T>[]>;
|
|
204
|
+
protected readonly maxWidth: _angular_core.Signal<number>;
|
|
205
|
+
ngAfterViewInit(): void;
|
|
206
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnItemView<any, any>, never>;
|
|
207
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnItemView<any, any>, "ngn-item-view", never, { "idField": { "alias": "idField"; "required": true; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "iconItemSeparator": { "alias": "iconItemSeparator"; "required": false; "isSignal": true; }; "overflowStrategy": { "alias": "overflowStrategy"; "required": false; "isSignal": true; }; "overflowStrategyFreezeCount": { "alias": "overflowStrategyFreezeCount"; "required": false; "isSignal": true; }; "overflowStrategyIndex": { "alias": "overflowStrategyIndex"; "required": false; "isSignal": true; }; "sameWidthItems": { "alias": "sameWidthItems"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export { NgnItemView };
|
|
211
|
+
export type { OverflowStrategy };
|