@sdcorejs/angular 20.2.15 → 20.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/assets/STYLE-GUIDE.md +6 -3
- package/assets/THEME.md +166 -0
- package/assets/fonts/fonts.scss +1 -1
- package/assets/scss/ckeditor5.scss +2 -2
- package/assets/scss/core/_inline-edit.scss +3 -3
- package/assets/scss/core/_read-state-panel.scss +2 -2
- package/assets/scss/core/color.scss +4 -2
- package/assets/scss/core/form.scss +35 -12
- package/assets/scss/core/scrollbar.scss +3 -3
- package/assets/scss/core/utilities/_base.scss +5 -5
- package/assets/scss/core/utilities/_typography.scss +22 -22
- package/assets/scss/sd-core.scss +12 -0
- package/assets/scss/themes/_component-tokens.scss +261 -0
- package/assets/scss/themes/_presets.scss +3 -0
- package/assets/scss/themes/_ramps.scss +56 -0
- package/assets/scss/themes/_scales.scss +90 -0
- package/assets/scss/themes/_semantic.scss +22 -0
- package/assets/scss/themes/default.scss +113 -10
- package/assets/scss/themes/material-theme.scss +3 -0
- package/components/breadcrumb/index.d.ts +2 -1
- package/components/data-state/index.d.ts +6 -2
- package/components/file-explorer/index.d.ts +3 -0
- package/components/form-generic/index.d.ts +897 -835
- package/components/highlight/index.d.ts +27 -0
- package/components/image-editor/index.d.ts +478 -0
- package/components/index.d.ts +2 -0
- package/components/inform/index.d.ts +5 -2
- package/components/mini-editor/index.d.ts +1 -1
- package/components/preview/index.d.ts +51 -2
- package/components/query-builder/index.d.ts +1 -1
- package/components/section/index.d.ts +5 -1
- package/components/table/index.d.ts +6 -0
- package/directives/index.d.ts +8 -0
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +6 -6
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +34 -27
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +35 -5
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +13 -11
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-card.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +8 -4
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +105 -50
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +5846 -6504
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-highlight.mjs +63 -0
- package/fesm2022/sdcorejs-angular-components-highlight.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +2088 -0
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +9 -5
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +40 -22
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +129 -7
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +33 -24
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +11 -7
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +28 -4
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +308 -113
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +14 -5
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +2 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +99 -13
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +149 -6
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +19 -4
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +19 -4
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +17 -7
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +17 -7
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +3 -3
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +18 -4
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +29 -5
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +27 -2
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +498 -7
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +22 -4
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +1429 -271
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-auth.mjs +35 -3
- package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +19 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +39 -48
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +196 -8
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +10 -3
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +5 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +107 -7
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +458 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +169 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs.map +1 -1
- package/forms/autocomplete/index.d.ts +19 -1
- package/forms/chip/index.d.ts +13 -2
- package/forms/chip-calendar/index.d.ts +13 -2
- package/forms/date/index.d.ts +7 -2
- package/forms/datetime/index.d.ts +7 -2
- package/forms/inline-text/index.d.ts +1 -1
- package/forms/input/index.d.ts +21 -5
- package/forms/input-number/index.d.ts +12 -2
- package/forms/label/index.d.ts +16 -1
- package/forms/models/index.d.ts +16 -1
- package/forms/select/index.d.ts +66 -4
- package/forms/textarea/index.d.ts +9 -2
- package/i18n/index.d.ts +285 -54
- package/modules/auth/index.d.ts +3 -3
- package/modules/icon/index.d.ts +11 -1
- package/modules/layout/index.d.ts +2 -2
- package/modules/permission/index.d.ts +3 -2
- package/package.json +14 -2
- package/services/api/index.d.ts +49 -2
- package/services/confirm/index.d.ts +15 -0
- package/services/notify/index.d.ts +8 -0
- package/utilities/extensions/index.d.ts +68 -1
- package/utilities/index.d.ts +1 -0
- package/utilities/theme/index.d.ts +25 -0
|
@@ -7,7 +7,7 @@ import { MatCalendar } from '@angular/material/datepicker';
|
|
|
7
7
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
8
8
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
9
9
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
10
|
-
import { SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
10
|
+
import { SdLabelPlacement, SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
11
11
|
import { Size } from '@sdcorejs/utils/models';
|
|
12
12
|
|
|
13
13
|
declare class SdChipCalendarErrorStateMatcher implements ErrorStateMatcher {
|
|
@@ -32,6 +32,17 @@ declare class SdChipCalendar implements AfterViewInit, OnDestroy {
|
|
|
32
32
|
readonly dataErrorMessage: _angular_core.Signal<string | null>;
|
|
33
33
|
name: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
34
34
|
appearance: _angular_core.InputSignalWithTransform<MatFormFieldAppearance, MatFormFieldAppearance | null | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* `'float'` (mặc định) hoặc `'top'` — nhãn `<label for>` tĩnh phía trên ô nhập chip.
|
|
37
|
+
* why: ô nhập chip là `<input matInput>` thật nên nhãn rời gắn `for` vào đó (`inputId`).
|
|
38
|
+
*/
|
|
39
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
40
|
+
/**
|
|
41
|
+
* id ổn định của ô nhập chip — nhãn rời trỏ `for` sang, và `mat-chip-grid` dùng nó làm id cho
|
|
42
|
+
* `<mat-label>` ở chế độ nổi. why: luôn gán (kể cả `'float'`): `[id]="null"` sẽ ghi đè id mặc định
|
|
43
|
+
* của `MatChipInput` thành chuỗi `"null"` và làm mất liên kết nhãn.
|
|
44
|
+
*/
|
|
45
|
+
readonly inputId: string;
|
|
35
46
|
floatLabel: _angular_core.InputSignalWithTransform<FloatLabelType, FloatLabelType | null | undefined>;
|
|
36
47
|
size: _angular_core.InputSignalWithTransform<Size, Size | null | undefined>;
|
|
37
48
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
@@ -80,7 +91,7 @@ declare class SdChipCalendar implements AfterViewInit, OnDestroy {
|
|
|
80
91
|
onCloseCalendar: () => void;
|
|
81
92
|
dateClass: (cellDate: Date) => "" | "sd-chip-calendar-selected-date";
|
|
82
93
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdChipCalendar, never>;
|
|
83
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChipCalendar, "sd-chip-calendar", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
|
|
94
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChipCalendar, "sd-chip-calendar", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
export { SdChipCalendar };
|
package/forms/date/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
5
5
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
6
6
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
7
|
-
import { SdViewed, SdViewedInput, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
7
|
+
import { SdViewed, SdViewedInput, SdLabelPlacement, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
8
8
|
import { Size } from '@sdcorejs/utils/models';
|
|
9
9
|
|
|
10
10
|
type SdDateModelValue = string | number | Date | undefined | null;
|
|
@@ -19,6 +19,9 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
19
19
|
/** why: id ổn định của <mat-error> để control trỏ `aria-describedby` sang — thông báo lỗi
|
|
20
20
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
21
21
|
readonly errorId: string;
|
|
22
|
+
/** id của nhãn/helper khi `labelPlacement='top'`. */
|
|
23
|
+
readonly labelId: string;
|
|
24
|
+
readonly hintId: string;
|
|
22
25
|
inputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
23
26
|
datePicker: _angular_core.Signal<MatDatepicker<Date> | undefined>;
|
|
24
27
|
sdLabelTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
@@ -65,6 +68,8 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
65
68
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
66
69
|
appearance: _angular_core.Signal<MatFormFieldAppearance>;
|
|
67
70
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
71
|
+
/** `'float'` (mặc định) hoặc `'top'` — nhãn `<label for>` tĩnh phía trên, helper text dưới control. */
|
|
72
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
68
73
|
minInput: _angular_core.InputSignal<any>;
|
|
69
74
|
minDateInput: _angular_core.InputSignal<any>;
|
|
70
75
|
resolvedMin: _angular_core.Signal<Date | null>;
|
|
@@ -103,7 +108,7 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
103
108
|
onChange: (event: MatDatepickerInputEvent<Date>) => void;
|
|
104
109
|
clear: ($event: any) => void;
|
|
105
110
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdDate, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDate, "sd-date", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "maxDate"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdLabelDef"], ["[sdLabel]"], true, never>;
|
|
111
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDate, "sd-date", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "maxDate"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdLabelDef"], ["[sdLabel]"], true, never>;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
export { SdDate };
|
|
@@ -3,7 +3,7 @@ import { OnDestroy, OnInit, ElementRef, TemplateRef } from '@angular/core';
|
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
5
5
|
import { SdViewDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
6
|
-
import { SdViewed, SdViewedInput, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
6
|
+
import { SdViewed, SdViewedInput, SdLabelPlacement, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
7
7
|
import { Size } from '@sdcorejs/utils/models';
|
|
8
8
|
|
|
9
9
|
type SdDatetimeModelValue = string | number | Date | undefined | null;
|
|
@@ -13,6 +13,9 @@ declare class SdDatetime implements OnDestroy, OnInit {
|
|
|
13
13
|
/** why: id ổn định của <mat-error> để control trỏ `aria-describedby` sang — thông báo lỗi
|
|
14
14
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
15
15
|
readonly errorId: string;
|
|
16
|
+
/** id của nhãn/helper khi `labelPlacement='top'`. */
|
|
17
|
+
readonly labelId: string;
|
|
18
|
+
readonly hintId: string;
|
|
16
19
|
inputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
17
20
|
private readonly dateTimePicker;
|
|
18
21
|
sdLabelTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
@@ -61,6 +64,8 @@ declare class SdDatetime implements OnDestroy, OnInit {
|
|
|
61
64
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
62
65
|
appearance: _angular_core.Signal<MatFormFieldAppearance>;
|
|
63
66
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
67
|
+
/** `'float'` (mặc định) hoặc `'top'` — nhãn `<label for>` tĩnh phía trên, helper text dưới control. */
|
|
68
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
64
69
|
minInput: _angular_core.InputSignal<any>;
|
|
65
70
|
minDateInput: _angular_core.InputSignal<any>;
|
|
66
71
|
resolvedMin: _angular_core.Signal<Date | null>;
|
|
@@ -106,7 +111,7 @@ declare class SdDatetime implements OnDestroy, OnInit {
|
|
|
106
111
|
onConfirmInput: (event: any) => void;
|
|
107
112
|
clear: ($event: any) => void;
|
|
108
113
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdDatetime, never>;
|
|
109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDatetime, "sd-datetime", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "maxDate"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef"], ["[sdLabel]"], true, never>;
|
|
114
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDatetime, "sd-datetime", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "maxDate"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef"], ["[sdLabel]"], true, never>;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
export { SdDatetime };
|
|
@@ -15,7 +15,7 @@ type SdInlineTextChrome = 'standalone' | 'seamless';
|
|
|
15
15
|
*
|
|
16
16
|
* It is intentionally unopinionated about commit/parse/format: it forwards the raw DOM events
|
|
17
17
|
* (focus / blur / keydown / paste / composition / Enter / Escape) so each consumer keeps its own
|
|
18
|
-
* logic (e.g. sd-input-number's
|
|
18
|
+
* logic (e.g. sd-input-number's number formatting). Two binding modes:
|
|
19
19
|
* - **uncontrolled** via `[(value)]` — used by the chips' signal drafts;
|
|
20
20
|
* - **controlled** via `[control]` (an external `SdFormControl`) — used by the form controls.
|
|
21
21
|
*/
|
package/forms/input/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sdcorejs_angular_forms_models from '@sdcorejs/angular/forms/models';
|
|
2
|
-
import { SdViewed, SdViewedInput, SdCustomValidator, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
2
|
+
import { SdLabelPlacement, SdViewed, SdViewedInput, SdCustomValidator, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
3
3
|
import * as _sdcorejs_angular_forms_input from '@sdcorejs/angular/forms/input';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { OnDestroy, OnInit, AfterViewInit, ElementRef, TemplateRef, EventEmitter } from '@angular/core';
|
|
@@ -59,6 +59,9 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
59
59
|
/** why: id ổn định của <mat-error> để `<input>` trỏ `aria-describedby` sang — thông báo lỗi
|
|
60
60
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
61
61
|
readonly errorId: string;
|
|
62
|
+
/** id của nhãn/helper khi `labelPlacement='top'` — control trỏ `aria-describedby` sang helper. */
|
|
63
|
+
readonly labelId: string;
|
|
64
|
+
readonly hintId: string;
|
|
62
65
|
control: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
63
66
|
/** The inline primitive — only present when `viewed='inline'`; drives focus/blur in that mode. */
|
|
64
67
|
inlineRef: _angular_core.Signal<SdInlineText | undefined>;
|
|
@@ -81,16 +84,29 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
81
84
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
82
85
|
appearance: _angular_core.Signal<MatFormFieldAppearance>;
|
|
83
86
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
87
|
+
/**
|
|
88
|
+
* `'float'` (mặc định) giữ floating label của Material. `'top'` đặt nhãn `<label for>` tĩnh
|
|
89
|
+
* phía trên control, helper text thành dòng gợi ý dưới control. Xem `SdLabelPlacement`.
|
|
90
|
+
*/
|
|
91
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
84
92
|
size: _angular_core.InputSignal<Size>;
|
|
85
93
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
86
94
|
label: _angular_core.InputSignal<string | undefined>;
|
|
87
95
|
helperText: _angular_core.InputSignal<string | undefined>;
|
|
88
96
|
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
89
|
-
|
|
97
|
+
/** Kiểu `<input>` gốc. `'tel'`/`'url'` chỉ đổi bàn phím/autofill — KHÔNG tự thêm validation. */
|
|
98
|
+
type: _angular_core.InputSignal<"number" | "text" | "tel" | "email" | "url" | "password">;
|
|
90
99
|
mask: _angular_core.InputSignal<SdInputMask | null | undefined>;
|
|
91
100
|
readonly maskAdapter: _angular_core.Signal<_sdcorejs_angular_forms_input.SdInputMaskAdapter | undefined>;
|
|
92
|
-
readonly effectiveType: _angular_core.Signal<"number" | "text" | "email" | "password">;
|
|
93
|
-
|
|
101
|
+
readonly effectiveType: _angular_core.Signal<"number" | "text" | "tel" | "email" | "url" | "password">;
|
|
102
|
+
/** `inputmode` gốc do consumer chỉ định; mask (nếu có) luôn thắng vì nó biết ký tự hợp lệ. */
|
|
103
|
+
readonly inputmodeInput: _angular_core.InputSignal<string | null | undefined>;
|
|
104
|
+
readonly inputMode: _angular_core.Signal<string | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* Token `autocomplete` (vd `email`, `tel`, `url`, `new-password`). Không truyền thì giữ hành vi
|
|
107
|
+
* cũ: gán một token ngẫu nhiên để trình duyệt không tự điền.
|
|
108
|
+
*/
|
|
109
|
+
readonly autocomplete: _angular_core.InputSignal<string | null | undefined>;
|
|
94
110
|
readonly maxDisplayLength: _angular_core.Signal<number | undefined>;
|
|
95
111
|
hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
96
112
|
blurOnEnter: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -160,7 +176,7 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
160
176
|
blur: () => void;
|
|
161
177
|
focus: () => void;
|
|
162
178
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInput, never>;
|
|
163
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInput, "sd-input", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "mask": { "alias": "mask"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "patternErrorMessage": { "alias": "patternErrorMessage"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSuffixDef", "sdViewDef"], ["[sdLabel]"], true, never>;
|
|
179
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInput, "sd-input", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "mask": { "alias": "mask"; "required": false; "isSignal": true; }; "inputmodeInput": { "alias": "inputmode"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "patternErrorMessage": { "alias": "patternErrorMessage"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSuffixDef", "sdViewDef"], ["[sdLabel]"], true, never>;
|
|
164
180
|
}
|
|
165
181
|
|
|
166
182
|
export { SD_INPUT_MASKS, SdInput, sdCreateInputMask, sdResolveInputMask };
|
|
@@ -5,7 +5,7 @@ import { ErrorStateMatcher } from '@angular/material/core';
|
|
|
5
5
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
6
6
|
import { SdInlineText } from '@sdcorejs/angular/forms/inline-text';
|
|
7
7
|
import { SdViewDefDirective, SdSuffixDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
8
|
-
import { SdViewed, SdViewedInput, SdCustomValidator, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
8
|
+
import { SdViewed, SdViewedInput, SdCustomValidator, SdLabelPlacement, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
9
9
|
import { Size } from '@sdcorejs/utils/models';
|
|
10
10
|
|
|
11
11
|
declare class SdInputNumberErrotStateMatcher implements ErrorStateMatcher {
|
|
@@ -19,6 +19,9 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
|
|
|
19
19
|
/** why: id ổn định của <mat-error> để control trỏ `aria-describedby` sang — thông báo lỗi
|
|
20
20
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
21
21
|
readonly errorId: string;
|
|
22
|
+
/** id của nhãn/helper khi `labelPlacement='top'`. */
|
|
23
|
+
readonly labelId: string;
|
|
24
|
+
readonly hintId: string;
|
|
22
25
|
control: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
23
26
|
/** The inline primitive — only present when `viewed='inline'`; drives focus/blur in that mode. */
|
|
24
27
|
inlineRef: _angular_core.Signal<SdInlineText | undefined>;
|
|
@@ -75,6 +78,13 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
|
|
|
75
78
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
76
79
|
appearance: _angular_core.Signal<MatFormFieldAppearance>;
|
|
77
80
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
81
|
+
/** `'float'` (mặc định) hoặc `'top'` — nhãn `<label for>` tĩnh phía trên, helper text dưới control. */
|
|
82
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
83
|
+
/**
|
|
84
|
+
* `inputmode` gốc (vd `'numeric'`, `'decimal'`). Mặc định không đặt — bàn phím số của iOS không có
|
|
85
|
+
* dấu trừ, nên chỉ consumer biết chắc giá trị không âm mới nên bật.
|
|
86
|
+
*/
|
|
87
|
+
readonly inputmode: _angular_core.InputSignal<string | null | undefined>;
|
|
78
88
|
valueModel: _angular_core.ModelSignal<any>;
|
|
79
89
|
sdChange: _angular_core.OutputEmitterRef<any>;
|
|
80
90
|
sdFocus: _angular_core.OutputEmitterRef<void>;
|
|
@@ -107,7 +117,7 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
|
|
|
107
117
|
blur: () => void;
|
|
108
118
|
focus: () => void;
|
|
109
119
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInputNumber, never>;
|
|
110
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputNumber, "sd-input-number", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdSuffixDef"], ["[sdLabel]"], true, never>;
|
|
120
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputNumber, "sd-input-number", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "inputmode": { "alias": "inputmode"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdSuffixDef"], ["[sdLabel]"], true, never>;
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
export { SdInputNumber };
|
package/forms/label/index.d.ts
CHANGED
|
@@ -9,8 +9,23 @@ declare class SdLabel {
|
|
|
9
9
|
set _required(val: boolean | '' | undefined | null);
|
|
10
10
|
helperText?: string;
|
|
11
11
|
set _helperText(val: string | undefined);
|
|
12
|
+
/**
|
|
13
|
+
* `id` của phần tử nhập liệu THẬT (input/textarea) mà nhãn gắn vào. Khi có, nhãn render bằng
|
|
14
|
+
* `<label for>` gốc: bấm nhãn focus control và screen reader đọc nhãn làm tên của control.
|
|
15
|
+
*
|
|
16
|
+
* why: `<sd-label>` trước đây chỉ là `<span>` trình bày — bấm vào không làm gì và không nối
|
|
17
|
+
* được với control. Nhãn rời (`labelPlacement="top"`) cần liên kết thật tới input.
|
|
18
|
+
*/
|
|
19
|
+
htmlFor?: string | null;
|
|
20
|
+
set _for(val: string | undefined | null);
|
|
21
|
+
/**
|
|
22
|
+
* `id` đặt lên phần tử chứa chữ của nhãn, để control không phải input gốc (vd `mat-select`)
|
|
23
|
+
* trỏ `aria-labelledby` sang.
|
|
24
|
+
*/
|
|
25
|
+
labelId?: string | null;
|
|
26
|
+
set _labelId(val: string | undefined | null);
|
|
12
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdLabel, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdLabel, "sd-label", never, { "_label": { "alias": "label"; "required": false; }; "_description": { "alias": "description"; "required": false; }; "_required": { "alias": "required"; "required": false; }; "_helperText": { "alias": "helperText"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdLabel, "sd-label", never, { "_label": { "alias": "label"; "required": false; }; "_description": { "alias": "description"; "required": false; }; "_required": { "alias": "required"; "required": false; }; "_helperText": { "alias": "helperText"; "required": false; }; "_for": { "alias": "for"; "required": false; }; "_labelId": { "alias": "labelId"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
29
|
}
|
|
15
30
|
|
|
16
31
|
export { SdLabel };
|
package/forms/models/index.d.ts
CHANGED
|
@@ -122,6 +122,21 @@ interface SdViewedInlineApi {
|
|
|
122
122
|
*/
|
|
123
123
|
declare function sdViewedInline(viewed: Signal<SdViewed>, open?: () => void, disabled?: Signal<boolean>): SdViewedInlineApi;
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Vị trí nhãn của một form control Core.
|
|
127
|
+
*
|
|
128
|
+
* - `'float'` (mặc định): floating label của Material nằm trong viền `mat-form-field`. Đây là
|
|
129
|
+
* hành vi lịch sử của mọi control — KHÔNG đổi.
|
|
130
|
+
* - `'top'`: nhãn tĩnh (`<label for>` thật) đặt phía trên control, luôn hiển thị; placeholder
|
|
131
|
+
* chỉ là placeholder (không còn tự lấy nhãn làm placeholder); helper text hiện thành dòng
|
|
132
|
+
* gợi ý phía dưới control và được liên kết `aria-describedby`, bị thay bằng thông báo lỗi khi
|
|
133
|
+
* control lỗi.
|
|
134
|
+
*
|
|
135
|
+
* why: form-generic (builder/renderer) cần nhãn rời phía trên control mà không đổi mặc định của
|
|
136
|
+
* toàn bộ thư viện. Đây là API additive — control nào không truyền vẫn là `'float'`.
|
|
137
|
+
*/
|
|
138
|
+
type SdLabelPlacement = 'float' | 'top';
|
|
139
|
+
|
|
125
140
|
/**
|
|
126
141
|
* Output serialization strategy for the temporal form controls (`<sd-date>`, `<sd-datetime>`,
|
|
127
142
|
* `<sd-date-range>`).
|
|
@@ -344,4 +359,4 @@ declare class SdStrictDateFnsAdapter extends DateFnsAdapter {
|
|
|
344
359
|
declare function provideSdStrictDateFnsAdapter(formats: MatDateFormats): Provider[];
|
|
345
360
|
|
|
346
361
|
export { HandleSdCustomValidator, SD_FORM_CONFIGURATION, SD_TEMPORAL_VALUE_TRANSFORMS, SdFormControl, SdInlineErrorValidator, SdStrictDateFnsAdapter, provideSdStrictDateFnsAdapter, sdFormControlState, sdIsTemporalValueTransform, sdLocalStartOfDay, sdParseTransformedTemporal, sdSerializeTemporalValue, sdViewedInline, sdViewedTransform, ɵsdCoerceFormGroup, ɵsdFormControlConnector, ɵsdModelFacingControl, ɵsdTimerScope };
|
|
347
|
-
export type { ISdFormConfiguration, SdCustomValidator, SdFormControlSnapshot, SdSearch, SdSearchReq, SdSelectionData, SdTemporalValueTransform, SdViewed, SdViewedInlineApi, SdViewedInput, ɵSdFormControlConnector, ɵSdFormControlConnectorOptions, ɵSdFormControlConnectorState, ɵSdFormControlParent, ɵSdModelFacingControl, ɵSdModelFacingControlOptions, ɵSdTimerScope };
|
|
362
|
+
export type { ISdFormConfiguration, SdCustomValidator, SdFormControlSnapshot, SdLabelPlacement, SdSearch, SdSearchReq, SdSelectionData, SdTemporalValueTransform, SdViewed, SdViewedInlineApi, SdViewedInput, ɵSdFormControlConnector, ɵSdFormControlConnectorOptions, ɵSdFormControlConnectorState, ɵSdFormControlParent, ɵSdModelFacingControl, ɵSdModelFacingControlOptions, ɵSdTimerScope };
|
package/forms/select/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, OnInit, Signal } from '@angular/core';
|
|
2
|
+
import { TemplateRef, OnInit, DoCheck, Signal } from '@angular/core';
|
|
3
3
|
import { FormGroup, FormControl } from '@angular/forms';
|
|
4
|
+
import { ErrorStateMatcher } from '@angular/material/core';
|
|
4
5
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
5
6
|
import { MatInput } from '@angular/material/input';
|
|
6
7
|
import { MatSelect, MatSelectChange } from '@angular/material/select';
|
|
7
8
|
import { SdDataStateTemplateDirective } from '@sdcorejs/angular/components/data-state';
|
|
8
9
|
import { SdSearchReadState } from '@sdcorejs/angular/utilities/read-state';
|
|
9
10
|
import { SdItemDefDefDirective, SdViewDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
10
|
-
import { SdViewed, SdViewedInput, SdCustomValidator, SdSearch, SdSelectionData, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
11
|
+
import { SdViewed, SdViewedInput, SdCustomValidator, SdLabelPlacement, SdSearch, SdSelectionData, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
11
12
|
import { Size } from '@sdcorejs/utils/models';
|
|
12
13
|
|
|
13
14
|
interface SdSelectFooterActionContext {
|
|
@@ -24,14 +25,19 @@ declare class SdSelectFooterActionDirective {
|
|
|
24
25
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdSelectFooterActionDirective, "ng-template[sdSelectFooterAction]", never, { "when": { "alias": "when"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
declare class SdSelect<T extends object | string | number = Record<string, unknown>> implements OnInit {
|
|
28
|
+
declare class SdSelect<T extends object | string | number = Record<string, unknown>> implements OnInit, DoCheck {
|
|
28
29
|
#private;
|
|
29
30
|
id: string;
|
|
30
31
|
/** why: id ổn định của <mat-error> để control trỏ `aria-describedby` sang — thông báo lỗi
|
|
31
32
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
32
33
|
readonly errorId: string;
|
|
34
|
+
/** id của nhãn/helper khi `labelPlacement='top'` — `mat-select` trỏ `aria-labelledby` sang nhãn. */
|
|
35
|
+
readonly labelId: string;
|
|
36
|
+
readonly hintId: string;
|
|
33
37
|
matInputRef: Signal<MatInput | undefined>;
|
|
34
38
|
selectRef: Signal<MatSelect | undefined>;
|
|
39
|
+
private readonly selectElement;
|
|
40
|
+
private readonly virtualViewport;
|
|
35
41
|
sdLabelTemplate: Signal<TemplateRef<any> | undefined>;
|
|
36
42
|
sdValueTemplate: Signal<TemplateRef<any> | undefined>;
|
|
37
43
|
/**
|
|
@@ -72,6 +78,14 @@ declare class SdSelect<T extends object | string | number = Record<string, unkno
|
|
|
72
78
|
disabledField: _angular_core.InputSignal<"" | (T extends object ? { [Key in keyof T & string]: T[Key] extends string | number | boolean | Function | Date | null | undefined ? Key : T[Key] extends any[] ? Key : T[Key] extends object ? Key | `${Key}.${T[Key] extends infer T_1 ? T_1 extends T[Key] ? T_1 extends object ? { [Key_1 in keyof T_1 & string]: T_1[Key_1] extends string | number | boolean | Function | Date | null | undefined ? Key_1 : T_1[Key_1] extends any[] ? Key_1 : T_1[Key_1] extends object ? Key_1 | `${Key_1}.${T_1[Key_1] extends infer T_2 ? T_2 extends T_1[Key_1] ? T_2 extends object ? { [Key_2 in keyof T_2 & string]: T_2[Key_2] extends string | number | boolean | Function | Date | null | undefined ? Key_2 : T_2[Key_2] extends any[] ? Key_2 : T_2[Key_2] extends object ? Key_2 | `${Key_2}.${T_2[Key_2] extends infer T_3 ? T_3 extends T_2[Key_2] ? T_3 extends object ? { [Key_3 in keyof T_3 & string]: T_3[Key_3] extends string | number | boolean | Function | Date | null | undefined ? Key_3 : T_3[Key_3] extends any[] ? Key_3 : T_3[Key_3] extends object ? Key_3 : Key_3; }[keyof T_3 & string] : string : never : never}` : Key_2; }[keyof T_2 & string] : string : never : never}` : Key_1; }[keyof T_1 & string] : string : never : never}` : Key; }[keyof T & string] : string)>;
|
|
73
79
|
cacheChecksum: _angular_core.InputSignal<any>;
|
|
74
80
|
limit: _angular_core.InputSignal<number>;
|
|
81
|
+
/**
|
|
82
|
+
* Virtual scrolling for long lists (opt-in, default `false`). When on, the panel renders only the rows
|
|
83
|
+
* in view, array items are no longer cut by `limit`, and the component — not `mat-select` — owns the
|
|
84
|
+
* value. See sd-select.md, "Virtual scroll".
|
|
85
|
+
*/
|
|
86
|
+
readonly virtualScroll: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
87
|
+
/** Fixed row height in px for the virtual viewport. Default 36 = the panel's compact option row. */
|
|
88
|
+
readonly itemSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
75
89
|
hyperlink: _angular_core.InputSignal<string | null | undefined>;
|
|
76
90
|
minWidthPanel: _angular_core.InputSignalWithTransform<string | number, string | number | null | undefined>;
|
|
77
91
|
hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -110,6 +124,8 @@ declare class SdSelect<T extends object | string | number = Record<string, unkno
|
|
|
110
124
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
111
125
|
appearance: Signal<MatFormFieldAppearance>;
|
|
112
126
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
127
|
+
/** `'float'` (mặc định) hoặc `'top'` — nhãn tĩnh phía trên, helper text dưới control. */
|
|
128
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
113
129
|
items: _angular_core.InputSignal<SdSearch | T[] | Signal<T[]> | null | undefined>;
|
|
114
130
|
valueModel: _angular_core.ModelSignal<string | number | boolean | (string | number)[] | null | undefined>;
|
|
115
131
|
sdChange: _angular_core.OutputEmitterRef<any>;
|
|
@@ -131,6 +147,41 @@ declare class SdSelect<T extends object | string | number = Record<string, unkno
|
|
|
131
147
|
selectedItems: T[];
|
|
132
148
|
}>;
|
|
133
149
|
readonly visibleFooterActions: Signal<SdSelectFooterActionDirective[]>;
|
|
150
|
+
/** Value bound one-way to the virtual shell; the shell never writes it back (no `formControl` on it). */
|
|
151
|
+
protected readonly virtualShellValue: Signal<string | number | boolean | (string | number | boolean)[] | null>;
|
|
152
|
+
protected readonly virtualSentinel: symbol;
|
|
153
|
+
protected readonly virtualPanelClass: {
|
|
154
|
+
single: string[];
|
|
155
|
+
multiple: string[];
|
|
156
|
+
};
|
|
157
|
+
/** A rendered option matches its own value; the sentinel matches any value whose option is not rendered. */
|
|
158
|
+
protected readonly virtualCompareWith: (optionValue: unknown, value: unknown) => boolean;
|
|
159
|
+
/** The virtual shell cannot see `formControl`, so the component supplies Material's error state. */
|
|
160
|
+
protected readonly virtualErrorStateMatcher: ErrorStateMatcher;
|
|
161
|
+
/** Same rule as the non-virtual template: rows render when both fields are set, or neither. */
|
|
162
|
+
protected readonly virtualRenderable: Signal<boolean>;
|
|
163
|
+
protected readonly virtualViewportHeight: Signal<number>;
|
|
164
|
+
protected readonly virtualTrackBy: (_index: number, item: T) => unknown;
|
|
165
|
+
/** Stable id per row index: aria-activedescendant targets and finds the rendered option by it. */
|
|
166
|
+
protected readonly virtualOptionId: (index: number) => string;
|
|
167
|
+
/** Context of `#sdSelected` in the virtual branch — the same shape as the non-virtual templates. */
|
|
168
|
+
protected readonly selectedTemplateContext: Signal<{
|
|
169
|
+
$implicit: T[];
|
|
170
|
+
item: T[];
|
|
171
|
+
items: T[];
|
|
172
|
+
display: string;
|
|
173
|
+
multiple: boolean;
|
|
174
|
+
} | {
|
|
175
|
+
$implicit: T;
|
|
176
|
+
item: T;
|
|
177
|
+
items: T[];
|
|
178
|
+
display: string;
|
|
179
|
+
multiple: boolean;
|
|
180
|
+
}>;
|
|
181
|
+
/** Index of the active row in the full filtered list, or -1. */
|
|
182
|
+
readonly virtualActiveIndex: Signal<number>;
|
|
183
|
+
/** `aria-activedescendant` of the search box: the active row, only while it is rendered. */
|
|
184
|
+
protected readonly virtualActiveDescendant: Signal<string | null>;
|
|
134
185
|
normalizedValue: Signal<string | number | boolean | (string | number | boolean)[] | null | undefined>;
|
|
135
186
|
filtered: Signal<boolean>;
|
|
136
187
|
delayTime: Signal<0 | 500>;
|
|
@@ -151,6 +202,7 @@ declare class SdSelect<T extends object | string | number = Record<string, unkno
|
|
|
151
202
|
tooltip: Signal<string>;
|
|
152
203
|
updatePanelWidth: () => void;
|
|
153
204
|
constructor();
|
|
205
|
+
ngDoCheck(): void;
|
|
154
206
|
ngOnInit(): void;
|
|
155
207
|
protected focusReadRetry: (event: KeyboardEvent) => void;
|
|
156
208
|
protected onReadRegionKeydown: (event: KeyboardEvent) => void;
|
|
@@ -166,14 +218,24 @@ declare class SdSelect<T extends object | string | number = Record<string, unkno
|
|
|
166
218
|
reValidate: () => void;
|
|
167
219
|
clear: ($event?: any) => void;
|
|
168
220
|
onClick: () => void;
|
|
221
|
+
/**
|
|
222
|
+
* Bấm nhãn rời (`labelPlacement='top'`) focus `mat-select` — như `<label for>` với input gốc.
|
|
223
|
+
* why: `mat-select` không phải phần tử "labelable" nên `for` không có tác dụng; chỉ focus, KHÔNG
|
|
224
|
+
* mở panel (hành vi giống select gốc).
|
|
225
|
+
*/
|
|
226
|
+
onLabelClick: () => void;
|
|
169
227
|
focus: () => void;
|
|
170
228
|
/** Clears the panel search/filter input and resets `searchText`. */
|
|
171
229
|
clearSearch: () => void;
|
|
172
230
|
/** Open the select panel programmatically (anchors to the mat-select trigger). */
|
|
173
231
|
open: () => void;
|
|
174
232
|
onOpenedChange: (isOpened: boolean) => void;
|
|
233
|
+
/** Mirrors MatSelect._onBlur: a blur while the panel is open is focus moving into the panel. */
|
|
234
|
+
protected onVirtualBlur: () => void;
|
|
235
|
+
/** Keys in the search box: rows move with the arrows/Page/Home/End, Enter chooses the active row. */
|
|
236
|
+
protected onVirtualSearchKeydown: (event: KeyboardEvent) => void;
|
|
175
237
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdSelect<any>, never>;
|
|
176
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSelect<any>, "sd-select", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "displayField": { "alias": "displayField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "cacheChecksum": { "alias": "cacheChecksum"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "minWidthPanel": { "alias": "minWidthPanel"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "hideReadError": { "alias": "hideReadError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "sdReadStateChange": "sdReadStateChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; "sdSelection": "sdSelection"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSelectedTemplate", "itemDef", "sdViewDef", "footerActions", "dataStateTemplate"], ["[sdLabel]"], true, never>;
|
|
238
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSelect<any>, "sd-select", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "displayField": { "alias": "displayField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "cacheChecksum": { "alias": "cacheChecksum"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "minWidthPanel": { "alias": "minWidthPanel"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "hideReadError": { "alias": "hideReadError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "sdReadStateChange": "sdReadStateChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; "sdSelection": "sdSelection"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSelectedTemplate", "itemDef", "sdViewDef", "footerActions", "dataStateTemplate"], ["[sdLabel]"], true, never>;
|
|
177
239
|
}
|
|
178
240
|
|
|
179
241
|
export { SdSelect, SdSelectFooterActionDirective };
|
|
@@ -3,7 +3,7 @@ import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
5
5
|
import { SdViewDefDirective, SdLabelDefDirective, SdSuffixDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
6
|
-
import { SdViewed, SdViewedInput, SdCustomValidator, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
6
|
+
import { SdViewed, SdViewedInput, SdCustomValidator, SdLabelPlacement, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
7
7
|
import { Size } from '@sdcorejs/utils/models';
|
|
8
8
|
|
|
9
9
|
declare class SdTextarea implements OnInit, OnDestroy {
|
|
@@ -12,6 +12,9 @@ declare class SdTextarea implements OnInit, OnDestroy {
|
|
|
12
12
|
/** why: id ổn định của <mat-error> để control trỏ `aria-describedby` sang — thông báo lỗi
|
|
13
13
|
* phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
14
14
|
readonly errorId: string;
|
|
15
|
+
/** id của nhãn/helper khi `labelPlacement='top'`. */
|
|
16
|
+
readonly labelId: string;
|
|
17
|
+
readonly hintId: string;
|
|
15
18
|
textareaRef: _angular_core.Signal<ElementRef<HTMLTextAreaElement> | undefined>;
|
|
16
19
|
sdViewDef: _angular_core.Signal<SdViewDefDirective<any, any> | undefined>;
|
|
17
20
|
sdLabelDef: _angular_core.Signal<SdLabelDefDirective | undefined>;
|
|
@@ -46,6 +49,8 @@ declare class SdTextarea implements OnInit, OnDestroy {
|
|
|
46
49
|
/** Focus the inline textarea. No-op unless `viewed='inline'`. */
|
|
47
50
|
enterInlineEdit: () => void;
|
|
48
51
|
maxlength: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
52
|
+
/** Số ký tự tối thiểu (khi có giá trị). Rỗng vẫn do `required` quyết định. */
|
|
53
|
+
minlength: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
49
54
|
pattern: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
50
55
|
validator: _angular_core.InputSignal<SdCustomValidator | undefined>;
|
|
51
56
|
inlineError: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
@@ -56,6 +61,8 @@ declare class SdTextarea implements OnInit, OnDestroy {
|
|
|
56
61
|
appearanceInput: _angular_core.InputSignal<MatFormFieldAppearance | undefined>;
|
|
57
62
|
appearance: _angular_core.Signal<MatFormFieldAppearance>;
|
|
58
63
|
floatLabel: _angular_core.InputSignal<FloatLabelType>;
|
|
64
|
+
/** `'float'` (mặc định) hoặc `'top'` — nhãn `<label for>` tĩnh phía trên, helper text dưới control. */
|
|
65
|
+
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
59
66
|
valueModel: _angular_core.ModelSignal<any>;
|
|
60
67
|
sdChange: _angular_core.OutputEmitterRef<any>;
|
|
61
68
|
formControl: SdFormControl;
|
|
@@ -71,7 +78,7 @@ declare class SdTextarea implements OnInit, OnDestroy {
|
|
|
71
78
|
getCurrentLength: () => number;
|
|
72
79
|
isMaxlengthExceeded: () => boolean;
|
|
73
80
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdTextarea, never>;
|
|
74
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTextarea, "sd-textarea", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "autoHeight": { "alias": "autoHeight"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdSuffixDef"], never, true, never>;
|
|
81
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTextarea, "sd-textarea", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "autoHeight": { "alias": "autoHeight"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdSuffixDef"], never, true, never>;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
export { SdTextarea };
|