@aseansc/ui 5.11.0 → 5.12.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/CHANGELOG.md +25 -0
- package/fesm2022/aseansc-ui.mjs +261 -82
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/aseansc-ui.d.ts +42 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "ASC Internal UI Component Library — Angular 22 + PrimeNG 21 + TailwindCSS 4 (PrimeNG capped at 21.x — 22.x requires a paid PrimeUI license key, xem README.md)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ASC Team",
|
package/types/aseansc-ui.d.ts
CHANGED
|
@@ -250,9 +250,23 @@ interface AscUILayoutConfig {
|
|
|
250
250
|
* @default 'hidden'
|
|
251
251
|
*/
|
|
252
252
|
sidebarCollapse?: AscSidebarCollapseMode;
|
|
253
|
+
/**
|
|
254
|
+
* Cách sáng mục menu sidebar theo URL hiện tại:
|
|
255
|
+
* - `'exact'`: chỉ sáng khi URL trùng đúng `routerLink` (hành vi cũ).
|
|
256
|
+
* - `'longest-prefix'`: sáng mục có `routerLink` là tiền tố dài nhất (theo segment, bỏ
|
|
257
|
+
* query / fragment / matrix) của URL — trang con như `/config/fees/new` sáng "Quản lý biểu phí"
|
|
258
|
+
* và tự mở nhóm cha (kể cả F5 / vào thẳng link); `/issuers/securities` chỉ sáng "Danh mục CK",
|
|
259
|
+
* không sáng `/issuers`.
|
|
260
|
+
* Mục có `routerLinkActiveOptions` riêng vẫn dùng options đó.
|
|
261
|
+
* Override riêng từng layout qua input `[menuActiveMatch]`.
|
|
262
|
+
* @default 'exact'
|
|
263
|
+
*/
|
|
264
|
+
menuActiveMatch?: AscMenuActiveMatch;
|
|
253
265
|
}
|
|
254
266
|
/** Kiểu thu gọn sidebar desktop — xem `AscUILayoutConfig.sidebarCollapse`. */
|
|
255
267
|
type AscSidebarCollapseMode = 'hidden' | 'rail';
|
|
268
|
+
/** Cách sáng mục menu sidebar — xem `AscUILayoutConfig.menuActiveMatch`. */
|
|
269
|
+
type AscMenuActiveMatch = 'exact' | 'longest-prefix';
|
|
256
270
|
interface AscUIButtonConfig {
|
|
257
271
|
/**
|
|
258
272
|
* Size mặc định khi không truyền input [size].
|
|
@@ -756,7 +770,7 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
756
770
|
* 'FloatLabel' → PrimeNG FloatLabel
|
|
757
771
|
* 'IftaLabel' → PrimeNG IftaLabel
|
|
758
772
|
*/
|
|
759
|
-
readonly typeLabel: _angular_core.InputSignal<"
|
|
773
|
+
readonly typeLabel: _angular_core.InputSignal<"default" | "FloatLabel" | "IftaLabel">;
|
|
760
774
|
/** Layout tổng thể */
|
|
761
775
|
readonly layout: _angular_core.InputSignal<AscFormLayout>;
|
|
762
776
|
/**
|
|
@@ -1496,7 +1510,7 @@ declare class AscUpload extends BaseControlAccessor<File | File[] | null> {
|
|
|
1496
1510
|
}
|
|
1497
1511
|
|
|
1498
1512
|
/** Tên icon dựng sẵn trong thư viện. */
|
|
1499
|
-
type AscBuiltinIconName = 'approve' | 'view' | 'edit' | 'delete' | 'search' | 'more' | 'caret-down' | 'caret-right';
|
|
1513
|
+
type AscBuiltinIconName = 'approve' | 'view' | 'edit' | 'delete' | 'search' | 'more' | 'caret-down' | 'caret-right' | 'calendar-dots';
|
|
1500
1514
|
/** viewBox mặc định của icon dựng sẵn. */
|
|
1501
1515
|
declare const ASC_BUILTIN_ICON_DEFAULT_VIEWBOX = "0 0 20 20";
|
|
1502
1516
|
/** viewBox riêng của icon không theo lưới 20 (icon Phosphor lưới 256). */
|
|
@@ -2722,6 +2736,7 @@ declare class AscCardFooterDirective {
|
|
|
2722
2736
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AscCardFooterDirective, "[ascCardFooter]", never, {}, {}, never, never, true, never>;
|
|
2723
2737
|
}
|
|
2724
2738
|
type AscCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2739
|
+
type AscCardVariant = 'default' | 'flat';
|
|
2725
2740
|
type AscCardRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
2726
2741
|
declare class AscCardComponent {
|
|
2727
2742
|
protected readonly _headerTpl: _angular_core.Signal<AscCardHeaderDirective | undefined>;
|
|
@@ -2734,6 +2749,11 @@ declare class AscCardComponent {
|
|
|
2734
2749
|
readonly shadow: _angular_core.InputSignal<AscCardShadow>;
|
|
2735
2750
|
/** Border radius — none · xs · sm · md · lg (mặc định) · xl · 2xl · 3xl · full */
|
|
2736
2751
|
readonly rounded: _angular_core.InputSignal<AscCardRadius>;
|
|
2752
|
+
/**
|
|
2753
|
+
* Kiểu card: `default` (nền + shadow) · `flat` (bỏ nền, shadow, padding thân — dùng cho card lồng
|
|
2754
|
+
* trong trang, tiêu đề + nội dung thẳng hàng với nội dung trang).
|
|
2755
|
+
*/
|
|
2756
|
+
readonly variant: _angular_core.InputSignal<AscCardVariant>;
|
|
2737
2757
|
/** CSS class bổ sung vào host */
|
|
2738
2758
|
readonly styleClass: _angular_core.InputSignal<string>;
|
|
2739
2759
|
protected readonly _simpleTitle: _angular_core.Signal<string>;
|
|
@@ -2741,7 +2761,7 @@ declare class AscCardComponent {
|
|
|
2741
2761
|
protected readonly _innerCls: _angular_core.Signal<string>;
|
|
2742
2762
|
protected readonly _hostCls: _angular_core.Signal<string>;
|
|
2743
2763
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscCardComponent, never>;
|
|
2744
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscCardComponent, "asc-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, ["_headerTpl", "_footerTpl"], ["*"], true, never>;
|
|
2764
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscCardComponent, "asc-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, ["_headerTpl", "_footerTpl"], ["*"], true, never>;
|
|
2745
2765
|
}
|
|
2746
2766
|
|
|
2747
2767
|
type AscDividerLayout = 'horizontal' | 'vertical';
|
|
@@ -3090,6 +3110,17 @@ declare class LayoutService {
|
|
|
3090
3110
|
*/
|
|
3091
3111
|
isRail: _angular_core.Signal<boolean>;
|
|
3092
3112
|
transitionComplete: _angular_core.WritableSignal<boolean>;
|
|
3113
|
+
/** Cách xác định mục menu active — AscLayout đặt theo input / config `layout.menuActiveMatch`. */
|
|
3114
|
+
menuActiveMatch: _angular_core.WritableSignal<"exact" | "longest-prefix">;
|
|
3115
|
+
/** Đường dẫn (theo segment) của mọi mục menu có `routerLink` đang hiển thị — AppMenu cập nhật theo model. */
|
|
3116
|
+
menuLinkPaths: _angular_core.WritableSignal<string[][]>;
|
|
3117
|
+
/** URL hiện tại (AppMenu cập nhật sau mỗi lần điều hướng) — để template mục menu tính lại active. */
|
|
3118
|
+
menuUrl: _angular_core.WritableSignal<string>;
|
|
3119
|
+
/**
|
|
3120
|
+
* Chế độ 'longest-prefix': `linkPath` có phải mục menu khớp dài nhất với `urlPath` không.
|
|
3121
|
+
* Khớp = `linkPath` là tiền tố (theo segment) của `urlPath`; mục gốc (`/`, không segment) chỉ khớp đúng `/`.
|
|
3122
|
+
*/
|
|
3123
|
+
isLongestMenuPrefix(linkPath: string[], urlPath: string[]): boolean;
|
|
3093
3124
|
isDesktop(): boolean;
|
|
3094
3125
|
isMobile(): boolean;
|
|
3095
3126
|
onConfigUpdate(): void;
|
|
@@ -3122,6 +3153,12 @@ declare class AscLayout implements OnDestroy {
|
|
|
3122
3153
|
*/
|
|
3123
3154
|
sidebarCollapse: _angular_core.InputSignal<AscSidebarCollapseMode | undefined>;
|
|
3124
3155
|
protected readonly resolvedSidebarCollapse: _angular_core.Signal<AscSidebarCollapseMode>;
|
|
3156
|
+
/**
|
|
3157
|
+
* Cách sáng mục menu: 'exact' | 'longest-prefix' (trang con sáng mục cha + mở nhóm).
|
|
3158
|
+
* Không truyền thì fallback về config.layout.menuActiveMatch → 'exact'.
|
|
3159
|
+
*/
|
|
3160
|
+
menuActiveMatch: _angular_core.InputSignal<AscMenuActiveMatch | undefined>;
|
|
3161
|
+
protected readonly resolvedMenuActiveMatch: _angular_core.Signal<AscMenuActiveMatch>;
|
|
3125
3162
|
private collapsedRestored;
|
|
3126
3163
|
constructor(layoutService: LayoutService, renderer: Renderer2, router: Router);
|
|
3127
3164
|
get containerClass(): {
|
|
@@ -3140,7 +3177,7 @@ declare class AscLayout implements OnDestroy {
|
|
|
3140
3177
|
overlayMenuOpenSubscription: Subscription;
|
|
3141
3178
|
menuOutsideClickListener: (() => void) | null;
|
|
3142
3179
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscLayout, never>;
|
|
3143
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscLayout, "asc-layout", never, { "menuItems": { "alias": "menuItems"; "required": true; "isSignal": true; }; "sideBarLogo": { "alias": "sideBarLogo"; "required": false; "isSignal": true; }; "sideBarLogoCollapsed": { "alias": "sideBarLogoCollapsed"; "required": false; "isSignal": true; }; "topBarLogo": { "alias": "topBarLogo"; "required": false; "isSignal": true; }; "iconToggle": { "alias": "iconToggle"; "required": false; "isSignal": true; }; "breadCrumb": { "alias": "breadCrumb"; "required": false; "isSignal": true; }; "dropdownTpl": { "alias": "dropdownTpl"; "required": false; "isSignal": true; }; "footerSidebarTpl": { "alias": "footerSidebarTpl"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "sidebarCollapse": { "alias": "sidebarCollapse"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscLayout, "asc-layout", never, { "menuItems": { "alias": "menuItems"; "required": true; "isSignal": true; }; "sideBarLogo": { "alias": "sideBarLogo"; "required": false; "isSignal": true; }; "sideBarLogoCollapsed": { "alias": "sideBarLogoCollapsed"; "required": false; "isSignal": true; }; "topBarLogo": { "alias": "topBarLogo"; "required": false; "isSignal": true; }; "iconToggle": { "alias": "iconToggle"; "required": false; "isSignal": true; }; "breadCrumb": { "alias": "breadCrumb"; "required": false; "isSignal": true; }; "dropdownTpl": { "alias": "dropdownTpl"; "required": false; "isSignal": true; }; "footerSidebarTpl": { "alias": "footerSidebarTpl"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "sidebarCollapse": { "alias": "sidebarCollapse"; "required": false; "isSignal": true; }; "menuActiveMatch": { "alias": "menuActiveMatch"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3144
3181
|
}
|
|
3145
3182
|
|
|
3146
3183
|
declare class AscBreadcrumb {
|
|
@@ -3373,4 +3410,4 @@ declare class AscTrimSpaceDirective {
|
|
|
3373
3410
|
}
|
|
3374
3411
|
|
|
3375
3412
|
export { ASC_BASE_CONTROL, ASC_BUILTIN_ICONS, ASC_BUILTIN_ICON_DEFAULT_VIEWBOX, ASC_BUILTIN_ICON_VIEWBOX, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscSvgIconComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI, resolveAscBuiltinIcon };
|
|
3376
|
-
export type { AscAlertSeverity, AscAutoCompleteItem, AscAutoCompleteLazyLoadEvent, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscBuiltinIconName, AscButtonVariant, AscCardRadius, AscCardShadow, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSidebarCollapseMode, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };
|
|
3413
|
+
export type { AscAlertSeverity, AscAutoCompleteItem, AscAutoCompleteLazyLoadEvent, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscBuiltinIconName, AscButtonVariant, AscCardRadius, AscCardShadow, AscCardVariant, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuActiveMatch, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSidebarCollapseMode, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };
|