@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
|
@@ -1,7 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/** Icon Material Symbols bawaan ketika route aktif tidak menyediakan icon lain. */
|
|
2
|
+
const NAVIGATION_DOCKBAR_FALLBACK_ICON = 'route';
|
|
3
|
+
function normalizeType(type, hasChildren) {
|
|
4
|
+
if (type === 'divider' || type === 'spacer' || type === 'group' || type === 'mega') {
|
|
5
|
+
return type;
|
|
6
|
+
}
|
|
7
|
+
if (type === 'collapsible' || type === 'collapsable') {
|
|
8
|
+
return 'collapsible';
|
|
9
|
+
}
|
|
10
|
+
if (type === 'aside' && hasChildren) {
|
|
11
|
+
return 'collapsible';
|
|
12
|
+
}
|
|
13
|
+
if (!type && hasChildren) {
|
|
14
|
+
return 'collapsible';
|
|
15
|
+
}
|
|
16
|
+
return 'item';
|
|
17
|
+
}
|
|
18
|
+
function toKeyPart(value) {
|
|
19
|
+
return value
|
|
20
|
+
.toLowerCase()
|
|
21
|
+
.replace(/[^a-z0-9_-]+/g, '-')
|
|
22
|
+
.replace(/^-+|-+$/g, '');
|
|
23
|
+
}
|
|
24
|
+
function itemFallbackKey(item, index) {
|
|
25
|
+
return (toKeyPart(item.title ?? item.link?.toString() ?? item.href ?? `item-${index}`) ||
|
|
26
|
+
`item-${index}`);
|
|
27
|
+
}
|
|
28
|
+
function normalizeItem(item, index, path) {
|
|
29
|
+
if (item.isHidden?.(item)) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const children = (item.children ?? [])
|
|
33
|
+
.map((child, childIndex) => normalizeItem(child, childIndex, `${path}-${childIndex}`))
|
|
34
|
+
.filter((child) => child !== null);
|
|
35
|
+
const hasChildren = children.length > 0;
|
|
36
|
+
const key = item.id ?? `${path}-${itemFallbackKey(item, index)}`;
|
|
37
|
+
return {
|
|
38
|
+
...item,
|
|
39
|
+
key,
|
|
40
|
+
stateId: item.id ?? key,
|
|
41
|
+
panelId: `nav-panel-${toKeyPart(key) || index}`,
|
|
42
|
+
type: normalizeType(item.type, hasChildren),
|
|
43
|
+
source: item,
|
|
44
|
+
children,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function normalizeUiNavItems(items) {
|
|
48
|
+
return items
|
|
49
|
+
.map((item, index) => normalizeItem(item, index, `nav-${index}`))
|
|
50
|
+
.filter((item) => item !== null);
|
|
51
|
+
}
|
|
52
|
+
/** Format visual count badge dockbar. Count nol atau invalid tidak dirender. */
|
|
53
|
+
function formatNavigationBadgeCount(value) {
|
|
54
|
+
if (value === null || value === undefined || !Number.isFinite(value)) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const count = Math.trunc(value);
|
|
58
|
+
if (count <= 0) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return count > 99 ? '99+' : String(count);
|
|
62
|
+
}
|
|
4
63
|
|
|
5
64
|
/**
|
|
6
65
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
export { NAVIGATION_DOCKBAR_FALLBACK_ICON, formatNavigationBadgeCount, normalizeUiNavItems };
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Re-exports the independent @ojiepermana/angular-navigation package.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Generated bundle index. Do not edit.
|
|
10
|
-
*/
|
|
1
|
+
export { c as NavigationAsideFooterDirective, d as NavigationCollapseExpandedDirective, e as NavigationCollapseRootDirective, f as NavigationContainerComponent, g as NavigationContentComponent, h as NavigationDockbarComponent, i as NavigationFlyoutComponent, j as NavigationFooterActionComponent, k as NavigationFooterComponent, l as NavigationFooterInitialComponent, m as NavigationFooterTitleComponent, o as NavigationHeaderComponent, p as NavigationHeaderInitialComponent, q as NavigationHeaderTitleComponent, r as NavigationNavbarComponent, s as NavigationSidebarComponent, t as deriveNavigationInitials } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs';
|
|
2
|
+
export * from '@ojiepermana/angular/navigation/core';
|
|
3
|
+
export { NAVIGATION_DOCKBAR_FALLBACK_ICON, formatNavigationBadgeCount, normalizeUiNavItems } from '@ojiepermana/angular/navigation/types';
|
|
4
|
+
export { NavigationIconDirective } from '@ojiepermana/angular/navigation/icon';
|
|
@@ -1,10 +1,210 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Tiny rendering helpers. We use template literals + small utilities rather
|
|
3
|
+
* than a template engine to keep the generator dependency-free and the
|
|
4
|
+
* emitter output predictable.
|
|
5
|
+
*/
|
|
6
|
+
/** kebab-case (preserving digits) — matches the naming style in `old/api/`. */
|
|
7
|
+
function kebabCase(input) {
|
|
8
|
+
return String(input)
|
|
9
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
10
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
|
11
|
+
.replace(/[^a-zA-Z0-9]+/g, '-')
|
|
12
|
+
.replace(/^-+|-+$/g, '')
|
|
13
|
+
.toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
/** PascalCase — used for class/interface names when sanitizing tags. */
|
|
16
|
+
function pascalCase(input) {
|
|
17
|
+
const words = String(input)
|
|
18
|
+
.replace(/[^a-zA-Z0-9]+/g, ' ')
|
|
19
|
+
.trim()
|
|
20
|
+
.split(/\s+/)
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.map((w) => w[0].toUpperCase() + w.slice(1))
|
|
23
|
+
.join('');
|
|
24
|
+
return words ? safeIdentifier(words) : '';
|
|
25
|
+
}
|
|
26
|
+
/** camelCase — used for variable / method / fn names. */
|
|
27
|
+
function camelCase(input) {
|
|
28
|
+
const pc = pascalCase(input);
|
|
29
|
+
return pc ? safeIdentifier(pc[0].toLowerCase() + pc.slice(1)) : '';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Reserved words plus the identifiers a strict-mode module may not bind. An
|
|
33
|
+
* `operationId` is arbitrary text from the OpenAPI document, so `delete` or
|
|
34
|
+
* `2faVerify` reach the emitters as-is and would otherwise be written straight
|
|
35
|
+
* into `export function <name>(`.
|
|
36
|
+
*/
|
|
37
|
+
const RESERVED_WORDS = new Set([
|
|
38
|
+
'arguments',
|
|
39
|
+
'await',
|
|
40
|
+
'break',
|
|
41
|
+
'case',
|
|
42
|
+
'catch',
|
|
43
|
+
'class',
|
|
44
|
+
'const',
|
|
45
|
+
'continue',
|
|
46
|
+
'debugger',
|
|
47
|
+
'default',
|
|
48
|
+
'delete',
|
|
49
|
+
'do',
|
|
50
|
+
'else',
|
|
51
|
+
'enum',
|
|
52
|
+
'eval',
|
|
53
|
+
'export',
|
|
54
|
+
'extends',
|
|
55
|
+
'false',
|
|
56
|
+
'finally',
|
|
57
|
+
'for',
|
|
58
|
+
'function',
|
|
59
|
+
'if',
|
|
60
|
+
'implements',
|
|
61
|
+
'import',
|
|
62
|
+
'in',
|
|
63
|
+
'instanceof',
|
|
64
|
+
'interface',
|
|
65
|
+
'let',
|
|
66
|
+
'new',
|
|
67
|
+
'null',
|
|
68
|
+
'package',
|
|
69
|
+
'private',
|
|
70
|
+
'protected',
|
|
71
|
+
'public',
|
|
72
|
+
'return',
|
|
73
|
+
'static',
|
|
74
|
+
'super',
|
|
75
|
+
'switch',
|
|
76
|
+
'this',
|
|
77
|
+
'throw',
|
|
78
|
+
'true',
|
|
79
|
+
'try',
|
|
80
|
+
'typeof',
|
|
81
|
+
'undefined',
|
|
82
|
+
'var',
|
|
83
|
+
'void',
|
|
84
|
+
'while',
|
|
85
|
+
'with',
|
|
86
|
+
'yield',
|
|
87
|
+
]);
|
|
88
|
+
/**
|
|
89
|
+
* Make an unquoted identifier legal: prefix a leading digit, suffix a reserved
|
|
90
|
+
* word. Every generated function, class, interface and variable name goes
|
|
91
|
+
* through here, so a name and every reference to it stay in step.
|
|
92
|
+
*/
|
|
93
|
+
function safeIdentifier(name) {
|
|
94
|
+
const prefixed = /^[0-9]/.test(name) ? `_${name}` : name;
|
|
95
|
+
return RESERVED_WORDS.has(prefixed) ? `${prefixed}_` : prefixed;
|
|
96
|
+
}
|
|
97
|
+
const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
98
|
+
/**
|
|
99
|
+
* A single-quoted TypeScript string literal. Every quoted identifier the
|
|
100
|
+
* emitters produce must go through here — a schema property, a parameter name,
|
|
101
|
+
* or a path template is arbitrary text from the OpenAPI document, and an
|
|
102
|
+
* apostrophe in it would otherwise close the literal and emit broken source.
|
|
103
|
+
*/
|
|
104
|
+
function quote(value) {
|
|
105
|
+
const escaped = String(value)
|
|
106
|
+
.replace(/\\/g, '\\\\')
|
|
107
|
+
.replace(/'/g, "\\'")
|
|
108
|
+
.replace(/\r/g, '\\r')
|
|
109
|
+
.replace(/\n/g, '\\n');
|
|
110
|
+
return `'${escaped}'`;
|
|
111
|
+
}
|
|
112
|
+
/** A property key for an interface or object literal — bare when safe, quoted otherwise. */
|
|
113
|
+
function propertyKey(name) {
|
|
114
|
+
return IDENTIFIER.test(name) ? name : quote(name);
|
|
115
|
+
}
|
|
116
|
+
/** A property access suffix — dotted when safe, bracketed otherwise. */
|
|
117
|
+
function propertyAccess(name) {
|
|
118
|
+
return IDENTIFIER.test(name) ? `.${name}` : `[${quote(name)}]`;
|
|
119
|
+
}
|
|
120
|
+
/** Trim trailing whitespace on every line and ensure a single trailing newline. */
|
|
121
|
+
function finalize(text) {
|
|
122
|
+
const trimmed = text
|
|
123
|
+
.split('\n')
|
|
124
|
+
.map((line) => line.replace(/\s+$/g, ''))
|
|
125
|
+
.join('\n')
|
|
126
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
127
|
+
.replace(/^\s*\n/, '');
|
|
128
|
+
return trimmed.endsWith('\n') ? trimmed : trimmed + '\n';
|
|
129
|
+
}
|
|
130
|
+
/** Render an indented block-comment (1-line friendly). */
|
|
131
|
+
function comment(text) {
|
|
132
|
+
if (!text)
|
|
133
|
+
return '';
|
|
134
|
+
const safe = text.replace(/\*\//g, '*\\/');
|
|
135
|
+
return `/** ${safe} */`;
|
|
136
|
+
}
|
|
137
|
+
/** Join non-empty blocks with a blank line between them. */
|
|
138
|
+
function joinBlocks(blocks) {
|
|
139
|
+
return blocks.filter(Boolean).join('\n\n');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Public config shape for the SDK generator.
|
|
144
|
+
*
|
|
145
|
+
* Users place an `sdk.config.json` at the workspace root describing one or more
|
|
146
|
+
* generation targets. All paths are resolved relative to the workspace root
|
|
147
|
+
* (i.e. the directory containing the config file).
|
|
148
|
+
*/
|
|
149
|
+
const DEFAULT_BANNER = '/* eslint-disable */\n/* Auto-generated by @ojiepermana/angular/sdk. DO NOT EDIT. */';
|
|
150
|
+
const DEFAULT_FEATURES = {
|
|
151
|
+
models: true,
|
|
152
|
+
operations: true,
|
|
153
|
+
services: true,
|
|
154
|
+
client: true,
|
|
155
|
+
metadata: true,
|
|
156
|
+
navigation: true,
|
|
157
|
+
resources: false,
|
|
158
|
+
};
|
|
159
|
+
function resolveTarget(raw) {
|
|
160
|
+
if (!raw || typeof raw !== 'object') {
|
|
161
|
+
throw new Error('Invalid target: expected object');
|
|
162
|
+
}
|
|
163
|
+
if (!raw.input)
|
|
164
|
+
throw new Error('Target is missing required "input"');
|
|
165
|
+
if (!raw.output)
|
|
166
|
+
throw new Error('Target is missing required "output"');
|
|
167
|
+
const mode = raw.mode ?? 'standalone';
|
|
168
|
+
if (!['standalone', 'library', 'secondary-entrypoint'].includes(mode)) {
|
|
169
|
+
throw new Error(`Invalid target mode: ${mode}`);
|
|
170
|
+
}
|
|
171
|
+
const splitByDomain = raw.splitByDomain ?? mode === 'library';
|
|
172
|
+
return {
|
|
173
|
+
input: raw.input,
|
|
174
|
+
output: raw.output,
|
|
175
|
+
mode,
|
|
176
|
+
clientName: safeIdentifier(raw.clientName ?? 'Api'),
|
|
177
|
+
packageName: raw.packageName ?? '@local/sdk',
|
|
178
|
+
packageVersion: raw.packageVersion ?? '0.0.1',
|
|
179
|
+
rootUrl: raw.rootUrl,
|
|
180
|
+
features: { ...DEFAULT_FEATURES, ...(raw.features ?? {}) },
|
|
181
|
+
splitByDomain,
|
|
182
|
+
splitDepth: raw.splitDepth === 'tag' ? 'tag' : 'service',
|
|
183
|
+
banner: raw.banner ?? DEFAULT_BANNER,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function resolveConfig(raw) {
|
|
187
|
+
if (!raw || typeof raw !== 'object') {
|
|
188
|
+
throw new Error('Invalid SDK config: root must be an object');
|
|
189
|
+
}
|
|
190
|
+
const cfg = raw;
|
|
191
|
+
if (!Array.isArray(cfg.targets) || cfg.targets.length === 0) {
|
|
192
|
+
throw new Error('Invalid SDK config: "targets" must be a non-empty array');
|
|
193
|
+
}
|
|
194
|
+
return cfg.targets.map(resolveTarget);
|
|
195
|
+
}
|
|
2
196
|
|
|
3
197
|
/*
|
|
4
|
-
* Public API of @ojiepermana/angular/sdk
|
|
5
|
-
*
|
|
198
|
+
* Public API Surface of @ojiepermana/angular/sdk
|
|
199
|
+
* (also re-exported as the secondary entrypoint @ojiepermana/angular/sdk)
|
|
200
|
+
*
|
|
201
|
+
* This package is primarily consumed as an Angular schematic collection
|
|
202
|
+
* (`init` and `sdk`). The TypeScript surface intentionally stays small and
|
|
203
|
+
* Node-free so it can be published as a standalone Angular library entry point.
|
|
6
204
|
*/
|
|
7
205
|
|
|
8
206
|
/**
|
|
9
207
|
* Generated bundle index. Do not edit.
|
|
10
|
-
*/
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
export { resolveConfig, resolveTarget };
|