@sdcorejs/angular 20.2.1 → 20.2.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.
@@ -588,6 +588,22 @@ declare class SdSidebarMobileV3 {
588
588
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSidebarMobileV3, "sd-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>;
589
589
  }
590
590
 
591
+ /** Thêm '/' ở cuối để so khớp theo segment: '/appointment' không khớp nhầm '/appointments'. */
592
+ declare const normalizeMenuPath: (path: string) => string;
593
+ /** Route hiện tại có nằm trong nhánh của `path` không (khớp chính xác hoặc khớp phần đầu). */
594
+ declare const isMenuPathMatch: (routePath: string, path: string) => boolean;
595
+ /** Mọi path trong cây menu khớp với route hiện tại. */
596
+ declare const collectMatchedMenuPaths: (menus: SdLayoutMenu[] | null | undefined, routePath: string) => string[];
597
+ /**
598
+ * Path khớp sát nhất với route hiện tại trong cả cây menu.
599
+ * Khi cả '/appointment' và '/appointment/cs' cùng khớp route '/appointment/cs',
600
+ * chỉ path dài nhất được coi là active — path còn lại không được highlight.
601
+ * Hoà nhau thì lấy path xuất hiện trước theo thứ tự khai báo.
602
+ */
603
+ declare const resolveActiveMenuPath: (menus: SdLayoutMenu[] | null | undefined, routePath: string) => string | null;
604
+ /** Chính menu này, hoặc bất kỳ menu con nào ở mọi cấp, có đúng path đó. */
605
+ declare const containsMenuPath: (menuItem: SdLayoutMenu, path: string) => boolean;
606
+
591
607
  /**
592
608
  * Resolve a translated tab name for `@SdTabComponent`.
593
609
  *
@@ -609,8 +625,12 @@ declare class MenuPipe implements PipeTransform {
609
625
  }
610
626
 
611
627
  declare class MenuFocusPipe implements PipeTransform {
612
- #private;
613
- transform(routePath: string, menuItem: SdLayoutMenu): boolean;
628
+ /**
629
+ * @param activeMenuPath Path khớp sát nhất với route hiện tại (xem `resolveActiveMenuPath`).
630
+ * Truyền vào thì chỉ menu chứa đúng path đó mới focus, nên '/appointment' không sáng khi đang ở
631
+ * '/appointment/cs'. Bỏ trống thì giữ cách khớp phần đầu cũ.
632
+ */
633
+ transform(routePath: string, menuItem: SdLayoutMenu, activeMenuPath?: string | null): boolean;
614
634
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuFocusPipe, never>;
615
635
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<MenuFocusPipe, "menuFocus", true>;
616
636
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MenuFocusPipe>;
@@ -631,5 +651,5 @@ declare class SdLayoutModule {
631
651
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<SdLayoutModule>;
632
652
  }
633
653
 
634
- export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_DEMO_FALLBACK, SD_LAYOUT_STORAGE_NAMESPACE, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SdSidebarMobileOverlay, SdSidebarMobileV1, SdSidebarMobileV2, SdSidebarMobileV3, SdSidebarV2, SdSidebarV3, flattenMenuLeaves, getMenuStableKey, normalizeLayoutMobileBreakpoint, normalizeSidebarConfiguration, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, searchMenuLeaves, selectPrimaryMenuGroups };
654
+ export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_DEMO_FALLBACK, SD_LAYOUT_STORAGE_NAMESPACE, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SdSidebarMobileOverlay, SdSidebarMobileV1, SdSidebarMobileV2, SdSidebarMobileV3, SdSidebarV2, SdSidebarV3, collectMatchedMenuPaths, containsMenuPath, flattenMenuLeaves, getMenuStableKey, isMenuPathMatch, normalizeLayoutMobileBreakpoint, normalizeMenuPath, normalizeSidebarConfiguration, resolveActiveMenuPath, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, searchMenuLeaves, selectPrimaryMenuGroups };
635
655
  export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutMenu, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutStorageNamespace, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdcorejs/angular",
3
- "version": "20.2.1",
3
+ "version": "20.2.2",
4
4
  "description": "Angular component library: data table, query bar/builder, 20+ signal-based form controls, layout, auth and workflow services. Standalone, OnPush, signals-first. Published in parallel lines for Angular 19, 20 and 21.",
5
5
  "keywords": [
6
6
  "angular",