@edsis/angular 21.3.4 → 21.3.9

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 (384) hide show
  1. package/README.md +88 -257
  2. package/fesm2022/edsis-angular-block-shell.mjs +560 -0
  3. package/fesm2022/edsis-angular-block-shell.mjs.map +1 -0
  4. package/fesm2022/edsis-angular-module-auth.mjs +1301 -0
  5. package/fesm2022/edsis-angular-module-auth.mjs.map +1 -0
  6. package/fesm2022/edsis-angular.mjs +8 -0
  7. package/fesm2022/edsis-angular.mjs.map +1 -0
  8. package/package.json +16 -367
  9. package/types/edsis-angular-block-shell.d.ts +96 -0
  10. package/types/edsis-angular-module-auth.d.ts +132 -0
  11. package/types/edsis-angular.d.ts +2 -0
  12. package/.npmignore +0 -2
  13. package/collection.json +0 -30
  14. package/component/accordion/package.json +0 -4
  15. package/component/alert/package.json +0 -4
  16. package/component/alert-dialog/package.json +0 -4
  17. package/component/aspect-ratio/package.json +0 -4
  18. package/component/avatar/package.json +0 -4
  19. package/component/badge/package.json +0 -4
  20. package/component/breadcrumb/package.json +0 -4
  21. package/component/button/package.json +0 -4
  22. package/component/button-group/package.json +0 -4
  23. package/component/calendar/package.json +0 -4
  24. package/component/card/package.json +0 -4
  25. package/component/carousel/package.json +0 -4
  26. package/component/chart/README.md +0 -249
  27. package/component/chart/area/package.json +0 -4
  28. package/component/chart/bar/package.json +0 -4
  29. package/component/chart/line/package.json +0 -4
  30. package/component/chart/package.json +0 -4
  31. package/component/chart/pie/package.json +0 -4
  32. package/component/chart/radar/package.json +0 -4
  33. package/component/chart/radial/package.json +0 -4
  34. package/component/chart/scatter/package.json +0 -4
  35. package/component/checkbox/package.json +0 -4
  36. package/component/collapsible/package.json +0 -4
  37. package/component/combobox/package.json +0 -4
  38. package/component/command/package.json +0 -4
  39. package/component/context-menu/package.json +0 -4
  40. package/component/date-picker/package.json +0 -4
  41. package/component/dialog/package.json +0 -4
  42. package/component/drawer/package.json +0 -4
  43. package/component/dropdown-menu/package.json +0 -4
  44. package/component/form/package.json +0 -4
  45. package/component/input/package.json +0 -4
  46. package/component/input-group/package.json +0 -4
  47. package/component/item/package.json +0 -4
  48. package/component/label/package.json +0 -4
  49. package/component/pagination/package.json +0 -4
  50. package/component/popover/package.json +0 -4
  51. package/component/progress/package.json +0 -4
  52. package/component/radio/package.json +0 -4
  53. package/component/scroll-area/package.json +0 -4
  54. package/component/select/package.json +0 -4
  55. package/component/separator/package.json +0 -4
  56. package/component/sheet/package.json +0 -4
  57. package/component/skeleton/package.json +0 -4
  58. package/component/slider/package.json +0 -4
  59. package/component/switch/package.json +0 -4
  60. package/component/table/package.json +0 -4
  61. package/component/tabs/package.json +0 -4
  62. package/component/textarea/package.json +0 -4
  63. package/component/toast/package.json +0 -4
  64. package/component/tooltip/package.json +0 -4
  65. package/component/utils/package.json +0 -4
  66. package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -174
  67. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
  68. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -242
  69. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
  70. package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -90
  71. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
  72. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -33
  73. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
  74. package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -123
  75. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
  76. package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -47
  77. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
  78. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -186
  79. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
  80. package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -95
  81. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
  82. package/fesm2022/ojiepermana-angular-component-button.mjs +0 -64
  83. package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
  84. package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -78
  85. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
  86. package/fesm2022/ojiepermana-angular-component-card.mjs +0 -137
  87. package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
  88. package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -310
  89. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
  90. package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
  91. package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
  92. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
  93. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
  94. package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
  95. package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
  96. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
  97. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
  98. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
  99. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
  100. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
  101. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
  102. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
  103. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
  104. package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3714
  105. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
  106. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -104
  107. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
  108. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -116
  109. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
  110. package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -263
  111. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
  112. package/fesm2022/ojiepermana-angular-component-command.mjs +0 -268
  113. package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
  114. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -100
  115. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
  116. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -155
  117. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
  118. package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -262
  119. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
  120. package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
  121. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
  122. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -458
  123. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
  124. package/fesm2022/ojiepermana-angular-component-form.mjs +0 -208
  125. package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
  126. package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -164
  127. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
  128. package/fesm2022/ojiepermana-angular-component-input.mjs +0 -43
  129. package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
  130. package/fesm2022/ojiepermana-angular-component-item.mjs +0 -241
  131. package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
  132. package/fesm2022/ojiepermana-angular-component-label.mjs +0 -30
  133. package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
  134. package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -192
  135. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
  136. package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -163
  137. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
  138. package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -53
  139. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
  140. package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -92
  141. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
  142. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -48
  143. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
  144. package/fesm2022/ojiepermana-angular-component-select.mjs +0 -131
  145. package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
  146. package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -33
  147. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
  148. package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -235
  149. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
  150. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -29
  151. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
  152. package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -29
  153. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
  154. package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -84
  155. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
  156. package/fesm2022/ojiepermana-angular-component-table.mjs +0 -139
  157. package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
  158. package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -252
  159. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
  160. package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -37
  161. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
  162. package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -47
  163. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
  164. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -56
  165. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
  166. package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
  167. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
  168. package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
  169. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
  170. package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -581
  171. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
  172. package/fesm2022/ojiepermana-angular-layout-empty.mjs +0 -49
  173. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
  174. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs +0 -119
  175. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
  176. package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
  177. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
  178. package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -114
  179. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
  180. package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
  181. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
  182. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -27
  183. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
  184. package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
  185. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
  186. package/fesm2022/ojiepermana-angular-layout-vertical.mjs +0 -113
  187. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
  188. package/fesm2022/ojiepermana-angular-layout.mjs +0 -461
  189. package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
  190. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
  191. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
  192. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -59
  193. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
  194. package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -548
  195. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
  196. package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -204
  197. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
  198. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -373
  199. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
  200. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -433
  201. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
  202. package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
  203. package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
  204. package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
  205. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
  206. package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -286
  207. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
  208. package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
  209. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
  210. package/fesm2022/ojiepermana-angular-theme.mjs +0 -382
  211. package/fesm2022/ojiepermana-angular-theme.mjs.map +0 -1
  212. package/fesm2022/ojiepermana-angular.mjs +0 -22
  213. package/fesm2022/ojiepermana-angular.mjs.map +0 -1
  214. package/generator/api/README.md +0 -252
  215. package/generator/api/bin/package.json +0 -3
  216. package/generator/api/bin/schematics/init/index.js +0 -90
  217. package/generator/api/bin/schematics/ng-add/index.js +0 -131
  218. package/generator/api/bin/schematics/sdk/index.js +0 -76
  219. package/generator/api/bin/src/config/loader.js +0 -41
  220. package/generator/api/bin/src/config/schema.js +0 -57
  221. package/generator/api/bin/src/emit/client.js +0 -246
  222. package/generator/api/bin/src/emit/metadata.js +0 -295
  223. package/generator/api/bin/src/emit/models.js +0 -106
  224. package/generator/api/bin/src/emit/navigation.js +0 -56
  225. package/generator/api/bin/src/emit/operations.js +0 -122
  226. package/generator/api/bin/src/emit/public-api.js +0 -54
  227. package/generator/api/bin/src/emit/services.js +0 -87
  228. package/generator/api/bin/src/engine.js +0 -65
  229. package/generator/api/bin/src/layout/per-domain.js +0 -359
  230. package/generator/api/bin/src/parser/bundle.js +0 -25
  231. package/generator/api/bin/src/parser/ir.js +0 -320
  232. package/generator/api/bin/src/parser/types.js +0 -7
  233. package/generator/api/bin/src/render/template.js +0 -58
  234. package/generator/api/bin/src/writer/index.js +0 -278
  235. package/generator/api/package.json +0 -4
  236. package/generator/api/schematics/init/schema.json +0 -19
  237. package/generator/api/schematics/ng-add/schema.json +0 -14
  238. package/generator/api/schematics/sdk/schema.json +0 -19
  239. package/generator/api/sdk.config.example.json +0 -24
  240. package/generator/guide/README.md +0 -84
  241. package/generator/guide/bin/package.json +0 -3
  242. package/generator/guide/bin/schematics/build/index.js +0 -35
  243. package/generator/guide/bin/schematics/init/index.js +0 -70
  244. package/generator/guide/bin/src/config/loader.js +0 -50
  245. package/generator/guide/bin/src/config/schema.js +0 -12
  246. package/generator/guide/bin/src/engine/component.js +0 -74
  247. package/generator/guide/bin/src/engine/frontmatter.js +0 -42
  248. package/generator/guide/bin/src/engine/index.js +0 -42
  249. package/generator/guide/bin/src/engine/naming.js +0 -39
  250. package/generator/guide/bin/src/engine/render.js +0 -31
  251. package/generator/guide/bin/src/engine/routes.js +0 -106
  252. package/generator/guide/bin/src/engine/walk.js +0 -35
  253. package/generator/guide/guide.config.example.json +0 -9
  254. package/generator/guide/schematics/build/schema.json +0 -14
  255. package/generator/guide/schematics/init/schema.json +0 -19
  256. package/layout/component/package.json +0 -4
  257. package/layout/empty/package.json +0 -4
  258. package/layout/horizontal/package.json +0 -4
  259. package/layout/package.json +0 -4
  260. package/layout/provider/package.json +0 -4
  261. package/layout/services/package.json +0 -4
  262. package/layout/shell/package.json +0 -4
  263. package/layout/token/directive/package.json +0 -4
  264. package/layout/token/package.json +0 -4
  265. package/layout/vertical/package.json +0 -4
  266. package/navigation/demo-data/package.json +0 -4
  267. package/navigation/icon/package.json +0 -4
  268. package/navigation/item/package.json +0 -4
  269. package/navigation/service/package.json +0 -4
  270. package/navigation/sidebar/package.json +0 -4
  271. package/navigation/topbar/package.json +0 -4
  272. package/navigation/types/package.json +0 -4
  273. package/theme/README.md +0 -67
  274. package/theme/package.json +0 -4
  275. package/theme/provider/package.json +0 -4
  276. package/theme/services/package.json +0 -4
  277. package/theme/styles/foundation/components.css +0 -81
  278. package/theme/styles/foundation/layers.css +0 -15
  279. package/theme/styles/foundation/tokens.css +0 -55
  280. package/theme/styles/index.css +0 -37
  281. package/theme/styles/integrations/material.css +0 -254
  282. package/theme/styles/integrations/tailwind.css +0 -114
  283. package/theme/styles/variants/color/amber.css +0 -31
  284. package/theme/styles/variants/color/base.css +0 -36
  285. package/theme/styles/variants/color/blue.css +0 -31
  286. package/theme/styles/variants/color/cyan.css +0 -31
  287. package/theme/styles/variants/color/emerald.css +0 -31
  288. package/theme/styles/variants/color/fuchsia.css +0 -31
  289. package/theme/styles/variants/color/green.css +0 -31
  290. package/theme/styles/variants/color/index.css +0 -22
  291. package/theme/styles/variants/color/indigo.css +0 -31
  292. package/theme/styles/variants/color/lime.css +0 -31
  293. package/theme/styles/variants/color/orange.css +0 -31
  294. package/theme/styles/variants/color/pink.css +0 -31
  295. package/theme/styles/variants/color/purple.css +0 -31
  296. package/theme/styles/variants/color/red.css +0 -31
  297. package/theme/styles/variants/color/rose.css +0 -31
  298. package/theme/styles/variants/color/sky.css +0 -31
  299. package/theme/styles/variants/color/teal.css +0 -31
  300. package/theme/styles/variants/color/violet.css +0 -31
  301. package/theme/styles/variants/color/yellow.css +0 -31
  302. package/theme/styles/variants/mode/dark.css +0 -20
  303. package/theme/styles/variants/mode/index.css +0 -6
  304. package/theme/styles/variants/mode/light.css +0 -24
  305. package/theme/styles/variants/style/brutal.css +0 -50
  306. package/theme/styles/variants/style/default.css +0 -54
  307. package/theme/styles/variants/style/index.css +0 -8
  308. package/theme/styles/variants/style/sharp.css +0 -50
  309. package/theme/styles/variants/style/soft.css +0 -50
  310. package/theme/token/package.json +0 -4
  311. package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
  312. package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
  313. package/types/ojiepermana-angular-component-alert.d.ts +0 -37
  314. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
  315. package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
  316. package/types/ojiepermana-angular-component-badge.d.ts +0 -19
  317. package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
  318. package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
  319. package/types/ojiepermana-angular-component-button.d.ts +0 -22
  320. package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
  321. package/types/ojiepermana-angular-component-card.d.ts +0 -60
  322. package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
  323. package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
  324. package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
  325. package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
  326. package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
  327. package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
  328. package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
  329. package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
  330. package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
  331. package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
  332. package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
  333. package/types/ojiepermana-angular-component-combobox.d.ts +0 -51
  334. package/types/ojiepermana-angular-component-command.d.ts +0 -99
  335. package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
  336. package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
  337. package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
  338. package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
  339. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -135
  340. package/types/ojiepermana-angular-component-form.d.ts +0 -92
  341. package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
  342. package/types/ojiepermana-angular-component-input.d.ts +0 -16
  343. package/types/ojiepermana-angular-component-item.d.ts +0 -88
  344. package/types/ojiepermana-angular-component-label.d.ts +0 -11
  345. package/types/ojiepermana-angular-component-pagination.d.ts +0 -27
  346. package/types/ojiepermana-angular-component-popover.d.ts +0 -43
  347. package/types/ojiepermana-angular-component-progress.d.ts +0 -17
  348. package/types/ojiepermana-angular-component-radio.d.ts +0 -34
  349. package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
  350. package/types/ojiepermana-angular-component-select.d.ts +0 -45
  351. package/types/ojiepermana-angular-component-separator.d.ts +0 -14
  352. package/types/ojiepermana-angular-component-sheet.d.ts +0 -74
  353. package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
  354. package/types/ojiepermana-angular-component-slider.d.ts +0 -16
  355. package/types/ojiepermana-angular-component-switch.d.ts +0 -30
  356. package/types/ojiepermana-angular-component-table.d.ts +0 -52
  357. package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
  358. package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
  359. package/types/ojiepermana-angular-component-toast.d.ts +0 -29
  360. package/types/ojiepermana-angular-component-tooltip.d.ts +0 -22
  361. package/types/ojiepermana-angular-component-utils.d.ts +0 -5
  362. package/types/ojiepermana-angular-generator-api.d.ts +0 -86
  363. package/types/ojiepermana-angular-layout-component.d.ts +0 -205
  364. package/types/ojiepermana-angular-layout-empty.d.ts +0 -22
  365. package/types/ojiepermana-angular-layout-horizontal.d.ts +0 -36
  366. package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
  367. package/types/ojiepermana-angular-layout-services.d.ts +0 -25
  368. package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
  369. package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
  370. package/types/ojiepermana-angular-layout-token.d.ts +0 -36
  371. package/types/ojiepermana-angular-layout-vertical.d.ts +0 -38
  372. package/types/ojiepermana-angular-layout.d.ts +0 -164
  373. package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
  374. package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
  375. package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
  376. package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
  377. package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
  378. package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -54
  379. package/types/ojiepermana-angular-navigation-types.d.ts +0 -129
  380. package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
  381. package/types/ojiepermana-angular-theme-services.d.ts +0 -55
  382. package/types/ojiepermana-angular-theme-token.d.ts +0 -57
  383. package/types/ojiepermana-angular-theme.d.ts +0 -116
  384. package/types/ojiepermana-angular.d.ts +0 -3
@@ -0,0 +1,1301 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, makeEnvironmentProviders, ChangeDetectionStrategy, Component, DestroyRef, signal, computed, input, effect } from '@angular/core';
3
+ import { HttpContextToken, HttpErrorResponse, provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
4
+ import { ApiConfiguration, provideApiConfiguration } from '@edsis/sdk/shared';
5
+ import { DOCUMENT, Location } from '@angular/common';
6
+ import { AuthService } from '@edsis/sdk/auth';
7
+ import { firstValueFrom, throwError, from, startWith, finalize } from 'rxjs';
8
+ import { switchMap, catchError } from 'rxjs/operators';
9
+ import { Router, RouterOutlet, RouterLink, ActivatedRoute } from '@angular/router';
10
+ import { UiLayoutComponent, UiLayoutFluidComponent } from '@edsis/ui/layout';
11
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
+ import * as i1 from '@angular/forms';
13
+ import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
14
+ import { AspectRatioComponent } from '@edsis/ui/aspect-ratio';
15
+ import { ButtonComponent } from '@edsis/ui/button';
16
+ import { CardActionComponent, CardComponent, CardContentComponent, CardDescriptionComponent, CardHeaderComponent, CardTitleComponent, CardFooterComponent } from '@edsis/ui/card';
17
+ import { InputGroupAddonComponent, InputGroupButtonComponent, InputGroupComponent, InputGroupInputComponent } from '@edsis/ui/input-group';
18
+ import { LabelComponent } from '@edsis/ui/label';
19
+ import { SeparatorComponent } from '@edsis/ui/separator';
20
+ import { AlertComponent, AlertDescriptionComponent } from '@edsis/ui/alert';
21
+ import { SpinnerComponent } from '@edsis/ui/spinner';
22
+
23
+ const DEFAULT_LOGIN_PATH = '/login';
24
+ const DEFAULT_LOGOUT_PATH = '/logout';
25
+ const DEFAULT_VERIFY_PATH = '/verify';
26
+ const DEFAULT_AUTHENTICATED_HOME_PATH = '/dashboard';
27
+ const EDSIS_AUTH_CONFIG = new InjectionToken('EDSIS_AUTH_CONFIG');
28
+ function resolveEdsisAuthConfig(config) {
29
+ const loginPath = normalizePath(config.loginPath, DEFAULT_LOGIN_PATH);
30
+ return {
31
+ apiUrl: normalizeAbsoluteUrl(config.apiUrl, 'apiUrl'),
32
+ appUrl: normalizeAbsoluteUrl(config.appUrl, 'appUrl'),
33
+ loginPath,
34
+ logoutPath: normalizePath(config.logoutPath, DEFAULT_LOGOUT_PATH),
35
+ verifyPath: normalizePath(config.verifyPath, DEFAULT_VERIFY_PATH),
36
+ authenticatedHomePath: normalizePath(config.authenticatedHomePath, DEFAULT_AUTHENTICATED_HOME_PATH),
37
+ guestHomePath: normalizePath(config.guestHomePath, loginPath),
38
+ };
39
+ }
40
+ function normalizeAbsoluteUrl(value, label) {
41
+ const normalizedValue = value.trim();
42
+ if (!normalizedValue) {
43
+ throw new Error(`Edsis auth requires a non-empty ${label}.`);
44
+ }
45
+ const normalizedUrl = new URL(normalizedValue);
46
+ return normalizedUrl.toString().replace(/\/$/, '');
47
+ }
48
+ function normalizePath(value, fallback) {
49
+ const normalizedValue = value?.trim();
50
+ if (!normalizedValue) {
51
+ return fallback;
52
+ }
53
+ return (normalizedValue.startsWith('/') ? normalizedValue : `/${normalizedValue}`);
54
+ }
55
+
56
+ const AUTH_SESSION_STORAGE_KEYS = ['access_token', 'user_id', 'role', 'name'];
57
+ const AUTH_SESSION_CHANGE_EVENT = 'edsis-auth-session-change';
58
+ const EMPTY_SESSION_FINGERPRINT = '__empty_session__';
59
+ const JWT_PART_COUNT = 3;
60
+ const TOKEN_EXPIRY_SKEW_MS = 30_000;
61
+ let validatedAccessToken = '';
62
+ let validatedUntilEpochMs = 0;
63
+ let failedSessionFingerprint = null;
64
+ let pendingSessionValidation = null;
65
+ function ɵresetAuthSessionModuleState() {
66
+ clearValidatedSession();
67
+ clearFailedSessionFingerprint();
68
+ pendingSessionValidation = null;
69
+ }
70
+ function getSessionStorage(documentRef) {
71
+ return documentRef.defaultView?.sessionStorage ?? null;
72
+ }
73
+ function readSessionStorageValue(documentRef, storageKey) {
74
+ return getSessionStorage(documentRef)?.getItem(storageKey)?.trim() ?? '';
75
+ }
76
+ function readSessionDataValue(sessionData, storageKey) {
77
+ const value = sessionData?.[storageKey];
78
+ return typeof value === 'string' ? value.trim() : '';
79
+ }
80
+ function notifySessionChange(documentRef) {
81
+ documentRef.defaultView?.dispatchEvent(new Event(AUTH_SESSION_CHANGE_EVENT));
82
+ }
83
+ function clearValidatedSession() {
84
+ validatedAccessToken = '';
85
+ validatedUntilEpochMs = 0;
86
+ }
87
+ function clearFailedSessionFingerprint() {
88
+ failedSessionFingerprint = null;
89
+ }
90
+ function readSessionFingerprint(documentRef) {
91
+ return readStoredAccessToken(documentRef) || EMPTY_SESSION_FINGERPRINT;
92
+ }
93
+ function hasFailedSessionFingerprint(documentRef) {
94
+ return failedSessionFingerprint === readSessionFingerprint(documentRef);
95
+ }
96
+ function markFailedSessionFingerprint(documentRef) {
97
+ failedSessionFingerprint = readSessionFingerprint(documentRef);
98
+ }
99
+ function getTokenExpiryEpochMs(documentRef, accessToken) {
100
+ const windowRef = documentRef.defaultView;
101
+ const tokenParts = accessToken.split('.');
102
+ if (!windowRef?.atob || tokenParts.length !== JWT_PART_COUNT) {
103
+ return null;
104
+ }
105
+ const normalizedPayload = tokenParts[1].replace(/-/g, '+').replace(/_/g, '/');
106
+ const paddedPayload = normalizedPayload.padEnd(Math.ceil(normalizedPayload.length / 4) * 4, '=');
107
+ try {
108
+ const parsedPayload = JSON.parse(windowRef.atob(paddedPayload));
109
+ return typeof parsedPayload.exp === 'number' ? parsedPayload.exp * 1000 : null;
110
+ }
111
+ catch {
112
+ return null;
113
+ }
114
+ }
115
+ function markValidatedSession(documentRef) {
116
+ const accessToken = readStoredAccessToken(documentRef);
117
+ if (!accessToken) {
118
+ clearValidatedSession();
119
+ return;
120
+ }
121
+ const tokenExpiryEpochMs = getTokenExpiryEpochMs(documentRef, accessToken);
122
+ if (!tokenExpiryEpochMs) {
123
+ clearValidatedSession();
124
+ return;
125
+ }
126
+ validatedAccessToken = accessToken;
127
+ validatedUntilEpochMs = tokenExpiryEpochMs;
128
+ }
129
+ function hasValidatedSession(documentRef) {
130
+ const accessToken = readStoredAccessToken(documentRef);
131
+ if (!accessToken) {
132
+ clearValidatedSession();
133
+ return false;
134
+ }
135
+ if (accessToken !== validatedAccessToken) {
136
+ markValidatedSession(documentRef);
137
+ }
138
+ if (!validatedAccessToken) {
139
+ clearValidatedSession();
140
+ return false;
141
+ }
142
+ return validatedUntilEpochMs > Date.now() + TOKEN_EXPIRY_SKEW_MS;
143
+ }
144
+ function hasStoredSession(documentRef) {
145
+ return Boolean(readStoredAccessToken(documentRef));
146
+ }
147
+ function readStoredAccessToken(documentRef) {
148
+ return readSessionStorageValue(documentRef, 'access_token');
149
+ }
150
+ function readStoredSession(documentRef) {
151
+ const accessToken = readStoredAccessToken(documentRef);
152
+ if (!accessToken) {
153
+ return null;
154
+ }
155
+ const userId = readSessionStorageValue(documentRef, 'user_id');
156
+ const role = readSessionStorageValue(documentRef, 'role');
157
+ const name = readSessionStorageValue(documentRef, 'name');
158
+ return {
159
+ accessToken,
160
+ userId: userId || undefined,
161
+ role: role || undefined,
162
+ name: name || undefined,
163
+ };
164
+ }
165
+ function persistSession(documentRef, sessionData) {
166
+ const sessionStorageRef = getSessionStorage(documentRef);
167
+ if (!sessionStorageRef) {
168
+ clearValidatedSession();
169
+ notifySessionChange(documentRef);
170
+ return null;
171
+ }
172
+ const nextAccessToken = readSessionDataValue(sessionData, 'access_token');
173
+ if (!nextAccessToken) {
174
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS) {
175
+ sessionStorageRef.removeItem(storageKey);
176
+ }
177
+ clearValidatedSession();
178
+ clearFailedSessionFingerprint();
179
+ notifySessionChange(documentRef);
180
+ return null;
181
+ }
182
+ sessionStorageRef.setItem('access_token', nextAccessToken);
183
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS.slice(1)) {
184
+ if (!sessionData || !Object.hasOwn(sessionData, storageKey)) {
185
+ continue;
186
+ }
187
+ const nextValue = readSessionDataValue(sessionData, storageKey);
188
+ if (nextValue) {
189
+ sessionStorageRef.setItem(storageKey, nextValue);
190
+ continue;
191
+ }
192
+ sessionStorageRef.removeItem(storageKey);
193
+ }
194
+ markValidatedSession(documentRef);
195
+ clearFailedSessionFingerprint();
196
+ notifySessionChange(documentRef);
197
+ return readStoredSession(documentRef);
198
+ }
199
+ function clearStoredSession(documentRef, options) {
200
+ const sessionStorageRef = getSessionStorage(documentRef);
201
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS) {
202
+ sessionStorageRef?.removeItem(storageKey);
203
+ }
204
+ clearValidatedSession();
205
+ if (!options?.preserveFailedSessionFingerprint) {
206
+ clearFailedSessionFingerprint();
207
+ }
208
+ notifySessionChange(documentRef);
209
+ }
210
+ async function validateStoredSession(documentRef, authService, options) {
211
+ if (!options?.forceRefresh && hasValidatedSession(documentRef)) {
212
+ return true;
213
+ }
214
+ if (hasFailedSessionFingerprint(documentRef)) {
215
+ return false;
216
+ }
217
+ if (pendingSessionValidation) {
218
+ return pendingSessionValidation;
219
+ }
220
+ pendingSessionValidation = (async () => {
221
+ try {
222
+ const response = await firstValueFrom(authService.refreshAuthToken());
223
+ persistSession(documentRef, response.data);
224
+ return hasValidatedSession(documentRef);
225
+ }
226
+ catch {
227
+ clearStoredSession(documentRef, { preserveFailedSessionFingerprint: true });
228
+ markFailedSessionFingerprint(documentRef);
229
+ return false;
230
+ }
231
+ finally {
232
+ pendingSessionValidation = null;
233
+ }
234
+ })();
235
+ return pendingSessionValidation;
236
+ }
237
+ function injectSessionState() {
238
+ const documentRef = inject(DOCUMENT);
239
+ const authService = inject(AuthService);
240
+ return validateStoredSession(documentRef, authService);
241
+ }
242
+ function injectSessionRefresh() {
243
+ const documentRef = inject(DOCUMENT);
244
+ const authService = inject(AuthService);
245
+ return validateStoredSession(documentRef, authService, { forceRefresh: true });
246
+ }
247
+ function injectSessionClear() {
248
+ clearStoredSession(inject(DOCUMENT));
249
+ }
250
+
251
+ const PROTECTED_API_PATH_PREFIX = '/v1/';
252
+ const AUTH_PATH_PREFIX = '/v1/auth/';
253
+ const HEALTH_PATH = '/health';
254
+ const EDSIS_SKIP_AUTH = new HttpContextToken(() => false);
255
+ const EDSIS_AUTH_RETRY = new HttpContextToken(() => false);
256
+ function normalizeUrl(url) {
257
+ try {
258
+ return new URL(url);
259
+ }
260
+ catch {
261
+ return null;
262
+ }
263
+ }
264
+ function resolveApiPath(url, rootUrl) {
265
+ const normalizedUrl = normalizeUrl(url);
266
+ const normalizedRootUrl = normalizeUrl(rootUrl);
267
+ if (normalizedUrl && normalizedRootUrl) {
268
+ if (normalizedUrl.origin !== normalizedRootUrl.origin) {
269
+ return null;
270
+ }
271
+ if (!normalizedUrl.pathname.startsWith(normalizedRootUrl.pathname)) {
272
+ return null;
273
+ }
274
+ const apiPath = normalizedUrl.pathname.slice(normalizedRootUrl.pathname.length) || '/';
275
+ return apiPath.startsWith('/') ? apiPath : `/${apiPath}`;
276
+ }
277
+ if (url.startsWith(rootUrl)) {
278
+ const apiPath = url.slice(rootUrl.length).split(/[?#]/, 1)[0] ?? '/';
279
+ return apiPath.startsWith('/') ? apiPath : `/${apiPath}`;
280
+ }
281
+ if (url.startsWith('/')) {
282
+ return url.split(/[?#]/, 1)[0] ?? url;
283
+ }
284
+ return null;
285
+ }
286
+ function isAuthRequest(apiPath) {
287
+ return apiPath.startsWith(AUTH_PATH_PREFIX);
288
+ }
289
+ function isProtectedApiRequest(apiPath) {
290
+ return apiPath.startsWith(PROTECTED_API_PATH_PREFIX) && !isAuthRequest(apiPath);
291
+ }
292
+ function isHealthRequest(apiPath) {
293
+ return apiPath === HEALTH_PATH;
294
+ }
295
+ function isHandledRequest(apiPath) {
296
+ return isProtectedApiRequest(apiPath) || isAuthRequest(apiPath) || isHealthRequest(apiPath);
297
+ }
298
+ function applyCookieCredentials(request, apiPath) {
299
+ return isAuthRequest(apiPath) && !request.withCredentials ? request.clone({ withCredentials: true }) : request;
300
+ }
301
+ function applyBearerToken(request, accessToken, isRetry = false) {
302
+ return request.clone({
303
+ context: isRetry ? request.context.set(EDSIS_AUTH_RETRY, true) : request.context,
304
+ setHeaders: {
305
+ Authorization: `Bearer ${accessToken}`,
306
+ },
307
+ });
308
+ }
309
+ async function resolveAccessToken(documentRef, authService, options) {
310
+ const isSessionValid = await validateStoredSession(documentRef, authService, options);
311
+ return isSessionValid ? readStoredAccessToken(documentRef) : '';
312
+ }
313
+ function handleUnauthorizedError(error, request, next, documentRef, authService) {
314
+ if (!(error instanceof HttpErrorResponse) || error.status !== 401 || request.context.get(EDSIS_AUTH_RETRY)) {
315
+ return throwError(() => error);
316
+ }
317
+ return from(resolveAccessToken(documentRef, authService, { forceRefresh: true })).pipe(switchMap((refreshedAccessToken) => {
318
+ if (!refreshedAccessToken) {
319
+ clearStoredSession(documentRef);
320
+ return throwError(() => error);
321
+ }
322
+ return next(applyBearerToken(request, refreshedAccessToken, true));
323
+ }), catchError(() => {
324
+ clearStoredSession(documentRef);
325
+ return throwError(() => error);
326
+ }));
327
+ }
328
+ const edsisAuthInterceptor = (request, next) => {
329
+ const documentRef = inject(DOCUMENT);
330
+ const apiConfiguration = inject(ApiConfiguration);
331
+ const authService = inject(AuthService);
332
+ if (request.context.get(EDSIS_SKIP_AUTH)) {
333
+ return next(request);
334
+ }
335
+ const apiPath = resolveApiPath(request.url, apiConfiguration.rootUrl);
336
+ if (!apiPath || !isHandledRequest(apiPath)) {
337
+ return next(request);
338
+ }
339
+ const preparedRequest = applyCookieCredentials(request, apiPath);
340
+ if (isAuthRequest(apiPath) || isHealthRequest(apiPath)) {
341
+ return next(preparedRequest);
342
+ }
343
+ return from(resolveAccessToken(documentRef, authService)).pipe(switchMap((accessToken) => {
344
+ const authorizedRequest = accessToken ? applyBearerToken(preparedRequest, accessToken) : preparedRequest;
345
+ return next(authorizedRequest).pipe(catchError((error) => handleUnauthorizedError(error, preparedRequest, next, documentRef, authService)));
346
+ }));
347
+ };
348
+
349
+ function provideEdsisAuth(config) {
350
+ const resolvedConfig = resolveEdsisAuthConfig(config);
351
+ return makeEnvironmentProviders([
352
+ provideApiConfiguration(resolvedConfig.apiUrl),
353
+ provideHttpClient(withFetch(), withInterceptors([edsisAuthInterceptor])),
354
+ {
355
+ provide: EDSIS_AUTH_CONFIG,
356
+ useValue: resolvedConfig,
357
+ },
358
+ ]);
359
+ }
360
+
361
+ const authenticatedGuard = async () => {
362
+ const router = inject(Router);
363
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
364
+ if (await injectSessionState()) {
365
+ return true;
366
+ }
367
+ return router.parseUrl(authConfig.guestHomePath);
368
+ };
369
+ const homeRedirectGuard = async () => {
370
+ const router = inject(Router);
371
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
372
+ return router.parseUrl((await injectSessionState()) ? authConfig.authenticatedHomePath : authConfig.guestHomePath);
373
+ };
374
+ const guestOnlyGuard = async () => {
375
+ const router = inject(Router);
376
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
377
+ if (!(await injectSessionState())) {
378
+ return true;
379
+ }
380
+ return router.parseUrl(authConfig.authenticatedHomePath);
381
+ };
382
+
383
+ class AuthShellPage {
384
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthShellPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
385
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.15", type: AuthShellPage, isStandalone: true, selector: "edsis-auth-shell-page", host: { classAttribute: "contents" }, ngImport: i0, template: `
386
+ <ui-layout surface="grid" appearance="border-rail" width="fluid">
387
+ <ui-layout-fluid>
388
+ <div class="w-full max-w-xl">
389
+ <router-outlet />
390
+ </div>
391
+ </ui-layout-fluid>
392
+ </ui-layout>
393
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: UiLayoutComponent, selector: "ui-layout", inputs: ["surface", "appearance", "layout-style", "width", "class"] }, { kind: "component", type: UiLayoutFluidComponent, selector: "ui-layout-fluid", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
394
+ }
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthShellPage, decorators: [{
396
+ type: Component,
397
+ args: [{
398
+ selector: 'edsis-auth-shell-page',
399
+ imports: [RouterOutlet, UiLayoutComponent, UiLayoutFluidComponent],
400
+ host: {
401
+ class: 'contents',
402
+ },
403
+ template: `
404
+ <ui-layout surface="grid" appearance="border-rail" width="fluid">
405
+ <ui-layout-fluid>
406
+ <div class="w-full max-w-xl">
407
+ <router-outlet />
408
+ </div>
409
+ </ui-layout-fluid>
410
+ </ui-layout>
411
+ `,
412
+ changeDetection: ChangeDetectionStrategy.OnPush,
413
+ }]
414
+ }] });
415
+
416
+ function buildVerifyUrl(config) {
417
+ const baseUrl = typeof window !== 'undefined' && window.location.origin ? window.location.origin : config.appUrl;
418
+ return new URL(config.verifyPath, `${baseUrl}/`).toString();
419
+ }
420
+ function extractMagicToken(queryToken, fragment) {
421
+ const tokenFromQuery = normalizeText(queryToken);
422
+ if (tokenFromQuery) {
423
+ return tokenFromQuery;
424
+ }
425
+ const normalizedFragment = normalizeText(fragment?.startsWith('#') ? fragment.slice(1) : fragment);
426
+ if (!normalizedFragment) {
427
+ return null;
428
+ }
429
+ const fragmentParams = new URLSearchParams(normalizedFragment);
430
+ const tokenFromFragment = normalizeText(fragmentParams.get('token')) ??
431
+ normalizeText(fragmentParams.get('magic_token')) ??
432
+ normalizeText(fragmentParams.get('value'));
433
+ if (tokenFromFragment) {
434
+ return tokenFromFragment;
435
+ }
436
+ return normalizedFragment.includes('=') ? null : normalizedFragment;
437
+ }
438
+ function getResponseMessage(response, fallback) {
439
+ if (!hasMessage(response)) {
440
+ return fallback;
441
+ }
442
+ return normalizeText(response.message) ?? fallback;
443
+ }
444
+ function getErrorMessage(error, fallback) {
445
+ if (error instanceof HttpErrorResponse) {
446
+ const errorBody = error.error;
447
+ if (typeof errorBody === 'string') {
448
+ return normalizeText(errorBody) ?? fallback;
449
+ }
450
+ if (hasMessage(errorBody)) {
451
+ return normalizeText(errorBody.message) ?? fallback;
452
+ }
453
+ return normalizeText(error.message) ?? fallback;
454
+ }
455
+ if (error instanceof Error) {
456
+ return normalizeText(error.message) ?? fallback;
457
+ }
458
+ return fallback;
459
+ }
460
+ function hasMessage(value) {
461
+ return typeof value === 'object' && value !== null && 'message' in value;
462
+ }
463
+ function normalizeText(value) {
464
+ if (typeof value !== 'string') {
465
+ return null;
466
+ }
467
+ const normalizedValue = value.trim();
468
+ return normalizedValue.length > 0 ? normalizedValue : null;
469
+ }
470
+
471
+ class AuthLoginPage {
472
+ destroyRef = inject(DestroyRef);
473
+ formBuilder = inject(FormBuilder);
474
+ authService = inject(AuthService);
475
+ form = this.formBuilder.nonNullable.group({
476
+ email: ['', [Validators.required, Validators.email, Validators.maxLength(255)]],
477
+ });
478
+ isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : /* istanbul ignore next */ []));
479
+ responseMessage = signal(null, ...(ngDevMode ? [{ debugName: "responseMessage" }] : /* istanbul ignore next */ []));
480
+ errorMessage = signal(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
481
+ emailControl = this.form.controls.email;
482
+ emailFeedbackId = 'email-feedback';
483
+ emailControlState = toSignal(this.emailControl.events.pipe(startWith(null)), {
484
+ initialValue: null,
485
+ });
486
+ hasInlineError = computed(() => {
487
+ this.emailControlState();
488
+ return this.emailControl.invalid && (this.emailControl.dirty || this.emailControl.touched);
489
+ }, ...(ngDevMode ? [{ debugName: "hasInlineError" }] : /* istanbul ignore next */ []));
490
+ inlineErrorMessage = computed(() => {
491
+ if (!this.hasInlineError()) {
492
+ return null;
493
+ }
494
+ return this.emailControl.hasError('required')
495
+ ? 'Email wajib diisi.'
496
+ : 'Gunakan format email yang valid dengan panjang maksimal 255 karakter.';
497
+ }, ...(ngDevMode ? [{ debugName: "inlineErrorMessage" }] : /* istanbul ignore next */ []));
498
+ feedbackMessage = computed(() => this.inlineErrorMessage() ?? this.responseMessage() ?? this.errorMessage(), ...(ngDevMode ? [{ debugName: "feedbackMessage" }] : /* istanbul ignore next */ []));
499
+ feedbackTone = computed(() => {
500
+ if (this.inlineErrorMessage() || this.errorMessage()) {
501
+ return 'error';
502
+ }
503
+ if (this.responseMessage()) {
504
+ return 'success';
505
+ }
506
+ return null;
507
+ }, ...(ngDevMode ? [{ debugName: "feedbackTone" }] : /* istanbul ignore next */ []));
508
+ fieldTone = computed(() => {
509
+ if (this.hasInlineError() || this.errorMessage()) {
510
+ return 'error';
511
+ }
512
+ if (this.responseMessage()) {
513
+ return 'success';
514
+ }
515
+ return 'idle';
516
+ }, ...(ngDevMode ? [{ debugName: "fieldTone" }] : /* istanbul ignore next */ []));
517
+ emailFieldClasses = computed(() => {
518
+ const baseClasses = 'flex-nowrap bg-background/70 shadow-sm [&>[data-slot=input-group-control]]:h-12! [&>[data-slot=input-group-control]]:px-4! [&>[data-slot=input-group-control]]:text-base!';
519
+ switch (this.fieldTone()) {
520
+ case 'error':
521
+ return `${baseClasses} border-destructive focus-within:border-destructive focus-within:ring-destructive/20`;
522
+ case 'success':
523
+ return `${baseClasses} border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20`;
524
+ default:
525
+ return baseClasses;
526
+ }
527
+ }, ...(ngDevMode ? [{ debugName: "emailFieldClasses" }] : /* istanbul ignore next */ []));
528
+ submit() {
529
+ if (this.form.invalid) {
530
+ this.form.markAllAsTouched();
531
+ return;
532
+ }
533
+ this.isSubmitting.set(true);
534
+ this.responseMessage.set(null);
535
+ this.errorMessage.set(null);
536
+ const email = this.emailControl.getRawValue().trim().toLowerCase();
537
+ this.emailControl.setValue(email);
538
+ this.authService
539
+ .requestMagicLoginLink({
540
+ body: {
541
+ email,
542
+ },
543
+ })
544
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.isSubmitting.set(false)))
545
+ .subscribe({
546
+ next: (response) => {
547
+ this.responseMessage.set(getResponseMessage(response, 'Magic link berhasil dikirim.'));
548
+ },
549
+ error: (error) => {
550
+ this.errorMessage.set(getErrorMessage(error, 'Gagal mengirim magic link.'));
551
+ },
552
+ });
553
+ }
554
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthLoginPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
555
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: AuthLoginPage, isStandalone: true, selector: "edsis-auth-login-page", host: { classAttribute: "block" }, ngImport: i0, template: `
556
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
557
+ <ui-card-header
558
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
559
+ <div class="w-16 shrink-0 sm:w-20">
560
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
561
+ <div
562
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
563
+ style="font-family: 'Arial Black', Arial, sans-serif;">
564
+ ETOS
565
+ </div>
566
+ </ui-aspect-ratio>
567
+ </div>
568
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
569
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Etos Account Center</ui-card-title>
570
+ <p ui-card-description class="max-w-xl leading-6">
571
+ Masukkan email yang terdaftar. Kami akan mengirimkan tautan verifikasi untuk masuk ke aplikasi.
572
+ </p>
573
+ </div>
574
+ <ui-card-action
575
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
576
+ LOGIN
577
+ </ui-card-action>
578
+ </ui-card-header>
579
+
580
+ <ui-card-content class="pt-4 sm:pt-5">
581
+ <form class="space-y-6" [formGroup]="form" (ngSubmit)="submit()">
582
+ <div class="space-y-3">
583
+ <label ui-label for="email" class="sr-only">Alamat email</label>
584
+ <ui-input-group [class]="emailFieldClasses()">
585
+ <ui-input-group-addon
586
+ aria-hidden="true"
587
+ class="min-h-12 px-4 bg-transparent text-primary [&_svg]:size-6!">
588
+ <svg
589
+ viewBox="0 0 24 24"
590
+ class="fill-none stroke-current"
591
+ stroke-width="1.8"
592
+ stroke-linecap="round"
593
+ stroke-linejoin="round">
594
+ <path d="M4 7.5h16" />
595
+ <path d="M5 6h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z" />
596
+ <path d="m5 8 7 5 7-5" />
597
+ </svg>
598
+ </ui-input-group-addon>
599
+
600
+ <input
601
+ ui-input-group-input
602
+ class="h-12! px-4! text-base!"
603
+ id="email"
604
+ type="email"
605
+ inputmode="email"
606
+ autocomplete="email"
607
+ [attr.aria-describedby]="feedbackMessage() ? emailFeedbackId : null"
608
+ [attr.aria-invalid]="fieldTone() === 'error' ? 'true' : null"
609
+ formControlName="email"
610
+ placeholder="your@email.com" />
611
+
612
+ <button
613
+ ui-input-group-button
614
+ type="submit"
615
+ variant="default"
616
+ size="sm"
617
+ [disabled]="form.invalid || isSubmitting()"
618
+ class="order-30 h-12! min-w-24 rounded-none px-5 text-sm font-medium">
619
+ {{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
620
+ </button>
621
+ </ui-input-group>
622
+
623
+ @if (feedbackMessage(); as feedback) {
624
+ <p
625
+ [id]="emailFeedbackId"
626
+ class="text-sm"
627
+ [class.text-destructive]="feedbackTone() === 'error'"
628
+ [class.text-emerald-700]="feedbackTone() === 'success'"
629
+ [attr.role]="feedbackTone() === 'error' ? 'alert' : 'status'"
630
+ [attr.aria-live]="feedbackTone() === 'error' ? 'assertive' : 'polite'">
631
+ {{ feedback }}
632
+ </p>
633
+ }
634
+ </div>
635
+
636
+ <div class="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 pt-2">
637
+ <ui-separator class="w-full" />
638
+ <span class="min-w-14 text-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
639
+ Atau
640
+ </span>
641
+ <ui-separator class="w-full" />
642
+ </div>
643
+
644
+ <div class="grid gap-3 pt-2 sm:grid-cols-3">
645
+ <button
646
+ ui-button
647
+ type="button"
648
+ variant="outline"
649
+ size="lg"
650
+ disabled
651
+ aria-label="Login dengan Google segera hadir"
652
+ title="Segera hadir"
653
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
654
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
655
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
656
+ <path
657
+ fill="#EA4335"
658
+ d="M12.24 10.285v3.965h5.514c-.24 1.285-.96 2.374-2.045 3.105l3.305 2.565c1.925-1.775 3.03-4.39 3.03-7.49 0-.73-.065-1.43-.185-2.145z" />
659
+ <path
660
+ fill="#34A853"
661
+ d="M12 22c2.7 0 4.965-.895 6.62-2.425l-3.305-2.565c-.915.615-2.085.985-3.315.985-2.545 0-4.7-1.72-5.47-4.03H3.115v2.53A9.996 9.996 0 0 0 12 22" />
662
+ <path
663
+ fill="#4A90E2"
664
+ d="M6.53 13.965A5.996 5.996 0 0 1 6.24 12c0-.68.115-1.34.29-1.965v-2.53H3.115A9.996 9.996 0 0 0 2 12c0 1.61.385 3.135 1.115 4.495z" />
665
+ <path
666
+ fill="#FBBC05"
667
+ d="M12 6.005c1.47 0 2.79.505 3.83 1.495l2.87-2.87C16.96 3.01 14.695 2 12 2a9.996 9.996 0 0 0-8.885 5.505l3.415 2.53c.77-2.31 2.925-4.03 5.47-4.03" />
668
+ </svg>
669
+ </span>
670
+ Google
671
+ </button>
672
+ <button
673
+ ui-button
674
+ type="button"
675
+ variant="outline"
676
+ size="lg"
677
+ disabled
678
+ aria-label="Login dengan Microsoft segera hadir"
679
+ title="Segera hadir"
680
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
681
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
682
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
683
+ <path fill="#F25022" d="M2 2h9.5v9.5H2z" />
684
+ <path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
685
+ <path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
686
+ <path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
687
+ </svg>
688
+ </span>
689
+ Microsoft
690
+ </button>
691
+ <button
692
+ ui-button
693
+ type="button"
694
+ variant="outline"
695
+ size="lg"
696
+ disabled
697
+ aria-label="Login dengan Apple segera hadir"
698
+ title="Segera hadir"
699
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
700
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
701
+ <svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
702
+ <path
703
+ d="M15.482 2c.13 1.25-.31 2.19-.84 2.81-.55.65-1.47 1.15-2.39 1.08-.12-1.21.38-2.17.92-2.79.6-.68 1.61-1.17 2.31-1.1Zm3.94 16.85c-.41.94-.91 1.8-1.54 2.59-.86 1.07-1.57 1.8-2.39 1.8-.59 0-.99-.17-1.44-.36-.47-.2-.95-.4-1.63-.4-.71 0-1.22.2-1.7.4-.46.19-.85.35-1.38.37-.79.03-1.55-.8-2.42-1.87-1.86-2.28-3.3-6.43-1.38-9.77.96-1.66 2.68-2.72 4.55-2.75.71-.01 1.39.21 1.98.41.45.15.86.29 1.19.29.3 0 .73-.15 1.19-.31.68-.23 1.46-.49 2.28-.42 1.14.09 2.17.55 2.98 1.38-2.66 1.45-2.23 5.2.71 6.54Z" />
704
+ </svg>
705
+ </span>
706
+ Apple
707
+ </button>
708
+ </div>
709
+ </form>
710
+ </ui-card-content>
711
+ </ui-card>
712
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AspectRatioComponent, selector: "ui-aspect-ratio", inputs: ["ratio", "class"] }, { kind: "component", type: ButtonComponent, selector: "button[ui-button], a[ui-button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: CardActionComponent, selector: "ui-card-action", inputs: ["class"] }, { kind: "component", type: CardComponent, selector: "ui-card", inputs: ["size", "class"] }, { kind: "component", type: CardContentComponent, selector: "ui-card-content", inputs: ["class"] }, { kind: "component", type: CardDescriptionComponent, selector: "ui-card-description, p[ui-card-description]", inputs: ["class"] }, { kind: "component", type: CardHeaderComponent, selector: "ui-card-header", inputs: ["class"] }, { kind: "component", type: CardTitleComponent, selector: "ui-card-title, h3[ui-card-title]", inputs: ["class"] }, { kind: "component", type: InputGroupAddonComponent, selector: "ui-input-group-addon", inputs: ["align", "class"] }, { kind: "component", type: InputGroupButtonComponent, selector: "button[ui-input-group-button], a[ui-input-group-button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: InputGroupComponent, selector: "ui-input-group", inputs: ["class"] }, { kind: "component", type: InputGroupInputComponent, selector: "input[ui-input-group-input]", inputs: ["class"] }, { kind: "component", type: LabelComponent, selector: "ui-label, label[ui-label]", inputs: ["for", "class"] }, { kind: "component", type: SeparatorComponent, selector: "ui-separator", inputs: ["orientation", "decorative", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
713
+ }
714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthLoginPage, decorators: [{
715
+ type: Component,
716
+ args: [{
717
+ selector: 'edsis-auth-login-page',
718
+ imports: [
719
+ ReactiveFormsModule,
720
+ AspectRatioComponent,
721
+ ButtonComponent,
722
+ CardActionComponent,
723
+ CardComponent,
724
+ CardContentComponent,
725
+ CardDescriptionComponent,
726
+ CardHeaderComponent,
727
+ CardTitleComponent,
728
+ InputGroupAddonComponent,
729
+ InputGroupButtonComponent,
730
+ InputGroupComponent,
731
+ InputGroupInputComponent,
732
+ LabelComponent,
733
+ SeparatorComponent,
734
+ ],
735
+ host: {
736
+ class: 'block',
737
+ },
738
+ template: `
739
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
740
+ <ui-card-header
741
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
742
+ <div class="w-16 shrink-0 sm:w-20">
743
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
744
+ <div
745
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
746
+ style="font-family: 'Arial Black', Arial, sans-serif;">
747
+ ETOS
748
+ </div>
749
+ </ui-aspect-ratio>
750
+ </div>
751
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
752
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Etos Account Center</ui-card-title>
753
+ <p ui-card-description class="max-w-xl leading-6">
754
+ Masukkan email yang terdaftar. Kami akan mengirimkan tautan verifikasi untuk masuk ke aplikasi.
755
+ </p>
756
+ </div>
757
+ <ui-card-action
758
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
759
+ LOGIN
760
+ </ui-card-action>
761
+ </ui-card-header>
762
+
763
+ <ui-card-content class="pt-4 sm:pt-5">
764
+ <form class="space-y-6" [formGroup]="form" (ngSubmit)="submit()">
765
+ <div class="space-y-3">
766
+ <label ui-label for="email" class="sr-only">Alamat email</label>
767
+ <ui-input-group [class]="emailFieldClasses()">
768
+ <ui-input-group-addon
769
+ aria-hidden="true"
770
+ class="min-h-12 px-4 bg-transparent text-primary [&_svg]:size-6!">
771
+ <svg
772
+ viewBox="0 0 24 24"
773
+ class="fill-none stroke-current"
774
+ stroke-width="1.8"
775
+ stroke-linecap="round"
776
+ stroke-linejoin="round">
777
+ <path d="M4 7.5h16" />
778
+ <path d="M5 6h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z" />
779
+ <path d="m5 8 7 5 7-5" />
780
+ </svg>
781
+ </ui-input-group-addon>
782
+
783
+ <input
784
+ ui-input-group-input
785
+ class="h-12! px-4! text-base!"
786
+ id="email"
787
+ type="email"
788
+ inputmode="email"
789
+ autocomplete="email"
790
+ [attr.aria-describedby]="feedbackMessage() ? emailFeedbackId : null"
791
+ [attr.aria-invalid]="fieldTone() === 'error' ? 'true' : null"
792
+ formControlName="email"
793
+ placeholder="your@email.com" />
794
+
795
+ <button
796
+ ui-input-group-button
797
+ type="submit"
798
+ variant="default"
799
+ size="sm"
800
+ [disabled]="form.invalid || isSubmitting()"
801
+ class="order-30 h-12! min-w-24 rounded-none px-5 text-sm font-medium">
802
+ {{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
803
+ </button>
804
+ </ui-input-group>
805
+
806
+ @if (feedbackMessage(); as feedback) {
807
+ <p
808
+ [id]="emailFeedbackId"
809
+ class="text-sm"
810
+ [class.text-destructive]="feedbackTone() === 'error'"
811
+ [class.text-emerald-700]="feedbackTone() === 'success'"
812
+ [attr.role]="feedbackTone() === 'error' ? 'alert' : 'status'"
813
+ [attr.aria-live]="feedbackTone() === 'error' ? 'assertive' : 'polite'">
814
+ {{ feedback }}
815
+ </p>
816
+ }
817
+ </div>
818
+
819
+ <div class="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 pt-2">
820
+ <ui-separator class="w-full" />
821
+ <span class="min-w-14 text-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
822
+ Atau
823
+ </span>
824
+ <ui-separator class="w-full" />
825
+ </div>
826
+
827
+ <div class="grid gap-3 pt-2 sm:grid-cols-3">
828
+ <button
829
+ ui-button
830
+ type="button"
831
+ variant="outline"
832
+ size="lg"
833
+ disabled
834
+ aria-label="Login dengan Google segera hadir"
835
+ title="Segera hadir"
836
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
837
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
838
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
839
+ <path
840
+ fill="#EA4335"
841
+ d="M12.24 10.285v3.965h5.514c-.24 1.285-.96 2.374-2.045 3.105l3.305 2.565c1.925-1.775 3.03-4.39 3.03-7.49 0-.73-.065-1.43-.185-2.145z" />
842
+ <path
843
+ fill="#34A853"
844
+ d="M12 22c2.7 0 4.965-.895 6.62-2.425l-3.305-2.565c-.915.615-2.085.985-3.315.985-2.545 0-4.7-1.72-5.47-4.03H3.115v2.53A9.996 9.996 0 0 0 12 22" />
845
+ <path
846
+ fill="#4A90E2"
847
+ d="M6.53 13.965A5.996 5.996 0 0 1 6.24 12c0-.68.115-1.34.29-1.965v-2.53H3.115A9.996 9.996 0 0 0 2 12c0 1.61.385 3.135 1.115 4.495z" />
848
+ <path
849
+ fill="#FBBC05"
850
+ d="M12 6.005c1.47 0 2.79.505 3.83 1.495l2.87-2.87C16.96 3.01 14.695 2 12 2a9.996 9.996 0 0 0-8.885 5.505l3.415 2.53c.77-2.31 2.925-4.03 5.47-4.03" />
851
+ </svg>
852
+ </span>
853
+ Google
854
+ </button>
855
+ <button
856
+ ui-button
857
+ type="button"
858
+ variant="outline"
859
+ size="lg"
860
+ disabled
861
+ aria-label="Login dengan Microsoft segera hadir"
862
+ title="Segera hadir"
863
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
864
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
865
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
866
+ <path fill="#F25022" d="M2 2h9.5v9.5H2z" />
867
+ <path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
868
+ <path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
869
+ <path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
870
+ </svg>
871
+ </span>
872
+ Microsoft
873
+ </button>
874
+ <button
875
+ ui-button
876
+ type="button"
877
+ variant="outline"
878
+ size="lg"
879
+ disabled
880
+ aria-label="Login dengan Apple segera hadir"
881
+ title="Segera hadir"
882
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
883
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
884
+ <svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
885
+ <path
886
+ d="M15.482 2c.13 1.25-.31 2.19-.84 2.81-.55.65-1.47 1.15-2.39 1.08-.12-1.21.38-2.17.92-2.79.6-.68 1.61-1.17 2.31-1.1Zm3.94 16.85c-.41.94-.91 1.8-1.54 2.59-.86 1.07-1.57 1.8-2.39 1.8-.59 0-.99-.17-1.44-.36-.47-.2-.95-.4-1.63-.4-.71 0-1.22.2-1.7.4-.46.19-.85.35-1.38.37-.79.03-1.55-.8-2.42-1.87-1.86-2.28-3.3-6.43-1.38-9.77.96-1.66 2.68-2.72 4.55-2.75.71-.01 1.39.21 1.98.41.45.15.86.29 1.19.29.3 0 .73-.15 1.19-.31.68-.23 1.46-.49 2.28-.42 1.14.09 2.17.55 2.98 1.38-2.66 1.45-2.23 5.2.71 6.54Z" />
887
+ </svg>
888
+ </span>
889
+ Apple
890
+ </button>
891
+ </div>
892
+ </form>
893
+ </ui-card-content>
894
+ </ui-card>
895
+ `,
896
+ changeDetection: ChangeDetectionStrategy.OnPush,
897
+ }]
898
+ }] });
899
+
900
+ class AuthLogoutPage {
901
+ destroyRef = inject(DestroyRef);
902
+ documentRef = inject(DOCUMENT);
903
+ router = inject(Router);
904
+ authService = inject(AuthService);
905
+ authConfig = inject(EDSIS_AUTH_CONFIG);
906
+ guestHomePath = this.authConfig.guestHomePath;
907
+ authenticatedHomePath = this.authConfig.authenticatedHomePath;
908
+ state = signal('pending', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
909
+ message = signal('Mengakhiri sesi...', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
910
+ ngOnInit() {
911
+ clearStoredSession(this.documentRef);
912
+ this.authService
913
+ .logoutAuthSession()
914
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
915
+ if (this.state() === 'pending') {
916
+ this.state.set('success');
917
+ }
918
+ }))
919
+ .subscribe({
920
+ next: (response) => {
921
+ this.state.set('success');
922
+ this.message.set(getResponseMessage(response, 'Sesi berhasil diakhiri.'));
923
+ void this.router.navigateByUrl(this.guestHomePath, { replaceUrl: true });
924
+ },
925
+ error: (error) => {
926
+ this.state.set('error');
927
+ this.message.set(getErrorMessage(error, 'Sesi lokal sudah dihapus, tetapi request logout gagal.'));
928
+ },
929
+ });
930
+ }
931
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthLogoutPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
932
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: AuthLogoutPage, isStandalone: true, selector: "edsis-auth-logout-page", host: { classAttribute: "block" }, ngImport: i0, template: `
933
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
934
+ <ui-card-header
935
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
936
+ <div class="w-16 shrink-0 sm:w-20">
937
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
938
+ <div
939
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
940
+ style="font-family: 'Arial Black', Arial, sans-serif;">
941
+ ETOS
942
+ </div>
943
+ </ui-aspect-ratio>
944
+ </div>
945
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
946
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Mengakhiri sesi Edsis.</ui-card-title>
947
+ <p ui-card-description class="max-w-xl leading-6">
948
+ Halaman ini membersihkan sesi lokal lalu memanggil endpoint logout untuk merevoke refresh-token cookie pada
949
+ backend.
950
+ </p>
951
+ </div>
952
+ <ui-card-action
953
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
954
+ LOGOUT
955
+ </ui-card-action>
956
+ </ui-card-header>
957
+
958
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
959
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
960
+ @if (state() === 'pending') {
961
+ <ui-spinner class="mt-0.5 size-4" aria-label="Mengakhiri sesi" />
962
+ }
963
+
964
+ <ui-alert-description>
965
+ {{ message() }}
966
+ </ui-alert-description>
967
+ </ui-alert>
968
+
969
+ @if (state() === 'error') {
970
+ <ui-alert variant="destructive" class="shadow-sm">
971
+ <ui-alert-description>
972
+ Backend tidak mengonfirmasi logout, tetapi sesi lokal sudah dihapus.
973
+ </ui-alert-description>
974
+ </ui-alert>
975
+ }
976
+ </ui-card-content>
977
+
978
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
979
+ <a ui-button [routerLink]="guestHomePath" variant="default"> Kembali ke login </a>
980
+ <a ui-button [routerLink]="authenticatedHomePath" variant="outline"> Buka dashboard </a>
981
+ </ui-card-footer>
982
+ </ui-card>
983
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: AlertComponent, selector: "ui-alert", inputs: ["variant", "class"] }, { kind: "component", type: AlertDescriptionComponent, selector: "ui-alert-description", inputs: ["class"] }, { kind: "component", type: AspectRatioComponent, selector: "ui-aspect-ratio", inputs: ["ratio", "class"] }, { kind: "component", type: ButtonComponent, selector: "button[ui-button], a[ui-button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: CardActionComponent, selector: "ui-card-action", inputs: ["class"] }, { kind: "component", type: CardComponent, selector: "ui-card", inputs: ["size", "class"] }, { kind: "component", type: CardContentComponent, selector: "ui-card-content", inputs: ["class"] }, { kind: "component", type: CardDescriptionComponent, selector: "ui-card-description, p[ui-card-description]", inputs: ["class"] }, { kind: "component", type: CardFooterComponent, selector: "ui-card-footer", inputs: ["class"] }, { kind: "component", type: CardHeaderComponent, selector: "ui-card-header", inputs: ["class"] }, { kind: "component", type: CardTitleComponent, selector: "ui-card-title, h3[ui-card-title]", inputs: ["class"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "decorative", "aria-label", "aria-labelledby"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
984
+ }
985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthLogoutPage, decorators: [{
986
+ type: Component,
987
+ args: [{
988
+ selector: 'edsis-auth-logout-page',
989
+ imports: [
990
+ RouterLink,
991
+ AlertComponent,
992
+ AlertDescriptionComponent,
993
+ AspectRatioComponent,
994
+ ButtonComponent,
995
+ CardActionComponent,
996
+ CardComponent,
997
+ CardContentComponent,
998
+ CardDescriptionComponent,
999
+ CardFooterComponent,
1000
+ CardHeaderComponent,
1001
+ CardTitleComponent,
1002
+ SpinnerComponent,
1003
+ ],
1004
+ host: {
1005
+ class: 'block',
1006
+ },
1007
+ template: `
1008
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1009
+ <ui-card-header
1010
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
1011
+ <div class="w-16 shrink-0 sm:w-20">
1012
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1013
+ <div
1014
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
1015
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1016
+ ETOS
1017
+ </div>
1018
+ </ui-aspect-ratio>
1019
+ </div>
1020
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1021
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Mengakhiri sesi Edsis.</ui-card-title>
1022
+ <p ui-card-description class="max-w-xl leading-6">
1023
+ Halaman ini membersihkan sesi lokal lalu memanggil endpoint logout untuk merevoke refresh-token cookie pada
1024
+ backend.
1025
+ </p>
1026
+ </div>
1027
+ <ui-card-action
1028
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
1029
+ LOGOUT
1030
+ </ui-card-action>
1031
+ </ui-card-header>
1032
+
1033
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1034
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1035
+ @if (state() === 'pending') {
1036
+ <ui-spinner class="mt-0.5 size-4" aria-label="Mengakhiri sesi" />
1037
+ }
1038
+
1039
+ <ui-alert-description>
1040
+ {{ message() }}
1041
+ </ui-alert-description>
1042
+ </ui-alert>
1043
+
1044
+ @if (state() === 'error') {
1045
+ <ui-alert variant="destructive" class="shadow-sm">
1046
+ <ui-alert-description>
1047
+ Backend tidak mengonfirmasi logout, tetapi sesi lokal sudah dihapus.
1048
+ </ui-alert-description>
1049
+ </ui-alert>
1050
+ }
1051
+ </ui-card-content>
1052
+
1053
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1054
+ <a ui-button [routerLink]="guestHomePath" variant="default"> Kembali ke login </a>
1055
+ <a ui-button [routerLink]="authenticatedHomePath" variant="outline"> Buka dashboard </a>
1056
+ </ui-card-footer>
1057
+ </ui-card>
1058
+ `,
1059
+ changeDetection: ChangeDetectionStrategy.OnPush,
1060
+ }]
1061
+ }] });
1062
+
1063
+ class AuthVerifyPage {
1064
+ documentRef = inject(DOCUMENT);
1065
+ destroyRef = inject(DestroyRef);
1066
+ route = inject(ActivatedRoute);
1067
+ router = inject(Router);
1068
+ location = inject(Location);
1069
+ authService = inject(AuthService);
1070
+ authConfig = inject(EDSIS_AUTH_CONFIG);
1071
+ queryParamMap = toSignal(this.route.queryParamMap, {
1072
+ initialValue: this.route.snapshot.queryParamMap,
1073
+ });
1074
+ fragment = toSignal(this.route.fragment, {
1075
+ initialValue: this.route.snapshot.fragment,
1076
+ });
1077
+ handledToken = undefined;
1078
+ verifySubscription = null;
1079
+ guestHomePath = this.authConfig.guestHomePath;
1080
+ authenticatedHomePath = this.authConfig.authenticatedHomePath;
1081
+ state = signal('pending', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
1082
+ message = signal('Memverifikasi magic link...', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
1083
+ token = input(undefined, ...(ngDevMode ? [{ debugName: "token" }] : /* istanbul ignore next */ []));
1084
+ constructor() {
1085
+ this.destroyRef.onDestroy(() => this.verifySubscription?.unsubscribe());
1086
+ effect(() => {
1087
+ const token = extractMagicToken(this.token() ?? this.queryParamMap().get('token'), this.fragment());
1088
+ if (!token) {
1089
+ if (this.handledToken === null) {
1090
+ return;
1091
+ }
1092
+ this.handledToken = null;
1093
+ this.clearTokenFromAddressBar();
1094
+ this.state.set('error');
1095
+ this.message.set('Token magic link tidak ditemukan pada URL yang dibuka.');
1096
+ return;
1097
+ }
1098
+ if (token === this.handledToken) {
1099
+ return;
1100
+ }
1101
+ this.handledToken = token;
1102
+ this.clearTokenFromAddressBar();
1103
+ this.state.set('pending');
1104
+ this.message.set('Memverifikasi magic link...');
1105
+ this.verify(token);
1106
+ });
1107
+ }
1108
+ clearTokenFromAddressBar() {
1109
+ this.location.replaceState(this.authConfig.verifyPath);
1110
+ }
1111
+ verify(token) {
1112
+ this.verifySubscription?.unsubscribe();
1113
+ this.verifySubscription = this.authService
1114
+ .verifyMagicLink({
1115
+ body: {
1116
+ token,
1117
+ device_type: 'web',
1118
+ },
1119
+ })
1120
+ .subscribe({
1121
+ next: (response) => {
1122
+ const session = persistSession(this.documentRef, response.data);
1123
+ if (!session) {
1124
+ this.state.set('error');
1125
+ this.message.set('Verifikasi berhasil, tetapi access token tidak ditemukan di respons backend.');
1126
+ return;
1127
+ }
1128
+ this.state.set('success');
1129
+ this.message.set(getResponseMessage(response, 'Verifikasi berhasil. Mengarahkan ke dashboard...'));
1130
+ void this.router.navigateByUrl(this.authenticatedHomePath, { replaceUrl: true });
1131
+ },
1132
+ error: (error) => {
1133
+ this.state.set('error');
1134
+ this.message.set(getErrorMessage(error, 'Magic link tidak valid atau sudah kedaluwarsa.'));
1135
+ },
1136
+ });
1137
+ }
1138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthVerifyPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
1139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: AuthVerifyPage, isStandalone: true, selector: "edsis-auth-verify-page", inputs: { token: { classPropertyName: "token", publicName: "token", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
1140
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1141
+ <ui-card-header
1142
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
1143
+ <div class="w-16 shrink-0 sm:w-20">
1144
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1145
+ <div
1146
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
1147
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1148
+ ETOS
1149
+ </div>
1150
+ </ui-aspect-ratio>
1151
+ </div>
1152
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1153
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Memverifikasi magic link.</ui-card-title>
1154
+ <p ui-card-description class="max-w-xl leading-6">
1155
+ Token akan dikonsumsi satu kali, sesi refresh cookie dibentuk di backend, lalu access token disimpan secara
1156
+ lokal untuk aplikasi.
1157
+ </p>
1158
+ </div>
1159
+ <ui-card-action
1160
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
1161
+ VERIFY
1162
+ </ui-card-action>
1163
+ </ui-card-header>
1164
+
1165
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1166
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1167
+ @if (state() === 'pending') {
1168
+ <ui-spinner class="mt-0.5 size-4" aria-label="Memverifikasi magic link" />
1169
+ }
1170
+
1171
+ <ui-alert-description>
1172
+ {{ message() }}
1173
+ </ui-alert-description>
1174
+ </ui-alert>
1175
+
1176
+ @if (state() === 'error') {
1177
+ <ui-alert variant="destructive" class="shadow-sm">
1178
+ <ui-alert-description>
1179
+ Pastikan Anda membuka link terbaru dari email dan token belum pernah dipakai sebelumnya.
1180
+ </ui-alert-description>
1181
+ </ui-alert>
1182
+ }
1183
+ </ui-card-content>
1184
+
1185
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1186
+ <a ui-button [routerLink]="guestHomePath" variant="outline"> Minta link baru </a>
1187
+ <a ui-button [routerLink]="authenticatedHomePath" variant="default"> Buka dashboard </a>
1188
+ </ui-card-footer>
1189
+ </ui-card>
1190
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: AlertComponent, selector: "ui-alert", inputs: ["variant", "class"] }, { kind: "component", type: AlertDescriptionComponent, selector: "ui-alert-description", inputs: ["class"] }, { kind: "component", type: AspectRatioComponent, selector: "ui-aspect-ratio", inputs: ["ratio", "class"] }, { kind: "component", type: ButtonComponent, selector: "button[ui-button], a[ui-button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: CardActionComponent, selector: "ui-card-action", inputs: ["class"] }, { kind: "component", type: CardComponent, selector: "ui-card", inputs: ["size", "class"] }, { kind: "component", type: CardContentComponent, selector: "ui-card-content", inputs: ["class"] }, { kind: "component", type: CardDescriptionComponent, selector: "ui-card-description, p[ui-card-description]", inputs: ["class"] }, { kind: "component", type: CardFooterComponent, selector: "ui-card-footer", inputs: ["class"] }, { kind: "component", type: CardHeaderComponent, selector: "ui-card-header", inputs: ["class"] }, { kind: "component", type: CardTitleComponent, selector: "ui-card-title, h3[ui-card-title]", inputs: ["class"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "decorative", "aria-label", "aria-labelledby"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1191
+ }
1192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AuthVerifyPage, decorators: [{
1193
+ type: Component,
1194
+ args: [{
1195
+ selector: 'edsis-auth-verify-page',
1196
+ imports: [
1197
+ RouterLink,
1198
+ AlertComponent,
1199
+ AlertDescriptionComponent,
1200
+ AspectRatioComponent,
1201
+ ButtonComponent,
1202
+ CardActionComponent,
1203
+ CardComponent,
1204
+ CardContentComponent,
1205
+ CardDescriptionComponent,
1206
+ CardFooterComponent,
1207
+ CardHeaderComponent,
1208
+ CardTitleComponent,
1209
+ SpinnerComponent,
1210
+ ],
1211
+ host: {
1212
+ class: 'block',
1213
+ },
1214
+ template: `
1215
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1216
+ <ui-card-header
1217
+ class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-4 gap-y-3 border-b border-border/60 bg-muted/15 pb-4 sm:pb-5">
1218
+ <div class="w-16 shrink-0 sm:w-20">
1219
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1220
+ <div
1221
+ class="flex h-full w-full items-center justify-center px-1 text-[1.25rem] leading-none tracking-[-0.08em] text-primary-foreground sm:text-[1.55rem]"
1222
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1223
+ ETOS
1224
+ </div>
1225
+ </ui-aspect-ratio>
1226
+ </div>
1227
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1228
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Memverifikasi magic link.</ui-card-title>
1229
+ <p ui-card-description class="max-w-xl leading-6">
1230
+ Token akan dikonsumsi satu kali, sesi refresh cookie dibentuk di backend, lalu access token disimpan secara
1231
+ lokal untuk aplikasi.
1232
+ </p>
1233
+ </div>
1234
+ <ui-card-action
1235
+ class="col-start-3 row-span-1 mt-0! pt-0.5 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground sm:pt-1 sm:text-sm">
1236
+ VERIFY
1237
+ </ui-card-action>
1238
+ </ui-card-header>
1239
+
1240
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1241
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1242
+ @if (state() === 'pending') {
1243
+ <ui-spinner class="mt-0.5 size-4" aria-label="Memverifikasi magic link" />
1244
+ }
1245
+
1246
+ <ui-alert-description>
1247
+ {{ message() }}
1248
+ </ui-alert-description>
1249
+ </ui-alert>
1250
+
1251
+ @if (state() === 'error') {
1252
+ <ui-alert variant="destructive" class="shadow-sm">
1253
+ <ui-alert-description>
1254
+ Pastikan Anda membuka link terbaru dari email dan token belum pernah dipakai sebelumnya.
1255
+ </ui-alert-description>
1256
+ </ui-alert>
1257
+ }
1258
+ </ui-card-content>
1259
+
1260
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1261
+ <a ui-button [routerLink]="guestHomePath" variant="outline"> Minta link baru </a>
1262
+ <a ui-button [routerLink]="authenticatedHomePath" variant="default"> Buka dashboard </a>
1263
+ </ui-card-footer>
1264
+ </ui-card>
1265
+ `,
1266
+ changeDetection: ChangeDetectionStrategy.OnPush,
1267
+ }]
1268
+ }], ctorParameters: () => [], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }] } });
1269
+
1270
+ const authRoutes = [
1271
+ {
1272
+ path: '',
1273
+ component: AuthShellPage,
1274
+ children: [
1275
+ {
1276
+ path: 'login',
1277
+ title: 'Login',
1278
+ canActivate: [guestOnlyGuard],
1279
+ component: AuthLoginPage,
1280
+ },
1281
+ {
1282
+ path: 'logout',
1283
+ title: 'Logout',
1284
+ component: AuthLogoutPage,
1285
+ },
1286
+ {
1287
+ path: 'verify',
1288
+ title: 'Verify',
1289
+ canActivate: [guestOnlyGuard],
1290
+ component: AuthVerifyPage,
1291
+ },
1292
+ ],
1293
+ },
1294
+ ];
1295
+
1296
+ /**
1297
+ * Generated bundle index. Do not edit.
1298
+ */
1299
+
1300
+ export { AUTH_SESSION_CHANGE_EVENT, AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, EDSIS_AUTH_CONFIG, EDSIS_SKIP_AUTH, authRoutes, authenticatedGuard, clearStoredSession, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, validateStoredSession, ɵresetAuthSessionModuleState };
1301
+ //# sourceMappingURL=edsis-angular-module-auth.mjs.map