@ojiepermana/angular 22.1.11 → 22.1.12
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 +32 -26
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +137 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +147 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +25 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +165 -0
- package/theme/styles/css/base/theme.css +373 -0
- package/theme/styles/css/base/tokens.css +361 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, input, output, computed, signal, Component } from '@angular/core';
|
|
4
|
+
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
5
|
+
import { IconComponent } from '@ojiepermana/angular/component/icon';
|
|
6
|
+
import { cn } from '@ojiepermana/angular/component/utils/core';
|
|
7
|
+
import { n as navigationPanelId, N as NavigationItemComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs';
|
|
8
|
+
import { NAVIGATION_ADAPTER } from '@ojiepermana/angular/navigation/core';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Grid entry ala flyout: children sebuah branch dirender sebagai entry
|
|
12
|
+
* icon-box + title/subtitle dalam grid responsif (1/sm:2/md:3/lg:4, dibatasi
|
|
13
|
+
* `columns`); entry ber-children tampil terbuka secara default dengan collapse
|
|
14
|
+
* vertical yang icon-nya sejajar satu garis dengan icon induk. Dipakai oleh
|
|
15
|
+
* flyout dan panel mega navbar.
|
|
16
|
+
*/
|
|
17
|
+
class NavigationEntryGridComponent {
|
|
18
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
19
|
+
navId = input('default', /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []));
|
|
21
|
+
branch = input.required(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "branch" }] : /* istanbul ignore next */ []));
|
|
23
|
+
typeStyle = input('flat', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "typeStyle" }] : /* istanbul ignore next */ []));
|
|
25
|
+
itemClass = input('', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []));
|
|
27
|
+
activeIds = input(new Set(), /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []));
|
|
29
|
+
activeUrl = input(null, /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []));
|
|
31
|
+
iconTemplate = input(undefined, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
33
|
+
collapseTree = input('stairs', /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []));
|
|
35
|
+
openedIds = input([], /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []));
|
|
37
|
+
openedIdsChange = output();
|
|
38
|
+
itemSelected = output();
|
|
39
|
+
isBorderRail = computed(() => this.typeStyle() === 'border-rail', /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Kelas tambahan untuk NavigationItem bersarang saat style border-rail aktif. */
|
|
42
|
+
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && 'rounded-none hover:bg-transparent hover:text-primary'), /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/**
|
|
45
|
+
* Entry ber-children tampil TERBUKA secara default; set ini hanya menyimpan
|
|
46
|
+
* entry yang sengaja di-collapse pengguna. Instance grid dibuat ulang setiap
|
|
47
|
+
* panel dibuka sehingga state kembali terbuka semua.
|
|
48
|
+
*/
|
|
49
|
+
collapsedEntryKeys = signal(new Set(), /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "collapsedEntryKeys" }] : /* istanbul ignore next */ []));
|
|
51
|
+
/**
|
|
52
|
+
* Template method calls re-run on every check; resolving the branch once per
|
|
53
|
+
* dependency change keeps a redraw from replaying an URL match per entry.
|
|
54
|
+
*/
|
|
55
|
+
entryState = computed(() => {
|
|
56
|
+
const activeIds = this.activeIds();
|
|
57
|
+
const activeUrl = this.activeUrl();
|
|
58
|
+
const navId = this.navId();
|
|
59
|
+
return new Map(this.branch().children.map((child) => [
|
|
60
|
+
child,
|
|
61
|
+
{
|
|
62
|
+
active: this.nav.isItemActive(child, activeIds, activeUrl),
|
|
63
|
+
panelId: navigationPanelId(navId, child),
|
|
64
|
+
},
|
|
65
|
+
]));
|
|
66
|
+
}, /* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [{ debugName: "entryState" }] : /* istanbul ignore next */ []));
|
|
68
|
+
isItemActive(item) {
|
|
69
|
+
const state = this.entryState().get(item);
|
|
70
|
+
return state?.active ?? this.nav.isItemActive(item, this.activeIds(), this.activeUrl());
|
|
71
|
+
}
|
|
72
|
+
panelIdFor(item) {
|
|
73
|
+
return this.entryState().get(item)?.panelId ?? navigationPanelId(this.navId(), item);
|
|
74
|
+
}
|
|
75
|
+
isEntryOpen(item) {
|
|
76
|
+
return !this.collapsedEntryKeys().has(item.stateId);
|
|
77
|
+
}
|
|
78
|
+
toggleEntry(item) {
|
|
79
|
+
if (item.disabled) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const next = new Set(this.collapsedEntryKeys());
|
|
83
|
+
if (next.has(item.stateId)) {
|
|
84
|
+
next.delete(item.stateId);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
next.add(item.stateId);
|
|
88
|
+
}
|
|
89
|
+
this.collapsedEntryKeys.set(next);
|
|
90
|
+
}
|
|
91
|
+
selectEntry(item, event) {
|
|
92
|
+
if (item.disabled) {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
item.action?.(item.source);
|
|
98
|
+
this.itemSelected.emit({
|
|
99
|
+
item: item.source,
|
|
100
|
+
key: item.key,
|
|
101
|
+
type: item.type,
|
|
102
|
+
link: item.link,
|
|
103
|
+
external: !!this.nav.hrefFor(item),
|
|
104
|
+
});
|
|
105
|
+
this.nav.closePanel(this.navId());
|
|
106
|
+
this.nav.closeDrawer(this.navId());
|
|
107
|
+
}
|
|
108
|
+
isRouterItem(item) {
|
|
109
|
+
return this.nav.isRouterItem(item);
|
|
110
|
+
}
|
|
111
|
+
hrefFor(item) {
|
|
112
|
+
return this.nav.hrefFor(item);
|
|
113
|
+
}
|
|
114
|
+
relFor(item) {
|
|
115
|
+
return this.nav.relFor(item);
|
|
116
|
+
}
|
|
117
|
+
routerLinkActiveOptions(item) {
|
|
118
|
+
return this.nav.routerLinkActiveOptions(item);
|
|
119
|
+
}
|
|
120
|
+
iconContext(item, active) {
|
|
121
|
+
return this.nav.iconContext(item, active, 1, 'horizontal');
|
|
122
|
+
}
|
|
123
|
+
fallbackInitials(item) {
|
|
124
|
+
return this.nav.compactFallback(item);
|
|
125
|
+
}
|
|
126
|
+
contentGridClasses(branch) {
|
|
127
|
+
// Skala responsif: mobile 1, sm 2, md 3, lg ke atas 4; `columns` membatasi maksimumnya.
|
|
128
|
+
const columns = Math.min(Math.max(branch.columns ?? 4, 1), 4);
|
|
129
|
+
return cn('m-0 grid list-none grid-cols-1 gap-1 p-0', columns >= 2 && 'sm:grid-cols-2', columns >= 3 && 'md:grid-cols-3', columns >= 4 && 'lg:grid-cols-4');
|
|
130
|
+
}
|
|
131
|
+
entryClasses(item, active) {
|
|
132
|
+
return cn('group/nav nav-text flex w-full items-center gap-3 px-(--nav-item-padding-x) py-2 text-left transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', this.isBorderRail()
|
|
133
|
+
? cn('rounded-none', active ? 'text-primary' : 'text-foreground hover:text-primary')
|
|
134
|
+
: cn('rounded-lg', active
|
|
135
|
+
? 'bg-accent text-accent-foreground'
|
|
136
|
+
: 'text-foreground hover:bg-accent hover:text-accent-foreground'), item.disabled && 'pointer-events-none opacity-50', item.classes?.wrapper, this.itemClass());
|
|
137
|
+
}
|
|
138
|
+
entryIconClasses(active) {
|
|
139
|
+
if (this.isBorderRail()) {
|
|
140
|
+
// Kotak icon polos; bingkai digambar oleh rail line yang menjorok melewati sudut.
|
|
141
|
+
return cn('relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-foreground transition-colors group-hover/nav:text-primary', active && 'text-primary');
|
|
142
|
+
}
|
|
143
|
+
return cn('relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center rounded-lg border bg-background text-foreground shadow-sm transition-colors', active
|
|
144
|
+
? 'border-primary text-primary'
|
|
145
|
+
: 'border-[hsl(var(--border)/var(--section-border-opacity))]');
|
|
146
|
+
}
|
|
147
|
+
entryIconGlyphClasses(item) {
|
|
148
|
+
return cn('text-(length:--nav-icon-size) text-current', item.classes?.icon);
|
|
149
|
+
}
|
|
150
|
+
entryTitleClasses(item) {
|
|
151
|
+
return cn('block truncate', this.isBorderRail() ? 'text-current' : 'text-foreground', item.classes?.title);
|
|
152
|
+
}
|
|
153
|
+
entrySubtitleClasses(item) {
|
|
154
|
+
return cn('nav-subtitle mt-0.5 block truncate text-muted-foreground', item.classes?.subtitle);
|
|
155
|
+
}
|
|
156
|
+
entryChevronClasses(item) {
|
|
157
|
+
return cn('shrink-0 self-center text-(length:--nav-icon-size-sub) text-muted-foreground transition-transform duration-200', this.isEntryOpen(item) && 'rotate-90');
|
|
158
|
+
}
|
|
159
|
+
nestedListClasses() {
|
|
160
|
+
// Rail digambar di pusat chip induk (padding-x + chip/2); pl = (chip − icon)/2
|
|
161
|
+
// membuat pusat icon anak jatuh tepat di garis rail itu.
|
|
162
|
+
return cn("relative mt-1 flex list-none flex-col gap-0.5 p-0 pl-[calc((var(--nav-entry-box-size)-var(--nav-icon-size))/2)] before:pointer-events-none before:absolute before:inset-y-0 before:left-[calc(var(--nav-item-padding-x)+var(--nav-entry-box-size)/2)] before:w-0 before:border-l before:content-['']", this.isBorderRail()
|
|
163
|
+
? 'before:border-dashed before:border-border/40'
|
|
164
|
+
: 'before:border-[hsl(var(--border)/var(--section-border-opacity))]');
|
|
165
|
+
}
|
|
166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationEntryGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NavigationEntryGridComponent, isStandalone: true, selector: "NavigationEntryGrid", inputs: { navId: { classPropertyName: "navId", publicName: "navId", isSignal: true, isRequired: false, transformFunction: null }, branch: { classPropertyName: "branch", publicName: "branch", isSignal: true, isRequired: true, transformFunction: null }, typeStyle: { classPropertyName: "typeStyle", publicName: "typeStyle", isSignal: true, isRequired: false, transformFunction: null }, itemClass: { classPropertyName: "itemClass", publicName: "itemClass", isSignal: true, isRequired: false, transformFunction: null }, activeIds: { classPropertyName: "activeIds", publicName: "activeIds", isSignal: true, isRequired: false, transformFunction: null }, activeUrl: { classPropertyName: "activeUrl", publicName: "activeUrl", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null }, collapseTree: { classPropertyName: "collapseTree", publicName: "collapseTree", isSignal: true, isRequired: false, transformFunction: null }, openedIds: { classPropertyName: "openedIds", publicName: "openedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedIdsChange: "openedIdsChange", itemSelected: "itemSelected" }, host: { classAttribute: "contents" }, ngImport: i0, template: `
|
|
168
|
+
@let branchItem = branch();
|
|
169
|
+
|
|
170
|
+
<!--
|
|
171
|
+
No id here: the surface that owns the branch id is the panel rendering
|
|
172
|
+
this grid (the navbar mega panel), and repeating it put two elements with
|
|
173
|
+
the same id on every navbar page.
|
|
174
|
+
-->
|
|
175
|
+
<div
|
|
176
|
+
role="group"
|
|
177
|
+
[attr.aria-label]="branchItem.title || null"
|
|
178
|
+
[attr.data-navigation-flyout-content]="branchItem.key"
|
|
179
|
+
class="p-2 md:p-3"
|
|
180
|
+
>
|
|
181
|
+
<ul role="none" [class]="contentGridClasses(branchItem)">
|
|
182
|
+
@for (child of branchItem.children; track child.key) {
|
|
183
|
+
@switch (child.type) {
|
|
184
|
+
@case ('divider') {
|
|
185
|
+
<li role="separator" class="col-span-full my-1 h-px bg-border"></li>
|
|
186
|
+
}
|
|
187
|
+
@case ('spacer') {}
|
|
188
|
+
@default {
|
|
189
|
+
@if (child.children.length > 0) {
|
|
190
|
+
<li role="none" class="min-w-0" [attr.data-navigation-item-key]="child.key">
|
|
191
|
+
<button
|
|
192
|
+
type="button"
|
|
193
|
+
role="menuitem"
|
|
194
|
+
data-navigation-flyout-entry="true"
|
|
195
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
196
|
+
[attr.aria-expanded]="isEntryOpen(child)"
|
|
197
|
+
[attr.aria-controls]="isEntryOpen(child) ? panelIdFor(child) : null"
|
|
198
|
+
[disabled]="child.disabled || null"
|
|
199
|
+
(click)="toggleEntry(child)"
|
|
200
|
+
>
|
|
201
|
+
<ng-container
|
|
202
|
+
[ngTemplateOutlet]="entryContent"
|
|
203
|
+
[ngTemplateOutletContext]="{ $implicit: child, active: isItemActive(child) }"
|
|
204
|
+
/>
|
|
205
|
+
<Icon
|
|
206
|
+
name="chevron_right"
|
|
207
|
+
size="inherit"
|
|
208
|
+
[class]="entryChevronClasses(child)"
|
|
209
|
+
/>
|
|
210
|
+
</button>
|
|
211
|
+
|
|
212
|
+
@if (isEntryOpen(child)) {
|
|
213
|
+
<ul [id]="panelIdFor(child)" role="none" [class]="nestedListClasses()">
|
|
214
|
+
@for (nested of child.children; track nested.key) {
|
|
215
|
+
<li
|
|
216
|
+
NavigationItem
|
|
217
|
+
[navId]="navId()"
|
|
218
|
+
[item]="nested"
|
|
219
|
+
[level]="2"
|
|
220
|
+
[orientation]="'horizontal'"
|
|
221
|
+
[compact]="false"
|
|
222
|
+
[itemClass]="navItemClass()"
|
|
223
|
+
[activeIds]="activeIds()"
|
|
224
|
+
[activeUrl]="activeUrl()"
|
|
225
|
+
[iconTemplate]="iconTemplate()"
|
|
226
|
+
[collapseTree]="collapseTree()"
|
|
227
|
+
[openedIds]="openedIds()"
|
|
228
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
229
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
230
|
+
></li>
|
|
231
|
+
}
|
|
232
|
+
</ul>
|
|
233
|
+
}
|
|
234
|
+
</li>
|
|
235
|
+
} @else {
|
|
236
|
+
<li role="none" class="min-w-0" [attr.data-navigation-item-key]="child.key">
|
|
237
|
+
@if (isRouterItem(child)) {
|
|
238
|
+
<a
|
|
239
|
+
role="menuitem"
|
|
240
|
+
data-navigation-flyout-entry="true"
|
|
241
|
+
[class]="entryClasses(child, routerActive.isActive || isItemActive(child))"
|
|
242
|
+
[routerLink]="child.link ?? null"
|
|
243
|
+
[queryParams]="child.queryParams ?? null"
|
|
244
|
+
[queryParamsHandling]="child.queryParamsHandling ?? null"
|
|
245
|
+
[fragment]="child.fragment ?? undefined"
|
|
246
|
+
[preserveFragment]="child.preserveFragment ?? false"
|
|
247
|
+
[target]="child.target ?? undefined"
|
|
248
|
+
[attr.rel]="relFor(child)"
|
|
249
|
+
routerLinkActive
|
|
250
|
+
#routerActive="routerLinkActive"
|
|
251
|
+
[routerLinkActiveOptions]="routerLinkActiveOptions(child)"
|
|
252
|
+
[attr.aria-current]="
|
|
253
|
+
routerActive.isActive || isItemActive(child) ? 'page' : null
|
|
254
|
+
"
|
|
255
|
+
[attr.aria-disabled]="child.disabled || null"
|
|
256
|
+
(click)="selectEntry(child, $event)"
|
|
257
|
+
>
|
|
258
|
+
<ng-container
|
|
259
|
+
[ngTemplateOutlet]="entryContent"
|
|
260
|
+
[ngTemplateOutletContext]="{
|
|
261
|
+
$implicit: child,
|
|
262
|
+
active: routerActive.isActive || isItemActive(child),
|
|
263
|
+
}"
|
|
264
|
+
/>
|
|
265
|
+
</a>
|
|
266
|
+
} @else if (hrefFor(child)) {
|
|
267
|
+
<a
|
|
268
|
+
role="menuitem"
|
|
269
|
+
data-navigation-flyout-entry="true"
|
|
270
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
271
|
+
[attr.href]="hrefFor(child)"
|
|
272
|
+
[attr.target]="child.target ?? (child.externalLink ? '_blank' : null)"
|
|
273
|
+
[attr.rel]="relFor(child)"
|
|
274
|
+
[attr.aria-current]="isItemActive(child) ? 'page' : null"
|
|
275
|
+
[attr.aria-disabled]="child.disabled || null"
|
|
276
|
+
(click)="selectEntry(child, $event)"
|
|
277
|
+
>
|
|
278
|
+
<ng-container
|
|
279
|
+
[ngTemplateOutlet]="entryContent"
|
|
280
|
+
[ngTemplateOutletContext]="{
|
|
281
|
+
$implicit: child,
|
|
282
|
+
active: isItemActive(child),
|
|
283
|
+
}"
|
|
284
|
+
/>
|
|
285
|
+
</a>
|
|
286
|
+
} @else {
|
|
287
|
+
<button
|
|
288
|
+
type="button"
|
|
289
|
+
role="menuitem"
|
|
290
|
+
data-navigation-flyout-entry="true"
|
|
291
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
292
|
+
[disabled]="child.disabled || null"
|
|
293
|
+
[attr.aria-current]="isItemActive(child) ? 'page' : null"
|
|
294
|
+
(click)="selectEntry(child, $event)"
|
|
295
|
+
>
|
|
296
|
+
<ng-container
|
|
297
|
+
[ngTemplateOutlet]="entryContent"
|
|
298
|
+
[ngTemplateOutletContext]="{
|
|
299
|
+
$implicit: child,
|
|
300
|
+
active: isItemActive(child),
|
|
301
|
+
}"
|
|
302
|
+
/>
|
|
303
|
+
</button>
|
|
304
|
+
}
|
|
305
|
+
</li>
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
</ul>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<ng-template #entryContent let-child let-active="active">
|
|
314
|
+
<span [class]="entryIconClasses(active)">
|
|
315
|
+
@if (isBorderRail()) {
|
|
316
|
+
<span
|
|
317
|
+
aria-hidden="true"
|
|
318
|
+
data-navigation-icon-rail="top"
|
|
319
|
+
class="pointer-events-none absolute -inset-x-1.5 top-0 h-px bg-border/50"
|
|
320
|
+
></span>
|
|
321
|
+
<span
|
|
322
|
+
aria-hidden="true"
|
|
323
|
+
data-navigation-icon-rail="bottom"
|
|
324
|
+
class="pointer-events-none absolute -inset-x-1.5 bottom-0 h-px bg-border/50"
|
|
325
|
+
></span>
|
|
326
|
+
<span
|
|
327
|
+
aria-hidden="true"
|
|
328
|
+
data-navigation-icon-rail="left"
|
|
329
|
+
class="pointer-events-none absolute -inset-y-1.5 left-0 w-px bg-border/50"
|
|
330
|
+
></span>
|
|
331
|
+
<span
|
|
332
|
+
aria-hidden="true"
|
|
333
|
+
data-navigation-icon-rail="right"
|
|
334
|
+
class="pointer-events-none absolute -inset-y-1.5 right-0 w-px bg-border/50"
|
|
335
|
+
></span>
|
|
336
|
+
<span
|
|
337
|
+
aria-hidden="true"
|
|
338
|
+
data-navigation-icon-rail="center-horizontal"
|
|
339
|
+
class="pointer-events-none absolute -inset-x-1.5 top-1/2 border-t border-dashed border-border/40"
|
|
340
|
+
></span>
|
|
341
|
+
<span
|
|
342
|
+
aria-hidden="true"
|
|
343
|
+
data-navigation-icon-rail="center-vertical"
|
|
344
|
+
class="pointer-events-none absolute -inset-y-1.5 left-1/2 border-l border-dashed border-border/40"
|
|
345
|
+
></span>
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@if (child.icon) {
|
|
349
|
+
@if (iconTemplate(); as customIcon) {
|
|
350
|
+
<ng-container
|
|
351
|
+
[ngTemplateOutlet]="customIcon.template"
|
|
352
|
+
[ngTemplateOutletContext]="iconContext(child, active)"
|
|
353
|
+
/>
|
|
354
|
+
} @else {
|
|
355
|
+
<Icon
|
|
356
|
+
[name]="child.icon"
|
|
357
|
+
size="inherit"
|
|
358
|
+
[fill]="1"
|
|
359
|
+
[class]="entryIconGlyphClasses(child)"
|
|
360
|
+
/>
|
|
361
|
+
}
|
|
362
|
+
} @else {
|
|
363
|
+
<span
|
|
364
|
+
aria-hidden="true"
|
|
365
|
+
class="text-(length:--nav-icon-size-sub) font-semibold uppercase"
|
|
366
|
+
>{{ fallbackInitials(child) }}</span
|
|
367
|
+
>
|
|
368
|
+
}
|
|
369
|
+
</span>
|
|
370
|
+
|
|
371
|
+
<span class="min-w-0 flex-1">
|
|
372
|
+
<span [class]="entryTitleClasses(child)">{{ child.title }}</span>
|
|
373
|
+
@if (child.subtitle) {
|
|
374
|
+
<span [class]="entrySubtitleClasses(child)">{{ child.subtitle }}</span>
|
|
375
|
+
}
|
|
376
|
+
</span>
|
|
377
|
+
|
|
378
|
+
@if (child.badge?.title; as badgeTitle) {
|
|
379
|
+
<span
|
|
380
|
+
[class]="
|
|
381
|
+
child.badge?.classes ??
|
|
382
|
+
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
383
|
+
"
|
|
384
|
+
>{{ badgeTitle }}</span
|
|
385
|
+
>
|
|
386
|
+
}
|
|
387
|
+
</ng-template>
|
|
388
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: NavigationItemComponent, selector: "li[NavigationItem]", inputs: ["navId", "item", "level", "orientation", "compact", "itemClass", "activeIds", "activeUrl", "iconTemplate", "collapseTree", "straightRail", "stairsRail", "straightRailActive", "firstInBranch", "lastInBranch", "openedIds"], outputs: ["openedIdsChange", "itemSelected"] }] });
|
|
389
|
+
}
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationEntryGridComponent, decorators: [{
|
|
391
|
+
type: Component,
|
|
392
|
+
args: [{
|
|
393
|
+
selector: 'NavigationEntryGrid',
|
|
394
|
+
imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, IconComponent, NavigationItemComponent],
|
|
395
|
+
host: {
|
|
396
|
+
class: 'contents',
|
|
397
|
+
},
|
|
398
|
+
template: `
|
|
399
|
+
@let branchItem = branch();
|
|
400
|
+
|
|
401
|
+
<!--
|
|
402
|
+
No id here: the surface that owns the branch id is the panel rendering
|
|
403
|
+
this grid (the navbar mega panel), and repeating it put two elements with
|
|
404
|
+
the same id on every navbar page.
|
|
405
|
+
-->
|
|
406
|
+
<div
|
|
407
|
+
role="group"
|
|
408
|
+
[attr.aria-label]="branchItem.title || null"
|
|
409
|
+
[attr.data-navigation-flyout-content]="branchItem.key"
|
|
410
|
+
class="p-2 md:p-3"
|
|
411
|
+
>
|
|
412
|
+
<ul role="none" [class]="contentGridClasses(branchItem)">
|
|
413
|
+
@for (child of branchItem.children; track child.key) {
|
|
414
|
+
@switch (child.type) {
|
|
415
|
+
@case ('divider') {
|
|
416
|
+
<li role="separator" class="col-span-full my-1 h-px bg-border"></li>
|
|
417
|
+
}
|
|
418
|
+
@case ('spacer') {}
|
|
419
|
+
@default {
|
|
420
|
+
@if (child.children.length > 0) {
|
|
421
|
+
<li role="none" class="min-w-0" [attr.data-navigation-item-key]="child.key">
|
|
422
|
+
<button
|
|
423
|
+
type="button"
|
|
424
|
+
role="menuitem"
|
|
425
|
+
data-navigation-flyout-entry="true"
|
|
426
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
427
|
+
[attr.aria-expanded]="isEntryOpen(child)"
|
|
428
|
+
[attr.aria-controls]="isEntryOpen(child) ? panelIdFor(child) : null"
|
|
429
|
+
[disabled]="child.disabled || null"
|
|
430
|
+
(click)="toggleEntry(child)"
|
|
431
|
+
>
|
|
432
|
+
<ng-container
|
|
433
|
+
[ngTemplateOutlet]="entryContent"
|
|
434
|
+
[ngTemplateOutletContext]="{ $implicit: child, active: isItemActive(child) }"
|
|
435
|
+
/>
|
|
436
|
+
<Icon
|
|
437
|
+
name="chevron_right"
|
|
438
|
+
size="inherit"
|
|
439
|
+
[class]="entryChevronClasses(child)"
|
|
440
|
+
/>
|
|
441
|
+
</button>
|
|
442
|
+
|
|
443
|
+
@if (isEntryOpen(child)) {
|
|
444
|
+
<ul [id]="panelIdFor(child)" role="none" [class]="nestedListClasses()">
|
|
445
|
+
@for (nested of child.children; track nested.key) {
|
|
446
|
+
<li
|
|
447
|
+
NavigationItem
|
|
448
|
+
[navId]="navId()"
|
|
449
|
+
[item]="nested"
|
|
450
|
+
[level]="2"
|
|
451
|
+
[orientation]="'horizontal'"
|
|
452
|
+
[compact]="false"
|
|
453
|
+
[itemClass]="navItemClass()"
|
|
454
|
+
[activeIds]="activeIds()"
|
|
455
|
+
[activeUrl]="activeUrl()"
|
|
456
|
+
[iconTemplate]="iconTemplate()"
|
|
457
|
+
[collapseTree]="collapseTree()"
|
|
458
|
+
[openedIds]="openedIds()"
|
|
459
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
460
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
461
|
+
></li>
|
|
462
|
+
}
|
|
463
|
+
</ul>
|
|
464
|
+
}
|
|
465
|
+
</li>
|
|
466
|
+
} @else {
|
|
467
|
+
<li role="none" class="min-w-0" [attr.data-navigation-item-key]="child.key">
|
|
468
|
+
@if (isRouterItem(child)) {
|
|
469
|
+
<a
|
|
470
|
+
role="menuitem"
|
|
471
|
+
data-navigation-flyout-entry="true"
|
|
472
|
+
[class]="entryClasses(child, routerActive.isActive || isItemActive(child))"
|
|
473
|
+
[routerLink]="child.link ?? null"
|
|
474
|
+
[queryParams]="child.queryParams ?? null"
|
|
475
|
+
[queryParamsHandling]="child.queryParamsHandling ?? null"
|
|
476
|
+
[fragment]="child.fragment ?? undefined"
|
|
477
|
+
[preserveFragment]="child.preserveFragment ?? false"
|
|
478
|
+
[target]="child.target ?? undefined"
|
|
479
|
+
[attr.rel]="relFor(child)"
|
|
480
|
+
routerLinkActive
|
|
481
|
+
#routerActive="routerLinkActive"
|
|
482
|
+
[routerLinkActiveOptions]="routerLinkActiveOptions(child)"
|
|
483
|
+
[attr.aria-current]="
|
|
484
|
+
routerActive.isActive || isItemActive(child) ? 'page' : null
|
|
485
|
+
"
|
|
486
|
+
[attr.aria-disabled]="child.disabled || null"
|
|
487
|
+
(click)="selectEntry(child, $event)"
|
|
488
|
+
>
|
|
489
|
+
<ng-container
|
|
490
|
+
[ngTemplateOutlet]="entryContent"
|
|
491
|
+
[ngTemplateOutletContext]="{
|
|
492
|
+
$implicit: child,
|
|
493
|
+
active: routerActive.isActive || isItemActive(child),
|
|
494
|
+
}"
|
|
495
|
+
/>
|
|
496
|
+
</a>
|
|
497
|
+
} @else if (hrefFor(child)) {
|
|
498
|
+
<a
|
|
499
|
+
role="menuitem"
|
|
500
|
+
data-navigation-flyout-entry="true"
|
|
501
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
502
|
+
[attr.href]="hrefFor(child)"
|
|
503
|
+
[attr.target]="child.target ?? (child.externalLink ? '_blank' : null)"
|
|
504
|
+
[attr.rel]="relFor(child)"
|
|
505
|
+
[attr.aria-current]="isItemActive(child) ? 'page' : null"
|
|
506
|
+
[attr.aria-disabled]="child.disabled || null"
|
|
507
|
+
(click)="selectEntry(child, $event)"
|
|
508
|
+
>
|
|
509
|
+
<ng-container
|
|
510
|
+
[ngTemplateOutlet]="entryContent"
|
|
511
|
+
[ngTemplateOutletContext]="{
|
|
512
|
+
$implicit: child,
|
|
513
|
+
active: isItemActive(child),
|
|
514
|
+
}"
|
|
515
|
+
/>
|
|
516
|
+
</a>
|
|
517
|
+
} @else {
|
|
518
|
+
<button
|
|
519
|
+
type="button"
|
|
520
|
+
role="menuitem"
|
|
521
|
+
data-navigation-flyout-entry="true"
|
|
522
|
+
[class]="entryClasses(child, isItemActive(child))"
|
|
523
|
+
[disabled]="child.disabled || null"
|
|
524
|
+
[attr.aria-current]="isItemActive(child) ? 'page' : null"
|
|
525
|
+
(click)="selectEntry(child, $event)"
|
|
526
|
+
>
|
|
527
|
+
<ng-container
|
|
528
|
+
[ngTemplateOutlet]="entryContent"
|
|
529
|
+
[ngTemplateOutletContext]="{
|
|
530
|
+
$implicit: child,
|
|
531
|
+
active: isItemActive(child),
|
|
532
|
+
}"
|
|
533
|
+
/>
|
|
534
|
+
</button>
|
|
535
|
+
}
|
|
536
|
+
</li>
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
</ul>
|
|
542
|
+
</div>
|
|
543
|
+
|
|
544
|
+
<ng-template #entryContent let-child let-active="active">
|
|
545
|
+
<span [class]="entryIconClasses(active)">
|
|
546
|
+
@if (isBorderRail()) {
|
|
547
|
+
<span
|
|
548
|
+
aria-hidden="true"
|
|
549
|
+
data-navigation-icon-rail="top"
|
|
550
|
+
class="pointer-events-none absolute -inset-x-1.5 top-0 h-px bg-border/50"
|
|
551
|
+
></span>
|
|
552
|
+
<span
|
|
553
|
+
aria-hidden="true"
|
|
554
|
+
data-navigation-icon-rail="bottom"
|
|
555
|
+
class="pointer-events-none absolute -inset-x-1.5 bottom-0 h-px bg-border/50"
|
|
556
|
+
></span>
|
|
557
|
+
<span
|
|
558
|
+
aria-hidden="true"
|
|
559
|
+
data-navigation-icon-rail="left"
|
|
560
|
+
class="pointer-events-none absolute -inset-y-1.5 left-0 w-px bg-border/50"
|
|
561
|
+
></span>
|
|
562
|
+
<span
|
|
563
|
+
aria-hidden="true"
|
|
564
|
+
data-navigation-icon-rail="right"
|
|
565
|
+
class="pointer-events-none absolute -inset-y-1.5 right-0 w-px bg-border/50"
|
|
566
|
+
></span>
|
|
567
|
+
<span
|
|
568
|
+
aria-hidden="true"
|
|
569
|
+
data-navigation-icon-rail="center-horizontal"
|
|
570
|
+
class="pointer-events-none absolute -inset-x-1.5 top-1/2 border-t border-dashed border-border/40"
|
|
571
|
+
></span>
|
|
572
|
+
<span
|
|
573
|
+
aria-hidden="true"
|
|
574
|
+
data-navigation-icon-rail="center-vertical"
|
|
575
|
+
class="pointer-events-none absolute -inset-y-1.5 left-1/2 border-l border-dashed border-border/40"
|
|
576
|
+
></span>
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
@if (child.icon) {
|
|
580
|
+
@if (iconTemplate(); as customIcon) {
|
|
581
|
+
<ng-container
|
|
582
|
+
[ngTemplateOutlet]="customIcon.template"
|
|
583
|
+
[ngTemplateOutletContext]="iconContext(child, active)"
|
|
584
|
+
/>
|
|
585
|
+
} @else {
|
|
586
|
+
<Icon
|
|
587
|
+
[name]="child.icon"
|
|
588
|
+
size="inherit"
|
|
589
|
+
[fill]="1"
|
|
590
|
+
[class]="entryIconGlyphClasses(child)"
|
|
591
|
+
/>
|
|
592
|
+
}
|
|
593
|
+
} @else {
|
|
594
|
+
<span
|
|
595
|
+
aria-hidden="true"
|
|
596
|
+
class="text-(length:--nav-icon-size-sub) font-semibold uppercase"
|
|
597
|
+
>{{ fallbackInitials(child) }}</span
|
|
598
|
+
>
|
|
599
|
+
}
|
|
600
|
+
</span>
|
|
601
|
+
|
|
602
|
+
<span class="min-w-0 flex-1">
|
|
603
|
+
<span [class]="entryTitleClasses(child)">{{ child.title }}</span>
|
|
604
|
+
@if (child.subtitle) {
|
|
605
|
+
<span [class]="entrySubtitleClasses(child)">{{ child.subtitle }}</span>
|
|
606
|
+
}
|
|
607
|
+
</span>
|
|
608
|
+
|
|
609
|
+
@if (child.badge?.title; as badgeTitle) {
|
|
610
|
+
<span
|
|
611
|
+
[class]="
|
|
612
|
+
child.badge?.classes ??
|
|
613
|
+
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
614
|
+
"
|
|
615
|
+
>{{ badgeTitle }}</span
|
|
616
|
+
>
|
|
617
|
+
}
|
|
618
|
+
</ng-template>
|
|
619
|
+
`,
|
|
620
|
+
}]
|
|
621
|
+
}], propDecorators: { navId: [{ type: i0.Input, args: [{ isSignal: true, alias: "navId", required: false }] }], branch: [{ type: i0.Input, args: [{ isSignal: true, alias: "branch", required: true }] }], typeStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeStyle", required: false }] }], itemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemClass", required: false }] }], activeIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIds", required: false }] }], activeUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeUrl", required: false }] }], iconTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconTemplate", required: false }] }], collapseTree: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseTree", required: false }] }], openedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "openedIds", required: false }] }], openedIdsChange: [{ type: i0.Output, args: ["openedIdsChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
|
|
622
|
+
|
|
623
|
+
export { NavigationEntryGridComponent as N };
|