@edsis/angular 21.3.3 → 21.3.8

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 (381) hide show
  1. package/README.md +88 -257
  2. package/fesm2022/edsis-angular-module-auth.mjs +1301 -0
  3. package/fesm2022/edsis-angular-module-auth.mjs.map +1 -0
  4. package/fesm2022/edsis-angular.mjs +8 -0
  5. package/fesm2022/edsis-angular.mjs.map +1 -0
  6. package/package.json +13 -368
  7. package/types/edsis-angular-module-auth.d.ts +132 -0
  8. package/types/edsis-angular.d.ts +2 -0
  9. package/.npmignore +0 -2
  10. package/collection.json +0 -30
  11. package/component/accordion/package.json +0 -4
  12. package/component/alert/package.json +0 -4
  13. package/component/alert-dialog/package.json +0 -4
  14. package/component/aspect-ratio/package.json +0 -4
  15. package/component/avatar/package.json +0 -4
  16. package/component/badge/package.json +0 -4
  17. package/component/breadcrumb/package.json +0 -4
  18. package/component/button/package.json +0 -4
  19. package/component/button-group/package.json +0 -4
  20. package/component/calendar/package.json +0 -4
  21. package/component/card/package.json +0 -4
  22. package/component/carousel/package.json +0 -4
  23. package/component/chart/README.md +0 -249
  24. package/component/chart/area/package.json +0 -4
  25. package/component/chart/bar/package.json +0 -4
  26. package/component/chart/line/package.json +0 -4
  27. package/component/chart/package.json +0 -4
  28. package/component/chart/pie/package.json +0 -4
  29. package/component/chart/radar/package.json +0 -4
  30. package/component/chart/radial/package.json +0 -4
  31. package/component/chart/scatter/package.json +0 -4
  32. package/component/checkbox/package.json +0 -4
  33. package/component/collapsible/package.json +0 -4
  34. package/component/combobox/package.json +0 -4
  35. package/component/command/package.json +0 -4
  36. package/component/context-menu/package.json +0 -4
  37. package/component/date-picker/package.json +0 -4
  38. package/component/dialog/package.json +0 -4
  39. package/component/drawer/package.json +0 -4
  40. package/component/dropdown-menu/package.json +0 -4
  41. package/component/form/package.json +0 -4
  42. package/component/input/package.json +0 -4
  43. package/component/input-group/package.json +0 -4
  44. package/component/item/package.json +0 -4
  45. package/component/label/package.json +0 -4
  46. package/component/pagination/package.json +0 -4
  47. package/component/popover/package.json +0 -4
  48. package/component/progress/package.json +0 -4
  49. package/component/radio/package.json +0 -4
  50. package/component/scroll-area/package.json +0 -4
  51. package/component/select/package.json +0 -4
  52. package/component/separator/package.json +0 -4
  53. package/component/sheet/package.json +0 -4
  54. package/component/skeleton/package.json +0 -4
  55. package/component/slider/package.json +0 -4
  56. package/component/switch/package.json +0 -4
  57. package/component/table/package.json +0 -4
  58. package/component/tabs/package.json +0 -4
  59. package/component/textarea/package.json +0 -4
  60. package/component/toast/package.json +0 -4
  61. package/component/tooltip/package.json +0 -4
  62. package/component/utils/package.json +0 -4
  63. package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -174
  64. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
  65. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -242
  66. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
  67. package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -90
  68. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
  69. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -33
  70. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
  71. package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -123
  72. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
  73. package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -47
  74. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
  75. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -186
  76. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
  77. package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -95
  78. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
  79. package/fesm2022/ojiepermana-angular-component-button.mjs +0 -64
  80. package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
  81. package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -78
  82. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
  83. package/fesm2022/ojiepermana-angular-component-card.mjs +0 -137
  84. package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
  85. package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -310
  86. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
  87. package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
  88. package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
  89. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
  90. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
  91. package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
  92. package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
  93. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
  94. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
  95. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
  96. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
  97. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
  98. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
  99. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
  100. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
  101. package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3714
  102. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
  103. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -104
  104. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
  105. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -116
  106. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
  107. package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -263
  108. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
  109. package/fesm2022/ojiepermana-angular-component-command.mjs +0 -268
  110. package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
  111. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -100
  112. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
  113. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -155
  114. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
  115. package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -262
  116. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
  117. package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
  118. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
  119. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -458
  120. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
  121. package/fesm2022/ojiepermana-angular-component-form.mjs +0 -208
  122. package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
  123. package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -164
  124. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
  125. package/fesm2022/ojiepermana-angular-component-input.mjs +0 -43
  126. package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
  127. package/fesm2022/ojiepermana-angular-component-item.mjs +0 -241
  128. package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
  129. package/fesm2022/ojiepermana-angular-component-label.mjs +0 -30
  130. package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
  131. package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -192
  132. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
  133. package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -163
  134. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
  135. package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -53
  136. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
  137. package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -92
  138. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
  139. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -48
  140. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
  141. package/fesm2022/ojiepermana-angular-component-select.mjs +0 -131
  142. package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
  143. package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -33
  144. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
  145. package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -235
  146. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
  147. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -29
  148. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
  149. package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -29
  150. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
  151. package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -84
  152. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
  153. package/fesm2022/ojiepermana-angular-component-table.mjs +0 -139
  154. package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
  155. package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -252
  156. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
  157. package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -37
  158. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
  159. package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -47
  160. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
  161. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -56
  162. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
  163. package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
  164. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
  165. package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
  166. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
  167. package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -581
  168. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
  169. package/fesm2022/ojiepermana-angular-layout-empty.mjs +0 -49
  170. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
  171. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs +0 -119
  172. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
  173. package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
  174. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
  175. package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -114
  176. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
  177. package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
  178. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
  179. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -27
  180. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
  181. package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
  182. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
  183. package/fesm2022/ojiepermana-angular-layout-vertical.mjs +0 -113
  184. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
  185. package/fesm2022/ojiepermana-angular-layout.mjs +0 -461
  186. package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
  187. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
  188. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
  189. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -59
  190. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
  191. package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -548
  192. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
  193. package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -204
  194. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
  195. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -373
  196. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
  197. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -433
  198. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
  199. package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
  200. package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
  201. package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
  202. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
  203. package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -286
  204. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
  205. package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
  206. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
  207. package/fesm2022/ojiepermana-angular-theme.mjs +0 -382
  208. package/fesm2022/ojiepermana-angular-theme.mjs.map +0 -1
  209. package/fesm2022/ojiepermana-angular.mjs +0 -22
  210. package/fesm2022/ojiepermana-angular.mjs.map +0 -1
  211. package/generator/api/README.md +0 -249
  212. package/generator/api/bin/package.json +0 -3
  213. package/generator/api/bin/schematics/init/index.js +0 -90
  214. package/generator/api/bin/schematics/ng-add/index.js +0 -131
  215. package/generator/api/bin/schematics/sdk/index.js +0 -76
  216. package/generator/api/bin/src/config/loader.js +0 -41
  217. package/generator/api/bin/src/config/schema.js +0 -57
  218. package/generator/api/bin/src/emit/client.js +0 -246
  219. package/generator/api/bin/src/emit/metadata.js +0 -295
  220. package/generator/api/bin/src/emit/models.js +0 -106
  221. package/generator/api/bin/src/emit/navigation.js +0 -56
  222. package/generator/api/bin/src/emit/operations.js +0 -122
  223. package/generator/api/bin/src/emit/public-api.js +0 -54
  224. package/generator/api/bin/src/emit/services.js +0 -87
  225. package/generator/api/bin/src/engine.js +0 -65
  226. package/generator/api/bin/src/layout/per-domain.js +0 -359
  227. package/generator/api/bin/src/parser/bundle.js +0 -25
  228. package/generator/api/bin/src/parser/ir.js +0 -320
  229. package/generator/api/bin/src/parser/types.js +0 -7
  230. package/generator/api/bin/src/render/template.js +0 -58
  231. package/generator/api/bin/src/writer/index.js +0 -236
  232. package/generator/api/package.json +0 -4
  233. package/generator/api/schematics/init/schema.json +0 -19
  234. package/generator/api/schematics/ng-add/schema.json +0 -14
  235. package/generator/api/schematics/sdk/schema.json +0 -19
  236. package/generator/api/sdk.config.example.json +0 -24
  237. package/generator/guide/README.md +0 -84
  238. package/generator/guide/bin/package.json +0 -3
  239. package/generator/guide/bin/schematics/build/index.js +0 -35
  240. package/generator/guide/bin/schematics/init/index.js +0 -70
  241. package/generator/guide/bin/src/config/loader.js +0 -50
  242. package/generator/guide/bin/src/config/schema.js +0 -12
  243. package/generator/guide/bin/src/engine/component.js +0 -74
  244. package/generator/guide/bin/src/engine/frontmatter.js +0 -42
  245. package/generator/guide/bin/src/engine/index.js +0 -42
  246. package/generator/guide/bin/src/engine/naming.js +0 -39
  247. package/generator/guide/bin/src/engine/render.js +0 -31
  248. package/generator/guide/bin/src/engine/routes.js +0 -106
  249. package/generator/guide/bin/src/engine/walk.js +0 -35
  250. package/generator/guide/guide.config.example.json +0 -9
  251. package/generator/guide/schematics/build/schema.json +0 -14
  252. package/generator/guide/schematics/init/schema.json +0 -19
  253. package/layout/component/package.json +0 -4
  254. package/layout/empty/package.json +0 -4
  255. package/layout/horizontal/package.json +0 -4
  256. package/layout/package.json +0 -4
  257. package/layout/provider/package.json +0 -4
  258. package/layout/services/package.json +0 -4
  259. package/layout/shell/package.json +0 -4
  260. package/layout/token/directive/package.json +0 -4
  261. package/layout/token/package.json +0 -4
  262. package/layout/vertical/package.json +0 -4
  263. package/navigation/demo-data/package.json +0 -4
  264. package/navigation/icon/package.json +0 -4
  265. package/navigation/item/package.json +0 -4
  266. package/navigation/service/package.json +0 -4
  267. package/navigation/sidebar/package.json +0 -4
  268. package/navigation/topbar/package.json +0 -4
  269. package/navigation/types/package.json +0 -4
  270. package/theme/README.md +0 -67
  271. package/theme/package.json +0 -4
  272. package/theme/provider/package.json +0 -4
  273. package/theme/services/package.json +0 -4
  274. package/theme/styles/foundation/components.css +0 -81
  275. package/theme/styles/foundation/layers.css +0 -15
  276. package/theme/styles/foundation/tokens.css +0 -55
  277. package/theme/styles/index.css +0 -37
  278. package/theme/styles/integrations/material.css +0 -254
  279. package/theme/styles/integrations/tailwind.css +0 -114
  280. package/theme/styles/variants/color/amber.css +0 -31
  281. package/theme/styles/variants/color/base.css +0 -36
  282. package/theme/styles/variants/color/blue.css +0 -31
  283. package/theme/styles/variants/color/cyan.css +0 -31
  284. package/theme/styles/variants/color/emerald.css +0 -31
  285. package/theme/styles/variants/color/fuchsia.css +0 -31
  286. package/theme/styles/variants/color/green.css +0 -31
  287. package/theme/styles/variants/color/index.css +0 -22
  288. package/theme/styles/variants/color/indigo.css +0 -31
  289. package/theme/styles/variants/color/lime.css +0 -31
  290. package/theme/styles/variants/color/orange.css +0 -31
  291. package/theme/styles/variants/color/pink.css +0 -31
  292. package/theme/styles/variants/color/purple.css +0 -31
  293. package/theme/styles/variants/color/red.css +0 -31
  294. package/theme/styles/variants/color/rose.css +0 -31
  295. package/theme/styles/variants/color/sky.css +0 -31
  296. package/theme/styles/variants/color/teal.css +0 -31
  297. package/theme/styles/variants/color/violet.css +0 -31
  298. package/theme/styles/variants/color/yellow.css +0 -31
  299. package/theme/styles/variants/mode/dark.css +0 -20
  300. package/theme/styles/variants/mode/index.css +0 -6
  301. package/theme/styles/variants/mode/light.css +0 -24
  302. package/theme/styles/variants/style/brutal.css +0 -50
  303. package/theme/styles/variants/style/default.css +0 -54
  304. package/theme/styles/variants/style/index.css +0 -8
  305. package/theme/styles/variants/style/sharp.css +0 -50
  306. package/theme/styles/variants/style/soft.css +0 -50
  307. package/theme/token/package.json +0 -4
  308. package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
  309. package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
  310. package/types/ojiepermana-angular-component-alert.d.ts +0 -37
  311. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
  312. package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
  313. package/types/ojiepermana-angular-component-badge.d.ts +0 -19
  314. package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
  315. package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
  316. package/types/ojiepermana-angular-component-button.d.ts +0 -22
  317. package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
  318. package/types/ojiepermana-angular-component-card.d.ts +0 -60
  319. package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
  320. package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
  321. package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
  322. package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
  323. package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
  324. package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
  325. package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
  326. package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
  327. package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
  328. package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
  329. package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
  330. package/types/ojiepermana-angular-component-combobox.d.ts +0 -51
  331. package/types/ojiepermana-angular-component-command.d.ts +0 -99
  332. package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
  333. package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
  334. package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
  335. package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
  336. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -135
  337. package/types/ojiepermana-angular-component-form.d.ts +0 -92
  338. package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
  339. package/types/ojiepermana-angular-component-input.d.ts +0 -16
  340. package/types/ojiepermana-angular-component-item.d.ts +0 -88
  341. package/types/ojiepermana-angular-component-label.d.ts +0 -11
  342. package/types/ojiepermana-angular-component-pagination.d.ts +0 -27
  343. package/types/ojiepermana-angular-component-popover.d.ts +0 -43
  344. package/types/ojiepermana-angular-component-progress.d.ts +0 -17
  345. package/types/ojiepermana-angular-component-radio.d.ts +0 -34
  346. package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
  347. package/types/ojiepermana-angular-component-select.d.ts +0 -45
  348. package/types/ojiepermana-angular-component-separator.d.ts +0 -14
  349. package/types/ojiepermana-angular-component-sheet.d.ts +0 -74
  350. package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
  351. package/types/ojiepermana-angular-component-slider.d.ts +0 -16
  352. package/types/ojiepermana-angular-component-switch.d.ts +0 -30
  353. package/types/ojiepermana-angular-component-table.d.ts +0 -52
  354. package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
  355. package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
  356. package/types/ojiepermana-angular-component-toast.d.ts +0 -29
  357. package/types/ojiepermana-angular-component-tooltip.d.ts +0 -22
  358. package/types/ojiepermana-angular-component-utils.d.ts +0 -5
  359. package/types/ojiepermana-angular-generator-api.d.ts +0 -86
  360. package/types/ojiepermana-angular-layout-component.d.ts +0 -205
  361. package/types/ojiepermana-angular-layout-empty.d.ts +0 -22
  362. package/types/ojiepermana-angular-layout-horizontal.d.ts +0 -36
  363. package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
  364. package/types/ojiepermana-angular-layout-services.d.ts +0 -25
  365. package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
  366. package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
  367. package/types/ojiepermana-angular-layout-token.d.ts +0 -36
  368. package/types/ojiepermana-angular-layout-vertical.d.ts +0 -38
  369. package/types/ojiepermana-angular-layout.d.ts +0 -164
  370. package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
  371. package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
  372. package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
  373. package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
  374. package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
  375. package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -54
  376. package/types/ojiepermana-angular-navigation-types.d.ts +0 -129
  377. package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
  378. package/types/ojiepermana-angular-theme-services.d.ts +0 -55
  379. package/types/ojiepermana-angular-theme-token.d.ts +0 -57
  380. package/types/ojiepermana-angular-theme.d.ts +0 -116
  381. package/types/ojiepermana-angular.d.ts +0 -3
@@ -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 '@edsis/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,KAAgC,EAAA;IAC7D,IAAI,KAAK,KAAK,MAAM;AAAE,QAAA,OAAO,IAAI;IACjC,IAAI,KAAK,KAAK,OAAO;AAAE,QAAA,OAAO,KAAK;AACnC,IAAA,OAAO,IAAI;AACb;AAEA;;;;;AAKG;MAEU,iBAAiB,CAAA;AACX,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,MAAM,GAAG,MAAM,CAAC,MA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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 '@edsis/angular/navigation/icon';
11
- import { UiNavItemComponent } from '@edsis/angular/navigation/item';
12
- import { NavigationService, DEFAULT_NAVIGATION_ID } from '@edsis/angular/navigation/service';
13
- import { ScrollAreaComponent } from '@edsis/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