@edsis/angular 22.1.3 → 22.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -399
  3. package/SECURITY.md +18 -0
  4. package/SUPPORT.md +15 -0
  5. package/chart/README.md +272 -0
  6. package/component/README.md +89 -0
  7. package/component/accordion/README.md +195 -0
  8. package/component/alert/README.md +184 -0
  9. package/component/alert-dialog/README.md +255 -0
  10. package/component/aspect-ratio/README.md +116 -0
  11. package/component/avatar/README.md +182 -0
  12. package/component/badge/README.md +143 -0
  13. package/component/breadcrumb/README.md +223 -0
  14. package/component/button/README.md +141 -0
  15. package/component/button-group/README.md +214 -0
  16. package/component/calendar/README.md +125 -0
  17. package/component/card/README.md +232 -0
  18. package/component/carousel/README.md +276 -0
  19. package/component/checkbox/README.md +153 -0
  20. package/component/collapsible/README.md +216 -0
  21. package/component/combobox/README.md +202 -0
  22. package/component/command/README.md +287 -0
  23. package/component/composer/README.md +241 -0
  24. package/component/context-menu/README.md +268 -0
  25. package/component/date-picker/README.md +202 -0
  26. package/component/dialog/README.md +276 -0
  27. package/component/drawer/README.md +146 -0
  28. package/component/dropdown-menu/README.md +336 -0
  29. package/component/editor/README.md +152 -0
  30. package/component/empty/README.md +193 -0
  31. package/component/form/README.md +216 -0
  32. package/component/hover-card/README.md +150 -0
  33. package/component/icon/README.md +52 -0
  34. package/component/input/README.md +160 -0
  35. package/component/input-group/README.md +245 -0
  36. package/component/input-otp/README.md +331 -0
  37. package/component/item/README.md +254 -0
  38. package/component/kanban/README.md +81 -0
  39. package/component/kbd/README.md +141 -0
  40. package/component/label/README.md +137 -0
  41. package/component/menubar/README.md +270 -0
  42. package/component/native-select/README.md +176 -0
  43. package/component/navigation-menu/README.md +165 -0
  44. package/component/pagination/README.md +151 -0
  45. package/component/pillbox/README.md +68 -0
  46. package/component/popover/README.md +54 -0
  47. package/component/progress/README.md +160 -0
  48. package/component/radio/README.md +212 -0
  49. package/component/resizable/README.md +178 -0
  50. package/component/scroll-area/README.md +150 -0
  51. package/component/select/README.md +228 -0
  52. package/component/separator/README.md +175 -0
  53. package/component/sheet/README.md +190 -0
  54. package/component/skeleton/README.md +158 -0
  55. package/component/slider/README.md +207 -0
  56. package/component/spinner/README.md +160 -0
  57. package/component/switch/README.md +170 -0
  58. package/component/table/README.md +292 -0
  59. package/component/tabs/README.md +220 -0
  60. package/component/textarea/README.md +169 -0
  61. package/component/timeline/README.md +94 -0
  62. package/component/toast/README.md +173 -0
  63. package/component/toggle/README.md +133 -0
  64. package/component/toggle-group/README.md +234 -0
  65. package/component/tooltip/README.md +230 -0
  66. package/fesm2022/edsis-angular-chart-area.mjs +508 -0
  67. package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
  68. package/fesm2022/edsis-angular-chart-core.mjs +1282 -0
  69. package/fesm2022/edsis-angular-chart-line.mjs +544 -0
  70. package/fesm2022/edsis-angular-chart-pie.mjs +524 -0
  71. package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
  72. package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
  73. package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
  74. package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
  75. package/fesm2022/edsis-angular-chart.mjs +3 -0
  76. package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
  77. package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
  78. package/fesm2022/edsis-angular-component-alert.mjs +268 -0
  79. package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
  80. package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
  81. package/fesm2022/edsis-angular-component-badge.mjs +111 -0
  82. package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
  83. package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
  84. package/fesm2022/edsis-angular-component-button.mjs +155 -0
  85. package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
  86. package/fesm2022/edsis-angular-component-card.mjs +460 -0
  87. package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
  88. package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
  89. package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
  90. package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
  91. package/fesm2022/edsis-angular-component-command.mjs +815 -0
  92. package/fesm2022/edsis-angular-component-composer.mjs +840 -0
  93. package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
  94. package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
  95. package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
  96. package/fesm2022/edsis-angular-component-drawer.mjs +2 -0
  97. package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
  98. package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
  99. package/fesm2022/edsis-angular-component-empty.mjs +351 -0
  100. package/fesm2022/edsis-angular-component-form.mjs +821 -0
  101. package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
  102. package/fesm2022/edsis-angular-component-icon.mjs +253 -0
  103. package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
  104. package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
  105. package/fesm2022/edsis-angular-component-input.mjs +87 -0
  106. package/fesm2022/edsis-angular-component-item.mjs +720 -0
  107. package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
  108. package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
  109. package/fesm2022/edsis-angular-component-label.mjs +82 -0
  110. package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
  111. package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
  112. package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
  113. package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
  114. package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
  115. package/fesm2022/edsis-angular-component-popover.mjs +292 -0
  116. package/fesm2022/edsis-angular-component-progress.mjs +184 -0
  117. package/fesm2022/edsis-angular-component-radio.mjs +491 -0
  118. package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
  119. package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
  120. package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
  121. package/fesm2022/edsis-angular-component-select.mjs +743 -0
  122. package/fesm2022/edsis-angular-component-separator.mjs +102 -0
  123. package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
  124. package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
  125. package/fesm2022/edsis-angular-component-slider.mjs +676 -0
  126. package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
  127. package/fesm2022/edsis-angular-component-switch.mjs +361 -0
  128. package/fesm2022/edsis-angular-component-table.mjs +446 -0
  129. package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
  130. package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
  131. package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
  132. package/fesm2022/edsis-angular-component-toast.mjs +231 -0
  133. package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
  134. package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
  135. package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
  136. package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
  137. package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
  138. package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
  139. package/fesm2022/edsis-angular-component-utils.mjs +2 -0
  140. package/fesm2022/edsis-angular-component.mjs +0 -0
  141. package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
  142. package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
  143. package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-BWWWaUgy.mjs +234 -0
  144. package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-Bx2bxTID.mjs +834 -0
  145. package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-Duzt1ffz.mjs +823 -0
  146. package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-cJ8Q1vM6.mjs +670 -0
  147. package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-CDQ1wt2_.mjs +689 -0
  148. package/fesm2022/edsis-angular-navigation-navigation-item.component-C1VzerJp.mjs +1522 -0
  149. package/fesm2022/edsis-angular-navigation-navigation-list.component-BPYLfrID.mjs +346 -0
  150. package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
  151. package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
  152. package/fesm2022/edsis-angular-navigation.mjs +3338 -0
  153. package/fesm2022/edsis-angular-sdk.mjs +100 -0
  154. package/fesm2022/edsis-angular-theme-component-settings.mjs +1877 -0
  155. package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
  156. package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
  157. package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
  158. package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
  159. package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
  160. package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
  161. package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
  162. package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
  163. package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
  164. package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
  165. package/fesm2022/edsis-angular-theme-page.mjs +7 -0
  166. package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
  167. package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
  168. package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
  169. package/fesm2022/edsis-angular-theme-styles.mjs +572 -0
  170. package/fesm2022/edsis-angular-theme.mjs +0 -0
  171. package/fesm2022/edsis-angular.mjs +5 -8
  172. package/navigation/README.md +576 -0
  173. package/package.json +477 -52
  174. package/sdk/README.md +212 -0
  175. package/sdk/schematics/collection.json +20 -0
  176. package/sdk/schematics/init/index.js +83 -0
  177. package/sdk/schematics/init/schema.json +19 -0
  178. package/sdk/schematics/ng-add/index.js +147 -0
  179. package/sdk/schematics/ng-add/schema.json +14 -0
  180. package/sdk/schematics/package.json +3 -0
  181. package/sdk/schematics/sdk/index.js +175 -0
  182. package/sdk/schematics/sdk/schema.json +19 -0
  183. package/sdk/sdk.config.example.json +24 -0
  184. package/sdk/src/config/loader.js +43 -0
  185. package/sdk/src/config/schema.js +59 -0
  186. package/sdk/src/emit/client.js +251 -0
  187. package/sdk/src/emit/metadata.js +310 -0
  188. package/sdk/src/emit/models.js +104 -0
  189. package/sdk/src/emit/navigation.js +56 -0
  190. package/sdk/src/emit/operations.js +118 -0
  191. package/sdk/src/emit/public-api.js +54 -0
  192. package/sdk/src/emit/services.js +110 -0
  193. package/sdk/src/engine.js +67 -0
  194. package/sdk/src/layout/per-domain.js +360 -0
  195. package/sdk/src/package.json +3 -0
  196. package/sdk/src/parser/bundle.js +25 -0
  197. package/sdk/src/parser/ir.js +429 -0
  198. package/sdk/src/parser/types.js +7 -0
  199. package/sdk/src/render/template.js +152 -0
  200. package/sdk/src/writer/index.js +286 -0
  201. package/theme/README.md +120 -0
  202. package/theme/component/settings/README.md +154 -0
  203. package/theme/layout/README.md +604 -0
  204. package/theme/page/README.md +505 -0
  205. package/theme/shell/README.md +344 -0
  206. package/theme/styles/README.md +202 -0
  207. package/theme/styles/css/base/components.css +577 -0
  208. package/theme/styles/css/base/index.css +14 -0
  209. package/theme/styles/css/base/package.css +9 -0
  210. package/theme/styles/css/base/prefers-dark.css +86 -0
  211. package/theme/styles/css/base/print.css +62 -0
  212. package/theme/styles/css/base/status.css +38 -0
  213. package/theme/styles/css/base/tailwind.css +208 -0
  214. package/theme/styles/css/base/theme.css +353 -0
  215. package/theme/styles/css/base/tokens.css +388 -0
  216. package/theme/styles/css/color/amber.css +72 -0
  217. package/theme/styles/css/color/blue.css +72 -0
  218. package/theme/styles/css/color/brand.css +38 -0
  219. package/theme/styles/css/color/cyan.css +72 -0
  220. package/theme/styles/css/color/emerald.css +72 -0
  221. package/theme/styles/css/color/fuchsia.css +72 -0
  222. package/theme/styles/css/color/green.css +72 -0
  223. package/theme/styles/css/color/index.css +19 -0
  224. package/theme/styles/css/color/indigo.css +72 -0
  225. package/theme/styles/css/color/lime.css +72 -0
  226. package/theme/styles/css/color/orange.css +72 -0
  227. package/theme/styles/css/color/pink.css +72 -0
  228. package/theme/styles/css/color/purple.css +72 -0
  229. package/theme/styles/css/color/red.css +72 -0
  230. package/theme/styles/css/color/rose.css +72 -0
  231. package/theme/styles/css/color/sky.css +72 -0
  232. package/theme/styles/css/color/teal.css +72 -0
  233. package/theme/styles/css/color/violet.css +72 -0
  234. package/theme/styles/css/color/yellow.css +72 -0
  235. package/theme/styles/css/fonts.css +85 -0
  236. package/theme/styles/css/index.css +18 -0
  237. package/theme/styles/css/neutral/gray.css +63 -0
  238. package/theme/styles/css/neutral/index.css +11 -0
  239. package/theme/styles/css/neutral/mauve.css +63 -0
  240. package/theme/styles/css/neutral/mist.css +63 -0
  241. package/theme/styles/css/neutral/neutral.css +63 -0
  242. package/theme/styles/css/neutral/olive.css +63 -0
  243. package/theme/styles/css/neutral/slate.css +63 -0
  244. package/theme/styles/css/neutral/stone.css +63 -0
  245. package/theme/styles/css/neutral/taupe.css +63 -0
  246. package/theme/styles/css/neutral/zinc.css +63 -0
  247. package/theme/styles/css/radius/index.css +30 -0
  248. package/theme/styles/css/space/index.css +20 -0
  249. package/types/edsis-angular-chart-area.d.ts +139 -0
  250. package/types/edsis-angular-chart-bar.d.ts +291 -0
  251. package/types/edsis-angular-chart-core.d.ts +822 -0
  252. package/types/edsis-angular-chart-line.d.ts +148 -0
  253. package/types/edsis-angular-chart-pie.d.ts +202 -0
  254. package/types/edsis-angular-chart-primitives.d.ts +360 -0
  255. package/types/edsis-angular-chart-radar.d.ts +198 -0
  256. package/types/edsis-angular-chart-radial.d.ts +187 -0
  257. package/types/edsis-angular-chart-scatter.d.ts +181 -0
  258. package/types/edsis-angular-chart.d.ts +3 -0
  259. package/types/edsis-angular-component-accordion.d.ts +139 -0
  260. package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
  261. package/types/edsis-angular-component-alert.d.ts +72 -0
  262. package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
  263. package/types/edsis-angular-component-avatar.d.ts +111 -0
  264. package/types/edsis-angular-component-badge.d.ts +36 -0
  265. package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
  266. package/types/edsis-angular-component-button-group.d.ts +50 -0
  267. package/types/edsis-angular-component-button.d.ts +44 -0
  268. package/types/edsis-angular-component-calendar.d.ts +150 -0
  269. package/types/edsis-angular-component-card.d.ts +123 -0
  270. package/types/edsis-angular-component-carousel.d.ts +155 -0
  271. package/types/edsis-angular-component-checkbox.d.ts +100 -0
  272. package/types/edsis-angular-component-collapsible.d.ts +68 -0
  273. package/types/edsis-angular-component-combobox.d.ts +105 -0
  274. package/types/edsis-angular-component-command.d.ts +215 -0
  275. package/types/edsis-angular-component-composer.d.ts +190 -0
  276. package/types/edsis-angular-component-context-menu.d.ts +64 -0
  277. package/types/edsis-angular-component-date-picker.d.ts +199 -0
  278. package/types/edsis-angular-component-dialog.d.ts +231 -0
  279. package/types/edsis-angular-component-drawer.d.ts +2 -0
  280. package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
  281. package/types/edsis-angular-component-editor.d.ts +234 -0
  282. package/types/edsis-angular-component-empty.d.ts +85 -0
  283. package/types/edsis-angular-component-form.d.ts +223 -0
  284. package/types/edsis-angular-component-hover-card.d.ts +133 -0
  285. package/types/edsis-angular-component-icon.d.ts +90 -0
  286. package/types/edsis-angular-component-input-group.d.ts +98 -0
  287. package/types/edsis-angular-component-input-otp.d.ts +249 -0
  288. package/types/edsis-angular-component-input.d.ts +31 -0
  289. package/types/edsis-angular-component-item.d.ts +169 -0
  290. package/types/edsis-angular-component-kanban.d.ts +165 -0
  291. package/types/edsis-angular-component-kbd.d.ts +25 -0
  292. package/types/edsis-angular-component-label.d.ts +19 -0
  293. package/types/edsis-angular-component-menubar.d.ts +123 -0
  294. package/types/edsis-angular-component-native-select.d.ts +39 -0
  295. package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
  296. package/types/edsis-angular-component-pagination.d.ts +83 -0
  297. package/types/edsis-angular-component-pillbox.d.ts +380 -0
  298. package/types/edsis-angular-component-popover.d.ts +96 -0
  299. package/types/edsis-angular-component-progress.d.ts +45 -0
  300. package/types/edsis-angular-component-radio.d.ts +137 -0
  301. package/types/edsis-angular-component-resizable.d.ts +166 -0
  302. package/types/edsis-angular-component-scroll-area.d.ts +37 -0
  303. package/types/edsis-angular-component-segmented-control.d.ts +102 -0
  304. package/types/edsis-angular-component-select.d.ts +138 -0
  305. package/types/edsis-angular-component-separator.d.ts +26 -0
  306. package/types/edsis-angular-component-sheet.d.ts +240 -0
  307. package/types/edsis-angular-component-skeleton.d.ts +13 -0
  308. package/types/edsis-angular-component-slider.d.ts +148 -0
  309. package/types/edsis-angular-component-spinner.d.ts +31 -0
  310. package/types/edsis-angular-component-switch.d.ts +101 -0
  311. package/types/edsis-angular-component-table.d.ts +109 -0
  312. package/types/edsis-angular-component-tabs.d.ts +183 -0
  313. package/types/edsis-angular-component-textarea.d.ts +27 -0
  314. package/types/edsis-angular-component-timeline.d.ts +146 -0
  315. package/types/edsis-angular-component-toast.d.ts +60 -0
  316. package/types/edsis-angular-component-toggle-group.d.ts +161 -0
  317. package/types/edsis-angular-component-toggle.d.ts +47 -0
  318. package/types/edsis-angular-component-tooltip.d.ts +233 -0
  319. package/types/edsis-angular-component-utils-core.d.ts +175 -0
  320. package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
  321. package/types/edsis-angular-component-utils-scale.d.ts +27 -0
  322. package/types/edsis-angular-component-utils.d.ts +2 -0
  323. package/types/edsis-angular-component.d.ts +1 -0
  324. package/types/edsis-angular-navigation-core.d.ts +55 -0
  325. package/types/edsis-angular-navigation-icon.d.ts +9 -0
  326. package/types/edsis-angular-navigation-service.d.ts +121 -0
  327. package/types/edsis-angular-navigation-types.d.ts +185 -0
  328. package/types/edsis-angular-navigation.d.ts +862 -0
  329. package/types/edsis-angular-sdk.d.ts +87 -0
  330. package/types/edsis-angular-theme-component-settings.d.ts +205 -0
  331. package/types/edsis-angular-theme-layout-services.d.ts +143 -0
  332. package/types/edsis-angular-theme-layout-types.d.ts +36 -0
  333. package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
  334. package/types/edsis-angular-theme-layout.d.ts +218 -0
  335. package/types/edsis-angular-theme-page-core.d.ts +151 -0
  336. package/types/edsis-angular-theme-page-filter.d.ts +127 -0
  337. package/types/edsis-angular-theme-page-overview.d.ts +28 -0
  338. package/types/edsis-angular-theme-page-root.d.ts +172 -0
  339. package/types/edsis-angular-theme-page-side.d.ts +90 -0
  340. package/types/edsis-angular-theme-page-slots.d.ts +61 -0
  341. package/types/edsis-angular-theme-page.d.ts +7 -0
  342. package/types/edsis-angular-theme-shell-services.d.ts +188 -0
  343. package/types/edsis-angular-theme-shell-types.d.ts +102 -0
  344. package/types/edsis-angular-theme-shell.d.ts +178 -0
  345. package/types/edsis-angular-theme-styles.d.ts +295 -0
  346. package/types/edsis-angular-theme.d.ts +1 -0
  347. package/types/edsis-angular.d.ts +5 -2
  348. package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
  349. package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
  350. package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
  351. package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
  352. package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
  353. package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
  354. package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
  355. package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
  356. package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
  357. package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
  358. package/fesm2022/edsis-angular.mjs.map +0 -1
  359. package/types/edsis-angular-block-shell.d.ts +0 -190
  360. package/types/edsis-angular-block-themes.d.ts +0 -94
  361. package/types/edsis-angular-module-auth.d.ts +0 -533
  362. package/types/edsis-angular-platform-mfe.d.ts +0 -126
  363. package/types/edsis-angular-services-runtime.d.ts +0 -118
@@ -0,0 +1,957 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Component, Directive, ElementRef, Injector, booleanAttribute, computed, contentChildren, forwardRef, inject, input, linkedSignal, numberAttribute, output, signal, viewChild } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
4
+ import { FormFieldContext } from "@edsis/angular/component/form";
5
+ import { cn, injectUniqueId } from "@edsis/angular/component/utils/core";
6
+ const REGEXP_ONLY_DIGITS = /^[0-9]$/;
7
+ const REGEXP_ONLY_DIGITS_AND_CHARS = /^[A-Za-z0-9]$/;
8
+ var InputOtpContextBase = class InputOtpContextBase {
9
+ static ɵfac = i0.ɵɵngDeclareFactory({
10
+ minVersion: "12.0.0",
11
+ version: "22.2.3",
12
+ ngImport: i0,
13
+ type: InputOtpContextBase,
14
+ deps: [],
15
+ target: i0.ɵɵFactoryTarget.Directive
16
+ });
17
+ static ɵdir = i0.ɵɵngDeclareDirective({
18
+ minVersion: "14.0.0",
19
+ version: "22.2.3",
20
+ type: InputOtpContextBase,
21
+ isStandalone: true,
22
+ ngImport: i0
23
+ });
24
+ };
25
+ i0.ɵɵngDeclareClassMetadata({
26
+ minVersion: "12.0.0",
27
+ version: "22.2.3",
28
+ ngImport: i0,
29
+ type: InputOtpContextBase,
30
+ decorators: [{ type: Directive }]
31
+ });
32
+ var InputOtpGroupComponent = class InputOtpGroupComponent {
33
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
34
+ classes = computed(() => cn("flex items-center overflow-hidden rounded-md border border-input bg-background", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
35
+ static ɵfac = i0.ɵɵngDeclareFactory({
36
+ minVersion: "12.0.0",
37
+ version: "22.2.3",
38
+ ngImport: i0,
39
+ type: InputOtpGroupComponent,
40
+ deps: [],
41
+ target: i0.ɵɵFactoryTarget.Component
42
+ });
43
+ static ɵcmp = i0.ɵɵngDeclareComponent({
44
+ minVersion: "17.1.0",
45
+ version: "22.2.3",
46
+ type: InputOtpGroupComponent,
47
+ isStandalone: true,
48
+ selector: "InputOtpGroup",
49
+ inputs: { class: {
50
+ classPropertyName: "class",
51
+ publicName: "class",
52
+ isSignal: true,
53
+ isRequired: false,
54
+ transformFunction: null
55
+ } },
56
+ host: { properties: {
57
+ "class": "classes()",
58
+ "attr.data-slot": "\"input-otp-group\""
59
+ } },
60
+ ngImport: i0,
61
+ template: `<ng-content />`,
62
+ isInline: true
63
+ });
64
+ };
65
+ i0.ɵɵngDeclareClassMetadata({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.3",
68
+ ngImport: i0,
69
+ type: InputOtpGroupComponent,
70
+ decorators: [{
71
+ type: Component,
72
+ args: [{
73
+ selector: "InputOtpGroup",
74
+ host: {
75
+ "[class]": "classes()",
76
+ "[attr.data-slot]": "\"input-otp-group\""
77
+ },
78
+ template: `<ng-content />`
79
+ }]
80
+ }],
81
+ propDecorators: { class: [{
82
+ type: i0.Input,
83
+ args: [{
84
+ isSignal: true,
85
+ alias: "class",
86
+ required: false
87
+ }]
88
+ }] }
89
+ });
90
+ var InputOtpSeparatorComponent = class InputOtpSeparatorComponent {
91
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
92
+ classes = computed(() => cn("inline-flex h-control-10 w-6 items-center justify-center text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
93
+ static ɵfac = i0.ɵɵngDeclareFactory({
94
+ minVersion: "12.0.0",
95
+ version: "22.2.3",
96
+ ngImport: i0,
97
+ type: InputOtpSeparatorComponent,
98
+ deps: [],
99
+ target: i0.ɵɵFactoryTarget.Component
100
+ });
101
+ static ɵcmp = i0.ɵɵngDeclareComponent({
102
+ minVersion: "17.1.0",
103
+ version: "22.2.3",
104
+ type: InputOtpSeparatorComponent,
105
+ isStandalone: true,
106
+ selector: "InputOtpSeparator",
107
+ inputs: { class: {
108
+ classPropertyName: "class",
109
+ publicName: "class",
110
+ isSignal: true,
111
+ isRequired: false,
112
+ transformFunction: null
113
+ } },
114
+ host: {
115
+ attributes: { "aria-hidden": "true" },
116
+ properties: {
117
+ "class": "classes()",
118
+ "attr.data-slot": "\"input-otp-separator\""
119
+ }
120
+ },
121
+ ngImport: i0,
122
+ template: `
123
+ <svg
124
+ viewBox="0 0 24 24"
125
+ fill="none"
126
+ stroke="currentColor"
127
+ stroke-width="2"
128
+ stroke-linecap="round"
129
+ stroke-linejoin="round"
130
+ >
131
+ <path d="M5 12h14" />
132
+ </svg>
133
+ `,
134
+ isInline: true
135
+ });
136
+ };
137
+ i0.ɵɵngDeclareClassMetadata({
138
+ minVersion: "12.0.0",
139
+ version: "22.2.3",
140
+ ngImport: i0,
141
+ type: InputOtpSeparatorComponent,
142
+ decorators: [{
143
+ type: Component,
144
+ args: [{
145
+ selector: "InputOtpSeparator",
146
+ host: {
147
+ "[class]": "classes()",
148
+ "[attr.data-slot]": "\"input-otp-separator\"",
149
+ "aria-hidden": "true"
150
+ },
151
+ template: `
152
+ <svg
153
+ viewBox="0 0 24 24"
154
+ fill="none"
155
+ stroke="currentColor"
156
+ stroke-width="2"
157
+ stroke-linecap="round"
158
+ stroke-linejoin="round"
159
+ >
160
+ <path d="M5 12h14" />
161
+ </svg>
162
+ `
163
+ }]
164
+ }],
165
+ propDecorators: { class: [{
166
+ type: i0.Input,
167
+ args: [{
168
+ isSignal: true,
169
+ alias: "class",
170
+ required: false
171
+ }]
172
+ }] }
173
+ });
174
+ var InputOtpSlotComponent = class InputOtpSlotComponent {
175
+ ctx = inject(InputOtpContextBase);
176
+ index = input(0, {
177
+ ...ngDevMode ? { debugName: "index" } : /* istanbul ignore next */ {},
178
+ transform: numberAttribute
179
+ });
180
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
181
+ invalid = input(false, {
182
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
183
+ alias: "aria-invalid",
184
+ transform: booleanAttribute
185
+ });
186
+ inputRef = viewChild.required("inputRef", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
187
+ maxLength = computed(() => this.ctx.maxLength(), ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
188
+ character = computed(() => this.ctx.slotValue(this.index()), ...ngDevMode ? [{ debugName: "character" }] : /* istanbul ignore next */ []);
189
+ active = computed(() => this.ctx.isActive(this.index()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
190
+ filled = computed(() => this.character() !== "", ...ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []);
191
+ disabled = computed(() => this.ctx.isDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
192
+ required = computed(() => this.ctx.isRequired(), ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
193
+ inputId = computed(() => this.ctx.slotId(this.index()), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
194
+ inputMode = computed(() => this.ctx.slotInputMode(), ...ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []);
195
+ autocomplete = computed(() => this.ctx.slotAutocomplete(this.index()), ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
196
+ ariaLabel = computed(() => this.ctx.slotAriaLabel(this.index()), ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
197
+ ariaLabelledBy = computed(() => this.ctx.slotAriaLabelledBy(this.index()), ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
198
+ ariaDescribedBy = computed(() => this.ctx.slotAriaDescribedBy(), ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
199
+ effectiveInvalid = computed(() => this.invalid() || this.ctx.isInvalid(), ...ngDevMode ? [{ debugName: "effectiveInvalid" }] : /* istanbul ignore next */ []);
200
+ classes = computed(() => cn("relative flex h-control-10 w-control-10 items-center justify-center border-r border-border text-sm font-medium transition-[background-color,box-shadow,opacity] last:border-r-0", this.active() && !this.effectiveInvalid() && "z-10 ring-1 ring-inset ring-ring", this.effectiveInvalid() && "bg-destructive/5 text-destructive ring-1 ring-inset ring-destructive/50", this.disabled() && "opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
201
+ focus(select = true) {
202
+ const input = this.inputRef().nativeElement;
203
+ input.focus();
204
+ if (select) input.select();
205
+ }
206
+ handleFocus() {
207
+ this.ctx.handleSlotFocus(this.index());
208
+ this.inputRef().nativeElement.select();
209
+ }
210
+ handleInput(event) {
211
+ const target = event.target;
212
+ this.ctx.handleSlotInput(this.index(), target.value);
213
+ this.syncElementValue(target);
214
+ }
215
+ syncElementValue(target) {
216
+ const character = this.character();
217
+ if (target.value !== character) target.value = character;
218
+ }
219
+ handleKeydown(event) {
220
+ this.ctx.handleSlotKeydown(this.index(), event);
221
+ }
222
+ handlePaste(event) {
223
+ this.ctx.handleSlotPaste(this.index(), event);
224
+ }
225
+ static ɵfac = i0.ɵɵngDeclareFactory({
226
+ minVersion: "12.0.0",
227
+ version: "22.2.3",
228
+ ngImport: i0,
229
+ type: InputOtpSlotComponent,
230
+ deps: [],
231
+ target: i0.ɵɵFactoryTarget.Component
232
+ });
233
+ static ɵcmp = i0.ɵɵngDeclareComponent({
234
+ minVersion: "17.2.0",
235
+ version: "22.2.3",
236
+ type: InputOtpSlotComponent,
237
+ isStandalone: true,
238
+ selector: "InputOtpSlot",
239
+ inputs: {
240
+ index: {
241
+ classPropertyName: "index",
242
+ publicName: "index",
243
+ isSignal: true,
244
+ isRequired: false,
245
+ transformFunction: null
246
+ },
247
+ class: {
248
+ classPropertyName: "class",
249
+ publicName: "class",
250
+ isSignal: true,
251
+ isRequired: false,
252
+ transformFunction: null
253
+ },
254
+ invalid: {
255
+ classPropertyName: "invalid",
256
+ publicName: "aria-invalid",
257
+ isSignal: true,
258
+ isRequired: false,
259
+ transformFunction: null
260
+ }
261
+ },
262
+ host: { properties: {
263
+ "class": "classes()",
264
+ "attr.data-slot": "\"input-otp-slot\"",
265
+ "attr.data-active": "active() ? \"\" : null",
266
+ "attr.data-filled": "filled() ? \"\" : null",
267
+ "attr.data-disabled": "disabled() ? \"\" : null",
268
+ "attr.data-invalid": "effectiveInvalid() ? \"\" : null"
269
+ } },
270
+ viewQueries: [{
271
+ propertyName: "inputRef",
272
+ first: true,
273
+ predicate: ["inputRef"],
274
+ descendants: true,
275
+ isSignal: true
276
+ }],
277
+ ngImport: i0,
278
+ template: `
279
+ <input
280
+ #inputRef
281
+ class="h-full w-full border-0 bg-transparent px-0 text-center text-inherit font-inherit outline-none disabled:cursor-not-allowed"
282
+ type="text"
283
+ spellcheck="false"
284
+ autocapitalize="none"
285
+ [value]="character()"
286
+ [attr.id]="inputId()"
287
+ [attr.maxlength]="maxLength()"
288
+ [attr.inputmode]="inputMode()"
289
+ [attr.autocomplete]="autocomplete()"
290
+ [attr.aria-label]="ariaLabel()"
291
+ [attr.aria-labelledby]="ariaLabelledBy()"
292
+ [attr.aria-describedby]="ariaDescribedBy()"
293
+ [attr.aria-invalid]="effectiveInvalid() ? 'true' : null"
294
+ [disabled]="disabled()"
295
+ [required]="required() || null"
296
+ (focus)="handleFocus()"
297
+ (input)="handleInput($event)"
298
+ (keydown)="handleKeydown($event)"
299
+ (paste)="handlePaste($event)"
300
+ />
301
+ `,
302
+ isInline: true
303
+ });
304
+ };
305
+ i0.ɵɵngDeclareClassMetadata({
306
+ minVersion: "12.0.0",
307
+ version: "22.2.3",
308
+ ngImport: i0,
309
+ type: InputOtpSlotComponent,
310
+ decorators: [{
311
+ type: Component,
312
+ args: [{
313
+ selector: "InputOtpSlot",
314
+ host: {
315
+ "[class]": "classes()",
316
+ "[attr.data-slot]": "\"input-otp-slot\"",
317
+ "[attr.data-active]": "active() ? \"\" : null",
318
+ "[attr.data-filled]": "filled() ? \"\" : null",
319
+ "[attr.data-disabled]": "disabled() ? \"\" : null",
320
+ "[attr.data-invalid]": "effectiveInvalid() ? \"\" : null"
321
+ },
322
+ template: `
323
+ <input
324
+ #inputRef
325
+ class="h-full w-full border-0 bg-transparent px-0 text-center text-inherit font-inherit outline-none disabled:cursor-not-allowed"
326
+ type="text"
327
+ spellcheck="false"
328
+ autocapitalize="none"
329
+ [value]="character()"
330
+ [attr.id]="inputId()"
331
+ [attr.maxlength]="maxLength()"
332
+ [attr.inputmode]="inputMode()"
333
+ [attr.autocomplete]="autocomplete()"
334
+ [attr.aria-label]="ariaLabel()"
335
+ [attr.aria-labelledby]="ariaLabelledBy()"
336
+ [attr.aria-describedby]="ariaDescribedBy()"
337
+ [attr.aria-invalid]="effectiveInvalid() ? 'true' : null"
338
+ [disabled]="disabled()"
339
+ [required]="required() || null"
340
+ (focus)="handleFocus()"
341
+ (input)="handleInput($event)"
342
+ (keydown)="handleKeydown($event)"
343
+ (paste)="handlePaste($event)"
344
+ />
345
+ `
346
+ }]
347
+ }],
348
+ propDecorators: {
349
+ index: [{
350
+ type: i0.Input,
351
+ args: [{
352
+ isSignal: true,
353
+ alias: "index",
354
+ required: false
355
+ }]
356
+ }],
357
+ class: [{
358
+ type: i0.Input,
359
+ args: [{
360
+ isSignal: true,
361
+ alias: "class",
362
+ required: false
363
+ }]
364
+ }],
365
+ invalid: [{
366
+ type: i0.Input,
367
+ args: [{
368
+ isSignal: true,
369
+ alias: "aria-invalid",
370
+ required: false
371
+ }]
372
+ }],
373
+ inputRef: [{
374
+ type: i0.ViewChild,
375
+ args: ["inputRef", { isSignal: true }]
376
+ }]
377
+ }
378
+ });
379
+ var InputOtpComponent = class InputOtpComponent extends InputOtpContextBase {
380
+ host = inject(ElementRef);
381
+ injector = inject(Injector);
382
+ formFieldContext = inject(FormFieldContext, { optional: true });
383
+ maxLengthInput = input(6, {
384
+ ...ngDevMode ? { debugName: "maxLengthInput" } : /* istanbul ignore next */ {},
385
+ alias: "maxLength",
386
+ transform: numberAttribute
387
+ });
388
+ value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
389
+ pattern = input(null, ...ngDevMode ? [{ debugName: "pattern" }] : /* istanbul ignore next */ []);
390
+ id = input(null, {
391
+ ...ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {},
392
+ alias: "id"
393
+ });
394
+ ariaLabel = input(null, {
395
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
396
+ alias: "aria-label"
397
+ });
398
+ ariaLabelledby = input(null, {
399
+ ...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
400
+ alias: "aria-labelledby"
401
+ });
402
+ ariaDescribedby = input(null, {
403
+ ...ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {},
404
+ alias: "aria-describedby"
405
+ });
406
+ inputMode = input("numeric", {
407
+ ...ngDevMode ? { debugName: "inputMode" } : /* istanbul ignore next */ {},
408
+ alias: "inputmode"
409
+ });
410
+ autocomplete = input("one-time-code", {
411
+ ...ngDevMode ? { debugName: "autocomplete" } : /* istanbul ignore next */ {},
412
+ alias: "autocomplete"
413
+ });
414
+ required = input(false, {
415
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
416
+ transform: booleanAttribute
417
+ });
418
+ disabledInput = input(false, {
419
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
420
+ alias: "disabled",
421
+ transform: booleanAttribute
422
+ });
423
+ invalidInput = input(false, {
424
+ ...ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {},
425
+ alias: "aria-invalid",
426
+ transform: booleanAttribute
427
+ });
428
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
429
+ valueChange = output();
430
+ generatedId = injectUniqueId("InputOtp");
431
+ internalValue = linkedSignal(() => this.normalizeValue(this.value() ?? ""), {
432
+ debugName: "InputOtp.internalValue",
433
+ set: (value, rawSet) => rawSet(this.normalizeValue(value))
434
+ });
435
+ disabledState = signal(false, ...ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []);
436
+ activeIndex = signal(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
437
+ slots = contentChildren(InputOtpSlotComponent, {
438
+ ...ngDevMode ? { debugName: "slots" } : /* istanbul ignore next */ {},
439
+ descendants: true
440
+ });
441
+ compiledPattern = computed(() => {
442
+ const pattern = this.pattern();
443
+ if (!pattern) return [];
444
+ if (pattern instanceof RegExp) return [pattern];
445
+ if (typeof pattern !== "string") return pattern;
446
+ try {
447
+ return [new RegExp(pattern)];
448
+ } catch {
449
+ return [];
450
+ }
451
+ }, ...ngDevMode ? [{ debugName: "compiledPattern" }] : /* istanbul ignore next */ []);
452
+ classes = computed(() => cn("inline-flex flex-wrap items-center gap-2", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
453
+ disabled = computed(() => this.disabledInput() || this.disabledState(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
454
+ displayValue = computed(() => this.internalValue(), ...ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []);
455
+ ngControl = null;
456
+ onChange = () => {};
457
+ onTouched = () => {};
458
+ ngOnInit() {
459
+ this.ngControl = this.injector.get(NgControl, null, {
460
+ optional: true,
461
+ self: true
462
+ });
463
+ this.publishControl();
464
+ }
465
+ ngAfterViewInit() {
466
+ this.publishControl();
467
+ }
468
+ maxLength() {
469
+ return Math.max(1, this.maxLengthInput());
470
+ }
471
+ slotId(index) {
472
+ const baseId = this.id() ?? this.formFieldContext?.controlId ?? this.generatedId;
473
+ return index === 0 ? baseId : `${baseId}-${index + 1}`;
474
+ }
475
+ slotValue(index) {
476
+ return this.toCharArray()[index] ?? "";
477
+ }
478
+ slotAriaLabel(index) {
479
+ return `${this.ariaLabel() ?? "One-time password"} character ${index + 1} of ${this.maxLength()}`;
480
+ }
481
+ slotAriaLabelledBy(index) {
482
+ return index === 0 ? this.ariaLabelledby() : null;
483
+ }
484
+ slotAriaDescribedBy() {
485
+ return this.describedBy();
486
+ }
487
+ slotInputMode() {
488
+ return this.inputMode();
489
+ }
490
+ slotAutocomplete(index) {
491
+ return index === 0 ? this.autocomplete() : "off";
492
+ }
493
+ isDisabled() {
494
+ return this.disabled();
495
+ }
496
+ isRequired() {
497
+ return this.required();
498
+ }
499
+ isInvalid() {
500
+ return this.invalidInput() || this.formFieldContext?.invalid() || false;
501
+ }
502
+ isActive(index) {
503
+ return this.activeIndex() === index;
504
+ }
505
+ handleSlotFocus(index) {
506
+ this.activeIndex.set(index);
507
+ }
508
+ handleSlotInput(index, value) {
509
+ if (this.disabled()) return;
510
+ const accepted = this.filterCharacters(value);
511
+ if (accepted.length === 0) return;
512
+ if (accepted.length > 1) {
513
+ this.applyFragment(index, accepted);
514
+ return;
515
+ }
516
+ const next = this.replaceAt(index, accepted[0]);
517
+ this.commitValue(next);
518
+ this.focusSlot(Math.min(index + 1, this.maxLength() - 1));
519
+ }
520
+ handleSlotKeydown(index, event) {
521
+ if (this.disabled()) return;
522
+ const isRtl = this.isRtl();
523
+ switch (event.key) {
524
+ case "ArrowLeft":
525
+ event.preventDefault();
526
+ this.focusSlot(Math.max(0, index + (isRtl ? 1 : -1)));
527
+ return;
528
+ case "ArrowRight":
529
+ event.preventDefault();
530
+ this.focusSlot(Math.min(this.maxLength() - 1, index + (isRtl ? -1 : 1)));
531
+ return;
532
+ case "Home":
533
+ event.preventDefault();
534
+ this.focusSlot(0);
535
+ return;
536
+ case "End":
537
+ event.preventDefault();
538
+ this.focusSlot(this.maxLength() - 1);
539
+ return;
540
+ case "Backspace": {
541
+ event.preventDefault();
542
+ const deleteIndex = this.slotValue(index) === "" ? index - 1 : index;
543
+ if (deleteIndex < 0) return;
544
+ this.commitValue(this.removeAt(deleteIndex));
545
+ this.focusSlot(Math.max(0, deleteIndex));
546
+ return;
547
+ }
548
+ case "Delete":
549
+ event.preventDefault();
550
+ this.commitValue(this.removeAt(index));
551
+ this.focusSlot(index);
552
+ return;
553
+ default: return;
554
+ }
555
+ }
556
+ handleSlotPaste(index, event) {
557
+ if (this.disabled()) return;
558
+ const pasted = event.clipboardData?.getData("text") ?? "";
559
+ const accepted = this.filterCharacters(pasted);
560
+ if (accepted.length === 0) return;
561
+ event.preventDefault();
562
+ this.applyFragment(index, accepted);
563
+ }
564
+ focus() {
565
+ const index = Math.min(this.displayValue().length, this.maxLength() - 1);
566
+ this.focusSlot(Math.max(index, 0));
567
+ }
568
+ writeValue(value) {
569
+ this.internalValue.set(typeof value === "string" ? value : "");
570
+ }
571
+ registerOnChange(fn) {
572
+ this.onChange = fn;
573
+ }
574
+ registerOnTouched(fn) {
575
+ this.onTouched = fn;
576
+ }
577
+ setDisabledState(disabled) {
578
+ this.disabledState.set(disabled);
579
+ }
580
+ describedBy() {
581
+ const rawIds = [this.ariaDescribedby(), this.formFieldContext?.describedBy() ?? null].filter((value) => !!value);
582
+ const ids = [...new Set(rawIds.flatMap((value) => value.split(/\s+/)).filter(Boolean))];
583
+ return ids.length > 0 ? ids.join(" ") : null;
584
+ }
585
+ handleFocusOut(event) {
586
+ const nextTarget = event.relatedTarget;
587
+ if (!(nextTarget instanceof Node) || !this.host.nativeElement.contains(nextTarget)) this.onTouched();
588
+ }
589
+ publishControl() {
590
+ const context = this.formFieldContext;
591
+ if (!context) return;
592
+ const control = this.ngControl?.control ?? null;
593
+ if (control !== context.control()) context.control.set(control);
594
+ }
595
+ commitValue(value) {
596
+ this.internalValue.set(value);
597
+ const nextValue = this.internalValue();
598
+ this.onChange(nextValue);
599
+ this.valueChange.emit(nextValue);
600
+ }
601
+ replaceAt(index, character) {
602
+ const chars = this.toCharArray();
603
+ chars[index] = character;
604
+ return this.serialize(chars);
605
+ }
606
+ removeAt(index) {
607
+ const chars = this.toCharArray();
608
+ if (index < 0 || index >= chars.length) return this.displayValue();
609
+ chars.splice(index, 1);
610
+ chars.push("");
611
+ return this.serialize(chars);
612
+ }
613
+ applyFragment(index, characters) {
614
+ const chars = this.toCharArray();
615
+ let cursor = index;
616
+ for (const character of characters) {
617
+ if (cursor >= chars.length) break;
618
+ chars[cursor] = character;
619
+ cursor += 1;
620
+ }
621
+ this.commitValue(this.serialize(chars));
622
+ this.focusSlot(Math.min(cursor, this.maxLength() - 1));
623
+ }
624
+ focusSlot(index) {
625
+ const slot = this.slots().find((candidate) => candidate.index() === index);
626
+ if (!slot) return;
627
+ this.activeIndex.set(index);
628
+ slot.focus();
629
+ }
630
+ toCharArray() {
631
+ const chars = Array.from({ length: this.maxLength() }, () => "");
632
+ for (const [index, character] of Array.from(this.displayValue()).entries()) {
633
+ if (index >= chars.length) break;
634
+ chars[index] = character;
635
+ }
636
+ return chars;
637
+ }
638
+ serialize(chars) {
639
+ let lastFilledIndex = -1;
640
+ for (let index = chars.length - 1; index >= 0; index -= 1) if (chars[index] !== "") {
641
+ lastFilledIndex = index;
642
+ break;
643
+ }
644
+ return lastFilledIndex === -1 ? "" : chars.slice(0, lastFilledIndex + 1).join("");
645
+ }
646
+ normalizeValue(value) {
647
+ return this.filterCharacters(value).slice(0, this.maxLength()).join("");
648
+ }
649
+ filterCharacters(value) {
650
+ return Array.from(value).filter((character) => this.acceptsCharacter(character));
651
+ }
652
+ acceptsCharacter(character) {
653
+ return this.compiledPattern().every((pattern) => {
654
+ pattern.lastIndex = 0;
655
+ return pattern.test(character);
656
+ });
657
+ }
658
+ isRtl() {
659
+ return getComputedStyle(this.host.nativeElement).direction === "rtl";
660
+ }
661
+ static ɵfac = i0.ɵɵngDeclareFactory({
662
+ minVersion: "12.0.0",
663
+ version: "22.2.3",
664
+ ngImport: i0,
665
+ type: InputOtpComponent,
666
+ deps: null,
667
+ target: i0.ɵɵFactoryTarget.Component
668
+ });
669
+ static ɵcmp = i0.ɵɵngDeclareComponent({
670
+ minVersion: "17.2.0",
671
+ version: "22.2.3",
672
+ type: InputOtpComponent,
673
+ isStandalone: true,
674
+ selector: "InputOtp",
675
+ inputs: {
676
+ maxLengthInput: {
677
+ classPropertyName: "maxLengthInput",
678
+ publicName: "maxLength",
679
+ isSignal: true,
680
+ isRequired: false,
681
+ transformFunction: null
682
+ },
683
+ value: {
684
+ classPropertyName: "value",
685
+ publicName: "value",
686
+ isSignal: true,
687
+ isRequired: false,
688
+ transformFunction: null
689
+ },
690
+ pattern: {
691
+ classPropertyName: "pattern",
692
+ publicName: "pattern",
693
+ isSignal: true,
694
+ isRequired: false,
695
+ transformFunction: null
696
+ },
697
+ id: {
698
+ classPropertyName: "id",
699
+ publicName: "id",
700
+ isSignal: true,
701
+ isRequired: false,
702
+ transformFunction: null
703
+ },
704
+ ariaLabel: {
705
+ classPropertyName: "ariaLabel",
706
+ publicName: "aria-label",
707
+ isSignal: true,
708
+ isRequired: false,
709
+ transformFunction: null
710
+ },
711
+ ariaLabelledby: {
712
+ classPropertyName: "ariaLabelledby",
713
+ publicName: "aria-labelledby",
714
+ isSignal: true,
715
+ isRequired: false,
716
+ transformFunction: null
717
+ },
718
+ ariaDescribedby: {
719
+ classPropertyName: "ariaDescribedby",
720
+ publicName: "aria-describedby",
721
+ isSignal: true,
722
+ isRequired: false,
723
+ transformFunction: null
724
+ },
725
+ inputMode: {
726
+ classPropertyName: "inputMode",
727
+ publicName: "inputmode",
728
+ isSignal: true,
729
+ isRequired: false,
730
+ transformFunction: null
731
+ },
732
+ autocomplete: {
733
+ classPropertyName: "autocomplete",
734
+ publicName: "autocomplete",
735
+ isSignal: true,
736
+ isRequired: false,
737
+ transformFunction: null
738
+ },
739
+ required: {
740
+ classPropertyName: "required",
741
+ publicName: "required",
742
+ isSignal: true,
743
+ isRequired: false,
744
+ transformFunction: null
745
+ },
746
+ disabledInput: {
747
+ classPropertyName: "disabledInput",
748
+ publicName: "disabled",
749
+ isSignal: true,
750
+ isRequired: false,
751
+ transformFunction: null
752
+ },
753
+ invalidInput: {
754
+ classPropertyName: "invalidInput",
755
+ publicName: "aria-invalid",
756
+ isSignal: true,
757
+ isRequired: false,
758
+ transformFunction: null
759
+ },
760
+ class: {
761
+ classPropertyName: "class",
762
+ publicName: "class",
763
+ isSignal: true,
764
+ isRequired: false,
765
+ transformFunction: null
766
+ }
767
+ },
768
+ outputs: { valueChange: "valueChange" },
769
+ host: {
770
+ listeners: { "focusout": "handleFocusOut($event)" },
771
+ properties: {
772
+ "class": "classes()",
773
+ "attr.id": "null",
774
+ "attr.role": "\"group\"",
775
+ "attr.data-slot": "\"input-otp\"",
776
+ "attr.data-disabled": "disabled() ? \"\" : null",
777
+ "attr.data-invalid": "isInvalid() ? \"\" : null",
778
+ "attr.aria-label": "ariaLabel()",
779
+ "attr.aria-labelledby": "ariaLabelledby()",
780
+ "attr.aria-describedby": "describedBy()",
781
+ "attr.aria-disabled": "disabled() ? \"true\" : null",
782
+ "attr.aria-invalid": "isInvalid() ? \"true\" : null"
783
+ }
784
+ },
785
+ providers: [{
786
+ provide: NG_VALUE_ACCESSOR,
787
+ useExisting: forwardRef(() => InputOtpComponent),
788
+ multi: true
789
+ }, {
790
+ provide: InputOtpContextBase,
791
+ useExisting: forwardRef(() => InputOtpComponent)
792
+ }],
793
+ queries: [{
794
+ propertyName: "slots",
795
+ predicate: InputOtpSlotComponent,
796
+ descendants: true,
797
+ isSignal: true
798
+ }],
799
+ usesInheritance: true,
800
+ ngImport: i0,
801
+ template: `<ng-content />`,
802
+ isInline: true
803
+ });
804
+ };
805
+ i0.ɵɵngDeclareClassMetadata({
806
+ minVersion: "12.0.0",
807
+ version: "22.2.3",
808
+ ngImport: i0,
809
+ type: InputOtpComponent,
810
+ decorators: [{
811
+ type: Component,
812
+ args: [{
813
+ selector: "InputOtp",
814
+ providers: [{
815
+ provide: NG_VALUE_ACCESSOR,
816
+ useExisting: forwardRef(() => InputOtpComponent),
817
+ multi: true
818
+ }, {
819
+ provide: InputOtpContextBase,
820
+ useExisting: forwardRef(() => InputOtpComponent)
821
+ }],
822
+ host: {
823
+ "[class]": "classes()",
824
+ "[attr.id]": "null",
825
+ "[attr.role]": "\"group\"",
826
+ "[attr.data-slot]": "\"input-otp\"",
827
+ "[attr.data-disabled]": "disabled() ? \"\" : null",
828
+ "[attr.data-invalid]": "isInvalid() ? \"\" : null",
829
+ "[attr.aria-label]": "ariaLabel()",
830
+ "[attr.aria-labelledby]": "ariaLabelledby()",
831
+ "[attr.aria-describedby]": "describedBy()",
832
+ "[attr.aria-disabled]": "disabled() ? \"true\" : null",
833
+ "[attr.aria-invalid]": "isInvalid() ? \"true\" : null",
834
+ "(focusout)": "handleFocusOut($event)"
835
+ },
836
+ template: `<ng-content />`
837
+ }]
838
+ }],
839
+ propDecorators: {
840
+ maxLengthInput: [{
841
+ type: i0.Input,
842
+ args: [{
843
+ isSignal: true,
844
+ alias: "maxLength",
845
+ required: false
846
+ }]
847
+ }],
848
+ value: [{
849
+ type: i0.Input,
850
+ args: [{
851
+ isSignal: true,
852
+ alias: "value",
853
+ required: false
854
+ }]
855
+ }],
856
+ pattern: [{
857
+ type: i0.Input,
858
+ args: [{
859
+ isSignal: true,
860
+ alias: "pattern",
861
+ required: false
862
+ }]
863
+ }],
864
+ id: [{
865
+ type: i0.Input,
866
+ args: [{
867
+ isSignal: true,
868
+ alias: "id",
869
+ required: false
870
+ }]
871
+ }],
872
+ ariaLabel: [{
873
+ type: i0.Input,
874
+ args: [{
875
+ isSignal: true,
876
+ alias: "aria-label",
877
+ required: false
878
+ }]
879
+ }],
880
+ ariaLabelledby: [{
881
+ type: i0.Input,
882
+ args: [{
883
+ isSignal: true,
884
+ alias: "aria-labelledby",
885
+ required: false
886
+ }]
887
+ }],
888
+ ariaDescribedby: [{
889
+ type: i0.Input,
890
+ args: [{
891
+ isSignal: true,
892
+ alias: "aria-describedby",
893
+ required: false
894
+ }]
895
+ }],
896
+ inputMode: [{
897
+ type: i0.Input,
898
+ args: [{
899
+ isSignal: true,
900
+ alias: "inputmode",
901
+ required: false
902
+ }]
903
+ }],
904
+ autocomplete: [{
905
+ type: i0.Input,
906
+ args: [{
907
+ isSignal: true,
908
+ alias: "autocomplete",
909
+ required: false
910
+ }]
911
+ }],
912
+ required: [{
913
+ type: i0.Input,
914
+ args: [{
915
+ isSignal: true,
916
+ alias: "required",
917
+ required: false
918
+ }]
919
+ }],
920
+ disabledInput: [{
921
+ type: i0.Input,
922
+ args: [{
923
+ isSignal: true,
924
+ alias: "disabled",
925
+ required: false
926
+ }]
927
+ }],
928
+ invalidInput: [{
929
+ type: i0.Input,
930
+ args: [{
931
+ isSignal: true,
932
+ alias: "aria-invalid",
933
+ required: false
934
+ }]
935
+ }],
936
+ class: [{
937
+ type: i0.Input,
938
+ args: [{
939
+ isSignal: true,
940
+ alias: "class",
941
+ required: false
942
+ }]
943
+ }],
944
+ valueChange: [{
945
+ type: i0.Output,
946
+ args: ["valueChange"]
947
+ }],
948
+ slots: [{
949
+ type: i0.ContentChildren,
950
+ args: [i0.forwardRef(() => InputOtpSlotComponent), {
951
+ descendants: true,
952
+ isSignal: true
953
+ }]
954
+ }]
955
+ }
956
+ });
957
+ export { InputOtpComponent, InputOtpGroupComponent, InputOtpSeparatorComponent, InputOtpSlotComponent, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };