@sdcorejs/angular 22.3.0 → 22.3.2
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 +2 -2
- package/assets/STYLE-GUIDE.md +25 -5
- package/assets/THEME.md +237 -5
- package/assets/licenses/tiptap-oss-NOTICES.txt +332 -0
- package/assets/scss/ckeditor5.scss +2 -88
- package/assets/scss/core/_control.scss +39 -0
- package/assets/scss/core/form.scss +156 -45
- package/assets/scss/core/view.scss +24 -0
- package/assets/scss/editor-content.scss +173 -0
- package/assets/scss/sd-core.scss +1 -0
- package/assets/scss/themes/_component-tokens.scss +93 -31
- package/assets/scss/themes/_material-tokens.scss +112 -0
- package/assets/scss/themes/_presets.scss +25 -0
- package/assets/scss/themes/_scales.scss +10 -0
- package/assets/scss/themes/_semantic.scss +13 -0
- package/assets/scss/themes/default.scss +8 -2
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +5 -5
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +166 -11
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +590 -24
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +35 -3
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +5 -20
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1906 -0
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-editor.mjs +461 -757
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +2295 -106
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2686 -1050
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +5 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +21 -6
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +474 -0
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +182 -284
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +1 -316
- 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 +274 -44
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +5 -4
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +5 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +202 -43
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +581 -110
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-window.mjs +498 -0
- package/fesm2022/sdcorejs-angular-components-window.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs +2 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +18 -1
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +15 -2
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +480 -126
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +82 -13
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +77 -18
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +75 -16
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +90 -2
- package/fesm2022/sdcorejs-angular-forms-directives.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-input-color.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +46 -5
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +56 -7
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +88 -5
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +263 -0
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-select.mjs +71 -15
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-textarea.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-forms.mjs +8 -0
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +1830 -17
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs +509 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs +232 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs +294 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +96 -3
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +1908 -46
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +27 -7
- package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +2 -2
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-date-time.mjs +143 -0
- package/fesm2022/sdcorejs-angular-services-date-time.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-storage.mjs +44 -8
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services.mjs +1 -0
- package/fesm2022/sdcorejs-angular-services.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs +4 -0
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +10 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -1
- package/package.json +48 -7
- package/types/sdcorejs-angular-components-avatar.d.ts +67 -2
- package/types/sdcorejs-angular-components-badge.d.ts +188 -6
- package/types/sdcorejs-angular-components-button.d.ts +20 -1
- package/types/sdcorejs-angular-components-ckeditor-styles.d.ts +3 -18
- package/types/sdcorejs-angular-components-editor-engine.d.ts +246 -0
- package/types/sdcorejs-angular-components-editor.d.ts +20 -17
- package/types/sdcorejs-angular-components-file-explorer.d.ts +449 -57
- package/types/sdcorejs-angular-components-form-generic.d.ts +301 -37
- package/types/sdcorejs-angular-components-kanban.d.ts +179 -0
- package/types/sdcorejs-angular-components-mini-editor.d.ts +33 -70
- package/types/sdcorejs-angular-components-modal-resizable.d.ts +1 -124
- package/types/sdcorejs-angular-components-operator.d.ts +137 -8
- package/types/sdcorejs-angular-components-section.d.ts +2 -1
- package/types/sdcorejs-angular-components-tab-router.d.ts +31 -18
- package/types/sdcorejs-angular-components-tab.d.ts +3 -1
- package/types/sdcorejs-angular-components-table.d.ts +84 -6
- package/types/sdcorejs-angular-components-window.d.ts +81 -0
- package/types/sdcorejs-angular-components.d.ts +2 -0
- package/types/sdcorejs-angular-configurations.d.ts +8 -1
- package/types/sdcorejs-angular-forms-autocomplete.d.ts +5 -0
- package/types/sdcorejs-angular-forms-chip-calendar.d.ts +163 -18
- package/types/sdcorejs-angular-forms-date-range.d.ts +24 -2
- package/types/sdcorejs-angular-forms-date.d.ts +23 -2
- package/types/sdcorejs-angular-forms-directives.d.ts +47 -2
- package/types/sdcorejs-angular-forms-input-number.d.ts +23 -2
- package/types/sdcorejs-angular-forms-input.d.ts +23 -2
- package/types/sdcorejs-angular-forms-models.d.ts +38 -3
- package/types/sdcorejs-angular-forms-segmented.d.ts +90 -0
- package/types/sdcorejs-angular-forms-select.d.ts +32 -2
- package/types/sdcorejs-angular-forms.d.ts +8 -6
- package/types/sdcorejs-angular-i18n.d.ts +360 -1
- package/types/sdcorejs-angular-modules-generic.d.ts +316 -0
- package/types/sdcorejs-angular-modules-icon.d.ts +37 -6
- package/types/sdcorejs-angular-modules-layout.d.ts +536 -86
- package/types/sdcorejs-angular-modules.d.ts +1 -0
- package/types/sdcorejs-angular-pipes.d.ts +2 -0
- package/types/sdcorejs-angular-services-date-time.d.ts +57 -0
- package/types/sdcorejs-angular-services-storage.d.ts +8 -1
- package/types/sdcorejs-angular-services.d.ts +1 -0
- package/types/sdcorejs-angular-utilities-read-state.d.ts +2 -0
- package/types/sdcorejs-angular-utilities-theme.d.ts +1 -1
|
@@ -1,27 +1,58 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { AfterViewInit, OnDestroy, ElementRef, TemplateRef } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
4
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
5
5
|
import { ErrorStateMatcher } from '@angular/material/core';
|
|
6
|
-
import { MatCalendar } from '@angular/material/datepicker';
|
|
6
|
+
import { MatCalendarHeader, MatCalendar } from '@angular/material/datepicker';
|
|
7
7
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
8
|
-
import { MatMenuTrigger } from '@angular/material/menu';
|
|
9
8
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
10
|
-
import { SdLabelPlacement, SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
9
|
+
import { SdLabelPlacement, SdViewed, SdViewedInput, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
11
10
|
import { Size } from '@sdcorejs/utils/models';
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Header of the `<sd-chip-calendar>` popup (design handoff 3 · 2): previous button, period label, next button, in that
|
|
14
|
+
* tab order. Extends Material's header for the paging rules, the min/max limits and the `MatDatepickerIntl` labels;
|
|
15
|
+
* only the markup and the month label change. The month label is the current locale's long month and year
|
|
16
|
+
* (`Intl.DateTimeFormat`), capitalised; the year and multi-year views keep Material's labels.
|
|
17
|
+
*
|
|
18
|
+
* Internal (`ɵ`): not covered by SemVer.
|
|
19
|
+
*/
|
|
20
|
+
declare class ɵSdChipCalendarHeader extends MatCalendarHeader<Date> {
|
|
21
|
+
#private;
|
|
22
|
+
/** Visible period text: "Tháng 10 năm 2026" in month view, Material's text in the other views. */
|
|
23
|
+
get periodText(): string;
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ɵSdChipCalendarHeader, never>;
|
|
25
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ɵSdChipCalendarHeader, "sd-chip-calendar-header", never, {}, {}, never, never, true, never>;
|
|
17
26
|
}
|
|
27
|
+
|
|
28
|
+
/** One date of the model: canonical `yyyy/MM/dd`, ISO / RFC-1123 string, `Date` or timestamp (read like `<sd-date>`). */
|
|
29
|
+
type SdChipCalendarValue = string | number | Date;
|
|
30
|
+
/** Model of `<sd-chip-calendar>`: read wide, written back as `string[]` (see `transform`). */
|
|
31
|
+
type SdChipCalendarModel = SdChipCalendarValue[] | null | undefined;
|
|
32
|
+
/** A date input (`minDate`, `maxDate`, `startAt`): read like an item of the model; `'TODAY'` is today in the configured zone. */
|
|
33
|
+
type SdChipCalendarDate = Date | string | number | null | undefined;
|
|
34
|
+
/** `removable`: all chips, none, or a predicate that receives the normalised `yyyy/MM/dd` day. */
|
|
35
|
+
type SdChipCalendarRemovable = boolean | ((day: string) => boolean);
|
|
18
36
|
declare class SdChipCalendar implements AfterViewInit, OnDestroy {
|
|
19
37
|
#private;
|
|
20
38
|
/** why: id ổn định của <mat-error> để ô nhập chip trỏ `aria-describedby` sang — thông báo
|
|
21
39
|
* lỗi phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
22
40
|
readonly errorId: string;
|
|
23
|
-
menuTrigger: _angular_core.Signal<MatMenuTrigger | undefined>;
|
|
24
41
|
calendar: _angular_core.Signal<MatCalendar<Date> | undefined>;
|
|
42
|
+
private readonly field;
|
|
43
|
+
/** Header of the popup calendar (handoff 3 · 2). */
|
|
44
|
+
readonly calendarHeader: typeof ɵSdChipCalendarHeader;
|
|
45
|
+
readonly panelId: string;
|
|
46
|
+
/** Whether the popup is open. */
|
|
47
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
48
|
+
/** Month the popup opened at (4.2), fixed for one opening. */
|
|
49
|
+
readonly openAt: _angular_core.WritableSignal<Date | null>;
|
|
50
|
+
/**
|
|
51
|
+
* The popup hangs from the field box (the outline), like the select panel. Read in `open()`: `_textField` of
|
|
52
|
+
* `MatFormField` is a view query, and read too early the origin falls back to the whole field with its subscript row.
|
|
53
|
+
*/
|
|
54
|
+
readonly overlayOrigin: _angular_core.WritableSignal<ElementRef<HTMLElement> | undefined>;
|
|
55
|
+
readonly positions: ConnectedPosition[];
|
|
25
56
|
autoIdInput: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
26
57
|
autoId: _angular_core.Signal<string | undefined>;
|
|
27
58
|
readonly dataDisabled: _angular_core.Signal<"true" | "false">;
|
|
@@ -48,36 +79,147 @@ declare class SdChipCalendar implements AfterViewInit, OnDestroy {
|
|
|
48
79
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
49
80
|
label: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
50
81
|
placeholder: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
51
|
-
|
|
82
|
+
/**
|
|
83
|
+
* `true` / `false` for every chip, or a predicate. The predicate receives the normalised `yyyy/MM/dd` day and is
|
|
84
|
+
* applied on every removal path: the ✕ button, Backspace / Delete on a chip, pressing the day again in the
|
|
85
|
+
* calendar and clearing.
|
|
86
|
+
*/
|
|
87
|
+
removable: _angular_core.InputSignalWithTransform<SdChipCalendarRemovable, SdChipCalendarRemovable | null | undefined>;
|
|
52
88
|
hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
53
89
|
required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
90
|
+
/** Fewest days to pick; > 0 adds `Validators.minLength`. Replaces `min`. */
|
|
91
|
+
minCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
|
|
92
|
+
/** Most days to pick; > 0 adds `Validators.maxLength` and blocks picking more in the calendar (4.3). Replaces `max`. */
|
|
93
|
+
maxCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
|
|
94
|
+
/** @deprecated Use `minCount`; `minCount` wins when both are set. */
|
|
54
95
|
min: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
|
|
96
|
+
/** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
|
|
55
97
|
max: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
|
|
98
|
+
/** Earliest day that can be picked; same reading as `minDate` of `<sd-date>` (`'TODAY'` = today in the zone). */
|
|
99
|
+
minDate: _angular_core.InputSignal<SdChipCalendarDate>;
|
|
100
|
+
/** Latest day that can be picked; same reading as `maxDate` of `<sd-date>`. */
|
|
101
|
+
maxDate: _angular_core.InputSignal<SdChipCalendarDate>;
|
|
102
|
+
/** `false` makes a day unpickable. A chosen day stays removable even when the filter refuses it. Name of `mat-calendar`. */
|
|
103
|
+
dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | null | undefined>;
|
|
104
|
+
/** Month the popup opens at; without it, the chosen day nearest to today, else today (4.2). */
|
|
105
|
+
startAt: _angular_core.InputSignal<SdChipCalendarDate>;
|
|
106
|
+
/** Shows “Xoá hết” in the popup (and the clear button of the field). Off by default, like `clearable` of `<sd-date>`. */
|
|
107
|
+
clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
108
|
+
/**
|
|
109
|
+
* Chips shown while the popup is closed; the rest fold into a “+N” button that opens it. `null` shows them all.
|
|
110
|
+
* `2` is the suggestion inside `<sd-table>` filters.
|
|
111
|
+
*/
|
|
112
|
+
maxVisible: _angular_core.InputSignal<number | null | undefined>;
|
|
113
|
+
/** Date format of the chips and of the viewed text, in Angular `DatePipe` syntax. */
|
|
114
|
+
displayFormat: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
56
115
|
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
116
|
/** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
|
|
58
117
|
viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
|
|
118
|
+
/**
|
|
119
|
+
* String form of each day when the value leaves the component, same contract as `<sd-date>`: `undefined` →
|
|
120
|
+
* `yyyy/MM/dd`, `'ISOString'` / `'UTCString'` → the start of the day (in `ISdCoreConfiguration.timeZone` when
|
|
121
|
+
* configured). Display is not affected.
|
|
122
|
+
*/
|
|
123
|
+
transform: _angular_core.InputSignal<SdTemporalValueTransform | undefined>;
|
|
59
124
|
/** `true` when the static view should render (`viewed===true`, or disabled `'inline'`). */
|
|
60
125
|
readonly isViewed: _angular_core.Signal<boolean>;
|
|
61
126
|
hyperlink: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
62
|
-
|
|
63
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Two-way model. Read wide (each item `string | number | Date`, like `<sd-date>`), written back only on a user
|
|
129
|
+
* action, as `string[]`. A model from the parent is never rewritten.
|
|
130
|
+
*/
|
|
131
|
+
model: _angular_core.ModelSignal<SdChipCalendarModel>;
|
|
132
|
+
sdChange: _angular_core.OutputEmitterRef<string[]>;
|
|
64
133
|
input: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
65
134
|
sdViewDef: _angular_core.Signal<SdViewDefDirective<any, any> | undefined>;
|
|
66
135
|
sdLabelDef: _angular_core.Signal<SdLabelDefDirective | undefined>;
|
|
67
136
|
sdLabelTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
68
137
|
sdValueTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
69
138
|
isFocused: boolean;
|
|
70
|
-
|
|
139
|
+
/** `minCount`, else the deprecated `min`. */
|
|
140
|
+
readonly effectiveMinCount: _angular_core.Signal<number>;
|
|
141
|
+
/** `maxCount`, else the deprecated `max`. */
|
|
142
|
+
readonly effectiveMaxCount: _angular_core.Signal<number>;
|
|
143
|
+
/** Chosen days, normalised (`yyyy/MM/dd`, model order). */
|
|
144
|
+
readonly days: _angular_core.Signal<string[]>;
|
|
145
|
+
/** `maxCount` reached: unchosen days are disabled and the popup says so (4.3). */
|
|
146
|
+
readonly full: _angular_core.Signal<boolean>;
|
|
147
|
+
/** At least one chosen day may be removed (enables “Xoá hết”). */
|
|
148
|
+
readonly hasRemovable: _angular_core.Signal<boolean>;
|
|
149
|
+
/** Chosen days by date (B2). Display only: the model keeps its order. `yyyy/MM/dd` sorts as text in date order. */
|
|
150
|
+
readonly sortedDays: _angular_core.Signal<string[]>;
|
|
151
|
+
/** Chips on screen: all while the popup is open, else at most `maxVisible` (B3). */
|
|
152
|
+
readonly visibleDays: _angular_core.Signal<string[]>;
|
|
153
|
+
/** Icon sizes of the chips and suffix buttons for the current size. */
|
|
154
|
+
readonly iconSizes: _angular_core.Signal<{
|
|
155
|
+
readonly chip: "12px";
|
|
156
|
+
readonly clear: "16px";
|
|
157
|
+
readonly open: "18px";
|
|
158
|
+
} | {
|
|
159
|
+
readonly chip: "14px";
|
|
160
|
+
readonly clear: "18px";
|
|
161
|
+
readonly open: "20px";
|
|
162
|
+
} | {
|
|
163
|
+
readonly chip: "16px";
|
|
164
|
+
readonly clear: "20px";
|
|
165
|
+
readonly open: "22px";
|
|
166
|
+
}>;
|
|
167
|
+
/** Days folded into “+N”. */
|
|
168
|
+
readonly hiddenCount: _angular_core.Signal<number>;
|
|
169
|
+
/** Viewed text: days by date in `displayFormat`, joined by “, ” (C3). */
|
|
170
|
+
readonly viewText: _angular_core.Signal<string>;
|
|
171
|
+
/** Placeholder while no day is chosen: the input, else “Chọn ngày” — no longer the label (B1). Empty once there are chips. */
|
|
172
|
+
readonly effectivePlaceholder: _angular_core.Signal<string>;
|
|
173
|
+
readonly resolvedMinDate: _angular_core.Signal<Date | null>;
|
|
174
|
+
readonly resolvedMaxDate: _angular_core.Signal<Date | null>;
|
|
175
|
+
/**
|
|
176
|
+
* `dateFilter` handed to `mat-calendar` (4.1): a chosen day is pickable exactly when it may be removed (even against the
|
|
177
|
+
* consumer filter), an unchosen one when the limit is not reached and the consumer filter allows it. A new function on
|
|
178
|
+
* every change makes `mat-calendar` render its cells again.
|
|
179
|
+
*/
|
|
180
|
+
readonly calendarFilter: _angular_core.Signal<(date: Date | null) => boolean>;
|
|
181
|
+
/** Cell classes: `sd-chip-calendar-selected`, plus `sd-chip-calendar-locked` for a chosen day that cannot go. */
|
|
182
|
+
readonly calendarDateClass: _angular_core.Signal<(date: Date, view?: "month" | "year" | "multi-year") => string>;
|
|
71
183
|
constructor();
|
|
72
184
|
get formControl(): SdFormControl;
|
|
73
185
|
get inputControl(): FormControl<any>;
|
|
74
186
|
readonly errorMessage: _angular_core.Signal<string | undefined>;
|
|
75
|
-
get matcher():
|
|
187
|
+
get matcher(): ErrorStateMatcher;
|
|
188
|
+
/**
|
|
189
|
+
* The one place that decides whether the error shows (A4): `ErrorStateMatcher`, `<mat-error>`, `aria-invalid` and
|
|
190
|
+
* the `hideInlineError` icon all read it. Invalid and touched, or the parent form was submitted; a selection that
|
|
191
|
+
* is still too short while the user picks (dirty only) shows nothing.
|
|
192
|
+
*/
|
|
193
|
+
isErrorShown(): boolean;
|
|
194
|
+
/** Whether `day` (`yyyy/MM/dd`) may be removed, per `removable`. */
|
|
195
|
+
isRemovable(day: string): boolean;
|
|
196
|
+
/** Accessible name of a chip: the full date in the current locale, plus the locked note. */
|
|
197
|
+
chipLabel(day: string): string;
|
|
198
|
+
/** A chip day in `displayFormat` (Angular `DatePipe` / `formatDate` syntax, as the chips used before). */
|
|
199
|
+
formatDay(day: string): string;
|
|
200
|
+
/** Accessible name of the ✕ button of a chip. */
|
|
201
|
+
removeLabel(day: string): string;
|
|
202
|
+
/** Opens the popup at the month of 4.2. No-op when disabled, viewed or already open. */
|
|
203
|
+
open(): void;
|
|
204
|
+
/** Closes the popup and marks the field touched (A4); `returnFocus` puts focus back on the input (Esc, “Xong”). */
|
|
205
|
+
close(returnFocus?: boolean): void;
|
|
206
|
+
/** Focus goes to the active day of the grid once the panel is attached. */
|
|
207
|
+
onAttach(): void;
|
|
208
|
+
onOverlayKeydown(event: KeyboardEvent): void;
|
|
209
|
+
/** A click outside closes; a click on the field itself is left to the field (it keeps the popup open). */
|
|
210
|
+
onOutsideClick(event: MouseEvent): void;
|
|
211
|
+
/** Click on the empty part of the field or on the input opens the popup; chips stop the click (3 · 2). */
|
|
212
|
+
onFieldClick(): void;
|
|
213
|
+
/** Calendar button of the suffix: opens or closes the popup without the field click opening it again. */
|
|
214
|
+
onToggleClick(event: Event): void;
|
|
215
|
+
/** “+N” opens the popup, where every chip shows. */
|
|
216
|
+
onMoreClick(event: Event): void;
|
|
217
|
+
/** Enter, Space, ArrowDown and Alt+ArrowDown on the input open the popup. */
|
|
218
|
+
onInputKeydown(event: KeyboardEvent): void;
|
|
76
219
|
ngAfterViewInit(): void;
|
|
77
220
|
ngOnDestroy(): void;
|
|
78
221
|
onClickChip: (event: Event, item: any) => void;
|
|
79
222
|
onRemove: (item: string) => void;
|
|
80
|
-
onSelect: (event: MatAutocompleteSelectedEvent) => void;
|
|
81
223
|
onClick: () => void;
|
|
82
224
|
/**
|
|
83
225
|
* why: khi `sdViewDef` đang hiển thị thì bên trong KHÔNG còn phần tử nào focus được, nên
|
|
@@ -88,10 +230,13 @@ declare class SdChipCalendar implements AfterViewInit, OnDestroy {
|
|
|
88
230
|
onViewKeydown: (event: Event) => void;
|
|
89
231
|
onClear: (evt?: any) => void;
|
|
90
232
|
onSelectDate: (date: Date | null) => void;
|
|
233
|
+
/** Closes the popup without moving focus (outside click); marks the field touched. */
|
|
91
234
|
onCloseCalendar: () => void;
|
|
92
|
-
|
|
235
|
+
/** Classes of a month-view cell; see `calendarDateClass`. */
|
|
236
|
+
dateClass: (cellDate: Date) => string;
|
|
93
237
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdChipCalendar, 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>;
|
|
238
|
+
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; }; "minCount": { "alias": "minCount"; "required": false; "isSignal": true; }; "maxCount": { "alias": "maxCount"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "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>;
|
|
95
239
|
}
|
|
96
240
|
|
|
97
241
|
export { SdChipCalendar };
|
|
242
|
+
export type { SdChipCalendarDate, SdChipCalendarModel, SdChipCalendarRemovable, SdChipCalendarValue };
|
|
@@ -6,7 +6,7 @@ import { FormGroup, FormControl } from '@angular/forms';
|
|
|
6
6
|
import { MatDateRangePicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
7
7
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
8
8
|
import { SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
9
|
-
import { Size } from '@sdcorejs/utils/models';
|
|
9
|
+
import { Size, Operator } from '@sdcorejs/utils/models';
|
|
10
10
|
|
|
11
11
|
interface SdDateRangeValue {
|
|
12
12
|
from?: string | null;
|
|
@@ -35,6 +35,28 @@ declare class SdDateRange {
|
|
|
35
35
|
readonly dataErrorMessage: _angular_core.Signal<string | null>;
|
|
36
36
|
name: _angular_core.InputSignal<string>;
|
|
37
37
|
size: _angular_core.InputSignal<Size>;
|
|
38
|
+
/**
|
|
39
|
+
* Operator cho phép trong chip tiền tố của ô (thiết kế đợt 2 · G), theo thứ tự hiển thị. Từ hai operator
|
|
40
|
+
* thì chip hiện; đúng một thì control dùng luôn operator đó và không hiện chip.
|
|
41
|
+
*/
|
|
42
|
+
readonly operators: _angular_core.InputSignal<readonly Operator[]>;
|
|
43
|
+
/** Operator hiện tại — `[(operator)]`. Đổi operator không xoá giá trị; nút xoá chỉ xoá giá trị. */
|
|
44
|
+
readonly operator: _angular_core.ModelSignal<Operator | undefined>;
|
|
45
|
+
protected readonly operatorChip: _angular_core.Signal<boolean>;
|
|
46
|
+
protected readonly operatorHasValue: _angular_core.Signal<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* NULL / NOT_NULL không cần giá trị: chọn trong chip thì xoá giá trị, ô bị khoá (disabled) tới khi đổi sang
|
|
49
|
+
* operator khác; chip vẫn dùng được.
|
|
50
|
+
*/
|
|
51
|
+
protected readonly operatorLocked: _angular_core.Signal<boolean>;
|
|
52
|
+
private readonly operatorChipRef;
|
|
53
|
+
private readonly startInput;
|
|
54
|
+
/**
|
|
55
|
+
* Chọn xong operator trong chip (thiết kế đợt 2 · G): focus về ô nhập. NULL / NOT_NULL thì xoá giá trị và giữ focus
|
|
56
|
+
* ở chip. why: xoá ngay trong handler chọn (không trong effect) để giá trị two-way của cha đổi trong event, không
|
|
57
|
+
* đổi giữa lượt change detection.
|
|
58
|
+
*/
|
|
59
|
+
protected onOperatorChosen(): void;
|
|
38
60
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
39
61
|
label: _angular_core.InputSignal<string | undefined>;
|
|
40
62
|
helperText: _angular_core.InputSignal<string | undefined>;
|
|
@@ -96,7 +118,7 @@ declare class SdDateRange {
|
|
|
96
118
|
onClosePicker: () => void;
|
|
97
119
|
onOpenPicker: (event: MouseEvent) => void;
|
|
98
120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdDateRange, never>;
|
|
99
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDateRange, "sd-date-range", 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; }; "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; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; }, ["sdLabelDef", "sdValueTemplate"], never, true, never>;
|
|
121
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdDateRange, "sd-date-range", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "operator": { "alias": "operator"; "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; }; "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; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "operator": "operatorChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; }, ["sdLabelDef", "sdValueTemplate"], never, true, never>;
|
|
100
122
|
}
|
|
101
123
|
|
|
102
124
|
export { SdDateRange };
|
|
@@ -5,7 +5,7 @@ import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepi
|
|
|
5
5
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
6
6
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
7
7
|
import { SdViewed, SdViewedInput, SdLabelPlacement, SdTemporalValueTransform, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
8
|
-
import { Size } from '@sdcorejs/utils/models';
|
|
8
|
+
import { Size, Operator } from '@sdcorejs/utils/models';
|
|
9
9
|
|
|
10
10
|
type SdDateModelValue = string | number | Date | undefined | null;
|
|
11
11
|
type SdDateKeyupEvent = Event | {
|
|
@@ -40,6 +40,27 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
40
40
|
readonly dataErrorMessage: _angular_core.Signal<string | null>;
|
|
41
41
|
name: _angular_core.InputSignal<string>;
|
|
42
42
|
size: _angular_core.InputSignal<Size>;
|
|
43
|
+
/**
|
|
44
|
+
* Operator cho phép trong chip tiền tố của ô (thiết kế đợt 2 · G), theo thứ tự hiển thị. Từ hai operator
|
|
45
|
+
* thì chip hiện; đúng một thì control dùng luôn operator đó và không hiện chip.
|
|
46
|
+
*/
|
|
47
|
+
readonly operators: _angular_core.InputSignal<readonly Operator[]>;
|
|
48
|
+
/** Operator hiện tại — `[(operator)]`. Đổi operator không xoá giá trị; nút xoá chỉ xoá giá trị. */
|
|
49
|
+
readonly operator: _angular_core.ModelSignal<Operator | undefined>;
|
|
50
|
+
protected readonly operatorChip: _angular_core.Signal<boolean>;
|
|
51
|
+
protected readonly operatorHasValue: _angular_core.Signal<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* NULL / NOT_NULL không cần giá trị: chọn trong chip thì xoá giá trị, ô bị khoá (disabled) tới khi đổi sang
|
|
54
|
+
* operator khác; chip vẫn dùng được.
|
|
55
|
+
*/
|
|
56
|
+
protected readonly operatorLocked: _angular_core.Signal<boolean>;
|
|
57
|
+
private readonly operatorChipRef;
|
|
58
|
+
/**
|
|
59
|
+
* Chọn xong operator trong chip (thiết kế đợt 2 · G): focus về ô nhập. NULL / NOT_NULL thì xoá giá trị và giữ focus
|
|
60
|
+
* ở chip. why: xoá ngay trong handler chọn (không trong effect) để giá trị two-way của cha đổi trong event, không
|
|
61
|
+
* đổi giữa lượt change detection.
|
|
62
|
+
*/
|
|
63
|
+
protected onOperatorChosen(): void;
|
|
43
64
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
44
65
|
label: _angular_core.InputSignal<string | undefined>;
|
|
45
66
|
helperText: _angular_core.InputSignal<string | undefined>;
|
|
@@ -108,7 +129,7 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
108
129
|
onChange: (event: MatDatepickerInputEvent<Date>) => void;
|
|
109
130
|
clear: ($event: any) => void;
|
|
110
131
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdDate, 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>;
|
|
132
|
+
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; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "operator": { "alias": "operator"; "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; }; }, { "operator": "operatorChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdLabelDef"], ["[sdLabel]"], true, never>;
|
|
112
133
|
}
|
|
113
134
|
|
|
114
135
|
export { SdDate };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { TemplateRef, DoCheck } from '@angular/core';
|
|
3
|
+
import { Size } from '@sdcorejs/utils/models';
|
|
3
4
|
|
|
4
5
|
type Context$3 = Record<string, never>;
|
|
5
6
|
declare class SdSuffixDefDirective {
|
|
@@ -38,4 +39,48 @@ declare class SdItemDefDefDirective<T = unknown> {
|
|
|
38
39
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SdItemDefDefDirective<any>, "[sdItemDef]", never, {}, {}, never, never, true, never>;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
type ɵSdSearchFieldSize = Extract<Size, 'sm' | 'md'>;
|
|
43
|
+
/**
|
|
44
|
+
* Gắn lên `<input>` thật được chiếu vào `<sd-search-field>`. Chỉ đọc trạng thái của input (có giá trị,
|
|
45
|
+
* disabled) cho khung; mọi binding, phím và accessible name vẫn đặt ở nơi dùng.
|
|
46
|
+
*
|
|
47
|
+
* Nội bộ (`ɵ`): không nằm trong SemVer, ứng dụng không dùng trực tiếp.
|
|
48
|
+
*/
|
|
49
|
+
declare class ɵSdSearchFieldInputDirective implements DoCheck {
|
|
50
|
+
#private;
|
|
51
|
+
readonly hasValue: i0.Signal<boolean>;
|
|
52
|
+
readonly disabled: i0.Signal<boolean>;
|
|
53
|
+
ngDoCheck(): void;
|
|
54
|
+
focus(): void;
|
|
55
|
+
sync(): void;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ɵSdSearchFieldInputDirective, never>;
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ɵSdSearchFieldInputDirective, "input[sdSearchFieldInput]", never, {}, {}, never, never, true, never>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Khung ô tìm kiếm dùng chung cho các ô tự viết (kanban, quick search của table, palette form builder,
|
|
61
|
+
* ô lọc trong panel sd-select). Primitive chỉ lo hình dạng: cỡ, viền/focus theo token control, icon
|
|
62
|
+
* `search`, nút xoá và slot cuối `[sdSearchFieldEnd]`. Logic (debounce, Enter để áp dụng, Escape để xoá)
|
|
63
|
+
* thuộc component dùng nó.
|
|
64
|
+
*
|
|
65
|
+
* Nội bộ (`ɵ`): không nằm trong SemVer, ứng dụng không dùng trực tiếp.
|
|
66
|
+
*/
|
|
67
|
+
declare class ɵSdSearchField {
|
|
68
|
+
#private;
|
|
69
|
+
readonly size: i0.InputSignal<ɵSdSearchFieldSize>;
|
|
70
|
+
/** Hiện nút xoá khi input có giá trị. Nút chỉ phát `cleared`; xoá giá trị là việc của nơi dùng. */
|
|
71
|
+
readonly clearable: i0.InputSignalWithTransform<boolean, unknown>;
|
|
72
|
+
/** Accessible name của nút xoá; mặc định là key `core.form.search-field.clear`. */
|
|
73
|
+
readonly clearLabel: i0.InputSignal<string | undefined>;
|
|
74
|
+
/** Nút xoá nhận `data-autoid="<autoId>-clear"`. */
|
|
75
|
+
readonly autoId: i0.InputSignal<string | undefined>;
|
|
76
|
+
readonly cleared: i0.OutputEmitterRef<void>;
|
|
77
|
+
private readonly searchInput;
|
|
78
|
+
protected readonly disabled: i0.Signal<boolean>;
|
|
79
|
+
protected readonly showClear: i0.Signal<boolean>;
|
|
80
|
+
protected focusInput(event: MouseEvent): void;
|
|
81
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ɵSdSearchField, never>;
|
|
82
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ɵSdSearchField, "sd-search-field", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "clearLabel": { "alias": "clearLabel"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "cleared": "cleared"; }, ["searchInput"], ["*", "[sdSearchFieldEnd]"], true, never>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { SdItemDefDefDirective, SdLabelDefDirective, SdSuffixDefDirective, SdViewDefDirective, ɵSdSearchField, ɵSdSearchFieldInputDirective };
|
|
86
|
+
export type { ɵSdSearchFieldSize };
|
|
@@ -6,7 +6,7 @@ import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-f
|
|
|
6
6
|
import { SdInlineText } from '@sdcorejs/angular/forms/inline-text';
|
|
7
7
|
import { SdViewDefDirective, SdSuffixDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
8
8
|
import { SdViewed, SdViewedInput, SdCustomValidator, SdLabelPlacement, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
9
|
-
import { Size } from '@sdcorejs/utils/models';
|
|
9
|
+
import { Size, Operator } from '@sdcorejs/utils/models';
|
|
10
10
|
|
|
11
11
|
declare class SdInputNumberErrotStateMatcher implements ErrorStateMatcher {
|
|
12
12
|
private formControl;
|
|
@@ -42,6 +42,27 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
|
|
|
42
42
|
readonly dataErrorMessage: _angular_core.Signal<string | null>;
|
|
43
43
|
name: _angular_core.InputSignal<string>;
|
|
44
44
|
size: _angular_core.InputSignal<Size>;
|
|
45
|
+
/**
|
|
46
|
+
* Operator cho phép trong chip tiền tố của ô (thiết kế đợt 2 · G), theo thứ tự hiển thị. Từ hai operator
|
|
47
|
+
* thì chip hiện; đúng một thì control dùng luôn operator đó và không hiện chip.
|
|
48
|
+
*/
|
|
49
|
+
readonly operators: _angular_core.InputSignal<readonly Operator[]>;
|
|
50
|
+
/** Operator hiện tại — `[(operator)]`. Đổi operator không xoá giá trị; nút xoá chỉ xoá giá trị. */
|
|
51
|
+
readonly operator: _angular_core.ModelSignal<Operator | undefined>;
|
|
52
|
+
protected readonly operatorChip: _angular_core.Signal<boolean>;
|
|
53
|
+
protected readonly operatorHasValue: _angular_core.Signal<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* NULL / NOT_NULL không cần giá trị: chọn trong chip thì xoá giá trị, ô bị khoá (disabled) tới khi đổi sang
|
|
56
|
+
* operator khác; chip vẫn dùng được.
|
|
57
|
+
*/
|
|
58
|
+
protected readonly operatorLocked: _angular_core.Signal<boolean>;
|
|
59
|
+
private readonly operatorChipRef;
|
|
60
|
+
/**
|
|
61
|
+
* Chọn xong operator trong chip (thiết kế đợt 2 · G): focus về ô nhập. NULL / NOT_NULL thì xoá giá trị và giữ focus
|
|
62
|
+
* ở chip. why: xoá ngay trong handler chọn (không trong effect) để giá trị two-way của cha đổi trong event, không
|
|
63
|
+
* đổi giữa lượt change detection.
|
|
64
|
+
*/
|
|
65
|
+
protected onOperatorChosen(): void;
|
|
45
66
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
46
67
|
label: _angular_core.InputSignal<string | undefined>;
|
|
47
68
|
helperText: _angular_core.InputSignal<string | undefined>;
|
|
@@ -117,7 +138,7 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
|
|
|
117
138
|
blur: () => void;
|
|
118
139
|
focus: () => void;
|
|
119
140
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInputNumber, 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>;
|
|
141
|
+
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; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "operator": { "alias": "operator"; "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; }; }, { "operator": "operatorChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdSuffixDef"], ["[sdLabel]"], true, never>;
|
|
121
142
|
}
|
|
122
143
|
|
|
123
144
|
export { SdInputNumber };
|
|
@@ -7,7 +7,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
7
7
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
8
8
|
import { SdInlineText } from '@sdcorejs/angular/forms/inline-text';
|
|
9
9
|
import { SdSuffixDefDirective, SdViewDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
10
|
-
import { Size } from '@sdcorejs/utils/models';
|
|
10
|
+
import { Size, Operator } from '@sdcorejs/utils/models';
|
|
11
11
|
|
|
12
12
|
type SdInputMaskStatus = 'empty' | 'incomplete' | 'valid' | 'invalid';
|
|
13
13
|
type SdInputMaskInputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
@@ -90,6 +90,27 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
90
90
|
*/
|
|
91
91
|
labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
92
92
|
size: _angular_core.InputSignal<Size>;
|
|
93
|
+
/**
|
|
94
|
+
* Operator cho phép trong chip tiền tố của ô (thiết kế đợt 2 · G), theo thứ tự hiển thị. Từ hai operator
|
|
95
|
+
* thì chip hiện; đúng một thì control dùng luôn operator đó và không hiện chip.
|
|
96
|
+
*/
|
|
97
|
+
readonly operators: _angular_core.InputSignal<readonly Operator[]>;
|
|
98
|
+
/** Operator hiện tại — `[(operator)]`. Đổi operator không xoá giá trị; nút xoá chỉ xoá giá trị. */
|
|
99
|
+
readonly operator: _angular_core.ModelSignal<Operator | undefined>;
|
|
100
|
+
protected readonly operatorChip: _angular_core.Signal<boolean>;
|
|
101
|
+
protected readonly operatorHasValue: _angular_core.Signal<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* NULL / NOT_NULL không cần giá trị: chọn trong chip thì xoá giá trị, ô bị khoá (disabled) tới khi đổi sang
|
|
104
|
+
* operator khác; chip vẫn dùng được.
|
|
105
|
+
*/
|
|
106
|
+
protected readonly operatorLocked: _angular_core.Signal<boolean>;
|
|
107
|
+
private readonly operatorChipRef;
|
|
108
|
+
/**
|
|
109
|
+
* Chọn xong operator trong chip (thiết kế đợt 2 · G): focus về ô nhập. NULL / NOT_NULL thì xoá giá trị và giữ focus
|
|
110
|
+
* ở chip. why: xoá ngay trong handler chọn (không trong effect) để giá trị two-way của cha đổi trong event, không
|
|
111
|
+
* đổi giữa lượt change detection.
|
|
112
|
+
*/
|
|
113
|
+
protected onOperatorChosen(): void;
|
|
93
114
|
form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
94
115
|
label: _angular_core.InputSignal<string | undefined>;
|
|
95
116
|
helperText: _angular_core.InputSignal<string | undefined>;
|
|
@@ -176,7 +197,7 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
176
197
|
blur: () => void;
|
|
177
198
|
focus: () => void;
|
|
178
199
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInput, 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>;
|
|
200
|
+
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; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "operator": { "alias": "operator"; "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; }; }, { "operator": "operatorChange"; "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSuffixDef", "sdViewDef"], ["[sdLabel]"], true, never>;
|
|
180
201
|
}
|
|
181
202
|
|
|
182
203
|
export { SD_INPUT_MASKS, SdInput, sdCreateInputMask, sdResolveInputMask };
|
|
@@ -168,6 +168,36 @@ declare function sdLocalStartOfDay(value: Date): Date;
|
|
|
168
168
|
* parse with their own strict parsers. Returns `null` when the text is not one of these.
|
|
169
169
|
*/
|
|
170
170
|
declare function sdParseTransformedTemporal(value: unknown): Date | null;
|
|
171
|
+
/**
|
|
172
|
+
* @internal Instant-only reading of the wire formats above, used by the date forms when
|
|
173
|
+
* `ISdCoreConfiguration.timeZone` is set: a zone-less match returns `null` so it is read by the
|
|
174
|
+
* time-zone service as a wall clock instead of being converted twice through the host zone.
|
|
175
|
+
* The public `sdParseTransformedTemporal` keeps its behavior.
|
|
176
|
+
*/
|
|
177
|
+
declare function ɵsdParseTransformedInstant(value: unknown): Date | null;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The part of `SdDateTimeService` the calendar-day reading needs. Structural, so `forms/models` does not depend on
|
|
181
|
+
* `services/date-time`; pass the service itself.
|
|
182
|
+
*/
|
|
183
|
+
interface ɵSdCalendarDayZone {
|
|
184
|
+
readonly timeZone: string;
|
|
185
|
+
toFormat(value: unknown, format: string): string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Reads one date-like value as a calendar day `yyyy/MM/dd`, the way `<sd-date>` reads its model. Shared by
|
|
189
|
+
* `<sd-date>` and `<sd-chip-calendar>` so both read the same values the same way.
|
|
190
|
+
*
|
|
191
|
+
* - Without a zone (or `timeZone: 'local'`): `DateUtilities.isDate` accepts a `Date`, a timestamp, canonical
|
|
192
|
+
* `yyyy/MM/dd` and ISO; an RFC-1123 `toUTCString()` falls back to `sdParseTransformedTemporal`.
|
|
193
|
+
* - With a configured zone: an instant takes its calendar day in that zone (`SdDateTimeService.toFormat`), and a
|
|
194
|
+
* transformed instant (zoned ISO, RFC-1123) is read through `ɵsdParseTransformedInstant`.
|
|
195
|
+
*
|
|
196
|
+
* Returns `null` for `null`, `undefined`, `''` and anything it cannot read.
|
|
197
|
+
*
|
|
198
|
+
* Internal (`ɵ`): not covered by SemVer.
|
|
199
|
+
*/
|
|
200
|
+
declare function ɵsdNormalizeCalendarDay(value: unknown, zone?: ɵSdCalendarDayZone | null): string | null;
|
|
171
201
|
|
|
172
202
|
interface ɵSdModelFacingControlOptions<TModel> {
|
|
173
203
|
/** Whether the model-facing control should be the one registered in the parent form. */
|
|
@@ -199,7 +229,9 @@ interface ɵSdModelFacingControl<TModel> {
|
|
|
199
229
|
* and hands *that* one to the form.
|
|
200
230
|
*
|
|
201
231
|
* Both directions are wired, and neither can feed back on the other:
|
|
202
|
-
* - model
|
|
232
|
+
* - a model change caused by a user edit (the editor control emitted) is pushed in once with events,
|
|
233
|
+
* so the parent form emits `valueChanges` with the model value, as the editor control does in local
|
|
234
|
+
* mode; every other model change (the parent `[(model)]` binding) is pushed in silently;
|
|
203
235
|
* - a write that arrives on this control goes to `writeModel`, exactly like a write on the editor
|
|
204
236
|
* control would, so `modelChange` / `sdChange` still fire once.
|
|
205
237
|
*
|
|
@@ -351,6 +383,9 @@ declare function ɵsdFormControlConnector<TModel, TControl>(options: ɵSdFormCon
|
|
|
351
383
|
* sự gõ xong.
|
|
352
384
|
*/
|
|
353
385
|
declare class SdStrictDateFnsAdapter extends DateFnsAdapter {
|
|
386
|
+
#private;
|
|
387
|
+
/** Calendar today marker: today in `ISdCoreConfiguration.timeZone` when one is set. */
|
|
388
|
+
today(): Date;
|
|
354
389
|
parse(value: unknown, parseFormat: string | string[]): Date | null;
|
|
355
390
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdStrictDateFnsAdapter, never>;
|
|
356
391
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdStrictDateFnsAdapter>;
|
|
@@ -358,5 +393,5 @@ declare class SdStrictDateFnsAdapter extends DateFnsAdapter {
|
|
|
358
393
|
/** `provideDateFnsAdapter` + ép dùng adapter parse chặt ở trên. */
|
|
359
394
|
declare function provideSdStrictDateFnsAdapter(formats: MatDateFormats): Provider[];
|
|
360
395
|
|
|
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 };
|
|
362
|
-
export type { ISdFormConfiguration, SdCustomValidator, SdFormControlSnapshot, SdLabelPlacement, SdSearch, SdSearchReq, SdSelectionData, SdTemporalValueTransform, SdViewed, SdViewedInlineApi, SdViewedInput, ɵSdFormControlConnector, ɵSdFormControlConnectorOptions, ɵSdFormControlConnectorState, ɵSdFormControlParent, ɵSdModelFacingControl, ɵSdModelFacingControlOptions, ɵSdTimerScope };
|
|
396
|
+
export { HandleSdCustomValidator, SD_FORM_CONFIGURATION, SD_TEMPORAL_VALUE_TRANSFORMS, SdFormControl, SdInlineErrorValidator, SdStrictDateFnsAdapter, provideSdStrictDateFnsAdapter, sdFormControlState, sdIsTemporalValueTransform, sdLocalStartOfDay, sdParseTransformedTemporal, sdSerializeTemporalValue, sdViewedInline, sdViewedTransform, ɵsdCoerceFormGroup, ɵsdFormControlConnector, ɵsdModelFacingControl, ɵsdNormalizeCalendarDay, ɵsdParseTransformedInstant, ɵsdTimerScope };
|
|
397
|
+
export type { ISdFormConfiguration, SdCustomValidator, SdFormControlSnapshot, SdLabelPlacement, SdSearch, SdSearchReq, SdSelectionData, SdTemporalValueTransform, SdViewed, SdViewedInlineApi, SdViewedInput, ɵSdCalendarDayZone, ɵSdFormControlConnector, ɵSdFormControlConnectorOptions, ɵSdFormControlConnectorState, ɵSdFormControlParent, ɵSdModelFacingControl, ɵSdModelFacingControlOptions, ɵSdTimerScope };
|