@sdcorejs/angular 21.1.5 → 21.1.6
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 -4
- package/fesm2022/sdcorejs-angular-components-preview.mjs +31 -2
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +18 -3
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +3 -4
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +122 -27
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +54 -2
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +20 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +110 -25
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/package.json +9 -1
- package/types/sdcorejs-angular-components-table.d.ts +1 -1
- package/types/sdcorejs-angular-forms-date.d.ts +8 -1
- package/types/sdcorejs-angular-forms-models.d.ts +28 -2
- package/types/sdcorejs-angular-i18n.d.ts +4 -0
- package/types/sdcorejs-angular-modules-layout.d.ts +10 -1
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdcorejs/angular",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.6",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/sdcorejs/sdcorejs-angular.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://sdcorejs.github.io/sdcorejs-angular/",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/sdcorejs/sdcorejs-angular/issues"
|
|
12
|
+
},
|
|
5
13
|
"peerDependencies": {
|
|
6
14
|
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
7
15
|
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
@@ -1187,7 +1187,7 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1187
1187
|
cacheValues: Record<string, unknown[]>;
|
|
1188
1188
|
treeRevision: _angular_core.WritableSignal<number>;
|
|
1189
1189
|
exporting: _angular_core.WritableSignal<boolean>;
|
|
1190
|
-
exportTitle: _angular_core.
|
|
1190
|
+
exportTitle: _angular_core.Signal<string>;
|
|
1191
1191
|
tableConfiguration: ISdTableConfiguration | null;
|
|
1192
1192
|
constructor();
|
|
1193
1193
|
ngAfterViewInit(): void;
|
|
@@ -8,6 +8,11 @@ import { SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/
|
|
|
8
8
|
import { Size } from '@sdcorejs/utils/models';
|
|
9
9
|
|
|
10
10
|
type SdDateModelValue = string | number | Date | undefined | null;
|
|
11
|
+
type SdDateKeyupEvent = Event | {
|
|
12
|
+
target?: {
|
|
13
|
+
value?: string | null;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
11
16
|
declare class SdDate implements OnDestroy, OnInit {
|
|
12
17
|
#private;
|
|
13
18
|
id: string;
|
|
@@ -81,7 +86,9 @@ declare class SdDate implements OnDestroy, OnInit {
|
|
|
81
86
|
open: () => void;
|
|
82
87
|
focusInputElement(): void;
|
|
83
88
|
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
84
|
-
|
|
89
|
+
onInput: (event: Event) => void;
|
|
90
|
+
/** Kept as a compatibility entry point for callers that used the old keyup handler. */
|
|
91
|
+
onKeyup: (event: SdDateKeyupEvent) => void;
|
|
85
92
|
onChange: (event: MatDatepickerInputEvent<Date>) => void;
|
|
86
93
|
clear: ($event: any) => void;
|
|
87
94
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdDate, never>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, Provider } from '@angular/core';
|
|
2
3
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
3
4
|
import { FormControl, FormControlState, ValidatorFn, FormControlOptions, AsyncValidatorFn, AbstractControl, FormGroup, NgForm } from '@angular/forms';
|
|
4
5
|
import { Subject } from 'rxjs';
|
|
6
|
+
import { DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
|
7
|
+
import { MatDateFormats } from '@angular/material/core';
|
|
5
8
|
|
|
6
9
|
interface ISdFormConfiguration {
|
|
7
10
|
appearance?: MatFormFieldAppearance;
|
|
@@ -202,5 +205,28 @@ declare function ɵsdCoerceFormGroup(value: unknown): FormGroup | undefined;
|
|
|
202
205
|
*/
|
|
203
206
|
declare function ɵsdFormControlConnector<TModel, TControl>(options: ɵSdFormControlConnectorOptions<TModel, TControl>): ɵSdFormControlConnector<TControl>;
|
|
204
207
|
|
|
205
|
-
|
|
208
|
+
/**
|
|
209
|
+
* DateAdapter từ chối mọi chuỗi người dùng chưa gõ xong.
|
|
210
|
+
*
|
|
211
|
+
* WHY cần đến mức này: `<input matInput [matDatepicker]>` khiến Material tự
|
|
212
|
+
* `parse()` lại ô nhập SAU MỖI PHÍM GÕ rồi ghi thẳng kết quả vào form control.
|
|
213
|
+
* Adapter mặc định quá dễ dãi trên hai đường:
|
|
214
|
+
*
|
|
215
|
+
* 1. `date-fns.parse` nhận năm thiếu chữ số → `11/12/2` thành năm 0002,
|
|
216
|
+
* `11/12/20` thành năm 0020. Ô nhập vừa gõ dở đã bị coi là hợp lệ (cờ lỗi
|
|
217
|
+
* bị xoá) và control ôm một ngày rác.
|
|
218
|
+
* 2. `parseISO` coi chuỗi 2 chữ số là thế kỷ → xoá lùi còn `11` ra năm 1100.
|
|
219
|
+
*
|
|
220
|
+
* Cả hai đường đều bị chặn ở đây: control chỉ nhận giá trị khi người dùng thực
|
|
221
|
+
* sự gõ xong.
|
|
222
|
+
*/
|
|
223
|
+
declare class SdStrictDateFnsAdapter extends DateFnsAdapter {
|
|
224
|
+
parse(value: unknown, parseFormat: string | string[]): Date | null;
|
|
225
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdStrictDateFnsAdapter, never>;
|
|
226
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SdStrictDateFnsAdapter>;
|
|
227
|
+
}
|
|
228
|
+
/** `provideDateFnsAdapter` + ép dùng adapter parse chặt ở trên. */
|
|
229
|
+
declare function provideSdStrictDateFnsAdapter(formats: MatDateFormats): Provider[];
|
|
230
|
+
|
|
231
|
+
export { HandleSdCustomValidator, SD_FORM_CONFIGURATION, SdFormControl, SdInlineErrorValidator, SdStrictDateFnsAdapter, provideSdStrictDateFnsAdapter, sdFormControlState, sdViewedInline, sdViewedTransform, ɵsdCoerceFormGroup, ɵsdFormControlConnector };
|
|
206
232
|
export type { ISdFormConfiguration, SdCustomValidator, SdFormControlSnapshot, SdSearch, SdSearchReq, SdSelectionData, SdViewed, SdViewedInlineApi, SdViewedInput, ɵSdFormControlConnector, ɵSdFormControlConnectorOptions, ɵSdFormControlConnectorState, ɵSdFormControlParent };
|
|
@@ -465,6 +465,8 @@ declare const EN_MESSAGES: {
|
|
|
465
465
|
readonly 'core.component.table.choose-filter-hint': "Please choose a filter to start";
|
|
466
466
|
readonly 'core.component.table.no-data': "No data";
|
|
467
467
|
readonly 'core.component.table.export-excel': "Export Excel";
|
|
468
|
+
readonly 'core.component.table.exporting': "Exporting...{percent}%";
|
|
469
|
+
readonly 'core.component.table.export': "Export";
|
|
468
470
|
readonly 'core.component.table.export-csv': "Export CSV";
|
|
469
471
|
readonly 'core.component.table.showing': "Showing:";
|
|
470
472
|
readonly 'core.component.table.paginator.first-page': "First page";
|
|
@@ -519,6 +521,8 @@ declare const EN_MESSAGES: {
|
|
|
519
521
|
readonly 'core.module.layout.not-found.message': "The page you're looking for doesn't exist or has been removed. Please check the URL or go back to the home page to continue.";
|
|
520
522
|
readonly 'core.module.layout.not-found.back': "Go back";
|
|
521
523
|
readonly 'core.module.layout.home.tab-name': "Home";
|
|
524
|
+
readonly 'core.module.layout.not-found.tab-name': "Page Not Found";
|
|
525
|
+
readonly 'core.module.layout.forbidden.tab-name': "Access Denied";
|
|
522
526
|
readonly 'core.module.layout.home.feature.data': "Data";
|
|
523
527
|
readonly 'core.module.layout.home.feature.reports': "Reports";
|
|
524
528
|
readonly 'core.module.layout.home.feature.users': "Users";
|
|
@@ -522,6 +522,15 @@ declare class SidebarMobileV3Component {
|
|
|
522
522
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarMobileV3Component, "sidebar-mobile-v3", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
523
523
|
}
|
|
524
524
|
|
|
525
|
+
/**
|
|
526
|
+
* Resolve a translated tab name for `@SdTabComponent`.
|
|
527
|
+
*
|
|
528
|
+
* WHY not I18nService: the decorator runs at module-evaluation time, before
|
|
529
|
+
* Angular's DI exists, so the service cannot be injected. We read the language
|
|
530
|
+
* the app persisted and look the key up in the static catalog instead.
|
|
531
|
+
*/
|
|
532
|
+
declare function resolveTabName(key: string): string;
|
|
533
|
+
|
|
525
534
|
declare class MenuPipe implements PipeTransform {
|
|
526
535
|
#private;
|
|
527
536
|
private permissionService;
|
|
@@ -556,5 +565,5 @@ declare class SdLayoutModule {
|
|
|
556
565
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<SdLayoutModule>;
|
|
557
566
|
}
|
|
558
567
|
|
|
559
|
-
export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SidebarMobileOverlayComponent, SidebarMobileV1Component, SidebarMobileV2Component, SidebarMobileV3Component, SidebarV2Component, SidebarV3Component, flattenMenuLeaves, getMenuStableKey, normalizeLayoutMobileBreakpoint, normalizeSidebarConfiguration, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
568
|
+
export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SidebarMobileOverlayComponent, SidebarMobileV1Component, SidebarMobileV2Component, SidebarMobileV3Component, SidebarV2Component, SidebarV3Component, flattenMenuLeaves, getMenuStableKey, normalizeLayoutMobileBreakpoint, normalizeSidebarConfiguration, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
560
569
|
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutMenu, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3 };
|