@edsis/angular 22.0.1 → 22.0.3

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 (514) hide show
  1. package/README.md +88 -261
  2. package/fesm2022/edsis-angular-block-shell.mjs +759 -0
  3. package/fesm2022/edsis-angular-block-shell.mjs.map +1 -0
  4. package/fesm2022/edsis-angular-module-auth.mjs +1574 -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 +17 -429
  9. package/types/edsis-angular-block-shell.d.ts +114 -0
  10. package/types/edsis-angular-module-auth.d.ts +140 -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/README.md +0 -195
  15. package/component/accordion/package.json +0 -4
  16. package/component/alert/README.md +0 -182
  17. package/component/alert/package.json +0 -4
  18. package/component/alert-dialog/README.md +0 -239
  19. package/component/alert-dialog/package.json +0 -4
  20. package/component/aspect-ratio/README.md +0 -112
  21. package/component/aspect-ratio/package.json +0 -4
  22. package/component/avatar/README.md +0 -176
  23. package/component/avatar/package.json +0 -4
  24. package/component/badge/README.md +0 -133
  25. package/component/badge/package.json +0 -4
  26. package/component/breadcrumb/README.md +0 -216
  27. package/component/breadcrumb/package.json +0 -4
  28. package/component/button/README.md +0 -139
  29. package/component/button/package.json +0 -4
  30. package/component/button-group/README.md +0 -208
  31. package/component/button-group/package.json +0 -4
  32. package/component/calendar/README.md +0 -132
  33. package/component/calendar/package.json +0 -4
  34. package/component/card/README.md +0 -220
  35. package/component/card/package.json +0 -4
  36. package/component/carousel/README.md +0 -276
  37. package/component/carousel/package.json +0 -4
  38. package/component/chart/README.md +0 -249
  39. package/component/chart/area/package.json +0 -4
  40. package/component/chart/bar/package.json +0 -4
  41. package/component/chart/line/package.json +0 -4
  42. package/component/chart/package.json +0 -4
  43. package/component/chart/pie/package.json +0 -4
  44. package/component/chart/radar/package.json +0 -4
  45. package/component/chart/radial/package.json +0 -4
  46. package/component/chart/scatter/package.json +0 -4
  47. package/component/checkbox/README.md +0 -149
  48. package/component/checkbox/package.json +0 -4
  49. package/component/collapsible/README.md +0 -195
  50. package/component/collapsible/package.json +0 -4
  51. package/component/combobox/README.md +0 -198
  52. package/component/combobox/package.json +0 -4
  53. package/component/command/README.md +0 -275
  54. package/component/command/package.json +0 -4
  55. package/component/composer/README.md +0 -235
  56. package/component/composer/package.json +0 -4
  57. package/component/context-menu/README.md +0 -267
  58. package/component/context-menu/package.json +0 -4
  59. package/component/date-picker/README.md +0 -177
  60. package/component/date-picker/package.json +0 -4
  61. package/component/dialog/README.md +0 -237
  62. package/component/dialog/package.json +0 -4
  63. package/component/drawer/README.md +0 -145
  64. package/component/drawer/package.json +0 -4
  65. package/component/dropdown-menu/README.md +0 -311
  66. package/component/dropdown-menu/package.json +0 -4
  67. package/component/editor/README.md +0 -136
  68. package/component/editor/package.json +0 -4
  69. package/component/empty/README.md +0 -183
  70. package/component/empty/package.json +0 -4
  71. package/component/form/README.md +0 -210
  72. package/component/form/package.json +0 -4
  73. package/component/hover-card/README.md +0 -146
  74. package/component/hover-card/package.json +0 -4
  75. package/component/input/README.md +0 -159
  76. package/component/input/package.json +0 -4
  77. package/component/input-group/README.md +0 -239
  78. package/component/input-group/package.json +0 -4
  79. package/component/input-otp/README.md +0 -278
  80. package/component/input-otp/package.json +0 -4
  81. package/component/item/README.md +0 -247
  82. package/component/item/package.json +0 -4
  83. package/component/kanban/README.md +0 -81
  84. package/component/kanban/package.json +0 -4
  85. package/component/kbd/README.md +0 -139
  86. package/component/kbd/package.json +0 -4
  87. package/component/label/README.md +0 -136
  88. package/component/label/package.json +0 -4
  89. package/component/menubar/README.md +0 -269
  90. package/component/menubar/package.json +0 -4
  91. package/component/native-select/README.md +0 -176
  92. package/component/native-select/package.json +0 -4
  93. package/component/navigation-menu/README.md +0 -160
  94. package/component/navigation-menu/package.json +0 -4
  95. package/component/pagination/README.md +0 -144
  96. package/component/pagination/package.json +0 -4
  97. package/component/pillbox/README.md +0 -67
  98. package/component/pillbox/package.json +0 -4
  99. package/component/popover/README.md +0 -43
  100. package/component/popover/package.json +0 -4
  101. package/component/progress/README.md +0 -160
  102. package/component/progress/package.json +0 -4
  103. package/component/radio/README.md +0 -209
  104. package/component/radio/package.json +0 -4
  105. package/component/resizable/README.md +0 -168
  106. package/component/resizable/package.json +0 -4
  107. package/component/scroll-area/README.md +0 -143
  108. package/component/scroll-area/package.json +0 -4
  109. package/component/select/README.md +0 -174
  110. package/component/select/package.json +0 -4
  111. package/component/separator/README.md +0 -170
  112. package/component/separator/package.json +0 -4
  113. package/component/sheet/README.md +0 -183
  114. package/component/sheet/package.json +0 -4
  115. package/component/skeleton/README.md +0 -158
  116. package/component/skeleton/package.json +0 -4
  117. package/component/slider/README.md +0 -207
  118. package/component/slider/package.json +0 -4
  119. package/component/spinner/README.md +0 -160
  120. package/component/spinner/package.json +0 -4
  121. package/component/switch/README.md +0 -166
  122. package/component/switch/package.json +0 -4
  123. package/component/table/README.md +0 -291
  124. package/component/table/package.json +0 -4
  125. package/component/tabs/README.md +0 -219
  126. package/component/tabs/package.json +0 -4
  127. package/component/textarea/README.md +0 -154
  128. package/component/textarea/package.json +0 -4
  129. package/component/timeline/README.md +0 -94
  130. package/component/timeline/package.json +0 -4
  131. package/component/toast/README.md +0 -321
  132. package/component/toast/package.json +0 -4
  133. package/component/toggle/README.md +0 -131
  134. package/component/toggle/package.json +0 -4
  135. package/component/toggle-group/README.md +0 -206
  136. package/component/toggle-group/package.json +0 -4
  137. package/component/tooltip/README.md +0 -211
  138. package/component/tooltip/package.json +0 -4
  139. package/component/utils/package.json +0 -4
  140. package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -189
  141. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
  142. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -276
  143. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
  144. package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -99
  145. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
  146. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -37
  147. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
  148. package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -139
  149. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
  150. package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -50
  151. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
  152. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -200
  153. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
  154. package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -103
  155. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
  156. package/fesm2022/ojiepermana-angular-component-button.mjs +0 -68
  157. package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
  158. package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -88
  159. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
  160. package/fesm2022/ojiepermana-angular-component-card.mjs +0 -152
  161. package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
  162. package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -334
  163. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
  164. package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
  165. package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
  166. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
  167. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
  168. package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
  169. package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
  170. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
  171. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
  172. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
  173. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
  174. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
  175. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
  176. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
  177. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
  178. package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3925
  179. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
  180. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -114
  181. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
  182. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -124
  183. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
  184. package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -272
  185. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
  186. package/fesm2022/ojiepermana-angular-component-command.mjs +0 -293
  187. package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
  188. package/fesm2022/ojiepermana-angular-component-composer.mjs +0 -352
  189. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +0 -1
  190. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -103
  191. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
  192. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -170
  193. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
  194. package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -279
  195. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
  196. package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
  197. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
  198. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -492
  199. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
  200. package/fesm2022/ojiepermana-angular-component-editor.mjs +0 -717
  201. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +0 -1
  202. package/fesm2022/ojiepermana-angular-component-empty.mjs +0 -145
  203. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +0 -1
  204. package/fesm2022/ojiepermana-angular-component-form.mjs +0 -366
  205. package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
  206. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +0 -297
  207. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +0 -1
  208. package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -179
  209. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
  210. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +0 -514
  211. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +0 -1
  212. package/fesm2022/ojiepermana-angular-component-input.mjs +0 -45
  213. package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
  214. package/fesm2022/ojiepermana-angular-component-item.mjs +0 -264
  215. package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
  216. package/fesm2022/ojiepermana-angular-component-kanban.mjs +0 -314
  217. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +0 -1
  218. package/fesm2022/ojiepermana-angular-component-kbd.mjs +0 -55
  219. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +0 -1
  220. package/fesm2022/ojiepermana-angular-component-label.mjs +0 -33
  221. package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
  222. package/fesm2022/ojiepermana-angular-component-menubar.mjs +0 -308
  223. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +0 -1
  224. package/fesm2022/ojiepermana-angular-component-native-select.mjs +0 -67
  225. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +0 -1
  226. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +0 -413
  227. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +0 -1
  228. package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -226
  229. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
  230. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +0 -812
  231. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +0 -1
  232. package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -169
  233. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
  234. package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -60
  235. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
  236. package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -122
  237. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
  238. package/fesm2022/ojiepermana-angular-component-resizable.mjs +0 -481
  239. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +0 -1
  240. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -54
  241. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
  242. package/fesm2022/ojiepermana-angular-component-select.mjs +0 -176
  243. package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
  244. package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -37
  245. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
  246. package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -284
  247. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
  248. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -31
  249. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
  250. package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -423
  251. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
  252. package/fesm2022/ojiepermana-angular-component-spinner.mjs +0 -60
  253. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +0 -1
  254. package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -116
  255. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
  256. package/fesm2022/ojiepermana-angular-component-table.mjs +0 -155
  257. package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
  258. package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -272
  259. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
  260. package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -39
  261. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
  262. package/fesm2022/ojiepermana-angular-component-timeline.mjs +0 -237
  263. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +0 -1
  264. package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -71
  265. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
  266. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +0 -289
  267. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +0 -1
  268. package/fesm2022/ojiepermana-angular-component-toggle.mjs +0 -82
  269. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +0 -1
  270. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -354
  271. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
  272. package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
  273. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
  274. package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
  275. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
  276. package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -602
  277. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
  278. package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
  279. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
  280. package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -116
  281. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
  282. package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
  283. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
  284. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -30
  285. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
  286. package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
  287. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
  288. package/fesm2022/ojiepermana-angular-layout-type-empty.mjs +0 -49
  289. package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +0 -1
  290. package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs +0 -128
  291. package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +0 -1
  292. package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs +0 -123
  293. package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +0 -1
  294. package/fesm2022/ojiepermana-angular-layout.mjs +0 -485
  295. package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
  296. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
  297. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
  298. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -63
  299. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
  300. package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -559
  301. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
  302. package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -213
  303. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
  304. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -401
  305. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
  306. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -670
  307. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
  308. package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
  309. package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
  310. package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
  311. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
  312. package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -294
  313. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
  314. package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
  315. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
  316. package/fesm2022/ojiepermana-angular-theme.mjs +0 -390
  317. package/fesm2022/ojiepermana-angular-theme.mjs.map +0 -1
  318. package/fesm2022/ojiepermana-angular.mjs +0 -22
  319. package/fesm2022/ojiepermana-angular.mjs.map +0 -1
  320. package/generator/api/README.md +0 -252
  321. package/generator/api/bin/package.json +0 -3
  322. package/generator/api/bin/schematics/init/index.js +0 -90
  323. package/generator/api/bin/schematics/ng-add/index.js +0 -131
  324. package/generator/api/bin/schematics/sdk/index.js +0 -76
  325. package/generator/api/bin/src/config/loader.js +0 -41
  326. package/generator/api/bin/src/config/schema.js +0 -57
  327. package/generator/api/bin/src/emit/client.js +0 -248
  328. package/generator/api/bin/src/emit/metadata.js +0 -295
  329. package/generator/api/bin/src/emit/models.js +0 -106
  330. package/generator/api/bin/src/emit/navigation.js +0 -56
  331. package/generator/api/bin/src/emit/operations.js +0 -122
  332. package/generator/api/bin/src/emit/public-api.js +0 -54
  333. package/generator/api/bin/src/emit/services.js +0 -87
  334. package/generator/api/bin/src/engine.js +0 -65
  335. package/generator/api/bin/src/layout/per-domain.js +0 -359
  336. package/generator/api/bin/src/parser/bundle.js +0 -25
  337. package/generator/api/bin/src/parser/ir.js +0 -320
  338. package/generator/api/bin/src/parser/types.js +0 -7
  339. package/generator/api/bin/src/render/template.js +0 -58
  340. package/generator/api/bin/src/writer/index.js +0 -278
  341. package/generator/api/package.json +0 -4
  342. package/generator/api/schematics/init/schema.json +0 -19
  343. package/generator/api/schematics/ng-add/schema.json +0 -14
  344. package/generator/api/schematics/sdk/schema.json +0 -19
  345. package/generator/api/sdk.config.example.json +0 -24
  346. package/generator/guide/README.md +0 -84
  347. package/generator/guide/bin/package.json +0 -3
  348. package/generator/guide/bin/schematics/build/index.js +0 -36
  349. package/generator/guide/bin/schematics/init/index.js +0 -70
  350. package/generator/guide/bin/src/config/loader.js +0 -50
  351. package/generator/guide/bin/src/config/schema.js +0 -12
  352. package/generator/guide/bin/src/engine/component.js +0 -74
  353. package/generator/guide/bin/src/engine/frontmatter.js +0 -42
  354. package/generator/guide/bin/src/engine/index.js +0 -42
  355. package/generator/guide/bin/src/engine/naming.js +0 -39
  356. package/generator/guide/bin/src/engine/render.js +0 -36
  357. package/generator/guide/bin/src/engine/routes.js +0 -106
  358. package/generator/guide/bin/src/engine/walk.js +0 -35
  359. package/generator/guide/guide.config.example.json +0 -9
  360. package/generator/guide/schematics/build/schema.json +0 -14
  361. package/generator/guide/schematics/init/schema.json +0 -19
  362. package/layout/component/package.json +0 -4
  363. package/layout/package.json +0 -4
  364. package/layout/provider/package.json +0 -4
  365. package/layout/services/package.json +0 -4
  366. package/layout/shell/package.json +0 -4
  367. package/layout/token/directive/package.json +0 -4
  368. package/layout/token/package.json +0 -4
  369. package/layout/type/empty/package.json +0 -4
  370. package/layout/type/horizontal/package.json +0 -4
  371. package/layout/type/vertical/package.json +0 -4
  372. package/navigation/demo-data/package.json +0 -4
  373. package/navigation/icon/package.json +0 -4
  374. package/navigation/item/package.json +0 -4
  375. package/navigation/service/package.json +0 -4
  376. package/navigation/sidebar/package.json +0 -4
  377. package/navigation/topbar/README.md +0 -196
  378. package/navigation/topbar/package.json +0 -4
  379. package/navigation/types/package.json +0 -4
  380. package/theme/README.md +0 -174
  381. package/theme/package.json +0 -4
  382. package/theme/provider/package.json +0 -4
  383. package/theme/services/package.json +0 -4
  384. package/theme/styles/foundation/components.css +0 -81
  385. package/theme/styles/foundation/layers.css +0 -15
  386. package/theme/styles/foundation/tokens.css +0 -55
  387. package/theme/styles/index.css +0 -37
  388. package/theme/styles/integrations/material/autocomplete.css +0 -178
  389. package/theme/styles/integrations/material/button.css +0 -468
  390. package/theme/styles/integrations/material/dialog.css +0 -152
  391. package/theme/styles/integrations/material/select.css +0 -175
  392. package/theme/styles/integrations/material/slide-toggle.css +0 -234
  393. package/theme/styles/integrations/material/slider.css +0 -194
  394. package/theme/styles/integrations/material/tabs.css +0 -229
  395. package/theme/styles/integrations/material.css +0 -264
  396. package/theme/styles/integrations/tailwind.css +0 -114
  397. package/theme/styles/variants/color/amber.css +0 -31
  398. package/theme/styles/variants/color/base.css +0 -36
  399. package/theme/styles/variants/color/blue.css +0 -31
  400. package/theme/styles/variants/color/cyan.css +0 -31
  401. package/theme/styles/variants/color/emerald.css +0 -31
  402. package/theme/styles/variants/color/fuchsia.css +0 -31
  403. package/theme/styles/variants/color/green.css +0 -31
  404. package/theme/styles/variants/color/index.css +0 -22
  405. package/theme/styles/variants/color/indigo.css +0 -31
  406. package/theme/styles/variants/color/lime.css +0 -31
  407. package/theme/styles/variants/color/orange.css +0 -31
  408. package/theme/styles/variants/color/pink.css +0 -31
  409. package/theme/styles/variants/color/purple.css +0 -31
  410. package/theme/styles/variants/color/red.css +0 -31
  411. package/theme/styles/variants/color/rose.css +0 -31
  412. package/theme/styles/variants/color/sky.css +0 -31
  413. package/theme/styles/variants/color/teal.css +0 -31
  414. package/theme/styles/variants/color/violet.css +0 -31
  415. package/theme/styles/variants/color/yellow.css +0 -31
  416. package/theme/styles/variants/mode/dark.css +0 -20
  417. package/theme/styles/variants/mode/index.css +0 -6
  418. package/theme/styles/variants/mode/light.css +0 -24
  419. package/theme/styles/variants/style/brutal.css +0 -50
  420. package/theme/styles/variants/style/default.css +0 -54
  421. package/theme/styles/variants/style/index.css +0 -8
  422. package/theme/styles/variants/style/sharp.css +0 -50
  423. package/theme/styles/variants/style/soft.css +0 -50
  424. package/theme/token/package.json +0 -4
  425. package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
  426. package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
  427. package/types/ojiepermana-angular-component-alert.d.ts +0 -37
  428. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
  429. package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
  430. package/types/ojiepermana-angular-component-badge.d.ts +0 -19
  431. package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
  432. package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
  433. package/types/ojiepermana-angular-component-button.d.ts +0 -22
  434. package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
  435. package/types/ojiepermana-angular-component-card.d.ts +0 -60
  436. package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
  437. package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
  438. package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
  439. package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
  440. package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
  441. package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
  442. package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
  443. package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
  444. package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
  445. package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
  446. package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
  447. package/types/ojiepermana-angular-component-combobox.d.ts +0 -50
  448. package/types/ojiepermana-angular-component-command.d.ts +0 -99
  449. package/types/ojiepermana-angular-component-composer.d.ts +0 -90
  450. package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
  451. package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
  452. package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
  453. package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
  454. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -137
  455. package/types/ojiepermana-angular-component-editor.d.ts +0 -123
  456. package/types/ojiepermana-angular-component-empty.d.ts +0 -50
  457. package/types/ojiepermana-angular-component-form.d.ts +0 -141
  458. package/types/ojiepermana-angular-component-hover-card.d.ts +0 -74
  459. package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
  460. package/types/ojiepermana-angular-component-input-otp.d.ts +0 -136
  461. package/types/ojiepermana-angular-component-input.d.ts +0 -16
  462. package/types/ojiepermana-angular-component-item.d.ts +0 -88
  463. package/types/ojiepermana-angular-component-kanban.d.ts +0 -70
  464. package/types/ojiepermana-angular-component-kbd.d.ts +0 -16
  465. package/types/ojiepermana-angular-component-label.d.ts +0 -11
  466. package/types/ojiepermana-angular-component-menubar.d.ts +0 -67
  467. package/types/ojiepermana-angular-component-native-select.d.ts +0 -26
  468. package/types/ojiepermana-angular-component-navigation-menu.d.ts +0 -96
  469. package/types/ojiepermana-angular-component-pagination.d.ts +0 -33
  470. package/types/ojiepermana-angular-component-pillbox.d.ts +0 -157
  471. package/types/ojiepermana-angular-component-popover.d.ts +0 -43
  472. package/types/ojiepermana-angular-component-progress.d.ts +0 -17
  473. package/types/ojiepermana-angular-component-radio.d.ts +0 -40
  474. package/types/ojiepermana-angular-component-resizable.d.ts +0 -99
  475. package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
  476. package/types/ojiepermana-angular-component-select.d.ts +0 -57
  477. package/types/ojiepermana-angular-component-separator.d.ts +0 -14
  478. package/types/ojiepermana-angular-component-sheet.d.ts +0 -76
  479. package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
  480. package/types/ojiepermana-angular-component-slider.d.ts +0 -74
  481. package/types/ojiepermana-angular-component-spinner.d.ts +0 -13
  482. package/types/ojiepermana-angular-component-switch.d.ts +0 -40
  483. package/types/ojiepermana-angular-component-table.d.ts +0 -52
  484. package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
  485. package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
  486. package/types/ojiepermana-angular-component-timeline.d.ts +0 -63
  487. package/types/ojiepermana-angular-component-toast.d.ts +0 -38
  488. package/types/ojiepermana-angular-component-toggle-group.d.ts +0 -89
  489. package/types/ojiepermana-angular-component-toggle.d.ts +0 -25
  490. package/types/ojiepermana-angular-component-tooltip.d.ts +0 -89
  491. package/types/ojiepermana-angular-component-utils.d.ts +0 -5
  492. package/types/ojiepermana-angular-generator-api.d.ts +0 -86
  493. package/types/ojiepermana-angular-layout-component.d.ts +0 -205
  494. package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
  495. package/types/ojiepermana-angular-layout-services.d.ts +0 -25
  496. package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
  497. package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
  498. package/types/ojiepermana-angular-layout-token.d.ts +0 -36
  499. package/types/ojiepermana-angular-layout-type-empty.d.ts +0 -22
  500. package/types/ojiepermana-angular-layout-type-horizontal.d.ts +0 -36
  501. package/types/ojiepermana-angular-layout-type-vertical.d.ts +0 -38
  502. package/types/ojiepermana-angular-layout.d.ts +0 -164
  503. package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
  504. package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
  505. package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
  506. package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
  507. package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
  508. package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -74
  509. package/types/ojiepermana-angular-navigation-types.d.ts +0 -135
  510. package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
  511. package/types/ojiepermana-angular-theme-services.d.ts +0 -55
  512. package/types/ojiepermana-angular-theme-token.d.ts +0 -57
  513. package/types/ojiepermana-angular-theme.d.ts +0 -116
  514. package/types/ojiepermana-angular.d.ts +0 -3
@@ -0,0 +1,1574 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, makeEnvironmentProviders, provideEnvironmentInitializer, ChangeDetectionStrategy, Component, DestroyRef, signal, computed, input, effect } from '@angular/core';
3
+ import { DOCUMENT, Location } from '@angular/common';
4
+ import { HttpErrorResponse, HttpContextToken, provideHttpClient, withFetch, withInterceptors, HttpContext } from '@angular/common/http';
5
+ import { Router, RouterOutlet, RouterLink, ActivatedRoute } from '@angular/router';
6
+ import { AuthSessionService, AuthMagicLinkService } from '@edsis/sdk/auth';
7
+ import { ApiConfiguration, provideApiConfiguration } from '@edsis/sdk/shared';
8
+ import { UserProfileService } from '@edsis/sdk/user';
9
+ import { firstValueFrom, throwError, from, startWith, finalize } from 'rxjs';
10
+ import { switchMap, catchError } from 'rxjs/operators';
11
+ import { UiLayoutComponent, UiLayoutFluidComponent } from '@edsis/ui/layout';
12
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
+ import * as i1 from '@angular/forms';
14
+ import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
15
+ import { AspectRatioComponent } from '@edsis/ui/aspect-ratio';
16
+ import { ButtonComponent } from '@edsis/ui/button';
17
+ import { CardActionComponent, CardComponent, CardContentComponent, CardDescriptionComponent, CardHeaderComponent, CardTitleComponent, CardFooterComponent } from '@edsis/ui/card';
18
+ import { InputGroupAddonComponent, InputGroupButtonComponent, InputGroupComponent, InputGroupInputComponent } from '@edsis/ui/input-group';
19
+ import { LabelComponent } from '@edsis/ui/label';
20
+ import { SeparatorComponent } from '@edsis/ui/separator';
21
+ import { AlertComponent, AlertDescriptionComponent } from '@edsis/ui/alert';
22
+ import { SpinnerComponent } from '@edsis/ui/spinner';
23
+
24
+ const DEFAULT_LOGIN_PATH = '/login';
25
+ const DEFAULT_LOGOUT_PATH = '/logout';
26
+ const DEFAULT_VERIFY_PATH = '/verify';
27
+ const DEFAULT_AUTHENTICATED_HOME_PATH = '/dashboard';
28
+ const EDSIS_AUTH_CONFIG = new InjectionToken('EDSIS_AUTH_CONFIG');
29
+ function resolveEdsisAuthConfig(config) {
30
+ const loginPath = normalizePath(config.loginPath, DEFAULT_LOGIN_PATH);
31
+ return {
32
+ apiUrl: normalizeAbsoluteUrl(config.apiUrl, 'apiUrl'),
33
+ appUrl: normalizeAbsoluteUrl(config.appUrl, 'appUrl'),
34
+ loginPath,
35
+ logoutPath: normalizePath(config.logoutPath, DEFAULT_LOGOUT_PATH),
36
+ verifyPath: normalizePath(config.verifyPath, DEFAULT_VERIFY_PATH),
37
+ authenticatedHomePath: normalizePath(config.authenticatedHomePath, DEFAULT_AUTHENTICATED_HOME_PATH),
38
+ guestHomePath: normalizePath(config.guestHomePath, loginPath),
39
+ };
40
+ }
41
+ function normalizeAbsoluteUrl(value, label) {
42
+ const normalizedValue = value.trim();
43
+ if (!normalizedValue) {
44
+ throw new Error(`Edsis auth requires a non-empty ${label}.`);
45
+ }
46
+ const normalizedUrl = new URL(normalizedValue);
47
+ return normalizedUrl.toString().replace(/\/$/, '');
48
+ }
49
+ function normalizePath(value, fallback) {
50
+ const normalizedValue = value?.trim();
51
+ if (!normalizedValue) {
52
+ return fallback;
53
+ }
54
+ return (normalizedValue.startsWith('/') ? normalizedValue : `/${normalizedValue}`);
55
+ }
56
+
57
+ const AUTH_SESSION_STORAGE_KEYS = ['access_token', 'user_id', 'role', 'name'];
58
+ const AUTH_SESSION_METADATA_STORAGE_KEYS = ['access_token_trusted'];
59
+ const AUTH_SESSION_PERSISTENT_HINT_KEY = 'edsis_auth_refresh_hint';
60
+ const AUTH_SESSION_CHANGE_EVENT = 'edsis-auth-session-change';
61
+ const AUTH_SESSION_PEER_CHANNEL_NAME = 'edsis-auth-session-peer';
62
+ const EMPTY_SESSION_FINGERPRINT = '__empty_session__';
63
+ const JWT_PART_COUNT = 3;
64
+ const TOKEN_EXPIRY_SKEW_MS = 30_000;
65
+ const PEER_SESSION_REQUEST_TIMEOUT_MS = 150;
66
+ const TRUSTED_OPAQUE_TOKEN_REVALIDATION_MS = 90_000;
67
+ const AUTH_SESSION_MONITOR_INTERVAL_MS = 10_000;
68
+ let validatedAccessToken = '';
69
+ let validatedUntilEpochMs = 0;
70
+ let failedSessionFingerprint = null;
71
+ let pendingSessionValidation = null;
72
+ let sessionPeerChannel = null;
73
+ let sessionPeerChannelOwner = null;
74
+ let sessionPeerId = '';
75
+ let sessionMonitorCleanup = null;
76
+ let sessionMonitorOwner = null;
77
+ function clearSessionMonitor() {
78
+ sessionMonitorCleanup?.();
79
+ sessionMonitorCleanup = null;
80
+ sessionMonitorOwner = null;
81
+ }
82
+ function ɵresetAuthSessionModuleState() {
83
+ clearValidatedSession();
84
+ clearFailedSessionFingerprint();
85
+ pendingSessionValidation = null;
86
+ clearSessionMonitor();
87
+ sessionPeerChannel?.close();
88
+ sessionPeerChannel = null;
89
+ sessionPeerChannelOwner = null;
90
+ sessionPeerId = '';
91
+ }
92
+ function getSessionStorage(documentRef) {
93
+ return documentRef.defaultView?.sessionStorage ?? null;
94
+ }
95
+ function getLocalStorage(documentRef) {
96
+ return documentRef.defaultView?.localStorage ?? null;
97
+ }
98
+ function createSessionPeerId(windowRef) {
99
+ return windowRef.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(16).slice(2)}`;
100
+ }
101
+ function isSessionPeerResponseMessage(message) {
102
+ return message.type === 'session-response';
103
+ }
104
+ function buildStoredSessionData(documentRef) {
105
+ const session = readStoredSession(documentRef);
106
+ if (!session) {
107
+ return null;
108
+ }
109
+ return {
110
+ access_token: session.accessToken,
111
+ name: session.name,
112
+ role: session.role,
113
+ user_id: session.userId,
114
+ };
115
+ }
116
+ function ensureSessionPeerChannel(documentRef) {
117
+ const windowRef = documentRef.defaultView;
118
+ if (!windowRef?.BroadcastChannel) {
119
+ return null;
120
+ }
121
+ if (sessionPeerChannel && sessionPeerChannelOwner === windowRef) {
122
+ return sessionPeerChannel;
123
+ }
124
+ sessionPeerChannel?.close();
125
+ sessionPeerId = createSessionPeerId(windowRef);
126
+ sessionPeerChannelOwner = windowRef;
127
+ sessionPeerChannel = new windowRef.BroadcastChannel(AUTH_SESSION_PEER_CHANNEL_NAME);
128
+ sessionPeerChannel.addEventListener('message', (event) => {
129
+ const message = event.data;
130
+ if (message.type !== 'session-request' || message.senderId === sessionPeerId) {
131
+ return;
132
+ }
133
+ const sessionData = buildStoredSessionData(documentRef);
134
+ if (!sessionData) {
135
+ return;
136
+ }
137
+ sessionPeerChannel?.postMessage({
138
+ type: 'session-response',
139
+ requestId: message.requestId,
140
+ senderId: sessionPeerId,
141
+ sessionData,
142
+ });
143
+ });
144
+ return sessionPeerChannel;
145
+ }
146
+ async function restoreSessionFromPeer(documentRef) {
147
+ const windowRef = documentRef.defaultView;
148
+ const channel = ensureSessionPeerChannel(documentRef);
149
+ if (!windowRef || !channel || !sessionPeerId) {
150
+ return false;
151
+ }
152
+ const requestId = createSessionPeerId(windowRef);
153
+ return new Promise((resolve) => {
154
+ let settled = false;
155
+ let timeoutId = 0;
156
+ const finish = (result) => {
157
+ if (settled) {
158
+ return;
159
+ }
160
+ settled = true;
161
+ windowRef.clearTimeout(timeoutId);
162
+ channel.removeEventListener('message', handleMessage);
163
+ resolve(result);
164
+ };
165
+ const handleMessage = (event) => {
166
+ const message = event.data;
167
+ if (!isSessionPeerResponseMessage(message) ||
168
+ message.senderId === sessionPeerId ||
169
+ message.requestId !== requestId) {
170
+ return;
171
+ }
172
+ if (!readSessionDataValue(message.sessionData, 'access_token')) {
173
+ finish(false);
174
+ return;
175
+ }
176
+ persistSession(documentRef, message.sessionData);
177
+ finish(true);
178
+ };
179
+ timeoutId = windowRef.setTimeout(() => finish(false), PEER_SESSION_REQUEST_TIMEOUT_MS);
180
+ channel.addEventListener('message', handleMessage);
181
+ channel.postMessage({
182
+ type: 'session-request',
183
+ requestId,
184
+ senderId: sessionPeerId,
185
+ });
186
+ });
187
+ }
188
+ function readSessionStorageValue(documentRef, storageKey) {
189
+ return getSessionStorage(documentRef)?.getItem(storageKey)?.trim() ?? '';
190
+ }
191
+ function readSessionDataValue(sessionData, storageKey) {
192
+ const value = sessionData?.[storageKey];
193
+ return typeof value === 'string' ? value.trim() : '';
194
+ }
195
+ function notifySessionChange(documentRef) {
196
+ documentRef.defaultView?.dispatchEvent(new Event(AUTH_SESSION_CHANGE_EVENT));
197
+ }
198
+ function clearValidatedSession() {
199
+ validatedAccessToken = '';
200
+ validatedUntilEpochMs = 0;
201
+ }
202
+ function clearFailedSessionFingerprint() {
203
+ failedSessionFingerprint = null;
204
+ }
205
+ function readSessionFingerprint(documentRef) {
206
+ return readStoredAccessToken(documentRef) || EMPTY_SESSION_FINGERPRINT;
207
+ }
208
+ function hasFailedSessionFingerprint(documentRef) {
209
+ return failedSessionFingerprint === readSessionFingerprint(documentRef);
210
+ }
211
+ function markFailedSessionFingerprint(documentRef) {
212
+ failedSessionFingerprint = readSessionFingerprint(documentRef);
213
+ }
214
+ function readTrustedAccessToken(documentRef) {
215
+ return readSessionStorageValue(documentRef, 'access_token_trusted');
216
+ }
217
+ function hasRefreshCandidate(documentRef) {
218
+ return Boolean(readStoredAccessToken(documentRef) ||
219
+ readTrustedAccessToken(documentRef) ||
220
+ getLocalStorage(documentRef)?.getItem(AUTH_SESSION_PERSISTENT_HINT_KEY));
221
+ }
222
+ function shouldClearSessionAfterRefreshFailure(error) {
223
+ if (error instanceof HttpErrorResponse) {
224
+ return error.status === 401 || error.status === 403;
225
+ }
226
+ if (error instanceof Error) {
227
+ return /invalid refresh token|unauthorized|forbidden/iu.test(error.message);
228
+ }
229
+ return false;
230
+ }
231
+ function getTokenExpiryEpochMs(documentRef, accessToken) {
232
+ const windowRef = documentRef.defaultView;
233
+ const tokenParts = accessToken.split('.');
234
+ if (!windowRef?.atob || tokenParts.length !== JWT_PART_COUNT) {
235
+ return null;
236
+ }
237
+ const normalizedPayload = tokenParts[1].replace(/-/g, '+').replace(/_/g, '/');
238
+ const paddedPayload = normalizedPayload.padEnd(Math.ceil(normalizedPayload.length / 4) * 4, '=');
239
+ try {
240
+ const parsedPayload = JSON.parse(windowRef.atob(paddedPayload));
241
+ return typeof parsedPayload.exp === 'number' ? parsedPayload.exp * 1000 : null;
242
+ }
243
+ catch {
244
+ return null;
245
+ }
246
+ }
247
+ function markValidatedSession(documentRef) {
248
+ const accessToken = readStoredAccessToken(documentRef);
249
+ if (!accessToken) {
250
+ clearValidatedSession();
251
+ return;
252
+ }
253
+ const tokenExpiryEpochMs = getTokenExpiryEpochMs(documentRef, accessToken);
254
+ if (!tokenExpiryEpochMs) {
255
+ if (readTrustedAccessToken(documentRef) !== accessToken) {
256
+ clearValidatedSession();
257
+ return;
258
+ }
259
+ validatedAccessToken = accessToken;
260
+ validatedUntilEpochMs = Date.now() + TRUSTED_OPAQUE_TOKEN_REVALIDATION_MS;
261
+ return;
262
+ }
263
+ validatedAccessToken = accessToken;
264
+ validatedUntilEpochMs = tokenExpiryEpochMs;
265
+ }
266
+ function hasValidatedSession(documentRef) {
267
+ const accessToken = readStoredAccessToken(documentRef);
268
+ if (!accessToken) {
269
+ clearValidatedSession();
270
+ return false;
271
+ }
272
+ if (accessToken !== validatedAccessToken) {
273
+ markValidatedSession(documentRef);
274
+ }
275
+ if (!validatedAccessToken) {
276
+ clearValidatedSession();
277
+ return false;
278
+ }
279
+ return validatedUntilEpochMs > Date.now() + TOKEN_EXPIRY_SKEW_MS;
280
+ }
281
+ function hasStoredSession(documentRef) {
282
+ return Boolean(readStoredAccessToken(documentRef));
283
+ }
284
+ function readStoredAccessToken(documentRef) {
285
+ return readSessionStorageValue(documentRef, 'access_token');
286
+ }
287
+ function readStoredSession(documentRef) {
288
+ const accessToken = readStoredAccessToken(documentRef);
289
+ if (!accessToken) {
290
+ return null;
291
+ }
292
+ const userId = readSessionStorageValue(documentRef, 'user_id');
293
+ const role = readSessionStorageValue(documentRef, 'role');
294
+ const name = readSessionStorageValue(documentRef, 'name');
295
+ return {
296
+ accessToken,
297
+ userId: userId || undefined,
298
+ role: role || undefined,
299
+ name: name || undefined,
300
+ };
301
+ }
302
+ function persistSession(documentRef, sessionData) {
303
+ ensureSessionPeerChannel(documentRef);
304
+ const sessionStorageRef = getSessionStorage(documentRef);
305
+ if (!sessionStorageRef) {
306
+ clearValidatedSession();
307
+ notifySessionChange(documentRef);
308
+ return null;
309
+ }
310
+ const nextAccessToken = readSessionDataValue(sessionData, 'access_token');
311
+ if (!nextAccessToken) {
312
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS) {
313
+ sessionStorageRef.removeItem(storageKey);
314
+ }
315
+ for (const storageKey of AUTH_SESSION_METADATA_STORAGE_KEYS) {
316
+ sessionStorageRef.removeItem(storageKey);
317
+ }
318
+ getLocalStorage(documentRef)?.removeItem(AUTH_SESSION_PERSISTENT_HINT_KEY);
319
+ clearValidatedSession();
320
+ clearFailedSessionFingerprint();
321
+ notifySessionChange(documentRef);
322
+ return null;
323
+ }
324
+ sessionStorageRef.setItem('access_token', nextAccessToken);
325
+ sessionStorageRef.setItem('access_token_trusted', nextAccessToken);
326
+ getLocalStorage(documentRef)?.setItem(AUTH_SESSION_PERSISTENT_HINT_KEY, '1');
327
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS.slice(1)) {
328
+ if (!sessionData || !Object.hasOwn(sessionData, storageKey)) {
329
+ continue;
330
+ }
331
+ const nextValue = readSessionDataValue(sessionData, storageKey);
332
+ if (nextValue) {
333
+ sessionStorageRef.setItem(storageKey, nextValue);
334
+ continue;
335
+ }
336
+ sessionStorageRef.removeItem(storageKey);
337
+ }
338
+ markValidatedSession(documentRef);
339
+ clearFailedSessionFingerprint();
340
+ notifySessionChange(documentRef);
341
+ return readStoredSession(documentRef);
342
+ }
343
+ function clearStoredSession(documentRef, options) {
344
+ const sessionStorageRef = getSessionStorage(documentRef);
345
+ for (const storageKey of AUTH_SESSION_STORAGE_KEYS) {
346
+ sessionStorageRef?.removeItem(storageKey);
347
+ }
348
+ for (const storageKey of AUTH_SESSION_METADATA_STORAGE_KEYS) {
349
+ sessionStorageRef?.removeItem(storageKey);
350
+ }
351
+ getLocalStorage(documentRef)?.removeItem(AUTH_SESSION_PERSISTENT_HINT_KEY);
352
+ clearValidatedSession();
353
+ if (!options?.preserveFailedSessionFingerprint) {
354
+ clearFailedSessionFingerprint();
355
+ }
356
+ notifySessionChange(documentRef);
357
+ }
358
+ function startAuthSessionMonitor(documentRef, authSessionService, options) {
359
+ const windowRef = documentRef.defaultView;
360
+ if (!windowRef) {
361
+ return;
362
+ }
363
+ if (sessionMonitorCleanup && sessionMonitorOwner === windowRef) {
364
+ return;
365
+ }
366
+ clearSessionMonitor();
367
+ let disposed = false;
368
+ const runValidation = async () => {
369
+ const hadRefreshCandidate = hasRefreshCandidate(documentRef);
370
+ if (!hadRefreshCandidate) {
371
+ return;
372
+ }
373
+ const isSessionValid = options?.validateSession
374
+ ? await options.validateSession()
375
+ : await validateStoredSession(documentRef, authSessionService, { forceRefresh: true });
376
+ if (!disposed && !isSessionValid && hadRefreshCandidate) {
377
+ options?.onSessionInvalid?.();
378
+ }
379
+ };
380
+ const handleFocus = () => {
381
+ void runValidation();
382
+ };
383
+ const handleVisibilityChange = () => {
384
+ if (documentRef.visibilityState === 'visible') {
385
+ void runValidation();
386
+ }
387
+ };
388
+ const intervalId = windowRef.setInterval(handleFocus, AUTH_SESSION_MONITOR_INTERVAL_MS);
389
+ windowRef.addEventListener('focus', handleFocus);
390
+ documentRef.addEventListener('visibilitychange', handleVisibilityChange);
391
+ sessionMonitorOwner = windowRef;
392
+ sessionMonitorCleanup = () => {
393
+ disposed = true;
394
+ windowRef.clearInterval(intervalId);
395
+ windowRef.removeEventListener('focus', handleFocus);
396
+ documentRef.removeEventListener('visibilitychange', handleVisibilityChange);
397
+ };
398
+ }
399
+ async function validateStoredSession(documentRef, authSessionService, options) {
400
+ ensureSessionPeerChannel(documentRef);
401
+ if (!options?.forceRefresh && hasValidatedSession(documentRef)) {
402
+ return true;
403
+ }
404
+ if (pendingSessionValidation) {
405
+ return pendingSessionValidation;
406
+ }
407
+ pendingSessionValidation = (async () => {
408
+ try {
409
+ if (!options?.forceRefresh && !hasStoredSession(documentRef) && (await restoreSessionFromPeer(documentRef))) {
410
+ return true;
411
+ }
412
+ if (!options?.forceRefresh && hasValidatedSession(documentRef)) {
413
+ return true;
414
+ }
415
+ if (!options?.forceRefresh && !hasRefreshCandidate(documentRef)) {
416
+ clearValidatedSession();
417
+ return false;
418
+ }
419
+ if (hasFailedSessionFingerprint(documentRef)) {
420
+ return false;
421
+ }
422
+ const response = await firstValueFrom(authSessionService.refreshAuthToken());
423
+ persistSession(documentRef, response.data);
424
+ return hasValidatedSession(documentRef);
425
+ }
426
+ catch (error) {
427
+ if (!shouldClearSessionAfterRefreshFailure(error)) {
428
+ clearValidatedSession();
429
+ return hasStoredSession(documentRef);
430
+ }
431
+ clearStoredSession(documentRef, { preserveFailedSessionFingerprint: true });
432
+ markFailedSessionFingerprint(documentRef);
433
+ return false;
434
+ }
435
+ finally {
436
+ pendingSessionValidation = null;
437
+ }
438
+ })();
439
+ return pendingSessionValidation;
440
+ }
441
+ function injectSessionState() {
442
+ const documentRef = inject(DOCUMENT);
443
+ const authSessionService = inject(AuthSessionService);
444
+ return validateStoredSession(documentRef, authSessionService);
445
+ }
446
+ function injectSessionRefresh() {
447
+ const documentRef = inject(DOCUMENT);
448
+ const authSessionService = inject(AuthSessionService);
449
+ return validateStoredSession(documentRef, authSessionService, { forceRefresh: true });
450
+ }
451
+ function injectSessionClear() {
452
+ clearStoredSession(inject(DOCUMENT));
453
+ }
454
+
455
+ const PROTECTED_API_PATH_PREFIX = '/v1/';
456
+ const AUTH_PATH_PREFIX = '/v1/auth/';
457
+ const HEALTH_PATH = '/health';
458
+ const EDSIS_SKIP_AUTH = new HttpContextToken(() => false);
459
+ const EDSIS_SKIP_SESSION_REFRESH = new HttpContextToken(() => false);
460
+ const EDSIS_AUTH_RETRY = new HttpContextToken(() => false);
461
+ function normalizeUrl(url) {
462
+ try {
463
+ return new URL(url);
464
+ }
465
+ catch {
466
+ return null;
467
+ }
468
+ }
469
+ function resolveApiPath(url, rootUrl) {
470
+ const normalizedUrl = normalizeUrl(url);
471
+ const normalizedRootUrl = normalizeUrl(rootUrl);
472
+ if (normalizedUrl && normalizedRootUrl) {
473
+ if (normalizedUrl.origin !== normalizedRootUrl.origin) {
474
+ return null;
475
+ }
476
+ if (!normalizedUrl.pathname.startsWith(normalizedRootUrl.pathname)) {
477
+ return null;
478
+ }
479
+ const apiPath = normalizedUrl.pathname.slice(normalizedRootUrl.pathname.length) || '/';
480
+ return apiPath.startsWith('/') ? apiPath : `/${apiPath}`;
481
+ }
482
+ if (url.startsWith(rootUrl)) {
483
+ const apiPath = url.slice(rootUrl.length).split(/[?#]/, 1)[0] ?? '/';
484
+ return apiPath.startsWith('/') ? apiPath : `/${apiPath}`;
485
+ }
486
+ if (url.startsWith('/')) {
487
+ return url.split(/[?#]/, 1)[0] ?? url;
488
+ }
489
+ return null;
490
+ }
491
+ function isAuthRequest(apiPath) {
492
+ return apiPath.startsWith(AUTH_PATH_PREFIX);
493
+ }
494
+ function isProtectedApiRequest(apiPath) {
495
+ return apiPath.startsWith(PROTECTED_API_PATH_PREFIX) && !isAuthRequest(apiPath);
496
+ }
497
+ function isHealthRequest(apiPath) {
498
+ return apiPath === HEALTH_PATH;
499
+ }
500
+ function isHandledRequest(apiPath) {
501
+ return isProtectedApiRequest(apiPath) || isAuthRequest(apiPath) || isHealthRequest(apiPath);
502
+ }
503
+ function applyCookieCredentials(request, apiPath) {
504
+ return isAuthRequest(apiPath) && !request.withCredentials ? request.clone({ withCredentials: true }) : request;
505
+ }
506
+ function applyBearerToken(request, accessToken, isRetry = false) {
507
+ return request.clone({
508
+ context: isRetry ? request.context.set(EDSIS_AUTH_RETRY, true) : request.context,
509
+ setHeaders: {
510
+ Authorization: `Bearer ${accessToken}`,
511
+ },
512
+ });
513
+ }
514
+ async function resolveAccessToken(documentRef, authSessionService, options) {
515
+ const isSessionValid = await validateStoredSession(documentRef, authSessionService, options);
516
+ return isSessionValid ? readStoredAccessToken(documentRef) : '';
517
+ }
518
+ function handleUnauthorizedError(error, request, next, documentRef, authSessionService) {
519
+ if (!(error instanceof HttpErrorResponse) ||
520
+ error.status !== 401 ||
521
+ request.context.get(EDSIS_AUTH_RETRY) ||
522
+ request.context.get(EDSIS_SKIP_SESSION_REFRESH)) {
523
+ return throwError(() => error);
524
+ }
525
+ return from(resolveAccessToken(documentRef, authSessionService, { forceRefresh: true })).pipe(switchMap((refreshedAccessToken) => {
526
+ if (!refreshedAccessToken) {
527
+ clearStoredSession(documentRef);
528
+ return throwError(() => error);
529
+ }
530
+ return next(applyBearerToken(request, refreshedAccessToken, true));
531
+ }), catchError((refreshError) => {
532
+ if (shouldClearSessionAfterRefreshFailure(refreshError)) {
533
+ clearStoredSession(documentRef);
534
+ }
535
+ return throwError(() => error);
536
+ }));
537
+ }
538
+ const edsisAuthInterceptor = (request, next) => {
539
+ const documentRef = inject(DOCUMENT);
540
+ const apiConfiguration = inject(ApiConfiguration);
541
+ const authSessionService = inject(AuthSessionService);
542
+ if (request.context.get(EDSIS_SKIP_AUTH)) {
543
+ return next(request);
544
+ }
545
+ const apiPath = resolveApiPath(request.url, apiConfiguration.rootUrl);
546
+ if (!apiPath || !isHandledRequest(apiPath)) {
547
+ return next(request);
548
+ }
549
+ const preparedRequest = applyCookieCredentials(request, apiPath);
550
+ if (isAuthRequest(apiPath) || isHealthRequest(apiPath)) {
551
+ return next(preparedRequest);
552
+ }
553
+ const skipSessionRefresh = request.context.get(EDSIS_SKIP_SESSION_REFRESH);
554
+ return from(skipSessionRefresh
555
+ ? Promise.resolve(readStoredAccessToken(documentRef))
556
+ : resolveAccessToken(documentRef, authSessionService)).pipe(switchMap((accessToken) => {
557
+ const authorizedRequest = accessToken ? applyBearerToken(preparedRequest, accessToken) : preparedRequest;
558
+ return next(authorizedRequest).pipe(catchError((error) => handleUnauthorizedError(error, preparedRequest, next, documentRef, authSessionService)));
559
+ }));
560
+ };
561
+
562
+ function provideEdsisAuth(config) {
563
+ const resolvedConfig = resolveEdsisAuthConfig(config);
564
+ return makeEnvironmentProviders([
565
+ provideApiConfiguration(resolvedConfig.apiUrl),
566
+ provideHttpClient(withFetch(), withInterceptors([edsisAuthInterceptor])),
567
+ provideEnvironmentInitializer(() => {
568
+ const documentRef = inject(DOCUMENT);
569
+ const authSessionService = inject(AuthSessionService);
570
+ const router = inject(Router, { optional: true });
571
+ const userProfileService = inject(UserProfileService);
572
+ startAuthSessionMonitor(documentRef, authSessionService, {
573
+ validateSession: async () => {
574
+ if (!readStoredAccessToken(documentRef)) {
575
+ return true;
576
+ }
577
+ try {
578
+ await firstValueFrom(userProfileService.getCurrentUser(undefined, new HttpContext().set(EDSIS_SKIP_SESSION_REFRESH, true)));
579
+ return true;
580
+ }
581
+ catch (error) {
582
+ if (error instanceof HttpErrorResponse && error.status === 401) {
583
+ clearStoredSession(documentRef);
584
+ return false;
585
+ }
586
+ return true;
587
+ }
588
+ },
589
+ onSessionInvalid: () => {
590
+ if (router) {
591
+ void router.navigateByUrl(resolvedConfig.guestHomePath, { replaceUrl: true });
592
+ return;
593
+ }
594
+ const windowRef = documentRef.defaultView;
595
+ if (!windowRef) {
596
+ return;
597
+ }
598
+ const guestUrl = new URL(resolvedConfig.guestHomePath, windowRef.location.origin).toString();
599
+ if (windowRef.location.href !== guestUrl) {
600
+ windowRef.location.replace(guestUrl);
601
+ }
602
+ },
603
+ });
604
+ }),
605
+ {
606
+ provide: EDSIS_AUTH_CONFIG,
607
+ useValue: resolvedConfig,
608
+ },
609
+ ]);
610
+ }
611
+
612
+ const authenticatedGuard = async () => {
613
+ const router = inject(Router);
614
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
615
+ if (await injectSessionState()) {
616
+ return true;
617
+ }
618
+ return router.parseUrl(authConfig.guestHomePath);
619
+ };
620
+ const homeRedirectGuard = async () => {
621
+ const router = inject(Router);
622
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
623
+ return router.parseUrl((await injectSessionState()) ? authConfig.authenticatedHomePath : authConfig.guestHomePath);
624
+ };
625
+ const guestOnlyGuard = async () => {
626
+ const router = inject(Router);
627
+ const authConfig = inject(EDSIS_AUTH_CONFIG);
628
+ if (!(await injectSessionState())) {
629
+ return true;
630
+ }
631
+ return router.parseUrl(authConfig.authenticatedHomePath);
632
+ };
633
+
634
+ class AuthShellPage {
635
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthShellPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
636
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0", type: AuthShellPage, isStandalone: true, selector: "edsis-auth-shell-page", host: { classAttribute: "contents" }, ngImport: i0, template: `
637
+ <ui-layout surface="grid" appearance="border-rail" width="fluid">
638
+ <ui-layout-fluid>
639
+ <div class="w-full max-w-xl">
640
+ <router-outlet />
641
+ </div>
642
+ </ui-layout-fluid>
643
+ </ui-layout>
644
+ `, 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 });
645
+ }
646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthShellPage, decorators: [{
647
+ type: Component,
648
+ args: [{
649
+ selector: 'edsis-auth-shell-page',
650
+ imports: [RouterOutlet, UiLayoutComponent, UiLayoutFluidComponent],
651
+ host: {
652
+ class: 'contents',
653
+ },
654
+ template: `
655
+ <ui-layout surface="grid" appearance="border-rail" width="fluid">
656
+ <ui-layout-fluid>
657
+ <div class="w-full max-w-xl">
658
+ <router-outlet />
659
+ </div>
660
+ </ui-layout-fluid>
661
+ </ui-layout>
662
+ `,
663
+ changeDetection: ChangeDetectionStrategy.OnPush,
664
+ }]
665
+ }] });
666
+
667
+ function buildVerifyUrl(config, runtimeOrigin = readRuntimeOrigin()) {
668
+ const baseUrl = normalizeText(runtimeOrigin) ?? config.appUrl;
669
+ return new URL(config.verifyPath, `${baseUrl}/`).toString();
670
+ }
671
+ function readRuntimeOrigin() {
672
+ if (typeof window === 'undefined') {
673
+ return null;
674
+ }
675
+ return normalizeText(window.location.origin);
676
+ }
677
+ function extractMagicToken(queryToken, fragment) {
678
+ const tokenFromQuery = normalizeText(queryToken);
679
+ if (tokenFromQuery) {
680
+ return tokenFromQuery;
681
+ }
682
+ const normalizedFragment = normalizeText(fragment?.startsWith('#') ? fragment.slice(1) : fragment);
683
+ if (!normalizedFragment) {
684
+ return null;
685
+ }
686
+ const fragmentParams = new URLSearchParams(normalizedFragment);
687
+ const tokenFromFragment = normalizeText(fragmentParams.get('token')) ??
688
+ normalizeText(fragmentParams.get('magic_token')) ??
689
+ normalizeText(fragmentParams.get('value'));
690
+ if (tokenFromFragment) {
691
+ return tokenFromFragment;
692
+ }
693
+ return normalizedFragment.includes('=') ? null : normalizedFragment;
694
+ }
695
+ function getResponseMessage(response, fallback) {
696
+ if (!hasMessage(response)) {
697
+ return fallback;
698
+ }
699
+ return normalizeText(response.message) ?? fallback;
700
+ }
701
+ function getErrorMessage(error, fallback) {
702
+ if (error instanceof HttpErrorResponse) {
703
+ const errorBody = error.error;
704
+ if (typeof errorBody === 'string') {
705
+ return normalizeText(errorBody) ?? fallback;
706
+ }
707
+ if (hasMessage(errorBody)) {
708
+ return normalizeText(errorBody.message) ?? fallback;
709
+ }
710
+ return normalizeText(error.message) ?? fallback;
711
+ }
712
+ if (error instanceof Error) {
713
+ return normalizeText(error.message) ?? fallback;
714
+ }
715
+ return fallback;
716
+ }
717
+ function hasMessage(value) {
718
+ return typeof value === 'object' && value !== null && 'message' in value;
719
+ }
720
+ function normalizeText(value) {
721
+ if (typeof value !== 'string') {
722
+ return null;
723
+ }
724
+ const normalizedValue = value.trim();
725
+ return normalizedValue.length > 0 ? normalizedValue : null;
726
+ }
727
+
728
+ class AuthLoginPage {
729
+ destroyRef = inject(DestroyRef);
730
+ formBuilder = inject(FormBuilder);
731
+ authMagicLinkService = inject(AuthMagicLinkService);
732
+ authConfig = inject(EDSIS_AUTH_CONFIG);
733
+ form = this.formBuilder.nonNullable.group({
734
+ email: ['', [Validators.required, Validators.email, Validators.maxLength(255)]],
735
+ });
736
+ isSubmitting = signal(false, /* @ts-ignore */
737
+ ...(ngDevMode ? [{ debugName: "isSubmitting" }] : /* istanbul ignore next */ []));
738
+ responseMessage = signal(null, /* @ts-ignore */
739
+ ...(ngDevMode ? [{ debugName: "responseMessage" }] : /* istanbul ignore next */ []));
740
+ errorMessage = signal(null, /* @ts-ignore */
741
+ ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
742
+ emailControl = this.form.controls.email;
743
+ emailFeedbackId = 'email-feedback';
744
+ emailControlState = toSignal(this.emailControl.events.pipe(startWith(null)), {
745
+ initialValue: null,
746
+ });
747
+ hasInlineError = computed(() => {
748
+ this.emailControlState();
749
+ return this.emailControl.invalid && (this.emailControl.dirty || this.emailControl.touched);
750
+ }, /* @ts-ignore */
751
+ ...(ngDevMode ? [{ debugName: "hasInlineError" }] : /* istanbul ignore next */ []));
752
+ inlineErrorMessage = computed(() => {
753
+ if (!this.hasInlineError()) {
754
+ return null;
755
+ }
756
+ return this.emailControl.hasError('required')
757
+ ? 'Email wajib diisi.'
758
+ : 'Gunakan format email yang valid dengan panjang maksimal 255 karakter.';
759
+ }, /* @ts-ignore */
760
+ ...(ngDevMode ? [{ debugName: "inlineErrorMessage" }] : /* istanbul ignore next */ []));
761
+ feedbackMessage = computed(() => this.inlineErrorMessage() ?? this.responseMessage() ?? this.errorMessage(), /* @ts-ignore */
762
+ ...(ngDevMode ? [{ debugName: "feedbackMessage" }] : /* istanbul ignore next */ []));
763
+ feedbackTone = computed(() => {
764
+ if (this.inlineErrorMessage() || this.errorMessage()) {
765
+ return 'error';
766
+ }
767
+ if (this.responseMessage()) {
768
+ return 'success';
769
+ }
770
+ return null;
771
+ }, /* @ts-ignore */
772
+ ...(ngDevMode ? [{ debugName: "feedbackTone" }] : /* istanbul ignore next */ []));
773
+ fieldTone = computed(() => {
774
+ if (this.hasInlineError() || this.errorMessage()) {
775
+ return 'error';
776
+ }
777
+ if (this.responseMessage()) {
778
+ return 'success';
779
+ }
780
+ return 'idle';
781
+ }, /* @ts-ignore */
782
+ ...(ngDevMode ? [{ debugName: "fieldTone" }] : /* istanbul ignore next */ []));
783
+ emailFieldClasses = computed(() => {
784
+ 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!';
785
+ switch (this.fieldTone()) {
786
+ case 'error':
787
+ return `${baseClasses} border-destructive focus-within:border-destructive focus-within:ring-destructive/20`;
788
+ case 'success':
789
+ return `${baseClasses} border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20`;
790
+ default:
791
+ return baseClasses;
792
+ }
793
+ }, /* @ts-ignore */
794
+ ...(ngDevMode ? [{ debugName: "emailFieldClasses" }] : /* istanbul ignore next */ []));
795
+ submit() {
796
+ if (this.form.invalid) {
797
+ this.form.markAllAsTouched();
798
+ return;
799
+ }
800
+ this.isSubmitting.set(true);
801
+ this.responseMessage.set(null);
802
+ this.errorMessage.set(null);
803
+ const email = this.emailControl.getRawValue().trim().toLowerCase();
804
+ this.emailControl.setValue(email);
805
+ this.authMagicLinkService
806
+ .requestMagicLoginLink({
807
+ body: {
808
+ email,
809
+ frontend_url: buildVerifyUrl(this.authConfig),
810
+ },
811
+ })
812
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.isSubmitting.set(false)))
813
+ .subscribe({
814
+ next: (response) => {
815
+ this.responseMessage.set(getResponseMessage(response, 'Magic link berhasil dikirim.'));
816
+ },
817
+ error: (error) => {
818
+ this.errorMessage.set(getErrorMessage(error, 'Gagal mengirim magic link.'));
819
+ },
820
+ });
821
+ }
822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthLoginPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: AuthLoginPage, isStandalone: true, selector: "edsis-auth-login-page", host: { classAttribute: "block" }, ngImport: i0, template: `
824
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
825
+ <ui-card-header
826
+ 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">
827
+ <div class="w-16 shrink-0 sm:w-20">
828
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
829
+ <div
830
+ 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]"
831
+ style="font-family: 'Arial Black', Arial, sans-serif;">
832
+ ETOS
833
+ </div>
834
+ </ui-aspect-ratio>
835
+ </div>
836
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
837
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Etos Account Center</ui-card-title>
838
+ <p ui-card-description class="max-w-xl leading-6">
839
+ Masukkan email yang terdaftar. Kami akan mengirimkan tautan verifikasi untuk masuk ke aplikasi.
840
+ </p>
841
+ </div>
842
+ <ui-card-action
843
+ 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">
844
+ LOGIN
845
+ </ui-card-action>
846
+ </ui-card-header>
847
+
848
+ <ui-card-content class="pt-4 sm:pt-5">
849
+ <form class="space-y-6" [formGroup]="form" (ngSubmit)="submit()">
850
+ <div class="space-y-3">
851
+ <label ui-label for="email" class="sr-only">Alamat email</label>
852
+ <ui-input-group [class]="emailFieldClasses()">
853
+ <ui-input-group-addon
854
+ aria-hidden="true"
855
+ class="min-h-12 px-4 bg-transparent text-primary [&_svg]:size-6!">
856
+ <svg
857
+ viewBox="0 0 24 24"
858
+ class="fill-none stroke-current"
859
+ stroke-width="1.8"
860
+ stroke-linecap="round"
861
+ stroke-linejoin="round">
862
+ <path d="M4 7.5h16" />
863
+ <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" />
864
+ <path d="m5 8 7 5 7-5" />
865
+ </svg>
866
+ </ui-input-group-addon>
867
+
868
+ <input
869
+ ui-input-group-input
870
+ class="h-12! px-4! text-base!"
871
+ id="email"
872
+ type="email"
873
+ inputmode="email"
874
+ autocomplete="email"
875
+ [attr.aria-describedby]="feedbackMessage() ? emailFeedbackId : null"
876
+ [attr.aria-invalid]="fieldTone() === 'error' ? 'true' : null"
877
+ formControlName="email"
878
+ placeholder="your@email.com" />
879
+
880
+ <button
881
+ ui-input-group-button
882
+ type="submit"
883
+ variant="default"
884
+ size="sm"
885
+ [disabled]="form.invalid || isSubmitting()"
886
+ class="order-30 h-12! min-w-24 rounded-none px-5 text-sm font-medium">
887
+ {{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
888
+ </button>
889
+ </ui-input-group>
890
+
891
+ @if (feedbackMessage(); as feedback) {
892
+ <p
893
+ [id]="emailFeedbackId"
894
+ class="text-sm"
895
+ [class.text-destructive]="feedbackTone() === 'error'"
896
+ [class.text-emerald-700]="feedbackTone() === 'success'"
897
+ [attr.role]="feedbackTone() === 'error' ? 'alert' : 'status'"
898
+ [attr.aria-live]="feedbackTone() === 'error' ? 'assertive' : 'polite'">
899
+ {{ feedback }}
900
+ </p>
901
+ }
902
+ </div>
903
+
904
+ <div class="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 pt-2">
905
+ <ui-separator class="w-full" />
906
+ <span class="min-w-14 text-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
907
+ Atau
908
+ </span>
909
+ <ui-separator class="w-full" />
910
+ </div>
911
+
912
+ <div class="grid gap-3 pt-2 sm:grid-cols-3">
913
+ <button
914
+ ui-button
915
+ type="button"
916
+ variant="outline"
917
+ size="lg"
918
+ disabled
919
+ aria-label="Login dengan Google segera hadir"
920
+ title="Segera hadir"
921
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
922
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
923
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
924
+ <path
925
+ fill="#EA4335"
926
+ 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" />
927
+ <path
928
+ fill="#34A853"
929
+ 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" />
930
+ <path
931
+ fill="#4A90E2"
932
+ 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" />
933
+ <path
934
+ fill="#FBBC05"
935
+ 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" />
936
+ </svg>
937
+ </span>
938
+ Google
939
+ </button>
940
+ <button
941
+ ui-button
942
+ type="button"
943
+ variant="outline"
944
+ size="lg"
945
+ disabled
946
+ aria-label="Login dengan Microsoft segera hadir"
947
+ title="Segera hadir"
948
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
949
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
950
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
951
+ <path fill="#F25022" d="M2 2h9.5v9.5H2z" />
952
+ <path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
953
+ <path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
954
+ <path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
955
+ </svg>
956
+ </span>
957
+ Microsoft
958
+ </button>
959
+ <button
960
+ ui-button
961
+ type="button"
962
+ variant="outline"
963
+ size="lg"
964
+ disabled
965
+ aria-label="Login dengan Apple segera hadir"
966
+ title="Segera hadir"
967
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
968
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
969
+ <svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
970
+ <path
971
+ 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" />
972
+ </svg>
973
+ </span>
974
+ Apple
975
+ </button>
976
+ </div>
977
+ </form>
978
+ </ui-card-content>
979
+ </ui-card>
980
+ `, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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 });
981
+ }
982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthLoginPage, decorators: [{
983
+ type: Component,
984
+ args: [{
985
+ selector: 'edsis-auth-login-page',
986
+ imports: [
987
+ ReactiveFormsModule,
988
+ AspectRatioComponent,
989
+ ButtonComponent,
990
+ CardActionComponent,
991
+ CardComponent,
992
+ CardContentComponent,
993
+ CardDescriptionComponent,
994
+ CardHeaderComponent,
995
+ CardTitleComponent,
996
+ InputGroupAddonComponent,
997
+ InputGroupButtonComponent,
998
+ InputGroupComponent,
999
+ InputGroupInputComponent,
1000
+ LabelComponent,
1001
+ SeparatorComponent,
1002
+ ],
1003
+ host: {
1004
+ class: 'block',
1005
+ },
1006
+ template: `
1007
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1008
+ <ui-card-header
1009
+ 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">
1010
+ <div class="w-16 shrink-0 sm:w-20">
1011
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1012
+ <div
1013
+ 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]"
1014
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1015
+ ETOS
1016
+ </div>
1017
+ </ui-aspect-ratio>
1018
+ </div>
1019
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1020
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Etos Account Center</ui-card-title>
1021
+ <p ui-card-description class="max-w-xl leading-6">
1022
+ Masukkan email yang terdaftar. Kami akan mengirimkan tautan verifikasi untuk masuk ke aplikasi.
1023
+ </p>
1024
+ </div>
1025
+ <ui-card-action
1026
+ 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">
1027
+ LOGIN
1028
+ </ui-card-action>
1029
+ </ui-card-header>
1030
+
1031
+ <ui-card-content class="pt-4 sm:pt-5">
1032
+ <form class="space-y-6" [formGroup]="form" (ngSubmit)="submit()">
1033
+ <div class="space-y-3">
1034
+ <label ui-label for="email" class="sr-only">Alamat email</label>
1035
+ <ui-input-group [class]="emailFieldClasses()">
1036
+ <ui-input-group-addon
1037
+ aria-hidden="true"
1038
+ class="min-h-12 px-4 bg-transparent text-primary [&_svg]:size-6!">
1039
+ <svg
1040
+ viewBox="0 0 24 24"
1041
+ class="fill-none stroke-current"
1042
+ stroke-width="1.8"
1043
+ stroke-linecap="round"
1044
+ stroke-linejoin="round">
1045
+ <path d="M4 7.5h16" />
1046
+ <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" />
1047
+ <path d="m5 8 7 5 7-5" />
1048
+ </svg>
1049
+ </ui-input-group-addon>
1050
+
1051
+ <input
1052
+ ui-input-group-input
1053
+ class="h-12! px-4! text-base!"
1054
+ id="email"
1055
+ type="email"
1056
+ inputmode="email"
1057
+ autocomplete="email"
1058
+ [attr.aria-describedby]="feedbackMessage() ? emailFeedbackId : null"
1059
+ [attr.aria-invalid]="fieldTone() === 'error' ? 'true' : null"
1060
+ formControlName="email"
1061
+ placeholder="your@email.com" />
1062
+
1063
+ <button
1064
+ ui-input-group-button
1065
+ type="submit"
1066
+ variant="default"
1067
+ size="sm"
1068
+ [disabled]="form.invalid || isSubmitting()"
1069
+ class="order-30 h-12! min-w-24 rounded-none px-5 text-sm font-medium">
1070
+ {{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
1071
+ </button>
1072
+ </ui-input-group>
1073
+
1074
+ @if (feedbackMessage(); as feedback) {
1075
+ <p
1076
+ [id]="emailFeedbackId"
1077
+ class="text-sm"
1078
+ [class.text-destructive]="feedbackTone() === 'error'"
1079
+ [class.text-emerald-700]="feedbackTone() === 'success'"
1080
+ [attr.role]="feedbackTone() === 'error' ? 'alert' : 'status'"
1081
+ [attr.aria-live]="feedbackTone() === 'error' ? 'assertive' : 'polite'">
1082
+ {{ feedback }}
1083
+ </p>
1084
+ }
1085
+ </div>
1086
+
1087
+ <div class="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 pt-2">
1088
+ <ui-separator class="w-full" />
1089
+ <span class="min-w-14 text-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
1090
+ Atau
1091
+ </span>
1092
+ <ui-separator class="w-full" />
1093
+ </div>
1094
+
1095
+ <div class="grid gap-3 pt-2 sm:grid-cols-3">
1096
+ <button
1097
+ ui-button
1098
+ type="button"
1099
+ variant="outline"
1100
+ size="lg"
1101
+ disabled
1102
+ aria-label="Login dengan Google segera hadir"
1103
+ title="Segera hadir"
1104
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
1105
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
1106
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
1107
+ <path
1108
+ fill="#EA4335"
1109
+ 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" />
1110
+ <path
1111
+ fill="#34A853"
1112
+ 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" />
1113
+ <path
1114
+ fill="#4A90E2"
1115
+ 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" />
1116
+ <path
1117
+ fill="#FBBC05"
1118
+ 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" />
1119
+ </svg>
1120
+ </span>
1121
+ Google
1122
+ </button>
1123
+ <button
1124
+ ui-button
1125
+ type="button"
1126
+ variant="outline"
1127
+ size="lg"
1128
+ disabled
1129
+ aria-label="Login dengan Microsoft segera hadir"
1130
+ title="Segera hadir"
1131
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
1132
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
1133
+ <svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
1134
+ <path fill="#F25022" d="M2 2h9.5v9.5H2z" />
1135
+ <path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
1136
+ <path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
1137
+ <path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
1138
+ </svg>
1139
+ </span>
1140
+ Microsoft
1141
+ </button>
1142
+ <button
1143
+ ui-button
1144
+ type="button"
1145
+ variant="outline"
1146
+ size="lg"
1147
+ disabled
1148
+ aria-label="Login dengan Apple segera hadir"
1149
+ title="Segera hadir"
1150
+ class="h-12 gap-3 text-[0.74rem] font-medium uppercase tracking-[0.16em]">
1151
+ <span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
1152
+ <svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
1153
+ <path
1154
+ 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" />
1155
+ </svg>
1156
+ </span>
1157
+ Apple
1158
+ </button>
1159
+ </div>
1160
+ </form>
1161
+ </ui-card-content>
1162
+ </ui-card>
1163
+ `,
1164
+ changeDetection: ChangeDetectionStrategy.OnPush,
1165
+ }]
1166
+ }] });
1167
+
1168
+ class AuthLogoutPage {
1169
+ destroyRef = inject(DestroyRef);
1170
+ documentRef = inject(DOCUMENT);
1171
+ router = inject(Router);
1172
+ authSessionService = inject(AuthSessionService);
1173
+ authConfig = inject(EDSIS_AUTH_CONFIG);
1174
+ guestHomePath = this.authConfig.guestHomePath;
1175
+ authenticatedHomePath = this.authConfig.authenticatedHomePath;
1176
+ state = signal('pending', /* @ts-ignore */
1177
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
1178
+ message = signal('Mengakhiri sesi...', /* @ts-ignore */
1179
+ ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
1180
+ ngOnInit() {
1181
+ clearStoredSession(this.documentRef);
1182
+ this.authSessionService
1183
+ .logoutAuthSession()
1184
+ .pipe(takeUntilDestroyed(this.destroyRef), finalize(() => {
1185
+ if (this.state() === 'pending') {
1186
+ this.state.set('success');
1187
+ }
1188
+ }))
1189
+ .subscribe({
1190
+ next: (response) => {
1191
+ this.state.set('success');
1192
+ this.message.set(getResponseMessage(response, 'Sesi berhasil diakhiri.'));
1193
+ void this.router.navigateByUrl(this.guestHomePath, { replaceUrl: true });
1194
+ },
1195
+ error: (error) => {
1196
+ this.state.set('error');
1197
+ this.message.set(getErrorMessage(error, 'Sesi lokal sudah dihapus, tetapi request logout gagal.'));
1198
+ },
1199
+ });
1200
+ }
1201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthLogoutPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
1202
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: AuthLogoutPage, isStandalone: true, selector: "edsis-auth-logout-page", host: { classAttribute: "block" }, ngImport: i0, template: `
1203
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1204
+ <ui-card-header
1205
+ 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">
1206
+ <div class="w-16 shrink-0 sm:w-20">
1207
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1208
+ <div
1209
+ 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]"
1210
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1211
+ ETOS
1212
+ </div>
1213
+ </ui-aspect-ratio>
1214
+ </div>
1215
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1216
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Mengakhiri sesi Edsis.</ui-card-title>
1217
+ <p ui-card-description class="max-w-xl leading-6">
1218
+ Halaman ini membersihkan sesi lokal lalu memanggil endpoint logout untuk merevoke refresh-token cookie pada
1219
+ backend.
1220
+ </p>
1221
+ </div>
1222
+ <ui-card-action
1223
+ 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">
1224
+ LOGOUT
1225
+ </ui-card-action>
1226
+ </ui-card-header>
1227
+
1228
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1229
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1230
+ @if (state() === 'pending') {
1231
+ <ui-spinner class="mt-0.5 size-4" aria-label="Mengakhiri sesi" />
1232
+ }
1233
+
1234
+ <ui-alert-description>
1235
+ {{ message() }}
1236
+ </ui-alert-description>
1237
+ </ui-alert>
1238
+
1239
+ @if (state() === 'error') {
1240
+ <ui-alert variant="destructive" class="shadow-sm">
1241
+ <ui-alert-description>
1242
+ Backend tidak mengonfirmasi logout, tetapi sesi lokal sudah dihapus.
1243
+ </ui-alert-description>
1244
+ </ui-alert>
1245
+ }
1246
+ </ui-card-content>
1247
+
1248
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1249
+ <a ui-button [routerLink]="guestHomePath" variant="default"> Kembali ke login </a>
1250
+ <a ui-button [routerLink]="authenticatedHomePath" variant="outline"> Buka dashboard </a>
1251
+ </ui-card-footer>
1252
+ </ui-card>
1253
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "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 });
1254
+ }
1255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthLogoutPage, decorators: [{
1256
+ type: Component,
1257
+ args: [{
1258
+ selector: 'edsis-auth-logout-page',
1259
+ imports: [
1260
+ RouterLink,
1261
+ AlertComponent,
1262
+ AlertDescriptionComponent,
1263
+ AspectRatioComponent,
1264
+ ButtonComponent,
1265
+ CardActionComponent,
1266
+ CardComponent,
1267
+ CardContentComponent,
1268
+ CardDescriptionComponent,
1269
+ CardFooterComponent,
1270
+ CardHeaderComponent,
1271
+ CardTitleComponent,
1272
+ SpinnerComponent,
1273
+ ],
1274
+ host: {
1275
+ class: 'block',
1276
+ },
1277
+ template: `
1278
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1279
+ <ui-card-header
1280
+ 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">
1281
+ <div class="w-16 shrink-0 sm:w-20">
1282
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1283
+ <div
1284
+ 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]"
1285
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1286
+ ETOS
1287
+ </div>
1288
+ </ui-aspect-ratio>
1289
+ </div>
1290
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1291
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Mengakhiri sesi Edsis.</ui-card-title>
1292
+ <p ui-card-description class="max-w-xl leading-6">
1293
+ Halaman ini membersihkan sesi lokal lalu memanggil endpoint logout untuk merevoke refresh-token cookie pada
1294
+ backend.
1295
+ </p>
1296
+ </div>
1297
+ <ui-card-action
1298
+ 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">
1299
+ LOGOUT
1300
+ </ui-card-action>
1301
+ </ui-card-header>
1302
+
1303
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1304
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1305
+ @if (state() === 'pending') {
1306
+ <ui-spinner class="mt-0.5 size-4" aria-label="Mengakhiri sesi" />
1307
+ }
1308
+
1309
+ <ui-alert-description>
1310
+ {{ message() }}
1311
+ </ui-alert-description>
1312
+ </ui-alert>
1313
+
1314
+ @if (state() === 'error') {
1315
+ <ui-alert variant="destructive" class="shadow-sm">
1316
+ <ui-alert-description>
1317
+ Backend tidak mengonfirmasi logout, tetapi sesi lokal sudah dihapus.
1318
+ </ui-alert-description>
1319
+ </ui-alert>
1320
+ }
1321
+ </ui-card-content>
1322
+
1323
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1324
+ <a ui-button [routerLink]="guestHomePath" variant="default"> Kembali ke login </a>
1325
+ <a ui-button [routerLink]="authenticatedHomePath" variant="outline"> Buka dashboard </a>
1326
+ </ui-card-footer>
1327
+ </ui-card>
1328
+ `,
1329
+ changeDetection: ChangeDetectionStrategy.OnPush,
1330
+ }]
1331
+ }] });
1332
+
1333
+ class AuthVerifyPage {
1334
+ documentRef = inject(DOCUMENT);
1335
+ destroyRef = inject(DestroyRef);
1336
+ route = inject(ActivatedRoute);
1337
+ router = inject(Router);
1338
+ location = inject(Location);
1339
+ authMagicLinkService = inject(AuthMagicLinkService);
1340
+ authConfig = inject(EDSIS_AUTH_CONFIG);
1341
+ queryParamMap = toSignal(this.route.queryParamMap, {
1342
+ initialValue: this.route.snapshot.queryParamMap,
1343
+ });
1344
+ fragment = toSignal(this.route.fragment, {
1345
+ initialValue: this.route.snapshot.fragment,
1346
+ });
1347
+ handledToken = undefined;
1348
+ verifySubscription = null;
1349
+ guestHomePath = this.authConfig.guestHomePath;
1350
+ authenticatedHomePath = this.authConfig.authenticatedHomePath;
1351
+ state = signal('pending', /* @ts-ignore */
1352
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
1353
+ message = signal('Memverifikasi magic link...', /* @ts-ignore */
1354
+ ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
1355
+ token = input(undefined, /* @ts-ignore */
1356
+ ...(ngDevMode ? [{ debugName: "token" }] : /* istanbul ignore next */ []));
1357
+ constructor() {
1358
+ this.destroyRef.onDestroy(() => this.verifySubscription?.unsubscribe());
1359
+ effect(() => {
1360
+ const token = extractMagicToken(this.token() ?? this.queryParamMap().get('token'), this.fragment());
1361
+ if (!token) {
1362
+ if (this.handledToken === null) {
1363
+ return;
1364
+ }
1365
+ this.handledToken = null;
1366
+ this.clearTokenFromAddressBar();
1367
+ this.state.set('error');
1368
+ this.message.set('Token magic link tidak ditemukan pada URL yang dibuka.');
1369
+ return;
1370
+ }
1371
+ if (token === this.handledToken) {
1372
+ return;
1373
+ }
1374
+ this.handledToken = token;
1375
+ this.clearTokenFromAddressBar();
1376
+ this.state.set('pending');
1377
+ this.message.set('Memverifikasi magic link...');
1378
+ this.verify(token);
1379
+ });
1380
+ }
1381
+ clearTokenFromAddressBar() {
1382
+ this.location.replaceState(this.authConfig.verifyPath);
1383
+ }
1384
+ verify(token) {
1385
+ this.verifySubscription?.unsubscribe();
1386
+ this.verifySubscription = this.authMagicLinkService
1387
+ .verifyMagicLink({
1388
+ body: {
1389
+ token,
1390
+ device_type: 'web',
1391
+ },
1392
+ })
1393
+ .subscribe({
1394
+ next: (response) => {
1395
+ const session = persistSession(this.documentRef, response.data);
1396
+ if (!session) {
1397
+ this.state.set('error');
1398
+ this.message.set('Verifikasi berhasil, tetapi access token tidak ditemukan di respons backend.');
1399
+ return;
1400
+ }
1401
+ this.state.set('success');
1402
+ this.message.set(getResponseMessage(response, 'Verifikasi berhasil. Mengarahkan ke dashboard...'));
1403
+ void this.router.navigateByUrl(this.authenticatedHomePath, { replaceUrl: true });
1404
+ },
1405
+ error: (error) => {
1406
+ this.state.set('error');
1407
+ this.message.set(getErrorMessage(error, 'Magic link tidak valid atau sudah kedaluwarsa.'));
1408
+ },
1409
+ });
1410
+ }
1411
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthVerifyPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
1412
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", 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: `
1413
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1414
+ <ui-card-header
1415
+ 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">
1416
+ <div class="w-16 shrink-0 sm:w-20">
1417
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1418
+ <div
1419
+ 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]"
1420
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1421
+ ETOS
1422
+ </div>
1423
+ </ui-aspect-ratio>
1424
+ </div>
1425
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1426
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Memverifikasi magic link.</ui-card-title>
1427
+ <p ui-card-description class="max-w-xl leading-6">
1428
+ Token akan dikonsumsi satu kali, sesi refresh cookie dibentuk di backend, lalu access token disimpan secara
1429
+ lokal untuk aplikasi.
1430
+ </p>
1431
+ </div>
1432
+ <ui-card-action
1433
+ 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">
1434
+ VERIFY
1435
+ </ui-card-action>
1436
+ </ui-card-header>
1437
+
1438
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1439
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1440
+ @if (state() === 'pending') {
1441
+ <ui-spinner class="mt-0.5 size-4" aria-label="Memverifikasi magic link" />
1442
+ }
1443
+
1444
+ <ui-alert-description>
1445
+ {{ message() }}
1446
+ </ui-alert-description>
1447
+ </ui-alert>
1448
+
1449
+ @if (state() === 'error') {
1450
+ <ui-alert variant="destructive" class="shadow-sm">
1451
+ <ui-alert-description>
1452
+ Pastikan Anda membuka link terbaru dari email dan token belum pernah dipakai sebelumnya.
1453
+ </ui-alert-description>
1454
+ </ui-alert>
1455
+ }
1456
+ </ui-card-content>
1457
+
1458
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1459
+ <a ui-button [routerLink]="guestHomePath" variant="outline"> Minta link baru </a>
1460
+ <a ui-button [routerLink]="authenticatedHomePath" variant="default"> Buka dashboard </a>
1461
+ </ui-card-footer>
1462
+ </ui-card>
1463
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "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 });
1464
+ }
1465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AuthVerifyPage, decorators: [{
1466
+ type: Component,
1467
+ args: [{
1468
+ selector: 'edsis-auth-verify-page',
1469
+ imports: [
1470
+ RouterLink,
1471
+ AlertComponent,
1472
+ AlertDescriptionComponent,
1473
+ AspectRatioComponent,
1474
+ ButtonComponent,
1475
+ CardActionComponent,
1476
+ CardComponent,
1477
+ CardContentComponent,
1478
+ CardDescriptionComponent,
1479
+ CardFooterComponent,
1480
+ CardHeaderComponent,
1481
+ CardTitleComponent,
1482
+ SpinnerComponent,
1483
+ ],
1484
+ host: {
1485
+ class: 'block',
1486
+ },
1487
+ template: `
1488
+ <ui-card class="w-full overflow-hidden rounded-none border-border/80 bg-card/95 shadow-2xl backdrop-blur-sm">
1489
+ <ui-card-header
1490
+ 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">
1491
+ <div class="w-16 shrink-0 sm:w-20">
1492
+ <ui-aspect-ratio [ratio]="3 / 2" class="overflow-hidden rounded-none bg-primary">
1493
+ <div
1494
+ 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]"
1495
+ style="font-family: 'Arial Black', Arial, sans-serif;">
1496
+ ETOS
1497
+ </div>
1498
+ </ui-aspect-ratio>
1499
+ </div>
1500
+ <div class="min-w-0 space-y-0.5 pt-0.5 sm:pt-1">
1501
+ <ui-card-title class="text-xl leading-tight sm:text-2xl">Memverifikasi magic link.</ui-card-title>
1502
+ <p ui-card-description class="max-w-xl leading-6">
1503
+ Token akan dikonsumsi satu kali, sesi refresh cookie dibentuk di backend, lalu access token disimpan secara
1504
+ lokal untuk aplikasi.
1505
+ </p>
1506
+ </div>
1507
+ <ui-card-action
1508
+ 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">
1509
+ VERIFY
1510
+ </ui-card-action>
1511
+ </ui-card-header>
1512
+
1513
+ <ui-card-content class="space-y-4 pt-6 sm:pt-7">
1514
+ <ui-alert [variant]="state() === 'error' ? 'destructive' : 'default'" class="bg-background/70 shadow-sm">
1515
+ @if (state() === 'pending') {
1516
+ <ui-spinner class="mt-0.5 size-4" aria-label="Memverifikasi magic link" />
1517
+ }
1518
+
1519
+ <ui-alert-description>
1520
+ {{ message() }}
1521
+ </ui-alert-description>
1522
+ </ui-alert>
1523
+
1524
+ @if (state() === 'error') {
1525
+ <ui-alert variant="destructive" class="shadow-sm">
1526
+ <ui-alert-description>
1527
+ Pastikan Anda membuka link terbaru dari email dan token belum pernah dipakai sebelumnya.
1528
+ </ui-alert-description>
1529
+ </ui-alert>
1530
+ }
1531
+ </ui-card-content>
1532
+
1533
+ <ui-card-footer class="flex flex-wrap gap-3 border-t border-border/60 bg-muted/10 pt-4 sm:pt-5">
1534
+ <a ui-button [routerLink]="guestHomePath" variant="outline"> Minta link baru </a>
1535
+ <a ui-button [routerLink]="authenticatedHomePath" variant="default"> Buka dashboard </a>
1536
+ </ui-card-footer>
1537
+ </ui-card>
1538
+ `,
1539
+ changeDetection: ChangeDetectionStrategy.OnPush,
1540
+ }]
1541
+ }], ctorParameters: () => [], propDecorators: { token: [{ type: i0.Input, args: [{ isSignal: true, alias: "token", required: false }] }] } });
1542
+
1543
+ const authRoutes = [
1544
+ {
1545
+ path: '',
1546
+ component: AuthShellPage,
1547
+ children: [
1548
+ {
1549
+ path: 'login',
1550
+ title: 'Login',
1551
+ canActivate: [guestOnlyGuard],
1552
+ component: AuthLoginPage,
1553
+ },
1554
+ {
1555
+ path: 'logout',
1556
+ title: 'Logout',
1557
+ component: AuthLogoutPage,
1558
+ },
1559
+ {
1560
+ path: 'verify',
1561
+ title: 'Verify',
1562
+ canActivate: [guestOnlyGuard],
1563
+ component: AuthVerifyPage,
1564
+ },
1565
+ ],
1566
+ },
1567
+ ];
1568
+
1569
+ /**
1570
+ * Generated bundle index. Do not edit.
1571
+ */
1572
+
1573
+ export { AUTH_SESSION_CHANGE_EVENT, AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, EDSIS_AUTH_CONFIG, EDSIS_SKIP_AUTH, EDSIS_SKIP_SESSION_REFRESH, authRoutes, authenticatedGuard, clearStoredSession, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, shouldClearSessionAfterRefreshFailure, startAuthSessionMonitor, validateStoredSession, ɵresetAuthSessionModuleState };
1574
+ //# sourceMappingURL=edsis-angular-module-auth.mjs.map