@ojiepermana/angular 21.3.4 → 22.0.27

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.
Files changed (387) hide show
  1. package/README.md +16 -298
  2. package/fesm2022/ojiepermana-angular-chart.mjs +11 -0
  3. package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
  4. package/fesm2022/ojiepermana-angular-component.mjs +11 -0
  5. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  6. package/fesm2022/ojiepermana-angular-navigation.mjs +11 -0
  7. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -0
  8. package/fesm2022/ojiepermana-angular-sdk.mjs +11 -0
  9. package/fesm2022/ojiepermana-angular-sdk.mjs.map +1 -0
  10. package/fesm2022/ojiepermana-angular-theme.mjs +3 -374
  11. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  12. package/fesm2022/ojiepermana-angular.mjs +14 -14
  13. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  14. package/package.json +25 -361
  15. package/types/ojiepermana-angular-chart.d.ts +1 -0
  16. package/types/ojiepermana-angular-component.d.ts +1 -0
  17. package/types/ojiepermana-angular-navigation.d.ts +1 -0
  18. package/types/ojiepermana-angular-sdk.d.ts +1 -0
  19. package/types/ojiepermana-angular-theme.d.ts +1 -116
  20. package/types/ojiepermana-angular.d.ts +5 -3
  21. package/.npmignore +0 -2
  22. package/collection.json +0 -30
  23. package/component/accordion/package.json +0 -4
  24. package/component/alert/package.json +0 -4
  25. package/component/alert-dialog/package.json +0 -4
  26. package/component/aspect-ratio/package.json +0 -4
  27. package/component/avatar/package.json +0 -4
  28. package/component/badge/package.json +0 -4
  29. package/component/breadcrumb/package.json +0 -4
  30. package/component/button/package.json +0 -4
  31. package/component/button-group/package.json +0 -4
  32. package/component/calendar/package.json +0 -4
  33. package/component/card/package.json +0 -4
  34. package/component/carousel/package.json +0 -4
  35. package/component/chart/README.md +0 -249
  36. package/component/chart/area/package.json +0 -4
  37. package/component/chart/bar/package.json +0 -4
  38. package/component/chart/line/package.json +0 -4
  39. package/component/chart/package.json +0 -4
  40. package/component/chart/pie/package.json +0 -4
  41. package/component/chart/radar/package.json +0 -4
  42. package/component/chart/radial/package.json +0 -4
  43. package/component/chart/scatter/package.json +0 -4
  44. package/component/checkbox/package.json +0 -4
  45. package/component/collapsible/package.json +0 -4
  46. package/component/combobox/package.json +0 -4
  47. package/component/command/package.json +0 -4
  48. package/component/context-menu/package.json +0 -4
  49. package/component/date-picker/package.json +0 -4
  50. package/component/dialog/package.json +0 -4
  51. package/component/drawer/package.json +0 -4
  52. package/component/dropdown-menu/package.json +0 -4
  53. package/component/form/package.json +0 -4
  54. package/component/input/package.json +0 -4
  55. package/component/input-group/package.json +0 -4
  56. package/component/item/package.json +0 -4
  57. package/component/label/package.json +0 -4
  58. package/component/pagination/package.json +0 -4
  59. package/component/popover/package.json +0 -4
  60. package/component/progress/package.json +0 -4
  61. package/component/radio/package.json +0 -4
  62. package/component/scroll-area/package.json +0 -4
  63. package/component/select/package.json +0 -4
  64. package/component/separator/package.json +0 -4
  65. package/component/sheet/package.json +0 -4
  66. package/component/skeleton/package.json +0 -4
  67. package/component/slider/package.json +0 -4
  68. package/component/switch/package.json +0 -4
  69. package/component/table/package.json +0 -4
  70. package/component/tabs/package.json +0 -4
  71. package/component/textarea/package.json +0 -4
  72. package/component/toast/package.json +0 -4
  73. package/component/tooltip/package.json +0 -4
  74. package/component/utils/package.json +0 -4
  75. package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -174
  76. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
  77. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -242
  78. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
  79. package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -90
  80. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
  81. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -33
  82. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
  83. package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -123
  84. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
  85. package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -47
  86. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
  87. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -186
  88. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
  89. package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -95
  90. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
  91. package/fesm2022/ojiepermana-angular-component-button.mjs +0 -64
  92. package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
  93. package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -78
  94. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
  95. package/fesm2022/ojiepermana-angular-component-card.mjs +0 -137
  96. package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
  97. package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -310
  98. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
  99. package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
  100. package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
  101. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
  102. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
  103. package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
  104. package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
  105. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
  106. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
  107. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
  108. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
  109. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
  110. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
  111. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
  112. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
  113. package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3714
  114. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
  115. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -104
  116. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
  117. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -116
  118. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
  119. package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -263
  120. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
  121. package/fesm2022/ojiepermana-angular-component-command.mjs +0 -268
  122. package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
  123. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -100
  124. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
  125. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -155
  126. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
  127. package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -262
  128. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
  129. package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
  130. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
  131. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -458
  132. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
  133. package/fesm2022/ojiepermana-angular-component-form.mjs +0 -208
  134. package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
  135. package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -164
  136. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
  137. package/fesm2022/ojiepermana-angular-component-input.mjs +0 -43
  138. package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
  139. package/fesm2022/ojiepermana-angular-component-item.mjs +0 -241
  140. package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
  141. package/fesm2022/ojiepermana-angular-component-label.mjs +0 -30
  142. package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
  143. package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -192
  144. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
  145. package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -163
  146. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
  147. package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -53
  148. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
  149. package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -92
  150. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
  151. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -48
  152. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
  153. package/fesm2022/ojiepermana-angular-component-select.mjs +0 -131
  154. package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
  155. package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -33
  156. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
  157. package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -235
  158. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
  159. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -29
  160. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
  161. package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -29
  162. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
  163. package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -84
  164. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
  165. package/fesm2022/ojiepermana-angular-component-table.mjs +0 -139
  166. package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
  167. package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -252
  168. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
  169. package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -37
  170. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
  171. package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -47
  172. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
  173. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -56
  174. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
  175. package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
  176. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
  177. package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
  178. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
  179. package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -581
  180. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
  181. package/fesm2022/ojiepermana-angular-layout-empty.mjs +0 -49
  182. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
  183. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs +0 -119
  184. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
  185. package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
  186. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
  187. package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -114
  188. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
  189. package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
  190. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
  191. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -27
  192. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
  193. package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
  194. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
  195. package/fesm2022/ojiepermana-angular-layout-vertical.mjs +0 -113
  196. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
  197. package/fesm2022/ojiepermana-angular-layout.mjs +0 -461
  198. package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
  199. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
  200. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
  201. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -59
  202. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
  203. package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -548
  204. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
  205. package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -204
  206. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
  207. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -373
  208. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
  209. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -433
  210. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
  211. package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
  212. package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
  213. package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
  214. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
  215. package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -286
  216. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
  217. package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
  218. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
  219. package/generator/api/README.md +0 -252
  220. package/generator/api/bin/package.json +0 -3
  221. package/generator/api/bin/schematics/init/index.js +0 -90
  222. package/generator/api/bin/schematics/ng-add/index.js +0 -131
  223. package/generator/api/bin/schematics/sdk/index.js +0 -76
  224. package/generator/api/bin/src/config/loader.js +0 -41
  225. package/generator/api/bin/src/config/schema.js +0 -57
  226. package/generator/api/bin/src/emit/client.js +0 -246
  227. package/generator/api/bin/src/emit/metadata.js +0 -295
  228. package/generator/api/bin/src/emit/models.js +0 -106
  229. package/generator/api/bin/src/emit/navigation.js +0 -56
  230. package/generator/api/bin/src/emit/operations.js +0 -122
  231. package/generator/api/bin/src/emit/public-api.js +0 -54
  232. package/generator/api/bin/src/emit/services.js +0 -87
  233. package/generator/api/bin/src/engine.js +0 -65
  234. package/generator/api/bin/src/layout/per-domain.js +0 -359
  235. package/generator/api/bin/src/parser/bundle.js +0 -25
  236. package/generator/api/bin/src/parser/ir.js +0 -320
  237. package/generator/api/bin/src/parser/types.js +0 -7
  238. package/generator/api/bin/src/render/template.js +0 -58
  239. package/generator/api/bin/src/writer/index.js +0 -278
  240. package/generator/api/package.json +0 -4
  241. package/generator/api/schematics/init/schema.json +0 -19
  242. package/generator/api/schematics/ng-add/schema.json +0 -14
  243. package/generator/api/schematics/sdk/schema.json +0 -19
  244. package/generator/api/sdk.config.example.json +0 -24
  245. package/generator/guide/README.md +0 -84
  246. package/generator/guide/bin/package.json +0 -3
  247. package/generator/guide/bin/schematics/build/index.js +0 -35
  248. package/generator/guide/bin/schematics/init/index.js +0 -70
  249. package/generator/guide/bin/src/config/loader.js +0 -50
  250. package/generator/guide/bin/src/config/schema.js +0 -12
  251. package/generator/guide/bin/src/engine/component.js +0 -74
  252. package/generator/guide/bin/src/engine/frontmatter.js +0 -42
  253. package/generator/guide/bin/src/engine/index.js +0 -42
  254. package/generator/guide/bin/src/engine/naming.js +0 -39
  255. package/generator/guide/bin/src/engine/render.js +0 -31
  256. package/generator/guide/bin/src/engine/routes.js +0 -106
  257. package/generator/guide/bin/src/engine/walk.js +0 -35
  258. package/generator/guide/guide.config.example.json +0 -9
  259. package/generator/guide/schematics/build/schema.json +0 -14
  260. package/generator/guide/schematics/init/schema.json +0 -19
  261. package/layout/component/package.json +0 -4
  262. package/layout/empty/package.json +0 -4
  263. package/layout/horizontal/package.json +0 -4
  264. package/layout/package.json +0 -4
  265. package/layout/provider/package.json +0 -4
  266. package/layout/services/package.json +0 -4
  267. package/layout/shell/package.json +0 -4
  268. package/layout/token/directive/package.json +0 -4
  269. package/layout/token/package.json +0 -4
  270. package/layout/vertical/package.json +0 -4
  271. package/navigation/demo-data/package.json +0 -4
  272. package/navigation/icon/package.json +0 -4
  273. package/navigation/item/package.json +0 -4
  274. package/navigation/service/package.json +0 -4
  275. package/navigation/sidebar/package.json +0 -4
  276. package/navigation/topbar/package.json +0 -4
  277. package/navigation/types/package.json +0 -4
  278. package/theme/README.md +0 -67
  279. package/theme/package.json +0 -4
  280. package/theme/provider/package.json +0 -4
  281. package/theme/services/package.json +0 -4
  282. package/theme/styles/foundation/components.css +0 -81
  283. package/theme/styles/foundation/layers.css +0 -15
  284. package/theme/styles/foundation/tokens.css +0 -55
  285. package/theme/styles/index.css +0 -37
  286. package/theme/styles/integrations/material.css +0 -254
  287. package/theme/styles/integrations/tailwind.css +0 -114
  288. package/theme/styles/variants/color/amber.css +0 -31
  289. package/theme/styles/variants/color/base.css +0 -36
  290. package/theme/styles/variants/color/blue.css +0 -31
  291. package/theme/styles/variants/color/cyan.css +0 -31
  292. package/theme/styles/variants/color/emerald.css +0 -31
  293. package/theme/styles/variants/color/fuchsia.css +0 -31
  294. package/theme/styles/variants/color/green.css +0 -31
  295. package/theme/styles/variants/color/index.css +0 -22
  296. package/theme/styles/variants/color/indigo.css +0 -31
  297. package/theme/styles/variants/color/lime.css +0 -31
  298. package/theme/styles/variants/color/orange.css +0 -31
  299. package/theme/styles/variants/color/pink.css +0 -31
  300. package/theme/styles/variants/color/purple.css +0 -31
  301. package/theme/styles/variants/color/red.css +0 -31
  302. package/theme/styles/variants/color/rose.css +0 -31
  303. package/theme/styles/variants/color/sky.css +0 -31
  304. package/theme/styles/variants/color/teal.css +0 -31
  305. package/theme/styles/variants/color/violet.css +0 -31
  306. package/theme/styles/variants/color/yellow.css +0 -31
  307. package/theme/styles/variants/mode/dark.css +0 -20
  308. package/theme/styles/variants/mode/index.css +0 -6
  309. package/theme/styles/variants/mode/light.css +0 -24
  310. package/theme/styles/variants/style/brutal.css +0 -50
  311. package/theme/styles/variants/style/default.css +0 -54
  312. package/theme/styles/variants/style/index.css +0 -8
  313. package/theme/styles/variants/style/sharp.css +0 -50
  314. package/theme/styles/variants/style/soft.css +0 -50
  315. package/theme/token/package.json +0 -4
  316. package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
  317. package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
  318. package/types/ojiepermana-angular-component-alert.d.ts +0 -37
  319. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
  320. package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
  321. package/types/ojiepermana-angular-component-badge.d.ts +0 -19
  322. package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
  323. package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
  324. package/types/ojiepermana-angular-component-button.d.ts +0 -22
  325. package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
  326. package/types/ojiepermana-angular-component-card.d.ts +0 -60
  327. package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
  328. package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
  329. package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
  330. package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
  331. package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
  332. package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
  333. package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
  334. package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
  335. package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
  336. package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
  337. package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
  338. package/types/ojiepermana-angular-component-combobox.d.ts +0 -51
  339. package/types/ojiepermana-angular-component-command.d.ts +0 -99
  340. package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
  341. package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
  342. package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
  343. package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
  344. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -135
  345. package/types/ojiepermana-angular-component-form.d.ts +0 -92
  346. package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
  347. package/types/ojiepermana-angular-component-input.d.ts +0 -16
  348. package/types/ojiepermana-angular-component-item.d.ts +0 -88
  349. package/types/ojiepermana-angular-component-label.d.ts +0 -11
  350. package/types/ojiepermana-angular-component-pagination.d.ts +0 -27
  351. package/types/ojiepermana-angular-component-popover.d.ts +0 -43
  352. package/types/ojiepermana-angular-component-progress.d.ts +0 -17
  353. package/types/ojiepermana-angular-component-radio.d.ts +0 -34
  354. package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
  355. package/types/ojiepermana-angular-component-select.d.ts +0 -45
  356. package/types/ojiepermana-angular-component-separator.d.ts +0 -14
  357. package/types/ojiepermana-angular-component-sheet.d.ts +0 -74
  358. package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
  359. package/types/ojiepermana-angular-component-slider.d.ts +0 -16
  360. package/types/ojiepermana-angular-component-switch.d.ts +0 -30
  361. package/types/ojiepermana-angular-component-table.d.ts +0 -52
  362. package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
  363. package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
  364. package/types/ojiepermana-angular-component-toast.d.ts +0 -29
  365. package/types/ojiepermana-angular-component-tooltip.d.ts +0 -22
  366. package/types/ojiepermana-angular-component-utils.d.ts +0 -5
  367. package/types/ojiepermana-angular-generator-api.d.ts +0 -86
  368. package/types/ojiepermana-angular-layout-component.d.ts +0 -205
  369. package/types/ojiepermana-angular-layout-empty.d.ts +0 -22
  370. package/types/ojiepermana-angular-layout-horizontal.d.ts +0 -36
  371. package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
  372. package/types/ojiepermana-angular-layout-services.d.ts +0 -25
  373. package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
  374. package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
  375. package/types/ojiepermana-angular-layout-token.d.ts +0 -36
  376. package/types/ojiepermana-angular-layout-vertical.d.ts +0 -38
  377. package/types/ojiepermana-angular-layout.d.ts +0 -164
  378. package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
  379. package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
  380. package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
  381. package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
  382. package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
  383. package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -54
  384. package/types/ojiepermana-angular-navigation-types.d.ts +0 -129
  385. package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
  386. package/types/ojiepermana-angular-theme-services.d.ts +0 -55
  387. package/types/ojiepermana-angular-theme-token.d.ts +0 -57
@@ -1,204 +0,0 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, DestroyRef, signal, computed, effect, Injectable } from '@angular/core';
4
- import { Router, NavigationEnd } from '@angular/router';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { filter } from 'rxjs/operators';
7
-
8
- /** Default registry key used when no id is specified. */
9
- const DEFAULT_NAVIGATION_ID = 'main';
10
- const SIDEBAR_COLLAPSE_STORAGE_KEY = 'sidebar-collapse';
11
- const LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY = 'sidebar-appearance';
12
- function parseSidebarCollapsed(value) {
13
- if (value === 'true')
14
- return true;
15
- if (value === 'false')
16
- return false;
17
- return null;
18
- }
19
- /**
20
- * Signal-based global state untuk navigation (sidebar/topbar).
21
- *
22
- * Items disimpan dalam registry ber-key. Key default adalah `'main'`.
23
- * Komponen `sidebar` / `topbar` memilih registry via input `navigationId`.
24
- */
25
- class NavigationService {
26
- doc = inject(DOCUMENT);
27
- router = inject(Router);
28
- destroyRef = inject(DestroyRef);
29
- persistedSidebarCollapsed = this.readPersistedSidebarCollapsed();
30
- /** Internal version counter — incremented on every registry mutation. */
31
- _version = signal(0, ...(ngDevMode ? [{ debugName: "_version" }] : /* istanbul ignore next */ []));
32
- /** Internal map of registered navigation trees. */
33
- _registry = new Map();
34
- _collapsed = signal(this.persistedSidebarCollapsed ?? false, ...(ngDevMode ? [{ debugName: "_collapsed" }] : /* istanbul ignore next */ []));
35
- _hasStoredSidebarCollapse = signal(this.persistedSidebarCollapsed !== null, ...(ngDevMode ? [{ debugName: "_hasStoredSidebarCollapse" }] : /* istanbul ignore next */ []));
36
- /**
37
- * Backward-compatible accessor — returns items for the default (`'main'`) key.
38
- * Prefer `getItems(id)` when working with named registries.
39
- */
40
- items = computed(() => this.getItems(DEFAULT_NAVIGATION_ID)(), ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
41
- /** Sidebar appearance preference (`default` or `thin`). */
42
- sidebarAppearance = computed(() => (this._collapsed() ? 'thin' : 'default'), ...(ngDevMode ? [{ debugName: "sidebarAppearance" }] : /* istanbul ignore next */ []));
43
- hasStoredSidebarCollapse = this._hasStoredSidebarCollapse.asReadonly();
44
- /** Sidebar collapsed (default ↔ thin) toggle untuk desktop. */
45
- collapsed = this._collapsed.asReadonly();
46
- /** Sheet drawer terbuka di mobile. */
47
- mobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "mobileOpen" }] : /* istanbul ignore next */ []));
48
- /** Set id grup / collapsable yang sedang terbuka. */
49
- openGroups = signal(new Set(), ...(ngDevMode ? [{ debugName: "openGroups" }] : /* istanbul ignore next */ []));
50
- /** URL aktif terakhir. Update otomatis dari Router `NavigationEnd`. */
51
- activeUrl = signal(this.router.url, ...(ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []));
52
- /** Trail id item yang sedang match dengan URL aktif (across ALL registries). */
53
- activeTrail = computed(() => {
54
- this._version(); // track changes
55
- const url = this.activeUrl();
56
- const trail = new Set();
57
- const walk = (list, ancestors) => {
58
- let matched = false;
59
- for (const item of list) {
60
- const id = item.id;
61
- const link = 'link' in item ? item.link : undefined;
62
- let selfMatch = false;
63
- if (link) {
64
- selfMatch = url === link || url.startsWith(link + '/') || url.startsWith(link + '?');
65
- }
66
- const children = 'children' in item ? (item.children ?? []) : [];
67
- const nextAncestors = id ? [...ancestors, id] : ancestors;
68
- const childMatch = children.length > 0 && walk(children, nextAncestors);
69
- if (selfMatch || childMatch) {
70
- if (id)
71
- trail.add(id);
72
- for (const a of ancestors)
73
- trail.add(a);
74
- matched = true;
75
- }
76
- }
77
- return matched;
78
- };
79
- for (const items of this._registry.values()) {
80
- walk(items, []);
81
- }
82
- return trail;
83
- }, ...(ngDevMode ? [{ debugName: "activeTrail" }] : /* istanbul ignore next */ []));
84
- constructor() {
85
- effect(() => {
86
- if (!this._hasStoredSidebarCollapse()) {
87
- return;
88
- }
89
- this.persistSidebarCollapsed(this._collapsed());
90
- });
91
- this.router.events
92
- .pipe(filter((e) => e instanceof NavigationEnd), takeUntilDestroyed(this.destroyRef))
93
- .subscribe((e) => this.activeUrl.set(e.urlAfterRedirects));
94
- }
95
- registerItems(idOrItems, maybeItems) {
96
- const [id, items] = typeof idOrItems === 'string' ? [idOrItems, maybeItems] : [DEFAULT_NAVIGATION_ID, idOrItems];
97
- this._registry.set(id, items);
98
- this._version.update((v) => v + 1);
99
- }
100
- /** Remove a named registry entry. */
101
- removeItems(id) {
102
- this._registry.delete(id);
103
- this._version.update((v) => v + 1);
104
- }
105
- /**
106
- * Computed yang mengembalikan items untuk key tertentu.
107
- * Reactive terhadap perubahan registry.
108
- */
109
- getItems(id) {
110
- return computed(() => {
111
- this._version(); // track changes
112
- return this._registry.get(id) ?? [];
113
- });
114
- }
115
- setSidebarAppearance(value) {
116
- this.setCollapsed(value === 'thin');
117
- }
118
- toggleSidebarAppearance(currentAppearance = this.sidebarAppearance()) {
119
- this.setCollapsed(currentAppearance !== 'thin');
120
- }
121
- /** Toggle sidebar collapsed (default ↔ thin). */
122
- toggleCollapsed() {
123
- this.setCollapsed(!this._collapsed());
124
- }
125
- setCollapsed(value) {
126
- this._collapsed.set(value);
127
- this._hasStoredSidebarCollapse.set(true);
128
- }
129
- openMobile() {
130
- this.mobileOpen.set(true);
131
- }
132
- closeMobile() {
133
- this.mobileOpen.set(false);
134
- }
135
- toggleMobile() {
136
- this.mobileOpen.update((v) => !v);
137
- }
138
- isGroupOpen(id) {
139
- return this.openGroups().has(id);
140
- }
141
- toggleGroup(id) {
142
- const next = new Set(this.openGroups());
143
- if (next.has(id))
144
- next.delete(id);
145
- else
146
- next.add(id);
147
- this.openGroups.set(next);
148
- }
149
- setGroupOpen(id, open) {
150
- const next = new Set(this.openGroups());
151
- if (open)
152
- next.add(id);
153
- else
154
- next.delete(id);
155
- this.openGroups.set(next);
156
- }
157
- /** Apakah id termasuk dalam active trail saat ini. */
158
- isActive(id) {
159
- return !!id && this.activeTrail().has(id);
160
- }
161
- readPersistedSidebarCollapsed() {
162
- try {
163
- const storage = this.doc.defaultView?.localStorage;
164
- const collapsed = parseSidebarCollapsed(storage?.getItem(SIDEBAR_COLLAPSE_STORAGE_KEY));
165
- if (collapsed !== null) {
166
- return collapsed;
167
- }
168
- const legacyAppearance = storage?.getItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);
169
- if (legacyAppearance === 'thin') {
170
- return true;
171
- }
172
- if (legacyAppearance === 'default') {
173
- return false;
174
- }
175
- return null;
176
- }
177
- catch {
178
- return null;
179
- }
180
- }
181
- persistSidebarCollapsed(value) {
182
- try {
183
- const storage = this.doc.defaultView?.localStorage;
184
- storage?.setItem(SIDEBAR_COLLAPSE_STORAGE_KEY, String(value));
185
- storage?.removeItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);
186
- }
187
- catch {
188
- /* ignore */
189
- }
190
- }
191
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
192
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NavigationService, providedIn: 'root' });
193
- }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NavigationService, decorators: [{
195
- type: Injectable,
196
- args: [{ providedIn: 'root' }]
197
- }], ctorParameters: () => [] });
198
-
199
- /**
200
- * Generated bundle index. Do not edit.
201
- */
202
-
203
- export { DEFAULT_NAVIGATION_ID, NavigationService };
204
- //# sourceMappingURL=ojiepermana-angular-navigation-service.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ojiepermana-angular-navigation-service.mjs","sources":["../../../projects/angular/navigation/service/src/lib/navigation.service.ts","../../../projects/angular/navigation/service/ojiepermana-angular-navigation-service.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Injectable, computed, effect, inject, signal } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs/operators';\nimport { DestroyRef } from '@angular/core';\nimport type { NavigationItem, SidebarAppearance } from '@ojiepermana/angular/navigation/types';\n\n/** Default registry key used when no id is specified. */\nexport const DEFAULT_NAVIGATION_ID = 'main';\nconst SIDEBAR_COLLAPSE_STORAGE_KEY = 'sidebar-collapse';\nconst LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY = 'sidebar-appearance';\n\nfunction parseSidebarCollapsed(value: string | null | undefined): boolean | null {\n if (value === 'true') return true;\n if (value === 'false') return false;\n return null;\n}\n\n/**\n * Signal-based global state untuk navigation (sidebar/topbar).\n *\n * Items disimpan dalam registry ber-key. Key default adalah `'main'`.\n * Komponen `sidebar` / `topbar` memilih registry via input `navigationId`.\n */\n@Injectable({ providedIn: 'root' })\nexport class NavigationService {\n private readonly doc = inject(DOCUMENT);\n private readonly router = inject(Router);\n private readonly destroyRef = inject(DestroyRef);\n private readonly persistedSidebarCollapsed = this.readPersistedSidebarCollapsed();\n\n /** Internal version counter — incremented on every registry mutation. */\n private readonly _version = signal(0);\n\n /** Internal map of registered navigation trees. */\n private readonly _registry = new Map<string, NavigationItem[]>();\n private readonly _collapsed = signal(this.persistedSidebarCollapsed ?? false);\n private readonly _hasStoredSidebarCollapse = signal(this.persistedSidebarCollapsed !== null);\n\n /**\n * Backward-compatible accessor — returns items for the default (`'main'`) key.\n * Prefer `getItems(id)` when working with named registries.\n */\n readonly items = computed(() => this.getItems(DEFAULT_NAVIGATION_ID)());\n\n /** Sidebar appearance preference (`default` or `thin`). */\n readonly sidebarAppearance = computed<SidebarAppearance>(() => (this._collapsed() ? 'thin' : 'default'));\n readonly hasStoredSidebarCollapse = this._hasStoredSidebarCollapse.asReadonly();\n\n /** Sidebar collapsed (default ↔ thin) toggle untuk desktop. */\n readonly collapsed = this._collapsed.asReadonly();\n\n /** Sheet drawer terbuka di mobile. */\n readonly mobileOpen = signal<boolean>(false);\n\n /** Set id grup / collapsable yang sedang terbuka. */\n readonly openGroups = signal<ReadonlySet<string>>(new Set<string>());\n\n /** URL aktif terakhir. Update otomatis dari Router `NavigationEnd`. */\n readonly activeUrl = signal<string>(this.router.url);\n\n /** Trail id item yang sedang match dengan URL aktif (across ALL registries). */\n readonly activeTrail = computed<ReadonlySet<string>>(() => {\n this._version(); // track changes\n const url = this.activeUrl();\n const trail = new Set<string>();\n const walk = (list: readonly NavigationItem[], ancestors: string[]): boolean => {\n let matched = false;\n for (const item of list) {\n const id = item.id;\n const link = 'link' in item ? item.link : undefined;\n let selfMatch = false;\n if (link) {\n selfMatch = url === link || url.startsWith(link + '/') || url.startsWith(link + '?');\n }\n const children = 'children' in item ? (item.children ?? []) : [];\n const nextAncestors = id ? [...ancestors, id] : ancestors;\n const childMatch = children.length > 0 && walk(children, nextAncestors);\n if (selfMatch || childMatch) {\n if (id) trail.add(id);\n for (const a of ancestors) trail.add(a);\n matched = true;\n }\n }\n return matched;\n };\n for (const items of this._registry.values()) {\n walk(items, []);\n }\n return trail;\n });\n\n constructor() {\n effect(() => {\n if (!this._hasStoredSidebarCollapse()) {\n return;\n }\n\n this.persistSidebarCollapsed(this._collapsed());\n });\n\n this.router.events\n .pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((e) => this.activeUrl.set(e.urlAfterRedirects));\n }\n\n /**\n * Register items di registry.\n *\n * Overload:\n * - `registerItems(items)` → key `'main'`\n * - `registerItems(id, items)` → key spesifik\n */\n registerItems(items: NavigationItem[]): void;\n registerItems(id: string, items: NavigationItem[]): void;\n registerItems(idOrItems: string | NavigationItem[], maybeItems?: NavigationItem[]): void {\n const [id, items] = typeof idOrItems === 'string' ? [idOrItems, maybeItems!] : [DEFAULT_NAVIGATION_ID, idOrItems];\n this._registry.set(id, items);\n this._version.update((v) => v + 1);\n }\n\n /** Remove a named registry entry. */\n removeItems(id: string): void {\n this._registry.delete(id);\n this._version.update((v) => v + 1);\n }\n\n /**\n * Computed yang mengembalikan items untuk key tertentu.\n * Reactive terhadap perubahan registry.\n */\n getItems(id: string): () => readonly NavigationItem[] {\n return computed(() => {\n this._version(); // track changes\n return this._registry.get(id) ?? [];\n });\n }\n\n setSidebarAppearance(value: SidebarAppearance): void {\n this.setCollapsed(value === 'thin');\n }\n\n toggleSidebarAppearance(currentAppearance: SidebarAppearance = this.sidebarAppearance()): void {\n this.setCollapsed(currentAppearance !== 'thin');\n }\n\n /** Toggle sidebar collapsed (default ↔ thin). */\n toggleCollapsed(): void {\n this.setCollapsed(!this._collapsed());\n }\n\n setCollapsed(value: boolean): void {\n this._collapsed.set(value);\n this._hasStoredSidebarCollapse.set(true);\n }\n\n openMobile(): void {\n this.mobileOpen.set(true);\n }\n\n closeMobile(): void {\n this.mobileOpen.set(false);\n }\n\n toggleMobile(): void {\n this.mobileOpen.update((v) => !v);\n }\n\n isGroupOpen(id: string): boolean {\n return this.openGroups().has(id);\n }\n\n toggleGroup(id: string): void {\n const next = new Set(this.openGroups());\n if (next.has(id)) next.delete(id);\n else next.add(id);\n this.openGroups.set(next);\n }\n\n setGroupOpen(id: string, open: boolean): void {\n const next = new Set(this.openGroups());\n if (open) next.add(id);\n else next.delete(id);\n this.openGroups.set(next);\n }\n\n /** Apakah id termasuk dalam active trail saat ini. */\n isActive(id: string | undefined): boolean {\n return !!id && this.activeTrail().has(id);\n }\n\n private readPersistedSidebarCollapsed(): boolean | null {\n try {\n const storage = this.doc.defaultView?.localStorage;\n const collapsed = parseSidebarCollapsed(storage?.getItem(SIDEBAR_COLLAPSE_STORAGE_KEY));\n if (collapsed !== null) {\n return collapsed;\n }\n\n const legacyAppearance = storage?.getItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);\n if (legacyAppearance === 'thin') {\n return true;\n }\n if (legacyAppearance === 'default') {\n return false;\n }\n\n return null;\n } catch {\n return null;\n }\n }\n\n private persistSidebarCollapsed(value: boolean): void {\n try {\n const storage = this.doc.defaultView?.localStorage;\n storage?.setItem(SIDEBAR_COLLAPSE_STORAGE_KEY, String(value));\n storage?.removeItem(LEGACY_SIDEBAR_APPEARANCE_STORAGE_KEY);\n } catch {\n /* ignore */\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAQA;AACO,MAAM,qBAAqB,GAAG;AACrC,MAAM,4BAA4B,GAAG,kBAAkB;AACvD,MAAM,qCAAqC,GAAG,oBAAoB;AAElE,SAAS,qBAAqB,CAAC,KAAg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qCAAqC,CAAC;AAChF,YAAA,IAAI,gBAAgB,KAAK,MAAM,EAAE;AAC/B,gBAAA,OAAO,IAAI;YACb;AACA,YAAA,IAAI,gBAAgB,KAAK,SAAS,EAAE;AAClC,gBAAA,OAAO,KAAK;YACd;AAEA,YAAA,OAAO,IAAI;QACb;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,IAAI;QACb;IACF;AAEQ,IAAA,uBAAuB,CAAC,KAAc,EAAA;AAC5C,QAAA,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,YAAY;YAClD,OAAO,EAAE,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7D,YAAA,OAAO,EAAE,UAAU,CAAC,qCAAqC,CAAC;QAC5D;AAAE,QAAA,MAAM;;QAER;IACF;wGAvMW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cADJ,MAAM,EAAA,CAAA;;4FACnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACzBlC;;AAEG;;;;"}
@@ -1,373 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ViewContainerRef, DestroyRef, input, computed, signal, viewChild, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
4
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { BreakpointObserver } from '@angular/cdk/layout';
6
- import { Overlay } from '@angular/cdk/overlay';
7
- import { TemplatePortal } from '@angular/cdk/portal';
8
- import { FocusTrapFactory } from '@angular/cdk/a11y';
9
- import { map, filter } from 'rxjs/operators';
10
- import { UiNavIconComponent } from '@ojiepermana/angular/navigation/icon';
11
- import { UiNavItemComponent } from '@ojiepermana/angular/navigation/item';
12
- import { NavigationService, DEFAULT_NAVIGATION_ID } from '@ojiepermana/angular/navigation/service';
13
- import { ScrollAreaComponent } from '@ojiepermana/angular/component/scroll-area';
14
-
15
- /**
16
- * Vertical navigation (sidebar) — shadcn-styled.
17
- *
18
- * Variants:
19
- * - `default`: 17.5rem, label + icon
20
- * - `thin`: 4rem icon-only; hover memunculkan overlay expand (tidak push konten)
21
- *
22
- * Mobile (`< md`): saat `autoMobile=true` (default), host desktop disembunyikan
23
- * dan konten dirender lewat CDK Overlay drawer dengan focus trap. State buka
24
- * dikontrol lewat `NavigationService.mobileOpen`.
25
- */
26
- class SidebarComponent {
27
- nav = inject(NavigationService);
28
- bp = inject(BreakpointObserver);
29
- overlay = inject(Overlay);
30
- vcr = inject(ViewContainerRef);
31
- focusTrapFactory = inject(FocusTrapFactory);
32
- doc = inject(DOCUMENT);
33
- destroyRef = inject(DestroyRef);
34
- items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
35
- /** Registry key di `NavigationService`. Default `'main'`. */
36
- navigationId = input(DEFAULT_NAVIGATION_ID, ...(ngDevMode ? [{ debugName: "navigationId" }] : /* istanbul ignore next */ []));
37
- appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
38
- /** Desktop border can be owned by the sidebar or by the surrounding layout shell. */
39
- borderSource = input('component', ...(ngDevMode ? [{ debugName: "borderSource" }] : /* istanbul ignore next */ []));
40
- position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
41
- ariaLabel = input('Primary', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
42
- header = input(true, ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
43
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
44
- /** Auto switch ke CDK overlay drawer saat viewport `< md`. */
45
- autoMobile = input(true, ...(ngDevMode ? [{ debugName: "autoMobile" }] : /* istanbul ignore next */ []));
46
- /** Auto-register `items` ke `NavigationService` agar `activeTrail` bekerja. */
47
- autoRegister = input(true, ...(ngDevMode ? [{ debugName: "autoRegister" }] : /* istanbul ignore next */ []));
48
- /** Resolved items: input jika disediakan, fallback ke registry NavigationService. */
49
- resolvedItems = computed(() => {
50
- const explicit = this.items();
51
- return explicit.length > 0 ? explicit : this.nav.getItems(this.navigationId())();
52
- }, ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
53
- hovered = signal(false, ...(ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []));
54
- suppressHoverUntilLeave = signal(false, ...(ngDevMode ? [{ debugName: "suppressHoverUntilLeave" }] : /* istanbul ignore next */ []));
55
- drawerTpl = viewChild.required('drawerTpl');
56
- drawerRef = null;
57
- focusTrap = null;
58
- previouslyFocused = null;
59
- /** True saat viewport `< md` (767.98px). */
60
- isMobileMedia = toSignal(this.bp.observe('(max-width: 767.98px)').pipe(map((s) => s.matches)), {
61
- initialValue: false,
62
- });
63
- isMobile = computed(() => this.autoMobile() && this.isMobileMedia(), ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
64
- resolvedCollapsed = computed(() => {
65
- if (this.nav.hasStoredSidebarCollapse()) {
66
- return this.nav.collapsed();
67
- }
68
- return this.appearance() === 'thin';
69
- }, ...(ngDevMode ? [{ debugName: "resolvedCollapsed" }] : /* istanbul ignore next */ []));
70
- resolvedAppearance = computed(() => {
71
- return this.resolvedCollapsed() ? 'thin' : 'default';
72
- }, ...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
73
- hoverActive = computed(() => this.hovered() && !this.suppressHoverUntilLeave(), ...(ngDevMode ? [{ debugName: "hoverActive" }] : /* istanbul ignore next */ []));
74
- isExpanded = computed(() => !this.resolvedCollapsed() || this.hoverActive(), ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
75
- isCompact = computed(() => !this.isMobile() && this.resolvedCollapsed() && !this.hoverActive(), ...(ngDevMode ? [{ debugName: "isCompact" }] : /* istanbul ignore next */ []));
76
- toggleButtonLabel = computed(() => this.resolvedCollapsed() ? 'Expand sidebar' : 'Collapse sidebar', ...(ngDevMode ? [{ debugName: "toggleButtonLabel" }] : /* istanbul ignore next */ []));
77
- constructor() {
78
- // Auto-register items ke service untuk active trail (hanya jika input non-kosong).
79
- effect(() => {
80
- const explicit = this.items();
81
- if (this.autoRegister() && explicit.length > 0)
82
- this.nav.registerItems(this.navigationId(), explicit);
83
- });
84
- // Kelola overlay drawer berdasarkan mobileOpen + isMobile.
85
- effect(() => {
86
- const open = this.nav.mobileOpen();
87
- const mobile = this.isMobile();
88
- if (mobile && open)
89
- this.openDrawer();
90
- else
91
- this.closeDrawer();
92
- });
93
- this.destroyRef.onDestroy(() => this.closeDrawer());
94
- }
95
- hostClasses = computed(() => {
96
- const base = ['relative flex shrink-0 text-foreground', 'transition-[width] duration-200 ease-out'];
97
- if (this.resolvedCollapsed())
98
- base.push('w-16');
99
- else
100
- base.push('[width:17.5rem]');
101
- if (this.borderSource() === 'component') {
102
- if (this.position() === 'right')
103
- base.push('border-l', 'border-primary/30');
104
- else
105
- base.push('border-r', 'border-primary/30');
106
- }
107
- return [...base, this.class()].join(' ');
108
- }, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
109
- headerClasses = computed(() => {
110
- const base = ['flex items-center gap-1 border-b border-primary/30'];
111
- if (this.isCompact()) {
112
- base.push('h-12', 'justify-center', 'px-2');
113
- }
114
- else {
115
- base.push('h-12', 'pr-2');
116
- }
117
- return base.join(' ');
118
- }, ...(ngDevMode ? [{ debugName: "headerClasses" }] : /* istanbul ignore next */ []));
119
- headerSlotClasses = computed(() => {
120
- const base = ['min-w-0'];
121
- if (this.isCompact()) {
122
- base.push('flex flex-1 items-center justify-center overflow-hidden', '[&>[sidebar-header]>*]:mx-auto', '[&>[sidebar-header]>*]:w-auto', '[&>[sidebar-header]>*]:max-w-full', '[&>[sidebar-header]>*]:justify-center', '[&>[sidebar-header]>*]:gap-0', '[&>[sidebar-header]>*]:px-0', '[&>[sidebar-header]>*]:shrink-0', '[&>[sidebar-header]>*>*:first-child]:mx-auto', '[&>[sidebar-header]>*>*:nth-child(n+2)]:hidden');
123
- }
124
- else {
125
- base.push('flex min-w-0 flex-1 items-center');
126
- }
127
- return base.join(' ');
128
- }, ...(ngDevMode ? [{ debugName: "headerSlotClasses" }] : /* istanbul ignore next */ []));
129
- navClasses = computed(() => {
130
- const base = ['min-h-full'];
131
- if (this.isCompact()) {
132
- base.push('px-2', '[&_.ui-nav-text]:mx-auto', '[&_.ui-nav-text]:w-10', '[&_.ui-nav-text]:justify-center', '[&_.ui-nav-text]:px-0');
133
- }
134
- return base.join(' ');
135
- }, ...(ngDevMode ? [{ debugName: "navClasses" }] : /* istanbul ignore next */ []));
136
- scrollViewportClasses = computed(() => 'overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-primary scrollbar-track-primary/10', ...(ngDevMode ? [{ debugName: "scrollViewportClasses" }] : /* istanbul ignore next */ []));
137
- footerClasses = computed(() => {
138
- const base = ['h-12 border-t border-primary/30'];
139
- if (this.isCompact()) {
140
- base.push('flex items-center justify-center px-2');
141
- }
142
- return base.join(' ');
143
- }, ...(ngDevMode ? [{ debugName: "footerClasses" }] : /* istanbul ignore next */ []));
144
- footerSlotClasses = computed(() => {
145
- const base = ['h-full'];
146
- if (this.isCompact()) {
147
- base.push('flex h-full items-center justify-center overflow-hidden', '[&>[sidebar-footer]>*]:mx-auto', '[&>[sidebar-footer]>*]:w-auto', '[&>[sidebar-footer]>*]:max-w-full', '[&>[sidebar-footer]>*]:justify-center', '[&>[sidebar-footer]>*]:gap-0', '[&>[sidebar-footer]>*]:px-0', '[&>[sidebar-footer]>*>*:first-child]:mx-auto', '[&>[sidebar-footer]>*>*:nth-child(n+2)]:hidden');
148
- }
149
- else {
150
- base.push('w-full');
151
- }
152
- return base.join(' ');
153
- }, ...(ngDevMode ? [{ debugName: "footerSlotClasses" }] : /* istanbul ignore next */ []));
154
- innerClasses = computed(() => {
155
- const overlayActive = this.resolvedCollapsed() && this.hoverActive();
156
- const base = ['flex h-full flex-col transition-[width] duration-200 ease-out'];
157
- if (this.resolvedCollapsed()) {
158
- base.push('bg-background');
159
- }
160
- if (overlayActive) {
161
- base.push('absolute inset-y-0 z-30 border-l border-r border-primary/30 shadow-xl [width:17.5rem]', this.position() === 'right' ? 'right-0' : 'left-0');
162
- }
163
- else {
164
- base.push('w-full');
165
- }
166
- return base.join(' ');
167
- }, ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
168
- onHoverEnter() {
169
- if (!this.resolvedCollapsed() || this.isMobile() || this.suppressHoverUntilLeave())
170
- return;
171
- this.hovered.set(true);
172
- }
173
- onHoverLeave() {
174
- this.suppressHoverUntilLeave.set(false);
175
- if (this.resolvedCollapsed())
176
- this.hovered.set(false);
177
- }
178
- toggleAppearance(event) {
179
- event.stopPropagation();
180
- const nextCollapsed = !this.resolvedCollapsed();
181
- this.nav.setCollapsed(nextCollapsed);
182
- this.hovered.set(false);
183
- this.suppressHoverUntilLeave.set(nextCollapsed);
184
- }
185
- /** Touch fallback: tap pada strip thin (ketika belum expanded) untuk expand. */
186
- onHostClick(event) {
187
- if (!this.resolvedCollapsed() || this.isMobile())
188
- return;
189
- if (this.hovered())
190
- return;
191
- const target = event.target;
192
- // Biarkan klik pada control interaktif terus propagate (tidak intercept).
193
- if (target && target.closest('a,button,[role="menuitem"]'))
194
- return;
195
- this.hovered.set(true);
196
- }
197
- openDrawer() {
198
- if (this.drawerRef)
199
- return;
200
- const side = this.position();
201
- const pos = this.overlay.position().global().top('0');
202
- if (side === 'right')
203
- pos.right('0');
204
- else
205
- pos.left('0');
206
- this.drawerRef = this.overlay.create({
207
- positionStrategy: pos,
208
- height: '100vh',
209
- hasBackdrop: true,
210
- backdropClass: 'cdk-overlay-dark-backdrop',
211
- scrollStrategy: this.overlay.scrollStrategies.block(),
212
- panelClass: ['sidebar-drawer'],
213
- });
214
- const portal = new TemplatePortal(this.drawerTpl(), this.vcr);
215
- const viewRef = this.drawerRef.attach(portal);
216
- viewRef.detectChanges();
217
- const root = this.drawerRef.overlayElement;
218
- this.focusTrap = this.focusTrapFactory.create(root);
219
- this.previouslyFocused = this.doc.activeElement;
220
- queueMicrotask(() => this.focusTrap?.focusInitialElementWhenReady());
221
- this.drawerRef
222
- .backdropClick()
223
- .pipe(takeUntilDestroyed(this.destroyRef))
224
- .subscribe(() => this.nav.closeMobile());
225
- this.drawerRef
226
- .keydownEvents()
227
- .pipe(filter((e) => e.key === 'Escape'), takeUntilDestroyed(this.destroyRef))
228
- .subscribe(() => this.nav.closeMobile());
229
- }
230
- closeDrawer() {
231
- if (!this.drawerRef)
232
- return;
233
- this.focusTrap?.destroy();
234
- this.focusTrap = null;
235
- this.drawerRef.dispose();
236
- this.drawerRef = null;
237
- this.previouslyFocused?.focus?.();
238
- this.previouslyFocused = null;
239
- }
240
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
241
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: SidebarComponent, isStandalone: true, selector: "sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, navigationId: { classPropertyName: "navigationId", publicName: "navigationId", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, borderSource: { classPropertyName: "borderSource", publicName: "borderSource", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autoMobile: { classPropertyName: "autoMobile", publicName: "autoMobile", isSignal: true, isRequired: false, transformFunction: null }, autoRegister: { classPropertyName: "autoRegister", publicName: "autoRegister", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, listeners: { "mouseenter": "onHoverEnter()", "mouseleave": "onHoverLeave()", "focusin": "onHoverEnter()", "click": "onHostClick($event)" }, properties: { "attr.aria-label": "ariaLabel()", "class": "hostClasses()", "attr.data-appearance": "resolvedAppearance()", "attr.data-position": "position()", "attr.data-expanded": "isExpanded()", "hidden": "isMobile()" } }, viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
242
- <div [class]="innerClasses()">
243
- <ng-container [ngTemplateOutlet]="body" />
244
- </div>
245
-
246
- <ng-template #body>
247
- @if (header()) {
248
- <div [class]="headerClasses()">
249
- <div [class]="headerSlotClasses()">
250
- <ng-content select="[sidebar-header]" />
251
- </div>
252
- @if (!isMobile() && !isCompact()) {
253
- <button
254
- type="button"
255
- data-sidebar-toggle
256
- class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
257
- [attr.aria-label]="toggleButtonLabel()"
258
- [attr.title]="toggleButtonLabel()"
259
- [attr.aria-pressed]="resolvedAppearance() === 'thin'"
260
- (click)="toggleAppearance($event)">
261
- <ui-nav-icon name="view_sidebar" [size]="18" class="text-current" />
262
- </button>
263
- }
264
- </div>
265
- }
266
- <ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
267
- <nav [class]="navClasses()">
268
- @for (item of resolvedItems(); track item.id) {
269
- <ui-nav-item [item]="item" [compact]="isCompact()" />
270
- }
271
- </nav>
272
- </ui-scroll-area>
273
- <div [class]="footerClasses()">
274
- <div [class]="footerSlotClasses()">
275
- <ng-content select="[sidebar-footer]" />
276
- </div>
277
- </div>
278
- </ng-template>
279
-
280
- <ng-template #drawerTpl>
281
- <div
282
- role="dialog"
283
- aria-modal="true"
284
- [attr.aria-label]="ariaLabel()"
285
- class="flex h-full w-72 max-w-[85vw] flex-col border-primary/30 text-foreground shadow-xl"
286
- [class.border-r]="position() === 'left'"
287
- [class.border-l]="position() === 'right'"
288
- [class.border-primary/30]="position() === 'left' || position() === 'right'">
289
- <ng-container [ngTemplateOutlet]="body" />
290
- </div>
291
- </ng-template>
292
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "viewportClass", "viewportAriaLabel", "viewportTabIndex"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact", "railConnector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
295
- type: Component,
296
- args: [{
297
- selector: 'sidebar',
298
- changeDetection: ChangeDetectionStrategy.OnPush,
299
- imports: [NgTemplateOutlet, ScrollAreaComponent, UiNavIconComponent, UiNavItemComponent],
300
- host: {
301
- role: 'navigation',
302
- '[attr.aria-label]': 'ariaLabel()',
303
- '[class]': 'hostClasses()',
304
- '[attr.data-appearance]': 'resolvedAppearance()',
305
- '[attr.data-position]': 'position()',
306
- '[attr.data-expanded]': 'isExpanded()',
307
- '[hidden]': 'isMobile()',
308
- '(mouseenter)': 'onHoverEnter()',
309
- '(mouseleave)': 'onHoverLeave()',
310
- '(focusin)': 'onHoverEnter()',
311
- '(click)': 'onHostClick($event)',
312
- },
313
- template: `
314
- <div [class]="innerClasses()">
315
- <ng-container [ngTemplateOutlet]="body" />
316
- </div>
317
-
318
- <ng-template #body>
319
- @if (header()) {
320
- <div [class]="headerClasses()">
321
- <div [class]="headerSlotClasses()">
322
- <ng-content select="[sidebar-header]" />
323
- </div>
324
- @if (!isMobile() && !isCompact()) {
325
- <button
326
- type="button"
327
- data-sidebar-toggle
328
- class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
329
- [attr.aria-label]="toggleButtonLabel()"
330
- [attr.title]="toggleButtonLabel()"
331
- [attr.aria-pressed]="resolvedAppearance() === 'thin'"
332
- (click)="toggleAppearance($event)">
333
- <ui-nav-icon name="view_sidebar" [size]="18" class="text-current" />
334
- </button>
335
- }
336
- </div>
337
- }
338
- <ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
339
- <nav [class]="navClasses()">
340
- @for (item of resolvedItems(); track item.id) {
341
- <ui-nav-item [item]="item" [compact]="isCompact()" />
342
- }
343
- </nav>
344
- </ui-scroll-area>
345
- <div [class]="footerClasses()">
346
- <div [class]="footerSlotClasses()">
347
- <ng-content select="[sidebar-footer]" />
348
- </div>
349
- </div>
350
- </ng-template>
351
-
352
- <ng-template #drawerTpl>
353
- <div
354
- role="dialog"
355
- aria-modal="true"
356
- [attr.aria-label]="ariaLabel()"
357
- class="flex h-full w-72 max-w-[85vw] flex-col border-primary/30 text-foreground shadow-xl"
358
- [class.border-r]="position() === 'left'"
359
- [class.border-l]="position() === 'right'"
360
- [class.border-primary/30]="position() === 'left' || position() === 'right'">
361
- <ng-container [ngTemplateOutlet]="body" />
362
- </div>
363
- </ng-template>
364
- `,
365
- }]
366
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], navigationId: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationId", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], borderSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderSource", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], autoMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoMobile", required: false }] }], autoRegister: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoRegister", required: false }] }], drawerTpl: [{ type: i0.ViewChild, args: ['drawerTpl', { isSignal: true }] }] } });
367
-
368
- /**
369
- * Generated bundle index. Do not edit.
370
- */
371
-
372
- export { SidebarComponent };
373
- //# sourceMappingURL=ojiepermana-angular-navigation-sidebar.mjs.map